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

:root {
    --bg: #0a0a0a;
    --surface: #111111;
    --surface-2: #1a1a1a;
    --surface-3: #222222;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --primary: #00ffff;
    --primary-dim: rgba(0, 255, 255, 0.15);
    --green: #47ad80;
    --green-dim: rgba(71, 173, 128, 0.15);
    --red: #ff4444;
    --red-dim: rgba(255, 68, 68, 0.15);
    --gold: #ffc000;
    --gold-dim: rgba(255, 192, 0, 0.15);
    --cyan: #00ffff;
    --radius: 12px;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    background-image:
        radial-gradient(ellipse at 15% 50%, rgba(0, 255, 255, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 20%, rgba(255, 192, 0, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 85%, rgba(71, 173, 128, 0.03) 0%, transparent 50%);
    color: var(--text);
    min-height: 100vh;
}

.navbar {
    background: var(--surface);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--surface-2);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.nav-brand { display: flex; align-items: center; gap: 0.75rem; }
.nav-brand h1 { font-size: 1.25rem; font-weight: 700; }
.logo { font-size: 1.5rem; }
.nav-links { display: flex; gap: 0.5rem; align-items: center; }
.nav-links a { color: var(--text-muted); text-decoration: none; padding: 0.5rem 1rem; border-radius: 8px; transition: all 0.2s; font-size: 0.9rem; }
.nav-links a:hover, .nav-links a.active { background: var(--primary); color: #000; }

.admin-badge {
    background: linear-gradient(135deg, #00ffff, #47ad80);
    color: #000;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
}

.container { max-width: 1200px; margin: 0 auto; padding: 2rem; }

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

.stat-card {
    background: var(--surface);
    border: 1px solid var(--surface-2);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s;
}

.stat-card:hover { transform: translateY(-2px); border-color: var(--primary); }

.stat-icon { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.stat-icon.blue { background: var(--primary-dim); }
.stat-icon.purple { background: rgba(139, 92, 246, 0.2); }
.stat-icon.green { background: var(--green-dim); }
.stat-icon.orange { background: var(--gold-dim); }

.stat-info h3 { font-size: 1.5rem; font-weight: 700; }
.stat-info p { color: var(--text-muted); font-size: 0.85rem; }

.card {
    background: var(--surface);
    border: 1px solid var(--surface-2);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--surface-2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 { font-size: 1.1rem; font-weight: 600; }
.card-body { padding: 1.5rem; }

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

.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; padding: 0.75rem 1rem; color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--surface-2); }
.table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--surface-2); font-size: 0.9rem; }
.table tbody tr:hover { background: var(--surface-2); }

.badge { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.75rem; font-weight: 600; color: white; }

.status-bars { display: flex; flex-direction: column; gap: 1.25rem; }
.status-bar { display: flex; flex-direction: column; gap: 0.5rem; }
.status-label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.green { background: var(--green); }
.dot.red { background: var(--red); }
.dot.orange { background: var(--gold); }
.status-value { font-size: 1.5rem; font-weight: 700; }
.progress-bar { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
.progress-fill.green { background: var(--green); }
.progress-fill.red { background: var(--red); }
.progress-fill.orange { background: var(--gold); }

.btn { display: inline-block; padding: 0.6rem 1.25rem; border-radius: 8px; border: none; cursor: pointer; font-size: 0.9rem; font-weight: 600; text-decoration: none; transition: all 0.2s; }
.btn-primary { background: var(--primary); color: #000; }
.btn-primary:hover { background: #00e5e5; }
.btn-success { background: var(--green); color: white; }
.btn-success:hover { background: #3a9470; }
.btn-danger { background: var(--red); color: white; }
.btn-danger:hover { background: #e03030; }
.btn-warning { background: var(--gold); color: #000; }
.btn-warning:hover { background: #e6ac00; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
.btn-outline { background: transparent; border: 1px solid var(--surface-3); color: var(--text); }
.btn-outline:hover { background: var(--surface-2); }

.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-size: 0.9rem; color: var(--text-muted); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--surface-3);
    background: var(--bg);
    color: var(--text);
    font-size: 0.9rem;
    transition: border 0.2s;
}
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--primary); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }

.alert { padding: 1rem 1.5rem; border-radius: var(--radius); margin-bottom: 1.5rem; font-size: 0.9rem; }
.alert-success { background: var(--green-dim); border: 1px solid var(--green); color: var(--green); }
.alert-error { background: var(--red-dim); border: 1px solid var(--red); color: var(--red); }
.alert-info { background: var(--primary-dim); border: 1px solid var(--primary); color: var(--primary); }

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.8); display: none; align-items: center; justify-content: center; z-index: 1000; }
.modal-overlay.active { display: flex; }
.modal { background: var(--surface); border: 1px solid var(--surface-2); border-radius: var(--radius); padding: 2rem; width: 90%; max-width: 500px; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.modal-header h2 { font-size: 1.25rem; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; padding: 0.25rem; }
.modal-close:hover { color: var(--text); }

.upload-area { border: 2px dashed var(--surface-3); border-radius: var(--radius); padding: 2rem; text-align: center; transition: all 0.2s; cursor: pointer; }
.upload-area:hover { border-color: var(--primary); background: var(--primary-dim); }
.upload-area input[type="file"] { display: none; }

.client-link { color: var(--primary); text-decoration: none; transition: color 0.2s; }
.client-link:hover { text-decoration: underline; }

.mini-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; margin-bottom: 1.5rem; }
.mini-card { background: var(--surface); border: 1px solid var(--surface-2); border-radius: 10px; padding: 1rem; text-align: center; }
.mini-card .value { font-size: 1.5rem; font-weight: 700; }
.mini-card .label { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }

.tabs { display: flex; gap: 0.25rem; margin-bottom: 1.5rem; background: var(--surface); padding: 0.3rem; border-radius: 10px; overflow-x: auto; }
.tab { padding: 0.75rem 1.5rem; border-radius: 8px; border: none; background: transparent; color: var(--text-muted); cursor: pointer; font-size: 0.9rem; font-weight: 600; transition: all 0.2s; white-space: nowrap; }
.tab:hover { color: var(--text); background: var(--surface-2); }
.tab.active { background: var(--primary); color: #000; }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s ease; }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 1.5rem; margin-bottom: 1.5rem; }

@media (max-width: 768px) {
    .navbar { flex-direction: column; gap: 1rem; padding: 1rem; }
    .nav-links { flex-wrap: wrap; justify-content: center; }
    .container { padding: 1rem; }
    .grid-2 { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .table { font-size: 0.8rem; }
    .table th, .table td { padding: 0.5rem; }
    .modal { padding: 1.5rem; width: 95%; }
    .chart-grid { grid-template-columns: 1fr; }
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.stat-card, .card { animation: fadeIn 0.3s ease; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
