/* ====================================================================
   CLINIVO - application styles
   File: assets/css/app.css
   Works alongside Tailwind. Tailwind handles layout utilities,
   this file owns the design tokens and the repeated components.
   ==================================================================== */

/* -------------------------------------------------------------- tokens */
:root {
  --bg:            #f7f6f2;
  --bg-soft:       #efeee8;
  --surface:       #ffffff;
  --surface-2:     #fbfaf7;

  --brand-50:      #e9f5f1;
  --brand-100:     #cfe9e1;
  --brand-200:     #a3d4c6;
  --brand-400:     #3f9d86;
  --brand-500:     #19796380;
  --brand:         #0f6b57;
  --brand-dark:    #0a4c3e;
  --brand-ink:     #073a2f;

  --amber:         #b45309;
  --amber-soft:    #fdf1e3;
  --red:           #b42318;
  --red-soft:      #fdecea;
  --green:         #15803d;
  --green-soft:    #e8f6ec;
  --violet:        #6d28d9;
  --violet-soft:   #f1ecfd;

  --ink:           #11201c;
  --ink-2:         #3d514b;
  --muted:         #6b7d77;
  --line:          #e3e5e0;
  --line-strong:   #cfd3cd;

  --radius:        14px;
  --radius-sm:     10px;
  --radius-lg:     20px;
  --shadow-sm:     0 1px 2px rgba(17, 32, 28, .05);
  --shadow:        0 2px 8px rgba(17, 32, 28, .06), 0 1px 2px rgba(17, 32, 28, .04);
  --shadow-lg:     0 12px 32px rgba(17, 32, 28, .12);

  --font:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono:          'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --header-h:      60px;
  --tabbar-h:      62px;
}

/* -------------------------------------------------------------- base */
* { -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}

h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.015em; color: var(--ink); }
h1 { font-size: 26px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.mono, .tabular { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.muted      { color: var(--muted); }
.ink-2      { color: var(--ink-2); }
.text-brand { color: var(--brand); }

::selection { background: var(--brand-100); }

/* -------------------------------------------------------------- layout */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 16px calc(var(--tabbar-h) + 28px);
  width: 100%;
}
@media (min-width: 1024px) {
  .page { padding: 26px 28px 40px; }
}

.page-head { margin-bottom: 18px; }
.page-head .title-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.page-sub { color: var(--muted); font-size: 14px; margin-top: 2px; }

/* -------------------------------------------------------------- header */
.app-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.app-header-inner {
  max-width: 1180px; margin: 0 auto;
  height: var(--header-h);
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px;
}
.brand-mark {
  display: flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 17px; letter-spacing: -.02em; color: var(--ink);
}
.brand-mark:hover { text-decoration: none; }
.brand-dot { width: 6px; height: 6px; border-radius: 50%; background: #e8833a; margin-left: -4px; }
.brand-logo {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: 15px; font-weight: 700;
}

.pill-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 13px;
  border-radius: 11px; border: 1px solid transparent;
  background: var(--brand-50); color: var(--brand-ink);
  font-size: 14px; font-weight: 550; white-space: nowrap;
  cursor: pointer; transition: background .15s;
}
.pill-btn:hover { background: var(--brand-100); text-decoration: none; }
.pill-btn.danger { background: var(--red); color: #fff; }
.pill-btn.danger:hover { background: #9b1c12; }

.bell { position: relative; }
.bell-dot {
  position: absolute; top: -5px; right: -5px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}

/* -------------------------------------------------------------- cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-pad   { padding: 16px; }
.card-head  {
  padding: 13px 16px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.card-head h3 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 650; }
.card-head.solid { background: var(--brand); border-bottom: none; border-radius: var(--radius) var(--radius) 0 0; }
.card-head.solid h3 { color: #fff; }

.tile {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 14px 12px;
  box-shadow: var(--shadow-sm);
}
.tile .num {
  font-family: var(--mono); font-size: 30px; font-weight: 600;
  letter-spacing: -.02em; line-height: 1.1; color: var(--ink);
}
.tile .lbl {
  margin-top: 4px; font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); font-weight: 600;
}
.tile.accent .num  { color: var(--brand); }
.tile.warn .num    { color: var(--amber); }

/* -------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 42px; padding: 0 17px;
  border-radius: var(--radius-sm); border: 1px solid transparent;
  font-family: inherit; font-size: 14.5px; font-weight: 600;
  cursor: pointer; transition: background .15s, border-color .15s, transform .06s;
  white-space: nowrap; text-decoration: none;
}
.btn:hover      { text-decoration: none; }
.btn:active     { transform: translateY(1px); }
.btn:disabled,
.btn.is-loading { opacity: .6; pointer-events: none; }

.btn-primary  { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-soft     { background: var(--brand-50); color: var(--brand-ink); }
.btn-soft:hover { background: var(--brand-100); }
.btn-ghost    { background: transparent; color: var(--ink-2); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-danger   { background: var(--red); color: #fff; }
.btn-danger:hover { background: #9b1c12; }
.btn-danger-soft { background: #fff; color: var(--red); border-color: #f3c9c4; }
.btn-danger-soft:hover { background: var(--red-soft); }
.btn-warn     { background: #a1550b; color: #fff; }
.btn-warn:hover { background: #8a470a; }

.btn-sm  { height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 9px; }
.btn-lg  { height: 50px; padding: 0 22px; font-size: 16px; border-radius: 12px; }
.btn-block { width: 100%; }

.btn-dashed {
  width: 100%; height: 48px; border: 1px dashed var(--brand-200);
  background: var(--brand-50); color: var(--brand-ink);
  border-radius: var(--radius); font-weight: 600; font-size: 15px;
  display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
}
.btn-dashed:hover { background: var(--brand-100); text-decoration: none; }

/* -------------------------------------------------------------- forms */
.field { margin-bottom: 14px; }
.label {
  display: block; margin-bottom: 6px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  letter-spacing: .01em;
}
.label .req { color: var(--red); }

.input, .select, .textarea {
  width: 100%; height: 44px; padding: 0 13px;
  background: #fff; color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
}
.textarea { height: auto; min-height: 84px; padding: 11px 13px; line-height: 1.5; resize: vertical; }
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236b7d77' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; padding-right: 34px;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(15, 107, 87, .12);
}
.input::placeholder, .textarea::placeholder { color: #9aa8a3; }
.input:disabled, .select:disabled { background: var(--bg-soft); color: var(--muted); }

.input-error { border-color: #e5a9a2; }
.help  { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.error { font-size: 12.5px; color: var(--red); margin-top: 5px; }

.input-group { display: flex; }
.input-group .addon {
  display: grid; place-items: center; padding: 0 12px;
  background: var(--bg-soft); border: 1px solid var(--line-strong); border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-size: 14px; color: var(--muted); font-weight: 550;
}
.input-group .input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* MPIN boxes */
.pin-row { display: flex; gap: 10px; justify-content: center; }
.pin-box {
  width: 54px; height: 60px; text-align: center;
  font-family: var(--mono); font-size: 24px; font-weight: 600;
  border: 1px solid var(--line-strong); border-radius: 12px; background: #fff;
}
.pin-box:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15,107,87,.14); }

/* chips / option buttons */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 15px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: #fff;
  font-size: 14px; font-weight: 550; color: var(--ink-2); cursor: pointer;
  transition: all .14s;
}
.chip:hover { border-color: var(--brand-200); }
.chip.is-on {
  background: var(--brand-50); border-color: var(--brand);
  color: var(--brand-ink); font-weight: 600;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 9px; }

/* big number option (5 / 15 / 30 / 60) */
.opt-num {
  flex: 1 1 0; min-width: 72px;
  padding: 13px 8px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: #fff;
  text-align: center; cursor: pointer; transition: all .14s;
}
.opt-num .v { font-family: var(--mono); font-size: 24px; font-weight: 600; color: var(--ink); line-height: 1.1; }
.opt-num .u { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.opt-num.is-on { background: var(--brand-50); border-color: var(--brand); }
.opt-num.is-on .v { color: var(--brand); }

/* radio card */
.radio-card {
  display: flex; gap: 11px; padding: 14px;
  border: 1px solid var(--line-strong); border-radius: 12px;
  background: #fff; cursor: pointer; transition: all .14s;
}
.radio-card:hover { border-color: var(--brand-200); }
.radio-card.is-on { border-color: var(--brand); background: var(--brand-50); }
.radio-card.is-on.danger { border-color: var(--red); background: var(--red-soft); }
.radio-card .dot {
  flex: 0 0 auto; width: 19px; height: 19px; margin-top: 2px;
  border: 2px solid var(--line-strong); border-radius: 50%;
  display: grid; place-items: center;
}
.radio-card.is-on .dot { border-color: var(--brand); }
.radio-card.is-on .dot::after { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }
.radio-card.is-on.danger .dot { border-color: var(--red); }
.radio-card.is-on.danger .dot::after { background: var(--red); }
.radio-card .t { font-weight: 600; font-size: 15px; }
.radio-card .d { font-size: 13.5px; color: var(--muted); margin-top: 2px; line-height: 1.45; }

/* -------------------------------------------------------------- badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 7px;
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  white-space: nowrap;
}
.badge-slate  { background: #eef0ee; color: #52605b; }
.badge-teal   { background: var(--brand-50); color: var(--brand-ink); }
.badge-green  { background: var(--green-soft); color: var(--green); }
.badge-amber  { background: var(--amber-soft); color: var(--amber); }
.badge-red    { background: var(--red-soft); color: var(--red); }
.badge-violet { background: var(--violet-soft); color: var(--violet); }

.live-dot {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--brand);
}
.live-dot::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand); animation: pulse 1.8s ease-in-out infinite;
}
.live-dot.off { color: var(--muted); }
.live-dot.off::before { background: var(--muted); animation: none; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* -------------------------------------------------------------- queue rows */
.slot-list { display: flex; flex-direction: column; }

.slot-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 15px; border-bottom: 1px solid var(--line);
  background: #fff; transition: background .12s;
}
.slot-row:last-child { border-bottom: none; }
.slot-row.is-free { background: var(--surface-2); cursor: pointer; }
.slot-row.is-free:hover { background: var(--brand-50); }
.slot-row.is-priority { background: #fffaf2; }
.slot-row.is-done { opacity: .62; }
.slot-row.is-cancelled { opacity: .5; }
.slot-row.is-cancelled .pname { text-decoration: line-through; }

.slot-time {
  flex: 0 0 72px; font-family: var(--mono); font-size: 13.5px;
  color: var(--ink-2); font-variant-numeric: tabular-nums;
}
.slot-token {
  flex: 0 0 auto; font-family: var(--mono); font-size: 15px;
  font-weight: 600; color: var(--brand);
  border-bottom: 2px solid var(--brand-100); padding-bottom: 1px;
}
.slot-main { flex: 1 1 auto; min-width: 0; }
.pname { font-weight: 600; font-size: 15px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pmeta { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.slot-actions { display: flex; gap: 7px; flex-wrap: wrap; padding: 0 15px 13px 15px; }

@media (max-width: 560px) {
  .slot-row { flex-wrap: wrap; }
  .slot-main { flex-basis: 100%; order: 3; margin-top: 2px; }
}

/* -------------------------------------------------------------- tables */
.tbl-wrap { overflow-x: auto; border-radius: var(--radius); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
table.tbl th {
  text-align: left; padding: 10px 13px;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); font-weight: 650;
  background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.tbl td { padding: 11px 13px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tbody tr:hover { background: var(--surface-2); }
table.tbl td.num, table.tbl th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------------- notices */
.notice {
  display: flex; gap: 11px; padding: 14px 15px;
  border-radius: var(--radius); font-size: 14.5px; line-height: 1.5;
  border: 1px solid transparent;
}
.notice strong { font-weight: 650; }
.notice-info    { background: var(--brand-50);  border-color: var(--brand-100); color: var(--brand-ink); }
.notice-success { background: var(--green-soft); border-color: #c6e7d0; color: #14532d; }
.notice-warning { background: var(--amber-soft); border-color: #f5ddbf; color: #7c3a06; }
.notice-error   { background: var(--red-soft);   border-color: #f3c9c4; color: #7f1d1d; }

.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty .ico { font-size: 34px; opacity: .35; margin-bottom: 10px; }
.empty .t { font-weight: 600; color: var(--ink-2); font-size: 15.5px; }
.empty .d { font-size: 14px; margin-top: 4px; }

/* -------------------------------------------------------------- date strip */
.datebar {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 9px 10px; box-shadow: var(--shadow-sm);
}
.datebar .nav {
  width: 38px; height: 38px; border-radius: 10px; border: none;
  background: var(--brand-50); color: var(--brand-ink);
  font-size: 17px; cursor: pointer; display: grid; place-items: center;
}
.datebar .nav:hover { background: var(--brand-100); }
.datebar .label { text-align: center; line-height: 1.25; }
.datebar .label .d1 { font-weight: 650; font-size: 16px; }
.datebar .label .d2 { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

/* -------------------------------------------------------------- tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(180%) blur(10px);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 10px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); font-weight: 650; text-decoration: none;
}
.tabbar a.is-on { color: var(--brand); }
.tabbar a svg { width: 21px; height: 21px; }
@media (min-width: 1024px) { .tabbar { display: none; } .page { padding-bottom: 40px; } }

/* -------------------------------------------------------------- drawer */
.drawer-back {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(10, 24, 20, .45);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.drawer-back.is-open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 61;
  width: min(300px, 84vw); background: var(--brand-ink); color: #dff0ea;
  transform: translateX(-100%); transition: transform .22s ease;
  display: flex; flex-direction: column; overflow-y: auto;
}
.drawer.is-open { transform: none; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.drawer-group {
  padding: 16px 16px 6px; font-size: 10.5px; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(223,240,234,.5); font-weight: 650;
}
.drawer a.item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px; color: #cde4dc; font-size: 15px; text-decoration: none;
}
.drawer a.item:hover { background: rgba(255,255,255,.06); color: #fff; }
.drawer a.item.is-on { background: #9ff0cf; color: #063026; font-weight: 650; margin: 0 10px; border-radius: 10px; }
.drawer a.item svg { width: 19px; height: 19px; opacity: .8; }
.drawer hr { border: none; border-top: 1px solid rgba(255,255,255,.1); margin: 10px 0; }

/* -------------------------------------------------------------- modal */
.modal-back {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(10, 24, 20, .5);
  display: none; align-items: center; justify-content: center; padding: 16px;
  overflow-y: auto;
}
.modal-back.is-open { display: flex; }
.modal {
  background: var(--surface); border-radius: var(--radius-lg);
  width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modal-in .18s ease;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.985); } }
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 18px 20px 12px;
}
.modal-head h2 { font-size: 20px; }
.modal-body { padding: 0 20px 4px; }
.modal-foot {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 16px 20px 20px;
}
.modal-x {
  width: 34px; height: 34px; border-radius: 9px; border: none;
  background: var(--bg-soft); color: var(--ink-2); font-size: 17px; cursor: pointer;
  display: grid; place-items: center; flex: 0 0 auto;
}
.modal-x:hover { background: var(--line); }

.sheet-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0 12px; color: var(--muted);
  font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 650;
}
.sheet-divider::before, .sheet-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}

/* -------------------------------------------------------------- toast */
#toasts {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + 18px); z-index: 90;
  display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100vw - 32px));
}
.toast {
  padding: 12px 15px; border-radius: 12px; color: #fff;
  background: #16302a; box-shadow: var(--shadow-lg);
  font-size: 14.5px; font-weight: 550;
  animation: toast-in .18s ease;
}
.toast.err { background: var(--red); }
.toast.ok  { background: #11614a; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* -------------------------------------------------------------- misc */
.spin {
  width: 15px; height: 15px; flex: 0 0 auto;
  border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; display: inline-block; animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, var(--bg-soft) 25%, #f4f3ef 50%, var(--bg-soft) 75%);
  background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 8px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.avatar {
  width: 42px; height: 42px; flex: 0 0 auto;
  border-radius: 11px; background: var(--brand-50); color: var(--brand-ink);
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
}

.copybox {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px 12px;
}
.copybox code {
  flex: 1 1 auto; font-family: var(--mono); font-size: 13px;
  color: var(--brand-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.switch { position: relative; width: 50px; height: 29px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track {
  position: absolute; inset: 0; background: var(--line-strong);
  border-radius: 999px; cursor: pointer; transition: background .18s;
}
.switch .track::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 23px; height: 23px; border-radius: 50%; background: #fff;
  box-shadow: var(--shadow-sm); transition: transform .18s;
}
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(21px); }

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.hr { height: 1px; background: var(--line); border: none; margin: 16px 0; }

@media print {
  .app-header, .tabbar, .no-print, .btn { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border-color: #ddd; }
}
