/* ============================================================
   ROADROLLS ADMIN — dashboard shell, reuses tokens from styles.css
   ============================================================ */

.admin-login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-2);
}

.admin-login-card {
  width: min(380px, 92vw);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(28px, 5vw, 40px);
  box-shadow: 0 24px 60px rgba(16,22,42,0.10);
}

.admin-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink); margin-bottom: 20px;
}
.admin-brand .logo-badge { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.admin-brand .logo-badge img { width: 100%; height: 100%; object-fit: cover; }
.admin-brand .word { font-family: var(--font-mono); font-weight: 700; }

.admin-login-card .eyebrow { display: block; margin-bottom: 6px; }
.admin-login-card h1 { margin-bottom: 20px; }

.admin-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; font-size: 0.86rem; color: var(--ink-2); }
.admin-field span { font-weight: 600; }
.admin-field input, .admin-field select, .admin-field textarea {
  font-family: var(--font-sans); font-size: 0.95rem; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 10px 12px; background: var(--paper); outline: none;
}
.admin-field input:focus, .admin-field select:focus, .admin-field textarea:focus { border-color: var(--accent); }
.admin-field.checkbox { flex-direction: row; align-items: center; gap: 8px; }
.admin-field.checkbox input { width: auto; }

.admin-note { min-height: 1.2em; font-size: 0.85rem; margin: 0 0 12px; color: var(--ink-3); }
.admin-note.err { color: #c0392b; }
.admin-note.ok { color: #1e8a4c; }

/* ── dashboard shell ── */
.admin-shell { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 232px; flex-shrink: 0; background: var(--ink); color: var(--paper);
  display: flex; flex-direction: column; padding: 20px 14px;
  position: sticky; top: 0; height: 100vh;
}
.admin-sidebar .admin-brand { color: var(--paper); padding: 0 8px; margin-bottom: 24px; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.admin-nav button {
  all: unset; cursor: pointer; padding: 10px 12px; border-radius: var(--r-sm);
  font-family: var(--font-sans); font-size: 0.92rem; color: rgba(242,245,253,0.72);
  display: flex; align-items: center; gap: 10px;
}
.admin-nav button:hover { background: rgba(242,245,253,0.06); color: var(--paper); }
.admin-nav button.active { background: var(--accent); color: #fff; }
.admin-nav .group-label {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: rgba(242,245,253,0.4); margin: 14px 12px 4px;
}
.admin-logout { all: unset; cursor: pointer; padding: 10px 12px; color: rgba(242,245,253,0.6); font-size: 0.88rem; }
.admin-logout:hover { color: #fff; }

.admin-main { flex: 1; padding: clamp(20px, 3vw, 40px); max-width: 100%; overflow-x: auto; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.admin-header h1 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.admin-header .who { font-size: 0.85rem; color: var(--ink-3); }

/* ── stat tiles ── */
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 28px; }
.admin-stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 20px; }
.admin-stat .num { font-family: var(--font-display); font-size: 2rem; font-weight: var(--wt-display); }
.admin-stat .lbl { font-size: 0.8rem; color: var(--ink-3); }

/* ── tables ── */
.admin-table-wrap { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
table.admin-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.admin-table th, table.admin-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
table.admin-table th { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); background: var(--paper-2); }
table.admin-table tbody tr:hover { background: var(--paper-2); }
table.admin-table td.wrap-cell { white-space: normal; max-width: 240px; }

.admin-empty { padding: 40px; text-align: center; color: var(--ink-3); }

.admin-badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 0.72rem; font-weight: 600; }
.admin-badge.pending, .admin-badge.unpaid { background: #fdf1d6; color: #92650c; }
.admin-badge.confirmed, .admin-badge.paid, .admin-badge.approved { background: #dff3e6; color: #1e8a4c; }
.admin-badge.cancelled, .admin-badge.rejected { background: #fbe2e0; color: #c0392b; }

.admin-row-actions { display: flex; gap: 8px; }
.admin-btn-sm {
  all: unset; cursor: pointer; font-size: 0.78rem; font-weight: 600; padding: 5px 10px;
  border-radius: var(--r-sm); border: 1px solid var(--line);
}
.admin-btn-sm:hover { border-color: var(--accent); color: var(--accent-deep); }
.admin-btn-sm.danger:hover { border-color: #c0392b; color: #c0392b; }

.admin-toolbar { display: flex; justify-content: flex-end; margin-bottom: 14px; }

/* ── modal (reuses .rr-modal look) ── */
.admin-modal-backdrop {
  position: fixed; inset: 0; background: rgba(16,22,42,0.5); z-index: 999;
}
.admin-modal-panel {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: var(--white); border-radius: var(--r-lg); z-index: 1000;
  width: min(560px, 92vw); max-height: 86vh; overflow-y: auto;
  padding: clamp(24px, 4vw, 34px);
}
.admin-modal-panel h2 { margin-bottom: 18px; }
.admin-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.admin-form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

@media (max-width: 760px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; }
  .admin-form-row { grid-template-columns: 1fr; }
}
