/* Chartkr owner console — the navy uniform. Deliberately NOT the customers'
   pastel paper: with both worlds open, you always know which building you're
   standing in. */
:root {
  --navy: #14213b; --navy-2: #1d2c4f; --panel: #16203c; --line: #2b3a63;
  --ink: #e8ecf6; --mut: #93a0c0; --teal: #5cc0b8; --teal-ink: #0c2320;
  --good: #7fe0a8; --bad: #ff9b9b; --warn: #ffd98a;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--navy); color: var(--ink);
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
#app { min-height: 100vh; display: flex; flex-direction: column; }

.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 18px;
  background: var(--navy-2); border-bottom: 1px solid var(--line); }
.brand { font-family: Georgia, serif; font-weight: 700; font-size: 17px; color: #fff; }
.brand small { display: block; font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--teal); font-weight: 400; font-family: Consolas, monospace; }
.topbar .who { margin-left: auto; color: var(--mut); font-size: 12.5px; }

.shell { display: flex; flex: 1; min-height: 0; }
.side { width: 200px; flex: none; background: var(--navy-2); border-right: 1px solid var(--line); padding: 12px 0; }
.side button { display: block; width: 100%; text-align: left; background: none; border: 0;
  color: var(--mut); font: inherit; padding: 9px 18px; cursor: pointer; }
.side button:hover { color: #fff; }
.side button.on { background: #233158; color: #fff; border-left: 3px solid var(--teal); padding-left: 15px; }
.main { flex: 1; padding: 20px 24px; overflow: auto; }

h1 { font-family: Georgia, serif; font-size: 20px; font-weight: 600; color: #fff; margin: 0 0 4px; }
.sub { color: var(--mut); font-size: 13px; margin: 0 0 16px; }

.stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; min-width: 120px; }
.stat b { display: block; font-size: 18px; color: #fff; font-variant-numeric: tabular-nums; }
.stat span { font-size: 11px; color: var(--mut); }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--mut); border-bottom: 1px solid var(--line); padding: 7px 10px;
  font-family: Consolas, monospace; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; }
td { border-bottom: 1px solid #202d52; padding: 8px 10px; vertical-align: top; }
tr.rowlink { cursor: pointer; }
tr.rowlink:hover td { background: #1a2544; }

.chip { font-family: Consolas, monospace; font-size: 10.5px; font-weight: 700; border-radius: 6px; padding: 2px 7px; white-space: nowrap; }
.chip.active, .chip.trialing { color: var(--good); background: #12301f; }
.chip.trial-chip { color: var(--warn); background: #39290e; }
.chip.internal { color: #9fb2dd; background: #1a2440; }
.chip.demo { color: var(--bad); background: #3a1717; }
.chip.grace { color: var(--warn); background: #39290e; }
.chip.suspended, .chip.passed { color: var(--bad); background: #3a1717; }
.chip.lead, .chip.talked { color: var(--warn); background: #39290e; }
.chip.customer { color: var(--good); background: #12301f; }

.btn { display: inline-block; font-size: 12.5px; font-weight: 600; color: #dfe6ff; background: #233158;
  border: 1px solid #334270; border-radius: 8px; padding: 6px 12px; cursor: pointer; margin: 2px 6px 2px 0; font-family: inherit; }
.btn:hover { border-color: var(--teal); }
.btn.primary { background: var(--teal); color: var(--teal-ink); border-color: var(--teal); }
.btn.danger { background: #3a1717; color: var(--bad); border-color: #5c2626; }
.btn:disabled { opacity: .5; cursor: default; }

.field { margin-bottom: 12px; max-width: 380px; }
.field label { display: block; font-size: 11px; color: var(--mut); letter-spacing: .06em;
  text-transform: uppercase; margin-bottom: 4px; }
.field input, .field select, .field textarea { width: 100%; background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; color: #fff; font: inherit; padding: 8px 11px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--teal); border-color: var(--teal); }
.hint { font-size: 12px; color: var(--mut); margin-top: 4px; }
.err { color: var(--bad); font-size: 13px; margin: 8px 0; min-height: 18px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.hc b { display: block; font-size: 14px; color: #fff; }
.hc span { font-size: 11.5px; color: var(--mut); }
.hc .good { color: var(--good); } .hc .bad { color: var(--bad); }

.login-wrap { flex: 1; display: flex; align-items: center; justify-content: center; }
.login { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px 30px; width: 340px; }
.login h1 { text-align: center; }
.login .locknote { font-size: 11.5px; color: var(--mut); text-align: center; margin-top: 12px; }

.wsteps { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.wstep { font-size: 11.5px; font-family: Consolas, monospace; border-radius: 99px; padding: 4px 11px;
  background: var(--panel); color: var(--mut); border: 1px solid var(--line); }
.wstep.done { color: var(--good); border-color: #1e4a31; }
.wstep.on { background: var(--teal); color: var(--teal-ink); border-color: var(--teal); font-weight: 700; }

.sheet { background: #fffdf6; color: #2a2a24; border-radius: 10px; padding: 16px 18px; max-width: 380px; font-size: 13px; }
.sheet h3 { margin: 0 0 8px; font-family: Georgia, serif; font-size: 15px; }
.sheet .row { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed #d9d2b8; padding: 5px 0; }
.sheet .row:last-child { border-bottom: 0; }
.sheet .row b { font-family: Consolas, monospace; font-weight: 600; text-align: right; }

.modal-overlay { position: fixed; inset: 0; background: rgba(6, 10, 20, .7); display: flex;
  align-items: center; justify-content: center; z-index: 50; }
.modal { background: var(--navy-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 22px; width: min(480px, 92vw); max-height: 88vh; overflow: auto; }
.modal h2 { font-family: Georgia, serif; font-size: 16px; color: #fff; margin: 0 0 12px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.compare .half { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; }
.compare .half h4 { margin: 0 0 6px; font-size: 11px; color: var(--mut); text-transform: uppercase; letter-spacing: .07em; }
.warnline { color: var(--warn); font-size: 13px; margin: 8px 0; }

.notes { margin-top: 10px; }
.note { border-left: 2px solid var(--line); padding: 4px 10px; margin-bottom: 8px; }
.note .when { font-size: 11px; color: var(--mut); font-family: Consolas, monospace; }
.muted { color: var(--mut); }
.right { text-align: right; }
.explain { margin: 6px 0 0; padding-left: 20px; color: var(--mut); font-size: 13.5px; }
.explain li { margin-bottom: 8px; }
.explain b { color: var(--ink); }

/* Printing the welcome sheet gives you the SHEET, not a navy screenshot of the
   whole console. */
@media print {
  body { background: #fff; }
  .topbar, .side, .btn, .wsteps, .hint, h1, .sub { display: none !important; }
  .main { padding: 0; overflow: visible; }
  .sheet { max-width: none; border: 1px solid #ccc; }
  .sheet, .sheet * { color: #000 !important; }
}
