/* ═══════════════════════════════════════════════════════════════════════
   Admin · Calculadoras — editorial-luxe (matches main panel)
   ═══════════════════════════════════════════════════════════════════════ */

/* Tighter page container for admin (denser than the public calc page). */
.page { max-width: 1100px; padding-top: 36px; padding-bottom: 80px; }
.page-hero { margin-bottom: 32px; padding: 18px 12px 4px; }
.page-title { font-size: 32px; }

.admin-status {
  margin: 0 0 24px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
}
.admin-status--success {
  background: #ECFCF5;
  color: #057857;
  border: 1px solid #B7EBD8;
}
.admin-status--error {
  background: #FFEEF0;
  color: #B23A48;
  border: 1px solid #F5C8CE;
}

/* ── Section card ──────────────────────────────────────────────────── */
.admin-section {
  margin-bottom: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px 26px 22px;
  box-shadow: 0 1px 2px rgba(17, 20, 26, 0.05);
}
.admin-section-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 4px;
  line-height: 1.2;
}
.admin-section-blurb {
  font-size: 13px;
  color: var(--text-soft);
  margin: 0 0 18px;
  line-height: 1.5;
}

/* ── Table head + body shared ──────────────────────────────────────── */
.admin-table {
  display: flex;
  flex-direction: column;
}
.admin-table-head {
  display: grid;
  gap: 12px;
  padding: 0 10px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 6px;
}
.admin-table-body {
  display: flex;
  flex-direction: column;
}
.admin-num { text-align: right; }

/* Generic row — specific grid per section overrides this */
.admin-row {
  display: grid;
  gap: 12px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.12s;
}
.admin-row:last-child { border-bottom: none; }
.admin-row:hover { background: var(--bg-inset); }
.admin-row--dirty {
  background: var(--accent-blue-tint);
  border-color: var(--accent-blue);
}
.admin-row--dirty:hover { background: var(--accent-blue-tint); }

/* Per-section column widths */
#admin-config-table     .admin-table-head,
#admin-config-table     .admin-row { grid-template-columns: 220px 140px 1fr 100px; }
#admin-milheiro         .admin-table-head,
#admin-milheiro         .admin-row { grid-template-columns: 1fr 110px 1fr 100px; }
#admin-transfer         .admin-table-head,
#admin-transfer         .admin-row { grid-template-columns: 130px 1fr 90px 90px 100px; }
#admin-cards            .admin-table-head,
#admin-cards            .admin-row { grid-template-columns: 140px 1fr 110px 90px 80px 110px 60px 100px; }

@media (max-width: 900px) {
  #admin-config-table .admin-table-head,
  #admin-milheiro .admin-table-head,
  #admin-transfer .admin-table-head,
  #admin-cards .admin-table-head { display: none; }
  .admin-row {
    grid-template-columns: 1fr !important;
    padding: 12px 10px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    margin-bottom: 6px;
  }
}

/* ── Inputs (consistent with main calc field styling) ──────────────── */
.admin-input,
.admin-select {
  font-family: var(--font);
  font-size: 14px;
  padding: 8px 10px;
  border: 1px solid var(--border-input);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text);
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.admin-num .admin-input {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-weight: 600;
}
.admin-input:focus, .admin-select:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(42, 92, 232, 0.12);
}
.admin-input[readonly] {
  background: var(--bg-inset);
  color: var(--text-muted);
  cursor: default;
}

/* ── Actions cell ──────────────────────────────────────────────────── */
.admin-row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  align-items: center;
}
.admin-save, .admin-delete {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.12s, opacity 0.12s, color 0.12s;
}
.admin-save {
  background: var(--accent-blue);
  color: #fff;
  opacity: 0.25;
  pointer-events: none;
}
.admin-row--dirty .admin-save {
  opacity: 1;
  pointer-events: auto;
}
.admin-save:hover { background: var(--accent-blue-dark); }
.admin-delete {
  background: transparent;
  color: var(--text-faint);
  padding: 6px 8px;
  font-size: 16px;
  line-height: 1;
}
.admin-delete:hover { color: #B23A48; background: #FFEEF0; }

/* ── Add-new button ────────────────────────────────────────────────── */
.admin-add-btn {
  align-self: flex-start;
  margin-top: 14px;
  background: transparent;
  color: var(--accent-blue);
  border: 1px dashed var(--accent-blue);
  border-radius: 8px;
  padding: 8px 14px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, border-style 0.12s;
}
.admin-add-btn:hover { background: var(--accent-blue-tint); border-style: solid; }

/* ── Active toggle (cards) ─────────────────────────────────────────── */
.admin-active-toggle {
  width: 36px; height: 20px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  padding: 0;
}
.admin-active-toggle::before {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  background: var(--text-faint);
  border-radius: 999px;
  transition: transform 0.15s, background 0.15s;
}
.admin-active-toggle--on {
  background: var(--accent-blue-tint);
  border-color: var(--accent-blue);
}
.admin-active-toggle--on::before {
  transform: translateX(16px);
  background: var(--accent-blue);
}

/* ── Footer ───────────────────────────────────────────────────────── */
.admin-footer {
  margin: 32px 0 0;
  padding: 16px 0;
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
  border-top: 1px solid var(--border-soft);
}
.admin-footer code {
  background: var(--bg-inset);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 11px;
}

/* ═════════════════════════════════════════════════════════════════════
   Not-admin stage — auth-* classes
   ═════════════════════════════════════════════════════════════════════
   #stage-not-admin uses the same .auth-* surface as membros (login pages
   etc.) but the styles are NOT in shared. Scoped copy lives here so the
   warning page renders correctly when a logged-in non-admin lands on
   /admin. Same look as membros: centered card on cream surface.
   ───────────────────────────────────────────────────────────────── */
.auth-screen {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 64px 20px;
  background-color: var(--bg-page);
}
.auth-stage {
  width: 100%;
  max-width: 440px;
  display: flex; flex-direction: column;
  align-items: stretch;
  gap: 24px;
}
.auth-mark { text-align: center; }
.auth-mark-overline {
  font-family: var(--font);
  font-size: 11px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 10px;
}
.auth-mark-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
  font-optical-sizing: auto;
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 32px 28px;
  box-shadow: 0 2px 6px rgba(17, 20, 26, 0.04);
}
.auth-card p {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0 0 14px;
}
.auth-card p:last-child { margin-bottom: 0; }
.auth-link {
  color: var(--accent-blue);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-link:hover {
  color: var(--accent-blue-dark);
}
@media (max-width: 480px) {
  .auth-screen { padding: 40px 16px; }
  .auth-stage { gap: 20px; }
  .auth-card { padding: 28px 24px 24px; border-radius: 14px; }
  .auth-mark-title { font-size: 30px; }
}
