/* ═══════════════════════════════════════════════════
   VOLL Dashboard — Premium Dark Theme
   ═══════════════════════════════════════════════════ */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(20, 20, 32, 0.85);
    --bg-card-hover: rgba(30, 30, 48, 0.9);
    --bg-input: rgba(15, 15, 25, 0.8);
    --border: rgba(255, 255, 255, 0.06);
    --border-focus: rgba(99, 102, 241, 0.5);
    --text-primary: #e4e4e7;
    --text-secondary: #a1a1aa;
    --text-muted: #52525b;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.25);
    --success: #15803d;
    --error: #ef4444;
    --warning: #f59e0b;
    --sidebar-width: 260px;
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ═══════ LOGIN SCREEN ═══════ */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at top, #1a1a2e 0%, var(--bg-primary) 70%);
}

.login-card {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-logo {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    color: #fff;
    box-shadow: 0 8px 24px var(--accent-glow);
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.input-group input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.input-group input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    border: none;
    border-radius: var(--radius);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-discord {
    background: linear-gradient(135deg, #5865F2, #7289da);
}

.btn-discord:hover {
    box-shadow: 0 8px 24px rgba(88, 101, 242, 0.4);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 11px;
    color: var(--accent);
    font-weight: 500;
}

.login-error {
    color: var(--error);
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
}

/* ═══════ DASHBOARD LAYOUT ═══════ */
.dashboard {
    display: flex;
    min-height: 100vh;
}

/* ═══════ SIDEBAR ═══════ */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 700;
}

.sidebar-badge {
    font-size: 10px;
    background: var(--accent);
    color: #fff;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 10px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-glow);
    color: var(--accent-hover);
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 14px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.btn-logout {
    width: 100%;
    padding: 10px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm);
    color: var(--error);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* ═══════ MAIN CONTENT ═══════ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.top-bar {
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
}

.top-bar h1 {
    font-size: 20px;
    font-weight: 600;
}

.guild-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
}

.guild-selector i {
    color: var(--text-muted);
    font-size: 14px;
}

.guild-selector select {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    min-width: 160px;
}

.guild-selector select option {
    background: var(--bg-secondary);
}

.content-area {
    flex: 1;
    padding: 28px 32px;
    overflow-y: auto;
}

/* ═══════ LOADING ═══════ */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 80px 0;
    color: var(--text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ═══════ CONFIG FORM ═══════ */
.config-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 900px;
}

.config-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    animation: fadeInUp 0.4s ease;
}

.card-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.card-header h3 {
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h3 i {
    color: var(--accent);
}

.card-body {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-group label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.field-group input,
.field-group select,
.field-group textarea {
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.field-group input.readonly-input {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-muted);
    cursor: not-allowed;
    border-style: dashed;
}

.field-group textarea {
    min-height: 80px;
    resize: vertical;
}

.field-group .field-hint {
    font-size: 11px;
    color: var(--text-muted);
}

.field-group .toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
}

.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--text-muted);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.toggle.active {
    background: var(--accent);
}

.toggle::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    top: 3px;
    left: 3px;
    transition: var(--transition);
}

.toggle.active::after {
    left: 23px;
}

.card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-save {
    padding: 9px 20px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.btn-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-reset {
    padding: 9px 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.btn-reset:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

/* ═══════ ARRAY FIELD ═══════ */
.array-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.array-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.array-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--accent-glow);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 6px;
    font-size: 12px;
    color: var(--accent-hover);
}

.array-tag .remove-tag {
    cursor: pointer;
    opacity: 0.7;
    font-size: 10px;
}

.array-tag .remove-tag:hover {
    opacity: 1;
}

.array-add {
    display: flex;
    gap: 6px;
}

.array-add input {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    outline: none;
}

.array-add button {
    padding: 8px 12px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}

/* ═══════ TOAST ═══════ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
    animation: toastIn 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.toast.success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--success);
}

.toast.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--error);
}

.toast.info {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--accent-hover);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ═══════ NAV LABELS ═══════ */
.nav-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 20px 14px 8px;
}

/* ═══════ STATS GRID ═══════ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    border-color: var(--border-focus);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--accent-glow);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-icon.joined {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.stat-icon.left {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.stat-icon.staff {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.stat-info .stat-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-info h3 {
    font-size: 24px;
    font-weight: 700;
}

/* ═══════ DASHBOARD GRID ═══════ */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}

.card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
}

.chart-container {
    padding: 16px;
    height: 320px;
    /* Slightly increased for better visibility */
    display: flex;
    flex-direction: column;
}

#growthChart {
    flex: 1;
    min-height: 0;
}

.recent-activity {
    height: 320px;
    /* Matches chart height */
    overflow-y: hidden;
}

.activity-list {
    flex: 1;
    overflow-y: auto;
}

.activity-item {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.activity-user {
    font-weight: 600;
    color: var(--text-primary);
}

.activity-time {
    color: var(--text-muted);
    font-size: 11px;
}

.activity-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ═══════ MONITORING UI ═══════ */
.table-controls {
    padding: 16px 20px;
    margin-bottom: 20px;
    flex-direction: row !important;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.search-box input:focus {
    border-color: var(--border-focus);
}

.filters {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 8px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent-glow);
    color: var(--accent-hover);
    border-color: var(--accent);
}

.table-container {
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th {
    text-align: left;
    padding: 12px 16px;
    /* Match td padding */
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    vertical-align: middle;
    line-height: 36px;
    /* Optimized for 36px buttons */
}

/* Align actions to the left to match header baseline */
th:last-child,
td:last-child {
    white-space: nowrap;
    text-align: left;
    /* Consistently left-aligned */
    width: auto;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.01);
    color: var(--text-primary);
}

.badge {
    display: inline-block;
    padding: 0 10px;
    height: 24px;
    line-height: 24px;
    vertical-align: middle;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.warn {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge.timeout {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent);
}

.badge.jail {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.badge.ban {
    background: #331111;
    color: var(--error);
}

.badge.success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

/* ═══════ PAGINATION ═══════ */
.pagination {
    padding: 16px 20px;
    display: flex;
    justify-content: center;
    gap: 8px;
    border-top: 1px solid var(--border);
}

.page-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 13px;
}

.page-btn:hover:not(:disabled) {
    background: var(--accent-glow);
    border-color: var(--accent);
    color: var(--text-primary);
}

.page-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ─── Action Buttons ──────────────────────────────── */
.actions-cell {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
    /* Aligned with header text */
    vertical-align: middle;
}

.btn-action {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 15px;
    /* Clear icons */
}

.btn-action:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-action.success:hover {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.4);
}

.btn-action.danger:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.4);
}

.btn-action.warning:hover {
    background: rgba(234, 179, 8, 0.2);
    color: #fbbf24;
    border-color: rgba(234, 179, 8, 0.4);
}

.btn-action.info:hover {
    background: rgba(14, 165, 233, 0.2);
    color: #38bdf8;
    border-color: rgba(14, 165, 233, 0.4);
}

.btn-action i {
    pointer-events: none;
}

/* Color Input Wrapper */
.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    transition: var(--transition);
}

.color-input-wrapper:focus-within {
    border-color: var(--border-focus);
    box-shadow: var(--shadow-sm);
}

.color-preview-box {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.color-preview-box input[type="color"] {
    width: 150%;
    height: 150%;
    margin: -25%;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
}

.color-input-wrapper input[type="text"] {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 14px;
    width: 100%;
}

.color-input-wrapper input[type="text"]:focus {
    outline: none;
}

/* ─── Modals ───────────────────────────────────────── */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
    padding: 0;
}

.modal-close:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

.modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-body .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-body label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.modal-body input,
.modal-body select,
.modal-body textarea {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.modal-body input:focus {
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

/* ══════ System Section ══════ */
.system-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-top: 10px;
}

.system-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px !important;
}

.system-card p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 4px;
}

.system-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
}

.system-actions .btn-action {
    flex: 1;
    min-width: 140px;
    width: auto;
    height: auto;
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-action.success {
    background: linear-gradient(135deg, #15803d, #166534);
    box-shadow: 0 4px 12px rgba(22, 101, 52, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-action.primary {
    background: linear-gradient(135deg, var(--accent), #4f46e5);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    filter: brightness(1.1);
}

.btn-action i {
    font-size: 16px;
}

/* ══════ Responsive ══════ */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
    }

    .content-area {
        padding: 20px 16px;
    }

    .table-controls {
        flex-direction: column !important;
        align-items: stretch;
    }

    .search-box {
        max-width: none;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .system-actions {
        flex-direction: column;
    }

    .system-actions .btn-action {
        width: 100%;
        flex: none;
    }
}

@media (max-width: 600px) {
    .form-input-group {
        flex-direction: column;
    }
}

/* ══════ Console / Terminal Styles ══════ */
.console-container {
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    background: #0d0d0d;
    border: 1px solid #333;
}

.console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #1a1a1a;
    border-bottom: 1px solid #333;
    font-size: 11px;
    font-weight: bold;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.console-window {
    height: 300px;
    padding: 12px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.5;
    color: #e0e0e0;
    white-space: pre-wrap;
    background: #0d0d0d;
}

.console-line {
    margin-bottom: 4px;
    border-left: 2px solid transparent;
    padding-left: 8px;
    word-break: break-all;
}

.console-window::-webkit-scrollbar {
    width: 6px;
}

.console-window::-webkit-scrollbar-track {
    background: transparent;
}

.console-window::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

.btn-clear-console {
    background: transparent;
    border: 1px solid #444;
    color: #888;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-clear-console:hover {
    background: #444;
    color: #fff;
}

.text-error { color: var(--error); }

.terminal-input-group {
    display: flex;
    gap: 12px;
}

.terminal-input {
    flex: 1;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 10px 14px;
    color: #00ff00;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    outline: none;
    transition: var(--transition);
}

.terminal-input:focus {
    border-color: var(--accent);
    background: #222;
}

/* ═══════ SPAM MANAGEMENT ═══════ */
.spam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.compact-table {
    width: 100%;
    border-collapse: collapse;
}

.compact-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.compact-table tr:last-child td {
    border-bottom: none;
}

.compact-table .id-cell {
    color: var(--text-muted);
    font-family: monospace;
    font-size: 11px;
}

.compact-table .status-cell {
    width: 40px;
    text-align: center;
}

.compact-table .action-cell {
    width: 40px;
    text-align: right;
}

/* ═══════ UI UPDATES ═══════ */
.modal-footer.centered {
    justify-content: center;
    gap: 20px;
}

.btn-cancel {
    padding: 9px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}