/* Resibo — "Lightbox": receipts sit on a desk, the app is the white sheet beside them.
   One accent: highlighter yellow, used where something was read or needs a look. */

:root {
  --desk: #ebebe8;
  --desk-hi: #f6f6f3;
  --desk-lo: #dcdcd7;
  --sheet: #ffffff;
  --ink: #17181b;
  --ink-2: #45474d;
  --muted: #7a7b80;
  --line: #dcdcd8;
  --line-2: #ececea;
  --hl: #fff36b;
  --hl-soft: rgba(255, 233, 0, 0.42);
  --warn-bg: #fff8d6;
  --warn-line: #f0de7a;
  --bad: #b8321f;
  --good: #2c6e49;
  --mono: "DM Mono", ui-monospace, monospace;
  --sans: "Familjen Grotesk", system-ui, sans-serif;
  --r: 6px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font: 15px/1.45 var(--sans);
  min-height: 100vh;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
.mono { font-family: var(--mono); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ top bar */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 22px;
  padding: 0 24px; height: 56px;
  background: var(--sheet); border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 19px; letter-spacing: -0.02em; text-decoration: none; }
.logo i {
  width: 14px; height: 19px; background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% 88%, 83% 100%, 66% 88%, 50% 100%, 33% 88%, 17% 100%, 0 88%);
}
.nav { display: flex; gap: 4px; }
.nav a {
  text-decoration: none; padding: 6px 10px; border-radius: var(--r); color: var(--ink-2); font-weight: 500;
}
.nav a:hover { background: var(--line-2); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--hl); }
.bar .book { margin-left: auto; font: 12.5px var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav .count { font: 500 11px var(--mono); background: var(--ink); color: #fff; border-radius: 9px; padding: 1px 6px; margin-left: 4px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 28px 24px 80px; }

/* ------------------------------------------------------------------ type */
.lbl { font: 500 10.5px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
h1 { font-size: 30px; font-weight: 700; line-height: 1.1; }
h2 { font-size: 19px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
.mark { background: var(--hl); padding: 0 0.15em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 14px; border-radius: var(--r);
  border: 1px solid var(--ink); background: var(--sheet); font-weight: 700; font-size: 14px;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--line-2); }
.btn.solid { background: var(--ink); color: #fff; }
.btn.solid:hover { background: #2c2e33; }
.btn.ghost { border-color: transparent; background: transparent; font-weight: 500; color: var(--ink-2); }
.btn.ghost:hover { background: var(--line-2); }
.btn.danger { border-color: transparent; color: var(--bad); background: transparent; font-weight: 500; }
.btn.danger:hover { background: #fbe9e5; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn kbd { font: 11px var(--mono); opacity: 0.6; }

/* ------------------------------------------------------------------ the desk + paper */
.desk {
  background:
    radial-gradient(ellipse at 35% 25%, var(--desk-hi), transparent 60%),
    radial-gradient(ellipse at 80% 90%, var(--desk-lo), transparent 55%),
    var(--desk);
}
.paper {
  display: block; background: #fff;
  box-shadow: 0 18px 30px -8px rgba(0, 0, 0, 0.22), 0 3px 6px rgba(0, 0, 0, 0.08);
}

/* ------------------------------------------------------------------ cards / sheets */
.sheet { background: var(--sheet); border: 1px solid var(--line); border-radius: 8px; }

/* ------------------------------------------------------------------ chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--line); background: var(--sheet); border-radius: 999px;
  padding: 4px 11px; font-size: 13px; font-weight: 500; color: var(--ink-2);
}
.chip:hover { border-color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ------------------------------------------------------------------ notices */
.note {
  background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--r);
  padding: 9px 12px; font-size: 13.5px;
}
.note a { font-weight: 700; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px; z-index: 60;
  transition: opacity 0.2s, transform 0.2s; pointer-events: none; max-width: calc(100vw - 32px);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------------ status dot for "to check" */
.tocheck {
  display: inline-flex; align-items: center; gap: 5px; font: 500 11px var(--mono);
  background: var(--hl); padding: 1px 6px; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.04em;
}

.foot { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--muted); }
.foot button { background: none; border: 0; padding: 0; text-decoration: underline; color: var(--ink-2); }

@media (max-width: 720px) {
  .bar { padding: 0 16px; gap: 12px; }
  .bar .book { display: none; }
  .wrap { padding: 20px 16px 64px; }
  h1 { font-size: 25px; }
}
