:root {
    --admin-bg: #f5f7fb;
    --admin-surface: #ffffff;
    --admin-surface-2: #f9fafb;
    --admin-text: #111827;
    --admin-muted: #6b7280;
    --admin-dark: #111827;
    --admin-accent: #ffd400;
    --admin-border: #e5e7eb;
    --admin-shadow: 0 18px 45px rgba(17, 24, 39, 0.08);
    --admin-radius: 24px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body.admin-body,
body.auth-body {
    margin: 0;
    font-family: 'Be Vietnam Pro', sans-serif;
    background: var(--admin-bg);
    color: var(--admin-text);
    overflow-x: hidden;
}

.admin-shell {
    min-height: 100vh;
    display: flex;
}

.admin-sidebar {
    width: 290px;
    background: linear-gradient(180deg, #101010 0%, #171717 100%);
    color: #fff;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-sidebar .offcanvas-header {
    color: #fff;
}

.admin-brand {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--admin-accent);
    color: #111111;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.admin-user {
    background: rgba(255, 255, 255, 0.02);
}

.admin-avatar,
.user-mini-avatar {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 212, 0, 0.32), rgba(255, 212, 0, 0.12));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: #111111;
    flex-shrink: 0;
}

.user-mini-avatar img,
.user-mini-avatar span {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-nav {
    display: grid;
    gap: 0.55rem;
}

.admin-nav__item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.admin-nav__item i {
    font-size: 1.05rem;
}

.admin-nav__item:hover,
.admin-nav__item.active {
    background: rgba(255, 212, 0, 0.14);
    color: #fff;
    transform: translateX(2px);
}

.admin-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.admin-main {
    min-height: calc(100vh - 72px);
}

.admin-page-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
}

.admin-page-head h1 {
    font-weight: 800;
    letter-spacing: -0.04em;
}

.admin-panel,
.section-subpanel {
    background: var(--admin-surface);
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
    padding: 1.25rem;
}

.section-subpanel {
    background: var(--admin-surface-2);
}

.admin-panel--nested {
    padding: 1rem;
    box-shadow: none;
}

.admin-panel__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-panel__head a {
    text-decoration: none;
    font-weight: 700;
}

.stat-card {
    position: relative;
    border-radius: 22px;
    padding: 1.15rem;
    background: linear-gradient(180deg, #fff, #f8fafc);
    border: 1px solid rgba(17, 24, 39, 0.08);
    box-shadow: var(--admin-shadow);
    overflow: hidden;
    min-height: 136px;
}

.stat-card::after {
    content: '';
    position: absolute;
    inset: auto -24px -24px auto;
    width: 98px;
    height: 98px;
    border-radius: 50%;
    background: rgba(255, 212, 0, 0.15);
}

.stat-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(17, 24, 39, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.stat-card__label {
    font-size: 0.86rem;
    color: var(--admin-muted);
    margin-bottom: 0.25rem;
}

.stat-card__value {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.stat-card--primary .stat-card__icon { background: rgba(59, 130, 246, 0.12); color: #2563eb; }
.stat-card--success .stat-card__icon { background: rgba(34, 197, 94, 0.12); color: #16a34a; }
.stat-card--warning .stat-card__icon { background: rgba(245, 158, 11, 0.14); color: #d97706; }
.stat-card--info .stat-card__icon { background: rgba(6, 182, 212, 0.12); color: #0891b2; }
.stat-card--dark .stat-card__icon { background: rgba(17, 24, 39, 0.12); color: #111827; }

.admin-table thead th {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--admin-muted);
    border-bottom-color: rgba(17, 24, 39, 0.08);
}

.admin-table tbody td {
    border-color: rgba(17, 24, 39, 0.06);
}

.table-thumb,
.media-thumb {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    object-fit: cover;
    background: #f3f4f6;
    border: 1px solid rgba(17, 24, 39, 0.08);
    flex-shrink: 0;
}

.table-thumb--wide {
    width: 96px;
    height: 64px;
}

.table-thumb--square {
    aspect-ratio: 1;
    width: 64px;
    height: 64px;
}

.media-thumb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--admin-muted);
    font-size: 1.5rem;
    overflow: hidden;
}

.media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.form-control,
.form-select {
    border-radius: 16px;
    border-color: rgba(17, 24, 39, 0.12);
    min-height: 48px;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(255, 212, 0, 0.8);
    box-shadow: 0 0 0 0.2rem rgba(255, 212, 0, 0.14);
}

.form-control-lg {
    min-height: 54px;
}

.auth-screen {
    min-height: 100vh;
    padding: 24px;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at top left, rgba(255, 212, 0, 0.18), transparent 34%),
        radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.14), transparent 30%),
        linear-gradient(180deg, #0f172a 0%, #111111 100%);
}

.auth-panel {
    width: min(1180px, 100%);
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
    background: #111111;
}

.auth-panel__visual {
    padding: 3rem;
    color: #fff;
    background:
        radial-gradient(circle at top right, rgba(255, 212, 0, 0.18), transparent 28%),
        linear-gradient(180deg, #111111 0%, #191919 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
}

.auth-brand h1 {
    font-size: clamp(2rem, 4vw, 3.35rem);
    line-height: 1.02;
    letter-spacing: -0.06em;
    margin: 1.5rem 0 0.85rem;
    font-weight: 900;
}

.auth-brand p {
    color: rgba(255, 255, 255, 0.8);
    max-width: 42ch;
    margin: 0;
}

.auth-feature-list {
    display: grid;
    gap: 0.85rem;
    max-width: 440px;
}

.auth-feature-list div {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-panel__form {
    background: #f8fafc;
    padding: 2rem;
    display: flex;
    align-items: center;
}

.auth-card {
    width: 100%;
    border-radius: 28px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    box-shadow: var(--admin-shadow);
}

.badge {
    border-radius: 999px;
    padding: 0.42rem 0.72rem;
}

.btn,
.btn-sm {
    border-radius: 14px;
    font-weight: 600;
}

@media (max-width: 1199.98px) {
    .auth-panel {
        grid-template-columns: 1fr;
    }

    .auth-panel__visual {
        padding-bottom: 2rem;
    }
}

@media (max-width: 991.98px) {
    .admin-sidebar {
        width: 290px;
    }

    .admin-page-head {
        flex-direction: column;
        align-items: start;
    }
}

@media (max-width: 767.98px) {
    .auth-screen {
        padding: 12px;
    }

    .auth-panel__visual,
    .auth-panel__form {
        padding: 1.25rem;
    }

    .admin-panel,
    .section-subpanel {
        padding: 1rem;
        border-radius: 20px;
    }

    .stat-card {
        min-height: 118px;
    }
}
