/* StarsBanking Admin Panel — minimal v0 stylesheet.
 *
 * Same editorial direction as the support panel — serif headings,
 * monospace IDs, restrained palette — but with a different accent
 * tone (deep emerald) so the two surfaces are visually
 * distinguishable when the agent has both open in adjacent tabs.
 * Real component styles arrive alongside their features. */

:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --ink: #1a1a1a;
  --ink-soft: #5a5a5a;
  --ink-muted: #8a8a8a;
  --rule: #e3e0d8;
  /* Emerald accent — distinct from the support panel's navy. */
  --accent: #0f6f4a;
  --accent-soft: #e3f1ea;
  --warn: #b4632c;
  --warn-soft: #f7eadd;
  --danger: #993333;
  --good: #2e6e3e;
  --mono: 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
  --serif: Charter, 'Iowan Old Style', Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: var(--mono); font-size: 0.92em;
  background: var(--accent-soft); padding: 1px 6px; border-radius: 3px;
}

.muted { color: var(--ink-soft); }

/* Topbar */
.topbar { background: var(--surface); border-bottom: 1px solid var(--rule); }
.topbar-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
}
.brand {
  font-family: var(--serif); font-weight: 600; font-size: 18px;
  color: var(--ink); letter-spacing: 0.01em;
}
.brand-product {
  font-family: var(--mono); font-weight: 500; font-size: 14px;
  color: var(--accent);
  margin-left: 4px;
}
.topbar-nav { display: flex; gap: 18px; align-items: center; }
.who { color: var(--ink-soft); font-size: 13px; }
.logout { font-size: 13px; color: var(--ink-soft); }

/* Layout */
.main { max-width: 1280px; margin: 0 auto; padding: 28px 24px 80px; }

/* Page header */
.page-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 24px;
}
.page-header h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: 28px; margin: 0;
}

/* Auth (login page) */
.auth-body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 50% -120px, var(--accent-soft), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, #efece5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}
.auth-shell {
  width: 100%; max-width: 460px;
  display: flex; flex-direction: column; gap: 16px;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 36px 36px 32px;
  box-shadow: 0 1px 0 rgba(20, 20, 20, 0.02), 0 12px 28px -20px rgba(20, 20, 20, 0.18);
}
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 6px;
  background: var(--accent); color: var(--surface);
  font-family: var(--serif); font-weight: 600;
  font-size: 15px; letter-spacing: 0.04em;
}
.auth-brand-name { display: flex; flex-direction: column; line-height: 1.15; }
.auth-brand-line { font-family: var(--serif); font-weight: 600; font-size: 16px; }
.auth-brand-tag {
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}
.auth-rule { border: none; border-top: 1px solid var(--rule); margin: 18px 0; }
.auth-heading { font-family: var(--serif); font-weight: 500; font-size: 22px; margin: 0 0 8px; }
.auth-lede { font-size: 13px; margin: 0 0 18px; }
.auth-widget { padding: 12px 0; }
.auth-noscript { color: var(--danger); font-size: 13px; }
.auth-footer {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--ink-muted);
  font-family: var(--mono);
  padding: 0 4px;
}

/* Dashboard */
.dashboard p { font-size: 14px; }
.dashboard-nav {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.dashboard-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 80ms, box-shadow 80ms;
}
.dashboard-tile:hover {
  border-color: var(--accent);
  text-decoration: none;
  box-shadow: 0 4px 12px -8px rgba(15, 111, 74, 0.4);
}
.dashboard-tile-soon {
  opacity: 0.55;
  cursor: not-allowed;
  border-style: dashed;
}
.dashboard-tile-soon:hover { border-color: var(--rule); box-shadow: none; }
.dashboard-tile-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
}
.dashboard-tile-sub { font-size: 12px; }
.dashboard-tile-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--warn);
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  vertical-align: 2px;
}
.placeholder-roadmap {
  margin-top: 24px;
  list-style: none;
  padding: 16px 20px;
  border: 1px dashed var(--rule);
  border-radius: 6px;
  background: var(--surface);
  font-size: 13px;
  line-height: 2;
  font-family: var(--mono);
}

/* Search bar */
.search-bar {
  display: flex; gap: 10px; align-items: center;
  margin: 16px 0 22px;
}
.search-input {
  font: inherit; font-size: 14px;
  padding: 9px 13px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  flex: 1; min-width: 0;
}
.search-input:focus { outline: none; border-color: var(--accent); }

/* Buttons */
.btn {
  border: none; cursor: pointer;
  font: 500 14px/1 var(--sans);
  padding: 9px 16px; border-radius: 4px;
  transition: background 0.12s;
  text-decoration: none;
  display: inline-block;
}
.btn-primary { background: var(--accent); color: var(--surface); }
.btn-primary:hover { background: #0a5239; text-decoration: none; }
.btn-secondary {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--rule);
}
.btn-secondary:hover { background: var(--bg); text-decoration: none; }
.btn-danger { background: #b3261e; color: #fff; }
.btn-danger:hover { background: #8c1d17; text-decoration: none; }

/* User search results */
.user-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  font-size: 13px;
}
.user-table th {
  text-align: left; padding: 10px 14px;
  background: var(--bg);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--rule);
}
.user-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.user-row:last-child td { border-bottom: none; }
.user-row:hover td { background: var(--accent-soft); }
.user-link { font-weight: 600; color: var(--ink); }
.user-link:hover { color: var(--accent); }
.user-handle { font-family: var(--mono); font-size: 12px; }
.result-meta { margin-top: 12px; font-size: 12px; }

/* Trust pills + flag badges */
.trust {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.trust-low { background: var(--bg); color: var(--ink-soft); }
.trust-medium { background: var(--accent-soft); color: var(--accent); }
.trust-high { background: var(--accent); color: var(--surface); }
.trust-trusted { background: var(--accent); color: var(--surface); }
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--bg);
  color: var(--ink-soft);
  margin-right: 4px;
}
.badge-danger { background: var(--danger); color: #fff; }
.badge-warn { background: var(--warn); color: #fff; }

/* Page header — used on detail too */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}
.user-detail-name { margin: 0 0 8px; font-family: var(--serif); font-weight: 600; font-size: 28px; }
.user-detail-name .muted { font-family: var(--mono); font-weight: 400; font-size: 16px; margin-left: 8px; }
.user-detail-flags { display: flex; flex-wrap: wrap; gap: 4px; }

/* Detail grid + cards */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.detail-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 18px 20px;
}
.detail-card h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 16px;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
.detail-card.placeholder { opacity: 0.85; }
.kv {
  display: grid;
  grid-template-columns: minmax(120px, max-content) 1fr;
  gap: 6px 14px;
  margin: 0;
  font-size: 13px;
}
.kv dt {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  padding-top: 2px;
}
.kv dd { margin: 0; }
.kv dd.num { font-family: var(--mono); }
.empty { padding: 20px; text-align: center; }

/* Action buttons inside detail cards (mark-checked etc). */
.actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px dashed var(--rule);
}
.action-form { margin: 0; }
.decline-form {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--rule);
  max-width: 480px;
}
.decline-form textarea {
  font: inherit; font-size: 13px;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  resize: vertical;
  min-height: 56px;
}
.decline-form textarea:focus { outline: none; border-color: var(--accent); }
.decline-form .btn { align-self: flex-start; }
.hold-form {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--rule);
  max-width: 480px;
}
.hold-form textarea,
.hold-form input[type="number"] {
  font: inherit; font-size: 13px;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
}
.hold-form textarea { resize: vertical; min-height: 56px; }
.hold-form input[type="number"] { max-width: 120px; }
.hold-form textarea:focus,
.hold-form input[type="number"]:focus { outline: none; border-color: var(--accent); }
.hold-form .btn { align-self: flex-start; }
.field-label {
  font-size: 12px; color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Notes (per-user internal comments) */
.user-notes .note-form {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--rule);
}
.note-form textarea {
  font: inherit; font-size: 13px;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  resize: vertical;
  min-height: 64px;
}
.note-form textarea:focus { outline: none; border-color: var(--accent); }
.note-form-actions {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px;
}
.note-list { list-style: none; padding: 0; margin: 0; }
.note-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}
.note-row:last-child { border-bottom: none; }
.note-meta {
  display: flex; gap: 10px; align-items: baseline;
  margin-bottom: 4px;
  font-size: 12px;
}
.note-author { font-weight: 600; }
.note-time { font-family: var(--mono); }
.note-body {
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-word;
}
.note-empty { font-style: italic; }

/* Compact variant of the data table — used inside .detail-card to
   embed a sub-list (cards on user page) without crowding the layout. */
.user-table.compact th,
.user-table.compact td { padding: 6px 10px; font-size: 12.5px; }

/* Pagination — used by the cards list. */
.pagination {
  display: flex; gap: 16px; align-items: center;
  margin-top: 14px;
  font-size: 13px;
}
.pagination a { font-family: var(--mono); }

/* Filter chips — copied pattern from the support panel for the
   cards list status filter. */
.filter-chips {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  margin: 12px 0 18px;
  font-size: 13px;
}
.chip-group-label {
  color: var(--ink-soft);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.chip {
  display: inline-block;
  padding: 4px 10px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 12.5px;
  text-decoration: none;
  transition: background 80ms, color 80ms, border-color 80ms;
}
.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.chip-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.chip-active:hover { color: #fff; }
