:root {
  color-scheme: light;
  --ink: #17233c;
  --muted: #53627a;
  --line: #dfe5ef;
  --blue: #2849db;
  --blue-dark: #1834a9;
  --blue-pale: #eaf0ff;
  --surface: #fff;
  --bg: #f3f5f9;
  --radius: 16px;
  font: 16px/1.5 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--blue-dark); }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 3px solid #536eed; outline-offset: 3px; }
:where(h1, h2, h3, p) { margin: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.loading { margin: 3rem; color: var(--muted); }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 42px; gap: .45rem;
  background: white; border: 1px solid #cfd9ea; border-radius: 9px; padding: .53rem .88rem;
  color: var(--ink); font-weight: 650; font-size: .875rem; line-height: 1.3; text-decoration: none;
}
.button:hover { border-color: #9aabcd; background: #f4f7ff; }
.button.primary { background: var(--blue); color: white; border-color: var(--blue); }
.button.primary:hover { background: var(--blue-dark); }
.button.light { color: #223da2; background: var(--blue-pale); border-color: var(--blue-pale); }
.button.danger { color: #a03131; }
.icon-btn { border: 0; background: transparent; color: inherit; font-size: 1.85rem; min-width: 42px; min-height: 42px; border-radius: 8px; }
.icon-btn:hover { background: #edf1f9; }
input:not([type=checkbox]), textarea, select {
  min-height: 43px; padding: .56rem .7rem; width: 100%; border: 1px solid #c6d1e2;
  border-radius: 8px; background: white; color: var(--ink);
}
textarea { min-height: 95px; resize: vertical; }
label.field { display: grid; gap: .3rem; font-size: .9rem; font-weight: 650; }
input[type=checkbox] { accent-color: var(--blue); width: 17px; height: 17px; margin: .1rem .35rem .1rem 0; vertical-align: middle; }
.word-icon { display: inline-block; width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px; background: var(--blue) url("/assets/favicon.svg") center/100% no-repeat; }
.wordmark { display: flex; gap: .65rem; align-items: center; font-size: 1.1rem; font-weight: 800; letter-spacing: -.04em; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 235px minmax(0, 1fr); }
.sidebar { background: #fff; border-right: 1px solid var(--line); padding: 1.65rem 1rem 1rem; display: flex; flex-direction: column; gap: 1.45rem; }
.sidebar .wordmark { padding-left: .35rem; }
.company-sign { border: 1px solid var(--line); display: flex; align-items: center; gap: .65rem; border-radius: 11px; padding: .65rem; overflow: hidden; }
.initial { border-radius: 8px; background: #e9edff; color: #273baa; font-size: .8rem; font-weight: 800; min-width: 31px; padding: .38rem; text-align: center; }
.company-sign strong, .company-sign small { display: block; overflow-wrap: anywhere; }
.company-sign small { color: var(--muted); font-size: .78rem; }
.nav { display: grid; gap: .28rem; }
.nav a { text-decoration: none; color: #3d4c64; border-radius: 8px; padding: .62rem .65rem; font-weight: 620; font-size: .9rem; white-space: nowrap; display: flex; gap: .6rem; align-items: center; }
.nav a:hover { background: #f1f4fa; }
.nav a[aria-current=page] { color: #2139ab; background: var(--blue-pale); }
.nav-icon { width: 1.15rem; text-align: center; font-size: 1.05rem; }
.sidebar-bottom { display: grid; gap: .6rem; margin-top: auto; }
.workspace { width: 100%; max-width: 1450px; margin-inline: auto; padding: 2.2rem clamp(1rem, 3.5vw, 3.5rem); }
.heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.45rem; }
.heading h1 { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.1; letter-spacing: -.055em; }
.heading p { color: var(--muted); margin-top: .36rem; }
.card { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; min-width: 0; }
.card h2 { font-size: 1.16rem; letter-spacing: -.025em; }
.card h3 { font-size: 1rem; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: .7rem; margin-bottom: 1.05rem; flex-wrap: wrap; }
.stack { display: grid; gap: 1rem; }
.columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, .58fr); gap: 1rem; align-items: start; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem; }
.metric { display: grid; gap: .35rem; }
.metric strong { font-size: 2rem; line-height: 1.2; letter-spacing: -.06em; }
.metric p, .metric span { color: var(--muted); font-size: .875rem; }
.week-scroll, .table-scroll { overflow-x: auto; }
.week { min-width: 550px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .35rem; }
.day { display: grid; align-content: start; gap: .3rem; border-radius: 9px; background: #f5f7fb; min-height: 97px; padding: .45rem .4rem; overflow-wrap: anywhere; }
.day.today { background: #eaf0ff; }
.day strong { font-size: .87rem; }
.day span { color: #56647a; font-size: .78rem; }
.day .slot-chip { padding: .2rem .28rem; border-radius: 5px; color: #1e358a; background: #dce5ff; font-size: .75rem; }
.list { display: grid; gap: .75rem; list-style: none; padding: 0; margin: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding-bottom: .7rem; border-bottom: 1px solid var(--line); }
.list li:last-child { border: 0; padding-bottom: 0; }
.note { background: #edf2ff; color: #2e427b; padding: .75rem .9rem; border-radius: 9px; font-size: .9rem; }
.note.error { color: #8d2828; background: #fdeeee; }
.badge { display: inline-flex; border-radius: 6px; background: #edf2ff; color: #324697; padding: .18rem .48rem; font-weight: 650; font-size: .78rem; white-space: nowrap; }
.badge.confirmed { background: #e5f6ed; color: #155a38; }
.badge.pending { background: #fff2d5; color: #695111; }
.badge.rejected { background: #fdeeee; color: #842f2f; }
.actions { display: flex; gap: .55rem; align-items: center; flex-wrap: wrap; }
.steps { display: grid; gap: .35rem; margin: 0; padding-inline-start: 1.4rem; }
.shop-case .card-top { margin-bottom: 0; }
.shop-case-form { align-items: end; }
.case-description { white-space: pre-wrap; overflow-wrap: anywhere; }
#case-list, .shop-case { margin-top: .75rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: .3rem; color: var(--ink); font-weight: 600; font-size: .9rem; }
.hours-row { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(115px, .7fr) minmax(115px, .7fr); gap: .6rem; align-items: center; }
.table { border-collapse: collapse; width: 100%; text-align: left; font-size: .9rem; }
.table th, .table td { padding: .67rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; }
.table tr:last-child td { border-bottom: 0; }
.code { font-family: ui-monospace, Consolas, monospace; font-size: .84rem; overflow-wrap: anywhere; }
.code-box { background: #f2f5fb; border: 1px solid var(--line); border-radius: 8px; margin: 0; padding: .7rem; white-space: pre-wrap; }
.toast { position: fixed; z-index: 9; right: 1rem; bottom: 1rem; max-width: min(88vw, 450px); background: #152544; color: white; padding: .72rem 1rem; border-radius: 11px; box-shadow: 0 12px 34px #17233c2e; }
.toast[data-error=true] { background: #812f38; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: radial-gradient(ellipse at 70% 0%, #dde7ff, transparent 65%); }
.login .card { width: min(430px, 100%); padding: 2rem; box-shadow: 0 15px 50px #182c4e10; }
.login h1 { font-size: 1.8rem; letter-spacing: -.05em; }
.price { font-size: 2rem; font-weight: 800; letter-spacing: -.05em; }
.chat-page { min-height: 100dvh; display: grid; place-items: center; padding: 1rem; background: #edf1f9; }
.chat { width: min(100%, 460px); height: min(700px, calc(100dvh - 2rem)); min-height: 260px; border: 1px solid #d9e0ed; border-radius: 16px; background: white; display: grid; grid-template-rows: auto minmax(0,1fr) auto auto; overflow: hidden; box-shadow: 0 9px 40px #15254419; }
.chat-page.is-embed { background: white; padding: 0; }
.is-embed .chat { height: 100dvh; min-height: min(240px, 100dvh); width: 100%; border: 0; border-radius: 0; box-shadow: none; }
.chat-head { display: flex; align-items: center; gap: .7rem; border-bottom: 1px solid var(--line); padding: .75rem 1rem; }
.chat-head h1 { font-size: 1.08rem; letter-spacing: -.02em; line-height: 1.3; overflow-wrap: anywhere; }
.chat-head p { font-size: .83rem; color: var(--muted); }
.chat-head button { margin-left: auto; align-self: start; }
.feed { min-height: 0; min-width: 0; overflow-y: auto; overflow-x: hidden; padding: .85rem 1rem; display: flex; flex-direction: column; gap: .65rem; }
.message { align-self: start; max-width: 94%; overflow-wrap: anywhere; white-space: pre-line; background: #f0f3fa; padding: .65rem .8rem; border-radius: 4px 12px 12px 12px; }
.message.user { align-self: end; background: var(--blue); color: #fff; border-radius: 12px 4px 12px 12px; }
.message.error { color: #8d2828; background: #fdeeee; }
.message.success { color: #16563a; background: #e3f5eb; }
.question { border-top: 1px solid var(--line); padding: .65rem 1rem .35rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .45rem; }
.chat-credit { text-align: center; font-size: .75rem; color: #596781; padding: .25rem .6rem .45rem; }
.chat-actions { align-self: stretch; display: flex; flex-wrap: wrap; gap: .4rem; }
.service-options { display: grid; gap: .45rem; align-self: stretch; }
.service-choice { justify-content: space-between; text-align: left; }
.service-choice span { font-weight: 400; color: var(--muted); }
.picker, .booking-form { align-self: stretch; border-radius: 10px; border: 1px solid var(--line); padding: .7rem; display: grid; gap: .65rem; }
.picker .actions { max-height: 180px; overflow-y: auto; padding: 3px; }
.pick-time { min-width: 58px; }
@media (max-width: 850px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { border: 0; border-bottom: 1px solid var(--line); gap: .65rem; padding: .8rem 1rem; }
  .sidebar .wordmark { padding-left: 0; }
  .company-sign { display: none; }
  .nav { display: flex; overflow-x: auto; padding: .15rem .2rem .35rem; }
  .nav a { padding: .42rem .5rem; }
  .sidebar-bottom { display: none; }
  .workspace { padding-top: 1.2rem; }
}
@media (max-width: 590px) {
  .metrics { gap: .45rem; }
  .metric { padding: .65rem; }
  .metric strong { font-size: 1.55rem; }
  .metric p, .metric span { font-size: .76rem; }
  .columns { grid-template-columns: 1fr; }
  .heading { align-items: flex-start; }
  .hours-row { grid-template-columns: minmax(84px, 1fr) repeat(2,minmax(78px,.75fr)); gap: .3rem; }
  .hours-row input:not([type=checkbox]) { padding-inline: .2rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
