body.admin-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 12%, rgba(255, 215, 0, 0.16), transparent 28%),
        linear-gradient(135deg, #163861 0%, #2c4f7f 55%, #1e3a5f 100%);
    font-family: 'Poppins', sans-serif;
}

.admin-shell {
    width: min(96vw, 1680px);
    min-height: 100vh;
    margin: 0 auto;
    display: block;
}

.admin-login-panel,
.admin-dashboard {
    min-height: 84vh;
}

.admin-login-panel {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: auto;
    position: static;
    padding: 32px 0;
}

.admin-login-card {
    width: min(100%, 460px);
    min-height: 580px;
    background: #1d3a62;
    color: #eef5ff;
    border-radius: 18px;
    padding: clamp(32px, 5vw, 72px) 34px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 28px 80px rgba(12, 31, 56, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.12);
    position: static;
}

@media (min-width: 992px) {
    .admin-login-panel {
        align-items: center;
        min-height: 100vh;
        padding: 0;
    }

    #login-section .admin-login-card {
        width: min(100%, 620px);
        min-height: 740px;
        padding: 72px 42px;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 1200;
    }
}

.admin-home-link {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #f7d84a;
    text-decoration: none;
    font-weight: 700;
    margin-bottom: 32px;
}

.admin-login-logo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.admin-page-logo {
    width: min(100%, 220px);
    height: auto;
    object-fit: contain;
}

.admin-login-card h1 {
    text-align: center;
    font-size: 1.9rem;
    font-weight: 700;
    padding-bottom: 36px;
    margin-bottom: 34px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.admin-login-form label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.98rem;
    margin: 0 0 8px;
    color: #f4f8ff;
    position: relative;
    z-index: 1;
}

#loginForm {
    background: transparent;
    padding: 0;
    border: 0;
    box-shadow: none;
    position: static;
    overflow: visible;
}

#loginForm::before {
    display: none;
}

#loginForm input,
.admin-login-form input {
    width: 100%;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: #f8fbff;
    color: #162744;
    padding: 0 16px;
    margin-bottom: 24px;
    font-weight: 600;
}

#loginForm input::placeholder,
.admin-login-form input::placeholder {
    color: #68758a;
}

#loginForm input:focus,
.admin-login-form input:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.2);
    background: #ffffff;
}

.password-wrap {
    position: relative;
}

#loginForm .password-wrap button,
.password-wrap button {
    position: absolute;
    right: 12px;
    top: 10px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    color: #1d3a62;
    background: #e8eef8;
    box-shadow: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

#loginForm .password-wrap input {
    padding-right: 52px;
}

#loginForm .login-submit,
.login-submit {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 8px;
    margin-top: 8px;
    background: #2f68bd;
    color: white;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 0;
    box-shadow: 0 12px 24px rgba(14, 44, 91, 0.28);
}

#loginForm .login-submit:hover,
.login-submit:hover {
    background: #245aa6;
    transform: translateY(-1px);
}

.login-hint {
    text-align: center;
    margin: 22px 0 0;
    color: #e6eefb;
}

.admin-dashboard {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    background: #eef2f8;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(12, 31, 56, 0.28);
}

.admin-dashboard[hidden] {
    display: none;
}

.dashboard-sidebar {
    padding: 22px 0 24px;
    background: #f5f8fc;
    border-right: 1px solid #d7deea;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px 26px;
    color: #243550;
    text-decoration: none;
}

.sidebar-brand span {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: #1e5baa;
    color: #ffd700;
    font-weight: 800;
    overflow: hidden;
}

.sidebar-logo-wrap {
    background: #ffffff;
    padding: 0;
}

.sidebar-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.sidebar-brand strong {
    display: block;
    line-height: 1.2;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 52px;
    padding: 0 24px;
    border: 0;
    color: #243550;
    background: transparent;
    text-decoration: none;
    font-weight: 500;
    text-align: left;
}

.sidebar-link i {
    width: 20px;
    color: #435672;
    font-size: 1.12rem;
}

.sidebar-link.active {
    color: white;
    background: #2865b8;
}

.sidebar-link.active i {
    color: white;
}

.sidebar-button {
    cursor: pointer;
}

.dashboard-main {
    min-width: 0;
}

.dashboard-header {
    min-height: 84px;
    padding: 0 26px;
    background: #f4f7fb;
    border-bottom: 1px solid #d3dbe8;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-header h2 {
    font-size: 1.45rem;
    margin: 0;
    color: #243550;
    font-weight: 700;
}

.dashboard-header p {
    margin: 4px 0 0;
    color: #66758c;
    font-size: 0.92rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-actions button {
    border: 0;
    color: #344866;
    background: transparent;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #243550;
    font-weight: 700;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 14px;
    padding: 26px;
}

.stat-card {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    min-height: 112px;
    padding: 22px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 6px 14px rgba(24, 45, 75, 0.12);
}

.stat-card span {
    display: block;
    color: #243550;
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.stat-card strong {
    color: #243550;
    font-size: 2rem;
    line-height: 1;
}

.stat-card i {
    color: #2a65b4;
    font-size: 1.8rem;
}

.admin-table-card {
    margin: 0 26px 30px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 6px 14px rgba(24, 45, 75, 0.11);
}

.table-toolbar {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #d9e0eb;
}

.filter-panel {
    padding: 14px;
    border-bottom: 1px solid #d9e0eb;
    background: #f8fbff;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(130px, 1fr));
    gap: 10px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #2d3f5e;
}

.filter-group input,
.filter-group select {
    min-height: 36px;
    border: 1px solid #d0d8e5;
    border-radius: 6px;
    padding: 0 10px;
    background: #fff;
    color: #243550;
}

.filter-actions {
    justify-content: flex-end;
}

.search-field {
    width: min(340px, 100%);
    position: relative;
}

.search-field i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #8a98aa;
}

.search-field input {
    width: 100%;
    height: 42px;
    border: 1px solid #d2d9e5;
    border-radius: 6px;
    padding: 0 14px 0 42px;
}

.toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    color: #243550;
}

.toolbar-actions .btn {
    min-height: 38px;
    font-weight: 700;
    border-radius: 5px;
}

.admin-table {
    margin: 0;
    color: #243550;
    white-space: nowrap;
}

.admin-table th,
.admin-table td {
    padding: 0.9rem 0.85rem;
}

.pagination-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px 16px;
    border-top: 1px solid #d9e0eb;
}

.pagination-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-left label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #243550;
}

.pagination-left select {
    min-height: 34px;
    border: 1px solid #ccd6e6;
    border-radius: 6px;
    background: #fff;
    padding: 0 8px;
}

.pagination-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

#pageInfo {
    font-size: 0.9rem;
    font-weight: 600;
    color: #243550;
}

.admin-table thead th {
    background: #f1f4f9;
    color: #243550;
    font-weight: 700;
    border-bottom: 1px solid #d8e0eb;
}

.admin-table tbody td {
    border-color: #dce3ee;
    font-size: 0.9rem;
}

.row-action {
    border: 0;
    border-radius: 5px;
    padding: 6px 10px;
    color: white;
    font-size: 0.84rem;
    font-weight: 700;
}

.row-view {
    background: #2865b8;
}

.row-delete {
    background: #cf3d3d;
}

@media (max-width: 1180px) {
    .admin-dashboard {
        min-height: 760px;
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .admin-shell {
        width: min(100% - 24px, 680px);
        margin: 0 auto;
    }

    .admin-login-panel {
        min-height: auto;
    }

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

    .dashboard-sidebar {
        padding: 12px;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        border-right: 0;
        border-bottom: 1px solid #d7deea;
    }

    .sidebar-brand {
        grid-column: 1 / -1;
        padding: 4px 4px 10px;
    }

    .sidebar-link {
        min-height: 44px;
        padding: 0 12px;
        border-radius: 6px;
        background: #e8eef7;
        font-size: 0.88rem;
    }

    .dashboard-header,
    .table-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-header {
        padding: 18px;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .admin-table-card {
        margin: 0 14px 18px;
    }

    .toolbar-actions {
        justify-content: flex-start;
    }

    .toolbar-actions .btn {
        width: 100%;
    }

    .filter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .filter-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .pagination-panel {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .admin-login-card {
        padding: 34px 22px;
    }

    .dashboard-sidebar {
        grid-template-columns: 1fr;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }
}
