:root {
    --bg-primary: #0a0b0e;
    --bg-secondary: #1a1d29;
    --bg-tertiary: #2a2d3a;
    --purple: #6366f1;
    --orange: #f59e0b;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: rgba(255, 255, 255, 0.1);
    --logo-color: #00d4ff;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0a0b0e 0%, #1a1d29 100%);
    color: var(--text-primary);
    min-height: 100vh;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(26, 29, 41, 0.9);
    position: sticky;
    top: 0;
}

.brand {
    color: var(--logo-color);
    font-weight: 700;
    text-decoration: none;
    margin-right: 0.75rem;
}

.page-title {
    color: var(--text-secondary);
    font-weight: 600;
}

.header-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

#refreshBtn {
    background: var(--purple);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 0.85rem;
    cursor: pointer;
}

.admin-main {
    padding: 1.5rem 2rem 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.status-message {
    color: var(--text-secondary);
}

.status-message.error {
    color: #fca5a5;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.1rem 1.2rem;
}

.stat-card h3 {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-value {
    margin: 0.4rem 0 0;
    font-size: 2rem;
    font-weight: 700;
}

.stat-hint {
    margin: 0.25rem 0 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.table-section {
    margin-bottom: 2rem;
}

.table-section h2 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.section-note {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: -0.4rem;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th, td {
    text-align: left;
    padding: 0.7rem 0.85rem;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
}

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

.empty {
    color: var(--text-muted);
    padding: 1rem;
}
