/* ==========================================================
   Admin Dashboard styles — Shri Shyam Ji Mandir, Manauna Dham
   Builds on assets/style.css (colors, fonts already defined there)
   ========================================================== */

body { background: #FAF6EA; }

.admin-header { padding: 16px 16px 24px; }
.admin-header .logo-badge { width: 64px; height: 64px; margin-bottom: 6px; }

/* ---------------- NAV BAR ---------------- */

.admin-nav {
  background: var(--royal-blue);
  position: relative;
  z-index: 3;
}

.admin-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.admin-nav-inner a {
  color: #DCE3F5;
  text-decoration: none;
  font-family: var(--font-hindi);
  font-size: 13.5px;
  padding: 12px 16px;
  border-bottom: 3px solid transparent;
  transition: background .15s, color .15s;
}

.admin-nav-inner a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.admin-nav-inner a.active { color: #fff; border-bottom-color: var(--saffron); background: rgba(255,255,255,0.06); }
.admin-nav-inner a.logout-link { margin-left: auto; }

/* ---------------- LAYOUT ---------------- */

.admin-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px 50px;
}

.dashboard-section {
  background: #fff;
  border: 1px solid #EEE0C0;
  border-radius: 14px;
  padding: 18px 18px 20px;
  margin-top: 18px;
  box-shadow: 0 4px 16px rgba(90,50,10,0.05);
}

.section-title {
  font-family: var(--font-display);
  color: var(--royal-blue);
  font-size: 18px;
  margin: 0 0 14px;
}

.section-title .en {
  display: block;
  font-family: var(--font-en);
  font-size: 11px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 1px;
}

/* ---------------- STAT CARDS ---------------- */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.stat-card {
  background: #fff;
  border: 1px solid #EEE0C0;
  border-radius: 12px;
  padding: 16px 10px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(90,50,10,0.06);
}

.stat-card .num {
  font-family: var(--font-en);
  font-size: 26px;
  font-weight: 700;
  color: var(--temple-red);
  line-height: 1.1;
}

.stat-card .label {
  font-size: 11.5px;
  color: var(--ink-soft);
  margin-top: 6px;
  line-height: 1.4;
}

.stat-card.accent-blue .num { color: var(--royal-blue); }
.stat-card.accent-green .num { color: var(--success); }

/* ---------------- INDIA MAP ---------------- */

.map-wrap {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.map-svg-box {
  flex: 1 1 340px;
  max-width: 420px;
  position: relative;
}

.map-svg-box svg { width: 100%; height: auto; display: block; }

.map-svg-box path.state-path {
  fill: #EDE0C0;
  stroke: #fff;
  stroke-width: 0.6;
  cursor: pointer;
  transition: fill .15s, opacity .15s;
}

.map-svg-box path.state-path:hover { opacity: 0.85; stroke: var(--ink); stroke-width: 1; }

.map-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  transform: translate(-50%, -115%);
  opacity: 0;
  transition: opacity .1s;
  z-index: 5;
}

.map-tooltip.visible { opacity: 1; }

.map-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 10px;
}

.map-legend .swatch { width: 16px; height: 12px; border-radius: 2px; display: inline-block; }

.state-list {
  flex: 1 1 260px;
  min-width: 220px;
  max-height: 460px;
  overflow-y: auto;
  padding-right: 4px;
}

.state-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  border-bottom: 1px solid #F3EAD0;
  font-size: 12.5px;
}

.state-row .st-name { flex: 0 0 130px; color: var(--ink); }
.state-row .st-bar-track { flex: 1; background: #F3EAD0; border-radius: 6px; height: 8px; overflow: hidden; }
.state-row .st-bar-fill { height: 100%; background: linear-gradient(90deg, var(--saffron), var(--temple-red)); border-radius: 6px; }
.state-row .st-count { flex: 0 0 30px; text-align: right; font-family: var(--font-en); font-weight: 600; color: var(--royal-blue); }

.map-note {
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 12px;
  line-height: 1.6;
}

/* ---------------- CHART ---------------- */

.chart-box { position: relative; height: 260px; }

/* ---------------- TABLES ---------------- */

.table-scroll { overflow-x: auto; }

table.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 640px;
}

table.admin-table th {
  background: var(--gold-light);
  color: var(--royal-blue);
  text-align: left;
  padding: 9px 10px;
  font-weight: 600;
  white-space: nowrap;
}

table.admin-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #F3EAD0;
  color: var(--ink);
  white-space: nowrap;
}

table.admin-table tr:hover td { background: #FFFBF0; }

/* ---------------- SEARCH / FILTER ---------------- */

.filter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filter-row input, .filter-row select {
  padding: 9px 12px;
  border: 1.5px solid #E6D6AE;
  border-radius: 8px;
  font-size: 13.5px;
  font-family: var(--font-hindi);
  background: #FFFEFB;
}

.filter-row button {
  padding: 9px 18px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--saffron), var(--temple-red));
  color: #fff;
  font-size: 13.5px;
  cursor: pointer;
}

/* ---------------- PAGINATION ---------------- */

.pagination {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.pagination a, .pagination span {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  text-decoration: none;
  border: 1px solid #E6D6AE;
  color: var(--royal-blue);
}

.pagination a:hover { background: var(--gold-light); }
.pagination .current { background: var(--temple-red); color: #fff; border-color: var(--temple-red); }

/* ---------------- LOGIN CARD ---------------- */

.login-card { max-width: 420px; margin: -14px auto 0; }

/* ---------------- RESPONSIVE ---------------- */

@media (max-width: 640px) {
  .admin-nav-inner a.logout-link { margin-left: 0; }
  .map-wrap { flex-direction: column; }
  .map-svg-box { max-width: 100%; }
}
