/* FASTSIGNS Workshop — Apple-inspired UI. Light + dark, desktop sidebar + mobile tab bar. */

:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #fbfbfd;
  --glass: rgba(255, 255, 255, 0.72);
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.14);
  --fill: rgba(118, 118, 128, 0.12);
  --fill-2: rgba(118, 118, 128, 0.08);
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-soft: rgba(0, 113, 227, 0.1);
  --brand: #c8102e;
  --green: #248a3d;  --green-soft: rgba(52, 199, 89, 0.14);
  --orange: #c93400; --orange-soft: rgba(255, 149, 0, 0.16);
  --red: #d70015;    --red-soft: rgba(255, 59, 48, 0.12);
  --purple: #8944ab; --purple-soft: rgba(175, 82, 222, 0.13);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --sidebar-w: 248px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}

/* Light is the default. Dark mode is opt-in: <html data-theme="dark"> is set from the
   choice on the Account page (or from the device setting when "Match device" is picked). */
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #232325;
    --glass: rgba(28, 28, 30, 0.72);
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #8e8e93;
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.16);
    --fill: rgba(118, 118, 128, 0.24);
    --fill-2: rgba(118, 118, 128, 0.16);
    --accent: #0a84ff;
    --accent-hover: #409cff;
    --accent-soft: rgba(10, 132, 255, 0.18);
    --green: #30d158;  --green-soft: rgba(48, 209, 88, 0.16);
    --orange: #ff9f0a; --orange-soft: rgba(255, 159, 10, 0.16);
    --red: #ff453a;    --red-soft: rgba(255, 69, 58, 0.16);
    --purple: #bf5af2; --purple-soft: rgba(191, 90, 242, 0.16);
    --shadow: none;
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.47 var(--font);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { letter-spacing: -0.02em; margin: 0; }
h2 { font-size: 21px; font-weight: 600; }
h3 { font-size: 17px; font-weight: 600; }
p { margin: 0 0 12px; }
.muted { color: var(--text-2); }
.small { font-size: 14px; }
.ic { width: 20px; height: 20px; flex: none; }

/* ------------------------------------------------------------- shell */
.shell { display: flex; min-height: 100vh; min-height: 100dvh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
  display: flex; flex-direction: column;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-right: 1px solid var(--line);
  padding: 18px 12px 12px; z-index: 40;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: var(--brand); color: #fff; font-weight: 800; font-size: 14px; letter-spacing: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 15px; letter-spacing: 0.02em; }
.brand-text span { font-size: 14px; color: var(--text-2); }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav-section { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); padding: 16px 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--text); font-weight: 500; font-size: 16px;
}
.nav-item .ic { color: var(--accent); width: 22px; height: 22px; }
.nav-item:hover { background: var(--fill-2); text-decoration: none; }
.nav-item.active { background: var(--accent); color: #fff; }
.nav-item.active .ic { color: #fff; }

.sidebar-foot { display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--line); padding-top: 12px; }
.sidebar-foot form { margin: 0; }
.app-version { font-size: 12px; color: var(--text-3); text-align: center; padding-top: 8px; font-variant-numeric: tabular-nums; }
.bare .app-version { margin-top: 24px; }
.me { flex: 1; display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; color: var(--text); min-width: 0; }
.me:hover, .me.active { background: var(--fill-2); text-decoration: none; }
.me-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.me-text strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-text span { font-size: 13px; color: var(--text-2); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, #8e8e93, #636366); color: #fff; font-size: 12px; font-weight: 600;
}

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px;
  padding: 14px 32px; min-height: 64px;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.topbar-title { font-size: 24px; font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.content { padding: 28px 32px 64px; } /* full width: use the whole screen */
.menu-btn { margin-left: -8px; }
.scrim { display: none; }
.tabbar { display: none; }

/* ------------------------------------------------------------- controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 17px; border-radius: 980px; border: 0; cursor: pointer;
  background: var(--accent); color: #fff; font: 500 15px var(--font); letter-spacing: -0.01em;
  white-space: nowrap; transition: background .15s, transform .05s;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn .ic { width: 18px; height: 18px; }
.btn-secondary { background: var(--fill); color: var(--text); }
.btn-secondary:hover { background: var(--line-strong); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-lg { height: 46px; padding: 0 24px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-sm { height: 30px; padding: 0 12px; font-size: 13px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: transparent; color: var(--text-2);
}
.icon-btn:hover { background: var(--fill); color: var(--text); }
.ic-sun { display: none; }
[data-theme="dark"] .ic-sun { display: block; }
[data-theme="dark"] .ic-moon { display: none; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-width: 0; }
.field > label, .field-label { font-size: 14px; font-weight: 500; color: var(--text-2); }
.field .hint { font-size: 13px; color: var(--text-3); }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font: 16px var(--font); /* 16px stops iOS zoom-on-focus */
  transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none;
}
.textarea { min-height: 88px; resize: vertical; }
.select {
  padding-right: 36px; cursor: pointer;
  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.5 6 6.5l5-5' fill='none' stroke='%2386868b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input-group { display: flex; align-items: stretch; }
.input-group .addon {
  display: flex; align-items: center; padding: 0 14px; border: 1px solid var(--line-strong); border-right: 0;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm); background: var(--fill-2); font-weight: 700; font-size: 16px;
}
.input-group .input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; margin-bottom: 12px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.span-2 { grid-column: span 2; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stack > * + * { margin-top: 20px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 8px; }
.form-actions .spacer { flex: 1; }

/* ------------------------------------------------------------- cards */
.card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--line); padding: 24px;
}
.card + .card { margin-top: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head p { margin: 2px 0 0; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush .card-head { padding: 20px 24px 0; }
.section-title { font-size: 13px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.05em; margin: 28px 0 10px; }

.hero { margin-bottom: 24px; }
.hero h2 { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; }
.hero p { color: var(--text-2); font-size: 18px; margin: 4px 0 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); color: var(--text); display: block; }
a.stat:hover { text-decoration: none; border-color: var(--line-strong); }
.stat .stat-label { font-size: 14px; color: var(--text-2); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.stat .stat-value { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .stat-sub { font-size: 13px; color: var(--text-3); }
.stat.tone-red .stat-value { color: var(--red); }
.stat.tone-orange .stat-value { color: var(--orange); }
.stat.tone-green .stat-value { color: var(--green); }

.actions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 28px; }
.action-tile {
  display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--text);
  transition: transform .15s, box-shadow .15s;
}
.action-tile:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.action-tile .tile-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.action-tile .tile-icon .ic { width: 24px; height: 24px; }
.action-tile strong { display: block; font-size: 15px; }
.action-tile span.muted { font-size: 13px; }
.action-tile.primary { background: var(--accent); color: #fff; border-color: transparent; }
.action-tile.primary .muted { color: rgba(255,255,255,.8); }
.action-tile.primary .tile-icon { background: rgba(255,255,255,.2); color: #fff; }
.tone-blue   { background: var(--accent-soft); color: var(--accent); }
.tone-green  { background: var(--green-soft); color: var(--green); }
.tone-orange { background: var(--orange-soft); color: var(--orange); }
.tone-purple { background: var(--purple-soft); color: var(--purple); }

/* ------------------------------------------------------------- tables & lists */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em;
  padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--fill-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .nowrap { white-space: nowrap; }
.table .strong { font-weight: 600; }
.table tr.clickable { cursor: pointer; }
.card.flush .table th:first-child, .card.flush .table td:first-child { padding-left: 24px; }
.card.flush .table th:last-child, .card.flush .table td:last-child { padding-right: 24px; }

.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 980px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill-gray   { background: var(--fill); color: var(--text-2); }
.pill-blue   { background: var(--accent-soft); color: var(--accent); }
.pill-green  { background: var(--green-soft); color: var(--green); }
.pill-orange { background: var(--orange-soft); color: var(--orange); }
.pill-red    { background: var(--red-soft); color: var(--red); }
.pill-purple { background: var(--purple-soft); color: var(--purple); }
.code-badge { font-weight: 800; font-variant-numeric: tabular-nums; }

.segmented { display: inline-flex; background: var(--fill); padding: 2px; border-radius: 10px; gap: 2px; flex-wrap: wrap; }
.segmented a { padding: 7px 15px; border-radius: 8px; color: var(--text); font-size: 14px; font-weight: 500; }
.segmented a:hover { text-decoration: none; background: var(--fill-2); }
.segmented .seg-btn { padding: 6px 14px; border-radius: 8px; color: var(--text); font: 500 13px var(--font); background: none; border: 0; cursor: pointer; }
.segmented .seg-btn.active { background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.segmented a.active { background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .input, .toolbar .select { width: auto; min-height: 40px; padding-top: 8px; padding-bottom: 8px; font-size: 15px; }
.toolbar .grow { flex: 1; min-width: 180px; }
.search { position: relative; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-3); }
.search .input { padding-left: 34px; width: 100%; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 600; }

.bar-row { display: grid; grid-template-columns: minmax(120px, 200px) 1fr auto; gap: 12px; align-items: center; padding: 7px 0; font-size: 14px; }
.bar-track { height: 10px; background: var(--fill-2); border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 6px; }

.empty { text-align: center; padding: 48px 24px; color: var(--text-2); }
.empty h2 { color: var(--text); margin-bottom: 6px; }
.empty .ic { width: 40px; height: 40px; color: var(--text-3); margin-bottom: 8px; }

.flash { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-weight: 500; }
.flash-success { background: var(--green-soft); color: var(--green); }
.flash-error { background: var(--red-soft); color: var(--red); }
.flash-info { background: var(--accent-soft); color: var(--accent); }
.notice { padding: 12px 16px; border-radius: var(--radius-sm); background: var(--orange-soft); color: var(--text); font-size: 14px; margin-bottom: 16px; }

/* ------------------------------------------------------------- auth / installer */
.bare { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card.wide { max-width: 640px; }
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo .brand-mark { width: 56px; height: 56px; border-radius: 16px; font-size: 20px; margin: 0 auto 14px; }
.auth-logo h1 { font-size: 26px; font-weight: 700; }
.auth-logo p { color: var(--text-2); margin: 4px 0 0; }
.checklist { list-style: none; padding: 0; margin: 0 0 16px; }
.checklist li { display: flex; gap: 8px; align-items: center; padding: 4px 0; font-size: 14px; }
.checklist .ok { color: var(--green); }
.checklist .bad { color: var(--red); }
.code-box { font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--fill-2); padding: 12px; border-radius: 10px; white-space: pre-wrap; word-break: break-all; }

/* ------------------------------------------------------------- label editor */
.label-editor { display: flex; flex-direction: column; gap: 24px; } /* preview on top: the label is short and wide */
.preview-pane { order: -1; }
.lbl-ph { color: #b8b8b8 !important; }
.preview-stage {
  background: repeating-conic-gradient(var(--fill-2) 0 25%, transparent 0 50%) 0 0 / 16px 16px;
  border-radius: var(--radius); padding: 24px; display: flex; justify-content: center; border: 1px solid var(--line); overflow: hidden;
}
.preview-scaler { transform-origin: top left; }
.preview-pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.preview-pager[hidden] { display: none; }
.preview-pager .icon-btn { background: var(--fill); color: var(--text); }
.preview-pager .icon-btn:disabled { opacity: .35; cursor: default; }
.ic.flip { transform: scaleX(-1); }
.preview-stage:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--accent-soft); }
.preview-meta { font-size: 12px; color: var(--text-3); text-align: center; margin-top: 10px; }
.rep-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rep-chip { border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); border-radius: 980px; padding: 8px 14px; font: 500 14px var(--font); cursor: pointer; }
.rep-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.center-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.center-card { border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--text); border-radius: 14px; padding: 10px 12px; text-align: left; cursor: pointer; font-family: var(--font); }
.center-card strong { display: block; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.center-card span { font-size: 12px; color: var(--text-2); }
.center-card.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* The label itself is sized in real inches so it prints true to size. Pure black for thermal printers.
   Default is horizontal 5" x 2" (label_width_in / label_height_in in config.php).
   Three columns: center | order details | review QR. */
.label {
  --lw: 5in; --lh: 2in;
  width: var(--lw); height: var(--lh); background: #fff; color: #000;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; letter-spacing: 0;
  padding: 0.1in 0.12in; display: flex; gap: 7pt; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.18); line-height: 1.15;
}
.lbl-k { font-size: 5.5pt; font-weight: 800; text-transform: uppercase; letter-spacing: 0.6pt; }

/* Left: center */
.lbl-center { width: 1.22in; flex: none; display: flex; flex-direction: column; align-items: flex-start; padding-right: 7pt; border-right: 1.25pt solid #000; min-width: 0; }
.lbl-wordmark { font-weight: 900; font-size: 10.5pt; letter-spacing: -0.3pt; line-height: 1; }
.lbl-wordmark sup { font-size: 4.5pt; font-weight: 400; }
.lbl-code {
  font-weight: 900; font-size: 22pt; line-height: 0.95; border: 2pt solid #000; border-radius: 4pt;
  padding: 1pt 5pt; margin: 3pt 0; text-align: center; font-variant-numeric: tabular-nums;
  white-space: nowrap; /* the box always fits its number, e.g. 2450 */
}
.lbl-fulfill {
  align-self: stretch; margin-bottom: 3pt; padding: 2pt 3pt; background: #000; color: #fff; border-radius: 3pt;
  font-size: 13pt; font-weight: 900; text-transform: uppercase; text-align: center; letter-spacing: 0.3pt; line-height: 1.05;
  white-space: nowrap; -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.lbl-center-name { font-size: 6.5pt; font-weight: 700; overflow-wrap: anywhere; }
.lbl-addr { font-size: 5.8pt; margin-top: auto; line-height: 1.25; overflow-wrap: anywhere; }

/* Middle: order details */
.lbl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2pt; }
.lbl-order-no { font-size: 19pt; font-weight: 900; letter-spacing: -0.3pt; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lbl-customer { font-size: 8pt; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbl-customer strong { font-weight: 800; }
.lbl-part { font-size: 8pt; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.lbl-partno { font-weight: 900; font-size: 9pt; margin-right: 2pt; }
.lbl-notes { font-size: 6.5pt; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbl-meta { margin-top: auto; display: flex; justify-content: space-between; align-items: baseline; gap: 6pt; font-size: 6.5pt; border-top: 0.75pt solid #000; padding-top: 2pt; }
.lbl-meta > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.lbl-meta strong { font-weight: 800; }
.lbl-date { flex: none; }

/* Right: part count + review QR */
.lbl-side { width: 0.92in; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: space-between; text-align: center; }
.lbl-pkg { font-size: 6.5pt; font-weight: 800; text-transform: uppercase; border: 1.25pt solid #000; border-radius: 3pt; padding: 0 4pt; white-space: nowrap; }
.lbl-pkg b { font-size: 10pt; font-weight: 900; }
.lbl-qr { width: 0.92in; height: 0.92in; flex: none; margin-top: auto; }
.lbl-qr svg { width: 100%; height: 100%; display: block; }
.lbl-cta { font-size: 6.5pt; font-weight: 800; line-height: 1.1; margin-top: 2pt; }
[data-wrap].is-empty { display: none; }

/* Parts list in the label form */
.parts-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.part-row { display: flex; align-items: center; gap: 8px; }
.part-row .input { flex: 1; min-width: 0; }
.part-row .input.part-ref { flex: 0 0 76px; text-align: center; }
.part-no { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--fill); font-size: 13px; font-weight: 700; }
.part-row.previewing .part-no { background: var(--accent); color: #fff; }

#print-area { display: none; }

@media print {
  @page { margin: 0; }
  html, body { background: #fff !important; margin: 0; }
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block; }
  #print-area .label { box-shadow: none; page-break-after: always; break-after: page; }
  #print-area .label:last-child { page-break-after: auto; break-after: auto; }
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow-lg); background: var(--surface); padding-top: calc(18px + env(safe-area-inset-top)); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 35; }
  .main { margin-left: 0; }
  .menu-btn { display: grid; margin-left: -8px; }
  .topbar { padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); min-height: 56px; }
  .topbar-title { font-size: 18px; text-align: center; }
  .topbar .btn { height: 32px; padding: 0 12px; font-size: 13px; }
  .content { padding: 18px 16px calc(100px + env(safe-area-inset-bottom)); }
  .card { padding: 18px; border-radius: 16px; }
  .card.flush .card-head { padding: 16px 18px 0; }
  .hero h2 { font-size: 26px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat { padding: 14px 16px; }
  .stat .stat-value { font-size: 22px; }
  .actions-grid { grid-template-columns: 1fr; gap: 10px; }
  .bar-row { grid-template-columns: 1fr auto; }
  .bar-row .bar-track { grid-column: 1 / -1; grid-row: 2; }
  .form-actions .btn { flex: 1; }
  .table .hide-sm { display: none; }

  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a, .tabbar button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0;
    color: var(--text-3); font: 500 10px var(--font); background: none; border: 0; cursor: pointer;
  }
  .tabbar a:hover { text-decoration: none; }
  .tabbar .ic { width: 24px; height: 24px; }
  .tabbar a.active { color: var(--accent); }
  .tabbar .tab-primary { justify-content: center; }
  .tab-plus { width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,113,227,.4); margin-top: -14px; }
  .preview-stage { padding: 14px; }
}

.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; }
.center-card:has(input:focus-visible) { box-shadow: 0 0 0 4px var(--accent-soft); border-color: var(--accent); }
.center-card { position: relative; }

/* Pick up / Install / Delivery / Ship choice on the label form */
.choice-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.choice-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border: 1.5px solid var(--line-strong); border-radius: 14px; background: var(--surface); cursor: pointer; font-weight: 600; font-size: 14px; text-align: center; }
.choice-card .ic { color: var(--accent); }
.choice-card.active { border-color: var(--accent); background: var(--accent); color: #fff; }
.choice-card.active .ic { color: #fff; }
.choice-card:has(input:focus-visible) { box-shadow: 0 0 0 4px var(--accent-soft); }
@media (max-width: 480px) { .choice-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Type-ahead suggestions (customer directory) */
.suggest-field { position: relative; }
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% - 10px); z-index: 20; max-height: 280px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 4px;
}
.suggest[hidden] { display: none; }
.suggest-item { display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); font: 16px var(--font); cursor: pointer; }
.suggest-item small { color: var(--text-2); font-size: 12px; }
.suggest-item:hover, .suggest-item.active { background: var(--accent-soft); }
.suggest-item mark { background: none; color: inherit; font-weight: 700; }
.suggest-wrap { position: relative; display: block; flex: 1; min-width: 0; }
.suggest-wrap > .suggest { top: calc(100% + 4px); }

/* Quick-fill chips (most used values) */
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 2px; }
.chips[hidden] { display: none; }
.chips-label { font-size: 12px; color: var(--text-3); font-weight: 600; margin-right: 2px; }
.chip { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); border-radius: 980px; padding: 4px 11px; font: 500 13px var(--font); cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--accent); }

/* "You have an unsaved draft" bar */
.draft-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 18px; border-radius: var(--radius-sm); background: var(--accent-soft); font-size: 14px; font-weight: 500; }
.draft-banner span { flex: 1; min-width: 180px; }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.nav-item.active .nav-badge { background: #fff; color: var(--accent); }
.demo-banner { display: flex; align-items: center; gap: 10px; padding: 10px 16px; margin-bottom: 18px; border-radius: var(--radius-sm); background: var(--orange-soft); color: var(--text); font-size: 15px; }
.demo-banner .ic { color: var(--orange); }

.plain-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.plain-fieldset[disabled] .input, .plain-fieldset[disabled] .select, .plain-fieldset[disabled] .textarea { background: var(--fill-2); color: var(--text-2); cursor: not-allowed; }

/* Pop-up dialogs (e.g. Mark paid) */
.modal { border: 0; padding: 0; background: transparent; max-width: min(620px, calc(100vw - 32px)); width: 100%; color: var(--text); }
.modal::backdrop { background: rgba(0, 0, 0, 0.35); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.modal-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 24px; border: 1px solid var(--line); }
.modal-card h2 { margin-bottom: 4px; }

.modal-sm { max-width: min(420px, calc(100vw - 32px)); }
.confirm-text { font-size: 16px; margin: 0 0 8px; }
.form-error { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--red-soft); color: var(--red); font-weight: 500; margin-bottom: 14px; }
.form-error[hidden] { display: none; }

/* Toast messages (bottom center; above the phone tab bar) */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { pointer-events: auto; padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 15px; box-shadow: var(--shadow-lg); background: var(--text); color: var(--bg); animation: toast-in .2s ease; transition: opacity .3s, transform .3s; }
.toast-error { background: var(--red); color: #fff; }
.toast.hide { opacity: 0; transform: translateY(8px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.fade-out { opacity: 0; transition: opacity .25s; }
@media (max-width: 860px) { .toasts { bottom: calc(90px + env(safe-area-inset-bottom)); } }

/* Desktop: collapsible sidebar (menu button in the top bar) */
@media (min-width: 861px) {
  .sidebar, .main { transition: transform .22s ease, margin-left .22s ease; }
  .sidebar-collapsed .sidebar { transform: translateX(-100%); }
  .sidebar-collapsed .main { margin-left: 0; }
}

/* Footer: all centers */
.site-footer { display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: center; padding: 18px 32px 28px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.site-footer strong { font-weight: 600; color: var(--text); }
.site-footer a { color: var(--text-2); }
@media (max-width: 860px) { .site-footer { padding: 16px 16px calc(100px + env(safe-area-inset-bottom)); flex-direction: column; align-items: center; text-align: center; } .content { padding-bottom: 24px; } }

.activity-details { margin-top: 4px; font-size: 13px; color: var(--text-2); }
.activity-details summary { cursor: pointer; color: var(--accent); width: max-content; }
.activity-details dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 6px 0 0; }
.activity-details dt { font-weight: 600; text-transform: capitalize; }
.activity-details dd { margin: 0; overflow-wrap: anywhere; }

/* Center switcher pop-up */
.switch-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.switch-option { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border: 1.5px solid var(--line-strong); border-radius: 14px; background: var(--surface); color: var(--text); font: 15px var(--font); cursor: pointer; text-align: left; }
.switch-option strong { font-size: 18px; }
.switch-option span { font-size: 13px; color: var(--text-2); }
.switch-option.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* Call list */
.fu-list { display: flex; flex-direction: column; gap: 12px; }
.fu-card { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 18px 20px; }
.card + .fu-card, .fu-card + .fu-card { margin-top: 0; }
.fu-main { flex: 1; min-width: 260px; }
.fu-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 12px; cursor: pointer; }
.radio-row input { width: 18px; height: 18px; accent-color: var(--accent); }
.radio-row small { margin-left: auto; }
.radio-row:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

/* Quote checker */
.quote-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
.quote-grid > div { background: var(--fill-2); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.quote-grid span { font-size: 13px; color: var(--text-2); font-weight: 500; }
.quote-grid strong { font-size: 20px; letter-spacing: -0.02em; }
.quote-grid small { font-size: 12px; color: var(--text-3); }
.quote-grid .warn { background: var(--red-soft); }
.quote-grid .warn strong { color: var(--red); }
.quote-grid .good { background: var(--green-soft); }
.quote-grid .good strong { color: var(--green); }

.rate { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.rate .bar-track { width: 70px; }
.card-head h2 .ic { color: var(--orange); vertical-align: -3px; }

/* Sidebar footer: name on top, then [center switcher] ... [theme] [sign out] */
.sidebar-foot { flex-wrap: wrap; row-gap: 4px; }
.sidebar-foot .me { flex: 1 1 100%; }
.foot-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 136px; height: 32px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 980px; background: var(--surface); color: var(--text); font: 500 13px var(--font); cursor: pointer; }
.foot-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.foot-chip .ic { width: 16px; height: 16px; color: var(--accent); flex: none; }
.foot-chip .chev-down { transform: rotate(90deg); color: var(--text-3); width: 14px; height: 14px; }
.foot-chip:hover { border-color: var(--accent); }
.foot-spacer { flex: 1; }

.sidebar-foot .icon-btn { width: 32px; height: 32px; }
.sidebar-foot .foot-chip { max-width: 140px; padding: 0 9px; }
.rate .bar-track { width: 120px; }

/* Install the app */
.install-card { background: linear-gradient(135deg, var(--accent-soft), var(--surface) 60%); margin-bottom: 20px; }
.install-card h2 { margin: 0; }
.steps { padding-left: 20px; margin: 10px 0; line-height: 1.7; }
[data-install-app][hidden] { display: none !important; }

/* Settings: label layout choice */
.layout-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.layout-option { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1.5px solid var(--line-strong); border-radius: 14px; cursor: pointer; }
.layout-option.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.layout-option:has(input:focus-visible) { box-shadow: 0 0 0 4px var(--accent-soft); }

/* ===== Epson 4" x 1.5" order tag (Settings → Label layout) =====
   Columns: [vertical FASTSIGNS] | [center · QR codes · sales consultant] || [invoice # / product # / sign maker] [fulfillment band]
   Sizes are in inches/points so it prints true to size. */
.label.lbl-epson {
  position: relative; padding: 0.085in 0.09in; gap: 0; display: flex; align-items: stretch;
  font-family: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", Arial, sans-serif; line-height: 1.05;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
/* Black border with a white margin all round, like the sample */
.lbl-epson::after { content: ""; position: absolute; inset: 0.045in; border: 1.2pt solid #000; border-radius: 2pt; pointer-events: none; z-index: 2; }
.lbl-epson > :not(.ep-quotes) { position: relative; z-index: 1; }
/* Faded FASTSIGNS quote marks behind everything */
.ep-quotes { position: absolute; inset: 0.05in; width: calc(100% - 0.1in); height: calc(100% - 0.1in); fill: #000; opacity: 0.07; z-index: 0; }

.ep-brand { width: 0.29in; flex: none; display: flex; align-items: stretch; justify-content: center; padding: 1pt 2.5pt 1pt 0; border-right: 3pt solid #000; }
.ep-logo { width: 100%; height: 100%; display: block; }
.ep-logo text { font-family: Barlow, "Arial Black", Arial, sans-serif; font-weight: 900; font-style: italic; font-size: 64px; fill: #000; letter-spacing: -1px; }
.ep-logo .ep-logo-r { font-family: Arial, sans-serif; font-weight: 400; font-style: normal; font-size: 13px; letter-spacing: 0; }

.ep-info { width: 1.42in; flex: none; display: flex; flex-direction: column; padding: 0 4pt; border-right: 4pt solid #000; min-width: 0; }
.ep-center { padding-bottom: 1.5pt; border-bottom: 0.75pt solid #000; }
.ep-center-name { font-weight: 700; font-size: 8.5pt; white-space: nowrap; overflow: hidden; }
.ep-addr { font-size: 6.8pt; white-space: nowrap; overflow: hidden; }
.ep-qrs { flex: 1; display: flex; align-items: center; gap: 1.5pt; padding: 2.5pt 0; border-bottom: 0.75pt solid #000; min-height: 0; }
.ep-qr { width: 0.47in; height: 0.47in; flex: none; }
.ep-qr svg { width: 100%; height: 100%; display: block; }
.ep-qr-k { writing-mode: vertical-rl; transform: rotate(180deg); font-weight: 800; font-size: 6.4pt; letter-spacing: 0.4pt; line-height: 1; align-self: flex-end; margin-bottom: 3pt; }
.ep-qrs > :nth-child(2) { margin-right: auto; } /* REVIEW: low, next to the left QR, reading up */
.ep-qrs > :nth-child(3) { transform: none; align-self: flex-start; margin: 3pt 0 0; } /* EMAIL: high, next to the right QR, reading down */
.ep-rep { padding-top: 1.5pt; font-size: 6.8pt; }
.ep-rep > div { white-space: nowrap; overflow: hidden; }
.ep-rep-k { font-weight: 700; font-size: 8pt; }

.ep-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3pt; padding: 0 4pt; }
.ep-box { border: 1.25pt solid #000; position: relative; min-width: 0; }
.ep-k { position: absolute; top: 1pt; right: 3pt; font-weight: 500; font-size: 5.8pt; letter-spacing: 0.3pt; line-height: 1; }
.ep-invoice { flex: 1.1; display: flex; align-items: center; padding: 6pt 4pt 0; }
.ep-invoice-no { width: 100%; font-weight: 500; font-size: 31pt; line-height: 0.95; white-space: nowrap; overflow: hidden; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: -0.3pt; }
.ep-row { flex: 1; display: flex; gap: 3pt; min-height: 0; }
.ep-product { width: 1.02in; flex: none; display: flex; }
.ep-p { width: 0.3in; flex: none; background: #000; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 26pt; }
.ep-product-body { flex: 1; min-width: 0; position: relative; display: flex; align-items: center; padding: 6pt 2pt 0; }
.ep-product-no { width: 100%; text-align: center; font-weight: 500; font-size: 29pt; line-height: 0.95; white-space: nowrap; overflow: hidden; }
.ep-maker { flex: 1; display: flex; align-items: center; padding: 6pt 3pt 0; }
.ep-maker-name { width: 100%; text-align: center; font-weight: 500; font-size: 21pt; line-height: 1; white-space: nowrap; overflow: hidden; }
.ep-band { width: 0.33in; flex: none; background: #000; color: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ep-band span { display: block; height: 100%; writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; font-weight: 800; font-style: italic; font-size: 25pt; letter-spacing: 0.2pt; white-space: nowrap; overflow: hidden; line-height: 0.33in; }
.lbl-epson .lbl-ph { color: #b8b8b8 !important; }

/* Tall condensed face for the big values, like the sample (Antonio; falls back to the label font) */
.ep-invoice-no, .ep-product-no, .ep-maker-name, .ep-p { font-family: Antonio, "Barlow Condensed", "Arial Narrow", sans-serif; }
.ep-invoice-no { font-weight: 600; font-size: 36pt; letter-spacing: -0.6pt; line-height: 1; }
.ep-invoice { padding-left: 2pt; padding-right: 2pt; }
.ep-product-no { font-weight: 600; font-size: 34pt; line-height: 1; }
.ep-maker-name { font-weight: 500; font-size: 27pt; line-height: 1.05; }
.ep-p { font-weight: 700; font-size: 32pt; }
.ep-band span { font-size: 25.5pt; letter-spacing: 0.3pt; } /* bold italic Barlow Condensed, like the sample's slanted DELIVERY */

/* v0.5.2 tweaks */
/* Product #: smaller so it sits clear of the box's bottom edge */
.ep-product-no { font-size: 27pt; line-height: 1; }
.ep-product-body { padding: 7pt 2pt 2pt; }
/* Fulfillment band: lighter and less bulky */
.ep-band span { font-weight: 700; font-size: 19pt; letter-spacing: 0.8pt; }
/* Notes inside the invoice box: thin line, small "NOTES:" title. Only shown when there are notes. */
.ep-invoice { flex-direction: column; justify-content: center; align-items: stretch; }
.ep-notes { border-top: 0.5pt solid #000; margin-top: 1.5pt; padding: 1pt 1pt 1.5pt; font-size: 7pt; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.ep-notes-k { font-weight: 700; font-size: 5.8pt; letter-spacing: 0.4pt; }
.ep-invoice:has(.ep-notes:not(.is-empty)) .ep-invoice-no { font-size: 27pt; }

/* Label form: products list (Epson) */
.products-list .part-row { max-width: 320px; }
.product-p { width: 30px; height: 44px; flex: none; display: grid; place-items: center; background: #000; color: #fff; font-weight: 800; border-radius: 8px 0 0 8px; margin-right: -9px; }
.products-list .input.part-ref { flex: 1; text-align: left; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-variant-numeric: tabular-nums; }

/* v0.5.3 */
/* PRODUCT #: centered in the box (the small caption sits in the corner, out of the way) */
.ep-product-body { align-items: center; justify-content: center; padding: 3pt 2pt; }
.ep-product-no { font-size: 25pt; line-height: 1; padding-top: 3pt; }
/* QR codes take the room available, so a two-line center name never squeezes them onto the lines */
.ep-qrs { align-items: stretch; padding: 3pt 0; }
.ep-qr { width: auto; height: auto; max-height: 0.47in; aspect-ratio: 1 / 1; align-self: center; flex: none; }
.ep-qrs { --qr: min(0.47in, 100%); }
.ep-qr { height: min(0.47in, 100%); }
/* Products stepper on the form */
.stepper { display: flex; align-items: stretch; width: max-content; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.stepper .input { width: 72px; border: 0; border-radius: 0; text-align: center; font-size: 18px; font-weight: 700; -moz-appearance: textfield; }
.stepper .input::-webkit-outer-spin-button, .stepper .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper-btn { width: 48px; border: 0; background: var(--fill); color: var(--text); font: 600 22px var(--font); cursor: pointer; }
.stepper-btn:hover { background: var(--accent-soft); color: var(--accent); }

/* Save & Print: tag image status + saved files */
.tag-save-status { margin-top: 12px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--fill-2); font-size: 14px; line-height: 1.6; }
.tag-save-status[hidden], .saved-tags[hidden] { display: none; }
.tag-save-status .err { color: var(--red); }
.saved-tags { margin-top: 12px; font-size: 14px; line-height: 1.7; }
.spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }
.label.for-export { box-shadow: none; }

/* Sent to the printer: green alert */
.tag-save-status.is-success { background: var(--green-soft); color: var(--green); font-weight: 600; display: flex; align-items: center; gap: 10px; }
.tag-save-status.is-success::before { content: "✓"; font-size: 18px; }

/* ============================================================= v0.6: employee portal */
.grow { flex: 1; }
.ellipsis { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.crumbs { font-size: 14px; color: var(--text-2); margin-bottom: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tile-icon.tone-red { background: var(--red-soft); color: var(--red); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-head .section-title { margin-bottom: 10px; }
.avatar.has-photo { padding: 0; overflow: hidden; background: var(--fill); }
.avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-lg { width: 48px; height: 48px; font-size: 17px; }
.avatar-xl { width: 72px; height: 72px; font-size: 24px; }
.select-sm { min-height: 36px; padding-top: 6px; padding-bottom: 6px; font-size: 14px; }
.narrow-card { max-width: 860px; }
.modal-lg { max-width: min(980px, calc(100vw - 32px)); }

/* ---- slideshow */
.carousel { position: relative; display: block; border-radius: 22px; overflow: hidden; margin-bottom: 22px; box-shadow: var(--shadow-lg); background: #111; }
.carousel-track { position: relative; aspect-ratio: 16 / 6; }
.carousel-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility 0s .6s; }
.carousel-slide.active { opacity: 1; visibility: visible; transition: opacity .6s ease; }
.slide { position: absolute; inset: 0; display: flex; align-items: flex-end; overflow: hidden; color: #fff; }
.carousel-empty { aspect-ratio: 16 / 5; text-decoration: none !important; }
.carousel-empty .slide { opacity: .92; }
.slide-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide.has-img.has-text::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.62) 0%, rgba(0,0,0,.25) 55%, rgba(0,0,0,0) 80%); }
.slide-text { position: relative; z-index: 1; padding: clamp(20px, 4.5vw, 56px); max-width: 720px; }
.slide-text h2 { font-size: clamp(24px, 3.6vw, 46px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; text-shadow: 0 2px 18px rgba(0,0,0,.18); }
.slide-text p { font-size: clamp(15px, 1.5vw, 20px); margin: 10px 0 0; opacity: .95; }
.slide-btn { display: inline-block; margin-top: 16px; background: #fff; color: #1d1d1f; font-weight: 600; font-size: 15px; padding: 10px 20px; border-radius: 980px; }
.slide-btn:hover { text-decoration: none; transform: translateY(-1px); }
.slide-cover-link { position: absolute; inset: 0; z-index: 2; }
.carousel-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: rgba(255,255,255,.8); color: #1d1d1f; cursor: pointer; opacity: 0; transition: opacity .2s; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.carousel:hover .carousel-nav, .carousel-nav:focus-visible { opacity: 1; }
.carousel-nav.prev { left: 14px; } .carousel-nav.prev .ic { transform: rotate(180deg); }
.carousel-nav.next { right: 14px; }
.carousel-dots { position: absolute; z-index: 3; bottom: 14px; right: 20px; display: flex; gap: 7px; }
.carousel-dots button { width: 8px; height: 8px; border-radius: 99px; border: 0; padding: 0; background: rgba(255,255,255,.5); cursor: pointer; transition: width .3s, background .3s; }
.carousel-dots button.active { width: 26px; background: #fff; }
.carousel-edit { position: absolute; z-index: 3; top: 14px; right: 14px; display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 600; color: #fff;
  background: rgba(0,0,0,.35); padding: 6px 12px; border-radius: 980px; opacity: 0; transition: opacity .2s; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.carousel-edit .ic { width: 15px; height: 15px; }
.carousel:hover .carousel-edit { opacity: 1; }
.carousel-edit:hover { text-decoration: none; }

.home-greeting { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 6px 0 18px; }
.home-greeting h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; }
.home-greeting p { color: var(--text-2); margin: 2px 0 0; }
.notice-ack { display: flex; align-items: center; gap: 12px; color: var(--text); background: var(--orange-soft); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 18px; }
.notice-ack > .ic:first-child { color: var(--orange); }
.notice-ack > .ic:last-child { margin-left: auto; color: var(--text-3); }
a.notice-ack:hover { text-decoration: none; filter: brightness(.98); }
.empty-inline { display: flex; align-items: center; gap: 14px; color: var(--text-2); font-size: 15px; }
a.empty-inline:hover { text-decoration: none; border-color: var(--accent); }

/* ---- shout-outs */
.shoutouts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 8px; }
.shout { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.shout-top { position: relative; height: 112px; display: flex; align-items: center; justify-content: center; }
.shout-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shout-img + .shout-emoji { position: absolute; left: 14px; bottom: 10px; font-size: 32px; }
.shout-emoji { font-size: 50px; line-height: 1; filter: drop-shadow(0 4px 10px rgba(0,0,0,.18)); position: relative; }
.shout-avatar { position: absolute; right: 14px; bottom: -22px; width: 54px; height: 54px; font-size: 18px; border: 3px solid var(--surface); box-shadow: var(--shadow); z-index: 1; background: var(--accent); color: #fff; }
.shout-kind { position: absolute; left: 14px; top: 12px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #fff; background: rgba(0,0,0,.18); padding: 3px 9px; border-radius: 99px; }
.shout-body { padding: 16px 18px 8px; flex: 1; }
.shout-body h3 { font-size: 18px; line-height: 1.25; padding-right: 50px; }
.shout-body p { color: var(--text-2); font-size: 15px; margin: 6px 0 0; }
.shout-foot { display: flex; align-items: center; gap: 10px; padding: 10px 18px 16px; }
.cheer { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); border-radius: 980px; padding: 6px 14px; font: 600 14px var(--font); cursor: pointer; flex: none; }
.cheer:hover { border-color: var(--accent); }
.cheer.cheered { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.cheer-emoji { display: inline-block; }
.cheer.pop .cheer-emoji { animation: cheerpop .6s ease; }
@keyframes cheerpop { 0% { transform: scale(1); } 40% { transform: scale(1.6) rotate(-12deg); } 100% { transform: scale(1); } }
.cheer-count:empty { display: none; }
.cheer-names { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- knowledge & HR */
.cat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; margin-bottom: 18px; }
.cat-tile { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--text); }
.cat-tile:hover { text-decoration: none; border-color: var(--line-strong); }
.cat-tile.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cat-tile strong { display: block; font-size: 15px; }
.cat-tile .tile-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.article-grid-home { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); margin-bottom: 8px; }
.article-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.article-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.article-card .cover { aspect-ratio: 16 / 9; position: relative; overflow: hidden; }
.cover img, .article-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-art { display: flex; align-items: flex-end; color: #fff; }
.cover-art span { padding: 16px 18px; font-weight: 800; font-size: 22px; line-height: 1.1; letter-spacing: -0.02em; opacity: .95; }
.article-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.article-card-body h3 { font-size: 18px; line-height: 1.25; }
.article-card-body p { font-size: 15px; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-meta { display: flex; gap: 6px; flex-wrap: wrap; }
@media (min-width: 900px) {
  .article-grid > .article-card.featured { grid-column: span 2; flex-direction: row; }
  .article-card.featured .cover { flex: 1.3; aspect-ratio: auto; min-height: 260px; }
  .article-card.featured .article-card-body { flex: 1; justify-content: center; padding: 28px; }
  .article-card.featured h3 { font-size: 26px; }
}

.article { max-width: 780px; margin: 0 auto; }
.article-hero { aspect-ratio: 21 / 8; border-radius: var(--radius); overflow: hidden; margin-bottom: 26px; }
.article-hero.cover-art span { font-size: clamp(26px, 4vw, 40px); padding: 28px; }
.article-head h1 { font-size: clamp(30px, 4vw, 42px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.08; }
.article-summary { font-size: 20px; color: var(--text-2); margin: 10px 0 8px; line-height: 1.4; }
.article-head { margin-bottom: 26px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.article-body { font-size: 18px; line-height: 1.65; }
.article-body > * + * { margin-top: 20px; }
.ab-heading { font-size: 28px; font-weight: 700; letter-spacing: -0.025em; margin-top: 36px !important; line-height: 1.2; }
h3.ab-heading { font-size: 22px; margin-top: 28px !important; }
.ab-text p, .ab-callout p { margin: 0 0 12px; }
.ab-text p:last-child, .ab-callout p:last-child { margin-bottom: 0; }
.ab-text ul, .ab-text ol, .ab-callout ul { padding-left: 24px; margin: 8px 0; }
.ab-image img, .ab-gallery img { width: 100%; height: auto; display: block; border-radius: 14px; }
.ab-image.size-normal { max-width: 520px; margin-left: auto; margin-right: auto; }
.ab-image.size-full { margin-left: calc(50% - min(50vw - 40px, 640px)); margin-right: calc(50% - min(50vw - 40px, 640px)); }
figure { margin: 0; }
figcaption { font-size: 14px; color: var(--text-2); text-align: center; margin-top: 8px; }
.ab-gallery-grid { display: grid; gap: 8px; grid-template-columns: repeat(3, 1fr); }
.ab-gallery.n1 .ab-gallery-grid { grid-template-columns: 1fr; }
.ab-gallery.n2 .ab-gallery-grid, .ab-gallery.n4 .ab-gallery-grid { grid-template-columns: repeat(2, 1fr); }
.ab-gallery-grid img { aspect-ratio: 4 / 3; object-fit: cover; }
.ab-callout { border-radius: 14px; padding: 16px 18px; font-size: 17px; border-left: 4px solid currentColor; }
.ab-callout > strong { display: block; margin-bottom: 4px; }
.ab-callout > div { color: var(--text); }
.ab-callout.tone-info, .callout-edit.tone-info { background: var(--accent-soft); color: var(--accent); }
.ab-callout.tone-success, .callout-edit.tone-success { background: var(--green-soft); color: var(--green); }
.ab-callout.tone-warning, .callout-edit.tone-warning { background: var(--orange-soft); color: var(--orange); }
.ab-callout.tone-danger, .callout-edit.tone-danger { background: var(--red-soft); color: var(--red); }
.ab-checklist { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.ab-checklist ul { list-style: none; padding: 0; margin: 6px 0 0; }
.ab-checklist li { position: relative; padding: 6px 0 6px 32px; border-top: 1px solid var(--line); }
.ab-checklist li:first-child { border-top: 0; }
.ab-checklist li::before { content: "✓"; position: absolute; left: 0; top: 7px; width: 22px; height: 22px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 13px; font-weight: 700; display: grid; place-items: center; }
.ab-quote { margin: 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--brand); font-size: 22px; font-weight: 500; letter-spacing: -0.015em; }
.ab-quote p { margin: 0; }
.ab-quote cite { display: block; margin-top: 8px; font-size: 15px; font-style: normal; color: var(--text-2); }
.ab-video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; }
.ab-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ab-video-frame[hidden] { display: none; }
.ab-button { text-align: center; }
.ab-file { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 14px; color: var(--text); background: var(--surface); }
.ab-file:hover { text-decoration: none; border-color: var(--accent); }
.ab-file > .ic { width: 30px; height: 30px; color: var(--accent); }
.ab-file > span:nth-child(2), .eblock .ab-file > span { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.35; font-size: 16px; }
.ab-file-dl { font-weight: 600; color: var(--accent); font-size: 15px; }
.ab-divider { border: 0; height: 1px; background: var(--line-strong); margin: 32px 0 !important; }
.ack-box { display: flex; align-items: center; gap: 14px; justify-content: space-between; flex-wrap: wrap; margin-top: 34px; }
.ack-box > .ic { color: var(--green); width: 28px; height: 28px; }
.ack-box form { margin: 0; }
.article-readers { max-width: 780px; margin: 24px auto 0; }

/* ---- article editor */
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.editor-side { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 16px; }
.editor-side .card + .card { margin-top: 0; }
.editor-main { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 0 40px; min-height: 70vh; box-shadow: var(--shadow); }
.editor-main.drop-on { border-color: var(--accent); }
.cover-picker { position: relative; aspect-ratio: 21 / 6; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.cover-picker img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-picker.over, [data-picture-drop].over { outline: 3px dashed var(--accent); outline-offset: -6px; }
.cover-picker.busy::after { content: "Uploading…"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.4); color: #fff; font-weight: 600; }
.cover-tools, .slide-preview-tools { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 8px; z-index: 2; }
.cover-btn { background: rgba(255,255,255,.88) !important; color: #1d1d1f !important; cursor: pointer; }
.cover-hint { position: absolute; left: 18px; bottom: 16px; color: rgba(255,255,255,.75); font-size: 13px; font-weight: 500; pointer-events: none; }
.cover-picker img:not([hidden]) ~ .cover-hint { display: none; }
.title-input { display: block; width: 100%; border: 0; background: none; color: var(--text); font: 800 clamp(26px, 3vw, 38px)/1.15 var(--font); letter-spacing: -0.03em; padding: 26px 32px 6px; }
.summary-input { display: block; width: 100%; border: 0; background: none; color: var(--text-2); font: 19px/1.4 var(--font); padding: 4px 32px 16px; resize: none; overflow: hidden; }
.title-input:focus, .summary-input:focus { outline: none; }
.block-palette { position: sticky; top: 60px; z-index: 5; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 10px 24px; margin-bottom: 8px; background: var(--glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.palette-label { font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; margin-right: 4px; }
.palette-item { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: 500 13px var(--font); cursor: grab; }
.palette-item:hover { border-color: var(--accent); color: var(--accent); }
.palette-item .glyph { width: 18px; text-align: center; font-weight: 700; color: var(--accent); }
.blocks { padding: 0 24px; min-height: 20px; }
.blocks-empty { margin: 8px 24px; border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 40px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text-2); }
.blocks-empty .ic { width: 34px; height: 34px; color: var(--text-3); }
.blocks-empty[hidden] { display: none; }
.eblock { position: relative; border: 1px solid transparent; border-radius: 14px; padding: 6px 10px 10px; margin: 4px 0; }
.eblock:hover, .eblock:focus-within { border-color: var(--line-strong); background: var(--surface-2); }
.eblock.dragging { opacity: .4; }
.eblock-bar { display: flex; align-items: center; gap: 4px; height: 26px; opacity: 0; transition: opacity .15s; }
.eblock:hover .eblock-bar, .eblock:focus-within .eblock-bar { opacity: 1; }
.eblock-bar button { border: 0; background: none; color: var(--text-2); width: 28px; height: 26px; border-radius: 7px; cursor: pointer; font-size: 14px; }
.eblock-bar button:hover { background: var(--fill); color: var(--text); }
.eblock-bar button.danger:hover { background: var(--red-soft); color: var(--red); }
.eblock-handle { cursor: grab; color: var(--text-3); font-size: 15px; letter-spacing: -3px; padding: 0 8px 0 2px; user-select: none; }
.eblock-type { font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.eblock-body { display: flex; flex-direction: column; gap: 10px; }
.eblock-body.callout-edit { border-radius: 12px; padding: 12px; border-left: 4px solid currentColor; }
.eblock-body.callout-edit .rt, .eblock-body.callout-edit .input { color: var(--text); }
.drop-indicator { height: 4px; border-radius: 4px; background: var(--accent); margin: 2px 0; box-shadow: 0 0 0 3px var(--accent-soft); }
.rt-bar { display: none; gap: 2px; flex-wrap: wrap; }
.eblock:focus-within .rt-bar { display: flex; }
.rt-bar button { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 7px; padding: 3px 9px; font: 13px var(--font); cursor: pointer; }
.rt-bar button:hover { border-color: var(--accent); }
.rt { min-height: 30px; font-size: 18px; line-height: 1.6; outline: none; padding: 4px 2px; }
.rt:empty::before { content: attr(data-placeholder); color: var(--text-3); }
.rt p, .rt div { margin: 0 0 10px; }
.rt ul, .rt ol { padding-left: 24px; }
.heading-input { border: 0 !important; background: none !important; box-shadow: none !important; padding-left: 2px !important; font-weight: 700; letter-spacing: -0.02em; }
.heading-input.h2 { font-size: 26px; } .heading-input.h3 { font-size: 21px; }
.quote-input { font-size: 20px; }
.seg-sm .seg-btn { padding: 4px 10px; font-size: 12px; }
.segmented.seg-sm { align-self: flex-start; }
.block-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; padding: 28px; border: 2px dashed var(--line-strong); border-radius: 14px; background: var(--fill-2); color: var(--text-2); font: 15px var(--font); cursor: pointer; }
.block-drop strong { color: var(--text); }
.block-drop:hover, .block-drop.over { border-color: var(--accent); color: var(--accent); }
.img-preview img { width: 100%; border-radius: 12px; display: block; }
.img-preview.size-normal { max-width: 420px; }
.gallery-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; border-radius: 12px; }
.gallery-edit.over { outline: 3px dashed var(--accent); }
.thumb { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--fill); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 16px; line-height: 1; }
.thumb-add { border: 2px dashed var(--line-strong); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-2); font: 13px var(--font); cursor: pointer; }
.thumb-add strong { font-size: 24px; color: var(--accent); }
.uploading { padding: 24px; text-align: center; color: var(--text-2); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; cursor: pointer; position: relative; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.swatch input { position: absolute; opacity: 0; }
.swatch:has(input:checked) { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent); }
.swatch:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 4px; }
@media (max-width: 1100px) { .editor-layout { grid-template-columns: 1fr; } .editor-side { position: static; } }
@media (max-width: 860px) {
  .title-input { padding: 20px 16px 4px; } .summary-input { padding: 4px 16px 12px; }
  .blocks { padding: 0 8px; } .block-palette { padding: 8px 12px; top: 56px; }
  .eblock-bar { opacity: 1; }
  .palette-label { display: none; }
}

/* ---- call lists */
.list-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; }
.list-card { color: var(--text); display: flex; flex-direction: column; gap: 14px; transition: transform .15s, box-shadow .15s; }
.list-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.card + .list-card, .list-card + .list-card { margin-top: 0; }
.ring { --p: 0; width: 58px; height: 58px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(#34c759 calc(var(--p) * 1%), var(--fill) 0); }
.ring span { width: 46px; height: 46px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.list-card-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.list-card-stats div { background: var(--fill-2); border-radius: 10px; padding: 8px 10px; }
.list-card-stats strong { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.list-card-stats span { font-size: 12px; color: var(--text-2); }
.list-card-stats .is-due strong { color: var(--orange); }
.list-card-stats .is-won strong { color: var(--green); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 14px; margin-bottom: 14px; }
.kpis .stat { padding: 16px 18px; }
.mini-bar { height: 6px; background: var(--fill); border-radius: 6px; overflow: hidden; margin: 8px 0 4px; }
.mini-bar span { display: block; height: 100%; background: #34c759; border-radius: 6px; }
.status-bar-wrap { padding: 16px 18px; margin-bottom: 16px; }
.status-bar { display: flex; height: 12px; border-radius: 12px; overflow: hidden; gap: 2px; background: var(--fill); }
.status-bar .seg { height: 100%; }
.status-legend { display: flex; flex-wrap: wrap; gap: 6px 4px; margin-top: 12px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; background: none; color: var(--text-2); font: 14px var(--font); padding: 4px 10px; border-radius: 980px; cursor: pointer; }
.legend-item strong { color: var(--text); }
.legend-item:hover { background: var(--fill-2); }
.legend-item.active { border-color: var(--accent); background: var(--accent-soft); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.seg.tone-gray, .dot.tone-gray { background: #a1a1a6; }
.seg.tone-blue, .dot.tone-blue { background: #0a84ff; }
.seg.tone-orange, .dot.tone-orange { background: #ff9f0a; }
.seg.tone-purple, .dot.tone-purple { background: #af52de; }
.seg.tone-green, .dot.tone-green { background: #34c759; }
.seg.tone-red, .dot.tone-red { background: #ff3b30; }
.grid-toolbar .select { max-width: 200px; }
.sheet-wrap { overflow: hidden; }
.sheet-scroll { overflow: auto; max-height: calc(100vh - 220px); max-height: calc(100dvh - 220px); -webkit-overflow-scrolling: touch; }
table.sheet { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: 14px; }
.sheet th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2);
  padding: 10px 12px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; user-select: none; }
.sheet th[data-sort] { cursor: pointer; }
.sheet th[data-sort]:hover { color: var(--text); }
.sheet th.sorted::after { content: " ▲"; font-size: 9px; color: var(--accent); }
.sheet th.sorted.desc::after { content: " ▼"; }
.sheet td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; background: var(--surface); }
.sheet tbody tr:hover td { background: var(--surface-2); }
.sheet .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sheet .nowrap { white-space: nowrap; }
.sheet .sticky-col { position: sticky; left: 0; z-index: 1; min-width: 220px; max-width: 280px; box-shadow: 1px 0 0 var(--line); }
.sheet th.sticky-col { z-index: 3; }
.sheet .clip { max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet .notes-col { min-width: 240px; }
.sheet tr.is-closed td { opacity: .72; }
.sheet tr.is-due td.sticky-col { box-shadow: inset 3px 0 0 #ff9f0a, 1px 0 0 var(--line); }
.acct-link { font-weight: 600; text-align: left; color: var(--text); white-space: normal; }
.acct-link:hover { color: var(--accent); text-decoration: underline; }
.prio { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--fill); color: var(--text-2); }
.prio-high { background: var(--red-soft); color: var(--red); }
.prio-medium { background: var(--orange-soft); color: var(--orange); }
.prio-low { background: var(--accent-soft); color: var(--accent); }
.cell-select, .cell-date, .cell-input { font: 14px var(--font); color: var(--text); background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 5px 8px; min-height: 32px; }
.cell-select { font-weight: 600; cursor: pointer; padding-right: 4px; }
.cell-select:hover, .cell-date:hover, .cell-input:hover { border-color: var(--line-strong); }
.cell-select:focus, .cell-date:focus, .cell-input:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.cell-select.tone-gray { background: var(--fill); color: var(--text-2); }
.cell-select.tone-blue { background: var(--accent-soft); color: var(--accent); }
.cell-select.tone-orange { background: var(--orange-soft); color: var(--orange); }
.cell-select.tone-purple { background: var(--purple-soft); color: var(--purple); }
.cell-select.tone-green { background: var(--green-soft); color: var(--green); }
.cell-select.tone-red { background: var(--red-soft); color: var(--red); }
.cell-date.is-due { color: var(--orange); font-weight: 600; }
.cell-input { width: 100%; }
.cell-input[readonly] { cursor: pointer; }
.saving { opacity: .5; }
.saved { box-shadow: 0 0 0 3px var(--green-soft) !important; border-color: var(--green) !important; }
.sheet-foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-top: 1px solid var(--line); }
.empty-row { text-align: center; padding: 40px !important; color: var(--text-2); }

.modal.drawer { margin: 0 0 0 auto; height: 100vh; height: 100dvh; max-height: none; max-width: min(560px, 100vw); }
.modal.drawer .modal-card { height: 100%; overflow-y: auto; border-radius: 20px 0 0 20px; }
.modal.drawer[open] { animation: drawerin .22s ease; }
@keyframes drawerin { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.drawer-h { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); margin: 22px 0 10px; }
.acct-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.acct-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.acct-facts div { background: var(--surface); padding: 8px 12px; display: flex; flex-direction: column; min-width: 0; }
.acct-facts span { font-size: 12px; color: var(--text-2); }
.acct-facts strong { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.outcomes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.outcome { border: 1.5px solid transparent; border-radius: 980px; padding: 7px 13px; font: 600 14px var(--font); cursor: pointer; }
.outcome.tone-red { background: var(--red-soft); color: var(--red); }
.outcome.active { border-color: currentColor; box-shadow: 0 0 0 3px var(--accent-soft); }
.history { display: flex; flex-direction: column; gap: 10px; }
.history-item { display: flex; gap: 10px; align-items: flex-start; }
.playbook { padding-left: 22px; margin: 12px 0 0; }
.playbook li { margin-bottom: 14px; }
.playbook p { margin: 4px 0 0; color: var(--text-2); font-size: 15px; }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 36px 20px; border: 2px dashed var(--line-strong); border-radius: var(--radius); background: var(--fill-2); text-align: center; cursor: pointer; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone.over, .dropzone:hover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone-icon .ic { width: 36px; height: 36px; color: var(--accent); }
.map-table td { padding-top: 8px; padding-bottom: 8px; }
@media (max-width: 860px) {
  .list-cards { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .sheet-scroll { max-height: none; }
  .grid-toolbar .segmented { order: 3; }
  .modal.drawer .modal-card { border-radius: 0; }
}

/* ---- home page manager */
.slide-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.slide-admin-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: grab; box-shadow: var(--shadow); }
.slide-admin-item.dragging { opacity: .4; }
.slide-thumb { position: relative; aspect-ratio: 16 / 6; container-type: inline-size; }
.slide-thumb .slide-text { padding: 14px 18px; }
.slide-thumb .slide-text h2 { font-size: 7cqw; }
.slide-thumb .slide-text p { font-size: 3.6cqw; margin-top: 4px; }
.slide-thumb .slide-btn { font-size: 3cqw; padding: 4px 10px; margin-top: 6px; }
.slide-admin-info { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.slide-preview-wrap { position: relative; border-radius: 16px; overflow: hidden; }
.slide-preview { position: relative; aspect-ratio: 16 / 6; container-type: inline-size; }
.slide-preview .slide-text h2 { font-size: clamp(18px, 5cqw, 46px); }
.slide-preview .slide-text p { font-size: clamp(13px, 2cqw, 20px); }
.slide-preview .slide-text { padding: 4cqw; }
.slide-preview-wrap .cover-hint { top: 14px; bottom: auto; }
.kind-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 16px; }
.kind-option { position: relative; cursor: pointer; }
.kind-option input { position: absolute; opacity: 0; }
.kind-option span { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border: 1.5px solid var(--line-strong); border-radius: 14px; font-size: 13px; font-weight: 600; text-align: center; }
.kind-option b { font-size: 26px; font-weight: 400; }
.kind-option input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.kind-option input:focus-visible + span { outline: 2px solid var(--accent); }
.shout-thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; }
.shout-thumb[hidden] { display: none; }
.auto-card { margin-bottom: 16px; }
.switch { position: relative; display: inline-block; width: 51px; height: 31px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--fill); border-radius: 31px; transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + span { background: #34c759; }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 4px var(--accent-soft); }
@media (max-width: 860px) { .kind-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- team */
.celebrate-strip { margin-bottom: 20px; background: linear-gradient(135deg, rgba(255,179,71,.16), rgba(194,24,91,.10)), var(--surface); }
.celebrate-strip h2 { margin-bottom: 12px; }
.celebrate-list { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.celebrate-item { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; flex: none; }
.celebrate-item.today { border-color: #ff9f0a; box-shadow: 0 0 0 3px var(--orange-soft); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.person-card { display: flex; gap: 14px; align-items: flex-start; }
.card + .person-card, .person-card + .person-card { margin-top: 0; }
.person-info { min-width: 0; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.person-tags { margin: 2px 0; }
.person-contact { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.person-contact a { display: flex; align-items: center; gap: 6px; min-width: 0; }
.person-contact .ic { width: 15px; height: 15px; flex: none; }

@media (max-width: 860px) {
  .carousel { border-radius: 16px; margin: -4px 0 18px; }
  .carousel-track { aspect-ratio: 4 / 3; }
  .slide.has-img.has-text::after { background: linear-gradient(0deg, rgba(0,0,0,.7) 0%, rgba(0,0,0,.2) 60%, rgba(0,0,0,0) 85%); }
  .carousel-nav { display: none; }
  .carousel-dots { left: 0; right: 0; justify-content: center; bottom: 10px; }
  .carousel-edit { opacity: 1; }
  .home-greeting h2 { font-size: 24px; }
  .shoutouts { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .shout { scroll-snap-align: start; }
  .article-hero { aspect-ratio: 16 / 9; }
  .article-body { font-size: 17px; }
}

/* ---- academy */
.academy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.academy-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.academy-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.academy-card .cover { aspect-ratio: 16 / 7; position: relative; overflow: hidden; }
.progress-line { margin-top: auto; padding-top: 6px; }
.progress-line .mini-bar { margin: 0 0 4px; }
.cert-strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; }
.cert-badge { display: flex; align-items: center; gap: 12px; flex: none; max-width: 340px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px 12px 12px; color: var(--text); box-shadow: var(--shadow); }
.cert-badge:hover { text-decoration: none; border-color: var(--accent); }
.cert-badge > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.cert-badge.is-pending { opacity: .8; border-style: dashed; }
.cert-medal { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; flex: none; box-shadow: inset 0 0 0 3px rgba(255,255,255,.35); }

.academy-hero { position: relative; border-radius: 22px; overflow: hidden; color: #fff; margin-bottom: 22px; min-height: 220px; display: flex; align-items: flex-end; box-shadow: var(--shadow-lg); }
.academy-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.academy-hero img + .academy-hero-text { background: linear-gradient(0deg, rgba(0,0,0,.65), rgba(0,0,0,0)); }
.academy-hero-text { position: relative; padding: clamp(20px, 4vw, 40px); width: 100%; }
.academy-hero h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; letter-spacing: -0.03em; }
.academy-hero p { font-size: 18px; opacity: .92; margin: 6px 0 0; max-width: 680px; }
.academy-hero-progress { display: flex; align-items: center; gap: 14px; margin-top: 18px; flex-wrap: wrap; }
.academy-hero-progress .slide-btn { margin: 0 0 0 auto; }
.ring-light { background: conic-gradient(#fff calc(var(--p) * 1%), rgba(255,255,255,.25) 0); }
.ring-light span { background: rgba(0,0,0,.25); color: #fff; }

.level-path { list-style: none; padding: 0; margin: 0; position: relative; }
.level-path::before { content: ""; position: absolute; left: 21px; top: 20px; bottom: 20px; width: 3px; background: var(--fill); border-radius: 3px; }
.level { position: relative; display: flex; gap: 16px; margin-bottom: 18px; }
.level-marker { position: relative; z-index: 1; width: 45px; height: 45px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 17px;
  background: var(--surface); border: 3px solid var(--accent); color: var(--accent); }
.level-earned .level-marker { background: #34c759; border-color: #34c759; color: #fff; font-size: 20px; }
.level-pending .level-marker { border-color: #ff9f0a; color: #ff9f0a; }
.level-locked .level-marker { border-color: var(--line-strong); color: var(--text-3); font-size: 16px; }
.level-card { flex: 1; min-width: 0; }
.level-locked .level-card { opacity: .7; }
.level-card h2 { font-size: 21px; }
.level-card > .mini-bar { margin-top: 14px; }
.level-cert { display: flex; flex-direction: column; align-items: flex-end; text-align: right; gap: 2px; max-width: 260px; }
.lesson-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.lesson-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--fill-2); color: var(--text); }
a.lesson-row:hover { text-decoration: none; background: var(--fill); }
.lesson-row > .ic { color: var(--text-3); margin-left: auto; }
.lesson-row.locked { opacity: .6; }
.lesson-row.current { box-shadow: inset 0 0 0 2px var(--accent); }
.lesson-check { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface); color: var(--accent); }
.lesson-check .ic { width: 16px; height: 16px; }
.lesson-row.done .lesson-check { background: #34c759; color: #fff; }
.lesson-title { display: flex; flex-direction: column; min-width: 0; flex: 1; color: var(--text); }
a.lesson-title:hover { text-decoration: none; }
.lesson-title strong { font-weight: 600; font-size: 15px; }
.lesson-list.compact .lesson-row { padding: 7px 8px; }
.lesson-list.compact .lesson-check { width: 24px; height: 24px; }
.add-lesson { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; }
.lesson-row form .icon-btn, .level-edit .icon-btn { width: 30px; height: 30px; font-size: 14px; }
.icon-btn[disabled] { opacity: .3; cursor: default; }

.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.lesson-main { max-width: 820px; margin: 0; width: 100%; justify-self: center; }
.lesson-side { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 10px; }
.lesson-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; font-weight: 500; }
.lesson-done { margin-top: 30px; }
.quiz { margin-top: 30px; }
.quiz-q { border: 1px solid var(--line); margin: 14px 0 0; padding: 18px 20px; }
.quiz-q legend { font-weight: 600; font-size: 17px; padding: 0; float: left; width: 100%; margin-bottom: 10px; }
.quiz-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 14px; margin-right: 6px; }
.quiz-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); margin-top: 6px; cursor: pointer; clear: both; font-size: 16px; }
.quiz-opt:hover { border-color: var(--accent); }
.quiz-opt input { width: 18px; height: 18px; accent-color: var(--accent); }
.quiz-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.quiz-q.right { border-color: #34c759; box-shadow: 0 0 0 3px var(--green-soft); }
.quiz-q.wrong { border-color: #ff3b30; box-shadow: 0 0 0 3px var(--red-soft); }
.quiz-result { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border-radius: 14px; margin-top: 18px; }
.quiz-result strong { font-size: 28px; }
.quiz-result span { flex: 1; min-width: 200px; }
.quiz-result.passed { background: var(--green-soft); }
.quiz-result.failed { background: var(--orange-soft); }
.quiz-builder { margin: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.quiz-builder[hidden] { display: none; }
.quiz-edit { margin: 12px 0; display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); }
.quiz-opts { display: flex; flex-direction: column; gap: 6px; }
.quiz-opt-edit { display: flex; align-items: center; gap: 8px; }
.quiz-opt-edit input[type=radio] { width: 20px; height: 20px; accent-color: #34c759; flex: none; }

.academy-edit { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.academy-edit > aside { position: sticky; top: 76px; }
.level-edit + .level-edit { margin-top: 16px; }
.level-num { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.cert-review + .cert-review { margin-top: 12px; }

.training-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 8px; }
.training-card { display: flex; align-items: center; gap: 14px; color: var(--text); }
.training-card:hover { text-decoration: none; border-color: var(--accent); }
.card + .training-card, .training-card + .training-card { margin-top: 0; }
.training-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; flex: none; }
.training-icon .ic { width: 26px; height: 26px; }
.training-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.training-info .mini-bar { margin: 6px 0 2px; }

.certificate { max-width: 900px; margin: 0 auto; background: #fff; color: #1d1d1f; padding: 18px; border-radius: 6px; box-shadow: var(--shadow-lg); aspect-ratio: 11 / 8.5; }
.cert-inner { height: 100%; border: 3px solid #c8102e; outline: 1px solid #c8102e; outline-offset: -10px; padding: 5% 8%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.cert-brand { font-weight: 900; font-size: 22px; letter-spacing: .04em; color: #c8102e; }
.cert-brand span { color: #1d1d1f; font-weight: 600; letter-spacing: .02em; }
.cert-kicker { margin-top: 3%; font-size: clamp(22px, 3.6vw, 38px); font-family: Georgia, "Times New Roman", serif; letter-spacing: .02em; }
.cert-small { margin: 2.5% 0 0; font-size: clamp(13px, 1.6vw, 17px); color: #555; max-width: 600px; }
.cert-name { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: clamp(30px, 5.4vw, 56px); margin-top: 1%; border-bottom: 1px solid #ccc; padding: 0 30px 4px; }
.cert-title { margin-top: 2%; font-size: clamp(18px, 2.6vw, 28px); font-weight: 800; color: #c8102e; letter-spacing: -0.01em; }
.cert-foot { display: flex; justify-content: space-between; align-items: flex-end; width: 100%; margin-top: auto; gap: 20px; }
.cert-foot > div:not(.cert-seal) { display: flex; flex-direction: column; font-size: 13px; color: #666; min-width: 30%; }
.cert-line { border-bottom: 1px solid #999; padding-bottom: 4px; margin-bottom: 4px; color: #1d1d1f; font-size: 16px; }
.cert-seal { font-size: 54px; line-height: 1; }
@media print {
  .page-certificate .sidebar, .page-certificate .topbar, .page-certificate .tabbar, .page-certificate .site-footer, .page-certificate .demo-banner, .page-certificate .content > p { display: none !important; }
  .page-certificate .main { margin: 0 !important; }
  .page-certificate .content { padding: 0 !important; }
  .page-certificate .certificate { box-shadow: none; max-width: none; width: 100%; }
  @page { size: letter landscape; margin: 0.4in; }
}
@media (max-width: 1100px) { .lesson-layout, .academy-edit { grid-template-columns: 1fr; } .lesson-side, .academy-edit > aside { position: static; } }
@media (max-width: 860px) {
  .level-path::before { left: 17px; }
  .level { gap: 10px; }
  .level-marker { width: 37px; height: 37px; font-size: 15px; }
  .level-cert { align-items: flex-start; text-align: left; }
  .academy-hero-progress .slide-btn { margin-left: 0; }
}

[hidden] { display: none !important; }
.article-hero.cover-art { aspect-ratio: auto; height: 120px; }
.article-hero.cover-art span { display: none; }
.eblock-heading .seg-sm, .eblock-image .seg-sm, .eblock-callout .seg-sm { opacity: 0; transition: opacity .15s; }
.eblock:hover .seg-sm, .eblock:focus-within .seg-sm { opacity: 1; }
@media (max-width: 860px) { .carousel .slide-text { padding-bottom: 36px; } }
.slide-preview-wrap:has(.slide.has-img) .cover-hint { display: none; }
.slide-thumb .slide-text h2 { font-size: 6cqw; }
.slide-thumb .slide-text p { font-size: 3.2cqw; }
@media (max-width: 860px) { .topbar .hide-sm { display: none; } .topbar .btn { padding: 0 10px; } .topbar-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; } }

/* ---- Google reviews */
.google-connect { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 20px; }
.g-badge { width: 52px; height: 52px; border-radius: 14px; flex: none; display: grid; place-items: center; font: 800 28px var(--font); color: #fff;
  background: conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0); }
.g-centers { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.g-center { margin-top: 0 !important; display: flex; flex-direction: column; gap: 4px; }
.g-rating { font-size: 38px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin-top: 6px; }
.g-up { color: var(--green); font-weight: 600; }
.g-status { margin: 10px 0 18px; }
.g-err { color: var(--red); display: block; }
.stars { position: relative; display: inline-block; font-size: 20px; line-height: 1; letter-spacing: 2px; color: var(--fill); }
.stars::before { content: "★★★★★"; }
.stars > span { position: absolute; inset: 0 auto 0 0; overflow: hidden; white-space: nowrap; color: #fbbc05; }
.stars > span::before { content: "★★★★★"; }
.stars-sm { font-size: 13px; letter-spacing: 1px; vertical-align: -1px; }
.g-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.g-side { display: flex; flex-direction: column; gap: 16px; }
.g-side .card + .card { margin-top: 0; }
.g-feed-head { flex-wrap: wrap; }
.g-reviews { display: flex; flex-direction: column; }
.g-review { padding: 16px 24px; border-top: 1px solid var(--line); }
.g-review.is-low { box-shadow: inset 3px 0 0 #ff9f0a; }
.g-review p { margin: 8px 0 6px; font-size: 15px; white-space: normal; }
.g-review-head { display: flex; align-items: center; gap: 10px; }
.g-review-head .avatar { width: 38px; height: 38px; }
.g-results { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; max-height: 50vh; overflow-y: auto; }
.g-result { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 12px 14px; border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--text); font: 15px var(--font); cursor: pointer; }
.g-result:hover { border-color: var(--accent); background: var(--accent-soft); }
@media (max-width: 1100px) { .g-layout { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .g-centers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .google-connect { flex-direction: column; } .g-review { padding: 14px 18px; } }

/* ---- person editor */
.role-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.role-option { position: relative; cursor: pointer; }
.role-option input { position: absolute; opacity: 0; }
.role-option span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 12px 14px; border: 1.5px solid var(--line-strong); border-radius: 14px; background: var(--surface); }
.role-option small { color: var(--text-2); font-size: 13px; line-height: 1.35; }
.role-option input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.role-option input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.temp-pw { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--accent-soft); margin: 8px 0; }
.temp-pw > div { flex: 1; min-width: 200px; }
.temp-pw-value { font: 600 17px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; background: var(--surface); padding: 6px 12px; border-radius: 8px; }
@media (max-width: 860px) { .role-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- search everywhere */
.topbar-search { position: relative; display: flex; align-items: center; margin-left: auto; width: min(380px, 34vw); }
.topbar-search > .ic { position: absolute; left: 12px; width: 17px; height: 17px; color: var(--text-3); pointer-events: none; }
.topbar-search input { width: 100%; height: 36px; border-radius: 10px; border: 1px solid transparent; background: var(--fill); color: var(--text); font: 15px var(--font); padding: 0 34px 0 36px; }
.topbar-search input:focus { outline: none; background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.topbar-search input::-webkit-search-cancel-button { display: none; }
.search-kbd { position: absolute; right: 10px; font: 600 12px var(--font); color: var(--text-3); border: 1px solid var(--line-strong); border-radius: 5px; padding: 0 6px; pointer-events: none; }
.topbar-search input:focus ~ .search-kbd { display: none; }
.topbar-search + .search-mobile { display: none; }
.topbar .topbar-search ~ .btn, .topbar .topbar-search ~ form { margin-left: 8px; }
.search-pop { position: absolute; top: calc(100% + 6px); right: 0; width: min(480px, 92vw); max-height: 70vh; overflow-y: auto; z-index: 60; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; }
.search-group { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); padding: 10px 10px 4px; }
.search-pop a { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 9px; color: var(--text); }
.search-pop a:hover, .search-pop a.active { background: var(--accent-soft); text-decoration: none; }
.search-pop a strong { font-size: 14px; font-weight: 600; }
.search-pop a span { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-pop .search-all { color: var(--accent); font-weight: 600; font-size: 14px; border-top: 1px solid var(--line); margin-top: 6px; border-radius: 0 0 9px 9px; }
.search-empty { padding: 14px 10px; color: var(--text-2); font-size: 14px; }
.search-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.search-results .card { margin-top: 0 !important; }
kbd { font: 600 12px var(--font); border: 1px solid var(--line-strong); border-radius: 5px; padding: 1px 6px; }
@media (max-width: 860px) { .topbar-search { display: none; } .topbar-search + .search-mobile { display: grid; margin-left: auto; } }

/* ---- vendors */
.vendor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.vendor-card { margin-top: 0 !important; display: flex; flex-direction: column; gap: 10px; color: var(--text); transition: transform .15s, box-shadow .15s; }
.vendor-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.vendor-mark { width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 16px; color: #fff; background: linear-gradient(135deg, #5b5b60, #1d1d1f); }
.vendor-mark-lg { width: 64px; height: 64px; font-size: 22px; border-radius: 16px; }
.vendor-card h3 { font-size: 17px; }
.vendor-tags { display: flex; flex-wrap: wrap; gap: 6px; }
a.pill:hover { text-decoration: none; filter: brightness(.95); }
.vendor-contact { display: flex; flex-direction: column; gap: 3px; color: var(--text-2); }
.vendor-contact span { display: flex; align-items: center; gap: 6px; }
.vendor-contact .ic { width: 15px; height: 15px; }
.vendor-money { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; color: var(--text-2); }
.vendor-money strong { color: var(--text); }
.vendor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.vendor-layout > div > .card + .card { margin-top: 20px; }
.vendor-side { display: flex; flex-direction: column; gap: 16px; }
.vendor-side .card + .card { margin-top: 0; }
.vendor-hero { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 20px; }
.vendor-hero h2 { font-size: 24px; margin-bottom: 8px; }
.vendor-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; font-size: 14px; }
.facts dt { color: var(--text-2); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.vendor-notes { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--fill-2); }
.better-price { color: var(--green); font-weight: 600; }
.big-num { font-size: 22px; letter-spacing: -0.02em; }
.spark { display: flex; align-items: flex-end; gap: 4px; height: 90px; margin: 14px 0 8px; }
.spark span { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; }
.spark i { display: block; width: 100%; border-radius: 4px 4px 2px 2px; background: var(--accent); opacity: .85; }
.spark b { font-size: 10px; font-weight: 500; color: var(--text-3); }
@media (max-width: 1100px) { .vendor-layout { grid-template-columns: 1fr; } }
.topbar-title { flex: 1 1 auto; min-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-search { flex: 0 1 340px; width: auto; min-width: 170px; margin-left: 12px; }
@media (max-width: 1150px) { .topbar-search .search-kbd { display: none; } }

/* Slides without a picture: centered text, and a shorter slideshow when none of the slides have pictures. */
.slide:not(.has-img) { align-items: center; justify-content: center; text-align: center; }
.slide:not(.has-img) .slide-text { max-width: 860px; margin: 0 auto; padding: clamp(18px, 3vw, 36px) clamp(20px, 4vw, 48px); }
.carousel-text-only .carousel-track { aspect-ratio: auto; height: clamp(170px, 19vw, 250px); }
.carousel-text-only .slide-text h2 { font-size: clamp(22px, 2.8vw, 36px); }
.carousel-text-only .slide-text p { font-size: clamp(14px, 1.3vw, 18px); margin-top: 8px; }
.carousel-text-only .slide-btn { margin-top: 12px; padding: 8px 18px; font-size: 14px; }
.carousel-text-only .carousel-dots { left: 0; right: 0; justify-content: center; bottom: 10px; }
.carousel-empty { aspect-ratio: auto; height: clamp(160px, 17vw, 220px); }
@media (max-width: 860px) {
  .carousel-text-only .carousel-track { height: 220px; }
  .slide:not(.has-img) .slide-text { padding-bottom: 34px; }
}
@media (max-width: 860px) { .carousel:has(.carousel-edit) .slide:not(.has-img) .slide-text { padding-top: 46px; } }
.nav-demo-note { display: flex; gap: 8px; align-items: flex-start; margin: 2px 4px 6px 12px; padding: 8px 10px; border-radius: 10px; background: var(--orange-soft); color: var(--text); font-size: 12px; line-height: 1.35; }
.nav-demo-note:hover { text-decoration: none; filter: brightness(.97); }
.nav-demo-note .ic { width: 15px; height: 15px; color: var(--orange); flex: none; margin-top: 1px; }
.price-note { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; margin-bottom: 20px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid rgba(0, 113, 227, .18); }
.price-note > .ic { width: 26px; height: 26px; color: var(--accent); flex: none; margin-top: 2px; }
.price-note strong { display: block; font-size: 16px; }
.price-note p { margin: 4px 0 0; color: var(--text-2); font-size: 15px; }

.rush-options { align-self: flex-start; }
.quote-grid .rush { background: var(--orange-soft); }
.quote-grid .rush strong { color: var(--orange); }
.price-note strong.inline { display: inline; font-size: inherit; color: var(--text); }
input[data-caps]::placeholder { text-transform: none; }

/* ---- reports */
.report-tabs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 16px; }
.report-tab { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: 14px; }
.report-tab:hover { text-decoration: none; border-color: var(--line-strong); }
.report-tab .ic { color: var(--accent); }
.report-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.report-tab.active .ic { color: #fff; }
.report-filters .select { max-width: 220px; }
.report-kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.chart-card { margin-top: 0 !important; min-width: 0; }
.chart-card.wide { grid-column: 1 / -1; }
.chart-card h2 { font-size: 17px; margin-bottom: 12px; }
.chart { min-height: 120px; position: relative; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-svg .grid { stroke: var(--line); stroke-width: 1; }
.chart-svg .axis, .donut .axis { fill: var(--text-3); font: 11px var(--font); }
.chart-svg rect, .chart-svg circle, .donut path { cursor: default; transition: opacity .15s; }
.chart-svg rect:hover, .donut path:hover { opacity: .8; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 13px; color: var(--text-2); }
.chart-legend i, .donut-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.chart-empty { display: grid; place-items: center; height: 160px; color: var(--text-3); font-size: 14px; border: 1px dashed var(--line-strong); border-radius: 12px; }
.chart-tip { position: fixed; z-index: 100; pointer-events: none; background: #1d1d1f; color: #fff; font-size: 13px; line-height: 1.4; padding: 7px 10px; border-radius: 8px; box-shadow: var(--shadow-lg); max-width: 260px; }
.chart-tip span { opacity: .7; }
.hbars { display: flex; flex-direction: column; gap: 8px; }
.hbar-row { display: grid; grid-template-columns: minmax(80px, 160px) 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.hbar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.hbar-track { display: flex; height: 16px; border-radius: 5px; background: var(--fill-2); overflow: hidden; }
.hbar-track span { height: 100%; }
.hbar-val { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 56px; text-align: right; }
.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.donut { width: 180px; height: 180px; flex: none; }
.donut-total { fill: var(--text); font: 700 22px var(--font); }
.donut-legend { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.donut-legend div { display: grid; grid-template-columns: auto 1fr auto 44px; align-items: center; gap: 6px; }
.donut-legend span { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.donut-legend small { color: var(--text-3); text-align: right; }
.print-only { display: none; }
@media (max-width: 1000px) { .chart-grid { grid-template-columns: 1fr; } }
@media print {
  .page-reports .sidebar, .page-reports .topbar, .page-reports .tabbar, .page-reports .site-footer, .page-reports .report-tabs, .page-reports .report-filters, .page-reports .no-print { display: none !important; }
  .page-reports .main { margin: 0 !important; }
  .page-reports .content { padding: 0 !important; }
  .page-reports .print-only { display: block; margin-bottom: 12px; }
  .page-reports .card { box-shadow: none; break-inside: avoid; }
  .page-reports .chart-grid { grid-template-columns: 1fr 1fr; }
}

/* Per-product notes on the label form; side band text never touches the ends */
.product-notes { gap: 8px; }
.product-note-list { display: flex; flex-direction: column; gap: 6px; }
.product-note-list[hidden], .product-note-row[hidden] { display: none; }
.product-note-row { display: flex; align-items: center; gap: 8px; }
.product-note-row .input { flex: 1; }
.ep-band span { padding: 4pt 0; box-sizing: border-box; }
/* Footer row: center chip, then Settings / light-dark / sign out, always on one line */
.sidebar-foot { column-gap: 2px; }
.sidebar-foot .foot-chip { flex: 0 1 auto; min-width: 0; max-width: 118px; }
.sidebar-foot .foot-spacer { flex: 1 1 0; min-width: 0; }
.sidebar-foot .icon-btn { width: 32px; height: 32px; flex: none; }
.sidebar-foot a.icon-btn.active { background: var(--fill); color: var(--accent); }

/* One note per product, each with its own quick-fill buttons (scroll sideways on phones) */
.product-note-list { gap: 12px; }
.product-note-row { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 12px; background: var(--fill-2); }
.product-note-row:focus-within { box-shadow: 0 0 0 2px var(--accent-soft); }
.pn-line { display: flex; align-items: center; gap: 8px; }
.pn-line .input { flex: 1; min-width: 0; }
.pn-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pn-chips[hidden] { display: none; }
@media (max-width: 860px) {
  .pn-chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; margin: 0 -10px; padding-left: 10px; padding-right: 10px; scroll-snap-type: x proximity; }
  .pn-chips::-webkit-scrollbar { display: none; }
  .pn-chips .chip { flex: none; max-width: none; padding: 8px 14px; font-size: 14px; scroll-snap-align: start; }
  .pn-line .input { min-height: 46px; font-size: 16px; }
  .product-note-row { padding: 10px; }
}
.label-editor > form, .product-notes, .product-note-list, .product-note-row, .pn-chips { min-width: 0; max-width: 100%; }
@media (max-width: 860px) { .topbar { gap: 6px; } .topbar > .btn, .topbar > a.btn { flex: none; } .main { min-width: 0; overflow-x: clip; } }

/* Product notes: label above, box and quick fills flush left */
.product-note-row { align-items: stretch; text-align: left; }
.pn-label { font-size: 13px; font-weight: 600; color: var(--text-2); margin: 0; }
.product-note-row > .input { width: 100%; margin: 0; }
.pn-chips { justify-content: flex-start; }
@media (max-width: 860px) { .product-note-row > .input { min-height: 46px; font-size: 16px; } }
.product-note-row > .suggest-wrap { display: block; width: 100%; }
.product-note-row > .suggest-wrap > .input { width: 100%; }
@media (max-width: 860px) { .hide-sm { display: none; } }
.typed-notes li form { margin: 0; }

/* ---- View as (admins) */
.view-as-bar { position: sticky; top: 0; z-index: 70; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 16px; background: #5b2a9e; color: #fff; font-size: 14px; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.va-eye { font-size: 18px; }
.va-text { flex: 1; min-width: 180px; }
.va-sub { opacity: .8; margin-left: 6px; }
.view-as-bar form { margin: 0; }
.va-switch select { max-width: 280px; height: 32px; border-radius: 8px; border: 0; padding: 0 8px; font: 14px var(--font); background: rgba(255,255,255,.95); color: #1d1d1f; }
.va-exit { height: 32px; padding: 0 16px; border-radius: 980px; border: 0; background: #fff; color: #5b2a9e; font: 600 14px var(--font); cursor: pointer; }
body.is-viewing-as .sidebar { top: 48px; }
body.is-viewing-as .topbar { top: 48px; }
.va-start { margin: 0 0 0 auto; }
@media (max-width: 860px) { .va-sub { display: block; margin: 0; } .va-switch { flex: 1; } .va-switch select { width: 100%; max-width: none; } body.is-viewing-as .sidebar { top: 0; } }

/* ---- admin view switcher */
.view-switch { margin: 0; display: flex; align-items: center; gap: 8px; }
.view-switch-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.nav-view-switch { padding: 0 6px 12px; flex-wrap: wrap; }
.nav-view-switch .segmented { flex-wrap: nowrap; width: 100%; }
.nav-view-switch .seg-btn { flex: 1; padding: 5px 4px; font-size: 12px; }
.va-switch .view-switch-label { color: rgba(255,255,255,.8); }
.va-switch .segmented { background: rgba(255,255,255,.18); }
.va-switch .seg-btn { color: #fff; }
.va-switch .seg-btn.active { background: #fff; color: #5b2a9e; }
.overdue-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.overdue-person { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong); color: var(--text); background: var(--surface); }
.overdue-person:hover { text-decoration: none; border-color: var(--accent); background: var(--accent-soft); }
.overdue-person .small:last-child { color: var(--accent); font-weight: 600; margin-top: 4px; }
.recog-link { display: flex; align-items: center; gap: 14px; color: var(--text); margin-bottom: 16px; }
.recog-link:hover { text-decoration: none; border-color: var(--accent); }
.recog-link > .ic:first-child { width: 28px; height: 28px; color: var(--accent); }
.fillers { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 2px; }
.fillers .fillers-label { font-size: 12px; color: var(--text-3); font-weight: 600; margin-right: 2px; }
.fillers [data-fill] { border: 1px dashed var(--line-strong); background: var(--surface); color: var(--text-2); border-radius: 980px; padding: 4px 11px; font: 500 13px var(--font); cursor: pointer; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fillers [data-fill]:hover { border-color: var(--accent); color: var(--accent); }
.fillers [data-fill].picked { border-style: solid; border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
@media (max-width: 860px) { .fillers { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .fillers::-webkit-scrollbar { display: none; } .fillers [data-fill] { flex: none; padding: 7px 13px; } }

.template-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-top: 12px; max-height: 46vh; overflow-y: auto; padding: 2px; }
.template-option { position: relative; cursor: pointer; }
.template-option input { position: absolute; opacity: 0; }
.template-option span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 12px; border: 1.5px solid var(--line-strong); border-radius: 14px; background: var(--surface); }
.template-option i { width: 28px; height: 6px; border-radius: 6px; margin-bottom: 6px; }
.template-option small { font-size: 12px; line-height: 1.35; }
.template-option input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.template-option input:focus-visible + span { outline: 2px solid var(--accent); }
.lesson-title-fillers { padding: 0 32px 10px; }
@media (max-width: 860px) { .lesson-title-fillers { padding: 0 16px 10px; } .template-picker { grid-template-columns: 1fr 1fr; } }

/* ------------------------------------------------------------- FASTFLOW brand */
.brand-logo { display: flex; align-items: center; gap: 10px; }
.brand-logo .brand-text strong { letter-spacing: 0.04em; font-weight: 800; }
.brand-logo .brand-text strong em { font-style: normal; color: var(--brand); }
:root[data-theme="dark"] .brand-logo .brand-text strong em { color: #ff5a6e; }
.brand:has(.brand-logo.has-image) { padding: 0 2px 14px; display: block; }
.brand-logo.has-image { display: block; width: 100%; }
.brand-logo.has-image img { width: 100%; height: auto; max-width: none; object-fit: contain; }
.sidebar-collapsed .brand-logo.has-image img { width: 100%; }
.brand-logo .logo-dark { display: none; }
:root[data-theme="dark"] .brand-logo .logo-light { display: none; }
:root[data-theme="dark"] .brand-logo .logo-dark { display: block; }

/* ------------------------------------------------------------- notifications bell */
.bell-btn { position: relative; }
.bell-dot { position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff;
  font: 700 11px/17px var(--font); text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-list li + li { border-top: 1px solid var(--line); }
.notif-item { display: flex; gap: 12px; padding: 14px 20px; color: var(--text); align-items: flex-start; }
.notif-item:hover { background: var(--fill-2); text-decoration: none; }
.notif-item .notif-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); margin-top: 7px; flex: none; }
.notif-item.is-read .notif-dot { background: transparent; }
.notif-item.is-read strong { font-weight: 500; }
.notif-item span { display: block; }

/* ------------------------------------------------------------- request forms */
.tone-blue { --tone: var(--accent); --tone-soft: var(--accent-soft); }
.tone-green { --tone: var(--green); --tone-soft: var(--green-soft); }
.tone-orange { --tone: var(--orange); --tone-soft: var(--orange-soft); }
.tone-purple { --tone: var(--purple); --tone-soft: var(--purple-soft); }
.tone-red { --tone: var(--red); --tone-soft: var(--red-soft); }
.tone-gray { --tone: var(--text-2); --tone-soft: var(--fill); }
.form-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.form-tile { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--line); color: var(--text); transition: transform .12s ease, border-color .12s ease; }
.form-tile:hover { text-decoration: none; border-color: var(--tone); transform: translateY(-1px); }
.form-tile .ft-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.form-tile .nav-badge { position: absolute; top: 12px; right: 12px; }
.rf-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: var(--tone-soft); color: var(--tone); flex: none; }
.request-form { max-width: 820px; }
.request-form-head { display: flex; gap: 16px; align-items: center; border-top: 5px solid var(--tone); }
.request-form-head h2 { margin-bottom: 2px; }
.request-form-head p { margin: 0; }
.request-form .card + .card, .request-form .notice { margin-top: 16px; }
.form-section { font-size: 15px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); margin: 14px 0 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.form-section[hidden], .field[hidden] { display: none; }
.req { color: var(--red); }
.choice-list { display: flex; flex-direction: column; gap: 2px; }
.choice-list.choice-row { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.choice { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; cursor: pointer; font-size: 15px; min-width: 0; }
.choice:hover { background: var(--fill-2); }
.choice input[type=radio], .choice input[type=checkbox] { width: 19px; height: 19px; accent-color: var(--accent); flex: none; margin: 0; }
.choice-row .choice { border: 1px solid var(--line-strong); padding: 8px 14px; }
.choice-row .choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice-other .input { flex: 1; min-width: 0; }
.input-sm { min-height: 34px; padding-top: 5px; padding-bottom: 5px; font-size: 14px; }
.file-drop { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 18px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius-sm);
  color: var(--text-2); cursor: pointer; font-weight: 500; }
.file-drop:hover { border-color: var(--accent); color: var(--accent); }
.file-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-drop span { display: inline-flex; align-items: center; gap: 8px; }
.file-list { display: flex; flex-wrap: wrap; gap: 6px; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 980px; background: var(--fill); color: var(--text); font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip .ic { width: 15px; height: 15px; }
.shake { animation: shake .5s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.request-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.request-layout aside .card + .card, .request-layout aside form + .card, .request-layout aside .card + form { margin-top: 16px; }
.request-layout .request-form-head { margin-bottom: 16px; }
.answers { margin: 0; display: grid; gap: 0; }
.answer { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr); gap: 16px; }
.answer:last-child { border-bottom: 0; }
.answer dt { color: var(--text-2); font-size: 14px; }
.answer dd { margin: 0; overflow-wrap: anywhere; }
.answer-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.answer-files { display: flex; flex-wrap: wrap; gap: 8px; }
.answer-files img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; display: block; }
@media (max-width: 900px) {
  .request-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .answer { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .request-form-head { flex-wrap: wrap; }
}

/* ------------------------------------------------------------- job board */
.kind-blue { --tone: var(--accent); --tone-soft: var(--accent-soft); }
.kind-green { --tone: var(--green); --tone-soft: var(--green-soft); }
.kind-orange { --tone: var(--orange); --tone-soft: var(--orange-soft); }
.kind-purple { --tone: var(--purple); --tone-soft: var(--purple-soft); }
.kind-red { --tone: var(--red); --tone-soft: var(--red-soft); }
.kind-gray { --tone: var(--text-3); --tone-soft: var(--fill); }
.ic.flip { transform: scaleX(-1); }
.touch-only { display: none; }
@media (hover: none) { .touch-only { display: inline; } }
.board-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 12px; }
.board-heading { font-size: 20px; margin-left: 6px; white-space: nowrap; }
.board-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-bottom: 12px; font-size: 13px; color: var(--text-2); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-item i { width: 10px; height: 10px; border-radius: 3px; background: var(--tone); }
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: stretch; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.board-col { flex: 1 0 196px; min-width: 196px; background: var(--fill-2); border-radius: 16px; display: flex; flex-direction: column; scroll-snap-align: start; }
.board-col.is-weekend { flex: 0 0 150px; min-width: 150px; }
.board-col header strong, .board-col header .col-date { white-space: nowrap; }
.board-toolbar .select { width: auto; max-width: 200px; }
.board-toolbar form { flex-wrap: nowrap; }
.board-col.col-unscheduled { background: var(--orange-soft); }
.board-col.is-today { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.board-col.is-past:not(.is-today) header { opacity: .6; }
.board-col header { display: flex; align-items: center; gap: 6px; padding: 10px 8px 6px 12px; font-size: 14px; }
.board-col header .col-date { color: var(--text-2); }
.board-col header .col-count { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--text-2); background: var(--surface); border-radius: 10px; padding: 1px 7px; }
.board-col header .icon-btn { width: 28px; height: 28px; }
.board-col header .icon-btn .ic { width: 17px; height: 17px; }
.board-list { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 4px 8px 12px; min-height: 90px; border-radius: 12px; transition: background .12s; }
.board-list.drop-hover { background: var(--fill); }
.job-card { display: flex; flex-direction: column; gap: 3px; padding: 9px 11px 9px 13px; background: var(--surface); border-radius: 12px; color: var(--text);
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 1px 1px rgba(0,0,0,.03); border: 1px solid var(--line); border-left: 4px solid var(--tone);
  cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; font-size: 14px; position: relative; }
.job-card:hover { text-decoration: none; border-color: var(--line-strong); border-left-color: var(--tone); box-shadow: var(--shadow); }
.job-card .jc-top { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; font-weight: 600; color: var(--tone); }
.job-card .jc-time { color: var(--text-2); font-weight: 600; white-space: nowrap; }
.job-card .jc-title { font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; }
.job-card .jc-sub, .job-card .jc-meta { font-size: 13px; color: var(--text-2); line-height: 1.3; overflow-wrap: anywhere; }
.job-card .jc-foot { display: flex; align-items: center; gap: 6px; justify-content: flex-end; min-height: 4px; }
.job-card .jc-foot .pill { height: 20px; font-size: 11px; padding: 0 7px; margin-right: auto; }
.job-card .jc-who { width: 24px; height: 24px; border-radius: 50%; background: var(--tone-soft); color: var(--tone); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.job-card.is-done { opacity: .62; }
.job-card.is-done .jc-title { text-decoration: line-through; text-decoration-color: var(--text-3); }
.job-card.is-compact { padding: 5px 8px 5px 9px; gap: 1px; font-size: 12px; border-radius: 8px; border-left-width: 3px; }
.job-card.is-compact .jc-top { font-size: 11px; }
.job-card.is-compact .jc-kind { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-card.is-compact .jc-title { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job-card.is-compact .jc-foot { display: none; }
.job-card.is-dragging { opacity: .35; }
.job-ghost { position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none; box-shadow: 0 16px 40px rgba(0,0,0,.25); opacity: .95; }
body.is-board-dragging, body.is-board-dragging * { cursor: grabbing !important; }
/* month */
.month-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 14px; align-items: start; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--line); gap: 1px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.month-dow { background: var(--surface-2); padding: 8px 10px; font-size: 12px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; }
.month-cell { background: var(--surface); min-height: 118px; display: flex; flex-direction: column; min-width: 0; }
.month-cell.is-out { background: var(--surface-2); }
.month-cell.is-out .month-day a { color: var(--text-3); }
.month-cell.is-today .month-day a { background: var(--accent); color: #fff; }
.month-day { display: flex; justify-content: space-between; align-items: center; padding: 4px 4px 0 6px; }
.month-day a { font-size: 13px; font-weight: 600; color: var(--text); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; }
.month-day .icon-btn { width: 24px; height: 24px; opacity: 0; }
.month-cell:hover .month-day .icon-btn { opacity: 1; }
.month-day .icon-btn .ic { width: 15px; height: 15px; }
.month-cell .board-list { gap: 4px; padding: 2px 4px 6px; min-height: 60px; }
.month-side { position: sticky; top: 76px; max-height: calc(100vh - 100px); }
.month-side .board-list { overflow-y: auto; }
/* job details (panel + page) */
.drawer-close { position: absolute; top: 14px; right: 14px; }
.drawer-loading { padding: 40px; text-align: center; color: var(--text-2); }
#jobDrawerBody { position: relative; }
.job-head h2 { font-size: 24px; margin: 10px 0 2px; overflow-wrap: anywhere; }
.job-when { display: flex; align-items: center; gap: 6px; color: var(--text-2); margin: 8px 0 0; font-weight: 500; }
.job-when .ic { width: 17px; height: 17px; }
.job-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.job-actions form { margin: 0; }
.job-facts { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.job-facts > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.job-facts dt { color: var(--text-2); font-size: 14px; }
.job-facts dd { margin: 0; overflow-wrap: anywhere; }
.job-notes { margin-top: 14px; padding: 12px 14px; background: var(--fill-2); border-radius: 12px; font-size: 15px; }
.pod-box { margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: var(--green-soft); }
.pod-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; margin-top: 12px; }
.pod-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.pod-sig { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.pod-sig img { width: 180px; max-width: 100%; background: #fff; border-radius: 10px; border: 1px solid var(--line); }
.pod-send { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.kind-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.kind-option { cursor: pointer; }
.kind-option input { position: absolute; opacity: 0; pointer-events: none; }
.kind-option span { display: inline-block; padding: 6px 12px; border-radius: 980px; border: 1px solid var(--line-strong); font-size: 14px; font-weight: 500; }
.kind-option input:checked + span { background: var(--tone-soft); border-color: var(--tone); color: var(--tone); }
.kind-option input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }
.job-edit-compact .grid-2 { grid-template-columns: minmax(0, 1fr); }
.job-edit-compact .span-2 { grid-column: auto; }
@media (max-width: 1100px) { .month-wrap { grid-template-columns: minmax(0, 1fr); } .month-side { position: static; max-height: none; } }
@media (max-width: 860px) {
  .board-col, .board-col.is-weekend { flex: 0 0 78vw; min-width: 0; }
  .hide-sm { display: none; }
  .month-cell { min-height: 84px; }
  .month .job-card.is-compact .jc-top { display: none; }
  .job-facts > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

/* ------------------------------------------------------------- routes */
.routes-board .board-col { flex: 1 0 230px; min-width: 230px; }
.board-list.numbered { counter-reset: stop; }
.board-list.numbered .job-card { padding-left: 36px; }
.board-list.numbered .job-card::before { counter-increment: stop; content: counter(stop); position: absolute; left: 9px; top: 10px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--tone); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.jc-who-lg { width: 28px; height: 28px; border-radius: 50%; background: var(--surface); font-size: 11px; font-weight: 700; display: grid; place-items: center; flex: none; }
.route-link { display: flex; align-items: center; gap: 6px; justify-content: center; padding: 8px 10px 12px; font-size: 14px; font-weight: 500; }
.route-link .ic { width: 17px; height: 17px; }
.route-go { margin-bottom: 14px; height: 50px; font-size: 16px; }
.stop-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.stop { display: flex; gap: 14px; background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); border: 1px solid var(--line); border-left: 5px solid var(--tone); }
.stop.is-done { opacity: .6; }
.stop-num { width: 32px; height: 32px; border-radius: 50%; background: var(--tone); color: #fff; font-weight: 700; display: grid; place-items: center; flex: none; }
.stop-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.stop-title { font-size: 18px; font-weight: 650; color: var(--text); overflow-wrap: anywhere; }
.stop-notes summary { cursor: pointer; font-size: 14px; color: var(--accent); margin-top: 4px; }
.stop-notes div { font-size: 14px; padding: 8px 10px; background: var(--fill-2); border-radius: 10px; margin-top: 6px; }
.stop-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.stop-actions form { margin: 0; }
@media (max-width: 640px) {
  .stop { padding: 14px 12px; gap: 10px; }
  .stop-actions .btn { height: 40px; padding: 0 14px; font-size: 14px; flex: 1 0 auto; }
  .routes-board .board-col { flex: 0 0 82vw; }
}

/* ------------------------------------------------------------- complete a job (phone) */
.complete-form { max-width: 640px; }
.complete-head { border-left: 5px solid var(--tone); }
.complete-head h2 { margin: 8px 0 2px; font-size: 22px; }
.complete-form .card + .card { margin-top: 14px; }
.seg-block { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
.seg-block label { cursor: pointer; }
.seg-block input { position: absolute; opacity: 0; pointer-events: none; }
.seg-block span { display: block; text-align: center; padding: 10px; border-radius: 8px; font-weight: 600; font-size: 15px; }
.seg-block input:checked + span { background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.photo-add { aspect-ratio: 1; border: 1.5px dashed var(--line-strong); border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; color: var(--accent); font-size: 13px; font-weight: 600; cursor: pointer; text-align: center; padding: 6px; }
.photo-add input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-add .ic { width: 28px; height: 28px; }
.photo-thumb { position: relative; aspect-ratio: 1; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; display: block; }
.photo-thumb button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 12px; }
.sig-pad { position: relative; height: 190px; border: 1.5px solid var(--line-strong); border-radius: 14px; background: #fff; overflow: hidden; }
.sig-pad canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.sig-hint { position: absolute; left: 0; right: 0; bottom: 34px; text-align: center; color: #b0b0b5; pointer-events: none; border-top: 1px dashed #d2d2d7; margin: 0 24px; padding-top: 6px; font-size: 14px; }
.sig-hint[hidden] { display: none; }
#sigField[hidden], #signerField[hidden] { display: none; }

/* ------------------------------------------------------------- site surveys */
.survey-list { display: flex; flex-direction: column; gap: 12px; max-width: 980px; }
.survey-list .card + .card { margin-top: 0; }
.survey-card { display: flex; gap: 16px; align-items: flex-start; border-left: 5px solid var(--purple); }
.survey-card.needs-rep { border-left-color: var(--orange); }
.survey-main { flex: 1; min-width: 0; }
.survey-main h3 { margin: 8px 0 2px; font-size: 18px; }
.survey-main h3 a { color: var(--text); }
.survey-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; color: var(--text-2); }
.survey-about { margin: 8px 0 0; font-size: 14px; color: var(--text-2); }
.survey-side { display: flex; flex-direction: column; gap: 8px; flex: none; }
@media (max-width: 640px) { .survey-card { flex-direction: column; } .survey-side { flex-direction: row; flex-wrap: wrap; } }

/* ------------------------------------------------------------- people picker */
.people-picker { border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 10px; background: var(--surface); }
.pp-chosen { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; min-height: 26px; align-items: center; }
.pp-picked { border: 0; background: var(--accent); color: #fff; border-radius: 980px; padding: 4px 11px; font: 600 13px var(--font); cursor: pointer; }
.pp-search { width: 100%; margin-bottom: 6px; }
.pp-groups { max-height: 210px; overflow-y: auto; }
.pp-group[hidden], .pp-chip[hidden] { display: none; }
.pp-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin: 8px 0 4px; }
.pp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pp-chip { cursor: pointer; }
.pp-chip input { position: absolute; opacity: 0; pointer-events: none; }
.pp-chip span { display: inline-block; padding: 4px 11px; border-radius: 980px; border: 1px solid var(--line-strong); font-size: 13px; font-weight: 500; }
.pp-chip input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.pp-chip input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }
.job-card .jc-more { background: var(--fill); color: var(--text-2); }
.job-card .jc-foot { gap: 3px; }

/* ------------------------------------------------------------- live tracking */
.track-card { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; max-width: 720px; }
.track-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.track-tip { color: var(--text-3); display: none; }
.track-card.is-on .track-tip { display: block; }
.track-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--text-3); flex: none; }
.track-card[data-state="live"] .track-dot { background: var(--green); box-shadow: 0 0 0 0 var(--green); animation: livepulse 1.8s infinite; }
.track-card[data-state="wait"] .track-dot { background: var(--orange); }
.track-card[data-state="warn"] .track-dot { background: var(--red); }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(52,199,89,.55); } 70% { box-shadow: 0 0 0 12px rgba(52,199,89,0); } 100% { box-shadow: 0 0 0 0 rgba(52,199,89,0); } }
.live-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 280px; margin-bottom: 18px; min-height: 360px; }
#liveMap { min-height: 360px; z-index: 0; }
.live-side { padding: 16px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.live-list { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; max-height: 300px; }
.live-row { display: flex; gap: 10px; align-items: flex-start; text-align: left; background: none; border: 0; padding: 8px; border-radius: 10px; cursor: pointer; font: inherit; color: var(--text); }
.live-row:hover { background: var(--fill-2); }
.live-row > span:last-child { display: flex; flex-direction: column; }
.live-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; flex: none; }
.live-dot.is-stale { opacity: .35; }
.live-pin-wrap { background: none; border: 0; }
.live-pin { width: 36px; height: 36px; border-radius: 50%; background: var(--pin); color: #fff; font: 700 12px/32px var(--font); text-align: center; display: block; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.live-pin.is-stale { filter: grayscale(.8); opacity: .7; }
.leaflet-popup-content { font: 14px/1.45 var(--font); }
@media (max-width: 860px) { .live-wrap { grid-template-columns: minmax(0, 1fr); } .live-side { border-left: 0; border-top: 1px solid var(--line); } #liveMap { min-height: 300px; } }
@media (max-width: 640px) { .track-card { flex-wrap: wrap; } .track-card .btn { width: 100%; } }
#liveMap.map-dark .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.9); }

/* ------------------------------------------------------------- survey pipeline */
.pipeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; margin-bottom: 16px; }
.pipe-step { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--text); border-top: 4px solid var(--tone); }
.pipe-step:hover { text-decoration: none; border-color: var(--tone); }
.pipe-step.is-active { background: var(--tone-soft); border-color: var(--tone); }
.pipe-step strong { font-size: 24px; line-height: 1.1; letter-spacing: -.02em; }
.pipe-step span { font-size: 13px; color: var(--text-2); }
.survey-toolbar .select { max-width: 210px; }
.check-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; white-space: nowrap; }
.survey-count { margin: 4px 0 10px; }
.survey-table td { vertical-align: top; }
.survey-table .sv-client { max-width: 320px; }
.survey-table .sv-note { max-width: 300px; }
.text-red { color: var(--red); font-weight: 600; }
.show-md { display: none; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 16px 0; }
.survey-head h2 { font-size: 26px; margin: 10px 0 6px; }
.survey-addr { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.survey-addr .ic, .survey-contact .ic { width: 16px; height: 16px; }
.survey-contact { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font-size: 15px; }
.survey-contact > * { display: inline-flex; align-items: center; gap: 6px; }
.pipe-steps { list-style: none; display: flex; margin: 18px 0 0; padding: 0; }
.pipe-steps li { flex: 1; text-align: center; font-size: 12px; color: var(--text-3); position: relative; }
.pipe-steps li span { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--fill); margin: 0 auto 6px; position: relative; z-index: 1; }
.pipe-steps li::before { content: ""; position: absolute; top: 6px; left: -50%; width: 100%; height: 3px; background: var(--fill); }
.pipe-steps li:first-child::before { display: none; }
.pipe-steps li.done span, .pipe-steps li.done::before { background: var(--accent); }
.pipe-steps li.done { color: var(--text-2); }
.pipe-steps li.current { color: var(--text); font-weight: 700; }
.pipe-steps li.current span { box-shadow: 0 0 0 4px var(--accent-soft); }
.note-form { padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.note-form .fillers { margin-top: 8px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex: none; }
.tl-body { margin-top: 2px; overflow-wrap: anywhere; }
.inline-form { display: inline; margin-left: 6px; }
.stage-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.stage-option { cursor: pointer; }
.stage-option input { position: absolute; opacity: 0; pointer-events: none; }
.stage-option span { display: inline-block; padding: 6px 12px; border-radius: 980px; border: 1px solid var(--line-strong); font-size: 14px; font-weight: 500; }
.stage-option input:checked + span { background: var(--tone-soft); border-color: var(--tone); color: var(--tone); }
@media (max-width: 860px) { .hide-md { display: none; } .show-md { display: block; } .survey-toolbar .select { max-width: none; flex: 1 1 140px; } }
.auth-brand { display: flex; justify-content: center; margin: 0 auto 14px; }
.auth-brand .brand-text { display: none; }
.auth-brand .brand-mark { width: 56px; height: 56px; border-radius: 16px; font-size: 20px; }
.auth-brand.has-image { width: 100%; }
.auth-brand.has-image img { width: 100%; max-width: 420px; height: auto; margin: 0 auto; }
.auth-brand.has-image + h1 { display: none; }
.auth-brand .logo-dark { display: none; }
:root[data-theme="dark"] .auth-brand .logo-light { display: none; }
:root[data-theme="dark"] .auth-brand .logo-dark { display: block; }
.auth-brand.has-image .logo-light { display: block; }

/* ------------------------------------------------------------- temporary password alert (Settings) */
.pw-alert { position: relative; max-width: 720px; margin-bottom: 24px; border: 2px solid var(--red); background: linear-gradient(180deg, var(--red-soft), var(--surface) 140px);
  animation: pw-in .5s cubic-bezier(.2, .9, .3, 1.3) both, pw-pulse 2.2s ease-in-out .6s infinite; }
.pw-alert-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.pw-alert-head h2 { font-size: 22px; margin-bottom: 2px; }
.pw-alert-head p { margin: 0; color: var(--text-2); }
.pw-alert-icon { width: 54px; height: 54px; border-radius: 16px; background: var(--red); color: #fff; display: grid; place-items: center; flex: none;
  box-shadow: 0 6px 18px rgba(215, 0, 21, .35); animation: pw-wobble 2.2s ease-in-out .6s infinite; transform-origin: 50% 20%; }
.pw-alert-icon svg { width: 30px; height: 30px; }
.pw-alert .btn-lg { width: 100%; }
.pw-alert .form-actions { margin-top: 4px; }
@keyframes pw-in { from { opacity: 0; transform: translateY(-14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes pw-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(215, 0, 21, .35); } 50% { box-shadow: 0 0 0 10px rgba(215, 0, 21, 0); } }
@keyframes pw-wobble { 0%, 60%, 100% { transform: rotate(0); } 66% { transform: rotate(-12deg); } 74% { transform: rotate(10deg); } 82% { transform: rotate(-6deg); } 90% { transform: rotate(3deg); } }
@media (prefers-reduced-motion: reduce) { .pw-alert, .pw-alert-icon { animation: none; } }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 70px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: var(--fill); color: var(--text-2); border-radius: 8px; padding: 5px 10px; font: 600 12px var(--font); cursor: pointer; }
.pw-eye:hover { color: var(--accent); }
.pw-rules { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--text-3); }
.pw-rules li::before { content: "○ "; }
.pw-rules li.ok { color: var(--green); }
.pw-rules li.ok::before { content: "✓ "; font-weight: 700; }
@media (min-width: 861px) { .pw-alert .pw-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; } .pw-alert .pw-fields .field:first-child { grid-column: span 2; } }

/* ------------------------------------------------------------- locked until the temporary password is changed */
.nav-lock-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.is-locked .nav, .is-locked .nav-view-switch, .is-locked .topbar-search, .is-locked .search-mobile, .is-locked .bell-btn, .is-locked .foot-chip, .is-locked .tabbar {
  filter: grayscale(1) blur(.4px); opacity: .32; pointer-events: none; user-select: none; transition: opacity .3s; }
.is-locked .nav-view-switch { display: none; }
.nav-lock { position: absolute; z-index: 2; left: 6px; right: 6px; top: 34px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  padding: 18px 14px; border-radius: 16px; background: var(--glass); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); color: var(--text); animation: pw-in .5s cubic-bezier(.2, .9, .3, 1.3) both; }
.nav-lock:hover { text-decoration: none; border-color: var(--red); }
.nav-lock strong { font-size: 15px; }
.nav-lock span:last-child { font-size: 13px; color: var(--text-2); line-height: 1.35; }
.nav-lock-icon { width: 44px; height: 44px; border-radius: 14px; background: var(--text-3); color: #fff; display: grid; place-items: center; margin-bottom: 4px; animation: pw-wobble 2.2s ease-in-out .6s infinite; transform-origin: 50% 20%; }
.nav-lock-icon svg { width: 24px; height: 24px; }
@media (prefers-reduced-motion: reduce) { .nav-lock, .nav-lock-icon { animation: none; } }
.is-locked .nav-lock-wrap::before { content: ""; position: absolute; inset: 0 -4px; z-index: 1; border-radius: 14px; background: rgba(120, 120, 128, .14); pointer-events: none; }

/* ------------------------------------------------------------- Epson tag, 4" x 2" (v0.9.4) */
/* Taller boxes: bigger QR codes, product # and sign maker centered with room above (for the little caption) and below. */
.ep-qr { width: 0.6in; height: 0.6in; max-height: 0.6in; }
.ep-qrs { --qr: min(0.6in, 100%); }
.ep-row { flex: 1.15; }
.ep-product-body { padding: 8pt 3pt 3pt; align-items: center; }
.ep-product-no { font-size: 40pt; line-height: 1.15; padding: 0; }
.ep-maker { padding: 8pt 3pt 3pt; align-items: center; }
.ep-maker-name { font-size: 26pt; line-height: 1.15; text-align: center; overflow-wrap: normal; }
.ep-maker-name[style*="white-space: normal"] { line-height: 1.02; }
.ep-p { font-size: 40pt; }
.ep-invoice-no { font-size: 44pt; line-height: 1.15; }
.ep-invoice:has(.ep-notes:not(.is-empty)) .ep-invoice-no { font-size: 34pt; }
.ep-notes { font-size: 8pt; }
/* The side band: wider, and the word grows to fill it (sized by the label script). */
.ep-band { width: 0.42in; }
.ep-band span { padding: 3pt 0; line-height: 0.86; font-size: 30pt; letter-spacing: 0.4pt; display: flex; align-items: center; justify-content: center; width: 100%; }
/* The official FASTSIGNS logo (assets/fastsigns-logo.svg / .png), turned to run up the side and printed black. */
.ep-logo-img { position: relative; width: 100%; height: 100%; display: block; overflow: hidden; }
.ep-logo-img img { position: absolute; left: 50%; top: 50%; width: calc(var(--lh) - 0.2in); height: auto; max-height: 0.27in; object-fit: contain;
  transform: translate(-50%, -50%) rotate(-90deg); filter: brightness(0); }
.ep-logo-img img { width: calc(var(--lh) - 0.14in); max-height: 0.3in; }

/* ------------------------------------------------------------- Google sign-in */
.google-card { text-align: center; }
.google-btn { display: flex; justify-content: center; min-height: 44px; }
.google-msg { margin-top: 12px; padding: 10px 12px; border-radius: 10px; font-size: 14px; background: var(--fill); }
.google-msg.is-error { background: var(--red-soft); color: var(--red); font-weight: 500; }
.google-msg.is-pending { background: var(--green-soft); color: var(--text); }
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 13px; margin: 16px 0; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }

/* ------------------------------------------------------------- people: bulk add + sign-ups */
.import-table td { vertical-align: top; padding: 8px 6px !important; }
.import-table .input-sm, .import-table .select-sm { min-width: 96px; }
.import-table tr.is-existing { background: var(--fill-2); }
.import-table code, #resultsTable code { font-size: 13px; }
.signup-card { border: 2px solid var(--orange); margin-bottom: 20px; }
.signup-card .list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.signup-card .list { list-style: none; margin: 0; padding: 0; }
.signup-card form { margin: 0; }

/* Epson tag 4.5" x 2" (v0.9.5): the extra half inch goes to the info column so both QR codes fit beside their captions. */
.ep-info { width: 1.85in; }
.ep-qrs { justify-content: space-between; gap: 3pt; }
.ep-qr { width: 0.62in; height: 0.62in; max-height: 0.62in; }
.temp-pw-chip { display: inline-flex; align-items: center; gap: 8px; padding: 2px 10px; border-radius: 980px; background: var(--orange-soft); font-size: 13px; }
.temp-pw-chip code { font-size: 13px; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 8px; }
tr.is-off td { opacity: .55; }
.person-center { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--text); }
.person-center .ic { width: 15px; height: 15px; flex: none; color: var(--text-3); }
.person-tags { display: flex; flex-wrap: wrap; gap: 4px; }

/* On hold column */
.board-col.col-hold { background: repeating-linear-gradient(135deg, var(--fill-2) 0 10px, transparent 10px 20px), var(--purple-soft); }
.board-col.col-hold header strong::before { content: "⏸ "; }
.month-side > header + .board-list + header { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.col-hint { margin: 8px 4px; font-size: 13px; color: var(--text-3); text-align: center; }
.board-list.drop-hover .col-hint { display: none; }
