﻿:root {
    --bg: #0b0f19;
    --card-bg: #111827;
    --border: #1f2937;
    --border-glow: rgba(99, 102, 241, 0.25);
    --primary: #6366f1;
    --accent: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --text-dim: #6b7280;
    --radius-lg: 12px;
    --radius-md: 8px;
    --radius-sm: 6px;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text-main);
}

.header-hero {
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
}

.brand-icon {
    font-size: 26px;
    background: rgba(99, 102, 241, 0.1);
    padding: 6px 10px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.brand-title {
    font-size: 16px;
    font-weight: 800;
}

.brand-sub {
    font-size: 11px;
    color: var(--text-dim);
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-item {
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

    .nav-item:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.05);
    }

    .nav-item.active {
        color: #fff;
        background: var(--primary);
    }

.user-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.main-container {
    max-width: 1400px;
    margin: 24px auto;
    padding: 0 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    font-size: 24px;
    background: rgba(255, 255, 255, 0.04);
    padding: 10px;
    border-radius: var(--radius-sm);
}

.stat-val {
    font-size: 22px;
    font-weight: 800;
}

.stat-label {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 2px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
}

    .search-box input {
        background: transparent;
        border: none;
        outline: none;
        color: #fff;
        font-size: 13px;
        margin-left: 8px;
        width: 240px;
    }

.table-wrap {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

    .table th, .table td {
        padding: 12px;
        text-align: left;
        border-bottom: 1px solid var(--border);
    }

    .table th {
        color: var(--text-dim);
        font-size: 12px;
        text-transform: uppercase;
        font-weight: 700;
    }

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
}

.badge--online {
    background: #065f46;
    color: #34d399;
}

.badge--offline {
    background: #7f1d1d;
    color: #f87171;
}

.badge--admin {
    background: #4338ca;
    color: #a5b4fc;
}

.badge--info {
    background: #1e293b;
    color: #94a3b8;
    border: 1px solid var(--border);
}

.badge--warn {
    background: #78350f;
    color: #fbbf24;
}

.badge--error {
    background: #7f1d1d;
    color: #fca5a5;
}

.badge--applied {
    background: #065f46;
    color: #34d399;
}

.badge--queued {
    background: #78350f;
    color: #fbbf24;
}

.badge--delivered {
    background: #1e3a8a;
    color: #60a5fa;
}

.badge--failed {
    background: #7f1d1d;
    color: #f87171;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

    .status-dot.online {
        background: #10b981;
        box-shadow: 0 0 8px #10b981;
    }

    .status-dot.offline {
        background: #6b7280;
    }

.btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-secondary {
    background: #1f2937;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn--ghost {
    background: transparent;
    border: 1px solid var(--border);
}

.input {
    background: #0f172a;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: #fff;
    padding: 8px 12px;
    font-size: 13px;
    width: 100%;
    box-sizing: border-box;
}

code {
    font-family: monospace;
    color: #a5b4fc;
    font-size: 12px;
}

pre {
    background: #0f172a;
    padding: 10px;
    border-radius: 6px;
    font-size: 12px;
    overflow-x: auto;
    color: #cbd5e1;
}

details {
    margin-top: 4px;
    border: 1px dashed var(--border);
    border-radius: 6px;
    padding: 6px;
}

summary {
    cursor: pointer;
    font-size: 12px;
}

.muted {
    color: var(--text-dim);
}
