/* =============================================
   ADMIN PAGE
   ============================================= */

body.admin-page {
    background: #e8e9eb;
    background-image: radial-gradient(rgba(30,58,96,0.07) 1px, transparent 1px);
    background-size: 22px 22px;
    color: #333;
    overflow-x: hidden;
}

body.admin-page main.container {
    padding-top: calc(54px + 2rem);
    padding-bottom: 3rem;
}

/* ── HEADER ROW ──────────────────────────────── */
.admin-header-row {
    margin-bottom: 1.2rem;
}
.admin-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(0,0,0,0.5);
    margin: 0;
}

/* ── CARD ────────────────────────────────────── */
.admin-card {
    background: #f0f1f3;
    padding: 0;
    overflow: hidden;
}

/* ── TABLE ───────────────────────────────────── */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}
.admin-table thead tr {
    background: #fff;
    border-bottom: 2px solid rgba(30,58,96,0.15);
}
.admin-table th {
    padding: 0.7rem 1rem;
    text-align: left;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(0,0,0,0.4);
}
.admin-table td {
    padding: 0.65rem 1rem;
    color: #333;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover td { background: rgba(30,58,96,0.04); }

.admin-empty {
    padding: 2rem;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(0,0,0,0.35);
    letter-spacing: 0.04em;
}

/* ── FOOTER ──────────────────────────────────── */
body.admin-page footer {
    background: #0f1e30 !important;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 1.8rem 0 !important;
    margin-top: 3rem;
}
body.admin-page footer p {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.28) !important;
    letter-spacing: 0.04em;
    opacity: 1 !important;
}

/* ── TABS ──────────────────────────────────────── */
.admin-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid rgba(30,58,96,0.12);
}
.admin-tab {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.55rem 1.2rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(0,0,0,0.38);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}
.admin-tab:hover { color: rgba(30,58,96,0.75); }
.admin-tab.active { color: #1e3a60; border-bottom-color: #1e3a60; }

/* ── STATS GRID ─────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}
.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    text-align: center;
}
.stat-icon  { font-size: 1.3rem; margin-bottom: 0.45rem; }
.stat-value { font-size: 2rem; font-weight: 700; color: #1e3a60; line-height: 1; margin-bottom: 0.3rem; }
.stat-label { font-size: 0.63rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(0,0,0,0.38); }
.loading-card { display: flex; align-items: center; justify-content: center; padding: 2.2rem; min-height: 110px; }

/* ── CHARTS ─────────────────────────────────────── */
.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.chart-card { padding: 1.2rem 1.2rem 0.8rem; }
.chart-title {
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(0,0,0,0.38);
    margin: 0 0 0.8rem;
}

/* ── TOP IMAGES TABLE ────────────────────────────── */
#top-images { margin-bottom: 1rem; }

/* ── GA CONFIG CARD ─────────────────────────────── */
.ga-config-card { margin-bottom: 0; }
.ga-config-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1.4rem;
    gap: 1.5rem;
}
.ga-config-label {
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(0,0,0,0.38);
    margin: 0 0 0.25rem;
}
.ga-config-id {
    font-size: 1rem;
    font-weight: 600;
    color: #1e3a60;
    font-family: monospace;
    margin: 0 0 0.25rem;
}
.ga-not-set  { color: rgba(0,0,0,0.28); font-family: inherit; font-weight: 400; font-size: 0.85rem; }
.ga-config-hint { font-size: 0.73rem; color: rgba(0,0,0,0.42); margin: 0; }
.ga-config-hint code {
    background: rgba(0,0,0,0.07);
    padding: 0.1em 0.3em;
    border-radius: 3px;
    font-size: 0.9em;
}
.btn-ga {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #1e3a60;
    color: #fff;
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s;
}
.btn-ga:hover { background: #2a4e80; }

/* ── SPINNER (inherit from styles.css) ───────── */
body.admin-page .loading {
    text-align: center;
    padding: 2.5rem;
}
body.admin-page .loading p {
    font-size: 0.78rem;
    color: rgba(0,0,0,0.35);
    margin-top: 0.6rem;
    letter-spacing: 0.04em;
}
