:root {
    /* Geist Inspired Minimal Palette */
    --background: #000;
    --foreground: #fff;
    --accents-1: #111;
    --accents-2: #333;
    --accents-3: #444;
    --accents-4: #666;
    --accents-5: #888;
    --accents-6: #999;
    --accents-7: #eaeaea;
    --accents-8: #fafafa;

    --success: #0070f3;
    --success-light: #3291ff;
    --error: #ee0000;
    --error-light: #ff1a1a;
    --warning: #f5a623;
    --warning-light: #f7b955;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    --font-mono: 'Menlo', 'Monaco', 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace;

    --radius: 5px;
    --header-height: 64px;
    --sidebar-width: 240px;
}

* {
    box-sizing: border-box;
}

body {
    background: var(--background);
    color: var(--foreground);
    font-family: var(--font-sans);
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 14px;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 600;
    margin: 0;
    color: var(--foreground);
}

h1 {
    font-size: 2rem;
    letter-spacing: -0.05rem;
}

h2 {
    font-size: 1.5rem;
    letter-spacing: -0.02rem;
}

h3 {
    font-size: 1rem;
}

a {
    color: var(--accents-5);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--foreground);
}

/* Header */
header {
    height: var(--header-height);
    border-bottom: 1px solid var(--accents-2);
    display: flex;
    align-items: center;
    padding: 0 24px;
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: saturate(180%) blur(5px);
    z-index: 1000;
}

header h1 {
    font-size: 1.25rem;
    font-weight: 700;
}

header nav {
    margin-left: 24px;
    display: flex;
    gap: 16px;
}

header nav a {
    font-size: 0.875rem;
}

header nav a.active {
    color: var(--foreground);
}

/* Layout */
main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 48px 24px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Cards */
.card,
.panel,
.stat-card {
    background: var(--background);
    border: 1px solid var(--accents-2);
    border-radius: var(--radius);
    padding: 24px;
    transition: border-color 0.2s ease;
}

.card:hover,
.panel:hover,
.stat-card:hover {
    border-color: var(--accents-4);
}

.stat-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.stat-header h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--accents-5);
    letter-spacing: 1px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.stat-trend {
    font-size: 0.75rem;
    margin-top: 8px;
    color: var(--accents-5);
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-trend.up {
    color: var(--success);
}

.stat-trend.down {
    color: var(--error);
}

/* Panels */
.dashboard-main {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

.panel-header {
    margin-bottom: 20px;
}

.panel-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Activity Feed */
.activity-feed {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--accents-2);
    font-size: 0.875rem;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item .time {
    color: var(--accents-4);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    display: block;
    margin-bottom: 4px;
}

/* Badges */
.badge {
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.live {
    background: rgba(0, 112, 243, 0.1);
    color: var(--success);
    border: 1px solid rgba(0, 112, 243, 0.2);
}

/* System Metrics */
.metrics-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.metric-card {
    padding: 12px;
    border: 1px solid var(--accents-2);
    border-radius: var(--radius);
}

.metric-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.metric-label {
    color: var(--accents-5);
}

.metric-value {
    font-weight: 500;
    font-family: var(--font-mono);
}

.progress-bar-bg {
    height: 4px;
    background: var(--accents-2);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--foreground);
    transition: width 0.3s ease;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    height: 32px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--accents-2);
    background: var(--background);
    color: var(--foreground);
}

.btn:hover:not(:disabled) {
    border-color: var(--foreground);
}

.btn-primary {
    background: var(--foreground);
    color: var(--background);
    border: 1px solid var(--foreground);
}

.btn-primary:hover:not(:disabled) {
    background: var(--background);
    color: var(--foreground);
}

.btn-danger {
    color: var(--error);
    border-color: var(--error);
}

.btn-danger:hover:not(:disabled) {
    background: var(--error);
    color: white;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Control Panel */
.control-panel {
    grid-column: 1 / -1;
    margin-top: 24px;
}

.action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Footer */
footer {
    padding: 48px 24px;
    border-top: 1px solid var(--accents-2);
    color: var(--accents-5);
    font-size: 0.8rem;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    background: var(--accents-4);
    margin-right: 8px;
}

.status-indicator.online {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-main {
        grid-template-columns: 1fr;
    }
}