/* asn -- TIMEKRAFT look (blue #2F5BD3, yellow #FFD60A, Geist) */
:root {
  --blue: #2F5BD3; --blue-d: #2449ad; --yellow: #FFD60A; --ink: #0f172a; --muted: #5b6475; --line: #e3e7ef;
  --bg: #f5f7fb; --card: #ffffff; --ok: #12805c; --bad: #c62828; --warn: #fff4c2; --warn-b: #e8c547; --ditto: #e8efff;
  --radius: 14px; --shadow: 0 1px 2px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.06);
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; background: var(--bg); }
body { font-size: 15px; line-height: 1.45; }
a { color: var(--blue); }
h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.01em; }
h2 { font-size: 19px; margin: 0 0 10px; }
h3 { font-size: 15px; margin: 14px 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
em.serif { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; color: var(--blue); }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 18px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { width: 34px; height: 34px; }
.wordmark { font-weight: 800; letter-spacing: .02em; font-size: 18px; }
.wordmark b { color: var(--blue); }
.brand .tenant { font-weight: 600; color: var(--muted); font-size: 13px; border-left: 1px solid var(--line); padding-left: 10px; }
.top .grow { flex: 1; }
.who { font-size: 13px; color: var(--muted); text-align: right; }
.who b { color: var(--ink); }
.role { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--ditto); color: var(--blue); margin-left: 4px; }
.role.SUPER_ADMIN { background: var(--yellow); color: #4a3b00; }

main { max-width: 1400px; margin: 0 auto; padding: 22px 18px 60px; }

/* buttons + fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 9px 14px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: #c8cfdc; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-d); }
.btn.go { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: default; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
input, select, textarea { font: inherit; color: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; background: #fff; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(47,91,211,.35); border-color: var(--blue); }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.err { color: var(--bad); font-weight: 600; }
.note { background: var(--warn); border: 1px solid var(--warn-b); border-radius: 10px; padding: 8px 12px; margin: 8px 0; font-size: 14px; }
.note ul { margin: 4px 0 0 18px; padding: 0; }
.ok-msg { color: var(--ok); font-weight: 600; }

/* login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(900px 500px at 10% -10%, rgba(47,91,211,.18), transparent 60%), radial-gradient(700px 400px at 110% 110%, rgba(255,214,10,.22), transparent 60%), var(--bg); }
.login { width: 100%; max-width: 420px; }
.login .brand { margin-bottom: 18px; justify-content: center; }
.login .brand svg { width: 44px; height: 44px; }
.login .wordmark { font-size: 24px; }
.login form { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.login .btn { padding: 12px; font-size: 16px; }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 700; color: var(--blue); margin: 0 0 4px; }
.pw-wrap { display: flex; gap: 6px; }
.pw-wrap input { flex: 1; }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 18px; }
.tile { display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: 18px; background: #fff; border: 1px solid var(--line);
  box-shadow: var(--shadow); text-decoration: none; color: var(--ink); transition: transform .12s, box-shadow .12s; min-height: 150px; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(15,23,42,.08), 0 14px 32px rgba(47,91,211,.14); }
.tile .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--ditto); color: var(--blue); }
.tile .ic svg { width: 26px; height: 26px; }
.tile.hero { background: linear-gradient(135deg, var(--blue), #4a74e6); color: #fff; border: 0; }
.tile.hero .ic { background: var(--yellow); color: #3b2f00; }
.tile.hero .muted { color: rgba(255,255,255,.85); }
.tile b { font-size: 17px; }

/* scan */
.pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pick label.big { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 26px 12px; border: 2px dashed #c4cde0;
  border-radius: 16px; background: #fff; cursor: pointer; font-weight: 700; text-align: center; }
.pick label.big:hover { border-color: var(--blue); }
.pick label.big svg { width: 34px; height: 34px; color: var(--blue); }
.pick input[type=file] { display: none; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.thumb { position: relative; width: 96px; height: 120px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fff;
  display: grid; place-items: center; font-size: 12px; text-align: center; padding: 4px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 3px; right: 3px; border: 0; border-radius: 99px; width: 22px; height: 22px; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; }

/* review */
.review { display: grid; grid-template-columns: minmax(280px, 40%) 1fr; gap: 16px; align-items: start; }
.viewer { position: sticky; top: 70px; }
.viewer .imgbox { background: #1d2333; border-radius: 12px; overflow: auto; max-height: calc(100vh - 150px); }
.viewer img { display: block; width: 100%; height: auto; cursor: zoom-in; }
.viewer img.zoom { width: 220%; cursor: zoom-out; }
.pager { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.status { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: #eef1f6; color: var(--muted); }
.status.DRAFT { background: var(--warn); color: #6b5300; }
.status.CONFIRMED { background: #dff5ea; color: var(--ok); }
.status.FAILED { background: #fde4e4; color: var(--bad); }
.status.QUEUED, .status.READING { background: var(--ditto); color: var(--blue); }
.hdr { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-bottom: 12px; }
.gridwrap { overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
table.grid { border-collapse: collapse; width: 100%; font-size: 13.5px; }
table.grid th { position: sticky; top: 0; background: #eef2fb; text-align: left; font-weight: 700; padding: 6px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; z-index: 1; }
table.grid td { border-bottom: 1px solid #eef0f4; padding: 2px 3px; vertical-align: middle; }
table.grid td input { width: 100%; border: 1px solid transparent; border-radius: 6px; padding: 5px 6px; background: transparent; min-width: 52px; }
table.grid td input:hover { border-color: var(--line); }
table.grid td input.w-s { min-width: 46px; width: 56px; }
table.grid td input.w-l { min-width: 150px; }
table.grid td.rev, table.grid td.rev input { background: var(--warn); }
table.grid td.dit input { background: var(--ditto); font-style: italic; }
table.grid tr.bad td.tot input, table.grid td.bad { color: var(--bad); font-weight: 700; }
table.grid tr.lowconf td:first-child { box-shadow: inset 3px 0 0 var(--warn-b); }
table.grid td.num, table.grid th.num { text-align: right; }
table.grid tfoot td { font-weight: 700; background: #f7f9fd; padding: 6px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); margin: 8px 0; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 4px; }
.legend .l-rev { background: var(--warn); border: 1px solid var(--warn-b); }
.legend .l-dit { background: var(--ditto); }
.legend .l-bad { background: #fde4e4; }
.spinner { width: 34px; height: 34px; border: 4px solid var(--ditto); border-top-color: var(--blue); border-radius: 50%; animation: spin 1s linear infinite; margin: 20px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* lists */
table.list { border-collapse: collapse; width: 100%; font-size: 14px; background: #fff; }
table.list th, table.list td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.list th { background: #eef2fb; font-size: 13px; position: sticky; top: 0; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover td { background: #f6f8fd; }
table.list td.num, table.list th.num { text-align: right; }
.listwrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 14px; }
.tabs a { padding: 7px 14px; border-radius: 99px; text-decoration: none; background: #fff; border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: 14px; }
.tabs a.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.crumbs { margin-bottom: 10px; font-size: 14px; }
.crumbs a { text-decoration: none; }
dialog { border: 0; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.25); padding: 20px; max-width: 420px; width: calc(100% - 32px); }
dialog::backdrop { background: rgba(15,23,42,.4); }
dialog form { display: flex; flex-direction: column; gap: 12px; }

@media (max-width: 860px) {
  .review { grid-template-columns: 1fr; }
  .viewer { position: static; }
  .viewer .imgbox { max-height: 55vh; }
  .who .uname { display: none; }
  .brand .tenant { display: none; }
}
@media (max-width: 520px) {
  main { padding: 16px 12px 50px; }
  .pick { grid-template-columns: 1fr; }
  h1 { font-size: 22px; }
}

.grow { flex: 1; }
.mt { margin-top: 16px; }
.review > div { min-width: 0; }
.note li button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 15px; padding: 0 6px; }
@media (max-width: 520px) {
  .top { padding: 8px 10px; gap: 6px; }
  .top .wordmark { font-size: 15px; }
  .top .brand svg { width: 28px; height: 28px; }
  .who { display: none; }
}
