/* ═══════════════════════════════════════════════════════════════════
   GORILLA STAFF PORTAL — CSS
   Design: Dark Tech, Modern, Responsive
═══════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:           #09090d;
    --surface:      #0f1118;
    --surface-2:    #161923;
    --surface-3:    #1d2130;
    --border:       rgba(255, 255, 255, 0.065);
    --border-2:     rgba(255, 255, 255, 0.10);

    --primary:      #8b5cf6;
    --primary-2:    #7c3aed;
    --primary-glow: rgba(139, 92, 246, 0.30);
    --accent:       #22d3ee;
    --accent-glow:  rgba(34, 211, 238, 0.20);

    --text:         #f1f5f9;
    --text-dim:     #94a3b8;
    --text-muted:   #4b5563;

    --success:      #10b981;
    --success-bg:   rgba(16, 185, 129, 0.10);
    --warning:      #f59e0b;
    --warning-bg:   rgba(245, 158, 11, 0.10);
    --danger:       #ef4444;
    --danger-bg:    rgba(239, 68, 68, 0.10);
    --info:         #22d3ee;
    --info-bg:      rgba(34, 211, 238, 0.10);

    --sidebar-w:    270px;
    --topbar-h:     64px;
    --radius:       14px;
    --radius-sm:    8px;
    --radius-lg:    20px;

    --shadow:       0 4px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg:    0 8px 48px rgba(0, 0, 0, 0.5);

    --transition:   0.18s ease;
    --transition-s: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Base ─────────────────────────────────────────────────────── */
html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Background grid */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(ellipse 75% 55% at 15% 20%, rgba(139,92,246,0.09) 0%, transparent 65%),
        radial-gradient(ellipse 60% 45% at 85% 80%, rgba(34,211,238,0.07) 0%, transparent 65%),
        linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 52px 52px, 52px 52px;
    pointer-events: none;
    z-index: 0;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ── Layout ───────────────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 200;
    transition: transform var(--transition-s);
    overflow: hidden;
}

.main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition-s);
}

/* ── Sidebar Header ────────────────────────────────────────────── */
.sidebar-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 16px var(--primary-glow);
}

.sidebar-logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.sidebar-logo-title { font-weight: 800; font-size: 16px; letter-spacing: -0.3px; }
.sidebar-logo-sub { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 1px; }

.sidebar-toggle {
    display: none;
    background: none; border: none; cursor: pointer;
    color: var(--text-dim);
    padding: 4px;
    border-radius: 6px;
    transition: color var(--transition);
}
.sidebar-toggle:hover { color: var(--text); }

/* ── Sidebar User ─────────────────────────────────────────────── */
.sidebar-user {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.sidebar-avatar-wrap { position: relative; flex-shrink: 0; }

.sidebar-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-2);
}

.sidebar-status {
    position: absolute;
    bottom: 0; right: 0;
    width: 12px; height: 12px;
    border-radius: 50%;
    border: 2px solid var(--surface);
    background: var(--success);
}
.sidebar-status.away { background: var(--danger); }
.sidebar-status.busy { background: var(--warning); }

.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-username { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-role { display: block; font-size: 11px; color: var(--primary); font-weight: 500; margin-top: 1px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Sidebar Nav ──────────────────────────────────────────────── */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
    scrollbar-width: thin;
}

.nav-group { margin-bottom: 20px; }
.nav-group-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0 8px;
    margin-bottom: 4px;
    display: block;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    margin-bottom: 2px;
}

.nav-item:hover {
    background: var(--surface-2);
    color: var(--text);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(139,92,246,0.15), rgba(139,92,246,0.05));
    color: var(--primary);
    border: 1px solid rgba(139,92,246,0.18);
}

.nav-item.active svg { color: var(--primary); }

.nav-item span:first-of-type { flex: 1; }

.nav-badge {
    min-width: 20px; height: 20px;
    padding: 0 6px;
    border-radius: 100px;
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.nav-badge.danger  { background: var(--danger); }
.nav-badge.warning { background: var(--warning); }
.nav-badge.accent  { background: var(--accent); color: var(--bg); }

/* ── Sidebar Bottom ───────────────────────────────────────────── */
.sidebar-bottom {
    padding: 16px 12px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: all var(--transition);
}
.sidebar-logout:hover { background: var(--danger-bg); color: var(--danger); }

/* ── Topbar ───────────────────────────────────────────────────── */
.topbar {
    height: var(--topbar-h);
    background: rgba(15, 17, 24, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
}

.topbar-menu {
    display: none;
    background: none; border: none; cursor: pointer;
    color: var(--text-dim);
    padding: 6px;
    border-radius: 8px;
    transition: color var(--transition);
}
.topbar-menu:hover { color: var(--text); }

/* ── Topbar brand (logo + nom) ────────────────────────────────── */
.topbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    text-decoration: none;
}
.topbar-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(139,92,246,.5));
    flex-shrink: 0;
}
.topbar-brand-name {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -.3px;
    background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}
@media (max-width: 900px) { .topbar-brand { display: none; } }

.topbar-breadcrumb {
    flex: 1;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.server-status {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-dim);
}

.status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2.5s ease-in-out infinite;
    flex-shrink: 0;
}
.status-dot.offline { background: var(--danger); animation: none; }

@keyframes pulse {
    0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
    50%      { opacity: 0.8; box-shadow: 0 0 0 5px rgba(16,185,129,0); }
}

.topbar-avatar-wrap {
    width: 36px; height: 36px;
    cursor: pointer;
}
.topbar-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-2);
    transition: border-color var(--transition);
}
.topbar-avatar:hover { border-color: var(--primary); }

/* ── Page wrapper ─────────────────────────────────────────────── */
.page-wrapper {
    flex: 1;
    padding: 28px 28px 48px;
    max-width: 1440px;
    width: 100%;
}

/* ── Page content ─────────────────────────────────────────────── */
.page-content { display: none; }
.page-content.active {
    display: block;
    animation: fadeInUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.page-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-dim);
    margin-top: 4px;
}

.page-header-actions { display: flex; align-items: center; gap: 12px; }

/* ── Cards ────────────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
    transition: border-color var(--transition);
}
.card:hover { border-color: var(--border-2); }

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139,92,246,0.3), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}
.card:hover::before { opacity: 1; }

.card-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.card-link {
    font-size: 12.5px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition);
}
.card-link:hover { color: var(--accent); }

.card-body {
    padding: 20px;
}
.card-body.p0 { padding: 0; }

.mt16 { margin-top: 16px; }
.mt24 { margin-top: 24px; }

/* ── Stats Grid ───────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-s);
    cursor: default;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-s);
}

.stat-card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.stat-card:hover::after { transform: scaleX(1); }

.stat-card[data-color="primary"] .stat-icon,
.stat-card[data-color="primary"]::after { color: var(--primary); background: var(--primary); }
.stat-card[data-color="success"] .stat-icon,
.stat-card[data-color="success"]::after { color: var(--success); background: var(--success); }
.stat-card[data-color="warning"] .stat-icon,
.stat-card[data-color="warning"]::after { color: var(--warning); background: var(--warning); }
.stat-card[data-color="accent"] .stat-icon,
.stat-card[data-color="accent"]::after  { color: var(--accent); background: var(--accent); }

.stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: var(--surface-2);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.stat-card[data-color="primary"] .stat-icon { background: rgba(139,92,246,0.12); }
.stat-card[data-color="success"]  .stat-icon { background: rgba(16,185,129,0.12); }
.stat-card[data-color="warning"]  .stat-icon { background: rgba(245,158,11,0.12); }
.stat-card[data-color="accent"]   .stat-icon { background: rgba(34,211,238,0.12); }

.stat-info { flex: 1; min-width: 0; }
.stat-value { font-size: 28px; font-weight: 800; line-height: 1; letter-spacing: -1px; }
.stat-label { font-size: 12.5px; color: var(--text-dim); margin-top: 4px; font-weight: 500; }

/* ── Dashboard Grid ───────────────────────────────────────────── */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 900px) {
    .dashboard-grid { grid-template-columns: 1fr; }
}

/* ── Server Card Mini ─────────────────────────────────────────── */
.server-card-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.guild-icon { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.guild-name { font-size: 14px; font-weight: 700; }
.guild-members { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

/* ── Mini List (recent tickets) ───────────────────────────────── */
.mini-list { display: flex; flex-direction: column; }
.mini-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}
.mini-item:last-child { border-bottom: none; }
.mini-item:hover { background: var(--surface-2); }

.mini-item-info { flex: 1; min-width: 0; }
.mini-item-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-item-sub { font-size: 12px; color: var(--text-dim); margin-top: 1px; }

/* ── Badges / Status ──────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 100px;
    font-size: 11.5px;
    font-weight: 600;
    gap: 5px;
    flex-shrink: 0;
}
.badge-open    { background: rgba(16,185,129,0.12); color: var(--success); border: 1px solid rgba(16,185,129,0.2); }
.badge-closed  { background: rgba(75,85,99,0.15); color: var(--text-muted); border: 1px solid rgba(75,85,99,0.2); }
.badge-pending { background: rgba(245,158,11,0.12); color: var(--warning); border: 1px solid rgba(245,158,11,0.2); }
.badge-accepted { background: rgba(16,185,129,0.12); color: var(--success); border: 1px solid rgba(16,185,129,0.2); }
.badge-refused { background: rgba(239,68,68,0.12); color: var(--danger); border: 1px solid rgba(239,68,68,0.2); }
.badge-admin   { background: rgba(139,92,246,0.12); color: var(--primary); border: 1px solid rgba(139,92,246,0.2); font-size: 12px; padding: 4px 12px; border-radius: 6px; }

/* ── Data Tables ──────────────────────────────────────────────── */
.data-table-wrap { overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.data-table thead tr { border-bottom: 1px solid var(--border); }
.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    white-space: nowrap;
}
.data-table td {
    padding: 13px 16px;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.data-table tbody tr { transition: background var(--transition); }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table td .text-bold { font-weight: 600; color: var(--text); }

/* ── Pagination ───────────────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px;
    border-top: 1px solid var(--border);
}
.pg-btn {
    min-width: 36px; height: 36px;
    padding: 0 10px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-dim);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    display: flex; align-items: center; justify-content: center;
}
.pg-btn:hover { border-color: var(--primary); color: var(--primary); }
.pg-btn.active { background: var(--primary); border-color: var(--primary); color: white; }
.pg-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ── Tabs ─────────────────────────────────────────────────────── */
.tabs {
    display: flex;
    gap: 4px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
}

.tab {
    padding: 7px 14px;
    border-radius: 7px;
    border: none;
    background: transparent;
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    white-space: nowrap;
}
.tab:hover { background: var(--surface-3); color: var(--text); }
.tab.active { background: var(--primary); color: white; box-shadow: 0 2px 10px var(--primary-glow); }

/* ── Filters ──────────────────────────────────────────────────── */
.recruit-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.filter-btn {
    padding: 7px 16px;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: var(--primary); border-color: var(--primary); color: white; }

/* ── Search ───────────────────────────────────────────────────── */
.search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0 14px;
    color: var(--text-muted);
}
.search-input {
    background: none;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 13.5px;
    font-family: inherit;
    padding: 10px 0;
    width: 200px;
}
.search-input::placeholder { color: var(--text-muted); }
.search-wrap:focus-within { border-color: var(--primary); color: var(--primary); }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: white;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    box-shadow: 0 2px 12px var(--primary-glow);
    white-space: nowrap;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #9f67ff, #8b4fe0);
    box-shadow: 0 4px 20px var(--primary-glow);
    transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary.w100 { width: 100%; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}
.btn-secondary:hover { border-color: var(--border-2); color: var(--text); background: var(--surface-3); }

.btn-danger {
    @extend .btn-secondary;
    background: var(--danger-bg);
    border-color: rgba(239,68,68,0.25);
    color: var(--danger);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}
.btn-danger { background: var(--danger-bg); border: 1px solid rgba(239,68,68,0.25); color: var(--danger); }
.btn-danger:hover { background: rgba(239,68,68,0.2); }

.btn-success {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 7px 14px;
    background: var(--success-bg); border: 1px solid rgba(16,185,129,0.25); color: var(--success);
    border-radius: var(--radius-sm); font-family: inherit; font-size:13px; font-weight:600; cursor:pointer; transition: all var(--transition);
}
.btn-success:hover { background: rgba(16,185,129,0.2); }

/* ── Forms ────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 6px;
}
.form-input, .form-textarea, .form-select {
    width: 100%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    padding: 10px 14px;
    outline: none;
    transition: border-color var(--transition);
    appearance: none;
    -webkit-appearance: none;
}
.form-input:focus, .form-textarea:focus, .form-select:focus { border-color: var(--primary); }
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-select { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

.form-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; display: block; }

.form-divider {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 12px 0 4px;
    border-top: 1px solid var(--border);
    margin: 8px 0 12px;
}

.input-prefix {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface-2);
    transition: border-color var(--transition);
}
.input-prefix:focus-within { border-color: var(--primary); }
.input-prefix span {
    padding: 10px 12px;
    background: var(--surface-3);
    border-right: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
}
.input-prefix .form-input {
    border: none;
    border-radius: 0;
    background: transparent;
}

.color-picker-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}
.color-picker {
    width: 44px; height: 36px;
    border-radius: 8px;
    border: 2px solid var(--border);
    background: transparent;
    cursor: pointer;
    padding: 2px;
}
.color-picker::-webkit-color-swatch-wrapper { padding: 0; }
.color-picker::-webkit-color-swatch { border-radius: 5px; border: none; }

/* ── Toggle Switch ────────────────────────────────────────────── */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.toggle-label { font-size: 14px; font-weight: 600; }
.toggle-sub { font-size: 12.5px; color: var(--text-dim); margin-top: 2px; }

.toggle-switch { position: relative; display: inline-block; width: 48px; height: 26px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; inset: 0;
    background: var(--surface-3);
    border-radius: 100px;
    cursor: pointer;
    transition: background var(--transition);
    border: 1px solid var(--border);
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    left: 4px; top: 50%;
    transform: translateY(-50%);
    background: var(--text-muted);
    border-radius: 50%;
    transition: all var(--transition);
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); border-color: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { left: calc(100% - 22px); background: white; }

/* ── News Feed ───────────────────────────────────────────────── */
.news-feed { display: flex; flex-direction: column; gap: 16px; }
.news-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition-s);
}
.news-card:hover { border-color: var(--border-2); transform: translateY(-1px); box-shadow: var(--shadow); }
.news-card.pinned { border-color: rgba(139,92,246,0.3); }
.news-card.pinned::before {
    content: '📌 Épinglé';
    display: block;
    background: rgba(139,92,246,0.1);
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 6px 18px;
    border-bottom: 1px solid rgba(139,92,246,0.15);
}
.news-card-inner { padding: 20px; }
.news-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.news-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.news-author { font-size: 13.5px; font-weight: 700; }
.news-date { font-size: 12px; color: var(--text-muted); }
.news-title { font-size: 17px; font-weight: 800; margin-bottom: 10px; line-height: 1.3; }
.news-content { font-size: 14px; color: var(--text-dim); line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.news-actions { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; gap: 8px; }

/* News preview in dashboard */
.news-preview-list { display: flex; flex-direction: column; }
.news-preview-item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 20px; border-bottom: 1px solid var(--border);
    transition: background var(--transition);
    cursor: pointer;
}
.news-preview-item:last-child { border-bottom: none; }
.news-preview-item:hover { background: var(--surface-2); }
.news-preview-title { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.news-preview-sub { font-size: 12px; color: var(--text-dim); }

/* ── Staff Grid ───────────────────────────────────────────────── */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.staff-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    transition: all var(--transition-s);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.staff-card:hover { border-color: var(--border-2); transform: translateY(-3px); box-shadow: var(--shadow); }
.staff-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 60px;
    background: linear-gradient(135deg, var(--card-color, var(--primary)), transparent);
    opacity: 0.08;
}
.staff-card-avatar {
    width: 70px; height: 70px;
    border-radius: 50%;
    margin: 0 auto 12px;
    border: 3px solid var(--card-color, var(--primary));
    object-fit: cover;
    display: block;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.staff-card-name { font-size: 15px; font-weight: 800; margin-bottom: 2px; }
.staff-card-title { font-size: 12px; color: var(--primary); font-weight: 600; margin-bottom: 8px; min-height: 16px; }
.staff-card-bio { font-size: 12.5px; color: var(--text-dim); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 12px; min-height: 36px; }
.staff-card-footer { display: flex; align-items: center; justify-content: center; gap: 8px; }
.staff-card-avail {
    display: flex; align-items: center; gap: 5px;
    font-size: 11.5px; font-weight: 600;
    padding: 3px 10px; border-radius: 100px;
}
.avail-available { background: var(--success-bg); color: var(--success); }
.avail-busy       { background: var(--warning-bg); color: var(--warning); }
.avail-away       { background: var(--danger-bg); color: var(--danger); }

/* ── Profile Page ─────────────────────────────────────────────── */
.profile-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 24px;
    align-items: start;
}

.profile-card-main {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: sticky;
    top: calc(var(--topbar-h) + 20px);
}

.profile-banner {
    height: 90px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    position: relative;
    transition: background 0.5s;
}

.profile-card-body { padding: 0 24px 24px; position: relative; }

.profile-avatar-area {
    margin-top: -38px;
    margin-bottom: 14px;
    position: relative;
    width: fit-content;
}
.profile-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    border: 4px solid var(--surface);
    object-fit: cover;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    display: block;
}
.profile-availability {
    position: absolute; bottom: 4px; right: 4px;
    width: 16px; height: 16px;
    border-radius: 50%;
    border: 2px solid var(--surface);
    background: var(--success);
}
.profile-availability.busy  { background: var(--warning); }
.profile-availability.away  { background: var(--danger); }
.profile-availability[data-avail="busy"]  { background: var(--warning); }
.profile-availability[data-avail="away"]  { background: var(--danger); }
.profile-availability[data-avail="available"] { background: var(--success); }

.profile-display-name { font-size: 22px; font-weight: 800; margin-bottom: 2px; }
.profile-username { font-size: 13.5px; color: var(--text-muted); display: block; }
.profile-title {
    display: inline-block;
    margin-top: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--primary);
    background: rgba(139,92,246,0.1);
    border: 1px solid rgba(139,92,246,0.2);
    border-radius: 6px;
    padding: 2px 10px;
}
.profile-bio {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.7;
    margin: 14px 0;
    min-height: 20px;
    white-space: pre-wrap;
    word-break: break-word;
}
.profile-socials { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.profile-social-link {
    display: flex; align-items: center; gap: 6px;
    padding: 5px 12px;
    border-radius: 100px;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-dim);
    transition: all var(--transition);
}
.profile-social-link:hover { border-color: var(--primary); color: var(--primary); }
.profile-social-link.twitch:hover { border-color: #9146ff; color: #9146ff; }
.profile-social-link.twitter:hover { border-color: #1d9bf0; color: #1d9bf0; }

.profile-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-badge {
    font-size: 11.5px;
    padding: 3px 10px;
    border-radius: 100px;
    background: var(--surface-3);
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-weight: 600;
}
.profile-badge.admin { background: rgba(139,92,246,0.1); border-color: rgba(139,92,246,0.25); color: var(--primary); }

/* ── Absences ──────────────────────────────────────────────────── */
.absences-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.absence-item {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 16px 20px; border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}
.absence-item:last-child { border-bottom: none; }
.absence-item:hover { background: var(--surface-2); }
.absence-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.absence-info { flex: 1; min-width: 0; }
.absence-name { font-size: 14px; font-weight: 700; }
.absence-reason { font-size: 13px; color: var(--text-dim); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.absence-until { font-size: 12px; color: var(--warning); margin-top: 3px; }
.absence-actions { display: flex; align-items: center; gap: 6px; }

/* ── Recruitment Grid ─────────────────────────────────────────── */
.recruit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}
.recruit-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition-s);
}
.recruit-card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.recruit-card-header { padding: 16px 16px 12px; border-bottom: 1px solid var(--border); }
.recruit-card-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.recruit-card-date { font-size: 12px; color: var(--text-muted); }
.recruit-card-body { padding: 12px 16px; }
.recruit-answer { margin-bottom: 10px; }
.recruit-question { font-size: 11.5px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; }
.recruit-ansr { font-size: 13.5px; color: var(--text-dim); }
.recruit-card-footer { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; gap: 8px; }

/* ── Bot Control ──────────────────────────────────────────────── */
.bot-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.presence-preview {
    display: flex; align-items: center; gap: 8px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
}
.presence-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--success); flex-shrink: 0; }
.presence-dot.idle { background: var(--warning); }
.presence-dot.dnd { background: var(--danger); }
.presence-dot.invisible { background: var(--text-muted); }

/* ── Packs Grid ───────────────────────────────────────────────── */
.packs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.pack-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition-s);
}
.pack-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pack-card-top {
    height: 6px;
    background: var(--pack-color, var(--primary));
}
.pack-card-body { padding: 16px; }
.pack-card-title { font-size: 15px; font-weight: 800; margin-bottom: 6px; }
.pack-card-desc { font-size: 13px; color: var(--text-dim); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 12px; }
.pack-progress { height: 6px; background: var(--surface-3); border-radius: 100px; overflow: hidden; margin-bottom: 8px; }
.pack-progress-bar { height: 100%; background: var(--pack-color, var(--primary)); border-radius: 100px; transition: width 0.5s; }
.pack-progress-text { font-size: 12px; color: var(--text-dim); display: flex; justify-content: space-between; }
.pack-unlocked { font-size: 12px; font-weight: 600; color: var(--success); }

/* ── Modal ────────────────────────────────────────────────────── */
.modal-backdrop {
    position: fixed; inset: 0; z-index: 500;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.modal-backdrop.open { display: flex; animation: backdropIn 0.2s ease both; }
@keyframes backdropIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.3s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(16px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    flex-shrink: 0;
}
.modal-title { font-size: 17px; font-weight: 800; }
.modal-body { padding: 24px; overflow-y: auto; flex: 1; }

.modal-close {
    width: 32px; height: 32px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-dim);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition);
}
.modal-close:hover { background: var(--danger-bg); color: var(--danger); border-color: transparent; }

/* ── Toast ────────────────────────────────────────────────────── */
.toast-container {
    position: fixed; bottom: 24px; right: 24px; z-index: 9999;
    display: flex; flex-direction: column; gap: 10px;
    pointer-events: none;
}
.toast {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 18px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    max-width: 360px;
    pointer-events: all;
    animation: toastIn 0.35s cubic-bezier(0.16,1,0.3,1) both;
    backdrop-filter: blur(12px);
}
@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); max-height: 80px; margin-bottom: 0; }
    to   { opacity: 0; transform: translateX(40px); max-height: 0; margin-bottom: -10px; }
}
.toast.removing { animation: toastOut 0.3s ease forwards; }
.toast-icon { font-size: 18px; flex-shrink: 0; }
.toast-text { font-size: 13.5px; font-weight: 500; color: var(--text); flex: 1; }
.toast.success { border-color: rgba(16,185,129,0.3); }
.toast.error   { border-color: rgba(239,68,68,0.3); }
.toast.warning { border-color: rgba(245,158,11,0.3); }
.toast.info    { border-color: rgba(34,211,238,0.3); }

/* ── Skeleton ─────────────────────────────────────────────────── */
.skeleton {
    height: 48px;
    background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Sanctions Grid ────────────────────────────────────────────── */
.sanctions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ── Empty State ─────────────────────────────────────────────── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    gap: 12px;
    color: var(--text-muted);
}
.empty-state-icon { font-size: 40px; }
.empty-state-text { font-size: 14px; }

/* ── Mobile Overlay ───────────────────────────────────────────── */
.sidebar-overlay {
    display: none;
    position: fixed; inset: 0; z-index: 199;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .profile-layout { grid-template-columns: 300px 1fr; }
    .bot-grid { grid-template-columns: 1fr; }
    .sanctions-grid { grid-template-columns: 1fr; }
    .absences-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    :root { --sidebar-w: 270px; }

    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-toggle { display: flex; }
    .sidebar-overlay.open { display: block; }
    .topbar-menu { display: flex; }
    .main { margin-left: 0; }
    .page-wrapper { padding: 20px 16px 40px; }
    .profile-layout { grid-template-columns: 1fr; }
    .profile-card-main { position: static; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .server-card-mini { display: none; }
}

@media (max-width: 600px) {
    .stats-grid { grid-template-columns: 1fr; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .page-title { font-size: 20px; }
    .topbar { padding: 0 16px; }
    .search-input { width: 140px; }
    .packs-grid { grid-template-columns: 1fr; }
    .staff-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
    .recruit-grid { grid-template-columns: 1fr; }
    .sanctions-grid { grid-template-columns: 1fr; }
}

@media (max-width: 400px) {
    .btn-primary { font-size: 13px; padding: 9px 14px; }
    .modal { border-radius: var(--radius); }
    .toast { max-width: calc(100vw - 32px); }
}

/* ════════════════════════════════════════════════════════════════════
   NOTIFICATION BELL
════════════════════════════════════════════════════════════════════ */
.topbar-search-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    transition: color .2s, background .2s, border-color .2s;
}
.topbar-search-btn:hover { color: var(--text); background: var(--surface-hover); border-color: var(--primary); }

.notif-wrap { position: relative; }
.notif-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    position: relative;
    transition: color .2s, background .2s, border-color .2s;
}
.notif-btn:hover { color: var(--text); background: var(--surface-hover); border-color: var(--primary); }
.notif-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger, #ef4444);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 17px;
    height: 17px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--bg);
    line-height: 1;
}
.notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 300px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 16px 40px rgba(0,0,0,.5);
    z-index: 200;
    display: none;
}
.notif-wrap.open .notif-dropdown { display: block; }
.notif-header {
    padding: 14px 16px 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
}
.notif-list { max-height: 300px; overflow-y: auto; }
.notif-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background .15s;
    text-decoration: none;
    color: inherit;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--surface-hover); }
.notif-item-icon { font-size: 20px; line-height: 1; margin-top: 2px; }
.notif-item-body { flex: 1; }
.notif-item-title { font-size: 13px; font-weight: 600; color: var(--text); }
.notif-item-sub { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

/* ════════════════════════════════════════════════════════════════════
   GLOBAL SEARCH OVERLAY
════════════════════════════════════════════════════════════════════ */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.7);
    backdrop-filter: blur(6px);
    z-index: 500;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 14vh;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}
.search-overlay.open { opacity: 1; pointer-events: all; }
.search-overlay-box {
    width: 100%;
    max-width: 600px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,.7);
    transform: translateY(-20px) scale(.97);
    transition: transform .2s;
}
.search-overlay.open .search-overlay-box { transform: translateY(0) scale(1); }
.search-overlay-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    color: var(--text-dim);
}
.search-overlay-input-wrap input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 16px;
    font-family: inherit;
}
.search-overlay-input-wrap kbd {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 11px;
    color: var(--text-dim);
    font-family: inherit;
}
.search-results { max-height: 380px; overflow-y: auto; }
.search-result-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background .15s;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover, .search-result-item.selected { background: var(--surface-hover); }
.search-result-icon { font-size: 18px; width: 32px; text-align: center; }
.search-result-body { flex: 1; }
.search-result-label { font-size: 14px; font-weight: 600; color: var(--text); }
.search-result-sub { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.search-result-type { font-size: 11px; color: var(--text-muted,var(--text-dim)); background: var(--bg); border-radius: 6px; padding: 2px 8px; }
.search-empty { padding: 32px 20px; text-align: center; color: var(--text-dim); font-size: 14px; }

/* ════════════════════════════════════════════════════════════════════
   ACTIVITY TIMELINE
════════════════════════════════════════════════════════════════════ */
.activity-timeline { display: flex; flex-direction: column; gap: 0; }
.activity-day-group { margin-bottom: 24px; }
.activity-day-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 0 0 10px 48px;
}
.activity-entry {
    display: flex;
    gap: 0;
    align-items: flex-start;
    position: relative;
    padding: 0 0 2px 0;
}
.activity-entry::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 32px;
    bottom: -2px;
    width: 2px;
    background: var(--border);
}
.activity-entry:last-child::before { display: none; }
.activity-dot-wrap {
    width: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 10px;
}
.activity-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--surface);
    box-shadow: 0 0 0 2px var(--primary);
    z-index: 1;
    position: relative;
}
.activity-dot.green  { background: var(--success, #22c55e); box-shadow: 0 0 0 2px var(--success, #22c55e); }
.activity-dot.red    { background: var(--danger,  #ef4444); box-shadow: 0 0 0 2px var(--danger,  #ef4444); }
.activity-dot.yellow { background: var(--warning, #f59e0b); box-shadow: 0 0 0 2px var(--warning, #f59e0b); }
.activity-dot.cyan   { background: var(--accent,  #22d3ee); box-shadow: 0 0 0 2px var(--accent,  #22d3ee); }
.activity-card {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    margin: 6px 0 10px;
}
.activity-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.activity-username { font-size: 13px; font-weight: 700; color: var(--text); }
.activity-action-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    background: var(--bg);
    color: var(--text-dim);
}
.activity-time { margin-left: auto; font-size: 11px; color: var(--text-dim); }
.activity-details { font-size: 13px; color: var(--text-dim); line-height: 1.5; }

/* ════════════════════════════════════════════════════════════════════
   ACCOUNTS PAGE
════════════════════════════════════════════════════════════════════ */
.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--danger, #ef4444);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    margin-left: 5px;
}
.tab-badge:empty { display: none; }
.account-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-xs {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: opacity .15s, transform .1s;
    white-space: nowrap;
}
.btn-xs:hover { opacity: .85; }
.btn-xs:active { transform: scale(.96); }
.btn-xs.approve  { background: rgba(34,197,94,.15);  color: #22c55e; }
.btn-xs.ban      { background: rgba(239,68,68,.15);   color: #ef4444; }
.btn-xs.unban    { background: rgba(34,211,238,.15);  color: var(--accent); }
.btn-xs.promote  { background: rgba(139,92,246,.15);  color: var(--primary); }
.btn-xs.delete   { background: rgba(239,68,68,.08);   color: #ef4444; border: 1px solid rgba(239,68,68,.2); }
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
}
.role-badge.admin  { background: rgba(139,92,246,.18); color: var(--primary); }
.role-badge.mod    { background: rgba(34,211,238,.18); color: var(--accent); }
.role-badge.staff  { background: rgba(255,255,255,.07); color: var(--text-dim); }

/* ════════════════════════════════════════════════════════════════════
   RULES PAGE
════════════════════════════════════════════════════════════════════ */
.rules-content {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-dim);
    white-space: pre-wrap;
    max-width: 820px;
}
.rules-content h1, .rules-content h2, .rules-content h3 {
    color: var(--text);
    margin: 1.2em 0 .5em;
    font-weight: 700;
}
.rules-content h1 { font-size: 22px; color: var(--primary); }
.rules-content h2 { font-size: 18px; }
.rules-content h3 { font-size: 15px; }
.rules-content ul, .rules-content ol { padding-left: 20px; }
.rules-content li { margin-bottom: .3em; }
.rules-content strong { color: var(--text); }
.rules-content code { background: var(--bg); padding: 1px 6px; border-radius: 5px; font-size: 12px; }
.rules-content blockquote {
    border-left: 3px solid var(--primary);
    margin: 12px 0;
    padding: 8px 16px;
    background: rgba(139,92,246,.07);
    border-radius: 0 8px 8px 0;
    color: var(--text);
}
.rules-editor {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 13px;
    min-height: 360px;
    resize: vertical;
}
.rules-editor-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 14px;
}
.btn-secondary {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    font-family: inherit;
}
.btn-secondary:hover { background: var(--surface-hover); border-color: var(--primary); color: var(--text); }

