/* Bitton Desk. Same look as the storefront: white + icy aqua, deep teal actions, gold for small details. */
:root { --ink: #192B30; --muted: #5E7075; --line: #DDE6E8; --line-strong: #C3D0D3; --tint: #E6F0F1; --teal: #174B54; --gold: #B99B64; --bg: #F6F9F9; --good: #1E7A4C; --warn: #9A6A12; --bad: #B3261E; --serif: 'Tenor Sans', 'Optima', 'Segoe UI', sans-serif; --sans: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif; --safe-b: env(safe-area-inset-bottom, 0px); }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 15.5px/1.5 var(--sans); color: var(--ink); background: var(--bg); }
h1, h2, h3, p, dl, dd, ul { margin: 0; padding: 0; }
ul { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
a { color: var(--teal); }
[hidden] { display: none !important; }
.boot { padding: 80px 20px; text-align: center; color: var(--muted); }
h1 { font: 400 26px/1.2 var(--serif); letter-spacing: .01em; }
h2 { font: 500 13px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* frame */
.frame { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100dvh; }
.side { background: var(--teal); color: #fff; padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100dvh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 18px; font: 400 20px var(--serif); letter-spacing: .04em; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 8px; color: rgba(255, 255, 255, .82); text-decoration: none; font-size: 15px; }
.nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav a[aria-current="page"] { background: #fff; color: var(--teal); font-weight: 500; }
.nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.nav .count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--gold); color: #fff; font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.side .foot { margin-top: auto; display: grid; gap: 2px; font-size: 13.5px; color: rgba(255, 255, 255, .75); padding: 0 8px; }
.side .foot a { color: #fff; }
.main { padding: 26px 32px 60px; max-width: 1180px; width: 100%; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.head .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.demo-bar { background: #FBF4E4; border: 1px solid #EBDDB8; color: #6B5210; border-radius: 8px; padding: 9px 14px; font-size: 14px; margin-bottom: 16px; display: flex; gap: 10px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.demo-bar button { text-decoration: underline; text-underline-offset: 3px; }

/* buttons, chips, fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 6px; border: 1px solid var(--teal); background: var(--teal); color: #fff; font-weight: 500; font-size: 15px; text-decoration: none; white-space: nowrap; }
.btn:hover { background: #0F3A42; }
.btn.line { background: #fff; color: var(--teal); border-color: var(--line-strong); }
.btn.line:hover { border-color: var(--teal); background: #fff; }
.btn.danger { background: #fff; color: var(--bad); border-color: #E3BDB9; }
.btn.sm { min-height: 38px; padding: 0 12px; font-size: 14px; }
.btn:disabled { opacity: .55; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--line-strong); background: #fff; font-size: 14px; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.chip b { font-weight: 600; }
.chip[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }
.field { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; font-size: 16px; }
textarea.field { min-height: 92px; resize: vertical; }
.field:focus, .btn:focus-visible, .chip:focus-visible, .row:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
label.f { display: grid; gap: 5px; font-size: 14px; font-weight: 500; }
label.f span i { font-style: normal; font-weight: 400; color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.search { position: relative; margin-bottom: 14px; }
.search .field { padding-left: 40px; }
.search svg { position: absolute; left: 12px; top: 13px; width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 1.7; }

/* cards and rows */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; text-decoration: none; color: inherit; display: block; }
.stat:hover { border-color: var(--teal); }
.stat b { display: block; font: 400 30px/1.15 var(--serif); }
.stat span { font-size: 13.5px; color: var(--muted); }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 18px; }
.card > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.card > header a { font-size: 14px; }
.card .pad { padding: 14px 16px; }
.empty { padding: 22px 16px; color: var(--muted); font-size: 14.5px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; width: 100%; text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); min-height: 60px; }
.row:last-child { border-bottom: 0; }
.row:hover { background: #F7FAFA; }
.row .t { font-weight: 500; overflow-wrap: anywhere; }
.row .s { font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.row .r { text-align: right; display: grid; gap: 3px; justify-items: end; }
.row.when { grid-template-columns: 74px minmax(0, 1fr) auto; }
.row .time { font-weight: 500; font-variant-numeric: tabular-nums; font-size: 14.5px; }
.day { padding: 9px 16px; background: #F3F7F7; border-bottom: 1px solid var(--line); font-size: 13.5px; font-weight: 500; color: var(--muted); display: flex; justify-content: space-between; }
.day.today { color: var(--teal); background: var(--tint); }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 12px; font-size: 12.5px; font-weight: 500; background: var(--tint); color: var(--teal); white-space: nowrap; }
.badge.new { background: #FBF0D9; color: #7A5A0B; }
.badge.good { background: #E2F3EA; color: var(--good); }
.badge.bad { background: #FBE9E7; color: var(--bad); }
.badge.grey { background: #EEF1F2; color: var(--muted); }
.tagdemo { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); border: 1px solid #E3D5B8; border-radius: 4px; padding: 0 5px; margin-left: 6px; vertical-align: 2px; }

/* customer page */
.who { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.avatar { width: 54px; height: 54px; border-radius: 50%; background: var(--tint); color: var(--teal); display: inline-flex; align-items: center; justify-content: center; font: 400 20px var(--serif); flex: none; }
.whohead { display: flex; gap: 14px; align-items: center; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 18px; }
.facts dt { font-size: 12.5px; color: var(--muted); letter-spacing: .04em; }
.facts dd { font-weight: 500; overflow-wrap: anywhere; }
.tl { position: relative; padding: 4px 16px 4px 38px; }
.tl li { position: relative; padding: 10px 0 12px; border-bottom: 1px solid var(--line); }
.tl li:last-child { border-bottom: 0; }
.tl li::before { content: ''; position: absolute; left: -24px; top: 17px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); }
.tl .k { font-size: 12.5px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.tl button.link { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; }

/* month */
.month { padding: 12px 14px 14px; }
.month .mh { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-weight: 500; }
.month .mh button { width: 40px; height: 40px; border-radius: 50%; font-size: 20px; }
.month .mh button:hover { background: var(--tint); }
.grid7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: 13.5px; }
.grid7 .wd { color: var(--muted); font-size: 12px; padding: 4px 0; }
.grid7 button { aspect-ratio: 1; border-radius: 8px; position: relative; min-height: 38px; }
.grid7 button:hover { background: var(--tint); }
.grid7 button.is-today { box-shadow: inset 0 0 0 1.5px var(--teal); font-weight: 600; }
.grid7 button.sel { background: var(--teal); color: #fff; }
.grid7 button i { position: absolute; left: 50%; bottom: 5px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--gold); }

/* sheet */
dialog#sheet { border: 0; padding: 0; border-radius: 14px; width: min(600px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); box-shadow: 0 20px 60px rgba(10, 40, 46, .28); color: var(--ink); }
dialog#sheet::backdrop { background: rgba(15, 40, 46, .45); }
.sh-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2; }
.sh-head h3 { font: 400 20px var(--serif); }
.sh-x { width: 40px; height: 40px; border-radius: 50%; font-size: 24px; line-height: 1; }
.sh-x:hover { background: var(--tint); }
.sh-body { padding: 16px 18px 18px; display: grid; gap: 14px; }
.sh-foot { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding-top: 4px; }
.sh-foot .left { margin-right: auto; }
.shot { width: 100%; max-height: 260px; object-fit: contain; background: #ECECED; border-radius: 8px; border: 1px solid var(--line); }
.err { color: var(--bad); font-size: 14px; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; }
.pay { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 8px; align-items: end; }

/* sign in */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: linear-gradient(160deg, #E6F0F1, #F6F9F9 60%); }
.login form { width: min(400px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 28px 24px; display: grid; gap: 14px; box-shadow: 0 12px 40px rgba(23, 75, 84, .1); }
.login .brand { color: var(--teal); padding: 0 0 4px; font-size: 24px; }

#toast { position: fixed; left: 50%; bottom: calc(86px + var(--safe-b)); transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14.5px; opacity: 0; pointer-events: none; transition: .2s; z-index: 300; max-width: calc(100vw - 32px); text-align: center; }
#toast.show { opacity: 1; transform: translateX(-50%); }
.tabbar, .topbar { display: none; }

@media (max-width: 899px) {
  .frame { display: block; }
  .side { display: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 20; background: var(--teal); color: #fff; padding: 10px 16px; min-height: 54px; }
  .topbar .brand { padding: 0; font-size: 18px; }
  .topbar a { color: #fff; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .topbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; }
  .main { padding: 16px 14px calc(96px + var(--safe-b)); }
  h1 { font-size: 22px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat b { font-size: 25px; }
  .cols { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 8px 2px 7px; font-size: 11.5px; color: var(--muted); text-decoration: none; position: relative; min-height: 56px; }
  .tabbar a[aria-current="page"] { color: var(--teal); font-weight: 600; }
  .tabbar svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar .count { position: absolute; top: 4px; left: 50%; margin-left: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--gold); color: #fff; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
  .head .acts { width: 100%; }
  .head .acts .btn { flex: 1; }
  .who { grid-template-columns: minmax(0, 1fr); }
  dialog#sheet { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; border-radius: 16px 16px 0 0; }
  .pay { grid-template-columns: 1fr 1fr; }
  .row.when { grid-template-columns: 66px minmax(0, 1fr) auto; }
}
@media (max-width: 420px) { .two { grid-template-columns: 1fr; } }
