/* MAP
 * §1 tema             L8-L27
 * §2 elemente de baza L28-L67
 * §3 cadru si meniu   L68-L99
 */

/* Tema Claude Amber (App), light + dark; borduri cu contrast >= 3:1 fata de fundal. */
/* §1 tema */
:root {
  color-scheme: light dark;
  --bg: #faf9f5; --surface: #ffffff; --surface-2: #f5f3ec;
  --border: #958e7c; --border-strong: #6f6958;
  --text: #1f1e1d; --text-2: #57534e; --text-3: #6f6a62;
  --accent: #c96442; --accent-hover: #b5502f; --accent-soft: rgba(201,100,66,.09); --on-accent: #ffffff;
  --ok: #1a7f4e; --danger: #c03540;
  --band: #262624; --on-band: #faf9f5;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1917; --surface: #232220; --surface-2: #2b2926;
    --border: #6b665e; --border-strong: #8a847a;
    --text: #f2efe8; --text-2: #b8b2a6; --text-3: #9a948a;
    --accent: #e08a5f; --accent-hover: #eb9d75; --accent-soft: rgba(224,138,95,.14); --on-accent: #241a14;
    --ok: #3fa96e; --danger: #e0645f;
    --band: #141312; --on-band: #f2efe8;
  }
}
/* §2 elemente de baza */
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* clasele cu display (grid/flex) nu au voie sa anuleze atributul hidden */
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, "Segoe UI", sans-serif; }
code, textarea, input, td { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.band { background: var(--band); color: var(--on-band); display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; }
.brand { font-weight: 700; font-size: 18px; letter-spacing: .3px; }
.brand span { color: var(--accent); }
.card { background: var(--surface); border: 1.5px solid var(--border); border-radius: 12px; padding: 16px 18px; margin-bottom: 16px; }
.card { overflow-x: auto; } /* tabelele late defileaza in card, nu imping pagina */
.card.narrow { max-width: 380px; margin: 48px auto; }
h1 { font-size: 22px; margin: 0 0 12px; }
h2 { font-size: 16px; margin: 8px 0 4px; }
.hint { color: var(--text-2); margin: 0 0 8px; font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 16px; }
.grid .card { margin: 0; }
.actions { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1.5px solid var(--border); border-radius: 12px; padding: 12px 16px; }
.stat b { display: block; font-size: 26px; font-variant-numeric: tabular-nums; }
.stat span { color: var(--text-2); font-size: 14px; }
textarea, input { width: 100%; background: var(--surface-2); color: var(--text); border: 1.5px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 14px; }
textarea:focus, input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
label { display: block; margin-bottom: 10px; color: var(--text-2); }
button { font: inherit; border-radius: 8px; padding: 8px 16px; cursor: pointer; border: 1.5px solid var(--border-strong); background: var(--surface-2); color: var(--text); }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
button.primary:hover { background: var(--accent-hover); }
button.ghost { background: transparent; color: var(--on-band); border-color: var(--on-band); padding: 4px 12px; }
.inline { display: grid; grid-template-columns: 2fr 1fr 3fr auto; gap: 8px; align-items: center; margin-bottom: 12px; }
.inline .msg { grid-column: 1 / -1; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px; border-bottom: 1.5px solid var(--border); }
th { color: var(--text-2); font-weight: 600; font-family: inherit; }
.msg { font-size: 14px; }
.msg.ok { color: var(--ok); }
.msg.err { color: var(--danger); }
@media (max-width: 640px) { .inline { grid-template-columns: 1fr; } }
label.check { display: flex; gap: 8px; align-items: flex-start; }
label.check input { width: auto; margin-top: 3px; }

/* §3 cadru si meniu */
/* Cadrul: meniu lateral fix + continut. */
.band { position: sticky; top: 0; z-index: 20; }
.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: calc(100vh - 56px); }
.side { background: var(--surface); border-right: 1.5px solid var(--border); padding: 14px 10px; position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto; }
.side a { display: block; color: var(--text); text-decoration: none; border-radius: 8px; padding: 7px 12px; border-left: 3px solid transparent; }
.side a:hover { background: var(--surface-2); }
.side a.active { background: var(--accent-soft); border-left-color: var(--accent); color: var(--text); font-weight: 600; }
.side a.top, .side .acc { font-size: 13px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--text-2); }
.side .acc { width: 100%; text-align: left; background: transparent; border: 0; border-radius: 8px; padding: 9px 12px; margin-top: 6px; display: flex; justify-content: space-between; align-items: center; }
.side .acc:hover { background: var(--surface-2); color: var(--text); }
.side .acc::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.side .acc[aria-expanded="true"]::after { transform: rotate(45deg); }
.side .sub { margin: 2px 0 6px 10px; padding-left: 6px; border-left: 1.5px solid var(--border); }
.side .sub a { font-size: 14px; padding: 6px 12px; }
.content { padding: 24px; max-width: 1240px; width: 100%; }
.content h1 { margin-bottom: 16px; }
.card h1 { margin-top: 0; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 12px; }
.facts dt { color: var(--text-2); }
.facts dd { margin: 0; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; overflow-wrap: anywhere; }
td a, .hint a, .row a { color: var(--accent); }
button.danger { border-color: var(--danger); color: var(--danger); }
.menu { display: none; margin-right: 8px; }
@media (max-width: 860px) {
  .menu:not([hidden]) { display: inline-block; }
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 56px; width: 270px; z-index: 15; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
  body.nav-open .side { transform: none; }
  .content { padding: 16px; }
}
