/* ============================================
   91Club Admin Panel — Premium Dark Design System
   ============================================ */

/* === DESIGN TOKENS === */
:root {
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a3e;
    --bg-card: rgba(30, 30, 60, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --border-glass: rgba(255, 255, 255, 0.1);
    --text-primary: #e8e8ff;
    --text-secondary: #8888aa;
    --accent-gradient: linear-gradient(135deg, #667eea, #764ba2);
    --accent-primary: #667eea;
    --accent-secondary: #764ba2;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --sidebar-width: 250px;
    --topbar-height: 60px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 30px rgba(102,126,234,0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === GLOBAL RESET === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
}
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.12);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
}

/* === SELECTION === */
::selection {
    background: rgba(102,126,234,0.4);
    color: #fff;
}

/* === TYPOGRAPHY === */
h1 { font-size: 1.85rem; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 500; }
p  { line-height: 1.6; color: var(--text-secondary); }
a  { color: var(--accent-primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-secondary); }

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(102,126,234,0.15) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    pointer-events: none;
}

.login-wrapper::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(118,75,162,0.12) 0%, transparent 70%);
    bottom: -80px;
    left: -80px;
    pointer-events: none;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 48px 40px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    animation: fadeInUp 0.6s ease-out;
    position: relative;
    z-index: 1;
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo h1 {
    font-size: 2rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

.login-logo p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.login-error {
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.3);
    color: var(--danger);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 16px;
    display: none;
    animation: fadeIn 0.3s ease;
}

.login-error.show {
    display: block;
}

/* ============================================
   APP LAYOUT
   ============================================ */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* === SIDEBAR === */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    background: linear-gradient(180deg, rgba(20,20,50,0.95) 0%, rgba(15,15,35,0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-logo {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.sidebar-logo .logo-icon {
    width: 38px;
    height: 38px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-logo h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.sidebar-logo small {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-top: 1px;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
}

.nav-section-label {
    padding: 16px 24px 8px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 24px;
    margin: 2px 10px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    text-decoration: none;
    user-select: none;
}

.nav-item:hover {
    color: var(--text-primary);
    background: var(--bg-glass);
}

.nav-item.active {
    color: #fff;
    background: rgba(102,126,234,0.15);
}

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

.nav-item .material-icons {
    font-size: 20px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.nav-item .nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* === TOPBAR === */
.topbar {
    height: var(--topbar-height);
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    z-index: 90;
    background: rgba(15,15,35,0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0;
}

.topbar-hamburger:hover {
    background: rgba(255,255,255,0.1);
}

.topbar-hamburger .material-icons {
    font-size: 22px;
}

.topbar-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-admin {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: var(--bg-glass);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
}

.topbar-admin .admin-avatar {
    width: 30px;
    height: 30px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    color: #fff;
}

.topbar-admin .admin-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

.btn-change-password {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: rgba(99,102,241,0.1);
    color: var(--accent);
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: inherit;
    transition: var(--transition);
}

.btn-change-password:hover {
    background: rgba(99,102,241,0.2);
    transform: translateY(-1px);
}

.btn-change-password .material-icons {
    font-size: 16px;
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: rgba(239,68,68,0.1);
    color: var(--danger);
    border: 1px solid rgba(239,68,68,0.2);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: inherit;
    transition: var(--transition);
}

.btn-logout:hover {
    background: rgba(239,68,68,0.2);
    transform: translateY(-1px);
}

.btn-logout .material-icons {
    font-size: 16px;
}

/* === MAIN CONTENT === */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--topbar-height);
    padding: 28px;
    min-height: calc(100vh - var(--topbar-height));
    flex: 1;
    transition: margin-left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === SIDEBAR OVERLAY (Mobile) === */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
    backdrop-filter: blur(4px);
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    animation: fadeIn 0.4s ease-out;
}

.card:hover {
    border-color: rgba(102,126,234,0.2);
    box-shadow: var(--shadow-md), 0 0 20px rgba(102,126,234,0.08);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-glass);
}

.card-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
}

.card-header h3 .material-icons {
    font-size: 20px;
    color: var(--accent-primary);
}

/* === STAT CARDS === */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    position: relative;
    padding: 24px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out both;
    transition: var(--transition);
    cursor: default;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }
.stat-card:nth-child(5) { animation-delay: 0.25s; }
.stat-card:nth-child(6) { animation-delay: 0.3s; }

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

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.stat-card.blue::before   { background: linear-gradient(90deg, #667eea, #3b82f6); }
.stat-card.green::before  { background: linear-gradient(90deg, #22c55e, #16a34a); }
.stat-card.orange::before { background: linear-gradient(90deg, #f59e0b, #f97316); }
.stat-card.red::before    { background: linear-gradient(90deg, #ef4444, #dc2626); }
.stat-card.purple::before { background: linear-gradient(90deg, #764ba2, #a855f7); }
.stat-card.cyan::before   { background: linear-gradient(90deg, #06b6d4, #22d3ee); }

.stat-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.stat-card-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card.blue .stat-card-icon   { background: rgba(59,130,246,0.15); color: #3b82f6; }
.stat-card.green .stat-card-icon  { background: rgba(34,197,94,0.15); color: #22c55e; }
.stat-card.orange .stat-card-icon { background: rgba(245,158,11,0.15); color: #f59e0b; }
.stat-card.red .stat-card-icon    { background: rgba(239,68,68,0.15); color: #ef4444; }
.stat-card.purple .stat-card-icon { background: rgba(168,85,247,0.15); color: #a855f7; }
.stat-card.cyan .stat-card-icon   { background: rgba(6,182,212,0.15); color: #06b6d4; }

.stat-card-icon .material-icons {
    font-size: 22px;
}

.stat-card-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-card-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ============================================
   DATA TABLES
   ============================================ */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.data-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border-glass);
    position: sticky;
    top: 0;
}

.data-table tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: var(--transition);
}

.data-table tbody tr:nth-child(even) {
    background: rgba(255,255,255,0.015);
}

.data-table tbody tr:hover {
    background: rgba(102,126,234,0.06);
}

.data-table td {
    padding: 12px 16px;
    font-size: 0.87rem;
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table .cell-actions {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
}

.data-table .cell-mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.btn:active { transform: scale(0.97); }

.btn .material-icons {
    font-size: 18px;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102,126,234,0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(102,126,234,0.45);
    transform: translateY(-1px);
}

.btn-success {
    background: rgba(34,197,94,0.15);
    color: var(--success);
    border: 1px solid rgba(34,197,94,0.3);
}

.btn-success:hover {
    background: rgba(34,197,94,0.25);
    transform: translateY(-1px);
}

.btn-danger {
    background: rgba(239,68,68,0.15);
    color: var(--danger);
    border: 1px solid rgba(239,68,68,0.3);
}

.btn-danger:hover {
    background: rgba(239,68,68,0.25);
    transform: translateY(-1px);
}

.btn-warning {
    background: rgba(245,158,11,0.15);
    color: var(--warning);
    border: 1px solid rgba(245,158,11,0.3);
}

.btn-warning:hover {
    background: rgba(245,158,11,0.25);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
}

.btn-outline:hover {
    background: var(--bg-glass);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.78rem;
}

.btn-sm .material-icons {
    font-size: 15px;
}

.btn-icon {
    padding: 8px;
    border-radius: var(--radius-sm);
}

.btn:disabled, .btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
    background: rgba(255,255,255,0.06);
}

.form-control::placeholder {
    color: rgba(136,136,170,0.5);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238888aa' stroke-width='2'%3E%3Cpolyline points='6,9 12,15 18,9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

textarea.form-control {
    min-height: 80px;
    resize: vertical;
}

.input-with-icon {
    position: relative;
}

.input-with-icon .material-icons {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--text-secondary);
    pointer-events: none;
}

.input-with-icon .form-control {
    padding-left: 40px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 2px;
    font-size: 0;
    transition: var(--transition);
}

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

.password-toggle .material-icons {
    font-size: 18px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

.modal-card {
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-glass);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--bg-glass);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0;
}

.modal-close:hover {
    background: rgba(239,68,68,0.15);
    color: var(--danger);
}

.modal-close .material-icons {
    font-size: 18px;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-glass);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    min-width: 300px;
    max-width: 420px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
}

.toast.success::before { background: var(--success); }
.toast.error::before   { background: var(--danger); }
.toast.warning::before { background: var(--warning); }
.toast.info::before    { background: var(--info); }

.toast .toast-icon .material-icons {
    font-size: 20px;
}

.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon   { color: var(--danger); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info .toast-icon    { color: var(--info); }

.toast .toast-message {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.toast .toast-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 2px;
    font-size: 0;
    transition: var(--transition);
}

.toast .toast-close:hover { color: var(--text-primary); }
.toast .toast-close .material-icons { font-size: 16px; }

.toast.removing {
    animation: slideOutRight 0.3s ease-in forwards;
}

/* ============================================
   BADGES / PILLS
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.badge-pending {
    background: rgba(245,158,11,0.15);
    color: var(--warning);
    border: 1px solid rgba(245,158,11,0.3);
}

.badge-approved, .badge-success, .badge-active, .badge-completed {
    background: rgba(34,197,94,0.15);
    color: var(--success);
    border: 1px solid rgba(34,197,94,0.3);
}

.badge-rejected, .badge-danger, .badge-inactive {
    background: rgba(239,68,68,0.15);
    color: var(--danger);
    border: 1px solid rgba(239,68,68,0.3);
}

.badge-info {
    background: rgba(59,130,246,0.15);
    color: var(--info);
    border: 1px solid rgba(59,130,246,0.3);
}

.badge-default {
    background: var(--bg-glass);
    color: var(--text-secondary);
    border: 1px solid var(--border-glass);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 20px 0 4px;
}

.pagination button {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-glass);
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.pagination button:hover:not(:disabled) {
    background: var(--bg-glass);
    color: var(--text-primary);
    border-color: rgba(255,255,255,0.2);
}

.pagination button.active {
    background: var(--accent-gradient);
    color: #fff;
    border-color: transparent;
}

.pagination button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination .material-icons {
    font-size: 18px;
}

.pagination-info {
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 0 8px;
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-glass);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

/* ============================================
   TABS
   ============================================ */
.tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    margin-bottom: 20px;
    overflow-x: auto;
}

.tab {
    padding: 9px 18px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.tab:hover {
    color: var(--text-primary);
    background: var(--bg-glass);
}

.tab.active {
    background: var(--accent-gradient);
    color: #fff;
}

/* ============================================
   SEARCH INPUT
   ============================================ */
.search-box {
    position: relative;
    max-width: 340px;
}

.search-box .material-icons {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--text-secondary);
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 10px 14px 10px 42px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.87rem;
    outline: none;
    transition: var(--transition);
}

.search-box input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(102,126,234,0.12);
    background: rgba(255,255,255,0.06);
}

.search-box input::placeholder {
    color: rgba(136,136,170,0.5);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state .material-icons {
    font-size: 56px;
    color: rgba(136,136,170,0.3);
    margin-bottom: 16px;
    display: block;
}

.empty-state h4 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 0.87rem;
    max-width: 340px;
    margin: 0 auto;
}

/* ============================================
   TOOLBAR / PAGE HEADER
   ============================================ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-header h2 .material-icons {
    color: var(--accent-primary);
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* ============================================
   USER DETAIL
   ============================================ */
.user-detail-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.user-avatar-lg {
    width: 72px;
    height: 72px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.user-meta h2 {
    margin-bottom: 4px;
}

.user-meta p {
    font-size: 0.85rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.detail-item {
    padding: 14px 18px;
    background: var(--bg-glass);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
}

.detail-item .detail-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.detail-item .detail-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================================
   GRID LAYOUTS
   ============================================ */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* ============================================
   BANNER CARDS
   ============================================ */
.banner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.banner-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    animation: fadeInUp 0.4s ease-out both;
}

.banner-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.banner-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    background: var(--bg-glass);
}

.banner-card-body {
    padding: 16px;
}

.banner-card-body .banner-link {
    font-size: 0.82rem;
    color: var(--text-secondary);
    word-break: break-all;
    margin-bottom: 12px;
    display: block;
}

.banner-card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
}

/* ============================================
   SETTINGS
   ============================================ */
.settings-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.settings-row:last-child {
    border-bottom: none;
}

.settings-row .settings-key {
    min-width: 200px;
    font-weight: 500;
    font-size: 0.87rem;
}

.settings-row .settings-value {
    flex: 1;
}

.settings-row .settings-value .form-control {
    max-width: 400px;
}

.settings-row .settings-actions {
    flex-shrink: 0;
}

/* ============================================
   QUICK ACTIONS
   ============================================ */
.quick-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

/* ============================================
   BACK BUTTON
   ============================================ */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 16px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.back-link:hover {
    color: var(--text-primary);
}

.back-link .material-icons {
    font-size: 18px;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(60px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutRight {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(60px); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.shimmer {
    background: linear-gradient(90deg, transparent 25%, rgba(255,255,255,0.06) 50%, transparent 75%);
    background-size: 200% 100%;
    animation: shimmer 1.8s ease-in-out infinite;
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    .sidebar.open + .sidebar-overlay {
        display: block;
    }

    .topbar {
        left: 0;
    }

    .main-content {
        margin-left: 0;
    }

    .topbar-hamburger {
        display: flex;
    }

    .stat-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .main-content {
        padding: 16px;
    }

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

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

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        max-width: 100%;
    }

    .data-table {
        font-size: 0.8rem;
    }

    .data-table th,
    .data-table td {
        padding: 8px 10px;
    }

    .toast {
        min-width: auto;
        max-width: calc(100vw - 40px);
    }

    .login-card {
        padding: 32px 24px;
        margin: 16px;
    }

    .modal-card {
        max-height: 90vh;
    }

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

/* ============================================
   UTILITY
   ============================================ */
.text-success { color: var(--success) !important; }
.text-danger  { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info    { color: var(--info) !important; }
.text-muted   { color: var(--text-secondary) !important; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }

.mt-0  { margin-top: 0; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.justify-between { justify-content: space-between; }

.hidden { display: none !important; }
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

/* Promotion tabs */
.tab-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.tab-btn {
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
}
.tab-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
