/* Admin layout: white top bar with a hairline, side menu as a list with a bar on the open page,
   pages of bordered surfaces split by hairlines (the Teaology shop app's finish). */
:root { --top: 56px; --side: 232px; }

/* ---- sign in ---- */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 28px 26px; }
.login-card .mark { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.login-card .mark img { width: 40px; height: 40px; border-radius: 8px; }
.login-card .mark b { font-size: 19px; color: var(--navy); }
.login-card .mark span { color: var(--muted); font-weight: 600; padding-left: 10px; border-left: 1px solid var(--line); }
.login-card h1 { font-size: 20px; color: var(--navy); margin-bottom: 4px; }
.login-card p.muted { margin-bottom: 18px; font-size: 13.5px; }
.err { color: var(--red); font-size: 13.5px; margin: -4px 0 12px; }

/* ---- frame ---- */
.top { position: fixed; inset: 0 0 auto 0; height: var(--top); background: #fff; border-bottom: 1px solid var(--line); z-index: 30;
  display: flex; align-items: center; gap: 12px; padding: 0 16px; }
.top .burger { width: 38px; height: 38px; display: none; place-items: center; border: 1px solid var(--line); border-radius: var(--r-sm); }
.top .brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 17px; color: var(--navy); white-space: nowrap; }
.top .brand img { width: 30px; height: 30px; border-radius: 6px; }
.top .brand span { font-weight: 600; color: var(--muted); font-size: 14px; padding-left: 9px; border-left: 1px solid var(--line); }
.top .sp { flex: 1; }
.top select.in { width: auto; min-height: 36px; font-size: 14px; padding: 0 10px; }
.top .tb { min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; }
.top .tb:hover { background: var(--hover); }
.top .who { font-size: 13.5px; color: var(--muted); white-space: nowrap; }

.side { position: fixed; top: var(--top); bottom: 0; left: 0; width: var(--side); background: #fff; border-right: 1px solid var(--line); overflow-y: auto; padding: 10px 0 24px; z-index: 25; }
.side .grp { padding: 14px 20px 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.navit { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 20px; border-left: 3px solid transparent; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14.5px; }
.navit:hover { background: var(--hover); }
.navit.on { color: var(--navy); border-left-color: var(--navy); background: var(--tint); }
.navit .badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font-size: 11px; display: inline-grid; place-items: center; }
.scrim-side { display: none; }

.main { margin-left: var(--side); padding: calc(var(--top) + 22px) 28px 60px; max-width: calc(var(--side) + 1240px); }
@media (max-width: 900px) {
  .top .burger { display: grid; }
  .top .who { display: none; }
  .side { transform: translateX(-100%); transition: transform .18s; box-shadow: var(--float); }
  body.side-open .side { transform: none; }
  body.side-open .scrim-side { display: block; position: fixed; inset: var(--top) 0 0 0; background: rgba(15, 23, 42, .3); z-index: 20; }
  .main { margin-left: 0; padding: calc(var(--top) + 16px) 16px 60px; }
}
@media (max-width: 520px) {
  .top { gap: 8px; padding: 0 10px; }
  .top .brand span { display: none; }
  .top select.in { max-width: 116px; }
  .top .tb { padding: 0 9px; }
}

/* ---- page parts ---- */
.pghead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.pghead h2 { font-size: 21px; }
.pghead .s { color: var(--muted); font-size: 13.5px; }
.pghead .r { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stack > * + * { margin-top: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1000px) { .grid3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

/* headline numbers: one strip split by hairlines, numbers in ink */
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.strip > div { padding: 14px 18px; border-left: 1px solid var(--line); margin-left: -1px; }
.strip .k { font-size: 13px; color: var(--muted); font-weight: 600; }
.strip .v { font-size: 23px; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.strip .d { font-size: 12.5px; color: var(--muted); }
@media (max-width: 560px) { .strip .v { font-size: 18px; } .strip > div { padding: 10px 12px; } }

/* label : value rows */
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 14px; }
.kv + .kv { border-top: 1px solid var(--line); }
.kv b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.kv.total { border-top: 1px solid var(--ink) !important; font-weight: 700; }

/* filter bar above a list */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filters .in { width: auto; min-height: 38px; font-size: 14px; }
.filters input.in[type=search] { min-width: 200px; }
.chip { min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font-size: 13.5px; font-weight: 600; }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }

/* simple bar chart (one series): bars in navy, numbers above */
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; align-items: end; height: 150px; padding-top: 18px; }
.bars .b { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; min-width: 0; }
.bars .b i { display: block; width: 70%; max-width: 30px; background: var(--navy); border-radius: 3px 3px 0 0; min-height: 1px; }
.bars .b.now i { background: var(--blue); }
.bars .b small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.bars .b em { font-style: normal; font-size: 11px; font-weight: 700; white-space: nowrap; }

.thumb { width: 44px; height: 44px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg) center/cover no-repeat; flex: none;
  display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--muted); }
.more { display: flex; justify-content: center; padding: 12px; }
.note { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: var(--r-sm); padding: 10px 14px; font-size: 13.5px; }
.note.bad { border-left-color: var(--red); }
.note.ok { border-left-color: var(--green); }
@media print {
  .top, .side, .no-print, .filters { display: none !important; }
  .main { margin: 0; padding: 0; max-width: none; }
  body { background: #fff; }
  .panel { border: 0; }
}
