/* Werktyd's shared visual layer. Product-specific styles remain in their
 * existing files; this file keeps the app shell, forms and common surfaces
 * consistent with the public website. */
:root {
  --bg: #f0f1ec;
  --bg-grad: #f0f1ec;
  --panel: #fffef9;
  --ink: #10231b;
  --ink-soft: #263c33;
  --muted: #5f6d65;
  --muted-soft: #5f6d65;
  --line: #dce1da;
  --line-soft: #edf0eb;
  --brand: #1f7654;
  --brand-deep: #123a2b;
  --brand-tint: #e8f3ed;
  --accent: #c8ee67;
  --shadow-sm: 0 1px 2px rgba(16, 35, 27, .045);
  --shadow: 0 10px 30px rgba(16, 35, 27, .075);
  --shadow-lg: 0 24px 60px rgba(16, 35, 27, .13);
  --radius: 16px;
  --radius-sm: 10px;
}

html { min-height: 100%; }
.sr-only { position:absolute !important; width:1px !important; height:1px !important; padding:0 !important; margin:-1px !important; overflow:hidden !important; clip:rect(0,0,0,0) !important; white-space:nowrap !important; border:0 !important; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* App header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 254, 249, .94);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
}
.app-topbar {
  min-height: 66px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 10px 26px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
  letter-spacing: -.025em;
  text-decoration: none;
}
.app-brand:hover { text-decoration: none; }
.app-brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--brand-deep);
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}
.company-context {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: 18px;
  padding-left: 22px;
  border-left: 1px solid var(--line);
}
.company-initial {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--brand);
  font-size: 12px;
  font-weight: 850;
}
.company-context > span:last-child { min-width: 0; }
.company-context strong {
  display: block;
  max-width: 260px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.company-label {
  display: block;
  color: var(--muted-soft);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.account-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.header-action {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
}
.header-action:hover { border-color: #aeb9b1; color: var(--ink); background: var(--panel); }
.nav {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 26px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  border: 0;
  background: transparent;
  box-shadow: none;
  position: static;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  position: relative;
  flex: 0 0 auto;
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  transition: color .15s, background .15s;
}
.nav a:hover { color: var(--ink); background: var(--line-soft); text-decoration: none; }
.nav a.on { color: var(--brand-deep); }
.nav a.on::after { left: 11px; right: 11px; bottom: 0; height: 3px; background: var(--brand); }
.nav-divider { width: 1px; height: 18px; flex: 0 0 auto; margin: 0 4px; background: var(--line); }

.wrap { width: 100%; max-width: 1240px; flex: 1 0 auto; margin: 36px auto; padding: 0 26px; }
h1 { font-size: 30px; letter-spacing: -.035em; }
h2 { letter-spacing: -.025em; }

/* Controls and surfaces */
input, select, textarea {
  border-color: var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--ink);
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.btn {
  border-radius: 999px;
  background: var(--brand-deep);
  box-shadow: none;
  letter-spacing: -.005em;
}
.btn:hover { background: #0b2a1f; box-shadow: none; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger:hover { background: #be123c; }
.btn.alt { border: 1px solid var(--line); background: var(--panel); color: var(--ink); }
.btn.alt:hover { border-color: #adb8b0; background: var(--line-soft); }
.btn.tg { background: #2678b8; }
.card-form, table.grid, .plan, .notice, .callout, .verify-card {
  border-color: var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}
.card-form:hover { box-shadow: var(--shadow-sm); }
.grid th { background: #f5f5f0; color: var(--muted); }
.grid tbody tr:hover { background: #f7f8f4; }
.notice { background: var(--brand-tint); border-color: #c9ded2; color: var(--brand-deep); }
.notice.err { background: #fff1f3; border-color: #fecdd3; color: #9f1239; }
.notice.ok { background: #e7f6ee; border-color: #b9dfca; color: #14532d; }
.callout { border-left-color: var(--brand); background: var(--brand-tint); }
.chip { letter-spacing: .04em; }
.chip.in { background: #dff3e7; color: #16643f; }
.chip.out { background: #eef0ec; color: var(--muted); }
.site-pill { background: var(--brand-tint); color: var(--brand); border-color: #c5ddd0; }

/* Dashboard: factual, calm and useful. */
.hero {
  min-height: 174px;
  align-items: flex-end;
  padding: 30px 32px;
  border: 1px solid #254f3d;
  border-radius: 22px;
  background: var(--brand-deep);
  box-shadow: none;
}
.hero::before {
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 36px 36px;
}
.hero-greeting { max-width: 660px; font-size: 34px; letter-spacing: -.045em; }
.hero-kicker { position: relative; z-index: 1; margin: 0 0 8px; color: var(--accent); font-size: 10px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.hero-sub { color: #b9cdc3; opacity: 1; }
.hero-art { display: none; }
.hero-status { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.13); border-radius: 999px; padding: 8px 12px; color: #dbe8e1; font-size: 11px; font-weight: 750; }
.hero-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(200,238,103,.1); }
.kpi-row { gap: 12px; margin-top: 14px; }
.kpi-tile { padding: 18px 20px; border-radius: 14px; box-shadow: none; }
.kpi-tile:hover { transform: none; box-shadow: var(--shadow-sm); }
.kpi-icon { display: inline-flex; min-width: 36px; margin-bottom: 14px; padding: 5px 7px; border-radius: 6px; background: var(--line-soft); color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .08em; }
.kpi-num { font-size: 34px; color: var(--ink); }
.kpi-label { color: var(--muted); }
.kpi-tile.kpi-in { border-top: 1px solid var(--line); }
.kpi-tile.kpi-in .kpi-icon { background: #dff3e7; color: #16643f; }
.kpi-tile.kpi-late.has, .kpi-tile.kpi-early.has, .kpi-tile.kpi-verify.has { border-top-width: 1px; }
.status-dot { display:inline-block; width:8px; height:8px; margin-right:9px; border-radius:999px; vertical-align:middle; }
.status-dot-warn { background:var(--warn); box-shadow:0 0 0 4px color-mix(in srgb, var(--warn) 15%, transparent); }
.live-head { margin-top: 34px; }
.live-head h2 { font-size: 24px; }

/* Authentication */
.public-body { background: #eef0e9; }
.public-body .wrap { max-width: 1160px; margin-block: auto; padding-block: 44px; }
.auth-shell { min-height: 600px; display: grid; grid-template-columns: .9fr 1.1fr; overflow: hidden; border: 1px solid var(--line); border-radius: 26px; background: var(--panel); box-shadow: var(--shadow-lg); }
.auth-intro { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 46px; overflow: hidden; background: var(--brand-deep); color: white; }
.auth-intro::after { content: ''; position: absolute; right: -120px; bottom: -130px; width: 320px; height: 320px; border: 1px solid rgba(200,238,103,.18); border-radius: 50%; box-shadow: 0 0 0 55px rgba(200,238,103,.03), 0 0 0 110px rgba(200,238,103,.02); }
.auth-brand { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 10px; color: white; font-size: 18px; font-weight: 850; text-decoration: none; }
.auth-brand:hover { text-decoration: none; }
.auth-brand .app-brand-mark { background: var(--accent); color: var(--brand-deep); }
.auth-message { position: relative; z-index: 1; max-width: 400px; }
.auth-message .eyebrow { margin: 0 0 14px; color: var(--accent); font-size: 10px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.auth-message h2 { margin: 0; font-size: 42px; line-height: 1.05; letter-spacing: -.05em; }
.auth-message p { color: #b9cdc3; font-size: 15px; }
.auth-facts { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; }
.auth-facts span { border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 7px 9px; color: #cfe0d7; font-size: 10px; font-weight: 750; }
.auth-card { align-self: center; width: min(430px, calc(100% - 64px)); margin: 40px auto; padding: 12px 0; text-align: left; }
.auth-card h1 { margin: 0 0 8px; color: var(--ink); font-size: 34px; letter-spacing: -.045em; }
.auth-card > .muted { margin: 0; }
.auth-card .stack { gap: 16px; margin-top: 28px; }
.field { display: grid; gap: 7px; }
.field-label { color: var(--ink-soft); font-size: 12px; font-weight: 800; }
.field input { width: 100%; min-height: 48px; }
.auth-card .btn { width: 100%; min-height: 48px; margin-top: 2px; }
.auth-switch { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.auth-switch a { font-weight: 800; }
.login { max-width: 430px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }

.foot { flex: 0 0 auto; margin-top: 0; background: rgba(255,254,249,.65); }

/* Dark mode uses the same restrained palette instead of the old violet skin. */
:root[data-theme="dark"] {
  --bg: #0f1814;
  --bg-grad: #0f1814;
  --panel: #17251f;
  --ink: #edf4f0;
  --ink-soft: #d4e1da;
  --muted: #94a79d;
  --muted-soft: #9caea4;
  --line: #2b3d34;
  --line-soft: #21322a;
  --brand: #78cba5;
  --brand-deep: #0a2b1f;
  --brand-tint: #1d382c;
  --accent: #c8ee67;
}
:root[data-theme="dark"] body { background: var(--bg); color: var(--ink); }
:root[data-theme="dark"] .app-header { background: rgba(23,37,31,.94); }
:root[data-theme="dark"] .app-brand { color: var(--ink); }
:root[data-theme="dark"] .app-brand-mark { background: var(--accent); color: #0b2a1f; }
:root[data-theme="dark"] .company-context strong { color: var(--ink-soft); }
:root[data-theme="dark"] .header-action { color: var(--muted); }
:root[data-theme="dark"] .header-action:hover { background: var(--line-soft); color: var(--ink); }
:root[data-theme="dark"] .nav { background: transparent; }
:root[data-theme="dark"] .nav a.on { color: var(--accent); }
:root[data-theme="dark"] .nav a:hover { background: var(--line-soft); color: var(--ink); }
:root[data-theme="dark"] .card-form,
:root[data-theme="dark"] table.grid,
:root[data-theme="dark"] .plan,
:root[data-theme="dark"] .notice,
:root[data-theme="dark"] .callout,
:root[data-theme="dark"] .verify-card,
:root[data-theme="dark"] .kpi-tile,
:root[data-theme="dark"] .login { background: var(--panel); border-color: var(--line); color: var(--ink); }
:root[data-theme="dark"] table.grid thead th { background: #101c17; color: var(--muted); }
:root[data-theme="dark"] table.grid tbody tr:hover { background: var(--line-soft); }
:root[data-theme="dark"] input,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] select { background: #101c17; color: var(--ink); border-color: var(--line); }
:root[data-theme="dark"] .btn { background: #1f7654; }
:root[data-theme="dark"] .btn:hover { background: #196548; }
:root[data-theme="dark"] .btn.alt { background: var(--line-soft); color: var(--ink); border-color: var(--line); }
:root[data-theme="dark"] .hero { background: #0a2b1f; }
:root[data-theme="dark"] .kpi-num { color: var(--ink); }
:root[data-theme="dark"] .public-body { background: #0f1814; }
:root[data-theme="dark"] .auth-shell { background: var(--panel); border-color: var(--line); }
:root[data-theme="dark"] .auth-card h1 { color: var(--ink); }
:root[data-theme="dark"] .field-label { color: var(--ink-soft); }
:root[data-theme="dark"] .foot { background: #101c17; }
.settings-readonly fieldset { min-width:0; margin:0; border:0; padding:0; }
.settings-readonly fieldset:disabled { opacity:.82; }
.compact-form { gap:6px; margin:0; }
.compact-form select, .compact-form input { min-height:36px; min-width:150px; font-size:11px; }
.restricted-proof { display:grid; place-items:center; min-height:150px; background:var(--line-soft); color:var(--muted); font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.08em; }

@media (max-width: 760px) {
  .app-topbar { min-height: 58px; padding: 9px 14px; gap: 12px; }
  .company-context { margin-left: 2px; padding-left: 12px; }
  .company-initial, .company-label { display: none; }
  .company-context strong { max-width: 120px; font-size: 11px; }
  .account-actions { gap: 6px; }
  .header-action { width: 36px; padding: 0; justify-content: center; }
  .header-action span:last-child { display: none; }
  .account-actions form .header-action { width: auto; padding-inline: 10px; }
  .nav { padding: 0 10px; }
  .nav-divider { display: none; }
  .wrap { margin: 22px auto; padding: 0 14px; }
  .auth-shell { min-height: auto; grid-template-columns: 1fr; }
  .auth-intro { min-height: 260px; padding: 28px; }
  .auth-message h2 { font-size: 34px; }
  .auth-facts { display: none; }
  .auth-card { width: calc(100% - 44px); margin: 30px auto 38px; }
  .hero { min-height: 154px; padding: 24px 20px; }
  .hero-greeting { font-size: 28px; }
  .hero-status { align-self: flex-start; }
}

.enrol-public .wrap { margin-block: 0; }
.enrol-page { width: min(100%, 780px); display: grid; gap: 18px; padding-block: 34px 54px !important; }
.enrol-brand { color: var(--brand-deep); }
.enrol-card { border: 1px solid var(--line); border-radius: 22px; padding: 34px; background: var(--panel); box-shadow: var(--shadow-lg); }
.enrol-card h1 { margin-bottom: 8px; font-size: 36px; }
.enrol-worker { margin: 0 0 20px; color: var(--muted); }
.enrol-privacy { max-width: 660px; margin: 0 0 22px; }
.enrol-card video { max-width: 100%; }
.enrol-card .row .btn { min-width: 210px; }
.enrol-support { margin: 20px 0 0; color: var(--muted); font-size: 12px; }
@media (max-width: 620px) { .enrol-card { padding: 24px 18px; } .enrol-card h1 { font-size: 30px; } .enrol-card .row .btn { width: 100%; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* --------------------------------------------------------------------------
   Product-wide components. These cover the dense operational screens that
   pre-date the new shell without changing their forms, routes, or data logic.
   -------------------------------------------------------------------------- */
.page-head, .head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}
.page-head > div, .head > div { min-width: 0; }
.page-head h1, .head h1 { margin: 0; }
.page-sub, .page-lead { max-width: 760px; margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.section-title { margin: 32px 0 8px; font-size: 20px; }
.section-note { margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.report-head { align-items: center; flex-wrap: wrap; }
.report-head > div:first-child { min-width: 190px; }
.report-head .ts-tabs { margin: 0; }
.report-head form { margin-left: auto; }
.settings-save { min-width: 160px; margin-top: 4px; }
.photo-view-img { display: block; max-width: min(100%,900px); max-height: 75vh; border: 1px solid var(--line); border-radius: 16px; background: #07120d; object-fit: contain; box-shadow: var(--shadow-lg); }
.eyebrow { color: var(--brand); font-size: 10px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }

.card-form {
  padding: 22px;
  box-shadow: none;
}
.card-form:hover { box-shadow: none; }
.card-form > h2:first-child, .card-form > h3:first-child { margin-top: 0; }
.card-form > p:last-child { margin-bottom: 0; }
.card-form label, form > label { color: var(--ink-soft); font-size: 12px; font-weight: 750; line-height: 1.45; }
.card-form input:not([type="checkbox"]):not([type="radio"]),
.card-form select,
.card-form textarea { width: 100%; }
.form-inline label { min-width: 126px; }
.form-inline input, .form-inline select { max-width: 260px; }
.form-inline .btn { align-self: flex-end; }
.cols { align-items: stretch; }
.cols .card-form { min-width: min(100%, 300px); }
.actions { flex-wrap: wrap; }
details > summary { cursor: pointer; }
details > summary:focus-visible { outline: 3px solid var(--brand-tint); outline-offset: 3px; border-radius: 3px; }

table.grid {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: #b9c4bc transparent;
  box-shadow: none;
}
table.grid thead, table.grid tbody { white-space: nowrap; }
.grid th, .grid td { padding: 12px 14px; }
.grid td { line-height: 1.4; }
/* THE COMPLIANCE CELL IS PROSE, NOT A FIGURE (2026-08-18).
   `table.grid thead, table.grid tbody { white-space: nowrap }` two rules up is
   right for every other cell — a wrapped time or amount is unreadable — but it
   also made the BCEA Limits cell 338px wide and unwrappable, so on a 1280px
   laptop the yearly view (12 month columns + 4) pushed it past the table edge
   and clipped it mid-sentence. Found by a RULE-0 walk, and it is the SECOND time
   this bit: week.ejs had to shorten its own flag wording for the same reason,
   and its comment says why — the compliance column is the last thing that should
   need horizontal scrolling to read. Wrapping fixes the cause rather than
   trimming words until they happen to fit. */
.grid th.limits, .grid td.limits { white-space: normal; min-width: 8.5rem; }
.grid .actions { min-width: 150px; }
.grid a, .grid button { white-space: nowrap; }
.grid code { font-size: 11px; }

.ts-tabs {
  display: inline-flex;
  gap: 3px;
  margin: 14px 0 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 3px;
  background: var(--panel);
}
.ts-tab { border-radius: 7px; padding: 8px 12px; color: var(--muted); font-size: 12px; font-weight: 750; }
.ts-tab:hover { background: var(--line-soft); text-decoration: none; }
.ts-tab.on { background: var(--brand-deep); color: #fff; }
.exports { display: flex; flex-wrap: wrap; gap: 7px; }

.workdays { display: flex; flex-wrap: wrap; gap: 8px; }
.workday-chip { position: relative; cursor: pointer; }
.workday-chip input { position: absolute; opacity: 0; pointer-events: none; }
.workday-chip span { min-width: 50px; min-height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--muted); font-size: 11px; font-weight: 850; letter-spacing: .04em; }
.workday-chip:has(input:checked) span { border-color: var(--brand); background: var(--brand-deep); color: #fff; }
.workday-chip:has(input:focus-visible) span { outline: 3px solid var(--brand-tint); outline-offset: 2px; }

.worker-cell { display: inline-flex; align-items: center; gap: 9px; }
.worker-name { color: var(--ink); font-weight: 750; }
.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border: 1px solid rgba(18,58,43,.1); border-radius: 10px; background: #e5efe8; color: var(--brand-deep); font-size: 10px; font-weight: 850; }
.channels-cell { min-width: 210px; }
.channel-pill { border: 1px solid #c8ddeb; background: #f0f7fb; color: #23638f; }
.channel-pill.tg { background: #eff7fc; color: #236e9f; }
.channel-pill .dot { width: 6px; height: 6px; }
.payroll-edit summary, .hours-edit summary { color: var(--brand); font-size: 12px; font-weight: 750; }

.pricing { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.plan { position: relative; padding: 22px 18px; text-align: left; box-shadow: none; }
.plan.featured { border-color: var(--brand); box-shadow: inset 0 3px 0 var(--brand); }
.plan h3 { font-size: 15px; }
.plan .price { color: var(--ink); font-size: 30px; letter-spacing: -.04em; }
.plan .per { line-height: 1.55; }
.plan .btn { width: 100%; justify-content: center; text-align: center; }

.tg-primary { border: 1px solid #b9d9ed !important; box-shadow: inset 3px 0 0 #2a86c3 !important; }
.pair-code { margin: 12px 0; border: 1px dashed #aab8af; border-radius: 10px; padding: 12px; background: #f8faf7; font-size: 17px; letter-spacing: .04em; }
.pair-code code { color: var(--brand-deep); }
.connection-card { max-width: 780px; display: grid; grid-template-columns: 64px 1fr; gap: 20px; border: 1px solid var(--line); border-radius: 18px; padding: 26px; background: var(--panel); }
.connection-mark { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 15px; background: #e8f4fb; color: #236e9f; font-size: 12px; font-weight: 900; letter-spacing: .04em; }
.connection-card.is-connected .connection-mark { background: #e4f4e9; color: #1d714d; }
.connection-status { margin: 0 0 5px; color: var(--brand); font-size: 9px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.connection-body h2 { margin: 0 0 7px; font-size: 22px; }
.connection-body > p:not(.connection-status) { margin: 0; color: var(--muted); line-height: 1.55; }
.connection-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.pairing-manual { display: grid; gap: 4px; margin-top: 22px; border-top: 1px solid var(--line); padding-top: 18px; }
.pairing-manual > span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.pairing-manual code { width: fit-content; border-radius: 8px; padding: 9px 11px; background: var(--line-soft); color: var(--brand-deep); font-size: 15px; }
.pairing-manual small { color: var(--muted); }
@media (max-width: 560px) { .connection-card { grid-template-columns: 1fr; padding: 20px; } .connection-actions .btn, .connection-actions form { width: 100%; } .connection-actions form .btn { width: 100%; } }
.help-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.help-item { border: 1px solid var(--line); border-radius: 13px; background: var(--panel); }
.help-item summary { position: relative; list-style: none; padding: 17px 44px 17px 18px; color: var(--ink); font-size: 13px; font-weight: 800; }
.help-item summary::-webkit-details-marker { display: none; }
.help-item summary::after { content: '+'; position: absolute; right: 18px; color: var(--muted); font-size: 17px; font-weight: 500; }
.help-item[open] summary::after { content: '−'; }
.help-item > div { border-top: 1px solid var(--line-soft); padding: 4px 18px 15px; }
.help-item p { color: var(--muted); font-size: 12px; line-height: 1.65; }
.help-contact { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 22px; border-radius: 16px; padding: 22px; background: var(--brand-deep); color: #fff; }
.help-contact h2 { margin: 0 0 4px; color: #fff; font-size: 20px; }
.help-contact p { margin: 0; color: #bfd0c7; font-size: 12px; }
.help-contact .btn.alt { border-color: rgba(255,255,255,.15); background: transparent; color: #fff; }
@media (max-width: 700px) { .help-grid { grid-template-columns: 1fr; } .help-contact { align-items: flex-start; flex-direction: column; } .help-contact .btn { width: 100%; } }

.legal { max-width: 820px; }
.legal h1 { margin-bottom: 10px; }
.legal h2, .legal h3 { margin-top: 30px; color: var(--ink); }
.legal p, .legal li { color: var(--ink-soft); line-height: 1.72; }
.legal li + li { margin-top: 7px; }
.legal .muted { color: var(--muted); }
.public-legal .wrap { margin-block: 28px; }
.legal-brand { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 34px; color: var(--brand-deep); font-size: 15px; font-weight: 850; }
.legal-brand:hover { text-decoration: none; }
.legal-brand span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--brand-deep); color: var(--accent); font-size: 11px; }
.legal-form { max-width: 560px; margin-top: 24px; border: 1px solid var(--line); border-radius: 15px; padding: 22px; background: var(--panel); }
.legal-form label { margin-bottom: -5px; color: var(--ink-soft); font-size: 12px; font-weight: 800; }
.legal-form input, .legal-form select { width: 100%; }
.back-link { border-color: transparent; padding-left: 0; background: transparent; }
.back-link:hover { border-color: transparent; background: transparent; color: var(--brand); }

.enrol { max-width: 760px; }
.enrol video { width: min(100%, 620px); aspect-ratio: 4/3; border: 1px solid var(--line); border-radius: 18px; background: #07120d; object-fit: cover; box-shadow: var(--shadow-lg); }
.enrol .row { flex-wrap: wrap; }
.enrol .status { margin: 12px 0; border-radius: 9px; color: var(--brand-deep); }
.enrol hr { margin: 24px 0; border: 0; border-top: 1px solid var(--line); }
.enrol-intro { max-width: 680px; }

.verify-grid { grid-template-columns: repeat(auto-fit,minmax(290px,1fr)); }
.verify-card { border-radius: 15px; padding: 16px; }
.verify-card .actions { margin-top: auto; }
.verify-photo { max-width: none; aspect-ratio: 4/3; object-fit: cover; }

.notice, .callout { line-height: 1.55; box-shadow: none; }
.notice strong:first-child { color: inherit; }
.notice ol, .notice ul { padding-left: 22px; }
.callout { border: 1px solid #cfe0d6; border-left: 4px solid var(--brand); border-radius: 9px; }
.chip { min-height: 22px; }
.chip.pending { background: #fff7df; color: #875314; }
.danger { color: var(--danger); }

.foot { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 8px; border-top-color: var(--line); color: var(--muted); }
.foot a { margin: 0; color: var(--muted); }
.foot a:hover { color: var(--brand); }

:root[data-theme="dark"] .workday-chip span,
:root[data-theme="dark"] .pair-code,
:root[data-theme="dark"] .plan,
:root[data-theme="dark"] .avatar { background: var(--line-soft); border-color: var(--line); color: var(--ink-soft); }
:root[data-theme="dark"] .worker-name,
:root[data-theme="dark"] .plan .price,
:root[data-theme="dark"] .legal h2,
:root[data-theme="dark"] .legal h3,
:root[data-theme="dark"] .legal p,
:root[data-theme="dark"] .legal li { color: var(--ink); }
:root[data-theme="dark"] .ts-tab.on,
:root[data-theme="dark"] .workday-chip:has(input:checked) span { background: var(--accent); color: #0b2a1f; }
:root[data-theme="dark"] .tg-primary { background: var(--panel); }
:root[data-theme="dark"] .pair-code code { color: var(--accent); }

@media (max-width: 980px) {
  .pricing { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .page-head, .head { align-items: flex-start; flex-direction: column; }
  .page-head h1, .head h1 { font-size: 27px; }
  .card-form { padding: 17px; }
  .form-inline { align-items: stretch; flex-direction: column; }
  .form-inline label, .form-inline input, .form-inline select, .form-inline .btn { width: 100%; max-width: none; }
  .exports { margin-left: 0; }
  .ts-tabs { width: 100%; overflow-x: auto; }
  .ts-tab { flex: 1; text-align: center; white-space: nowrap; }
  .grid th, .grid td { padding: 11px 12px; font-size: 12px; }
  .pricing { grid-template-columns: 1fr; }
  .enrol .row { flex-direction: column; }
  .enrol .row .btn { width: 100%; }
  .foot { padding-inline: 18px; font-size: 11px; }
}
