/* Shared styling for the admin analytics dashboards. */

.analytics-page {
    padding: 1.25rem 1rem 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.analytics-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.analytics-header h1 {
    font-size: 1.6rem;
    margin: 0;
    font-weight: 700;
}

.analytics-subtitle {
    color: #6c757d;
    font-size: .9rem;
    margin-top: .25rem;
}

.analytics-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    align-items: flex-end;
    background: #f8f9fb;
    border: 1px solid #eceef3;
    border-radius: 12px;
    padding: .85rem 1rem;
    margin-bottom: 1.5rem;
}

.analytics-toolbar .control label {
    display: block;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6c757d;
    margin-bottom: .15rem;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.kpi-card {
    background: #fff;
    border: 1px solid #eceef3;
    border-radius: 14px;
    padding: 1rem 1.1rem;
    box-shadow: 0 2px 6px rgba(16, 24, 40, .04);
}

.kpi-card .kpi-label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: .35rem;
}

.kpi-card .kpi-value {
    font-size: 1.7rem;
    font-weight: 700;
    margin-top: .3rem;
    line-height: 1.1;
}

.kpi-card .kpi-sub {
    font-size: .78rem;
    color: #8a94a6;
    margin-top: .2rem;
}

.kpi-accent-green { color: #18794e; }
.kpi-accent-blue { color: #1f6feb; }
.kpi-accent-amber { color: #b45309; }
.kpi-accent-red { color: #b42318; }
.kpi-accent-purple { color: #7c3aed; }

.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.chart-card {
    background: #fff;
    border: 1px solid #eceef3;
    border-radius: 14px;
    padding: 1rem 1.1rem 1.25rem;
    box-shadow: 0 2px 6px rgba(16, 24, 40, .04);
}

.chart-card.full { grid-column: 1 / -1; }

.chart-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 .15rem;
}

.chart-card .chart-hint {
    font-size: .78rem;
    color: #8a94a6;
    margin-bottom: .75rem;
}

.chart-canvas-wrap {
    position: relative;
    width: 100%;
    height: 320px;
}

.chart-canvas-wrap.tall { height: 420px; }
.chart-canvas-wrap.short { height: 240px; }

.nav-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.nav-card {
    display: block;
    background: #fff;
    border: 1px solid #eceef3;
    border-radius: 14px;
    padding: 1.1rem;
    text-decoration: none;
    color: inherit;
    transition: transform .15s ease, box-shadow .15s ease;
}

.nav-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(16, 24, 40, .08);
    color: inherit;
}

.nav-card .nav-card-icon {
    font-size: 1.5rem;
    color: #1f6feb;
}

.nav-card h4 {
    font-size: 1.02rem;
    font-weight: 600;
    margin: .5rem 0 .3rem;
}

.nav-card p {
    font-size: .82rem;
    color: #6c757d;
    margin: 0;
}

.analytics-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
}

.analytics-table th,
.analytics-table td {
    padding: .5rem .6rem;
    border-bottom: 1px solid #f0f2f6;
    text-align: left;
}

.analytics-table th {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6c757d;
}

.analytics-table td.num,
.analytics-table th.num { text-align: right; }

.analytics-back {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .85rem;
    text-decoration: none;
    color: #1f6feb;
    margin-bottom: .5rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #8a94a6;
}

.empty-state i { font-size: 2.5rem; }
