/* ============================================================
   txAdmin Panel - Modern Dark Theme
   ============================================================ */

:root {
    /* Backgrounds */
    --bg-app: #0a0f1a;
    --bg-sidebar: #0d121f;
    --bg-card: #131826;
    --bg-card-hover: #171d2d;
    --bg-elevated: #1a2032;
    --bg-input: #0e1320;

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.05);
    --border-default: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.12);

    /* Text */
    --text-primary: #e8eaf2;
    --text-secondary: #a3a8b8;
    --text-muted: #6b7184;
    --text-faint: #4a5066;

    /* Accent (Indigo / Discord-ish) */
    --accent: #6366f1;
    --accent-hover: #7c7ff5;
    --accent-bg: rgba(99, 102, 241, 0.12);
    --accent-border: rgba(99, 102, 241, 0.35);

    /* Status */
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.12);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.12);
    --info: #06b6d4;
    --info-bg: rgba(6, 182, 212, 0.12);
    --purple: #a855f7;
    --purple-bg: rgba(168, 85, 247, 0.12);
}

/* ---------- Reset & Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    background: var(--bg-app);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    font-size: 14px;
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.12); }

/* ---------- Login background ---------- */
.bg-mesh {
    background:
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.15), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(168, 85, 247, 0.12), transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.06), transparent 60%),
        var(--bg-app);
}

/* ============================================================
   LAYOUT - Sidebar + Main
   ============================================================ */

.layout {
    display: flex;
    min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; bottom: 0;
}

.sb-profile {
    padding: 20px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-subtle);
}
.sb-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
    background: linear-gradient(135deg, #6366f1, #a855f7);
}
.sb-profile-name {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sb-profile-status {
    margin-top: 3px;
    font-size: 11px;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.sb-profile-status::before {
    content: "";
    width: 7px;
    height: 7px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.sb-nav {
    flex: 1;
    overflow-y: auto;
    padding: 18px 12px;
}

.sb-section-title {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-faint);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 14px 10px 8px;
}
.sb-section-title:first-child { padding-top: 0; }

.sb-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 2px;
    transition: background 0.15s ease, color 0.15s ease;
    position: relative;
    cursor: pointer;
}
.sb-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}
.sb-item.active {
    background: var(--accent-bg);
    color: #c7caff;
}
.sb-item.active::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
}
.sb-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.85;
}
.sb-item-badge {
    margin-left: auto;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 99px;
}

.sb-footer {
    padding: 14px 16px;
    border-top: 1px solid var(--border-subtle);
}
.sb-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: transparent;
    color: var(--danger);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1;
}
.sb-logout svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.sb-logout:hover {
    background: var(--danger-bg);
    border-color: var(--danger);
}

/* ---------- Main content ---------- */
.main {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.page {
    flex: 1;
    padding: 28px 32px 80px;
    max-width: 1600px;
    width: 100%;
}

/* ---------- Page header ---------- */
.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.page-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.page-title-icon {
    width: 26px;
    height: 26px;
    color: var(--accent);
}
.page-subtitle {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--text-muted);
}

/* ---------- Status footer ---------- */
.status-bar {
    position: fixed;
    bottom: 0;
    left: 260px;
    right: 0;
    height: 30px;
    background: var(--bg-sidebar);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 20px;
    font-size: 11px;
    color: var(--text-muted);
    z-index: 10;
}
.status-bar .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    margin-right: 6px;
    display: inline-block;
    vertical-align: middle;
}
.status-bar .dot.offline { background: var(--danger); }
.status-bar .dot.warn { background: var(--warning); }

/* ============================================================
   COMPONENTS
   ============================================================ */

/* ---------- Card ---------- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
}
.card-header {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
}
.card-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
.card-header-title svg { width: 16px; height: 16px; color: var(--text-secondary); }
.card-body { padding: 18px; }

/* ---------- Stat card ---------- */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 84px;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.stat-card:hover {
    border-color: var(--border-default);
}
.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-content { min-width: 0; }
.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stat-label {
    margin-top: 4px;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Stat icon colors */
.stat-icon.color-blue   { background: rgba(59, 130, 246, 0.12); color: #60a5fa; }
.stat-icon.color-green  { background: rgba(34, 197, 94, 0.12);  color: #4ade80; }
.stat-icon.color-purple { background: rgba(168, 85, 247, 0.12); color: #c084fc; }
.stat-icon.color-yellow { background: rgba(245, 158, 11, 0.12); color: #fbbf24; }
.stat-icon.color-cyan   { background: rgba(6, 182, 212, 0.12);  color: #22d3ee; }
.stat-icon.color-red    { background: rgba(239, 68, 68, 0.12);  color: #f87171; }
.stat-icon.color-indigo { background: rgba(99, 102, 241, 0.12); color: #a5b4fc; }

/* ---------- Grids ---------- */
.grid { display: grid; gap: 14px; }
.grid-stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
@media (min-width: 1100px) {
    .grid-2 { grid-template-columns: 1fr 1fr; }
}

/* ---------- Badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 99px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid;
}
.badge-success { background: var(--success-bg); color: #6ee7a8; border-color: rgba(34,197,94,0.3); }
.badge-warning { background: var(--warning-bg); color: #fcd34d; border-color: rgba(245,158,11,0.3); }
.badge-danger  { background: var(--danger-bg);  color: #fca5a5; border-color: rgba(239,68,68,0.3); }
.badge-info    { background: var(--info-bg);    color: #67e8f9; border-color: rgba(6,182,212,0.3); }
.badge-purple  { background: var(--purple-bg);  color: #d8b4fe; border-color: rgba(168,85,247,0.3); }
.badge-accent  { background: var(--accent-bg);  color: #a5b4fc; border-color: var(--accent-border); }
.badge-slate   { background: rgba(148,163,184,0.1); color: #cbd5e1; border-color: rgba(148,163,184,0.25); }

.badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* Live indicator */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--success);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.live-badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
    50% { opacity: 0.6; box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}

/* ---------- Tables ---------- */
.tbl-wrap {
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card);
}
.tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.tbl thead {
    background: rgba(255, 255, 255, 0.02);
}
.tbl th {
    text-align: left;
    padding: 12px 16px;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border-subtle);
    white-space: nowrap;
}
.tbl td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
    vertical-align: middle;
}
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr {
    transition: background 0.12s ease;
}
.tbl tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.tbl .muted { color: var(--text-muted); font-size: 12px; }
.tbl .mono { font-family: "JetBrains Mono", "Consolas", monospace; font-size: 12px; color: var(--text-secondary); }

.empty-row td {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 16px !important;
    font-size: 13px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    text-decoration: none;
    line-height: 1;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; }

.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }

.btn-secondary {
    background: var(--bg-elevated);
    border-color: var(--border-default);
}
.btn-secondary:hover:not(:disabled) {
    background: var(--bg-card-hover);
    border-color: var(--border-strong);
}

.btn-success { background: var(--success); color: #052e16; }
.btn-success:hover:not(:disabled) { background: #16a34a; color: #fff; }

.btn-warning { background: var(--warning); color: #1c1408; }
.btn-warning:hover:not(:disabled) { background: #d97706; color: #fff; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #dc2626; }

.btn-ghost-danger {
    background: transparent;
    border-color: rgba(239,68,68,0.3);
    color: #fca5a5;
}
.btn-ghost-danger:hover:not(:disabled) {
    background: var(--danger-bg);
    border-color: var(--danger);
}

.btn-sm { padding: 6px 11px; font-size: 12px; }
.btn-xs { padding: 4px 8px; font-size: 11px; gap: 4px; }
.btn-icon { padding: 8px; }

/* Action buttons (row actions) */
.row-actions { display: inline-flex; gap: 4px; }
.row-actions .btn-xs {
    background: transparent;
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
}
.row-actions .btn-xs:hover { color: #fff; }
.row-actions .btn-xs.kick:hover  { background: var(--warning); border-color: var(--warning); color: #1c1408; }
.row-actions .btn-xs.warn:hover  { background: #ea580c; border-color: #ea580c; }
.row-actions .btn-xs.dm:hover    { background: #2563eb; border-color: #2563eb; }
.row-actions .btn-xs.ban:hover   { background: var(--danger); border-color: var(--danger); }

/* ---------- Forms ---------- */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-default);
    color: var(--text-primary);
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.15s ease, background 0.15s ease;
    outline: none;
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-faint); }
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--accent);
    background: var(--bg-card);
}
.form-textarea { resize: vertical; min-height: 80px; font-family: inherit; }
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23a3a8b8'%3e%3cpath d='M4.5 6l3.5 3.5L11.5 6z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
}
.form-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.form-group { margin-bottom: 14px; }
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}
.form-help {
    margin-top: 5px;
    font-size: 11px;
    color: var(--text-muted);
}
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

/* ---------- Tabs ---------- */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 18px;
    overflow-x: auto;
}
.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent);
}

/* ---------- Event List (Canli olaylar tarzi) ---------- */
.event-list { display: flex; flex-direction: column; }
.event-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-subtle);
}
.event-item:last-child { border-bottom: none; }
.event-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
}
.event-icon svg { width: 14px; height: 14px; }
.event-body { flex: 1; min-width: 0; }
.event-title { font-size: 13px; color: var(--text-primary); }
.event-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ---------- Info List (Bot bilgileri tarzi) ---------- */
.info-list { padding: 4px 0; }
.info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 18px;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 13px;
}
.info-row:last-child { border-bottom: none; }
.info-row-label {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}
.info-row-label svg { width: 14px; height: 14px; opacity: 0.7; }
.info-row-value { color: var(--text-primary); font-weight: 500; }
.info-row-value.mono { font-family: "JetBrains Mono", "Consolas", monospace; font-size: 12px; }

/* ---------- Moderation Command Cards ---------- */
.cmd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}
.cmd-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    color: inherit;
    font: inherit;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 130px;
}
.cmd-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-strong);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.cmd-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.cmd-card-icon svg { width: 20px; height: 20px; }
.cmd-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}
.cmd-card-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    flex: 1;
}
.cmd-card-role {
    position: absolute;
    top: 12px;
    right: 12px;
}

/* Command category icon colors */
.cmd-card-icon.c-yellow { background: rgba(245, 158, 11, 0.12); color: #fbbf24; }
.cmd-card-icon.c-orange { background: rgba(249, 115, 22, 0.12); color: #fb923c; }
.cmd-card-icon.c-blue   { background: rgba(59, 130, 246, 0.12); color: #60a5fa; }
.cmd-card-icon.c-red    { background: rgba(239, 68, 68, 0.12);  color: #f87171; }
.cmd-card-icon.c-green  { background: rgba(34, 197, 94, 0.12);  color: #4ade80; }
.cmd-card-icon.c-purple { background: rgba(168, 85, 247, 0.12); color: #c084fc; }
.cmd-card-icon.c-cyan   { background: rgba(6, 182, 212, 0.12);  color: #22d3ee; }
.cmd-card-icon.c-indigo { background: rgba(99, 102, 241, 0.12); color: #a5b4fc; }
.cmd-card-icon.c-rose   { background: rgba(225, 29, 72, 0.15);  color: #fb7185; }

/* ---------- Quick Action Tile ---------- */
.qa-tile {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--text-secondary);
    text-decoration: none;
}
.qa-tile:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    transform: translateY(-2px);
    border-color: var(--border-default);
}
.qa-tile svg { width: 22px; height: 22px; }
.qa-tile span { font-size: 12px; font-weight: 500; }

/* ---------- Modal ---------- */
.modal-root {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(5, 8, 15, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
    width: 100%;
    max-width: 480px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    overflow: hidden;
}
.modal-head {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}
.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 4px;
}
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: 18px 20px; color: var(--text-primary); }
.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ---------- Toast ---------- */
.toast-host {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    min-width: 280px;
    max-width: 400px;
    padding: 12px 16px;
    border-radius: 10px;
    color: #fff;
    font-size: 13px;
    background: var(--bg-elevated);
    border-left: 3px solid var(--accent);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    transition: opacity 0.3s, transform 0.3s;
}
.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.info    { border-left-color: var(--info); }

/* ---------- Filter Bar ---------- */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    margin-bottom: 14px;
}
.filter-bar .form-input,
.filter-bar .form-select { width: auto; min-width: 160px; flex: 0 1 auto; }
.filter-bar .form-input.grow { flex: 1; min-width: 200px; }

/* ---------- Console (server.html) ---------- */
.console {
    background: #05080f;
    border: 1px solid var(--border-default);
    border-radius: 8px;
    padding: 12px 14px;
    font-family: "JetBrains Mono", "Consolas", monospace;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-secondary);
    max-height: 280px;
    overflow-y: auto;
}
.console-line { white-space: pre-wrap; word-break: break-all; }
.console-line.ok { color: #4ade80; }
.console-line.err { color: #f87171; }

/* ---------- Alert ---------- */
.alert {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid;
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-warning { background: var(--warning-bg); border-color: rgba(245,158,11,0.3); color: #fcd34d; }
.alert-danger  { background: var(--danger-bg);  border-color: rgba(239,68,68,0.3);  color: #fca5a5; }
.alert-info    { background: var(--info-bg);    border-color: rgba(6,182,212,0.3);  color: #67e8f9; }

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.pagination-info { font-size: 12px; color: var(--text-muted); }
.pagination-controls { display: flex; gap: 6px; align-items: center; }
.pagination-controls span { font-size: 12px; color: var(--text-secondary); padding: 0 6px; }

/* ---------- Mobile menu ---------- */
.mobile-topbar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 54px;
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border-subtle);
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 100;
}
.mobile-topbar .brand {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.mobile-topbar button {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
}
.mobile-topbar button svg {
    width: 20px;
    height: 20px;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        z-index: 99;
    }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; padding-top: 54px; }
    .status-bar { left: 0; }
    .mobile-topbar { display: flex; }
    .page { padding: 18px 14px 60px; }
}

/* ---------- Utility ---------- */
.flex { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.text-xs { font-size: 11px; }
.text-sm { font-size: 12.5px; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.font-mono { font-family: "JetBrains Mono", "Consolas", monospace; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }

/* Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-card {
    width: 100%;
    max-width: 420px;
}
.login-header {
    text-align: center;
    margin-bottom: 24px;
}
.login-logo {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    margin: 0 auto 16px;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 24px;
    color: #fff;
    box-shadow: 0 8px 32px rgba(99,102,241,0.3);
}
.login-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #c7d2fe, #f0abfc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.login-subtitle {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--text-muted);
}

.discord-btn {
    width: 100%;
    background: #5865F2;
    color: #fff;
    padding: 12px 16px;
    border-radius: 10px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.discord-btn:hover:not(:disabled) { background: #4752c4; }
.discord-btn:disabled { opacity: 0.7; cursor: not-allowed; }
.discord-btn svg { width: 20px; height: 20px; }
