/* ============================================================
   Base & Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background: var(--content-bg);
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; transition: color var(--transition-fast); }

/* ============================================================
   Admin Shell
   ============================================================ */
.admin-body { overflow-x: hidden; }

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

.admin-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition-base);
}

.admin-main { flex: 1; padding: 1.75rem 0 2.5rem; }

/* ============================================================
   Sidebar — Bootstrap overrides (scoped)
   ============================================================ */
.admin-sidebar .nav {
    --bs-nav-link-padding-x: 1rem;
    --bs-nav-link-padding-y: 0.7rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.admin-sidebar .nav-item {
    list-style: none;
}

.admin-sidebar .nav-link {
    color: var(--sidebar-text) !important;
    display: flex !important;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 1rem;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--transition-fast);
    margin-bottom: 2px;
    position: relative;
    width: 100%;
    text-decoration: none;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link:focus {
    color: var(--sidebar-text-hover) !important;
    background: rgba(255, 255, 255, 0.06);
}

.admin-sidebar .nav-link.active {
    color: #fff !important;
    background: var(--sidebar-active-bg);
}

.admin-sidebar .collapse .nav-link {
    color: var(--sidebar-text) !important;
    font-size: 0.8125rem;
    padding-left: 3.25rem;
}

.admin-sidebar .collapse .nav-link.active {
    color: #fff !important;
}

/* ============================================================
   Sidebar
   ============================================================ */
.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg-gradient);
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-base);
    border-right: 1px solid var(--sidebar-border);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.35rem 1.5rem;
    border-bottom: 1px solid var(--sidebar-border);
    min-height: var(--navbar-height);
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: #fff;
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: -0.02em;
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--brand-primary) 0%, #8b5cf6 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.brand-text { white-space: nowrap; }

.brand-subtitle {
    display: block;
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--sidebar-text);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 2px;
}

.sidebar-close {
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: var(--sidebar-text);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.sidebar-close:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.sidebar-nav {
    flex: 1;
    padding: 1.25rem 0.85rem;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.nav-section-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(162, 165, 185, 0.6);
    padding: 0.5rem 1rem 0.65rem;
    margin-top: 0.5rem;
}

.sidebar-nav .nav-link .nav-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: transparent;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.sidebar-nav .nav-link:hover {
    color: var(--sidebar-text-hover);
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-nav .nav-link:hover .nav-icon {
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-nav .nav-link.active {
    color: #fff;
    background: var(--sidebar-active-bg);
}

.sidebar-nav .nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--sidebar-active-border);
    border-radius: 0 3px 3px 0;
}

.sidebar-nav .nav-link.active .nav-icon {
    background: var(--brand-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.sidebar-nav .submenu { padding: 0.25rem 0 0.25rem 0.5rem; }

.sidebar-nav .submenu .nav-link {
    font-size: 0.8125rem;
    padding-left: 3.25rem;
}

.sidebar-nav .submenu .nav-link::before { display: none; }

.submenu-arrow {
    margin-left: auto;
    font-size: 0.65rem;
    opacity: 0.5;
    transition: transform var(--transition-base);
}

.sidebar-toggle:not(.collapsed) .submenu-arrow { transform: rotate(180deg); }

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--sidebar-border);
    font-size: 0.75rem;
    color: var(--sidebar-text);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    z-index: 1035;
}

/* ============================================================
   Navbar
   ============================================================ */
.admin-navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    min-height: var(--navbar-height);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.75rem;
}

.navbar-left, .navbar-right {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-xs);
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    cursor: pointer;
}

.btn-icon:hover {
    background: var(--content-bg);
    color: var(--text-primary);
    border-color: #d1d5db;
}

.page-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-heading);
    letter-spacing: -0.02em;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 0.3rem 1rem 0.3rem 0.3rem;
    transition: var(--transition-fast);
    cursor: pointer;
}

.user-dropdown-toggle:hover {
    border-color: #d1d5db;
    box-shadow: var(--shadow-xs);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-primary), #8b5cf6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8125rem;
    flex-shrink: 0;
}

.user-info { flex-direction: column; align-items: flex-start; line-height: 1.3; }

.user-name { font-weight: 600; font-size: 0.8125rem; color: var(--text-heading); }

.user-role { font-size: 0.6875rem; color: var(--text-muted); }

.dropdown-menu {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-md);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: var(--border-radius-xs);
    font-size: 0.875rem;
    padding: 0.5rem 0.85rem;
}

/* ============================================================
   Footer
   ============================================================ */
.admin-footer {
    padding: 0.85rem 1.75rem;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* ============================================================
   Breadcrumb
   ============================================================ */
.admin-breadcrumb { margin-bottom: 1.5rem; }

.admin-breadcrumb .breadcrumb {
    margin: 0;
    background: transparent;
    padding: 0;
    font-size: 0.8125rem;
}

.admin-breadcrumb .breadcrumb-item a {
    color: var(--brand-primary);
    font-weight: 500;
}

.admin-breadcrumb .breadcrumb-item.active { color: var(--text-muted); }

.admin-breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }

/* ============================================================
   Page Header
   ============================================================ */
.page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.page-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-heading);
    letter-spacing: -0.03em;
}

.page-header p {
    color: var(--text-secondary);
    margin: 0.35rem 0 0;
    font-size: 0.875rem;
}

/* ============================================================
   Cards
   ============================================================ */
.admin-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-card);
}

.admin-card .card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-heading);
}

.admin-card .card-body { padding: 1.5rem; }

/* ============================================================
   Welcome Banner
   ============================================================ */
.welcome-banner {
    position: relative;
    background: linear-gradient(135deg, #312e81 0%, var(--brand-primary) 50%, #7c3aed 100%);
    border-radius: var(--border-radius);
    padding: 2rem 2.25rem;
    color: #fff;
    margin-bottom: 1.75rem;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.25);
}

.welcome-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}

.welcome-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: 20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
}

.welcome-banner .welcome-content { position: relative; z-index: 1; }

.welcome-banner h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}

.welcome-banner p {
    opacity: 0.88;
    margin: 0;
    font-size: 0.9375rem;
}

.welcome-banner .welcome-date {
    font-size: 0.8125rem;
    opacity: 0.7;
    margin-top: 0.75rem;
}

/* ============================================================
   Stat Cards
   ============================================================ */
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.35rem 1.5rem;
    box-shadow: var(--shadow-card);
    transition: var(--transition-base);
    height: 100%;
    display: flex;
    align-items: center;
    gap: 1.15rem;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: #d1d5db;
}

.stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.stat-card .stat-icon.indigo { background: var(--brand-primary-light); color: var(--brand-primary); }
.stat-card .stat-icon.emerald { background: var(--color-success-light); color: var(--color-success); }
.stat-card .stat-icon.violet { background: #f5f3ff; color: #7c3aed; }
.stat-card .stat-icon.amber { background: var(--brand-accent-light); color: var(--brand-accent); }
.stat-card .stat-icon.rose { background: #fff1f2; color: #e11d48; }
.stat-card .stat-icon.cyan { background: #ecfeff; color: #0891b2; }
.stat-card .stat-icon.orange { background: #fff7ed; color: #ea580c; }
.stat-card .stat-icon.green { background: #f0fdf4; color: #16a34a; }

.stat-card .stat-details { flex: 1; min-width: 0; }

.stat-card .stat-value {
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--text-heading);
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.stat-card .stat-label {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    margin-top: 0.15rem;
}

/* ============================================================
   Badges
   ============================================================ */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35em 0.85em;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.badge-active { background: var(--color-success-light); color: var(--color-success); }
.badge-active::before { background: var(--color-success); }

.badge-inactive { background: var(--color-danger-light); color: var(--color-danger); }
.badge-inactive::before { background: var(--color-danger); }

.badge-warning { background: #fff7ed; color: #ea580c; }
.badge-warning::before { background: #ea580c; }

.badge-blocked { background: var(--color-warning-light, #fef3c7); color: var(--color-warning, #d97706); }
.badge-blocked::before { background: var(--color-warning, #d97706); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    font-weight: 500;
    border-radius: var(--border-radius-xs);
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

.btn-primary {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    box-shadow: 0 1px 2px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
    background: var(--brand-primary-hover);
    border-color: var(--brand-primary-hover);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

.btn-outline-secondary {
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.btn-outline-secondary:hover {
    background: var(--content-bg);
    border-color: #d1d5db;
    color: var(--text-primary);
}

.btn-action {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: var(--border-radius-xs);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: var(--transition-fast);
}

.btn-action:hover { transform: translateY(-1px); }

.gap-actions { display: flex; gap: 0.3rem; flex-wrap: wrap; }

/* ============================================================
   Filter Section
   ============================================================ */
.filter-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.35rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-card);
}

.filter-section .filter-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-section .form-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.filter-section .form-control,
.filter-section .form-select {
    border-radius: var(--border-radius-xs);
    border-color: var(--border-color);
    font-size: 0.8125rem;
}

.filter-section .form-control:focus,
.filter-section .form-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

/* ============================================================
   Forms
   ============================================================ */
.form-label {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.form-control, .form-select {
    border-radius: var(--border-radius-xs);
    border-color: var(--border-color);
    padding: 0.6rem 0.85rem;
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

.form-control:focus, .form-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.input-group-text {
    background: var(--content-bg);
    border-color: var(--border-color);
    color: var(--text-muted);
    border-radius: var(--border-radius-xs);
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    z-index: 5;
    transition: color var(--transition-fast);
}

.password-toggle:hover { color: var(--text-primary); }

label.error {
    color: var(--color-danger);
    font-size: 0.75rem;
    margin-top: 0.35rem;
    font-weight: 500;
    display: block;
    width: 100%;
}

.auth-form-wrapper .mb-3 label.error {
    margin-top: 0.4rem;
}

.auth-form-wrapper .input-group {
    flex-wrap: nowrap;
}

.auth-form-wrapper .input-group + label.error,
.auth-form-wrapper .position-relative + label.error {
    display: block;
    width: 100%;
}

.form-control.is-invalid, .form-select.is-invalid { border-color: var(--color-danger); }
.form-control.is-valid, .form-select.is-valid { border-color: var(--color-success); }

/* ============================================================
   DataTables
   ============================================================ */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-xs);
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--brand-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: var(--border-radius-xs) !important;
    font-size: 0.8125rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: #fff !important;
}

table.dataTable { border-collapse: separate !important; border-spacing: 0; }

table.dataTable thead th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color) !important;
    padding: 0.85rem 1rem !important;
    background: var(--content-bg);
}

table.dataTable tbody td {
    vertical-align: middle;
    font-size: 0.8125rem;
    padding: 0.75rem 1rem !important;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

table.dataTable tbody tr:hover { background: rgba(99, 102, 241, 0.03) !important; }

.dt-buttons { margin-bottom: 1rem; }

.dt-buttons .btn {
    border-radius: var(--border-radius-xs) !important;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.35rem 0.75rem;
}

/* ============================================================
   Activity Table
   ============================================================ */
.activity-table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding: 0.85rem 1.25rem;
    background: var(--content-bg);
}

.activity-table tbody td {
    padding: 0.85rem 1.25rem;
    font-size: 0.8125rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.activity-table tbody tr:last-child td { border-bottom: none; }

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.activity-icon.blue { background: var(--brand-primary-light); color: var(--brand-primary); }
.activity-icon.green { background: var(--color-success-light); color: var(--color-success); }
.activity-icon.purple { background: #f5f3ff; color: #7c3aed; }
.activity-icon.orange { background: var(--brand-accent-light); color: var(--brand-accent); }
.activity-icon.danger { background: var(--color-danger-light); color: var(--color-danger); }

/* ============================================================
   Profile Card
   ============================================================ */
.profile-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.profile-header {
    background: linear-gradient(135deg, #312e81, var(--brand-primary));
    padding: 2.5rem 2rem 4.5rem;
    text-align: center;
    color: #fff;
    position: relative;
}

.profile-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    font-weight: 700;
    margin: 0 auto 1rem;
    position: relative;
    z-index: 1;
}

.profile-body { padding: 0 1.75rem 1.75rem; margin-top: -2.75rem; position: relative; z-index: 1; }

.profile-info-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 1.25rem;
    box-shadow: var(--shadow-sm);
}

.profile-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
}

.profile-info-item:last-child { border-bottom: none; }

.profile-info-item .label {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-info-item .label i { color: var(--text-muted); width: 16px; text-align: center; }

.profile-info-item .value {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text-heading);
    text-align: right;
}

/* ============================================================
   Auth / Login — Split Layout
   ============================================================ */
.auth-body {
    min-height: 100vh;
    display: flex;
    margin: 0;
    background: var(--card-bg);
}

.auth-brand-panel {
    flex: 1;
    background: linear-gradient(135deg, #1a1d2e 0%, #312e81 50%, var(--brand-primary) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.auth-brand-panel::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -15%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.auth-brand-panel::after {
    content: '';
    position: absolute;
    bottom: -15%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
}

.auth-brand-content { position: relative; z-index: 1; max-width: 420px; text-align: center; }

.auth-brand-logo {
    width: 72px;
    height: 72px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.auth-brand-content h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
}

.auth-brand-content p {
    opacity: 0.8;
    font-size: 0.9375rem;
    line-height: 1.7;
    margin: 0;
}

.auth-brand-features {
    margin-top: 2.5rem;
    text-align: left;
}

.auth-brand-features .feature-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    opacity: 0.85;
}

.auth-brand-features .feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    max-width: 520px;
}

.auth-form-wrapper { width: 100%; max-width: 400px; }

.auth-form-header { margin-bottom: 2rem; }

.auth-form-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 0.35rem;
    letter-spacing: -0.03em;
}

.auth-form-header p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

.btn-login {
    width: 100%;
    padding: 0.7rem;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: var(--border-radius-xs);
    background: var(--brand-primary);
    border: none;
    color: #fff;
    transition: var(--transition-fast);
}

.btn-login:hover {
    background: var(--brand-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
    color: #fff;
}

.btn-login:disabled { opacity: 0.65; transform: none; box-shadow: none; }

/* ============================================================
   Toastr Custom Theme
   ============================================================ */
#toast-container > div {
    border-radius: var(--border-radius-sm) !important;
    box-shadow: var(--shadow-md) !important;
    opacity: 1 !important;
    padding: 14px 18px 14px 50px !important;
    font-family: var(--font-family) !important;
    font-size: 0.875rem !important;
    background-image: none !important;
}

#toast-container > .toast-success {
    background-color: var(--color-success) !important;
}

#toast-container > .toast-error {
    background-color: var(--color-danger) !important;
}

#toast-container > .toast-warning {
    background-color: var(--color-warning) !important;
}

#toast-container > .toast-info {
    background-color: var(--color-info) !important;
}

#toast-container .toast-title {
    font-weight: 600 !important;
    font-size: 0.875rem !important;
}

#toast-container .toast-message {
    font-size: 0.8125rem !important;
    opacity: 0.95;
}

#toast-container .toast-close-button {
    color: #fff !important;
    opacity: 0.7 !important;
    font-weight: 400 !important;
    top: 0.5em !important;
    right: 0.5em !important;
}

#toast-container .toast-close-button:hover { opacity: 1 !important; }

#toast-container .toast-progress {
    opacity: 0.3 !important;
}

/* ============================================================
   SweetAlert2 — Confirm dialogs only
   ============================================================ */
.swal2-popup {
    border-radius: var(--border-radius) !important;
    font-family: var(--font-family) !important;
    padding: 1.75rem !important;
}

.swal2-title {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: var(--text-heading) !important;
}

.swal2-html-container {
    font-size: 0.875rem !important;
    color: var(--text-secondary) !important;
}

.swal2-confirm, .swal2-cancel {
    border-radius: var(--border-radius-xs) !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    padding: 0.55rem 1.5rem !important;
}

/* ============================================================
   Pagination
   ============================================================ */
.admin-pagination .pagination {
    margin-bottom: 0;
}

.admin-pagination .page-link {
    border-radius: var(--border-radius-xs);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    padding: 0.35rem 0.65rem;
    border-color: var(--border-color);
}

.admin-pagination .page-link:hover {
    background-color: var(--bg-hover);
    color: var(--primary);
}

.admin-pagination .page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.admin-pagination .page-item.disabled .page-link {
    color: var(--text-muted);
}

/* ============================================================
   QR Code Cards
   ============================================================ */
.qr-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 100%;
    transition: var(--transition-fast);
}

.qr-card:hover {
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-sm);
}

.qr-card-image {
    background: #fff;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
}

.qr-card-image svg {
    width: 200px;
    height: 200px;
    display: block;
}

.qr-card-body {
    padding: 1rem;
}

.qr-card-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.03em;
}

.qr-card-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0.25rem 0 0.5rem;
}

.qr-result-badge {
    display: inline-block;
    padding: 0.25em 0.65em;
    border-radius: 50px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.qr-result-valid { background: var(--color-success-light); color: var(--color-success); }
.qr-result-duplicate { background: var(--color-danger-light); color: var(--color-danger); }
.qr-result-invalid { background: var(--color-danger-light); color: var(--color-danger); }
.qr-result-expired { background: #fef3c7; color: #d97706; }
.qr-result-not_found { background: #f3f4f6; color: #6b7280; }

.qr-modal-image {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    display: inline-block;
}

.qr-modal-image img {
    display: block;
}

/* ============================================================
   Events & Pricing Admin
   ============================================================ */
.event-context-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.06));
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.event-context-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-primary);
    color: #fff;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.event-context-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.event-context-meta {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.15rem;
}

.pricing-tier-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.pricing-tier-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    border-top: 4px solid var(--brand-primary);
}

.pricing-tier-card.tier-sub-normal { border-top-color: #10b981; }
.pricing-tier-card.tier-sub-vip { border-top-color: #059669; }
.pricing-tier-card.tier-reg-normal { border-top-color: #6366f1; }
.pricing-tier-card.tier-reg-vip { border-top-color: #8b5cf6; }

.pricing-tier-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
}

.pricing-tier-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0.35rem 0;
}

.pricing-tier-note {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.pricing-history-table thead th {
    background: var(--content-bg);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
    border-bottom-width: 1px;
}

.pricing-summary-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border-color);
}

.pricing-summary-list li:last-child {
    border-bottom: 0;
}

.detail-list dt {
    color: var(--text-secondary);
    font-weight: 500;
}

@media (max-width: 991.98px) {
    .pricing-tier-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575.98px) {
    .pricing-tier-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 991.98px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.show { transform: translateX(0); box-shadow: var(--shadow-lg); }
    .sidebar-overlay.show { display: block; }
    .admin-content { margin-left: 0; }
    .auth-brand-panel { display: none; }
    .auth-form-panel { max-width: 100%; }
}

@media (max-width: 575.98px) {
    .admin-navbar { padding: 0 1rem; }
    .admin-main { padding: 1.25rem 0; }
    .welcome-banner { padding: 1.5rem; }
    .page-header h2 { font-size: 1.25rem; }
}
