/* ========================================
   ADMIN.CSS - Standalone Admin Panel
   ======================================== */

/* ----- ROOT VARIABLES (Dark Theme Default) ----- */
:root {
    --bg: #0B0F1A;
    --surface: #121826;
    --surface-2: #1A2233;
    --border: #262F44;
    --accent: #FF5A2E;
    --accent-dim: #4A2717;
    --accent2: #38D98A;
    --accent2-dim: #173626;
    --text: #F4F1E9;
    --text-muted: #8C93A8;
    --text-faint: #5B6377;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-light: 0 4px 16px rgba(0, 0, 0, 0.15);
    --font-d: 'Space Grotesk', sans-serif;
    --font-b: 'Inter', sans-serif;
    --font-m: 'JetBrains Mono', monospace;
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ----- LIGHT THEME ----- */
[data-theme="light"] {
    --bg: #F0F2F5;
    --surface: #FFFFFF;
    --surface-2: #E8EAED;
    --border: #D1D5DB;
    --text: #1A1A2E;
    --text-muted: #4A4A6A;
    --text-faint: #8A8AA8;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .admin-sidebar {
    background: #FFFFFF;
    border-right: 1px solid var(--border);
}

[data-theme="light"] .admin-header {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--border);
}

[data-theme="light"] .stat-card,
[data-theme="light"] .analytics-card,
[data-theme="light"] .settings-card,
[data-theme="light"] .modal-card {
    background: #FFFFFF;
}

[data-theme="light"] .admin-table thead {
    background: #F3F4F6;
}

[data-theme="light"] .admin-table tbody tr:hover {
    background: #F8F9FA;
}

[data-theme="light"] .admin-login-box {
    background: #FFFFFF;
}

[data-theme="light"] .search-box {
    background: #FFFFFF;
}

[data-theme="light"] .form-group input,
[data-theme="light"] .form-group textarea,
[data-theme="light"] .form-group select {
    background: #FFFFFF;
}

[data-theme="light"] .admin-user .admin-avatar {
    background: var(--accent-dim);
}

/* ----- RESET ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-b);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background var(--transition), color var(--transition);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-faint);
}

/* ==========================================
   ADMIN LOGIN
   ========================================== */
.admin-login-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeSlideUp 0.5s ease-out;
}

.admin-login-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    animation: scalePop 0.5s ease-out;
    box-shadow: var(--shadow);
    transition: background var(--transition), border-color var(--transition);
}

.login-logo {
    font-family: var(--font-d);
    font-weight: 700;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--text);
}

.login-logo .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-dim);
}

.login-badge {
    font-size: 11px;
    font-weight: 600;
    background: var(--accent2-dim);
    color: var(--accent2);
    padding: 2px 12px;
    border-radius: 100px;
    border: 1px solid #21503a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-login-box h2 {
    font-family: var(--font-d);
    font-size: 24px;
    margin: 16px 0 4px;
    color: var(--text);
}

.admin-login-box p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

.admin-login-box .form-group {
    text-align: left;
    margin-bottom: 16px;
}

.admin-login-box .form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    color: var(--text-muted);
}

.admin-login-box .form-group label i {
    margin-right: 6px;
    color: var(--accent2);
}

.admin-login-box .form-group input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    transition: border-color var(--transition), background var(--transition);
    font-family: var(--font-b);
}

.admin-login-box .form-group input:focus {
    border-color: var(--accent2);
    outline: none;
    box-shadow: 0 0 0 3px rgba(56, 217, 138, 0.1);
}

.login-error {
    color: var(--accent);
    font-size: 13px;
    margin-top: 12px;
    min-height: 20px;
}

.login-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.login-footer a {
    color: var(--text-muted);
    font-size: 13px;
    transition: color var(--transition);
}

.login-footer a:hover {
    color: var(--text);
}

/* ==========================================
   ADMIN PANEL LAYOUT
   ========================================== */
.admin-panel {
    display: flex;
    min-height: 100vh;
    background: var(--bg);
    transition: background var(--transition);
}

/* ==========================================
   SIDEBAR
   ========================================== */
.admin-sidebar {
    width: 260px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
    transition: transform 0.3s ease, background var(--transition), border-color var(--transition);
    z-index: 100;
}

.sidebar-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-logo {
    font-family: var(--font-d);
    font-weight: 700;
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.sidebar-logo .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-dim);
}

.sidebar-badge {
    font-size: 10px;
    font-weight: 600;
    background: var(--accent2-dim);
    color: var(--accent2);
    padding: 2px 10px;
    border-radius: 100px;
    border: 1px solid #21503a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    display: none;
}

.sidebar-close:hover {
    color: var(--text);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: all var(--transition);
    font-size: 14px;
    font-weight: 500;
    position: relative;
    text-decoration: none;
}

.sidebar-link i {
    width: 20px;
    font-size: 16px;
}

.sidebar-link:hover {
    background: var(--surface-2);
    color: var(--text);
}

.sidebar-link.active {
    background: var(--accent-dim);
    color: var(--accent);
}

.sidebar-link .badge {
    margin-left: auto;
    background: var(--accent2-dim);
    color: var(--accent2);
    padding: 1px 8px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
}

.sidebar-link .badge.badge-warning {
    background: var(--accent-dim);
    color: var(--accent);
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    position: relative;
}

.admin-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    color: var(--accent);
    flex-shrink: 0;
}

.admin-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.admin-email {
    font-size: 12px;
    color: var(--text-muted);
}

.theme-toggle-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
}

.theme-toggle-btn:hover {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: var(--accent);
}

.sidebar-footer .btn {
    width: 100%;
    justify-content: center;
}

/* ==========================================
   MAIN CONTENT
   ========================================== */
.admin-main {
    flex: 1;
    padding: 0;
    overflow-x: hidden;
    min-width: 0;
}

/* ==========================================
   ADMIN HEADER
   ========================================== */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 50;
    transition: background var(--transition), border-color var(--transition);
}

[data-theme="light"] .admin-header {
    background: rgba(255, 255, 255, 0.92);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    display: none;
}

.sidebar-toggle:hover {
    color: var(--text);
}

.header-left h1 {
    font-family: var(--font-d);
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-time {
    font-size: 13px;
    color: var(--text-muted);
    font-family: var(--font-m);
}

.header-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 6px 8px;
    position: relative;
    transition: all var(--transition);
    border-radius: var(--radius-sm);
}

.header-btn:hover {
    color: var(--text);
    background: var(--surface-2);
}

.header-btn i {
    transition: transform 0.3s ease;
}

.header-btn:hover i {
    transform: rotate(30deg);
}

.notif-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 1.6s ease-in-out infinite;
}

/* ----- Theme Toggle in Header ----- */
.theme-toggle-header {
    font-size: 18px;
}

.theme-toggle-header:hover i {
    transform: rotate(30deg);
}

/* ==========================================
   ADMIN SECTIONS
   ========================================== */
.admin-section {
    display: none;
    padding: 24px 32px 40px;
    animation: fadeSlideUp 0.4s ease-out;
}

.admin-section.active {
    display: block;
}

/* ==========================================
   STATS GRID
   ========================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--transition);
}

.stat-card:hover {
    border-color: var(--accent2);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-info {
    flex: 1;
}

.stat-label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
}

.stat-value {
    display: block;
    font-family: var(--font-m);
    font-size: 28px;
    font-weight: 500;
    margin-top: 2px;
    color: var(--text);
}

.stat-change {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 100px;
}

.stat-change.positive {
    background: var(--accent2-dim);
    color: var(--accent2);
}

.stat-change.negative {
    background: var(--accent-dim);
    color: var(--accent);
}

/* ==========================================
   ANALYTICS GRID
   ========================================== */
.analytics-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.analytics-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    transition: all var(--transition);
}

.analytics-card:hover {
    border-color: var(--accent2);
}

.analytics-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.analytics-card .card-header h3 {
    font-family: var(--font-d);
    font-size: 16px;
    color: var(--text);
}

.analytics-card .card-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

.analytics-card canvas {
    max-height: 200px;
    max-width: 100%;
}

.analytics-grid.two-col {
    grid-template-columns: 1fr 1fr;
}

.analytics-card.full-width {
    grid-column: 1 / -1;
}

.analytics-full {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ==========================================
   QUICK ACTIONS
   ========================================== */
.quick-actions {
    margin-top: 28px;
}

.quick-actions h3 {
    font-family: var(--font-d);
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--text);
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.action-btn {
    padding: 16px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-b);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.action-btn:hover {
    border-color: var(--accent2);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.action-btn i {
    font-size: 18px;
    color: var(--accent2);
}

/* ==========================================
   SECTION TOOLBAR
   ========================================== */
.section-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    flex: 1;
    max-width: 360px;
    transition: all var(--transition);
}

.search-box:focus-within {
    border-color: var(--accent2);
    box-shadow: 0 0 0 3px rgba(56, 217, 138, 0.1);
}

.search-box i {
    color: var(--text-muted);
}

.search-box input {
    background: none;
    border: none;
    color: var(--text);
    font-size: 14px;
    width: 100%;
    outline: none;
    font-family: var(--font-b);
}

.search-box input::placeholder {
    color: var(--text-faint);
}

.toolbar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.toolbar-actions select {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    color: var(--text);
    font-size: 13px;
    outline: none;
    font-family: var(--font-b);
    cursor: pointer;
    transition: all var(--transition);
}

.toolbar-actions select:focus {
    border-color: var(--accent2);
}

/* ==========================================
   TABLES
   ========================================== */
.table-container {
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: background var(--transition), border-color var(--transition);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table thead {
    background: var(--surface-2);
    transition: background var(--transition);
}

.admin-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.admin-table tbody tr {
    transition: background var(--transition);
}

.admin-table tbody tr:hover {
    background: var(--surface-2);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table .status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
}

.status-badge.live {
    background: var(--accent2-dim);
    color: var(--accent2);
}

.status-badge.pending {
    background: #4A2717;
    color: #EF9F27;
}

.status-badge.featured {
    background: var(--accent-dim);
    color: var(--accent);
}

.status-badge.archived {
    background: var(--surface-2);
    color: var(--text-faint);
}

.status-badge.active {
    background: var(--accent2-dim);
    color: var(--accent2);
}

.status-badge.inactive {
    background: var(--surface-2);
    color: var(--text-faint);
}

.status-badge.admin {
    background: var(--accent-dim);
    color: var(--accent);
}

.status-badge.maker {
    background: var(--accent2-dim);
    color: var(--accent2);
}

.status-badge.user {
    background: var(--surface-2);
    color: var(--text-muted);
}

.table-actions {
    display: flex;
    gap: 6px;
}

.table-actions button {
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 13px;
}

.table-actions button:hover {
    background: var(--surface-2);
    color: var(--text);
}

.table-actions .edit-btn:hover {
    border-color: var(--accent2);
    color: var(--accent2);
}

.table-actions .delete-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ==========================================
   MODERATION LIST
   ========================================== */
.moderation-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.moderation-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition);
}

.moderation-item:hover {
    border-color: var(--accent2);
}

.moderation-item .moderation-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.moderation-item .moderation-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #1a0a04;
}

.moderation-item .moderation-details {
    flex: 1;
}

.moderation-item .moderation-details .mod-title {
    font-weight: 600;
    color: var(--text);
}

.moderation-item .moderation-details .mod-sub {
    font-size: 13px;
    color: var(--text-muted);
}

.moderation-item .moderation-actions {
    display: flex;
    gap: 8px;
}

.moderation-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.moderation-empty i {
    font-size: 48px;
    color: var(--accent2);
    margin-bottom: 12px;
    display: block;
}

/* ==========================================
   SETTINGS
   ========================================== */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.settings-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: background var(--transition), border-color var(--transition);
}

.settings-card h3 {
    font-family: var(--font-d);
    font-size: 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.settings-card h3 i {
    color: var(--accent2);
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-form .form-group label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.settings-form .form-group input[type="text"],
.settings-form .form-group input[type="email"],
.settings-form .form-group select {
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    font-family: var(--font-b);
    transition: all var(--transition);
}

.settings-form .form-group input[type="text"]:focus,
.settings-form .form-group input[type="email"]:focus,
.settings-form .form-group select:focus {
    border-color: var(--accent2);
    outline: none;
    box-shadow: 0 0 0 3px rgba(56, 217, 138, 0.1);
}

.settings-form .form-group input[type="color"] {
    width: 60px;
    height: 40px;
    padding: 2px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

/* ----- TOGGLE SWITCH ----- */
.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 26px;
    transition: var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: var(--text);
    border-radius: 50%;
    transition: var(--transition);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--accent2);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(22px);
}

/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    min-width: 300px;
    max-width: 400px;
    box-shadow: var(--shadow);
    animation: slideInRight 0.4s ease-out;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background var(--transition), border-color var(--transition);
}

.toast.success {
    border-color: var(--accent2);
}

.toast.success i {
    color: var(--accent2);
}

.toast.error {
    border-color: var(--accent);
}

.toast.error i {
    color: var(--accent);
}

.toast.info {
    border-color: var(--text-faint);
}

.toast.info i {
    color: var(--text-muted);
}

.toast i {
    font-size: 20px;
}

.toast .toast-message {
    flex: 1;
    font-size: 14px;
    color: var(--text);
}

.toast .toast-close {
    background: none;
    border: none;
    color: var(--text-faint);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    transition: color var(--transition);
}

.toast .toast-close:hover {
    color: var(--text);
}

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scalePop {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }
    70% {
        transform: scale(1.02);
        opacity: 0.9;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.35;
        transform: scale(0.9);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
    font-family: var(--font-b);
    font-weight: 600;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition);
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: var(--accent);
    color: #1a0a04;
    box-shadow: 0 4px 16px rgba(255, 90, 46, 0.3);
}

.btn-primary:hover {
    background: #ff6c44;
    box-shadow: 0 6px 24px rgba(255, 90, 46, 0.45);
    transform: translateY(-2px);
}

.btn-ghost {
    border-color: var(--border);
    color: var(--text);
}

.btn-ghost:hover {
    border-color: var(--text-faint);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 13px;
}

.btn-submit {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 15px;
}

/* ==========================================
   MODAL
   ========================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(11, 15, 26, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeSlideUp 0.3s ease-out;
}

.modal-overlay.active {
    display: flex;
}

.modal-container {
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    animation: scalePop 0.3s ease-out;
    transition: background var(--transition), border-color var(--transition);
}

.modal-close {
    float: right;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.modal-close:hover {
    color: var(--text);
    background: var(--surface-2);
}

.modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    border: 1px solid var(--accent);
}

.modal-icon i {
    font-size: 24px;
    color: var(--accent);
}

.modal-header h2 {
    font-family: var(--font-d);
    font-size: 24px;
    margin-bottom: 4px;
    color: var(--text);
}

.modal-header p {
    color: var(--text-muted);
    font-size: 14px;
}

/* ----- FORM ----- */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text);
    font-family: var(--font-b);
    font-size: 14px;
    transition: all var(--transition);
    width: 100%;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent2);
    box-shadow: 0 0 0 3px rgba(56, 217, 138, 0.1);
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-faint);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ==========================================
   TOP LISTS
   ========================================== */
.top-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.top-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.top-item:last-child {
    border-bottom: none;
}

.top-item .top-name {
    font-weight: 500;
    color: var(--text);
}

.top-item .top-value {
    color: var(--text-muted);
    font-size: 13px;
}

.top-item .top-rank {
    font-size: 12px;
    color: var(--text-faint);
    font-family: var(--font-m);
    margin-right: 8px;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .analytics-grid.two-col {
        grid-template-columns: 1fr;
    }
    
    .action-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        transform: translateX(-100%);
        height: 100vh;
        z-index: 200;
        width: 280px;
        box-shadow: var(--shadow);
    }
    
    .admin-sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-close {
        display: block;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .admin-header {
        padding: 12px 16px;
    }
    
    .admin-section {
        padding: 16px 16px 32px;
    }
    
    .header-time {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .action-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .section-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .toolbar-actions {
        flex-wrap: wrap;
    }
    
    .admin-table {
        font-size: 13px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 8px 10px;
    }
    
    .modal-card {
        padding: 24px;
    }
    
    .admin-login-box {
        padding: 32px 24px;
        margin: 16px;
    }
    
    .admin-user .theme-toggle-btn {
        position: relative;
        transform: none;
        margin-left: auto;
    }
}

@media (max-width: 480px) {
    .admin-login-box {
        padding: 24px 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-value {
        font-size: 22px;
    }
    
    .admin-table {
        font-size: 12px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 6px 8px;
    }
    
    .toast {
        min-width: 0;
        max-width: 90vw;
    }
}
/* ==========================================
   LOGOUT BUTTON - Red Color
   ========================================== */

.btn-logout {
    background: transparent;
    border: 2px solid #FF5A2E;
    color: #FF5A2E;
    transition: all var(--transition);
    width: 100%;
    justify-content: center;
    padding: 10px;
    font-weight: 600;
}

.btn-logout:hover {
    background: #FF5A2E;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 90, 46, 0.3);
}

.btn-logout i {
    margin-right: 8px;
}

/* ==========================================
   NOTIFICATIONS STYLES
   ========================================== */

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.notification-item:hover {
    border-color: var(--accent2);
}

.notification-item.unread {
    border-left: 3px solid var(--accent);
    background: var(--surface-2);
}

.notification-item.read {
    opacity: 0.7;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

.notification-icon.success {
    background: var(--accent2-dim);
    color: var(--accent2);
}

.notification-icon.info {
    background: var(--surface-2);
    color: var(--text-muted);
}

.notification-icon.error {
    background: var(--accent-dim);
    color: var(--accent);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.notification-message {
    font-size: 13px;
    color: var(--text-muted);
}

.notification-time {
    font-size: 11px;
    color: var(--text-faint);
    margin-top: 4px;
}

.notification-delete {
    background: none;
    border: none;
    color: var(--text-faint);
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition);
}

.notification-delete:hover {
    color: var(--accent);
}
/* ==========================================
   SYNC BUTTON - Green Color
   ========================================== */

.btn-sync {
    background: transparent;
    border: 2px solid #38D98A;
    color: #38D98A;
    transition: all var(--transition);
    padding: 8px 16px;
    font-weight: 600;
}

.btn-sync:hover {
    background: #38D98A;
    color: #1a0a04;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(56, 217, 138, 0.3);
}

.btn-sync i {
    margin-right: 6px;
}

/* ----- ALTERNATIVE COLORS ----- */

/* Purple Sync Button */
.btn-sync-purple {
    background: transparent;
    border: 2px solid #7F77DD;
    color: #7F77DD;
    transition: all var(--transition);
    padding: 8px 16px;
    font-weight: 600;
}

.btn-sync-purple:hover {
    background: #7F77DD;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(127, 119, 221, 0.3);
}

/* Blue Sync Button */
.btn-sync-blue {
    background: transparent;
    border: 2px solid #378ADD;
    color: #378ADD;
    transition: all var(--transition);
    padding: 8px 16px;
    font-weight: 600;
}

.btn-sync-blue:hover {
    background: #378ADD;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(55, 138, 221, 0.3);
}

/* Orange Sync Button */
.btn-sync-orange {
    background: transparent;
    border: 2px solid #FF5A2E;
    color: #FF5A2E;
    transition: all var(--transition);
    padding: 8px 16px;
    font-weight: 600;
}

.btn-sync-orange:hover {
    background: #FF5A2E;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 90, 46, 0.3);
}

/* Gradient Sync Button */
.btn-sync-gradient {
    background: linear-gradient(135deg, #38D98A, #7F77DD);
    color: #fff;
    border: none;
    padding: 8px 16px;
    font-weight: 600;
    transition: all var(--transition);
}

.btn-sync-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(56, 217, 138, 0.3);
}