/* LiteMetrics dashboard styles */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background: #f8f9fa;
    color: #1a1a2e;
}

nav {
    background: #1a1a2e;
    color: #fff;
    padding: 0.75rem 1.5rem;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

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

.nav-link {
    font-size: 0.9rem !important;
    font-weight: 400 !important;
    opacity: 0.8;
}

.nav-link:hover { opacity: 1; }

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* Login */
.login-container {
    max-width: 380px;
    margin: 4rem auto;
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-align: center;
}

.login-container h1 {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
}

.login-subtitle {
    color: #6b7280;
    margin: 0 0 1.5rem;
}

.form-group {
    text-align: left;
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #374151;
}

.form-group input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
}

.form-group input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.btn:hover { background: #f3f4f6; }

.btn-primary {
    background: #4f46e5;
    color: #fff;
    border-color: #4f46e5;
}

.btn-primary:hover { background: #4338ca; }

.btn-block { width: 100%; }

.btn-date.active {
    background: #4f46e5;
    color: #fff;
    border-color: #4f46e5;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Dashboard Controls */
.dashboard-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.site-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-selector label {
    font-weight: 500;
    font-size: 0.875rem;
    color: #6b7280;
}

.site-selector select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    background: #fff;
}

.date-picker {
    display: flex;
    gap: 0.25rem;
}

/* Cards */
.card {
    background: #fff;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.card h3 {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    color: #6b7280;
    font-weight: 600;
}

/* Metrics */
.metrics-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metric-card { text-align: center; }

.metric-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a2e;
}

/* Chart */
.chart-card { margin-bottom: 1.5rem; }

/* Tables Grid */
.tables-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

thead th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-bottom: 2px solid #e5e7eb;
    font-weight: 600;
    color: #6b7280;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

tbody td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}

.cell-path {
    font-family: monospace;
    font-size: 0.85rem;
}

.empty-state {
    text-align: center;
    color: #9ca3af;
    padding: 1.5rem;
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .metrics-cards { grid-template-columns: 1fr; }
    .tables-grid { grid-template-columns: 1fr; }
    .dashboard-controls { flex-direction: column; align-items: flex-start; }
    .metric-value { font-size: 1.5rem; }
}
