/* Data Hub Design System v3.0 — Clean Dark */

:root {
    --bg: #0d0d0d;
    --bg-card: #141414;
    --bg-hover: #1a1a1a;
    --border: #2a2a2a;
    --border-accent: #2ecc71;
    --accent: #2ecc71;
    --accent-hover: #27ae60;
    --gold: #f1c40f;
    --text: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #606060;
    --positive: #2ecc71;
    --negative: #f39c12;
    --warning: #f39c12;
    --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    --radius: 8px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    padding: 40px 24px;
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
header {
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

header .page-title {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 4px;
}

header .subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

/* Navigation */
.nav-links {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.nav-links a:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--bg-hover);
}

.nav-links a.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}

.nav-links a.gold {
    color: var(--gold);
    border-color: rgba(241, 196, 15, 0.3);
}

.nav-links a.gold:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--bg);
}

/* Status Overview */
.status-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.status-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: border-color 0.2s;
}

.status-box:hover {
    border-color: var(--border-accent);
}

.status-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 8px;
}

.status-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    font-family: var(--font-mono);
}

.status-value.up { color: var(--positive); }
.status-value.down { color: var(--negative); }

/* Section Headers */
h2 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 40px 0 20px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Data Grid */
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.data-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.data-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.data-card.live {
    border-left: 3px solid var(--positive);
}

.data-card.offline {
    border-left: 3px solid var(--negative);
    opacity: 0.7;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
}

th, td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

th {
    background: var(--bg-hover);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

tr:hover {
    background: var(--bg-hover);
}

tr:last-child td {
    border-bottom: none;
}

td.right, th.right { text-align: right; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:hover {
    background: var(--accent);
    color: var(--bg);
}

.btn-primary {
    background: var(--accent);
    color: var(--bg);
}

.btn-primary:hover {
    background: var(--accent-hover);
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius);
    padding: 28px;
    max-width: 420px;
    width: 90%;
    box-shadow: var(--shadow);
}

.modal h2, .modal h3 {
    color: var(--accent);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.modal input, .modal select {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    transition: border-color 0.2s;
}

.modal input:focus, .modal select:focus {
    outline: none;
    border-color: var(--accent);
}

.modal input::placeholder {
    color: var(--text-muted);
}

/* Footer */
footer {
    margin-top: 60px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
}

/* Utilities */
.positive { color: var(--positive) !important; }
.negative { color: var(--negative) !important; }
.muted { color: var(--text-muted) !important; }

/* Responsive */
@media (max-width: 768px) {
    body { padding: 20px 16px; }
    header h1 { font-size: 22px; }
    .nav-links a { font-size: 12px; padding: 6px 12px; }
    .status-overview { grid-template-columns: repeat(2, 1fr); }
    .data-grid { grid-template-columns: 1fr; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
