/* Cotrugli Ledger — AI Act Evidence demo. Brand: navy #1B2A4A + gold #8C6A2F. Light SaaS. */

:root {
  --navy: #1B2A4A;
  --gold: #8C6A2F;
  --bg: #F6F7FA;
  --card: #FFFFFF;
  --line: #E4E7EE;
  --text: #22293A;
  --muted: #6B7385;
  --ok: #1E7F4F;
  --warn: #A05A00;
  --fail: #A02929;
}

* { box-sizing: border-box; margin: 0; }
body { font: 14px/1.5 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: var(--bg); color: var(--text); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

.layout { display: flex; min-height: 100vh; }

/* sidebar */
.sidebar { width: 220px; background: var(--navy); color: #E8EBF2; display: flex; flex-direction: column; }
.brand { display: flex; gap: 10px; align-items: center; padding: 18px 16px; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand-mark { width: 34px; height: 34px; border-radius: 8px; background: var(--gold); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.brand-name { font-weight: 600; }
.brand-sub { font-size: 12px; color: #A9B2C6; }
.sidebar nav { display: flex; flex-direction: column; padding: 12px 8px; gap: 2px; flex: 1; }
.sidebar nav a { color: #C7CEDD; text-decoration: none; padding: 9px 12px; border-radius: 8px; }
.sidebar nav a:hover { background: rgba(255,255,255,.08); }
.sidebar nav a.active { background: rgba(140,106,47,.35); color: #fff; }
.sidebar-foot { padding: 14px 16px; font-size: 12px; color: #A9B2C6; border-top: 1px solid rgba(255,255,255,.12); display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #888; display: inline-block; }
.dot.ok { background: #4CC38A; } .dot.bad { background: #E5484D; }

/* main */
.main { flex: 1; display: flex; flex-direction: column; padding: 0 26px; max-width: 1200px; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 20px 0 14px; }
.topbar h1 { font-size: 20px; color: var(--navy); }
.btn-gold { background: var(--gold); color: #fff; border: 0; border-radius: 8px; padding: 9px 16px; font-weight: 600; cursor: pointer; }
.btn-gold:hover { filter: brightness(1.08); }
.btn-gold:disabled { opacity: .5; cursor: default; }

.view.hidden { display: none; }
.grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 16px; }
.card h2 { font-size: 14px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 12px; }
.empty { color: var(--muted); }

/* systems */
.systems-list { display: flex; flex-direction: column; gap: 12px; }
.system-row { display: flex; align-items: center; gap: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.system-meta { flex: 1; }
.system-name { font-weight: 600; color: var(--navy); }
.system-desc { font-size: 12px; color: var(--muted); }
.system-stats { font-size: 12px; color: var(--muted); }
.ring { position: relative; width: 74px; height: 74px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--navy); font-size: 15px; }
.ring-label { font-size: 11px; color: var(--muted); text-align: center; margin-top: 2px; }

/* key-value */
.kv div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.kv div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); }
.kv dd { font-weight: 500; }

/* feed */
.feed { width: 100%; border-collapse: collapse; }
.feed th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.feed td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.feed tr:last-child td { border-bottom: 0; }

/* chips — anchor ladder + GDPR state */
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.chip.accepted { background: #EEF1F6; color: var(--muted); }         /* A0Received */
.chip.included { background: #E8EEFA; color: #2B4E9B; }              /* A1Sequenced */
.chip.verified { background: #E4F3EA; color: var(--ok); }            /* A2EvidenceFinal */
.chip.active   { background: #EEF1F6; color: var(--muted); }
.chip.erased   { background: #F3EBFA; color: #6B3FA0; }              /* first-class honest status */

/* screen 2: toolbar + filter */
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.toolbar select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; }
.filter { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.filter button { border: 0; background: #fff; padding: 7px 14px; cursor: pointer; font: inherit; color: var(--muted); }
.filter button.active { background: var(--navy); color: #fff; }
.rowlink { cursor: pointer; }
.rowlink:hover td { background: #F2F5FA; }
.copy { border: 0; background: transparent; cursor: pointer; color: var(--muted); }
.copy:hover { color: var(--navy); }

/* screen 3: anchor chain + verify */
.chain { display: flex; align-items: stretch; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.chain-step { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; min-width: 150px; }
.chain-step.on { border-color: var(--gold); background: #FBF7EF; }
.chain-step.off { opacity: .65; }
.chain-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.chain-value { margin-top: 4px; font-weight: 600; color: var(--navy); word-break: break-all; }
.chain-arrow { align-self: center; color: var(--muted); font-size: 18px; }
.btnrow { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.btnrow a.btn-gold { text-decoration: none; display: inline-block; }
.btn-outline { background: #fff; color: var(--navy); border: 1px solid var(--navy); border-radius: 8px; padding: 9px 16px; font-weight: 600; cursor: pointer; }
.checklist { list-style: none; margin: 8px 0; }
.checklist li { padding: 5px 0; border-bottom: 1px dashed var(--line); }
.checklist li.ok { color: var(--ok); }
.checklist li.bad { color: var(--fail); }
.checklist li.skip { color: var(--muted); }
.verdict { margin-top: 10px; padding: 10px 14px; border-radius: 8px; font-weight: 700; }
.verdict.pass { background: #E4F3EA; color: var(--ok); }
.verdict.fail { background: #FBE9E9; color: var(--fail); }
.hint { color: var(--muted); font-size: 12px; }
.meaning { background: #F3EBFA; color: #4B2A73; border-radius: 8px; padding: 10px 14px; margin: 10px 0; font-size: 13px; }

/* screen 4: erasure form */
label { display: block; margin: 10px 0; font-size: 12px; color: var(--muted); }
label input { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
#erase-result { margin-top: 12px; }

/* moat banner */
.moat-banner { margin-top: auto; padding: 14px 0 20px; text-align: center; color: var(--muted); font-size: 13px; font-style: italic; border-top: 1px solid var(--line); }
