/* Contractual Account (CA1) - the console's tokens and classes (moonglade-web static/style.css at tag
   collections-c1-2026-11-14: :root, .page-header, .section, table.data, .chip-*), trimmed for a small app. */
:root {
  --moon-dark: #1a3a52; --moon-darker: #142e42; --moon-gold: #c9a961; --moon-teal: #2c5f7c;
  --moon-cream: #f5f1e8; --moon-cream-soft: #faf8f2; --moon-bg: #f5f1e8; --moon-surface: #ffffff;
  --moon-divider: #d8d2c4; --moon-text: #0d1f2d; --moon-text-soft: #4a4438; --moon-grey: #8a8170;
  --moon-green: #2d6a4f; --moon-amber: #b08442; --moon-red: #8b2e2e;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --shadow-card: 0 2px 16px rgba(26,58,82,0.06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --moon-bg: #10161c; --moon-cream: #1a232c; --moon-cream-soft: #161e26; --moon-surface: #18212a;
    --moon-divider: #2c3a46; --moon-text: #e9e4d8; --moon-text-soft: #c9c2b2; --moon-grey: #a39a88;
    --moon-dark: #e2c98d; --moon-green: #6fbf95; --moon-amber: #d9ad6a; --moon-red: #e08a8a;
    --shadow-card: none;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--moon-bg); color: var(--moon-text); font-family: var(--sans);
  font-size: 14px; line-height: 1.45; }
a { color: var(--moon-teal); }
@media (prefers-color-scheme: dark) { a { color: #8cc3e0; } }

/* top bar */
.topbar { background: #1a3a52; color: #fff; display: flex; align-items: center; gap: 22px; padding: 0 24px;
  min-height: 56px; border-bottom: 3px solid var(--moon-gold); flex-wrap: wrap; }
.topbar img { height: 26px; display: block; }
.topbar .app { font-family: var(--serif); font-size: 20px; color: #f5f1e8; white-space: nowrap; }
.topbar nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.topbar nav a { color: #e8e1cf; text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: 13px; }
.topbar nav a.on, .topbar nav a:hover { background: rgba(201,169,97,0.22); color: #fff; }
.topbar .who { font-size: 12px; color: #d8d2c4; display: flex; gap: 10px; align-items: center; }
.topbar .who form { margin: 0; }
.topbar .who button { background: transparent; border: 1px solid rgba(255,255,255,0.35); color: #fff; padding: 4px 10px;
  border-radius: 8px; cursor: pointer; font-size: 12px; }
main { max-width: 1280px; margin: 0 auto; padding: 0 24px 60px; }

.page-header { display: flex; justify-content: space-between; align-items: end; padding-top: 30px; margin-bottom: 24px;
  padding-bottom: 14px; border-bottom: 1px solid var(--moon-divider); position: relative; gap: 16px; flex-wrap: wrap; }
.page-header::after { content: ""; position: absolute; bottom: -1px; left: 0; width: 48px; height: 2px;
  background: var(--moon-gold); }
.page-header h2 { font-family: var(--serif); font-weight: 500; font-size: 34px; line-height: 1.05;
  color: var(--moon-dark); margin: 0; }
.page-header .breadcrumb { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--moon-grey);
  font-weight: 600; margin-bottom: 6px; display: block; }
.page-header .meta { font-size: 12px; color: var(--moon-grey); text-align: right; }

.section { background: var(--moon-surface); border: 1px solid var(--moon-divider); border-radius: 16px;
  padding: 22px 24px; margin-bottom: 20px; box-shadow: var(--shadow-card); overflow-x: auto; }
.section h3 { font-weight: 600; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--moon-dark); margin: 0 0 16px; display: flex; align-items: center; gap: 12px; }
.section h3::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--moon-gold); }
.section p.hint, .hint { color: var(--moon-grey); font-size: 12.5px; margin: 0 0 12px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: var(--moon-surface); border: 1px solid var(--moon-divider); border-radius: 14px; padding: 14px 18px; }
.kpi .lbl { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--moon-amber); font-weight: 600; }
.kpi .val { font-family: var(--serif); font-size: 26px; color: var(--moon-dark); margin-top: 4px; }

.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-bottom: 20px; }
.detail-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 13px;
  border-bottom: 1px dashed var(--moon-divider); }
.detail-row:last-child { border-bottom: none; }
.detail-row .label { color: var(--moon-grey); }
.detail-row .value { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

table.data { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
table.data thead th { font-weight: 600; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--moon-dark); background: var(--moon-cream); padding: 10px 12px; text-align: left;
  border-bottom: 1px solid var(--moon-divider); white-space: nowrap; }
table.data tbody td { padding: 9px 12px; border-bottom: 1px solid var(--moon-divider); vertical-align: middle; }
table.data tbody tr:hover td { background: rgba(201,169,97,0.06); }
table.data td.num, table.data th.num { text-align: right; }
table.data td form { margin: 0; }
table.data tfoot td { padding: 9px 12px; font-weight: 600; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 10px;
  font-weight: 600; letter-spacing: 0.10em; text-transform: uppercase; white-space: nowrap; }
.chip::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.chip-green { color: var(--moon-green); background: rgba(45,106,79,0.12); }
.chip-amber { color: var(--moon-amber); background: rgba(176,132,66,0.14); }
.chip-red { color: var(--moon-red); background: rgba(139,46,46,0.12); }
.chip-grey { color: var(--moon-grey); background: rgba(138,129,112,0.14); }
.chip-blue { color: var(--moon-teal); background: rgba(44,95,124,0.12); }
.chip-gold { color: #8a6f2a; background: rgba(201,169,97,0.18); }

.flash { padding: 12px 16px; border-radius: 12px; margin: 18px 0 0; font-size: 13.5px; }
.flash.ok { background: rgba(45,106,79,0.12); color: var(--moon-green); border: 1px solid rgba(45,106,79,0.3); }
.flash.err { background: rgba(139,46,46,0.10); color: var(--moon-red); border: 1px solid rgba(139,46,46,0.3); }

form.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 16px; align-items: end; }
form.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--moon-text-soft); font-weight: 600; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
input, select, textarea { font: inherit; font-size: 13.5px; padding: 8px 10px; border: 1px solid var(--moon-divider);
  border-radius: 9px; background: var(--moon-surface); color: var(--moon-text); min-width: 0; }
textarea { min-height: 90px; width: 100%; }
button, .btn { font: inherit; font-size: 13px; font-weight: 600; padding: 8px 16px; border-radius: 9px; cursor: pointer;
  border: 1px solid #1a3a52; background: #1a3a52; color: #fff; text-decoration: none; display: inline-block; }
button.ghost, .btn.ghost { background: transparent; color: var(--moon-dark); border-color: var(--moon-divider); }
button.danger { background: #8b2e2e; border-color: #8b2e2e; }
.muted { color: var(--moon-grey); }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }
.right { text-align: right; }
.ok-text { color: var(--moon-green); font-weight: 600; }
.bad-text { color: var(--moon-red); font-weight: 600; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--moon-divider); text-decoration: none;
  color: var(--moon-text-soft); font-size: 12.5px; }
.tabs a.on { background: #1a3a52; color: #fff; border-color: #1a3a52; }
details summary { cursor: pointer; color: var(--moon-teal); font-weight: 600; font-size: 12.5px; }
.temp-pw { font-family: ui-monospace, Menlo, monospace; font-size: 22px; letter-spacing: 0.08em; padding: 14px 18px;
  background: var(--moon-cream); border-radius: 12px; display: inline-block; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-card { background: var(--moon-surface); border: 1px solid var(--moon-divider); border-radius: 18px; padding: 34px;
  width: 100%; max-width: 380px; box-shadow: var(--shadow-card); }
.login-card h1 { font-family: var(--serif); font-weight: 500; color: var(--moon-dark); margin: 6px 0 4px; font-size: 30px; }
.login-card form { display: grid; gap: 14px; margin-top: 18px; }

@media (max-width: 640px) {
  main { padding: 0 16px 40px; }
  .topbar { padding: 8px 16px; gap: 10px; }
  .page-header h2 { font-size: 26px; }
  .section { padding: 16px; }
}
.mt { margin-top: 12px; }
