:root {
  --ink: #18130d;
  --ink-2: #2b2117;
  --paper: #f4ede1;
  --surface: #fffdf8;
  --muted: #756a5d;
  --line: #ded3c2;
  --jade: #e7ca85;
  --jade-deep: #946722;
  --orchid: #f0e3c6;
  --lacquer: #c4933f;
  --amber: #d7b263;
  --blue: #d8c39b;
  --red: #b34055;
  --sans: "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
  --display: "Bodoni 72", Didot, "Times New Roman", serif;
  --mono: "SFMono-Regular", Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sidebar: 17.5rem;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); font-family: var(--sans); font-size: 15px; line-height: 1.45; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--lacquer); outline-offset: 3px; }
.dash-skip { position: fixed; top: 0.5rem; left: 0.5rem; z-index: 1000; padding: 0.7rem 1rem; color: white; background: var(--ink); transform: translateY(-150%); }
.dash-skip:focus { transform: translateY(0); }

.demo-ribbon { position: fixed; top: 0; right: 0; left: 0; z-index: 200; display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; min-height: 2.3rem; padding: 0.45rem 1.1rem; color: var(--ink); background: var(--amber); border-bottom: 1px solid rgba(23,16,31,.25); }
.demo-ribbon span { font-family: var(--mono); font-size: .52rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.demo-ribbon p { margin: 0; font-size: .64rem; }
.demo-ribbon a { font-size: .62rem; font-weight: 700; }

.dashboard-shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; padding-top: 2.3rem; }
.dash-sidebar { position: fixed; top: 2.3rem; bottom: 0; left: 0; z-index: 100; display: flex; flex-direction: column; width: var(--sidebar); color: rgba(255,255,255,.74); background: var(--ink); border-right: 1px solid rgba(255,255,255,.08); }
.dash-brand { display: flex; justify-content: space-between; align-items: center; min-height: 5.3rem; padding: 0 1.15rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.dash-brand a { display: flex; align-items: center; gap: .65rem; }
.dash-brand a > img { display: block; width: min(10.5rem, calc(100% - 3rem)); height: auto; }
.dash-brand a > span { display: grid; place-items: center; width: 2.55rem; height: 2.55rem; color: var(--ink); background: var(--jade); border-radius: 50%; font-family: var(--display); font-size: 1.5rem; font-style: italic; }
.dash-brand strong, .dash-brand small { display: block; }
.dash-brand strong { color: white; font-size: .82rem; letter-spacing: .2em; }
.dash-brand small { font-family: var(--display); font-size: .85rem; font-style: italic; }
.dash-brand > button { display: none; width: 2.4rem; height: 2.4rem; padding: 0; color: white; background: transparent; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; font-size: 1.3rem; }
.branch-chip { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: center; margin: 1rem; padding: .8rem; color: var(--ink); background: var(--jade); }
.branch-chip > span { width: .55rem; height: .55rem; background: #21895d; border: 2px solid white; border-radius: 50%; box-shadow: 0 0 0 .28rem rgba(33,137,93,.18); }
.branch-chip strong, .branch-chip small { display: block; }
.branch-chip strong { font-size: .7rem; }
.branch-chip small { margin-top: .12rem; font-size: .55rem; }
.dash-nav { flex: 1; padding: .25rem .7rem 1rem; overflow-y: auto; }
.nav-group { margin-bottom: 1.1rem; }
.nav-group > span { display: block; padding: 0 .55rem .4rem; color: rgba(255,255,255,.32); font-family: var(--mono); font-size: .46rem; letter-spacing: .12em; text-transform: uppercase; }
.dash-nav button { display: grid; grid-template-columns: 1.6rem 1fr auto; gap: .55rem; align-items: center; width: 100%; padding: .64rem .65rem; color: rgba(255,255,255,.68); background: transparent; border: 0; border-radius: .25rem; text-align: left; cursor: pointer; transition: color .2s ease, background .2s ease; }
.dash-nav button:hover { color: white; background: rgba(255,255,255,.06); }
.dash-nav button.active { color: var(--ink); background: var(--jade); }
.nav-icon { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; font-size: .8rem; }
.dash-nav button strong { font-size: .68rem; font-weight: 600; }
.nav-badge { min-width: 1.25rem; padding: .14rem .3rem; color: var(--ink); background: var(--lacquer); border-radius: 999px; font-family: var(--mono); font-size: .46rem; text-align: center; }
.sidebar-foot { display: grid; grid-template-columns: auto 1fr; gap: .65rem; align-items: center; padding: 1rem; border-top: 1px solid rgba(255,255,255,.12); }
.preview-branch-details { display: grid; gap: .28rem; padding: .9rem 1rem; color: rgba(255,255,255,.48); border-top: 1px solid rgba(255,255,255,.12); font-size: .5rem; font-style: normal; line-height: 1.45; }
.preview-branch-details strong { color: rgba(255,255,255,.82); font-size: .56rem; }
.preview-branch-details a { color: var(--jade); }
.user-avatar { display: grid; place-items: center; width: 2.35rem; height: 2.35rem; color: var(--ink); background: var(--orchid); border-radius: 50%; font-size: .62rem; font-weight: 700; }
.sidebar-foot strong, .sidebar-foot span { display: block; }
.sidebar-foot strong { color: white; font-size: .64rem; }
.sidebar-foot span { margin-top: .1rem; color: rgba(255,255,255,.42); font-size: .5rem; }

.dash-workspace { grid-column: 2; min-width: 0; }
.dash-topbar { position: sticky; top: 2.3rem; z-index: 80; display: grid; grid-template-columns: 1fr auto; align-items: center; min-height: 5.3rem; padding: .7rem clamp(1rem,3vw,2.2rem); background: rgba(243,240,245,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.page-identity > span { display: block; color: var(--muted); font-family: var(--mono); font-size: .48rem; letter-spacing: .11em; text-transform: uppercase; }
.page-identity h1 { margin: .15rem 0 0; font-family: var(--display); font-size: clamp(1.9rem,3vw,2.8rem); font-weight: 400; letter-spacing: -.035em; line-height: 1; }
.topbar-actions { display: flex; align-items: center; gap: .55rem; }
.command-button, .notification-button, .mobile-nav-button { border: 1px solid var(--line); background: white; cursor: pointer; }
.command-button { padding: .65rem .8rem; color: var(--muted); font-size: .62rem; }
.command-button span { font-family: var(--mono); }
.notification-button { display: grid; place-items: center; width: 2.65rem; height: 2.65rem; color: white; background: var(--ink); border-color: var(--ink); border-radius: 50%; font-family: var(--mono); font-size: .52rem; }
.role-switcher, .branch-switcher { display: grid; grid-template-columns: auto auto; align-items: center; gap: .4rem; padding: .38rem .45rem .38rem .7rem; background: white; border: 1px solid var(--line); }
.role-switcher > span, .branch-switcher > span { color: var(--muted); font-family: var(--mono); font-size: .46rem; text-transform: uppercase; }
.role-switcher select, .branch-switcher select { min-width: 8.5rem; padding: .3rem .45rem; color: var(--ink); background: var(--orchid); border: 0; font-size: .62rem; font-weight: 700; }
.branch-switcher select { min-width: 7rem; background: var(--jade); }
.backend-chip { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.65rem; padding: .45rem .65rem; color: var(--muted); background: white; border: 1px solid var(--line); font-size: .53rem; font-weight: 700; cursor: pointer; }
.backend-chip i { width: .55rem; height: .55rem; background: #b57035; border-radius: 50%; box-shadow: 0 0 0 .22rem rgba(181,112,53,.13); }
.backend-chip.online i { background: #21895d; box-shadow: 0 0 0 .22rem rgba(33,137,93,.13); }
.backend-chip.offline i { background: var(--red); box-shadow: 0 0 0 .22rem rgba(179,64,85,.12); }
.mobile-nav-button { display: none; width: 2.6rem; height: 2.6rem; padding: .65rem; }
.mobile-nav-button span { display: block; width: 100%; height: 1px; margin: .32rem 0; background: currentColor; }
.dash-main { padding: clamp(1rem,3vw,2.2rem); outline: none; }

.page-intro { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: end; margin-bottom: 1.2rem; }
.page-intro p { max-width: 46rem; margin: .35rem 0 0; color: var(--muted); font-size: .75rem; }
.page-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.45rem; padding: .55rem .8rem; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: .2rem; font-size: .62rem; font-weight: 700; cursor: pointer; transition: transform .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button.primary { color: white; background: var(--ink); border-color: var(--ink); }
.button.jade { color: var(--ink); background: var(--jade); border-color: var(--jade-deep); }
.button.danger { color: var(--red); border-color: rgba(179,64,85,.35); }
.button.small { min-height: 2rem; padding: .4rem .6rem; font-size: .55rem; }
.button:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.eyebrow { color: var(--muted); font-family: var(--mono); font-size: .47rem; letter-spacing: .1em; text-transform: uppercase; }

.metric-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: .75rem; margin-bottom: .75rem; }
.metric { position: relative; min-height: 9.5rem; padding: 1rem; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.metric::after { position: absolute; right: -2rem; bottom: -3rem; width: 7rem; height: 7rem; background: var(--tone-soft,var(--orchid)); border-radius: 50%; content:""; }
.metric > span { position: relative; z-index: 1; color: var(--muted); font-family: var(--mono); font-size: .48rem; letter-spacing: .08em; text-transform: uppercase; }
.metric strong { position: relative; z-index: 1; display: block; margin: 1.55rem 0 .25rem; font-family: var(--display); font-size: clamp(2.3rem,4vw,3.6rem); font-weight: 400; letter-spacing: -.04em; line-height: .9; }
.metric p { position: relative; z-index: 1; margin: 0; color: var(--muted); font-size: .6rem; }
.metric p b { color: var(--tone,var(--jade-deep)); }

.content-grid { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(17rem,.75fr); gap: .75rem; }
.content-grid.equal { grid-template-columns: 1fr 1fr; }
.panel { background: var(--surface); border: 1px solid var(--line); }
.panel-header { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; padding: 1rem; border-bottom: 1px solid var(--line); }
.panel-header h2, .panel-header h3 { margin: .18rem 0 0; font-family: var(--display); font-size: 1.55rem; font-weight: 400; letter-spacing: -.025em; line-height: 1; }
.panel-header p { margin: .25rem 0 0; color: var(--muted); font-size: .62rem; }
.panel-body { padding: 1rem; }
.panel.flush .panel-body { padding: 0; }

.data-table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .64rem; }
.data-table th { padding: .65rem .8rem; color: var(--muted); background: #f7f5f8; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: .44rem; font-weight: 500; letter-spacing: .08em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: .75rem .8rem; border-bottom: 1px solid #ece8ef; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: rgba(207,196,255,.12); }
.data-table strong, .data-table small { display: block; }
.data-table small { margin-top: .12rem; color: var(--muted); font-size: .52rem; }
.table-action { padding: .35rem .5rem; color: var(--ink); background: transparent; border: 1px solid var(--line); font-size: .52rem; cursor: pointer; }
.table-action:hover { background: var(--orchid); border-color: var(--ink); }
.status { display: inline-flex; align-items: center; gap: .3rem; padding: .32rem .5rem; border-radius: 999px; font-family: var(--mono); font-size: .45rem; letter-spacing: .04em; white-space: nowrap; }
.status::before { width: .4rem; height: .4rem; background: currentColor; border-radius: 50%; content:""; }
.status.confirmed, .status.paid, .status.sent, .status.live, .status.active, .status.completed, .status.verified, .status.pass, .status.opened, .status.connected { color: #1e7258; background: #def2ea; }
.status.part-paid, .status.queued, .status.waitlist, .status.recovery, .status.due, .status.review-required, .status.setup-required, .status.sample-only, .status.not-run, .status.pending, .status.sign-in-required { color: #876321; background: #f5e8cc; }
.status.cancelled, .status.failed, .status.no-show, .status.low, .status.offline, .status.attention { color: #a3344d; background: #f4dde2; }
.status.in-service, .status.checked-in, .status.draft { color: #4e4b9a; background: #e5e1fb; }

.live-flow { display: grid; }
.flow-item { display: grid; grid-template-columns: 4.2rem 1fr auto; gap: .75rem; align-items: center; padding: .82rem 1rem; border-bottom: 1px solid var(--line); }
.flow-item:last-child { border-bottom: 0; }
.flow-time { font-family: var(--display); font-size: 1.1rem; }
.flow-copy strong, .flow-copy span { display: block; }
.flow-copy strong { font-size: .67rem; }
.flow-copy span { margin-top: .12rem; color: var(--muted); font-size: .54rem; }

.alert-list { display: grid; gap: .55rem; }
.alert { display: grid; grid-template-columns: auto 1fr auto; gap: .7rem; align-items: center; padding: .75rem; background: #f7f5f8; border: 1px solid #e8e3eb; }
.alert-icon { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; background: var(--tone-soft,var(--orchid)); border-radius: 50%; }
.alert strong, .alert span { display: block; }
.alert strong { font-size: .62rem; }
.alert span { margin-top: .12rem; color: var(--muted); font-size: .5rem; }

.filter-row { display: flex; flex-wrap: wrap; gap: .4rem; padding: .75rem; border-bottom: 1px solid var(--line); }
.filter-row button { padding: .45rem .65rem; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; font-size: .52rem; cursor: pointer; }
.filter-row button.active { color: white; background: var(--ink); border-color: var(--ink); }

.calendar-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .75rem; }
.calendar-toolbar h2 { margin: 0; font-family: var(--display); font-size: 2rem; font-weight: 400; }
.staff-calendar { display: grid; grid-template-columns: 4.5rem repeat(5,minmax(9rem,1fr)); min-width: 55rem; }
.calendar-scroll { overflow-x: auto; }
.cal-header { min-height: 4.5rem; padding: .7rem; background: #f7f5f8; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal-header strong, .cal-header span { display: block; }
.cal-header strong { font-size: .65rem; }
.cal-header span { color: var(--muted); font-size: .48rem; }
.cal-time { display: grid; place-items: start center; min-height: 4.3rem; padding-top: .6rem; color: var(--muted); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: .45rem; }
.cal-cell { position: relative; min-height: 4.3rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal-event { position: absolute; inset: .25rem; display: grid; align-content: center; padding: .35rem .45rem; color: var(--ink); background: var(--event,var(--orchid)); border-left: 3px solid var(--event-line,var(--ink)); overflow: hidden; cursor: pointer; }
.cal-event strong, .cal-event span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-event strong { font-size: .53rem; }
.cal-event span { font-size: .44rem; }

.card-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: .75rem; }
.feature-card { display: flex; flex-direction: column; min-height: 13rem; padding: 1rem; background: var(--surface); border: 1px solid var(--line); }
.feature-card > span { color: var(--muted); font-family: var(--mono); font-size: .45rem; letter-spacing: .08em; text-transform: uppercase; }
.feature-card h3 { margin: auto 0 .65rem; font-family: var(--display); font-size: 1.65rem; font-weight: 400; letter-spacing: -.025em; line-height: .95; }
.feature-card p { margin: 0 0 .8rem; color: var(--muted); font-size: .58rem; }
.feature-card footer { display: flex; justify-content: space-between; align-items: end; padding-top: .7rem; border-top: 1px solid var(--line); }
.feature-card footer strong { font-family: var(--display); font-size: 1.3rem; font-weight: 400; }

.staff-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: .75rem; }
.staff-card { padding: 1rem; background: white; border: 1px solid var(--line); }
.staff-head { display: grid; grid-template-columns: auto 1fr auto; gap: .65rem; align-items: center; }
.avatar { display: grid; place-items: center; width: 2.9rem; height: 2.9rem; color: white; background: var(--avatar,var(--ink)); border-radius: 50%; font-size: .62rem; font-weight: 700; }
.staff-head strong, .staff-head span { display: block; }
.staff-head strong { font-size: .68rem; }
.staff-head span { color: var(--muted); font-size: .5rem; }
.staff-score { font-family: var(--display); font-size: 1.4rem; }
.mini-stats { display: grid; grid-template-columns: repeat(3,1fr); margin: 1rem 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.mini-stats > div { padding: .55rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mini-stats span, .mini-stats strong { display: block; }
.mini-stats span { color: var(--muted); font-family: var(--mono); font-size: .4rem; text-transform: uppercase; }
.mini-stats strong { margin-top: .2rem; font-size: .62rem; }

.pos-layout { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(19rem,.8fr); gap: .75rem; }
.bill-items { display: grid; }
.bill-item { display: grid; grid-template-columns: 1fr auto; gap: .3rem 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.bill-item strong { font-size: .65rem; }
.bill-item span { color: var(--muted); font-size: .52rem; }
.bill-item > b { grid-row: 1 / 3; grid-column: 2; align-self: center; font-family: var(--display); font-size: 1.1rem; font-weight: 400; }
.bill-summary { display: grid; gap: .45rem; margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--ink); }
.bill-summary > div { display: flex; justify-content: space-between; font-size: .6rem; }
.bill-summary > div.total { margin-top: .3rem; padding-top: .65rem; border-top: 1px solid var(--line); font-family: var(--display); font-size: 1.45rem; }
.payment-methods { display: grid; grid-template-columns: repeat(3,1fr); gap: .45rem; }
.payment-methods label { position: relative; }
.payment-methods input { position: absolute; opacity: 0; }
.payment-methods span { display: block; padding: .7rem; border: 1px solid var(--line); font-size: .56rem; text-align: center; cursor: pointer; }
.payment-methods input:checked + span { background: var(--jade); border-color: var(--jade-deep); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.form-grid label { display: grid; gap: .32rem; }
.form-grid label.full { grid-column: 1 / -1; }
.form-grid label > span { color: var(--muted); font-family: var(--mono); font-size: .45rem; letter-spacing: .06em; text-transform: uppercase; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; padding: .7rem .75rem; color: var(--ink); background: white; border: 1px solid var(--line); resize: vertical; }
.form-grid input[type="checkbox"] { width: auto; padding: 0; vertical-align: middle; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: var(--jade-deep); outline: 0; }
.form-note { margin: .65rem 0 0; color: var(--muted); font-size: .55rem; }
.form-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }
.inline-error { margin: .7rem 0 0; color: var(--red); font-size: .58rem; }

.chart { display: flex; align-items: end; gap: .45rem; height: 12rem; padding: 1rem 1rem 0; border-bottom: 1px solid var(--line); }
.bar { position: relative; flex: 1; min-width: 1.2rem; height: var(--height); background: var(--tone,var(--jade)); }
.bar span { position: absolute; right: 0; bottom: -1.2rem; left: 0; color: var(--muted); font-family: var(--mono); font-size: .4rem; text-align: center; }
.progress-list { display: grid; gap: .75rem; }
.progress-item { display: grid; grid-template-columns: 8rem 1fr auto; gap: .7rem; align-items: center; font-size: .56rem; }
.progress-track { height: .45rem; background: #ebe7ef; overflow: hidden; }
.progress-track i { display: block; width: var(--width); height: 100%; background: var(--tone,var(--jade-deep)); }

.settings-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: .75rem; }
.setting-card { padding: 1rem; background: white; border: 1px solid var(--line); }
.setting-card.wide { grid-column: 1 / -1; }
.setting-card header { margin-bottom: 1rem; }
.setting-card h3 { margin: .2rem 0 0; font-family: var(--display); font-size: 1.6rem; font-weight: 400; }
.segmented { display: grid; grid-template-columns: repeat(2,1fr); gap: .4rem; }
.segmented button { padding: .7rem; background: transparent; border: 1px solid var(--line); font-size: .58rem; cursor: pointer; }
.segmented button.active { color: white; background: var(--ink); border-color: var(--ink); }
.qr-layout { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 1.2rem; align-items: center; }
.qr-preview { display: grid; place-items: center; width: 13rem; min-height: 13rem; padding: 1rem; background: white; border: 1px solid var(--line); }
.qr-preview canvas, .qr-preview img { max-width: 100%; height: auto; }
.qr-placeholder { display: grid; place-items: center; width: 100%; height: 11rem; color: var(--muted); background: #f5f2f7; font-family: var(--mono); font-size: .52rem; text-align: center; }
.qr-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }

.readiness-list { display: grid; gap: .55rem; }
.readiness-row { display: grid; grid-template-columns: minmax(10rem,1fr) auto minmax(11rem,1fr); gap: .8rem; align-items: center; padding: .72rem; background: #f7f5f8; border: 1px solid #e8e3eb; }
.readiness-row strong, .readiness-row small { display: block; }
.readiness-row strong { font-size: .62rem; }
.readiness-row small { color: var(--muted); font-size: .5rem; }
.readiness-row > small { text-align: right; }
.connection-board { display: grid; grid-template-columns: repeat(4,1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.connection-board > div { min-height: 6.5rem; padding: .8rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.connection-board span, .connection-board strong, .connection-board small { display: block; }
.connection-board span { color: var(--muted); font-family: var(--mono); font-size: .42rem; text-transform: uppercase; }
.connection-board strong { margin-top: 1.1rem; font-size: .68rem; }
.connection-board small { margin-top: .2rem; color: var(--muted); font-size: .48rem; }
.payment-setup { display: grid; grid-template-columns: minmax(13rem,.7fr) minmax(0,1.3fr); gap: 1rem; align-items: start; }
.payment-qr-card { display: grid; place-items: center; min-height: 15rem; padding: 1rem; background: #f7f5f8; border: 1px solid var(--line); text-align: center; }
.payment-qr-card img { display: block; width: min(100%,13rem); max-height: 16rem; object-fit: contain; }
.payment-qr-card span { max-width: 13rem; color: var(--muted); font-size: .55rem; }
.payment-qr-card small { display: block; margin-top: .45rem; color: var(--muted); font-size: .46rem; overflow-wrap: anywhere; }
.payment-qr-inline { display: grid; grid-template-columns: 6rem 1fr; gap: .8rem; align-items: center; margin-top: .85rem; padding: .75rem; background: #f7f5f8; border: 1px solid var(--line); }
.payment-qr-inline img { width: 6rem; height: 6rem; object-fit: contain; background: white; }
.payment-qr-inline strong, .payment-qr-inline span { display: block; }
.payment-qr-inline strong { font-size: .62rem; }
.payment-qr-inline span { margin-top: .2rem; color: var(--muted); font-size: .5rem; }
.acceptance-options { display: grid; grid-template-columns: repeat(3,1fr); gap: .5rem; }
.acceptance-options label { display: flex; gap: .45rem; align-items: center; min-height: 2.8rem; padding: .6rem; background: #f7f5f8; border: 1px solid var(--line); font-size: .56rem; }
.prototype-callout { margin: .8rem 0 0; padding: .72rem .8rem; color: #765421; background: #fff5dd; border-left: 3px solid var(--amber); font-size: .54rem; }

.dash-modal-shell, .dash-drawer-shell, .command-shell { position: fixed; inset: 0; z-index: 500; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .25s ease, visibility .25s ease; }
.dash-modal-shell[aria-hidden="false"], .dash-drawer-shell[aria-hidden="false"], .command-shell[aria-hidden="false"] { opacity: 1; visibility: visible; pointer-events: auto; }
.modal-scrim { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; background: rgba(10,7,13,.62); border: 0; backdrop-filter: blur(6px); }
.dash-modal { position: absolute; top: 50%; left: 50%; width: min(calc(100% - 2rem),39rem); max-height: calc(100% - 3rem); overflow-y: auto; color: var(--ink); background: var(--paper); box-shadow: 0 2rem 7rem rgba(0,0,0,.35); transform: translate(-50%,-46%); transition: transform .35s var(--ease); }
.dash-modal-shell[aria-hidden="false"] .dash-modal { transform: translate(-50%,-50%); }
.dash-modal > header, .dash-drawer > header { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.2rem; background: var(--paper); border-bottom: 1px solid var(--line); }
.dash-modal header span, .dash-drawer header span { color: var(--muted); font-family: var(--mono); font-size: .45rem; letter-spacing: .08em; text-transform: uppercase; }
.dash-modal header h2, .dash-drawer header h2 { margin: .15rem 0 0; font-family: var(--display); font-size: 1.8rem; font-weight: 400; line-height: 1; }
.dash-modal header button, .dash-drawer header button { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0; background: transparent; border: 1px solid var(--ink); border-radius: 50%; font-size: 1.2rem; cursor: pointer; }
.modal-body, .drawer-body { padding: 1.2rem; }
.dash-drawer { position: absolute; top: 0; right: 0; width: min(100%,36rem); height: 100%; overflow-y: auto; color: var(--ink); background: var(--paper); box-shadow: -2rem 0 7rem rgba(0,0,0,.3); transform: translateX(102%); transition: transform .45s var(--ease); }
.dash-drawer-shell[aria-hidden="false"] .dash-drawer { transform: translateX(0); }

.profile-hero { display: grid; grid-template-columns: auto 1fr; gap: .8rem; align-items: center; padding: 1rem; background: var(--orchid); }
.profile-hero h3, .profile-hero p { margin: 0; }
.profile-hero h3 { font-family: var(--display); font-size: 1.7rem; font-weight: 400; }
.profile-hero p { margin-top: .15rem; font-size: .58rem; }
.detail-stats { display: grid; grid-template-columns: repeat(3,1fr); margin: .8rem 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.detail-stats > div { padding: .7rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.detail-stats span, .detail-stats strong { display: block; }
.detail-stats span { color: var(--muted); font-family: var(--mono); font-size: .42rem; text-transform: uppercase; }
.detail-stats strong { margin-top: .25rem; font-size: .68rem; }
.timeline { display: grid; margin-top: 1rem; border-top: 1px solid var(--line); }
.timeline-item { position: relative; padding: .85rem 0 .85rem 1.3rem; border-bottom: 1px solid var(--line); }
.timeline-item::before { position: absolute; top: 1.05rem; left: .15rem; width: .5rem; height: .5rem; background: var(--jade-deep); border-radius: 50%; content:""; }
.timeline-item strong, .timeline-item span { display: block; }
.timeline-item strong { font-size: .62rem; }
.timeline-item span { margin-top: .15rem; color: var(--muted); font-size: .52rem; }

.command-palette { position: absolute; top: 12%; left: 50%; width: min(calc(100% - 2rem),40rem); padding: 1rem; color: var(--ink); background: var(--paper); transform: translateX(-50%); }
.command-palette h2 { margin: 0 0 .7rem; font-family: var(--display); font-size: 1.8rem; font-weight: 400; }
.command-palette label { display: grid; grid-template-columns: auto 1fr; gap: .6rem; align-items: center; padding: .8rem; background: white; border: 1px solid var(--line); }
.command-palette label span { font-family: var(--mono); font-size: .5rem; }
.command-palette input { width: 100%; background: transparent; border: 0; outline: 0; }
.command-result { display: grid; grid-template-columns: 1fr auto; width: 100%; padding: .7rem .8rem; background: transparent; border: 0; border-bottom: 1px solid var(--line); text-align: left; cursor: pointer; }
.command-result:hover { background: var(--orchid); }
.command-result strong, .command-result span { display: block; }
.command-result strong { font-size: .62rem; }
.command-result span { color: var(--muted); font-size: .5rem; }
.command-result kbd { align-self: center; font-family: var(--mono); font-size: .45rem; }

.dash-toast { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 900; max-width: 22rem; padding: .8rem 1rem; color: var(--ink); background: var(--jade); border: 1px solid var(--jade-deep); box-shadow: 0 1rem 3rem rgba(0,0,0,.22); font-size: .62rem; font-weight: 700; opacity: 0; pointer-events: none; transform: translateY(1rem); transition: opacity .25s ease, transform .25s var(--ease); }
.dash-toast.visible { opacity: 1; transform: translateY(0); }

.invoice-print { display: none; }
.invoice-sheet { width: 100%; max-width: 46rem; margin: 0 auto; padding: 2rem; color: #111; background: white; font-family: Arial,sans-serif; }
.invoice-brand { display: flex; justify-content: space-between; gap: 2rem; padding-bottom: 1.2rem; border-bottom: 2px solid #111; }
.invoice-brand h1 { margin: 0; font-family: Georgia,serif; font-size: 2rem; font-weight: 400; }
.invoice-brand p { margin: .2rem 0 0; font-size: .7rem; }
.invoice-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 1rem 0; }
.invoice-meta strong, .invoice-meta span { display: block; }
.invoice-meta span { margin-bottom: .2rem; font-size: .6rem; text-transform: uppercase; }
.invoice-lines { width: 100%; border-collapse: collapse; font-size: .72rem; }
.invoice-lines th, .invoice-lines td { padding: .6rem; border-bottom: 1px solid #ccc; text-align: left; }
.invoice-lines th:last-child, .invoice-lines td:last-child { text-align: right; }
.invoice-totals { display: grid; gap: .4rem; width: 17rem; margin: 1rem 0 1rem auto; }
.invoice-totals > div { display: flex; justify-content: space-between; }
.invoice-totals .grand { padding-top: .5rem; border-top: 2px solid #111; font-size: 1rem; font-weight: 700; }
.invoice-footer { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #ccc; font-size: .65rem; text-align: center; }

/* Public operations boundary: contains no application shell or customer data. */
.access-page { min-height: 100vh; color: #f8f0e3; background: #18130d; }
.access-page::before { position: fixed; inset: 0; background: radial-gradient(circle at 82% 12%, rgba(196,147,63,.18), transparent 32rem), linear-gradient(115deg, transparent 0 58%, rgba(255,255,255,.025) 58% 59%, transparent 59%); pointer-events: none; content: ""; }
.access-boundary { position: relative; z-index: 1; display: grid; min-height: 100vh; padding: clamp(1rem, 4vw, 3.5rem); }
.access-card { display: grid; grid-template-rows: auto 1fr auto; width: min(100%, 82rem); min-height: calc(100vh - clamp(2rem, 8vw, 7rem)); margin: auto; border: 1px solid rgba(231,202,133,.38); background: rgba(24,19,13,.86); box-shadow: 0 2rem 7rem rgba(0,0,0,.28); }
.access-brand { display: flex; justify-content: space-between; align-items: center; gap: 2rem; min-height: 6.5rem; padding: 1.4rem clamp(1.2rem,4vw,3.5rem); border-bottom: 1px solid rgba(231,202,133,.25); }
.access-brand img { display: block; width: min(19rem,55vw); height: auto; }
.access-brand span { color: #d7b263; font-family: var(--mono); font-size: .62rem; letter-spacing: .18em; white-space: nowrap; }
.access-copy { align-self: center; max-width: 66rem; padding: clamp(3rem,8vw,7rem) clamp(1.2rem,7vw,6rem); }
.access-copy .eyebrow { margin: 0 0 1.2rem; color: #d7b263; }
.access-copy h1 { max-width: 16ch; margin: 0; color: #fffaf2; font-family: var(--display); font-size: clamp(2.7rem,6vw,6.4rem); font-weight: 400; letter-spacing: -.045em; line-height: .92; }
.access-copy > p:not(.eyebrow) { max-width: 58rem; margin: 1.2rem 0 0; color: rgba(255,250,242,.66); font-size: clamp(.92rem,1.4vw,1.08rem); line-height: 1.75; }
.access-requirements { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; margin: clamp(2rem,5vw,4.5rem) 0 2rem; background: rgba(231,202,133,.24); border: 1px solid rgba(231,202,133,.24); }
.access-requirements article { min-height: 10.5rem; padding: 1.25rem; background: #1d1710; }
.access-requirements article > span { display: block; margin-bottom: 2.2rem; color: #d7b263; font-family: var(--mono); font-size: .58rem; }
.access-requirements strong { display: block; color: #fffaf2; font-family: var(--display); font-size: 1.35rem; font-weight: 400; }
.access-requirements p { margin: .45rem 0 0; color: rgba(255,250,242,.55); font-size: .76rem; line-height: 1.6; }
.access-action { display: inline-flex; align-items: center; justify-content: space-between; gap: 2.5rem; min-height: 3.5rem; padding: .85rem 1rem .85rem 1.2rem; color: #18130d; background: #d7b263; font-size: .75rem; font-weight: 700; transition: background .25s ease, transform .25s var(--ease); }
.access-action:hover { background: #e7ca85; transform: translateY(-2px); }
.access-action span { font-size: 1.05rem; }
.access-footer { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1px; background: rgba(231,202,133,.24); border-top: 1px solid rgba(231,202,133,.24); }
.access-footer > div { min-height: 7rem; padding: 1.25rem clamp(1rem,3vw,2rem); background: #1d1710; }
.access-footer span { display: block; margin-bottom: .55rem; color: #d7b263; font-family: var(--mono); font-size: .52rem; letter-spacing: .12em; }
.access-footer address, .access-footer a, .access-footer p { margin: 0; color: rgba(255,250,242,.74); font-size: .73rem; font-style: normal; line-height: 1.55; }

@media (max-width: 1120px) {
  :root { --sidebar: 15.5rem; }
  .metric-grid { grid-template-columns: repeat(2,1fr); }
  .card-grid, .staff-grid { grid-template-columns: repeat(2,1fr); }
  .content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .demo-ribbon { grid-template-columns: 1fr auto; }
  .demo-ribbon p { display: none; }
  .dashboard-shell { display: block; }
  .dash-sidebar { top: 2.3rem; width: min(86vw,19rem); transform: translateX(-102%); transition: transform .35s var(--ease); }
  body.sidebar-open { overflow: hidden; }
  body.sidebar-open .dash-sidebar { transform: translateX(0); }
  .dash-brand > button, .mobile-nav-button { display: block; }
  .dash-workspace { min-width: 0; }
  .dash-topbar { top: 2.3rem; grid-template-columns: auto 1fr auto; gap: .7rem; }
  .command-button { display: none; }
  .role-switcher > span { display: none; }
  .branch-switcher > span { display: none; }
  .role-switcher select { min-width: 6.5rem; }
  .branch-switcher select { min-width: 5.8rem; }
  .backend-chip span { display: none; }
  .backend-chip { width: 2.65rem; justify-content: center; padding: 0; }
  .page-intro { grid-template-columns: 1fr; gap: .8rem; }
  .page-actions { justify-content: flex-start; }
  .pos-layout { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .setting-card.wide { grid-column: auto; }
  .connection-board { grid-template-columns: repeat(2,1fr); }
  .payment-setup { grid-template-columns: 1fr; }
  .access-requirements { grid-template-columns: 1fr; }
  .access-requirements article { min-height: 0; }
  .access-requirements article > span { margin-bottom: 1rem; }
  .access-footer { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .demo-ribbon { padding-right: .65rem; padding-left: .65rem; }
  .demo-ribbon span { font-size: .45rem; }
  .demo-ribbon a { font-size: .52rem; }
  .dash-topbar { padding: .55rem .75rem; }
  .page-identity > span { display: none; }
  .page-identity h1 { max-width: 10rem; font-size: 1.5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .notification-button { display: none; }
  .backend-chip { display: none; }
  .branch-switcher { display: none; }
  .dash-main { padding: .75rem; }
  .metric-grid, .card-grid, .staff-grid, .content-grid.equal { grid-template-columns: 1fr; }
  .metric { min-height: 8.5rem; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid label.full { grid-column: auto; }
  .qr-layout { grid-template-columns: 1fr; }
  .qr-preview { width: min(100%,13rem); }
  .detail-stats { grid-template-columns: 1fr; }
  .payment-methods { grid-template-columns: repeat(2,1fr); }
  .readiness-row { grid-template-columns: 1fr auto; }
  .readiness-row > small { grid-column: 1 / -1; text-align: left; }
  .acceptance-options { grid-template-columns: 1fr; }
  .connection-board { grid-template-columns: 1fr; }
  .access-boundary { padding: 0; }
  .access-card { min-height: 100vh; border: 0; }
  .access-brand { align-items: flex-start; padding: 1.2rem; }
  .access-brand span { max-width: 8rem; white-space: normal; text-align: right; }
  .access-copy { padding: 3.5rem 1.2rem; }
  .access-copy h1 { font-size: clamp(2.65rem,13vw,4rem); }
}

@media print {
  body > *:not(.invoice-print) { display: none !important; }
  .invoice-print { display: block !important; }
  .invoice-sheet { max-width: none; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
