* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, sans-serif; background: #f5f7fb; color: #1f2937; }
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.app-header { background: #111827; color: #ffffff; padding: 18px 28px; }
.app-header h1 { margin: 0; font-size: 22px; }
.app-main { flex: 1; padding: 28px; }
.dashboard-card { max-width: 760px; background: #ffffff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 24px; box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06); }
.dashboard-card h2 { margin: 0 0 10px; font-size: 24px; }
.dashboard-card p { margin: 0; line-height: 1.6; color: #4b5563; }
.form-error { margin: 14px 0; padding: 12px 14px; border: 1px solid #fecaca; border-radius: 10px; background: #fef2f2; color: #991b1b; font-weight: 600; }
.auth-public-header { background: #003049; color: #ffffff; height: 73px; }
.auth-public-header__inner { width: 100%; height: 73px; margin: 0; padding: 0 0 0 44px; display: flex; align-items: center; justify-content: flex-start; }
.auth-public-brand { display: inline-flex; align-items: center; text-decoration: none; color: #ffffff; line-height: 0; }
.auth-public-logo { width: 100px; height: auto; display: block; }
.auth-public-nav { background: #00DEFF; }
.auth-public-nav__inner { max-width: 1180px; margin: 0 auto; padding: 0 28px; display: flex; align-items: center; gap: 22px; min-height: 48px; }
.auth-public-nav a { color: #003049; text-decoration: none; font-weight: 700; }
.auth-login-main { max-width: 1180px; margin: 0 auto; padding: 42px 28px; min-height: calc(100vh - 73px); display: flex; align-items: center; justify-content: center; }
.auth-login-card { width: 100%; max-width: 520px; background: #ffffff; border: 1px solid #e5e7eb; border-radius: 18px; padding: 28px; box-shadow: 0 18px 45px rgba(15, 23, 42, 0.10); }
.auth-login-card h2 { margin: 0 0 10px; font-size: 26px; }
.auth-login-card p { line-height: 1.6; color: #4b5563; }
.auth-login-card form {
    margin-top: 26px;
}

.auth-login-card form p {
    margin: 0 0 20px;
}

.auth-login-card label {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

.auth-login-card input[type="email"],
.auth-login-card input[type="password"],
.auth-login-card input[type="text"],
.auth-password-field input[type="text"] {
    width: 100%;
    max-width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    font-size: 16px;
    outline: none;
}

.auth-password-field {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.auth-password-field input[type="password"],
.auth-password-field input[type="text"] {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.auth-password-toggle {
    width: 48px;
    border: 1px solid #cbd5e1;
    border-left: 0;
    border-radius: 0 8px 8px 0;
    background: #f8fafc;
    color: #003049;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-password-toggle:hover {
    background: #eef6fb;
}

.auth-password-toggle:focus {
    outline: none;
    border-color: #00DEFF;
}

.auth-password-icon {
    width: 21px;
    height: 21px;
    fill: currentColor;
}

.auth-password-icon--hide {
    display: none;
}

.auth-password-toggle.is-visible .auth-password-icon--show {
    display: none;
}

.auth-password-toggle.is-visible .auth-password-icon--hide {
    display: block;
}

.auth-remember-option {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 2px 0 22px;
    color: #1f2937;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.auth-remember-option input {
    width: 17px;
    height: 17px;
    accent-color: #003049;
}

.auth-login-card input[type="email"]:focus,
.auth-login-card input[type="password"]:focus,
.auth-login-card input[type="text"]:focus {
    border-color: #00DEFF;
}

.auth-login-card button[type="submit"] {
    min-width: 140px;
    height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 10px;
    background: #003049;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.auth-login-card button[type="submit"]:hover {
    background: #0b3f5c;
}
.auth-login-actions {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

@media (max-width: 640px) {
    .auth-public-header {
        height: 66px;
    }

    .auth-public-header__inner {
        height: 66px;
        padding-left: 18px;
    }

    .auth-public-logo {
        width: 88px;
    }

    .auth-login-main {
        min-height: calc(100vh - 66px);
        padding: 28px 16px;
    }

    .auth-login-card {
        max-width: 100%;
        padding: 24px 20px;
        border-radius: 16px;
    }

    .auth-login-card h2 {
        font-size: 24px;
    }

    .auth-login-card button[type="submit"] {
        width: 100%;
    }
}
.admin-layout { height: 100vh; display: grid; grid-template-columns: 280px minmax(0, 1fr); background: #f5f7fb; overflow: hidden; }

.admin-sidebar { height: 100vh; overflow-y: auto; background: #003049; color: #ffffff; padding: 24px 18px; }

.admin-sidebar__brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 26px; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }

.admin-sidebar__brand img { width: 92px; height: auto; display: block; }

.admin-sidebar__brand span { font-weight: 700; font-size: 16px; }

.admin-sidebar__nav { display: grid; gap: 8px; margin-top: 24px; }

.admin-sidebar__nav a { display: block; padding: 12px 14px; border-radius: 10px; color: #dbeafe; text-decoration: none; font-weight: 600; line-height: 1.35; }

.admin-sidebar__nav a:hover,
.admin-sidebar__nav a.is-active { background: #00DEFF; color: #003049; }

.admin-content { min-width: 0; height: 100vh; overflow-y: auto; padding: 32px; }

.admin-page-title { margin: 0 0 22px; font-size: 28px; color: #0f172a; }

.admin-mobile-topbar,
.admin-sidebar-backdrop {
    display: none;
}

@media (max-width: 860px) {
    .admin-layout {
        grid-template-columns: 1fr;
        align-content: start;
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    .admin-mobile-topbar {
        position: sticky;
        top: 0;
        z-index: 110;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        height: 64px;
        padding: 8px 16px;
        background: #003049;
        color: #ffffff;
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
    }

    .admin-mobile-topbar__brand {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
        font-weight: 700;
    }

    .admin-mobile-topbar__brand img {
        display: block;
        width: 58px;
        height: auto;
    }

    .admin-mobile-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        width: 44px;
        height: 44px;
        border: 1px solid rgba(255, 255, 255, 0.22);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.10);
        color: #ffffff;
        cursor: pointer;
    }

    .admin-mobile-menu-toggle__icon,
    .admin-mobile-menu-toggle__icon::before,
    .admin-mobile-menu-toggle__icon::after {
        display: block;
        width: 22px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
    }

    .admin-mobile-menu-toggle__icon {
        position: relative;
    }

    .admin-mobile-menu-toggle__icon::before,
    .admin-mobile-menu-toggle__icon::after {
        content: "";
        position: absolute;
        left: 0;
    }

    .admin-mobile-menu-toggle__icon::before {
        top: -7px;
    }

    .admin-mobile-menu-toggle__icon::after {
        top: 7px;
    }

    .admin-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 130;
        width: min(84vw, 320px);
        height: 100vh;
        overflow-y: auto;
        padding: 18px 16px;
        transform: translateX(-100%);
        transition: transform 180ms ease;
    }

    .admin-layout.admin-sidebar-open .admin-sidebar {
        transform: translateX(0);
    }

    .admin-sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 120;
        background: rgba(15, 23, 42, 0.48);
    }

    .admin-layout.admin-sidebar-open .admin-sidebar-backdrop {
        display: block;
    }

    .admin-sidebar__brand { padding-bottom: 18px; }

    .admin-sidebar__nav { grid-template-columns: 1fr; }

    .admin-content {
        height: auto;
        overflow-y: visible;
        padding: 24px 16px;
    }
}

.form-success {
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    background: #f0fdf4;
    color: #166534;
    font-weight: 700;
}

.admin-module-card {
    max-width: none;
    margin-bottom: 22px;
}

.admin-module-card h2 {
    margin-bottom: 10px;
}

.admin-module-card > p {
    margin-bottom: 22px;
}

.admin-form {
    margin-top: 22px;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.admin-form-grid p {
    margin: 0;
}

.admin-form-grid__full {
    grid-column: 1 / -1;
}

.admin-form label {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    width: 100%;
    max-width: 100%;
    padding: 11px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    font-size: 15px;
    font-family: inherit;
}

.admin-form textarea {
    resize: vertical;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
    border-color: #00DEFF;
    outline: none;
}

.admin-primary-button {
    margin-top: 20px;
    min-width: 140px;
    min-height: 44px;
    padding: 0 22px;
    border: 0;
    border-radius: 10px;
    background: #003049;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.admin-primary-button:hover {
    background: #0b3f5c;
}

.admin-secondary-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-left: 12px;
    color: #003049;
    font-weight: 700;
    text-decoration: none;
}

.admin-secondary-link:hover {
    text-decoration: underline;
}

.admin-table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #003049;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.admin-table-action:hover {
    background: #e0faff;
    text-decoration: none;
}

.admin-inline-form {
    display: inline-flex;
    margin: 0 0 0 8px;
    vertical-align: middle;
}

.admin-table-action-button {
    padding: 0;
    font: inherit;
}

.admin-table td:last-child {
    min-width: 92px;
    white-space: nowrap;
}

.admin-table-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 18px;
}

.admin-table-count {
    color: #475569;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.admin-table-search-input {
    width: min(100%, 320px);
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    font-size: 14px;
    font-family: inherit;
}

.admin-table-search-input:focus {
    border-color: #00DEFF;
    outline: none;
}

.admin-table-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

.admin-table-page-button {
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.admin-table-page-button:disabled {
    color: #94a3b8;
    cursor: not-allowed;
}

.admin-table-page-info {
    color: #475569;
    font-size: 14px;
    font-weight: 700;
}

.admin-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 18px;
    font-size: 14px;
}

.admin-table th,
.admin-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

.admin-table th:not(:first-child):not(:nth-last-child(2)),
.admin-table td:not(:first-child):not(:nth-last-child(2)) {
    white-space: nowrap;
}

.admin-table th {
    background: #f8fafc;
    color: #0f172a;
    font-weight: 700;
}

@media (max-width: 760px) {
    .admin-form-grid {
        grid-template-columns: 1fr;
    }
}
.dashboard-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.dashboard-metric-card {
    max-width: none;
}

.dashboard-metric-label {
    display: block;
    margin-bottom: 10px;
    color: #4b5563;
    font-size: 14px;
    font-weight: 700;
}

.dashboard-metric-value {
    display: block;
    color: #0f172a;
    font-size: 28px;
    line-height: 1.2;
}

@media (max-width: 900px) {
    .dashboard-summary-grid {
        grid-template-columns: 1fr;
    }
}


.auth-login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 2px 0 22px;
}

.auth-login-options .auth-remember-option {
    margin: 0;
}

.auth-forgot-link {
    color: #003049;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.auth-forgot-link:hover {
    text-decoration: underline;
}

.auth-help-text {
    margin: 0 0 18px;
    color: #4b5563;
    line-height: 1.6;
}

.auth-success-message {
    margin: 14px 0;
    padding: 12px 14px;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    background: #f0fdf4;
    color: #166534;
    font-weight: 600;
}

.auth-secondary-link-row {
    margin-top: 18px;
    text-align: center;
}
