
/* ==========================================================
   SMART ATTENDANCE TRACKER SYSTEM
   Modern Responsive Design - TNHS Maroon, Gold and Cream
========================================================== */

/* 1. DESIGN VARIABLES */
:root {
    --maroon: #760021;
    --maroon-dark: #400013;
    --maroon-light: #a5284d;
    --gold: #d8b45a;
    --gold-light: #f1dfa5;
    --cream: #faf5ed;
    --white: #ffffff;
    --text: #261d20;
    --muted: #766a6d;
    --border: #e9dfe0;
    --success: #19734a;
    --success-bg: #eaf7ef;
    --danger: #a52635;
    --danger-bg: #fff0f0;
    --warning: #8b6414;
    --warning-bg: #fff6dd;
    --radius-sm: 9px;
    --radius-md: 15px;
    --radius-lg: 23px;
    --shadow-sm: 0 4px 14px rgba(56, 0, 18, .06);
    --shadow-md: 0 12px 32px rgba(56, 0, 18, .10);
    --shadow-lg: 0 25px 65px rgba(56, 0, 18, .15);
}

/* 2. RESET AND GLOBAL */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    width: 100%;
    min-height: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    overflow-x: hidden;
    background: #f7f4f1;
    color: var(--text);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

img {
    height: auto;
}

input,
select,
textarea,
button {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

button {
    cursor: pointer;
}

a {
    color: var(--maroon);
    text-underline-offset: 3px;
}

a:hover {
    color: var(--maroon-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(118, 0, 33, .25);
    outline-offset: 3px;
}

::selection {
    background: var(--maroon);
    color: var(--white);
}

/* ==========================================================
   3. LOGIN AND REGISTRATION PAGES
========================================================== */

.login-page {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    padding: clamp(12px, 4vw, 48px);
    background:
        radial-gradient(
            circle at 8% 10%,
            rgba(216, 180, 90, .18),
            transparent 34%
        ),
        radial-gradient(
            circle at 95% 90%,
            rgba(118, 0, 33, .09),
            transparent 35%
        ),
        linear-gradient(135deg, #fbf6ef, #f2e7da);
}

.login-wrapper {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    width: min(1120px, 100%);
    min-width: 0;
    min-height: 590px;
    margin: auto;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-lg);
}

.brand-section {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: clamp(28px, 4vw, 55px);
    overflow: hidden;
    color: var(--white);
    text-align: center;
    background: linear-gradient(
        145deg,
        var(--maroon) 0%,
        var(--maroon-dark) 100%
    );
}

.brand-section::before,
.brand-section::after {
    position: absolute;
    z-index: -1;
    content: "";
    display: block;
    border: 1px solid rgba(241, 223, 165, .18);
    border-radius: 50%;
    pointer-events: none;
}

.brand-section::before {
    width: 310px;
    height: 310px;
    top: -150px;
    left: -125px;
    box-shadow:
        0 0 0 25px rgba(255, 255, 255, .025),
        0 0 0 50px rgba(255, 255, 255, .02);
}

.brand-section::after {
    width: 260px;
    height: 260px;
    right: -145px;
    bottom: -125px;
    background: rgba(216, 180, 90, .06);
}

.school-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    min-width: 0;
    margin: 0 auto 28px;
}

.school-logo img {
    display: block;
    width: clamp(100px, 13vw, 155px) !important;
    height: clamp(100px, 13vw, 155px) !important;
    max-width: 100%;
    margin: 0 auto;
    padding: 7px;
    object-fit: contain;
    border: 4px solid var(--gold);
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .2);
}

.school-logo span {
    color: var(--gold-light);
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.brand-section h1 {
    max-width: 100%;
    margin: 0 0 14px;
    color: var(--white);
    font-size: clamp(1.4rem, 2.5vw, 2.05rem);
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: .035em;
    overflow-wrap: anywhere;
}

.brand-section p {
    margin: 7px 0 2px;
    color: rgba(255, 255, 255, .92);
    font-size: 1rem;
    line-height: 1.5;
}

.brand-section > span {
    color: rgba(255, 255, 255, .72);
    font-size: .88rem;
}

.login-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: clamp(25px, 4vw, 58px);
    background: var(--white);
}

.login-card {
    width: 100%;
    max-width: 465px;
    min-width: 0;
    margin: 0 auto;
}

.login-card h2 {
    margin: 0 0 7px;
    color: var(--maroon);
    font-size: clamp(1.6rem, 2.5vw, 2.05rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.03em;
}

.login-subtitle {
    margin: 0 0 25px;
    color: var(--muted);
    font-size: .96rem;
}

/* 4. FORM FIELDS */
.input-group,
.form-group {
    width: 100%;
    min-width: 0;
    margin-bottom: 17px;
}

.input-group > label,
.form-group > label,
.form-group label {
    display: block;
    margin-bottom: 7px;
    color: #352a2d;
    font-size: .88rem;
    font-weight: 700;
}

.input-box {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    min-height: 49px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #fcfaf8;
    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.input-box:focus-within {
    border-color: var(--maroon-light);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(118, 0, 33, .08);
}

.input-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    color: var(--maroon);
    font-size: 1rem;
}

.input-box input,
.input-box select,
.input-box textarea {
    display: block;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 47px;
    margin: 0;
    padding: 11px 0;
    border: 0;
    outline: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text);
    font-size: 16px;
    line-height: 1.4;
    box-shadow: none;
}

.input-box input::placeholder,
.input-box textarea::placeholder {
    color: #a19798;
    opacity: 1;
}

.input-box input:focus,
.input-box select:focus,
.input-box textarea:focus {
    border: 0;
    outline: 0;
    box-shadow: none;
}

.input-box select,
.register-select {
    cursor: pointer;
}

.input-box textarea {
    resize: vertical;
}

.register-select {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    padding: 11px 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 16px;
}

.strand-group[hidden] {
    display: none !important;
}

.strand-group small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: .8rem;
}

/* 5. SHOW/HIDE PASSWORD EYE ICON */
.password-input-box {
    display: flex;
    align-items: center;
    gap: 7px;
}

.password-input-box input {
    flex: 1 1 auto;
    min-width: 0;
}

.password-toggle {
    display: inline-flex;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #89797d;
    cursor: pointer;
    transition: color .2s ease, background .2s ease;
}

.password-toggle:hover {
    color: var(--maroon);
    background: #f7e9ed;
}

.password-toggle svg {
    display: block;
    width: 20px;
    height: 20px;
}

.password-toggle .eye-off-icon {
    display: none;
}

.password-toggle.is-visible .eye-icon {
    display: none;
}

.password-toggle.is-visible .eye-off-icon {
    display: block;
}

/* 6. LOGIN OPTIONS AND LINKS */
.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 15px;
    margin: 4px 0 22px;
    font-size: .84rem;
}

.remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    cursor: pointer;
}

.remember input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--maroon);
}

.forgot {
    color: var(--maroon);
    font-weight: 700;
    text-decoration: none;
}

.register-link {
    margin-top: 17px;
    color: var(--muted);
    line-height: 1.6;
}

.register-link p {
    margin: 0 0 3px;
    font-size: .9rem;
}

.register-link a {
    color: var(--maroon);
    font-weight: 750;
    overflow-wrap: anywhere;
}

/* 7. BUTTONS */
.login-button,
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 49px;
    padding: 13px 18px;
    border: 1px solid transparent;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--maroon), var(--maroon-dark));
    color: var(--white);
    font-size: .96rem;
    font-weight: 750;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 7px 17px rgba(118, 0, 33, .18);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.login-button:hover,
.btn-primary:hover {
    color: var(--white);
    filter: brightness(1.08);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(118, 0, 33, .23);
}

.login-button:active,
.btn-primary:active {
    transform: scale(.99);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 10px 15px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: var(--maroon);
    color: var(--white);
    text-align: center;
    text-decoration: none;
    font-size: .87rem;
    font-weight: 700;
    overflow-wrap: anywhere;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.btn:hover {
    background: var(--maroon-dark);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background: #665b5e;
}

.btn-secondary:hover {
    background: #453a3d;
}

.btn-danger {
    background: #b92f40;
}

.btn-danger:hover {
    background: #962233;
}

.btn-success {
    background: #218653;
}

.btn-success:hover {
    background: #176b41;
}

button:disabled,
.btn:disabled {
    cursor: not-allowed;
    opacity: .6;
    transform: none;
}

/* 8. ALERTS AND STATUS MESSAGES */
.login-message,
.register-message,
.alert {
    width: 100%;
    padding: 13px 15px;
    margin: 0 0 16px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-size: .88rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.login-message.success,
.register-success,
.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border-color: #ccebd8;
}

.login-message.error,
.register-error,
.alert-error {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: #f4d2d5;
}

.alert-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border-color: #f0e0af;
}

/* ==========================================================
   9. DASHBOARD LAYOUT
========================================================== */

.dashboard {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    min-height: 100vh;
    min-height: 100svh;
    background: #f7f5f3;
}

.sidebar {
    flex: 0 0 250px;
    width: 250px;
    min-width: 0;
    min-height: 100vh;
    padding: 25px 16px;
    background: linear-gradient(180deg, var(--maroon), var(--maroon-dark));
    color: var(--white);
    box-shadow: 7px 0 24px rgba(56, 0, 18, .07);
}

.sidebar h1,
.sidebar h2,
.sidebar h3,
.sidebar p {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 24px;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 43px;
    padding: 11px 13px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: rgba(255, 255, 255, .88);
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: background .2s ease, border-color .2s ease;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: rgba(255, 255, 255, .13);
    border-color: rgba(255, 255, 255, .1);
    color: var(--white);
}

.main-content {
    flex: 1 1 auto;
    width: 0;
    min-width: 0;
    padding: clamp(20px, 3vw, 38px);
}

.main-content h1 {
    margin: 0 0 10px;
    color: var(--text);
    font-size: clamp(1.5rem, 2.5vw, 2.05rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.03em;
    overflow-wrap: anywhere;
}

.main-content h2 {
    margin: 0 0 15px;
    color: var(--text);
    font-size: clamp(1.15rem, 2vw, 1.45rem);
    line-height: 1.35;
}

.main-content p {
    line-height: 1.65;
    overflow-wrap: anywhere;
}

/* 10. DASHBOARD CARDS AND STATISTICS */
.stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 25px 0;
}

.stat-card,
.card,
.panel {
    min-width: 0;
    padding: clamp(17px, 2vw, 25px);
    border: 1px solid #eee6e2;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.stat-card {
    position: relative;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}

.stat-card::after {
    position: absolute;
    top: -28px;
    right: -25px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(216, 180, 90, .13);
    content: "";
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-card h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 10px;
    color: var(--muted);
    font-size: .86rem;
    font-weight: 650;
}

.stat-card .stat-number {
    position: relative;
    z-index: 1;
    color: var(--maroon);
    font-size: clamp(1.65rem, 3vw, 2.15rem);
    font-weight: 850;
    line-height: 1.2;
}

.stat-card .stat-icon {
    position: relative;
    z-index: 1;
    margin-bottom: 10px;
    color: var(--maroon);
    font-size: 1.7rem;
}

.clickable-card,
.class-management-card {
    display: block;
    color: inherit;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}

.clickable-card:hover,
.class-management-card:hover {
    transform: translateY(-3px);
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 22px 0 30px;
}

.quick-actions a,
.quick-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    min-height: 50px;
    padding: 14px;
    border: 1px solid #eee1e0;
    border-radius: 12px;
    background: var(--white);
    color: var(--maroon);
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    overflow-wrap: anywhere;
    box-shadow: var(--shadow-sm);
    transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.quick-actions a:hover,
.quick-actions button:hover {
    background: #fff8f3;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 11. RESPONSIVE TABLES */
.table-container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 20px;
    overflow-x: auto;
    border: 1px solid #eee6e2;
    border-radius: 13px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--white);
}

th,
td {
    padding: 13px 15px;
    border-bottom: 1px solid #f0e9e6;
    text-align: left;
    vertical-align: middle;
    overflow-wrap: anywhere;
}

th {
    background: var(--maroon);
    color: var(--white);
    font-size: .82rem;
    font-weight: 750;
    white-space: nowrap;
}

td {
    color: #4a4043;
    font-size: .88rem;
}

tbody tr:last-child td {
    border-bottom: 0;
}

tbody tr:nth-child(even) td {
    background: #fffdfa;
}

tbody tr:hover td {
    background: #fbf1ed;
}

/* 12. ATTENDANCE STATUS LABELS */
.status,
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 750;
    white-space: nowrap;
}

.status-present,
.badge-present {
    background: #e2f6e9;
    color: #176b37;
}

.status-late,
.badge-late {
    background: #fff2cf;
    color: #805900;
}

.status-absent,
.badge-absent {
    background: #ffe5e6;
    color: #a00000;
}

/* 13. LEGACY FORM COMPATIBILITY */
.login-container {
    width: min(1000px, calc(100% - 32px));
    min-width: 0;
    min-height: 480px;
    margin: 30px auto;
    padding: clamp(20px, 4vw, 38px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.login-form {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
}

.login-form h2 {
    margin: 0 0 10px;
    color: var(--maroon);
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
}

.login-form p {
    margin: 0 0 20px;
    color: var(--muted);
}

.form-group input,
.form-group select,
.form-group textarea {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fcfaf8;
    color: var(--text);
    font-size: 16px;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--maroon-light);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(118, 0, 33, .08);
}

input,
select,
textarea {
    max-width: 100%;
}

hr {
    margin: 22px 0;
    border: 0;
    border-top: 1px solid #eee3e0;
}

fieldset {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
}

legend {
    padding: 0 8px;
    color: var(--maroon);
    font-weight: 750;
}

/* ==========================================================
   14. TABLET RESPONSIVE
========================================================== */

@media (max-width: 1024px) {
    .login-wrapper {
        grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
        min-height: 560px;
    }

    .brand-section {
        padding: 28px 22px;
    }

    .school-logo img {
        width: clamp(95px, 13vw, 140px) !important;
        height: clamp(95px, 13vw, 140px) !important;
    }

    .login-section {
        padding: 28px;
    }

    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quick-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .main-content {
        padding: 23px;
    }
}

/* ==========================================================
   15. PHONE AND SMALL TABLET
========================================================== */

@media (max-width: 760px) {
    .login-page {
        align-items: flex-start;
        padding: 12px;
    }

    .login-wrapper {
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
        min-height: 0;
        margin: auto;
        border-radius: 19px;
    }

    .brand-section {
        padding: 23px 17px;
    }

    .school-logo {
        gap: 4px;
        margin-bottom: 13px;
    }

    .school-logo img {
        width: 80px !important;
        height: 80px !important;
        padding: 5px;
        border-width: 3px;
    }

    .school-logo span {
        font-size: .72rem;
    }

    .brand-section h1 {
        margin-bottom: 7px;
        font-size: clamp(1.1rem, 4.8vw, 1.5rem);
    }

    .brand-section p,
    .brand-section > span {
        font-size: .84rem;
    }

    .login-section {
        padding: 26px clamp(16px, 5vw, 30px);
    }

    .login-card {
        max-width: 560px;
    }

    .login-card h2 {
        font-size: 1.6rem;
    }

    .dashboard {
        flex-direction: column;
    }

    .sidebar {
        flex: 0 0 auto;
        width: 100%;
        min-height: 0;
        padding: 15px;
    }

    .sidebar nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 15px;
    }

    .sidebar nav a {
        flex: 0 1 auto;
        min-height: 40px;
        padding: 9px 11px;
        font-size: .82rem;
    }

    .main-content {
        width: 100%;
        padding: 22px 15px;
    }

    .main-content h1 {
        font-size: 1.5rem;
    }

    .main-content h2 {
        font-size: 1.2rem;
    }

    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        margin: 20px 0;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-card .stat-number {
        font-size: 1.6rem;
    }

    .quick-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .quick-actions a,
    .quick-actions button {
        padding: 12px 9px;
        font-size: .84rem;
    }

    .table-container {
        overflow-x: auto;
    }

    .table-container table {
        min-width: 620px;
    }

    .btn {
        min-height: 40px;
    }
}

/* ==========================================================
   16. SMALL PHONE
========================================================== */

@media (max-width: 480px) {
    .login-page {
        padding: 7px;
    }

    .login-wrapper {
        border-radius: 15px;
    }

    .brand-section {
        padding: 19px 12px;
    }

    .brand-section h1 {
        font-size: 1.1rem;
        letter-spacing: .02em;
    }

    .school-logo img {
        width: 70px !important;
        height: 70px !important;
    }

    .login-section {
        padding: 22px 14px;
    }

    .login-card h2 {
        font-size: 1.42rem;
    }

    .login-subtitle {
        margin-bottom: 20px;
    }

    .input-group {
        margin-bottom: 14px;
    }

    .input-box {
        border-radius: 10px;
    }

    .login-options {
        align-items: flex-start;
        gap: 9px;
        font-size: .8rem;
    }

    .login-button {
        min-height: 47px;
    }

    .stats,
    .quick-actions {
        grid-template-columns: minmax(0, 1fr);
    }

    .sidebar {
        padding: 12px 10px;
    }

    .sidebar nav a {
        padding: 8px 9px;
        font-size: .77rem;
    }

    .main-content {
        padding: 18px 10px;
    }

    .stat-card {
        padding: 15px;
    }

    th,
    td {
        padding: 10px 11px;
    }
}

/* VERY NARROW PHONE */
@media (max-width: 340px) {
    .input-box {
        padding-right: 7px;
        padding-left: 7px;
    }

    .input-icon {
        margin-right: 6px;
    }

    .password-input-box {
        gap: 4px;
    }

    .password-toggle {
        flex-basis: 29px;
        width: 29px;
    }

    .login-options {
        flex-direction: column;
    }
}

/* TOUCH DEVICES */
@media (hover: none) {
    .stat-card:hover,
    .quick-actions a:hover,
    .quick-actions button:hover,
    .btn:hover,
    .login-button:hover {
        transform: none;
    }
}

/* ACCESSIBILITY: REDUCE MOTION */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
