/* Reset & base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f1f5f9;
    color: #1e293b;
    font-size: 15px;
}

/* Login */
body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #0f172a;
}

.login-box {
    background: #1e293b;
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.login-icon { width: 18px; height: 18px; margin-bottom: 1rem; border-radius: 3px; }
.login-box h1 { color: #f8fafc; font-size: 2rem; margin-bottom: 0.25rem; }
.login-box .tagline { color: #94a3b8; margin-bottom: 1.5rem; }
.login-box input {
    display: block; width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    border: 1px solid #334155;
    background: #0f172a;
    color: #f8fafc;
    font-size: 1rem;
}
.login-box button {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    border: none;
    background: #2563eb;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.25rem;
}
.login-box button:hover { background: #1d4ed8; }
.login-box .error {
    background: #7f1d1d;
    color: #fecaca;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Header */
header {
    background: #0f172a;
    color: white;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}
header h1 { font-size: 1.3rem; }
.nav-logo { width: 10%; height: auto; border-radius: 7px; display: block; }
header nav { display: flex; align-items: center; gap: 1rem; color: #94a3b8; font-size: 0.9rem; }
header nav a { color: #60a5fa; text-decoration: none; }
header nav a:hover { color: white; }

/* Main */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* Summary cards */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.card-value { font-size: 2rem; font-weight: 700; color: #2563eb; }
.card-label { font-size: 0.8rem; color: #64748b; margin-top: 0.25rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* Charts */
.charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.chart-box {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.chart-box h2 { font-size: 0.95rem; color: #475569; margin-bottom: 1rem; }

/* Table */
.table-section { background: white; border-radius: 12px; padding: 1.25rem; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.table-section h2 { font-size: 1rem; margin-bottom: 1rem; color: #475569; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
thead th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    border-bottom: 2px solid #e2e8f0;
    color: #64748b;
    font-weight: 600;
    white-space: nowrap;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
tbody td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    white-space: nowrap;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #f8fafc; }
.notes-cell { white-space: normal; max-width: 200px; color: #64748b; font-size: 0.85rem; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #94a3b8;
    font-size: 1.1rem;
}
