/* ============================================================
   Smart Luxy Admin Panel — Evohus-Inspired Dark Theme
   Preserves: Gold colors, Georgian fonts, Dark theme
   Adds: Top header bar, breadcrumbs, better cards/tables
   ============================================================ */

/* ── Layout: Sidebar + Header + Content ── */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-primary);
}

/* ── Sidebar Redesign (Evohus-style) ── */
.admin-sidebar {
    width: 260px;
    background: linear-gradient(180deg, #0d0d14 0%, #101018 50%, #0a0a10 100%);
    border-right: 1px solid rgba(212, 175, 55, 0.08);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    z-index: 200;
    transition: width 0.3s ease;
}

.admin-sidebar::-webkit-scrollbar { width: 3px; }
.admin-sidebar::-webkit-scrollbar-track { background: transparent; }
.admin-sidebar::-webkit-scrollbar-thumb { background: rgba(212, 175, 55, 0.2); border-radius: 2px; }

.admin-sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.15);
    flex-shrink: 0;
}

.admin-sidebar-header h2 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--gold-primary);
    margin: 0;
    letter-spacing: 1.5px;
    line-height: 1.2;
}

.admin-sidebar-header span {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 2px;
}

/* ── Navigation Groups ── */
.admin-nav {
    flex: 1;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-nav-section {
    margin-bottom: 6px;
}

.admin-nav-section-title {
    font-size: 0.6rem;
    color: rgba(160,160,176,0.6);
    text-transform: uppercase;
    letter-spacing: 2.5px;
    padding: 12px 14px 6px;
    font-weight: 600;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
    font-size: 0.88rem;
    margin: 1px 0;
}

.admin-nav-item::before { display: none; }

.admin-nav-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.admin-nav-item:hover svg {
    color: var(--gold-primary);
}

.admin-nav-item.active {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold-primary);
    border: none;
    font-weight: 500;
}

.admin-nav-item.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--gold-primary);
    border-radius: 0 3px 3px 0;
}

.admin-nav-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: color 0.2s;
    opacity: 0.8;
}

.admin-nav-item.active svg {
    opacity: 1;
    color: var(--gold-primary);
}

.admin-nav-item span {
    font-size: 0.88rem;
    white-space: nowrap;
}

/* ── Sidebar Dropdown Submenu ── */
.admin-nav-dropdown {
    position: relative;
}
.admin-nav-toggle {
    cursor: pointer;
}
.admin-nav-toggle .nav-dd-chevron {
    margin-left: auto;
    opacity: 0.5;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}
.admin-nav-dropdown.open > .admin-nav-toggle .nav-dd-chevron {
    transform: rotate(180deg);
}
.admin-nav-sub {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 18px;
}
.admin-nav-dropdown.open > .admin-nav-sub {
    max-height: 300px;
}
.admin-nav-sub-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.15s;
    margin: 1px 0;
}
.admin-nav-sub-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}
.admin-nav-sub-item.active {
    color: var(--gold-primary);
    background: rgba(212, 175, 55, 0.08);
    font-weight: 500;
}
.nav-sub-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
}
.admin-nav-sub-item.active .nav-sub-dot {
    background: var(--gold-primary);
}

/* ── Sidebar Footer ── */
.admin-sidebar-footer {
    padding: 14px;
    border-top: 1px solid rgba(255,255,255,0.04);
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    margin-bottom: 8px;
}

.admin-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 13px;
    color: var(--bg-primary);
    flex-shrink: 0;
}

.admin-user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-user-role {
    font-size: 0.7rem;
    color: var(--gold-primary);
}

.admin-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px;
    color: var(--text-muted);
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 0.8rem;
}

.admin-logout:hover {
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger);
}

/* ── Top Header Bar (Evohus-style) ── */
.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 60px;
    background: var(--bg-secondary);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 12px;
}

.admin-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

/* ── Topbar Search (Evohus-style) ── */
.topbar-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 7px 14px;
    min-width: 200px;
    max-width: 320px;
    transition: all 0.2s;
}

.topbar-search:focus-within {
    border-color: rgba(212,175,55,0.3);
    background: rgba(255,255,255,0.06);
}

.topbar-search svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.topbar-search-input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.82rem;
    font-family: inherit;
    width: 100%;
}

.topbar-search-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.admin-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ── Topbar Breadcrumb (Evohus "Dashboards > Main" style) ── */
.topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    padding: 5px 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    white-space: nowrap;
}

.topbar-bc-parent {
    color: var(--text-muted);
}

.topbar-breadcrumb svg {
    color: var(--text-muted);
    opacity: 0.5;
}

.topbar-bc-current {
    color: var(--gold-primary);
    font-weight: 500;
}

.topbar-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    text-decoration: none;
}

.topbar-icon-btn:hover {
    background: rgba(212,175,55,0.08);
    border-color: rgba(212,175,55,0.2);
    color: var(--gold-primary);
}

.topbar-icon-btn svg {
    width: 18px;
    height: 18px;
}

.topbar-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    font-weight: 700;
}

.topbar-user-wrap {
    position: relative;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px 5px 5px;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    cursor: pointer;
    transition: all 0.2s;
}

.topbar-user:hover {
    background: rgba(59,130,246,0.06);
    border-color: rgba(59,130,246,0.15);
}

.topbar-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
    flex-shrink: 0;
}

.topbar-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.topbar-user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.topbar-user-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.topbar-user-role {
    font-size: 0.68rem;
    color: #3b82f6;
}

.topbar-user-notif {
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    font-weight: 700;
}

.topbar-chevron {
    color: var(--text-secondary);
    transition: transform 0.2s;
    flex-shrink: 0;
}

/* Topbar Dropdown */
.topbar-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: #1e1e2e;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 200;
    backdrop-filter: none;
}

.topbar-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.topbar-dd-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.15s;
}

.topbar-dd-item:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
}

.topbar-dd-item svg { opacity: 0.6; }

.topbar-dd-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 8px;
}

.topbar-dd-logout {
    color: #ef4444;
}
.topbar-dd-logout:hover {
    background: rgba(239,68,68,0.08);
    color: #ef4444;
}

/* ── Main Content Area ── */
.admin-main {
    flex: 1;
    margin-left: 260px;
    padding: 0;
    background: var(--bg-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-content {
    padding: 20px;
    flex: 1;
}

/* Page header — compact Evohus-style */
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-header h1 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: 0.5px;
}

.admin-header p {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 2px 0 0;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Welcome Banner (Evohus-style) ── */
.welcome-banner {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.12) 0%, rgba(212, 175, 55, 0.04) 50%, rgba(26, 26, 37, 0.95) 100%);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.welcome-banner::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 100%;
    background: radial-gradient(circle at 80% 50%, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.welcome-info h2 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    color: var(--text-primary);
    margin: 0 0 6px;
}

.welcome-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.welcome-stats {
    display: flex;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.welcome-stat {
    text-align: center;
    padding: 0 16px;
    border-left: 1px solid rgba(255,255,255,0.06);
}

.welcome-stat:first-child {
    border-left: none;
}

.welcome-stat-value {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--gold-primary);
    display: block;
    line-height: 1;
    margin-bottom: 4px;
}

.welcome-stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Stat Cards (Evohus-style with trend indicators) ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 10px;
    padding: 16px;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before { display: none; }

.stat-card:hover {
    border-color: rgba(212, 175, 55, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.stat-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
}

.stat-trend {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.stat-trend.up {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
}

.stat-trend.down {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--text-primary);
    margin-bottom: 2px;
    display: block;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* Stat icon color variants */
.stat-icon.gold {
    background: rgba(212, 175, 55, 0.12);
    color: var(--gold-primary);
}
.stat-icon.green {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
}
.stat-icon.red {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
}
.stat-icon.blue {
    background: rgba(59, 130, 246, 0.12);
    color: var(--info);
}
.stat-icon.purple {
    background: rgba(139, 92, 246, 0.12);
    color: #8b5cf6;
}

/* ── Cards (Evohus-style) ── */
.card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.25s ease;
}

.card:hover {
    border-color: rgba(255,255,255,0.08);
}

.card-header {
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-header h3,
.card-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: 0.5px;
}

.card-body {
    padding: 22px;
}

/* ── Tables (Evohus-style clean tables) ── */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    padding: 12px 16px;
    text-align: left;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-weight: 500;
    white-space: nowrap;
}

.table td {
    padding: 14px 16px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 0.88rem;
    vertical-align: middle;
}

.table tbody tr {
    transition: background 0.15s;
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ── Filters Bar (Evohus-style) ── */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 12px;
}

.filters-bar .form-input,
.filters-bar .form-control,
.filters-bar .form-select {
    background: var(--bg-input);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 0.85rem;
    color: var(--text-primary);
    min-width: 0;
}

.filters-bar .form-input:focus,
.filters-bar .form-control:focus,
.filters-bar .form-select:focus {
    border-color: rgba(212,175,55,0.3);
    box-shadow: 0 0 0 2px rgba(212,175,55,0.08);
}

/* ── Badges (Evohus-style) ── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-success {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
}

.badge-pending {
    background: rgba(107, 107, 123, 0.12);
    color: var(--text-muted);
}

.badge-info {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
}

/* ── Buttons (Evohus-style) ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.88rem;
    font-family: var(--font-body);
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary,
.btn-gold {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-light));
    color: var(--bg-primary);
    font-weight: 600;
}

.btn-primary:hover:not(:disabled),
.btn-gold:hover:not(:disabled) {
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.25);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255,255,255,0.04);
    color: var(--text-primary);
    border: 1px solid rgba(255,255,255,0.08);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.12);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(212,175,55,0.3);
    color: var(--gold-primary);
}

.btn-outline:hover:not(:disabled) {
    background: rgba(212,175,55,0.08);
    border-color: rgba(212,175,55,0.5);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239,68,68,0.2);
}

.btn-danger:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.2);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 0.8rem;
}

.btn-xs {
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 6px;
}

.btn-block { width: 100%; }

.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: rgba(212,175,55,0.08);
    color: var(--gold-primary);
    border-color: rgba(212,175,55,0.2);
}

/* ── Pagination (Evohus-style) ── */
.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-top: 1px solid rgba(255,255,255,0.04);
    font-size: 0.82rem;
}

.pagination {
    display: flex;
    gap: 4px;
    align-items: center;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.15s;
    cursor: pointer;
}

.pagination-btn:hover:not(.disabled):not(.active) {
    background: rgba(212,175,55,0.08);
    color: var(--gold-primary);
    border-color: rgba(212,175,55,0.15);
}

.pagination-btn.active {
    background: rgba(212,175,55,0.15);
    color: var(--gold-primary);
    border-color: rgba(212,175,55,0.3);
    font-weight: 700;
}

.pagination-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ── Modals (Evohus-style) ── */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1100;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    overflow-y: auto;
    padding: 20px;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.06);
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.modal-header h3,
.modal-header h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(255,255,255,0.04);
    color: var(--text-primary);
}

.modal-content form {
    padding: 22px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.04);
    margin-top: 8px;
}

.modal-content.modal-lg { max-width: 720px; }
.modal-content.modal-sm { max-width: 380px; }

/* ── Forms (Evohus-style) ── */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}

.form-input,
.form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.88rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-control:focus {
    border-color: rgba(212,175,55,0.4);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.08);
}

.form-input::placeholder,
.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
}

.form-select {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.88rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23a0a0b0' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.form-select:focus {
    border-color: rgba(212,175,55,0.4);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.08);
}

/* ── Alerts (Evohus-style) ── */
.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 0.88rem;
    border-left: 3px solid;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.08);
    border-color: var(--success);
    color: #34d399;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.08);
    border-color: var(--danger);
    color: #fca5a5;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.08);
    border-color: var(--warning);
    color: #fbbf24;
}

.alert-info {
    background: rgba(59, 130, 246, 0.08);
    border-color: var(--info);
    color: #93c5fd;
}

/* ── Dashboard Grid Layouts ── */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.dashboard-grid-wide {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

/* ── Complex List in Dashboard ── */
.complex-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.complex-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 10px;
    transition: border-color 0.2s;
}

.complex-item:hover {
    border-color: rgba(212, 175, 55, 0.15);
}

.complex-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.complex-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.92rem;
}

.complex-fee {
    font-size: 0.8rem;
    color: var(--gold-primary);
}

.complex-users {
    text-align: right;
}

.user-count {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
    font-family: var(--font-heading);
}

.user-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ── Mobile Toggle ── */
.admin-mobile-toggle {
    display: none;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 1001;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.06);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: var(--gold-primary);
}

.admin-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 199;
    backdrop-filter: blur(3px);
}

.admin-overlay.active {
    display: block;
}

/* ── Action Buttons Row ── */
.action-buttons {
    display: flex;
    gap: 4px;
    align-items: center;
}

/* ── Admin Login (Evohus Auth style) ── */
.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: 
        radial-gradient(ellipse at 20% 0%, rgba(212, 175, 55, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(212, 175, 55, 0.04) 0%, transparent 50%),
        var(--bg-primary);
}

.admin-login-card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}

.admin-login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold-gradient);
}

.admin-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.admin-logo h1 {
    font-size: 1.3rem;
    color: var(--gold-primary);
    margin-bottom: 0.5rem;
}

.admin-logo p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
    color: var(--gold-primary);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

/* ── per-page selector ── */
.per-page-select { display: flex; gap: 2px; }
.pp-btn {
    padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 500;
    text-decoration: none; color: var(--text-secondary);
    background: rgba(255,255,255,0.04); transition: all 0.15s;
}
.pp-btn:hover { background: rgba(212,175,55,0.1); color: var(--gold-primary); }
.pp-btn.active { background: rgba(212,175,55,0.15); color: var(--gold-primary); font-weight: 700; }
.pagination-right { display: flex; align-items: center; gap: 12px; }
.pagination-dots { color: var(--text-secondary); padding: 0 4px; font-size: 14px; }

/* ── Responsive ── */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    .welcome-banner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(-100%);
        z-index: 1000;
        box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5);
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .admin-mobile-toggle {
        display: flex;
    }

    .dashboard-grid,
    .dashboard-grid-wide {
        grid-template-columns: 1fr;
    }
    
    .admin-topbar {
        padding: 0 16px;
        padding-left: 56px;
    }
    
    .admin-content {
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .filters-bar {
        flex-direction: column;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .welcome-stats {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .welcome-stat {
        border-left: none;
        padding: 0 8px;
    }

    .topbar-user-info {
        display: none;
    }

    .topbar-breadcrumb {
        display: none;
    }

    .topbar-search {
        min-width: 140px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-content {
        padding: 12px;
    }
    
    .admin-topbar {
        padding: 0 12px;
        padding-left: 52px;
        height: 52px;
    }
    
    .topbar-search {
        display: none;
    }
    
    .card-header {
        padding: 12px 14px;
    }
    
    .card-body {
        padding: 14px;
    }
    
    .table th,
    .table td {
        padding: 8px 10px;
    }
}
