/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1a1a2e;
    --primary-light: #16213e;
    --accent: #0f3460;
    --accent-light: #533483;
    --success: #00ff88;
    --warning: #ffaa00;
    --error: #ff4444;
    --text: #eaeaea;
    --text-muted: #888;
    --border: rgba(255,255,255,0.1);
    --card-bg: rgba(255,255,255,0.03);
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--primary);
    background-image: 
        radial-gradient(ellipse at top, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

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

/* Header */
.header {
    margin-bottom: 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 2rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-production {
    background: rgba(0, 255, 136, 0.1);
    color: var(--success);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.update-time {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* System Metrics */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.metric {
    padding: 16px;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.metric-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.metric-value-large {
    font-size: 2rem;
}

.metric-sub {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.metric-bar {
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
}

.metric-bar-fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.stat {
    text-align: center;
    padding: 20px;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.stat-revenue .stat-value {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Tools List */
.tools-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.tool-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.tool-item:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.2);
}

.tool-name {
    font-size: 0.875rem;
    font-weight: 500;
}

.tool-status {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
}

.tool-status.active {
    background: rgba(0, 255, 136, 0.15);
    color: var(--success);
}

.tool-status.inactive {
    background: rgba(136, 136, 136, 0.15);
    color: var(--text-muted);
}

.loading {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
}

/* Actions Grid */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.action-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.action-text {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer a {
    color: var(--accent-light);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Status Colors */
.status-good {
    color: var(--success);
}

.status-warning {
    color: var(--warning);
}

.status-error {
    color: var(--error);
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .logo h1 {
        font-size: 1.25rem;
    }
    
    .metrics-grid,
    .stats-grid,
    .tools-list,
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .metric-value,
    .stat-value {
        font-size: 1.5rem;
    }
}
