/* ============================================================
   Admin Panel (#page-admin) — TaxCalendarSaleUSA
   Usa las mismas variables de color/tipografía definidas en
   :root dentro del <style> principal de index.html.
   ============================================================ */

/* ── Layout de la página ── */
.admin-page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 32px 64px;
}

.admin-page-title {
  font-size: 26px;
  font-weight: normal;
  color: var(--cream);
  margin-bottom: 6px;
}

.admin-page-sub {
  font-family: sans-serif;
  font-size: 13px;
  color: rgba(242, 238, 228, 0.65);
  margin-bottom: 28px;
}

/* ── Tarjetas de estadísticas ── */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.admin-stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 16px 18px;
}

.admin-stat-label {
  font-family: sans-serif;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate);
  margin-bottom: 8px;
}

.admin-stat-value {
  font-family: sans-serif;
  font-size: 24px;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 6px;
}

.admin-stat-value.green   { color: var(--green2); }
.admin-stat-value.blue    { color: var(--blue2); }
.admin-stat-value.diamond { color: var(--diamond2); }

.admin-stat-sub {
  font-family: sans-serif;
  font-size: 10px;
  color: var(--slate);
}

/* ── Secciones (gráfica / tablas) ── */
.admin-section {
  background: var(--ink2);
  border: 1px solid var(--border);
  padding: 22px 24px;
  margin-bottom: 20px;
}

.admin-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: sans-serif;
  font-size: 13px;
  color: var(--cream);
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.admin-refresh-btn,
.admin-export-btn {
  font-family: sans-serif;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}

.admin-refresh-btn {
  color: var(--gold);
  border-color: rgba(201, 150, 58, 0.35);
}
.admin-refresh-btn:hover {
  background: rgba(201, 150, 58, 0.1);
}

.admin-export-btn {
  color: var(--green2);
  border-color: rgba(27, 84, 37, 0.4);
}
.admin-export-btn:hover {
  background: rgba(27, 84, 37, 0.15);
}

/* ── Gráfica de ingresos (barras) ── */
.mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 80px;
}

/* ── Tablas ── */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-family: sans-serif;
  font-size: 11px;
}

.admin-table th {
  text-align: left;
  font-weight: normal;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--slate);
  padding: 7px 8px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.admin-table td {
  padding: 8px;
  color: var(--cream2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.admin-table .admin-empty {
  text-align: center;
  color: var(--slate);
  font-style: italic;
  padding: 18px 8px;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .admin-page { padding: 28px 16px 48px; }
  .admin-section { padding: 16px; }
}
