:root {
  --nav: #343438;
  --nav-soft: #f4f7f7;
  --ink: #27272a;
  --muted: #526073;
  --line: #dfe4eb;
  --surface: #fff;
  --page: #f4f7f7;
  --brand: #007b77;
  --brand-dark: #00625f;
  --brand-tint: #eaf8f7;
  --green: #16794b;
  --green-tint: #eaf8f1;
  --amber: #a95e06;
  --amber-tint: #fff5df;
  --red: #c33434;
  --red-tint: #fff0f0;
  --blue: #315b9d;
  --blue-tint: #edf3ff;
  --shadow: 0 12px 32px rgb(25 36 53 / 8%);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--page);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--page); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; z-index: 1000; left: 12px; top: -80px; padding: 12px 16px; background: #fff; border-radius: 10px; box-shadow: var(--shadow); }
.skip-link:focus { top: 12px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 240px minmax(0, 1fr); }

.side-nav { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 24px 16px 18px; background: var(--nav); color: #dce3ef; }
.brand { display: flex; align-items: center; gap: 12px; min-height: 48px; margin: 0 8px 30px; text-decoration: none; }
.brand-mark, .dialog-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 900; letter-spacing: -.04em; }
.brand b, .brand small { display: block; }
.brand b { color: #fff; font-size: 15px; }
.brand small { margin-top: 2px; color: #aeb9ca; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.side-nav nav { display: grid; gap: 5px; }
.side-nav nav a { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 46px; padding: 0 12px; border-radius: 10px; color: #b9c3d2; text-decoration: none; font-size: 14px; font-weight: 650; transition: background .18s, color .18s, transform .18s; }
.side-nav nav a:hover { background: rgb(255 255 255 / 6%); color: #fff; transform: translateX(2px); }
.side-nav nav a.active { background: var(--brand); color: #fff; box-shadow: 0 8px 24px rgb(233 84 32 / 28%); }
.side-nav nav svg { width: 21px; height: 21px; }
.side-nav nav em { min-width: 22px; padding: 2px 6px; border-radius: 999px; background: rgb(255 255 255 / 11%); font-size: 11px; font-style: normal; text-align: center; }
.side-footer { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 14px 10px 2px; border-top: 1px solid rgb(255 255 255 / 9%); }
.side-footer span:last-child span, .side-footer b, .side-footer small { display: block; }
.side-footer b { color: #fff; font-size: 12px; }
.side-footer small { margin-top: 2px; color: #99a7ba; font-size: 11px; }
.ai-orb { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgb(255 255 255 / 16%); border-radius: 50%; background: #252f48; color: #a9b8ff; }

main { min-width: 0; }
.top-bar { position: sticky; z-index: 20; top: 0; height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(20px, 3vw, 44px); border-bottom: 1px solid var(--line); background: rgb(255 255 255 / 94%); backdrop-filter: blur(14px); }
.site-picker { display: grid; grid-template-columns: 42px auto auto auto; align-items: center; column-gap: 10px; }
.site-icon { grid-row: 1 / span 2; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--brand-tint); color: var(--brand); }
.site-icon svg { width: 21px; height: 21px; }
.site-picker label { grid-column: 2; align-self: end; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.site-picker select { grid-column: 2; align-self: start; appearance: none; min-width: 245px; padding: 2px 24px 2px 0; border: 0; outline: 0; background: linear-gradient(45deg, transparent 50%, var(--ink) 50%) right 8px center / 5px 5px no-repeat; color: var(--ink); font-weight: 750; }
.demo-pill, .privacy-chip { grid-column: 3; grid-row: 1 / span 2; padding: 6px 10px; border-radius: 999px; background: #eef1f5; color: #606b7c; font-size: 11px; font-weight: 750; white-space: nowrap; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.board-button { min-height: 40px; display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); text-decoration: none; font-size: 12px; font-weight: 800; }
.board-button:hover { border-color: var(--brand); color: var(--brand-dark); }
.sync-state { display: flex; align-items: center; gap: 7px; margin-right: 4px; color: var(--muted); font-size: 12px; }
.sync-state i { width: 8px; height: 8px; border-radius: 50%; background: #a9b0ba; box-shadow: 0 0 0 4px #eef0f3; }
.sync-state.ready i { background: var(--green); box-shadow: 0 0 0 4px var(--green-tint); }
.sync-state.error i { background: var(--red); box-shadow: 0 0 0 4px var(--red-tint); }
.icon-button { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; }
.icon-button svg { width: 20px; height: 20px; }
.icon-button:hover { border-color: #bac3cf; background: #f8f9fb; }
.content { width: min(1500px, 100%); margin: 0 auto; padding: 34px clamp(20px, 3vw, 44px) 28px; }
.error-banner { margin: 18px clamp(20px, 3vw, 44px) -8px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 16px; border: 1px solid #fac6c6; border-radius: 12px; background: var(--red-tint); color: #8f2525; }
.error-banner b, .error-banner span { display: block; }
.error-banner span { margin-top: 3px; font-size: 13px; }
.error-banner button { min-height: 40px; padding: 0 14px; border: 1px solid #e5a3a3; border-radius: 9px; background: #fff; color: #8f2525; cursor: pointer; font-weight: 700; }
.error-banner .error-action { min-height: 40px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 9px; background: #8f2525; color: #fff; font-weight: 750; text-decoration: none; white-space: nowrap; }

.hero { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding: 9px 0 28px; }
.eyebrow { margin: 0 0 7px; color: var(--brand); font-size: 11px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
h1 { max-width: 780px; margin: 0; font-size: clamp(28px, 3vw, 43px); line-height: 1.08; letter-spacing: -.035em; }
.hero-copy { max-width: 700px; margin: 13px 0 16px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.hero-status { display: flex; flex-wrap: wrap; gap: 8px; }
.status-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 999px; background: var(--green-tint); color: var(--green); font-size: 11px; font-weight: 800; }
.status-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-chip.neutral { background: #eef1f5; color: #677284; }
.status-chip.alert { background: #fff0f1; color: #b4232f; }
.hero-actions { display: flex; gap: 10px; flex: 0 0 auto; }
.primary-action, .secondary-action { display: flex; align-items: center; gap: 11px; min-height: 60px; padding: 8px 17px 8px 10px; border-radius: 13px; cursor: pointer; text-align: left; }
.primary-action { border: 1px solid var(--brand); background: var(--brand); color: #fff; box-shadow: 0 12px 25px rgb(0 123 119 / 16%); }
.secondary-action { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.button-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: rgb(255 255 255 / 16%); }
.secondary-action .button-icon { background: #edf0ff; color: #5260b7; }
.button-icon svg { width: 20px; height: 20px; }
.primary-action b, .primary-action small, .secondary-action b, .secondary-action small { display: block; }
.primary-action b, .secondary-action b { font-size: 13px; }
.primary-action small { color: #fff; }
.secondary-action small { color: var(--muted); }
.primary-action small, .secondary-action small { margin-top: 3px; font-size: 10px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.demo-journey { margin-bottom: 18px; overflow: hidden; border: 1px solid #343438; border-radius: 16px; background: #343438; color: #fff; box-shadow: var(--shadow); }
.demo-journey header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 21px 14px; border-bottom: 1px solid rgb(255 255 255 / 10%); }
.demo-journey header h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.demo-journey header .eyebrow { margin-bottom: 4px; color: #ffb296; font-size: 9px; }
.demo-journey header a { color: #fff; font-size: 11px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.demo-journey header a span { color: #ff9c78; font-size: 16px; }
.journey-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.journey-steps a { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 10px; padding: 17px 20px; color: #fff; text-decoration: none; }
.journey-steps a + a { border-left: 1px solid rgb(255 255 255 / 10%); }
.journey-steps a:hover { background: rgb(255 255 255 / 5%); }
.journey-steps a > span { grid-row: 1 / span 2; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid rgb(255 255 255 / 24%); border-radius: 50%; color: #ffb296; font-size: 11px; font-weight: 900; }
.journey-steps b { font-size: 12px; }
.journey-steps small { margin-top: 4px; overflow: hidden; color: #b9c5d6; font-size: 10px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }

body.display-mode { background: #edf1f2; }
body.display-mode .app-shell { grid-template-columns: minmax(0, 1fr); }
body.display-mode .side-nav,
body.display-mode .mobile-nav,
body.display-mode .hero-actions,
body.display-mode #setup-panel,
body.display-mode #generate-link,
body.display-mode #link-ready,
body.display-mode #prepare-attendance,
body.display-mode #attendance-ready-actions,
body.display-mode #prepare-equipment,
body.display-mode .equipment-inspect,
body.display-mode .metric-card a,
body.display-mode #site-access,
body.display-mode .panel-head a { display: none !important; }
body.display-mode .record-list a,
body.display-mode .record-list button { pointer-events: none; cursor: default; }
body.display-mode .top-bar { height: 84px; }
body.display-mode .content { width: 100%; max-width: 1920px; padding: 28px 36px 40px; }
body.display-mode .hero { padding-top: 4px; }
body.display-mode .hero-copy { max-width: 920px; font-size: 17px; }
body.display-mode .metric-card { min-height: 128px; }
body.display-mode .metric-card strong { font-size: 38px; }
body.display-mode .attendance-actions,
body.display-mode .equipment-actions { display: none; }
.metric-card { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 13px; min-height: 116px; padding: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 5px 16px rgb(23 32 51 / 3%); }
.metric-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: currentColor; }
.metric-card.danger { color: var(--red); }
.metric-card.warning { color: var(--amber); }
.metric-card.verify { color: var(--blue); }
.metric-card.inspection { color: var(--green); }
.metric-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: currentColor; color: #fff; }
.metric-card.danger .metric-icon { background: var(--red); }
.metric-card.warning .metric-icon { background: var(--amber); }
.metric-card.verify .metric-icon { background: var(--blue); }
.metric-card.inspection .metric-icon { background: var(--green); }
.metric-icon svg { width: 23px; height: 23px; }
.metric-card div > span, .metric-card strong, .metric-card small { display: block; }
.metric-card div > span { color: var(--muted); font-size: 11px; font-weight: 750; }
.metric-card strong { margin: 3px 0 1px; color: var(--ink); font-size: 29px; line-height: 1; }
.metric-card small { color: #5f6b7d; font-size: 10px; }
.metric-card a { align-self: end; color: var(--ink); font-size: 11px; font-weight: 750; text-decoration: none; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, .72fr); gap: 18px; margin-bottom: 18px; }
.lower-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 5px 18px rgb(23 32 51 / 3%); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; min-height: 75px; padding: 19px 21px 15px; border-bottom: 1px solid #edf0f3; }
.panel-head h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.panel-head .eyebrow { margin-bottom: 4px; font-size: 9px; }
.panel-head a { align-self: center; color: var(--muted); font-size: 11px; font-weight: 700; text-decoration: none; }
.panel-head a span { color: var(--brand); font-size: 16px; }
.record-list { display: grid; padding: 6px 20px 14px; }
.record-row { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center; gap: 13px; min-height: 70px; padding: 12px 1px; border-bottom: 1px solid #edf0f3; text-decoration: none; }
.record-row.inspection-row { width: 100%; border: 0; border-bottom: 1px solid #edf0f3; background: transparent; color: inherit; cursor: pointer; text-align: left; }
.record-row.inspection-row:hover { background: #fafbfc; }
.record-row:last-child { border-bottom: 0; }
.record-severity { width: 9px; height: 9px; border-radius: 50%; background: #aeb6c1; box-shadow: 0 0 0 5px #f1f3f6; }
.record-severity.high, .record-severity.critical { background: var(--red); box-shadow: 0 0 0 5px var(--red-tint); }
.record-severity.medium { background: var(--amber); box-shadow: 0 0 0 5px var(--amber-tint); }
.record-row b, .record-row small { display: block; }
.record-row b { overflow: hidden; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.record-row small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.record-tail { text-align: right; }
.record-tail strong, .record-tail time { display: block; }
.record-tail strong { color: var(--muted); font-size: 10px; text-transform: capitalize; }
.record-tail time { margin-top: 5px; color: #5f6b7d; font-size: 9px; }
.empty-state { display: grid; place-items: center; min-height: 150px; color: var(--muted); text-align: center; }
.empty-state b { display: block; margin-bottom: 5px; color: var(--ink); }
.empty-state p { margin: 0; font-size: 12px; }
.skeleton-row { height: 50px; margin: 10px 0; border-radius: 10px; background: linear-gradient(90deg, #f0f2f5 25%, #f8f9fa 45%, #f0f2f5 65%) 0 0 / 200% 100%; animation: shimmer 1.5s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.site-access-panel { padding-bottom: 18px; }
.attendance-panel { margin-top: 18px; }
.attendance-layout { display: grid; grid-template-columns: 150px minmax(220px, 1fr) minmax(250px, .65fr); gap: 24px; align-items: center; padding: 8px 20px 22px; }
.attendance-number { display: grid; gap: 2px; padding: 18px; border-radius: 14px; background: var(--green-tint); color: var(--green); }
.attendance-number strong { font-size: 42px; line-height: 1; letter-spacing: -.04em; }
.attendance-number span { color: #47655c; font-size: 11px; font-weight: 700; }
.attendance-people { min-height: 76px; }
.attendance-people p { margin: 0; color: var(--muted); font-size: 12px; }
.attendance-person { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.attendance-person:last-child { border-bottom: 0; }
.attendance-person b { font-size: 12px; }
.attendance-person span { color: var(--muted); font-size: 10px; }
.attendance-actions { display: grid; gap: 10px; }
.attendance-actions .panel-button { width: 100%; margin: 0; }
.attendance-actions .inline-actions { display: flex; }
.attendance-actions > p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.equipment-panel { overflow: hidden; }
.equipment-head-actions { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; justify-content: flex-end; }
.equipment-head-actions label { color: var(--muted); font-size: .76rem; font-weight: 750; }
.equipment-head-actions select { min-height: 2.25rem; max-width: 15rem; border: 1px solid var(--line); border-radius: .65rem; background: var(--surface); color: var(--ink); padding: .35rem 2rem .35rem .65rem; font: inherit; font-size: .82rem; }
.equipment-head-actions select:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 28%, transparent); outline-offset: 2px; }
.equipment-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; border-block: 1px solid var(--line); background: var(--line); }
.equipment-summary div { display: grid; gap: 2px; padding: 15px 20px; background: #fff; }
.equipment-summary strong { color: var(--ink); font-size: 24px; line-height: 1; }
.equipment-summary span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.equipment-summary .summary-danger strong { color: var(--red); }
.equipment-summary .summary-warning strong { color: #a65b00; }
.equipment-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 18px 20px; }
.equipment-list > p { grid-column: 1 / -1; margin: 0; color: var(--muted); }
.equipment-card { display: grid; gap: 12px; min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.equipment-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.equipment-card b, .equipment-card small { display: block; }
.equipment-card b { overflow-wrap: anywhere; font-size: 12px; }
.equipment-card small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.assurance-badge { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; background: var(--green-tint); color: #126849; font-size: 8px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.assurance-badge.overdue { background: var(--red-tint); color: #a52820; }
.assurance-badge.due_soon { background: #fff3df; color: #915400; }
.equipment-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.equipment-meta span { display: grid; gap: 2px; color: var(--muted); font-size: 8px; font-weight: 750; text-transform: uppercase; }
.equipment-meta strong { overflow-wrap: anywhere; color: #39465a; font-size: 10px; text-transform: none; }
.equipment-inspect { min-height: 36px; border: 1px solid #ef6a3c; border-radius: 9px; background: #fff8f5; color: #b7350e; font-size: 9px; font-weight: 850; cursor: pointer; }
.equipment-inspect:hover { background: #fff0e9; }
.equipment-actions { display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding: 0 20px 18px; }
.equipment-actions .panel-button { width: auto; min-width: 210px; margin: 0; }
.equipment-actions p { max-width: 470px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.privacy-chip { display: inline-flex; grid-column: auto; grid-row: auto; background: var(--green-tint); color: var(--green); }
.privacy-chip.warning { background: #fff4d9; color: #8a5300; }
.link-locked, .link-ready { display: flex; align-items: center; gap: 16px; margin: 19px 20px 14px; padding: 14px; border-radius: 13px; background: #f7f8fa; }
.qr-placeholder { display: grid; place-items: center; flex: 0 0 64px; width: 64px; height: 64px; border: 1px dashed #b8c0cb; border-radius: 10px; background: #fff; color: #7c8796; }
.qr-placeholder svg { width: 34px; height: 34px; }
.link-locked b, .link-ready b { font-size: 13px; }
.link-locked p, .link-ready p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.link-ready img { flex: 0 0 90px; width: 90px; height: 90px; border-radius: 7px; background: #fff; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.inline-actions button { min-height: 32px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); cursor: pointer; font-size: 10px; font-weight: 750; }
.panel-button { width: calc(100% - 40px); min-height: 42px; margin: 0 20px; border: 1px solid var(--brand); border-radius: 10px; background: var(--brand-tint); color: var(--brand-dark); cursor: pointer; font-size: 12px; font-weight: 800; }
.panel-button[hidden] { display: none; }

.full-panel { margin-bottom: 18px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { min-width: 115px; padding: 14px 20px; border-bottom: 1px solid #edf0f3; text-align: left; }
th:first-child, td:first-child { min-width: 300px; }
th { background: #fafbfc; color: #556174; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
td { color: var(--muted); font-size: 11px; }
td b { color: var(--ink); font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }
.table-status { display: inline-flex; padding: 5px 8px; border-radius: 999px; background: #eef1f5; color: #5d6878; font-size: 9px; font-weight: 800; text-transform: capitalize; }
.table-status.verification { background: var(--blue-tint); color: var(--blue); }
.table-status.completed { background: var(--green-tint); color: var(--green); }
.table-status.overdue { background: var(--red-tint); color: var(--red); }

.setup-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 20px 0; padding: 24px; border: 1px solid var(--brand-line, #9bdedb); border-radius: 16px; background: var(--brand-tint); }
.setup-panel > div { display: flex; align-items: flex-start; gap: 17px; }
.setup-mark { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px; background: var(--brand); color: #fff; }
.setup-panel h2 { margin: 0; font-size: 18px; }
.setup-panel p:last-child { max-width: 760px; margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.setup-panel button { min-height: 44px; padding: 0 17px; border: 0; border-radius: 10px; background: var(--brand); color: #fff; cursor: pointer; font-weight: 800; white-space: nowrap; }
.page-footer { display: flex; justify-content: space-between; padding: 16px 2px 0; color: #5f6b7d; font-size: 10px; }

dialog { width: min(620px, calc(100% - 30px)); padding: 0; border: 0; border-radius: 18px; color: var(--ink); box-shadow: 0 30px 90px rgb(10 16 27 / 30%); }
dialog::backdrop { background: rgb(17 25 39 / 58%); backdrop-filter: blur(3px); }
.dialog-card { padding: 0; }
.dialog-card header { display: grid; grid-template-columns: 46px minmax(0, 1fr) 40px; align-items: center; gap: 12px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.dialog-card header h2 { margin: 0; font-size: 20px; }
.dialog-card header .eyebrow { margin-bottom: 3px; }
.dialog-card header > button { align-self: start; width: 38px; height: 38px; border: 0; border-radius: 10px; background: #f1f3f5; color: #637082; cursor: pointer; font-size: 22px; }
.install-list { display: grid; gap: 0; padding: 12px 24px; }
.install-list > div { display: flex; align-items: flex-start; gap: 13px; padding: 13px 0; border-bottom: 1px solid #edf0f3; }
.install-list > div:last-child { border-bottom: 0; }
.install-list > div > span { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); font-size: 11px; font-weight: 850; }
.install-list p { margin: 0; }
.install-list b, .install-list small { display: block; }
.install-list b { font-size: 13px; }
.install-list small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.dialog-note { margin: 0 24px 20px; padding: 12px 14px; border-radius: 10px; background: #f5f7f9; color: var(--muted); font-size: 10px; line-height: 1.5; }
.dialog-card footer { display: flex; justify-content: flex-end; gap: 9px; padding: 16px 24px; border-top: 1px solid var(--line); background: #fafbfc; }
.dialog-card footer button { min-height: 43px; padding: 0 16px; border-radius: 10px; cursor: pointer; font-size: 12px; font-weight: 800; }
.quiet-button { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.confirm-button { border: 1px solid var(--brand); background: var(--brand); color: #fff; }
.confirm-button[disabled] { opacity: .65; cursor: wait; }
.inspection-dialog-card { max-height: min(860px, calc(100vh - 30px)); overflow-y: auto; }
.inspection-mark { background: var(--green); }
.inspection-dialog-card .dialog-note { margin-top: 18px; margin-bottom: 16px; }
.inspection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 24px 16px; }
.inspection-field { display: grid; gap: 7px; padding: 0 24px 16px; color: #465368; font-size: 10px; font-weight: 800; }
.inspection-grid .inspection-field { padding: 0; }
.inspection-field input, .inspection-field textarea, .inspection-field select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #cfd5dd; border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 12px; font-weight: 600; }
.inspection-field textarea { resize: vertical; }
.inspection-field small { color: var(--muted); font-weight: 500; line-height: 1.45; }
.inspection-checklist { display: grid; gap: 0; margin: 0 24px 16px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 12px; }
.inspection-checklist legend { padding: 0 7px; color: #465368; font-size: 10px; font-weight: 850; }
.inspection-checklist label { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; padding: 11px 2px; border-bottom: 1px solid #edf0f3; cursor: pointer; }
.inspection-checklist label:last-child { border-bottom: 0; }
.inspection-checklist input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--green); }
.inspection-checklist b, .inspection-checklist small { display: block; }
.inspection-checklist b { font-size: 12px; }
.inspection-checklist small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.inspection-warning { margin: 0 24px 16px; padding: 11px 13px; border-radius: 10px; background: var(--red-tint); color: #9b2418; font-size: 11px; font-weight: 750; }
.inspection-dialog-card footer { position: sticky; z-index: 2; bottom: 0; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 24px; max-width: min(460px, calc(100% - 32px)); padding: 12px 16px; border-radius: 10px; background: var(--nav); color: #fff; box-shadow: var(--shadow); font-size: 12px; transform: translate(-50%, 120px); opacity: 0; transition: transform .2s, opacity .2s; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.mobile-nav { display: none; }

button:focus-visible, a:focus-visible, select:focus-visible { outline: 3px solid #ffbca5; outline-offset: 3px; }
button:disabled { opacity: .6; cursor: wait; }
[hidden] { display: none !important; }

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { align-items: flex-start; }
  .hero-actions { flex-direction: column; }
  .workspace-grid, .lower-grid { grid-template-columns: 1fr; }
  .equipment-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .journey-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .journey-steps a:nth-child(3) { border-left: 0; border-top: 1px solid rgb(255 255 255 / 10%); }
  .journey-steps a:nth-child(4) { border-top: 1px solid rgb(255 255 255 / 10%); }
}

@media (max-width: 940px) {
  .app-shell { grid-template-columns: 82px minmax(0, 1fr); }
  .side-nav { padding-inline: 12px; }
  .brand { justify-content: center; margin-inline: 0; }
  .brand > span:last-child, .side-nav nav a span, .side-nav nav em, .side-footer span:last-child { display: none; }
  .side-nav nav a { display: flex; justify-content: center; padding: 0; }
  .side-footer { justify-content: center; }
}

@media (max-width: 820px) {
  body { padding-bottom: 74px; }
  .app-shell { display: block; }
  .side-nav { display: none; }
  .top-bar { gap: 8px; height: 68px; padding-inline: 16px; }
  .site-picker { flex: 1 1 auto; grid-template-columns: 36px minmax(0, 1fr); min-width: 0; }
  .site-icon { width: 34px; height: 34px; }
  .site-picker select { width: 100%; min-width: 0; max-width: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .demo-pill, .sync-state span { display: none; }
  .top-actions { flex: 0 0 auto; gap: 6px; }
  .icon-button { width: 40px; height: 40px; }
  .content { padding: 22px 15px 20px; }
  .hero { display: block; padding-top: 3px; }
  h1 { font-size: 30px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; margin-top: 20px; }
  .secondary-action { display: none; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .metric-card { grid-template-columns: 38px minmax(0, 1fr); min-height: 102px; padding: 14px; }
  .metric-card a { display: none; }
  .metric-icon { width: 38px; height: 38px; }
  .metric-card strong { font-size: 25px; }
  .demo-journey header { align-items: flex-start; flex-direction: column; gap: 8px; }
  .demo-journey header a { white-space: normal; }
  .journey-steps { grid-template-columns: 1fr; }
  .journey-steps a + a, .journey-steps a:nth-child(3), .journey-steps a:nth-child(4) { border-left: 0; border-top: 1px solid rgb(255 255 255 / 10%); }
  .workspace-grid, .lower-grid { grid-template-columns: 1fr; }
  .site-access-panel { order: -1; }
  .attendance-layout { grid-template-columns: 1fr; gap: 14px; padding-inline: 14px; }
  .attendance-number { grid-template-columns: auto 1fr; align-items: end; gap: 12px; }
  .equipment-list { grid-template-columns: 1fr; padding-inline: 14px; }
  .equipment-actions { align-items: stretch; flex-direction: column; padding-inline: 14px; }
  .equipment-actions .panel-button { width: 100%; }
  .panel-head { padding-inline: 16px; }
  .panel-head a { font-size: 0; }
  .panel-head a span { font-size: 18px; }
  .record-list { padding-inline: 15px; }
  .table-scroll { overflow: visible; }
  .table-scroll table, .table-scroll tbody { display: block; }
  .table-scroll thead { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .table-scroll tr { display: grid; gap: 7px; padding: 16px; border-bottom: 1px solid #edf0f3; }
  .table-scroll tbody tr:last-child { border-bottom: 0; }
  .table-scroll td { display: grid; grid-template-columns: minmax(86px, .38fr) minmax(0, 1fr); gap: 10px; min-width: 0; padding: 0; border: 0; font-size: 11px; }
  .table-scroll td::before { content: attr(data-label); color: #687487; font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
  .table-scroll td:first-child { display: block; min-width: 0; margin-bottom: 3px; }
  .table-scroll td:first-child::before { display: none; }
  .table-scroll td[colspan] { display: block; }
  .table-scroll td[colspan]::before { display: none; }
  .table-scroll .empty-state { min-height: 110px; }
  .setup-panel { align-items: stretch; flex-direction: column; }
  .page-footer { display: none; }
  .mobile-nav { position: fixed; z-index: 50; inset: auto 0 0; display: grid; grid-template-columns: repeat(5, 1fr); height: 68px; border-top: 1px solid var(--line); background: rgb(255 255 255 / 97%); box-shadow: 0 -8px 30px rgb(25 36 53 / 8%); }
  .mobile-nav a, .mobile-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; background: transparent; color: #465368; text-decoration: none; font-size: 9px; font-weight: 750; }
  .mobile-nav svg { width: 21px; height: 21px; }
  .mobile-nav a.active { color: var(--brand); }
  .mobile-nav button span { display: grid; place-items: center; width: 42px; height: 42px; margin-top: -27px; border: 4px solid #fff; border-radius: 50%; background: var(--brand); color: #fff; box-shadow: 0 7px 18px rgb(233 84 32 / 28%); font-size: 23px; }
  .mobile-nav button small { font-size: 9px; font-weight: 750; }
  .toast { bottom: 84px; }
}

@media (max-width: 470px) {
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-card { display: block; min-height: 120px; }
  .metric-icon { margin-bottom: 10px; }
  .metric-card small { max-width: 130px; }
  .equipment-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .link-locked, .link-ready { align-items: flex-start; margin-inline: 14px; }
  .panel-button { width: calc(100% - 28px); margin-inline: 14px; }
  .link-ready { display: grid; grid-template-columns: 86px minmax(0, 1fr); }
  .link-ready img { width: 86px; height: 86px; }
  .inline-actions { grid-column: 1 / -1; }
  .inline-actions button { flex: 1; }
  .error-banner { margin-inline: 15px; }
  dialog { width: calc(100% - 16px); }
  .dialog-card header { padding-inline: 17px; }
  .inspection-dialog-card .dialog-note, .inspection-checklist, .inspection-warning { margin-inline: 17px; }
  .inspection-grid { grid-template-columns: 1fr; padding-inline: 17px; }
  .inspection-field { padding-inline: 17px; }
  .inspection-grid .inspection-field { padding-inline: 0; }
  .dialog-card footer { padding-inline: 17px; }
}

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

@media print {
  body.print-qr * { visibility: hidden; }
  body.print-qr #link-ready, body.print-qr #link-ready * { visibility: visible; }
  body.print-qr #link-ready { position: fixed; inset: 0; display: grid !important; place-content: center; text-align: center; background: #fff; }
  body.print-qr #qr-code { width: 360px; height: 360px; margin: 0 auto; }
  body.print-qr .inline-actions { display: none; }
}
.credential-dialog-card { width: min(520px, calc(100vw - 28px)); }
.credential-card {
  margin: 6px 0 20px;
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(145deg, #0a2437, #124963);
  color: #fff;
  box-shadow: 0 20px 45px rgba(10, 36, 55, .22);
  text-align: center;
}
.credential-card > div { display: flex; align-items: center; justify-content: center; gap: 11px; text-align: left; }
.credential-card p { margin: 0; }
.credential-card small { display: block; opacity: .76; }
.credential-card img { width: min(270px, 78vw); margin: 20px auto; border: 12px solid #fff; border-radius: 16px; background: #fff; display: block; }
.credential-card > p { color: rgba(255,255,255,.82); font-size: 13px; line-height: 1.5; }
.credential-actions { display: grid; gap: 9px; }
.credential-actions button { min-height: 45px; }
