/* =====================
   UNIVERSAL MATERIAL FORM LAYER
   Bootstrap compatible (layout only)
   ===================== */

/* =====================
   REMOVE BOOTSTRAP LOOK
   ===================== */

.form-control,
.form-select,
.form-check-input,
.form-range,
.input-group-text,
.btn {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    appearance: none;
}

.form-control,
.form-select,
.btn {
    border-radius: 0 !important;
}

.form-control:focus,
.form-select:focus,
.btn:focus {
    box-shadow: none !important;
}

/* =====================
   INPUT / SELECT / TEXTAREA
   ===================== */

input,
textarea,
select,
.form-control,
.form-select {
    width: 100%;
    padding: 12px 10px 8px;
    border-bottom: 2px solid var(--border) !important;
    background: transparent !important;
    color: var(--text);
    transition: var(--transition);
}

/* Focus */
input:focus,
textarea:focus,
select:focus,
.form-control:focus,
.form-select:focus {
    border-bottom-color: var(--primary) !important;
}

/* Disabled */
input:disabled,
textarea:disabled,
select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Autofill fix */
input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px var(--bg) inset;
    -webkit-text-fill-color: var(--text);
}

/* =====================
   FLOATING LABEL (AUTO)
   ===================== */

div:has(> input),
div:has(> textarea),
div:has(> select) {
    position: relative;
}

input + label,
textarea + label,
select + label {
    position: absolute;
    left: 10px;
    top: 12px;
    font-size: 14px;
    color: var(--muted);
    pointer-events: none;
    transition: var(--transition);
    background: var(--bg);
    padding: 0 4px;
}

input:focus + label,
input:not(:placeholder-shown) + label,
textarea:focus + label,
textarea:not(:placeholder-shown) + label,
select:focus + label,
select:valid + label {
    top: -8px;
    font-size: 11px;
    color: var(--primary);
}

/* =====================
   INPUT GROUP
   ===================== */

.input-group {
    border-bottom: 2px solid var(--border);
}

.input-group:focus-within {
    border-bottom-color: var(--primary);
}

.input-group .form-control {
    border: none !important;
}

.input-group-text {
    color: var(--muted);
}

/* =====================
   BUTTONS + RIPPLE
   ===================== */

button,
.btn {
    position: relative;
    overflow: hidden;
    padding: 10px 18px;
    border-radius: var(--radius) !important;
    background: var(--primary) !important;
    color: #fff !important;
    cursor: pointer;
    transition: var(--transition);
}

button:hover,
.btn:hover {
    background: var(--primary-light) !important;
}

button::after,
.btn::after {
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: scale(0);
    opacity: 0;
}

button:active::after,
.btn:active::after {
    transform: scale(2);
    opacity: 1;
    transition: 0.4s;
}

/* =====================
   NOTIFICATION BELL
   ===================== */
.notifbtn {
    background: #fff !important;
    color: #000 !important;
    cursor: pointer !important;
    transition: var(--transition);
    overflow: visible !important;
}
.notifbtn i{
    font-size:30px;
}
.notifbtn .badge {
    top: 6px !important;
    right: 6px !important;
    transform: none !important;
}

.notifbtn:hover {
    background: #fff !important;
}



/* =====================
   CHECKBOX / RADIO
   ===================== */

input[type="checkbox"],
input[type="radio"],
.form-check-input {
    accent-color: var(--primary);
    cursor: pointer;
}

/* =====================
   SWITCH (BOOTSTRAP)
   ===================== */

.form-switch .form-check-input {
    width: 42px;
    height: 22px;
    background: #ccc;
    border-radius: 20px;
    position: relative;
}

.form-switch .form-check-input:checked {
    background: var(--primary);
}

/* =====================
   RANGE
   ===================== */

input[type="range"],
.form-range {
    width: 100%;
    height: 4px;
    background: #ddd;
    border-radius: 10px;
}

input[type="range"]::-webkit-slider-thumb,
.form-range::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

/* =====================
   PROGRESS
   ===================== */

progress {
    width: 100%;
    height: 6px;
    appearance: none;
}

progress::-webkit-progress-bar {
    background: #eee;
}

progress::-webkit-progress-value {
    background: var(--primary);
}

/* =====================
   FILE INPUT
   ===================== */

input[type="file"]::file-selector-button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: var(--radius);
    cursor: pointer;
}

/* =====================
   VALIDATION
   ===================== */

.is-valid {
    border-bottom-color: #16a34a !important;
}

.is-invalid {
    border-bottom-color: var(--error) !important;
}

input:invalid {
    border-bottom-color: var(--error) !important;
}

/* =====================
   TEXT HELPERS
   ===================== */

.form-label {
    font-size: 13px;
    color: var(--muted);
}

.form-text {
    font-size: 12px;
    color: var(--muted);
}

/* =====================
   SCROLLBAR
   ===================== */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

/* =========================
   Material Round Icon Button
   ========================= */

.btn-round {
    width: 44px;
    height: 44px;
    border-radius: 50% !important;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer !important;
    transition: all 0.25s ease;
}

/* Sizes */
.btn-round.sm {
    width: 36px;
    height: 36px;
    font-size: 14px;
}

.btn-round.lg {
    width: 52px;
    height: 52px;
    font-size: 20px;
}

/* Primary gradient variant */
.btn-round.primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
}

/* Light variant */
.btn-round.light {
    background: #f1f3f5;
    color: #333;
}

/* Outline variant */
.btn-round.outline {
    background: transparent;
    border: 1px solid #ddd;
    color: #333;
}

/* Hover effects */
.btn-round:hover {
    transform: translateY(-2px);
}

/* Gradient hover glow */
.btn-round.primary:hover {
    box-shadow: 0 8px 20px rgba(238, 63, 54, 0.3);
}

/* Click */
.btn-round:active {
    transform: scale(0.95);
}

/* Icon motion (optional polish) */
.btn-round i {
    transition: transform 0.2s ease;
}

.btn-round:hover i {
    transform: translateX(2px);
}

.spin {
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}