:root {
  color-scheme: light;
  --ink-deep: #0a202c;
  --ink: #102d3d;
  --signal: #b7f23a;
  --paper: #ffffff;
  --field: #eef3f4;
  --steel: #60727c;
  --line: #d5dfe2;
  --ready: #187a50;
  --ready-soft: #e5f4ec;
  --warning: #b6650e;
  --warning-soft: #fff0d5;
  --danger: #b83b35;
  --danger-soft: #fbe9e7;
  --shadow: 0 18px 45px rgba(10, 32, 44, .08);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--field); }
body { margin: 0; color: var(--ink); background: var(--field); }
button, input { font: inherit; }
button { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
html.teams-live:not(.teams-ready) .app-shell { display: none; }

.access-shell {
  min-height: 100vh; min-height: 100dvh; padding: 40px 24px; background: var(--ink-deep); color: white;
  display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; justify-items: center;
}
.access-shell[hidden] { display: none; }
.access-brand { width: min(500px, 100%); display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.access-brand img { width: 48px; height: 48px; border-radius: 11px; }
.access-brand strong { display: block; font-size: 20px; }
.access-brand small { display: block; color: #8298a2; font-size: 9px; font-weight: 900; letter-spacing: 1.6px; margin-top: 3px; }
.access-card { width: min(500px, 100%); border-radius: 18px; padding: 34px; background: white; color: var(--ink); box-shadow: 0 30px 90px rgba(0,0,0,.28); }
.access-card[hidden] { display: none; }
.access-card .kicker { color: #6d7e86; }
.access-card h1 { max-width: 390px; margin: 14px 0 12px; font-size: clamp(30px, 5vw, 44px); line-height: 1.02; letter-spacing: -1.7px; }
.access-card > p { color: var(--steel); line-height: 1.55; }
.access-card form { display: grid; gap: 15px; margin-top: 26px; }
.access-card label { display: grid; gap: 7px; font-size: 12px; font-weight: 800; }
.access-card input { min-height: 49px; border: 1px solid var(--line); border-radius: 9px; padding: 0 13px; outline-color: var(--ink); }
.access-card .primary-action { margin-top: 4px; min-height: 50px; background: var(--signal); border-color: var(--signal); color: var(--ink-deep); }
.entry-mode-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 24px; padding: 4px; border-radius: 11px; background: #edf1f2; }
.entry-mode-tabs button { min-height: 43px; border: 0; border-radius: 8px; background: transparent; color: #5e7079; font-size: 12px; font-weight: 900; }
.entry-mode-tabs button[aria-pressed="true"] { background: white; color: var(--ink); box-shadow: 0 2px 10px rgba(10,32,44,.1); }
.entry-mode-tabs button:focus-visible, .access-card input:focus-visible { outline: 3px solid rgba(151,217,30,.52); outline-offset: 2px; }
.trial-summary { display: grid; gap: 3px; margin-top: 20px; padding: 15px 16px; border-left: 4px solid var(--signal); border-radius: 0 9px 9px 0; background: #f2f7e8; }
.trial-summary strong { color: var(--ink); font-size: 17px; }
.trial-summary span { color: #43545d; font-size: 12px; font-weight: 800; }
.trial-summary small { color: #6d7e86; font-size: 10px; font-weight: 700; }
.entry-assurance { margin: 13px 0 0; color: var(--steel); font-size: 11px; line-height: 1.5; text-align: center; }
.access-divider { display: flex; align-items: center; gap: 10px; margin-top: 17px; color: #89979d; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.access-divider::before, .access-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.google-action {
  width: 100%; min-height: 49px; margin-top: 11px; border: 1px solid var(--line);
  border-radius: 9px; background: white; color: var(--ink); font-weight: 800;
}
.google-action span { color: #4285f4; margin-right: 10px; font-size: 17px; }
.forgot-action {
  width: 100%; min-height: 42px; border: 0; background: transparent;
  color: var(--ink); font-size: 12px; font-weight: 800;
}
.invite-recovery-link {
  display: block; color: var(--ink); font-size: 12px; font-weight: 800;
  text-align: center; margin-top: 5px;
}
.invite-recovery-link[hidden] { display: none; }
.invite-success-action { display: inline-flex; align-items: center; text-decoration: none; }
.invite-success-action[hidden] { display: none; }
.form-message { min-height: 20px; color: var(--ready) !important; font-size: 12px !important; font-weight: 700; margin-top: 14px !important; }
.form-message.error { color: var(--danger) !important; }
.worker-wallet-exit { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.worker-wallet-exit strong { color: var(--ink); font-size: 13px; }
.worker-wallet-exit p { margin: 7px 0 12px; color: var(--steel); font-size: 13px; line-height: 1.5; }
.worker-wallet-exit a { display: inline-flex; align-items: center; min-height: 44px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 28px 22px 22px;
  background: var(--ink-deep); color: white; display: flex; flex-direction: column;
}
.brand { color: white; text-decoration: none; display: flex; align-items: center; gap: 12px; }
.brand img { width: 42px; height: 42px; border-radius: 10px; }
.brand strong { display: block; font-size: 18px; letter-spacing: -.3px; }
.brand small { display: block; color: #8298a2; font-size: 8px; font-weight: 800; letter-spacing: 1.55px; margin-top: 2px; }
nav { display: grid; gap: 6px; margin-top: 52px; }
.nav-item {
  min-height: 48px; border-radius: 9px; padding: 0 13px; color: #a9bac1;
  text-decoration: none; display: flex; align-items: center; gap: 11px; font-size: 14px; font-weight: 700;
}
.nav-item:hover, .nav-item.active { color: white; background: #163849; }
.nav-item.active { box-shadow: inset 4px 0 var(--signal); }
.nav-glyph { width: 20px; color: var(--signal); text-align: center; }
.nav-count { margin-left: auto; min-width: 25px; padding: 4px 6px; border-radius: 999px; background: #294755; text-align: center; font-size: 11px; }
.nav-disabled { cursor: default; opacity: .62; }
.nav-soon { margin-left: auto; font-size: 9px; letter-spacing: .08em; color: var(--signal); }

.plan-card { margin-top: auto; border: 1px solid #294755; border-radius: 13px; padding: 16px; background: #0d2734; }
.plan-label, .company-label, .kicker { display: block; font-size: 9px; font-weight: 900; letter-spacing: 1.35px; color: var(--steel); }
.plan-label { color: var(--signal); }
.plan-card > strong { display: block; font-size: 25px; margin-top: 8px; }
.plan-card > strong small { color: #91a5ad; font-size: 12px; font-weight: 600; }
.plan-card p { color: #91a5ad; font-size: 11px; margin: 9px 0 8px; }
.seat-track { height: 5px; border-radius: 3px; background: #294755; overflow: hidden; }
.seat-track span { display: block; width: 72%; height: 100%; background: var(--signal); }
.plan-card button { width: 100%; border: 0; background: transparent; color: white; font-size: 12px; font-weight: 800; text-align: left; padding: 13px 0 0; }
.admin-card { display: flex; align-items: center; gap: 10px; padding-top: 20px; }
.admin-avatar { width: 35px; height: 35px; border-radius: 9px; background: var(--signal); color: var(--ink-deep); display: grid; place-items: center; font-size: 11px; font-weight: 900; }
.admin-card strong { display: block; font-size: 12px; }
.admin-card small { display: block; color: #8298a2; font-size: 10px; margin-top: 2px; }
.admin-card button { margin-left: auto; border: 0; color: #8298a2; background: none; }

main { min-width: 0; }
.topbar {
  min-height: 94px; padding: 0 38px; border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.9); display: flex; align-items: center; justify-content: space-between;
}
.topbar h1 { margin: 4px 0 0; font-size: 22px; letter-spacing: -.5px; }
.workspace-heading { display: flex; align-items: center; gap: 18px; }
.workspace-switcher select {
  min-height: 38px; max-width: 260px; border: 1px solid var(--line); border-radius: 8px;
  padding: 0 34px 0 11px; background: white; color: var(--ink); font-size: 12px; font-weight: 750;
}
.topbar-actions { display: flex; gap: 10px; }
.primary-action, .secondary-action {
  min-height: 44px; border-radius: 9px; padding: 0 16px; font-size: 13px; font-weight: 900;
}
.primary-action { border: 1px solid var(--ink); background: var(--ink); color: white; }
.primary-action:hover { background: #173d50; }
.primary-action:disabled { cursor: not-allowed; border-color: #91a2aa; background: #91a2aa; color: white; }
.secondary-action { border: 1px solid var(--line); background: white; color: var(--ink); }

.content { max-width: 1280px; margin: 0 auto; padding: 32px 38px 52px; }
.dashboard-context-bar {
  min-height: 58px; margin-bottom: 18px; padding: 9px 13px; border: 1px solid var(--line);
  border-radius: 11px; background: var(--paper); display: flex; align-items: center;
  justify-content: space-between; gap: 18px;
}
.dashboard-context-bar label { display: flex; align-items: center; gap: 10px; }
.dashboard-context-bar label > span {
  font-family: "Arial Narrow", "Roboto Condensed", "Segoe UI", sans-serif;
  color: var(--steel); font-size: 9px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase;
}
.dashboard-context-bar select {
  min-height: 38px; max-width: min(310px, 52vw); border: 1px solid var(--line); border-radius: 8px;
  padding: 0 34px 0 11px; background: white; color: var(--ink); font: 800 12px/1 Inter, "Segoe UI", sans-serif;
}
.dashboard-context-bar p { margin: 0; color: var(--steel); font-size: 11px; }
.operations-overview { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(310px, .75fr); gap: 18px; }
.readiness-panel, .attention-row {
  position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 15px;
  background: var(--paper); box-shadow: 0 12px 32px rgba(10,32,44,.05);
}
.readiness-rail { position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--signal); }
.readiness-heading, .attention-heading {
  min-height: 76px; padding: 17px 22px 16px 26px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.readiness-heading h2, .attention-heading h2 { margin: 5px 0 0; font-size: 19px; letter-spacing: -.45px; }
.data-freshness, .attention-count {
  border-radius: 999px; padding: 6px 9px; background: var(--field); color: var(--steel);
  font-size: 9px; font-weight: 850; letter-spacing: .45px; text-transform: uppercase;
}
.readiness-copy { min-height: 154px; padding: 24px 24px 21px 30px; display: flex; align-items: center; gap: 26px; }
.readiness-score {
  position: relative; isolation: isolate; flex: 0 0 112px; width: 112px; height: 112px;
  border-radius: 50%; background: conic-gradient(var(--signal) var(--readiness-percent), #dce7e8 0);
  display: grid; place-content: center; text-align: center;
}
.readiness-score::before { content: ""; position: absolute; z-index: -1; inset: 9px; border-radius: 50%; background: white; }
.readiness-score strong { display: block; color: var(--ink-deep); font-size: 31px; line-height: 1; letter-spacing: -1.4px; }
.readiness-score span { margin-top: 5px; color: var(--ready); font-size: 8px; font-weight: 900; letter-spacing: 1px; }
.readiness-narrative { min-width: 0; flex: 1; }
.readiness-state-label {
  display: inline-flex; min-height: 26px; margin-bottom: 9px; border-radius: 999px; padding: 0 9px;
  background: var(--warning-soft); color: var(--warning); align-items: center;
  font-size: 9px; font-weight: 900; letter-spacing: .7px; text-transform: uppercase;
}
.readiness-copy h2 { margin: 0; font-size: clamp(23px, 2.2vw, 31px); line-height: 1.04; letter-spacing: -1px; }
.readiness-copy p { margin: 9px 0 0; color: var(--steel); font-size: 13px; line-height: 1.45; }
.readiness-setup-action { margin-top: 16px; }
.setup-sequence {
  max-width: 460px; margin: 18px 0 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
}
.setup-sequence li {
  min-width: 0; border-top: 2px solid var(--line); padding-top: 7px;
  display: flex; align-items: center; gap: 6px; color: #81929a;
}
.setup-sequence li span {
  flex: 0 0 21px; width: 21px; height: 21px; border-radius: 50%; background: var(--field);
  display: grid; place-items: center; font-size: 9px; font-weight: 900;
}
.setup-sequence li strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; }
.setup-sequence li.complete { border-color: #91a2aa; color: var(--steel); }
.setup-sequence li.current { border-color: var(--signal); color: var(--ink); }
.setup-sequence li.current span { background: var(--signal); color: var(--ink-deep); }
.readiness-progress { height: 6px; margin-top: 19px; border-radius: 999px; overflow: hidden; background: #dce7e8; }
.readiness-progress span { display: block; height: 100%; border-radius: inherit; background: var(--signal); }
.readiness-stats { min-height: 72px; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.stat { border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--ink); padding: 13px 17px; text-align: left; }
.stat:last-child { border-right: 0; }
.stat:hover, .stat.active { background: #f5f8f8; }
.stat.active { box-shadow: inset 0 -3px var(--signal); }
.stat strong { display: block; font-size: 19px; }
.stat small { display: flex; align-items: center; gap: 6px; color: var(--steel); font-size: 10px; margin-top: 3px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--steel); }
.status-dot.ready { background: var(--ready); }
.status-dot.expiring { background: var(--warning); }
.status-dot.action { background: var(--danger); }

.attention-row { align-self: stretch; }
.attention-heading { padding-left: 20px; }
#attention-queue { display: grid; }
.attention-card {
  min-height: 77px; border-bottom: 1px solid #e6ecee; background: white;
  padding: 14px 17px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
}
.attention-card:last-child { border-bottom: 0; }
.attention-icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-size: 14px; font-weight: 900; }
.attention-card.urgent .attention-icon { color: var(--danger); background: var(--danger-soft); }
.attention-card.warning .attention-icon { color: var(--warning); background: var(--warning-soft); }
.attention-card strong { display: block; font-size: 13px; }
.attention-card p { overflow: hidden; color: var(--steel); font-size: 10px; margin: 4px 0 0; text-overflow: ellipsis; white-space: nowrap; }
.attention-card button { min-height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; background: white; color: var(--ink); font-size: 10px; font-weight: 900; }
.attention-empty { padding: 30px 20px; color: var(--steel); font-size: 12px; line-height: 1.5; }

.roster-panel { margin-top: 24px; border: 1px solid var(--line); border-radius: 15px; background: white; overflow: hidden; box-shadow: 0 12px 32px rgba(10,32,44,.05); }
.section-heading { min-height: 88px; padding: 19px 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.section-heading h2 { margin: 5px 0 0; font-size: 20px; letter-spacing: -.5px; }
.roster-result-count { margin: 5px 0 0; color: var(--steel); font-size: 10px; }
.search { width: min(270px, 36vw); min-height: 42px; border: 1px solid var(--line); border-radius: 9px; padding: 0 12px; display: flex; align-items: center; gap: 8px; color: var(--steel); }
.search input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; }
.search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(183,242,58,.32); }
.search input::placeholder { color: #91a1a8; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 820px; }
th { height: 43px; background: #f5f8f8; color: var(--steel); font-size: 9px; font-weight: 900; letter-spacing: 1px; text-align: left; text-transform: uppercase; }
th, td { padding: 0 19px; border-bottom: 1px solid #e6ecee; }
tbody tr { height: 78px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcfc; }
td { color: var(--steel); font-size: 12px; }
td:first-child { display: flex; align-items: center; height: 78px; }
td strong { color: var(--ink); }
td small { display: block; margin-top: 4px; color: #829199; }
.worker-avatar { width: 39px; height: 39px; border-radius: 10px; display: grid; place-items: center; margin-right: 12px; font-size: 11px; font-weight: 900; color: var(--ink); }
.worker-avatar.coral { background: #f7d9d6; }.worker-avatar.blue { background: #d8e8f0; }.worker-avatar.amber { background: #fae8c2; }.worker-avatar.green { background: #d9eee3; }.worker-avatar.violet { background: #e6ddf0; }
.worker-name strong { display: block; color: var(--ink); font-size: 13px; }
.worker-name small { margin-top: 3px; }
.status { display: inline-flex; align-items: center; gap: 7px; min-height: 29px; border-radius: 999px; padding: 0 10px; font-size: 10px; font-weight: 900; }
.status i { width: 6px; height: 6px; border-radius: 50%; }
.status.ready { color: var(--ready); background: var(--ready-soft); }.status.ready i { background: var(--ready); }
.status.expiring { color: var(--warning); background: var(--warning-soft); }.status.expiring i { background: var(--warning); }
.status.action { color: var(--danger); background: var(--danger-soft); }.status.action i { background: var(--danger); }
.status.invited { color: #536b76; background: #e9eff1; }.status.invited i { background: #78909a; }
.status.expired-invite { color: var(--danger); background: var(--danger-soft); }.status.expired-invite i { background: var(--danger); }
.status.not_configured, .status.unassigned { color: #536b76; background: #e9eff1; }
.status.not_configured i, .status.unassigned i { background: #78909a; }
.danger-text { color: var(--danger); }
.row-action { width: 33px; height: 33px; border-radius: 8px; border: 1px solid var(--line); background: white; color: var(--ink); }
.nav-item:focus-visible, .primary-action:focus-visible, .secondary-action:focus-visible,
.stat:focus-visible, .attention-card button:focus-visible, .row-action:focus-visible,
.dashboard-context-bar select:focus-visible, .worksite-actions button:focus-visible,
.assignment-form input:focus-visible, .assignment-form button:focus-visible {
  outline: 3px solid var(--signal); outline-offset: 2px;
}

dialog { width: min(470px, calc(100vw - 30px)); border: 0; border-radius: 16px; padding: 0; box-shadow: 0 30px 90px rgba(10,32,44,.3); }
dialog::backdrop { background: rgba(10,32,44,.62); }
dialog > form { position: relative; padding: 28px; }
dialog h2 { margin: 8px 0; font-size: 27px; }
dialog p { color: var(--steel); font-size: 14px; line-height: 1.5; margin: 0 0 20px; }
dialog label { display: grid; gap: 7px; color: var(--ink); font-size: 12px; font-weight: 800; margin-top: 14px; }
dialog input, dialog textarea { border: 1px solid var(--line); border-radius: 9px; padding: 0 12px; outline-color: var(--ink); resize: vertical; }
dialog input { min-height: 47px; }
dialog textarea { padding-top: 12px; line-height: 1.55; }
.dialog-close { position: absolute; right: 18px; top: 18px; width: 34px; height: 34px; border: 0; border-radius: 8px; background: var(--field); color: var(--ink); font-size: 21px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; }
.dialog-actions button { min-height: 44px; }
dialog button:focus-visible, dialog input:focus-visible, dialog textarea:focus-visible,
dialog [tabindex="-1"]:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }
#worksite-dialog[open] { border-top: 4px solid var(--signal); }
#worksite-dialog form[aria-busy="true"] { cursor: progress; }
#invite-dialog .dialog-close { width: 44px; height: 44px; }
#invite-dialog .dialog-actions button { min-height: 44px; }
#invite-dialog button:focus-visible,
#invite-dialog input:focus-visible,
#invite-dialog #invite-message:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }
#invite-dialog[open] { border-top: 4px solid var(--signal); }
#invite-dialog form[aria-busy="true"] { cursor: progress; }
.billing-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.billing-option { min-height: 118px; border: 1px solid var(--line); border-radius: 12px; padding: 17px; background: white; color: var(--ink); text-align: left; }
.billing-option:hover { border-color: var(--signal); box-shadow: inset 0 0 0 2px var(--signal); }
.billing-option strong { display: block; font-size: 25px; }
.billing-option strong small { font-size: 12px; color: var(--steel); }
.billing-option span { display: block; margin-top: 12px; color: var(--steel); font-size: 11px; line-height: 1.4; }

.control-header {
  min-height: 150px; border-bottom: 1px solid var(--line); display: flex;
  align-items: flex-end; justify-content: space-between; gap: 24px; padding: 22px 0 28px;
}
.control-header h2 { margin: 9px 0 8px; font-size: clamp(31px, 4vw, 48px); letter-spacing: -1.7px; line-height: 1; }
.control-header p { margin: 0; color: var(--steel); }
.worksites-message { margin-bottom: 0 !important; }
.worksite-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; margin-top: 22px; }
.worksite-card {
  position: relative; overflow: hidden; min-width: 0; border: 1px solid var(--line); border-radius: 13px;
  background: var(--paper); box-shadow: 0 10px 26px rgba(10,32,44,.045);
}
.worksite-card::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--signal);
}
.worksite-card.archived::before { background: var(--steel); }
.worksite-card > header { padding: 21px 22px 14px 26px; }
.worksite-state {
  display: block; color: var(--steel); font-family: "Arial Narrow", "Roboto Condensed", "Segoe UI", sans-serif;
  font-size: 8px; font-weight: 900; letter-spacing: 1.2px; text-transform: uppercase;
}
.worksite-card h3 { margin: 7px 0 5px; font-size: 22px; line-height: 1.05; letter-spacing: -.7px; }
.worksite-card header p { margin: 0; color: var(--steel); font-size: 11px; }
.worksite-card-notices { display: grid; gap: 5px; padding: 0 22px 14px 26px; }
.worksite-card-notices p { margin: 0; color: var(--steel); font-size: 10px; line-height: 1.45; }
.worksite-tally { margin: 0; padding: 12px 22px 14px 26px; border-top: 1px solid #e7edef; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.worksite-tally div { min-width: 0; }
.worksite-tally dt {
  color: var(--steel); font-family: "Arial Narrow", "Roboto Condensed", "Segoe UI", sans-serif;
  font-size: 8px; font-weight: 900; letter-spacing: .7px; text-transform: uppercase;
}
.worksite-tally dd { margin: 3px 0 0; color: var(--ink); font-size: 18px; font-weight: 900; }
.worksite-tally .ready dt { color: var(--ready); }
.worksite-tally .expiring dt { color: var(--warning); }
.worksite-tally .action dt { color: var(--danger); }
.worksite-actions { min-height: 56px; padding: 8px 16px 8px 20px; border-top: 1px solid #e7edef; display: flex; align-items: center; gap: 3px; }
.worksite-actions button { min-height: 40px; border: 0; border-radius: 7px; padding: 0 9px; background: transparent; color: var(--ink); font-size: 10px; font-weight: 850; }
.worksite-actions button:hover { background: var(--field); }
.worksite-action-menu { position: relative; margin-left: auto; }
.worksite-menu {
  position: absolute; z-index: 5; right: 0; bottom: calc(100% + 6px); width: max-content; min-width: 168px;
  padding: 5px; border: 1px solid var(--line); border-radius: 9px; background: white;
  box-shadow: 0 12px 30px rgba(10,32,44,.16);
}
.worksite-menu button { display: block; width: 100%; min-height: 40px; padding: 0 11px; text-align: left; }
.worksite-menu button[data-worksite-action="archive"] { color: var(--danger); }
.worksite-actions button:disabled { cursor: not-allowed; opacity: .48; }
.worksite-empty { margin-top: 22px; border: 1px dashed #afbec4; border-radius: 13px; background: white; }
.worksite-empty > strong { display: block; max-width: 520px; color: var(--ink); font-size: 22px; letter-spacing: -.5px; }
.worksite-empty > p { max-width: 620px; margin: 8px 0 18px; color: var(--steel); font-size: 13px; }
.worksite-empty .primary-action { display: inline-flex; align-items: center; }
.archived-worksites { margin-top: 32px; padding-top: 25px; border-top: 1px solid var(--line); }
.archived-worksites-heading h3 { margin: 6px 0 0; font-size: 19px; }
.archived-worksites .worksite-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.control-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(260px, .7fr); gap: 18px; margin-top: 24px; }
.control-panel, .field-note, .billing-summary {
  border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: 0 12px 32px rgba(10,32,44,.05);
}
.control-panel { overflow: hidden; }
.control-panel-heading { min-height: 90px; padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.control-panel-heading h3 { margin: 6px 0 0; font-size: 20px; }
.panel-count { min-width: 48px; min-height: 34px; border-radius: 999px; background: var(--ink); color: white; display: grid; place-items: center; font-size: 11px; font-weight: 900; }
.requirement-row { min-height: 68px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e7edef; }
.requirement-row:last-child { border-bottom: 0; }
.requirement-row span { font-weight: 850; }
.requirement-row small { color: var(--steel); }
.empty-control { padding: 34px 22px; color: var(--steel); line-height: 1.55; }
.field-note { position: relative; overflow: hidden; padding: 28px; background: var(--ink); color: white; }
.field-note::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--signal); }
.field-note-index { color: var(--signal); font-size: 9px; font-weight: 900; letter-spacing: 1.3px; }
.field-note h3 { margin: 50px 0 12px; max-width: 280px; font-size: 29px; line-height: 1.05; letter-spacing: -1px; }
.field-note p { color: #aebec4; line-height: 1.6; }
.billing-summary { padding: 28px; align-self: start; }
.billing-summary > strong { display: block; margin: 16px 0 8px; font-size: 38px; }
.billing-summary > strong small { color: var(--steel); font-size: 13px; }
.billing-summary p { color: var(--steel); line-height: 1.6; }
.billing-summary button { margin-top: 16px; }
.admin-row { min-height: 74px; padding: 0 22px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #e7edef; }
.admin-row:last-child { border-bottom: 0; }
.admin-row strong, .admin-row small { display: block; }
.admin-row small { margin-top: 3px; color: var(--steel); font-size: 11px; }
.admin-row .admin-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.admin-row .admin-actions small { margin: 0; }
.text-action { border: 0; background: transparent; color: var(--danger); font-size: 11px; font-weight: 850; }
.pending-admin-section { border-top: 1px solid #dce5e8; padding-top: 18px; }
.pending-admin-section > .kicker { display: block; padding: 0 22px 10px; }
.pending-admin-section .admin-row { min-height: 66px; }
.pending-admin-section .empty-control { padding-top: 18px; padding-bottom: 22px; }

.wide-dialog { width: min(920px, calc(100vw - 30px)); }
.dialog-shell { position: relative; padding: 30px; }
.worker-detail-heading { display: flex; align-items: center; gap: 14px; padding: 18px 0 24px; border-bottom: 1px solid var(--line); }
.worker-detail-heading .worker-avatar { width: 52px; height: 52px; margin: 0; }
.worker-detail-heading h2 { margin: 0 0 4px; }
.worker-detail-heading p { margin: 0; }
.worker-detail-heading .status { margin-left: auto; }
.worker-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 26px 0; }
.detail-section-heading h3 { margin: 6px 0 14px; font-size: 19px; }
.worker-worksite-readiness { display: grid; gap: 13px; }
.worker-worksite-group { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: white; }
.worker-worksite-group > header { min-height: 58px; padding: 10px 13px; background: #f7f9f9; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.worker-worksite-group > header strong { display: block; margin-top: 4px; font-size: 14px; }
.worksite-attention-copy { margin: 0 !important; padding: 10px 13px; border-top: 1px solid #efd4d1; background: #fffafa; color: var(--danger) !important; font-size: 10px !important; font-weight: 800; }
.requirement-checklist { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.worker-worksite-group > .requirement-checklist { border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.requirement-check { min-height: 58px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #e7edef; }
.requirement-check:last-child { border-bottom: 0; }
.requirement-check strong, .requirement-check small { display: block; }
.requirement-check small { margin-top: 3px; color: var(--steel); }
.requirement-state { flex: 0 0 auto; font-size: 9px; font-weight: 900; letter-spacing: .5px; text-transform: uppercase; }
.requirement-state.current { color: var(--ready); }.requirement-state.expiring { color: var(--warning); }.requirement-state.expired, .requirement-state.missing { color: var(--danger); }
.company-credential-list { display: grid; gap: 7px; margin-bottom: 16px; }
.company-credential-row { min-height: 48px; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; display: flex; align-items: center; gap: 10px; }
.company-credential-row strong, .company-credential-row small { display: block; }
.company-credential-row small { margin-top: 2px; color: var(--steel); }
.company-credential-row .credential-actions { margin-left: auto; display: flex; gap: 8px; }
.credential-source {
  flex: 0 0 auto; border-radius: 999px; padding: 4px 7px;
  background: var(--ready-soft); color: var(--ready); font-size: 8px;
  font-weight: 900; letter-spacing: .5px; text-transform: uppercase;
}
.sharing-summary {
  margin: -5px 0 13px; border-left: 4px solid var(--signal);
  padding: 9px 11px; background: var(--field); color: var(--steel);
  font-size: 12px; font-weight: 750;
}
.assignment-form { margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--line); }
.assignment-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.assignment-form legend { margin-bottom: 10px; color: var(--ink); font-size: 12px; font-weight: 850; }
.assignment-options { display: grid; gap: 7px; }
.assignment-options label { min-height: 44px; margin: 0; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; display: flex; grid-template-columns: none; align-items: center; gap: 9px; }
.assignment-options input { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--ink); }
.assignment-options strong, .assignment-options small { display: block; }
.assignment-options small { margin-top: 2px; color: var(--steel); font-size: 9px; }
.assignment-form > button { width: 100%; margin-top: 11px; }
.company-credential-list + .detail-section-heading { margin-top: 26px; }
.credential-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.credential-form label:first-child, .credential-form button { grid-column: 1 / -1; }
.credential-form button { margin-top: 16px; }
.danger-zone { border-top: 1px solid var(--line); padding-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.danger-zone strong, .danger-zone small { display: block; }
.danger-zone small { margin-top: 4px; color: var(--steel); }
.danger-action { min-height: 42px; border: 1px solid #e7b5b1; border-radius: 9px; padding: 0 14px; background: white; color: var(--danger); font-size: 12px; font-weight: 850; }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 82px minmax(0, 1fr); }
  .sidebar { padding: 22px 14px; align-items: center; }
  .brand span, .nav-item:not(.active) .nav-count, .nav-item { font-size: 0; }
  .brand img { width: 45px; height: 45px; }
  nav { width: 100%; margin-top: 42px; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-glyph { font-size: 16px; }
  .plan-card, .admin-card span:not(.admin-avatar), .admin-card button { display: none; }
  .admin-card { margin-top: auto; padding: 0; }
  .topbar { padding: 0 22px; }
  .content { padding: 24px 22px 44px; }
  .operations-overview { grid-template-columns: 1fr; }
  .control-grid { grid-template-columns: 1fr; }
  .archived-worksites .worksite-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .worker-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .access-shell { padding: 26px 18px; align-content: start; }
  .access-brand, .access-card { width: 100%; min-width: 0; }
  .access-card { padding: 26px 22px; }
  .access-card h1 { max-width: none; font-size: clamp(29px, 8.3vw, 36px); overflow-wrap: anywhere; }
  .entry-mode-tabs button { min-width: 0; padding: 0 8px; }
  .access-card input { width: 100%; min-width: 0; }
  .app-shell { display: block; }
  .sidebar { position: sticky; z-index: 20; width: 100%; height: 68px; padding: 0 16px; flex-direction: row; justify-content: space-between; }
  .brand span { display: block; }
  .brand img { width: 38px; height: 38px; }
  .sidebar nav {
    position: fixed; z-index: 30; inset: auto 0 0; width: 100%; height: 66px; margin: 0;
    border-top: 1px solid #294755; background: var(--ink-deep); display: grid; grid-template-columns: repeat(4, 1fr);
  }
  .nav-item, .nav-item:not(.active) {
    width: auto; min-height: 66px; border-radius: 0; padding: 7px 3px 6px; display: flex;
    flex-direction: column; justify-content: center; gap: 4px; font-size: 9px;
  }
  .nav-item.active { box-shadow: inset 0 3px var(--signal); }
  .nav-glyph { font-size: 15px; }
  .nav-count { display: none; }
  .admin-card { margin: 0; }
  .admin-avatar { width: 36px; height: 36px; }
  .topbar { min-height: 88px; padding: 0 16px; }
  .topbar h1 { font-size: 18px; }
  .workspace-heading { gap: 8px; }
  .workspace-switcher select { max-width: 145px; }
  .topbar-actions .secondary-action { display: none; }
  .primary-action { padding: 0 12px; }
  .content { padding: 16px 14px 96px; }
  .dashboard-context-bar { align-items: flex-start; flex-direction: column; gap: 7px; }
  .dashboard-context-bar label { width: 100%; justify-content: space-between; }
  .dashboard-context-bar select { max-width: 66vw; }
  .readiness-heading, .attention-heading { padding: 15px 16px 14px 20px; }
  .readiness-copy { min-height: 0; padding: 21px 18px 19px 23px; gap: 17px; }
  .readiness-score { flex-basis: 86px; width: 86px; height: 86px; }
  .readiness-score::before { inset: 7px; }
  .readiness-score strong { font-size: 25px; }
  .readiness-copy h2 { font-size: 21px; }
  .readiness-copy p { font-size: 11px; }
  .readiness-progress { margin-top: 14px; }
  .readiness-stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .attention-card { padding: 13px 14px; }
  .section-heading { align-items: flex-start; gap: 15px; flex-direction: column; }
  .search { width: 100%; }
  table { min-width: 0; }
  thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap;
  }
  tbody { display: grid; }
  tbody tr {
    position: relative; height: auto; min-height: 132px; padding: 16px 52px 15px 16px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; border-bottom: 1px solid #e6ecee;
  }
  tbody tr:last-child { border-bottom: 0; }
  tbody td { padding: 0; border: 0; }
  tbody td:first-child { grid-column: 1 / -1; height: auto; }
  tbody td:nth-child(2) { grid-column: 1 / -1; }
  tbody td:nth-child(3), tbody td:nth-child(4) { display: block; }
  tbody td:nth-child(3)::before, tbody td:nth-child(4)::before {
    display: block; margin-bottom: 3px; color: var(--steel); font-size: 8px; font-weight: 900; letter-spacing: .8px; text-transform: uppercase;
  }
  tbody td:nth-child(3)::before { content: "Credentials"; }
  tbody td:nth-child(4)::before { content: "Next expiration"; }
  tbody td:nth-child(5) { position: absolute; top: 18px; right: 14px; }
  .control-header { align-items: flex-start; flex-direction: column; min-height: 0; padding-top: 12px; }
  .control-header h2 { font-size: 35px; }
  .control-header .primary-action { width: 100%; }
  .worksite-grid, .archived-worksites .worksite-grid { grid-template-columns: 1fr; }
  .worksite-card > header { padding-right: 18px; }
  .worksite-actions { padding-right: 10px; }
  .worksite-actions button { min-height: 44px; }
  dialog { max-height: calc(100dvh - 24px); overflow-y: auto; }
  .dialog-shell { padding: 24px 20px; }
  .worker-detail-heading { align-items: flex-start; flex-wrap: wrap; }
  .worker-detail-heading .status { margin-left: 0; }
  .credential-form { grid-template-columns: 1fr; }
  .credential-form label:first-child, .credential-form button { grid-column: auto; }
  .danger-zone { align-items: flex-start; flex-direction: column; }
}

@media (hover: hover) {
  .worksite-card { transition: transform 140ms ease, box-shadow 140ms ease; }
  .worksite-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(10,32,44,.075); }
}

@media (prefers-reduced-motion: reduce) {
  .worksite-card { transition: none; }
}

/* Approved Teams workspace system */
:root {
  --canvas: #F3F4F1;
  --sidebar: #0C1417;
  --card: #FFFFFF;
  --tray: rgba(15, 26, 30, .045);
  --approved-ink: #101B20;
  --muted: #66727A;
  --hairline: rgba(15, 26, 30, .07);
  --accent: #B5E941;
  --lime-ink: #14210A;
  --current: #2E9E58;
  --approved-warning: #DE9421;
  --expired: #D14A32;
  --motion-curve: cubic-bezier(0.32, 0.72, 0, 1);
  --ink-deep: var(--sidebar);
  --ink: var(--approved-ink);
  --signal: var(--accent);
  --paper: var(--card);
  --field: var(--canvas);
  --steel: var(--muted);
  --line: var(--hairline);
  --ready: var(--current);
  --warning: var(--approved-warning);
  --danger: var(--expired);
  font-family: "Archivo", "Segoe UI", sans-serif;
}

html,
body {
  background: var(--canvas);
}

body,
button,
input,
select,
textarea {
  font-family: "Archivo", "Segoe UI", sans-serif;
}

h1,
h2,
h3,
.access-card h1,
.control-header h2,
.readiness-copy h2,
.field-note h3 {
  font-family: "Clash Display", "Arial Narrow", sans-serif;
  font-weight: 600;
}

.kicker,
.company-label,
.plan-label,
.worksite-state,
.data-freshness,
.attention-count,
.panel-count,
.status,
.requirement-state,
.credential-source,
.nav-badge,
.reminder-facts dt,
.reminder-facts dd,
.roster-result-count,
th {
  font-family: "IBM Plex Mono", Consolas, monospace;
}

.access-shell {
  position: relative;
  overflow: hidden;
  background: var(--canvas);
  color: var(--approved-ink);
}

.access-shell::before {
  content: "";
  position: fixed;
  inset: 0 auto 0 0;
  width: clamp(18px, 7vw, 96px);
  background: var(--sidebar);
}

.access-brand {
  position: relative;
  color: var(--approved-ink);
}

.access-brand small {
  color: var(--muted);
}

.access-card {
  position: relative;
  border: 7px solid var(--tray);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 20px 55px rgba(15, 26, 30, .11), inset 0 1px rgba(255, 255, 255, .9);
}

.access-card input,
.workspace-switcher select,
.dashboard-context-bar select,
dialog input,
dialog textarea {
  border-color: var(--hairline);
  border-radius: 999px;
  background: #fafbf9;
}

dialog textarea {
  border-radius: 16px;
}

.entry-mode-tabs,
.trial-summary {
  border-radius: 18px;
}

.app-shell {
  grid-template-columns: 272px minmax(0, 1fr);
  background: var(--canvas);
}

.sidebar {
  padding: 30px 22px 22px;
  background: var(--sidebar);
}

.sidebar nav {
  gap: 5px;
  margin-top: 48px;
}

.workspace-load-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 34px 0;
  padding: 16px 18px;
  border: 1px solid #e4b8a7;
  border-radius: 16px;
  background: #fff4ef;
  color: #692d1d;
}

.workspace-load-status[hidden] {
  display: none;
}

.workspace-load-status p {
  margin: 0;
  line-height: 1.5;
}

.workspace-load-status .secondary-action {
  flex: 0 0 auto;
}

.billing-access-notice {
  margin: 18px 38px 0;
  padding: 13px 16px;
  border: 1px solid #e2bd69;
  border-radius: 12px;
  background: #fff6df;
  color: #65460a;
  font-weight: 700;
  line-height: 1.45;
}

.billing-access-notice[hidden] { display: none; }

.nav-item {
  min-height: 48px;
  border-radius: 999px;
  color: #9da9ad;
  font-weight: 600;
  transition: color 400ms var(--motion-curve), background-color 400ms var(--motion-curve), transform 400ms var(--motion-curve);
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, .055);
  transform: translateX(2px);
}

.nav-item.active {
  color: var(--lime-ink);
  background: var(--accent);
  box-shadow: none;
}

.nav-item.active .nav-glyph {
  color: var(--lime-ink);
}

.nav-glyph {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.55;
}

.nav-badge {
  min-width: 27px;
  min-height: 24px;
  margin-left: auto;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 999px;
  padding: 4px 7px;
  background: rgba(255, 255, 255, .075);
  color: #d7dee0;
  font-size: 9px;
  font-weight: 600;
  text-align: center;
}

.nav-item.active .nav-badge {
  border-color: rgba(20, 33, 10, .16);
  background: rgba(20, 33, 10, .12);
  color: var(--lime-ink);
}

.plan-card {
  border-color: rgba(255, 255, 255, .09);
  border-radius: 18px;
  background: rgba(255, 255, 255, .035);
}

.plan-card p {
  margin: 8px 0 10px;
  color: #c2cbce;
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 10px;
}

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  min-height: 88px;
  border-color: var(--hairline);
  background: rgba(243, 244, 241, .94);
  backdrop-filter: blur(16px);
}

.topbar h1 {
  font-size: 24px;
}

.content {
  max-width: 1360px;
  padding: 28px 38px 58px;
}

.control-header {
  min-height: 142px;
  border-color: var(--hairline);
}

.control-header h2 {
  max-width: 760px;
  font-size: clamp(36px, 4.5vw, 58px);
  letter-spacing: -.045em;
}

.control-header p {
  max-width: 680px;
  line-height: 1.55;
}

.overview-header {
  padding-top: 4px;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.primary-action,
.secondary-action,
.danger-action,
.google-action,
.forgot-action,
.worksite-actions button,
.attention-card button,
.row-action,
.text-action,
.billing-option {
  border-radius: 999px;
}

.primary-action,
.secondary-action {
  min-height: 46px;
  transition: transform 400ms var(--motion-curve), opacity 400ms var(--motion-curve);
}

.dashboard-context-bar select,
.attention-card button {
  min-height: 44px;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-color: var(--approved-ink);
  background: var(--approved-ink);
}

.primary-action svg {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  padding: 6px;
  background: var(--accent);
  fill: none;
  stroke: var(--lime-ink);
  stroke-linecap: round;
  stroke-width: 1.6;
}

.primary-action:hover,
.secondary-action:hover,
.danger-action:hover,
.billing-option:hover {
  transform: translateY(-1px);
}

.primary-action:active,
.secondary-action:active,
.danger-action:active,
.billing-option:active {
  transform: scale(.97);
}

.surface-tray {
  border: 7px solid var(--tray);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 18px 48px rgba(15, 26, 30, .075), inset 0 1px rgba(255, 255, 255, .95);
}

.app-shell:not(.shell-entered) .dashboard-view:not([hidden]) .surface-tray {
  animation: surface-enter 600ms var(--motion-curve) both;
}

.app-shell:not(.shell-entered) .dashboard-view:not([hidden]) .surface-tray:nth-child(2) {
  animation-delay: 60ms;
}

.app-shell:not(.shell-entered) .dashboard-view:not([hidden]) .surface-tray:nth-child(3) {
  animation-delay: 120ms;
}

@keyframes surface-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.dashboard-context-bar {
  border-color: var(--hairline);
  border-radius: 18px;
  background: rgba(255, 255, 255, .72);
}

.operations-overview {
  align-items: start;
  gap: 18px;
}

.readiness-panel,
.attention-row,
.roster-panel {
  border-color: var(--tray);
  border-radius: 24px;
}

.readiness-rail {
  width: 5px;
  background: var(--accent);
}

.readiness-heading,
.attention-heading,
.section-heading,
.control-panel-heading {
  border-color: var(--hairline);
}

.readiness-score {
  box-shadow: inset 0 0 0 10px #edf0eb;
}

.readiness-score::before {
  background: var(--card);
}

.stat {
  min-height: 82px;
  border-color: var(--hairline);
}

.stat.active {
  color: var(--lime-ink);
  background: rgba(181, 233, 65, .22);
}

.attention-card {
  min-height: 72px;
  border-color: var(--hairline);
  background: #fbfcfa;
}

.attention-icon {
  border: 1px solid currentColor;
  background: transparent !important;
}

.roster-panel {
  margin-top: 22px;
}

.search {
  border-color: var(--hairline);
  border-radius: 999px;
  background: #fafbf9;
}

.search svg,
.row-action svg,
.empty-state svg,
.dialog-close svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.search svg {
  width: 18px;
  height: 18px;
}

.row-action {
  width: 44px;
  height: 44px;
}

.row-action svg {
  width: 18px;
  height: 18px;
}

.status {
  min-height: 28px;
  border-radius: 999px;
  font-size: 9px;
}

.worksite-grid {
  gap: 18px;
}

.worksite-card {
  border: 7px solid var(--tray);
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(15, 26, 30, .065), inset 0 1px rgba(255, 255, 255, .95);
}

.worksite-card::before {
  display: none;
}

.worksite-card > header,
.worksite-card-notices,
.worksite-tally {
  padding-left: 22px;
}

.worksite-actions button {
  min-height: 44px;
}

.empty-state {
  min-height: 360px;
  margin-top: 24px;
  padding: clamp(34px, 7vw, 76px);
  display: grid;
  align-content: center;
  justify-items: start;
}

.empty-state-mark {
  width: 54px;
  height: 54px;
  margin-bottom: 28px;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--approved-ink);
}

.empty-state-mark svg {
  width: 24px;
  height: 24px;
}

.empty-state h3 {
  max-width: 650px;
  margin: 12px 0 10px;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -.035em;
}

.empty-state p {
  max-width: 590px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.settings-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr);
  gap: 18px;
  align-items: start;
}

.settings-admin-card {
  grid-row: span 2;
}

.control-panel,
.billing-summary,
.reminder-summary {
  border-color: var(--tray);
  border-radius: 24px;
}

.control-panel-heading {
  align-items: flex-start;
  gap: 18px;
}

.control-panel-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.billing-summary,
.reminder-summary {
  padding: 28px;
}

.billing-summary h3,
.reminder-summary h3 {
  margin: 10px 0 0;
  font-size: 28px;
}

.billing-summary > strong {
  font-family: "IBM Plex Mono", Consolas, monospace;
}

.billing-summary .secondary-action {
  width: 100%;
}

.reminder-summary > p {
  color: var(--muted);
  line-height: 1.6;
}

.reminder-facts {
  margin: 22px 0 0;
}

.reminder-facts div {
  padding: 14px 0;
  border-top: 1px solid var(--hairline);
}

.reminder-facts dt {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.reminder-facts dd {
  margin: 6px 0 0;
  color: var(--approved-ink);
  font-size: 11px;
  line-height: 1.45;
}

.overview-detail-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.overview-list {
  overflow: hidden;
}

.overview-list .attention-heading {
  min-height: 82px;
}

.overview-list > div,
#overview-pending {
  display: grid;
}

.queue-kind {
  width: 42px;
  height: 42px;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--sidebar);
  color: var(--accent);
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
}

.pending-row {
  min-height: 72px;
  border-bottom: 1px solid var(--hairline);
  padding: 14px 17px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  background: #fbfcfa;
}

.pending-row:last-child {
  border-bottom: 0;
}

.pending-row strong,
.pending-row p {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pending-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.pending-row button {
  min-height: 44px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 0 13px;
  background: var(--card);
  color: var(--approved-ink);
  font-size: 10px;
  font-weight: 800;
}

#workers .section-heading {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

#workers .search {
  width: 100%;
  max-width: none;
}

.worker-filter-bar {
  padding: 14px 22px;
  border-bottom: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(220px, .7fr);
  gap: 12px;
  background: #fbfcfa;
}

.worker-filter-bar label:not(.worker-expiring-control) {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.worker-filter-bar select,
.setting-field input {
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 0 12px;
  background: var(--card);
  color: var(--approved-ink);
}

.worker-expiring-control,
.setting-toggle {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--approved-ink);
  font-size: 11px;
  font-weight: 700;
}

.worker-expiring-control input,
.setting-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--approved-ink);
}

.worker-proof-strip {
  flex: 1 0 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

#worker-shared-credential-list .company-credential-row {
  flex-wrap: wrap;
}

.worker-proof-button {
  width: 104px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 5px;
  display: grid;
  gap: 5px;
  background: var(--card);
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-align: left;
}

.worker-proof-button img {
  width: 100%;
  height: 68px;
  border-radius: 8px;
  display: block;
  object-fit: cover;
  background: var(--tray);
}

.worker-proof-button:focus-visible,
.worker-proof-retry:focus-visible,
.pending-row button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.worker-proof-state,
.worker-proof-retry {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.worker-proof-retry {
  min-height: 44px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 8px 12px;
  background: var(--tray);
  color: var(--sidebar);
  font-weight: 800;
  cursor: pointer;
}

.reminder-form {
  min-width: 0;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
  display: grid;
  gap: 12px;
}

.reminder-preference {
  margin-top: 22px;
}

.reminder-form .setting-field {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.reminder-form .secondary-action {
  width: 100%;
}

.reminder-form > p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

dialog {
  border: 7px solid rgba(243, 244, 241, .24);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 32px 100px rgba(12, 20, 23, .34);
}

dialog::backdrop {
  background: rgba(12, 20, 23, .7);
}

dialog > form,
.dialog-shell {
  padding: 0 28px 28px;
}

.dialog-header {
  position: sticky;
  z-index: 4;
  top: 0;
  margin: 0 -28px 20px;
  padding: 26px 28px 20px;
  border-bottom: 1px solid var(--hairline);
  background: rgba(255, 255, 255, .97);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
}

.dialog-header h2 {
  margin: 8px 0 6px;
}

.dialog-header p {
  margin-bottom: 0;
}

.dialog-close {
  position: static;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.dialog-close svg {
  width: 18px;
  height: 18px;
}

.worker-dialog-header {
  align-items: center;
}

.worker-dialog-heading {
  flex: 1;
  min-width: 0;
}

.worker-detail-heading {
  padding: 12px 0 0;
  border-bottom: 0;
}

.billing-options {
  grid-template-columns: 1fr;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .nav-label,
  .nav-badge,
  .plan-card {
    display: none;
  }

  .nav-item {
    justify-content: center;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-admin-card {
    grid-row: auto;
  }
}

@media (max-width: 520px) {
  .billing-access-notice { margin: 14px 18px 0; }
  .workspace-load-status {
    align-items: stretch;
    flex-direction: column;
    margin: 14px 18px 0;
  }
}

/* Task 6: live Asset workspace */
.assets-message {
  margin: 12px 0 0 !important;
}

.empty-state .primary-action {
  margin-top: 24px;
}

.asset-table-panel {
  margin-top: 22px;
}

.asset-table .asset-name strong,
.asset-table .asset-name small {
  display: block;
}

.asset-table .asset-name strong {
  color: var(--approved-ink);
  font-size: 14px;
}

.asset-table .asset-name small {
  margin-top: 5px;
}

.asset-detail-actions {
  margin: 2px 0 24px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.asset-records-section {
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}

.asset-records-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.asset-records-heading h3 {
  margin-bottom: 0;
}

.asset-record-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.asset-record-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: #fbfcfa;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px 18px;
}

.asset-record-copy {
  min-width: 0;
}

.asset-record-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.asset-record-heading strong,
.asset-record-heading small {
  display: block;
}

.asset-record-heading strong {
  color: var(--approved-ink);
  font-size: 15px;
}

.asset-record-heading small {
  margin-top: 4px;
  color: var(--muted);
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 9px;
}

.asset-record-date {
  margin: 10px 0 0 !important;
  color: var(--approved-ink) !important;
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 11px !important;
  font-weight: 600;
}

.asset-record-notes {
  max-width: 640px;
  margin: 9px 0 0 !important;
  color: var(--muted) !important;
  font-size: 12px !important;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.asset-proof-button {
  width: 112px;
  height: 84px;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
}

.asset-proof-button img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.asset-record-actions {
  grid-column: 1 / -1;
  padding-top: 13px;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.asset-record-actions button {
  min-height: 44px;
}

.asset-record-empty {
  border: 1px dashed rgba(15, 26, 30, .16);
  border-radius: 16px;
  background: #fbfcfa;
}

.optional-label {
  color: var(--muted);
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 8px;
  font-weight: 500;
}

.field-error {
  min-height: 14px;
  color: var(--expired);
  font-size: 10px;
  font-weight: 600;
}

dialog input[aria-invalid="true"],
dialog textarea[aria-invalid="true"] {
  border-color: var(--expired);
  box-shadow: 0 0 0 2px rgba(209, 74, 50, .12);
}

#asset-record-photo {
  min-height: 50px;
  padding: 9px 12px;
  border-radius: 16px;
}

#asset-record-photo::file-selector-button {
  min-height: 32px;
  margin-right: 10px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  background: var(--approved-ink);
  color: var(--card);
  font: 600 11px/1 "Archivo", "Segoe UI", sans-serif;
}

.upload-progress {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.upload-progress::before {
  content: "";
  grid-column: 1;
  grid-row: 1;
  height: 8px;
  border-radius: 999px;
  background: #e4e8e1;
}

.upload-progress > span {
  z-index: 1;
  grid-column: 1;
  grid-row: 1;
  width: 0;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  transition: width 400ms var(--motion-curve);
}

.upload-progress small {
  color: var(--muted);
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 10px;
}

.photo-viewer {
  width: min(1100px, calc(100vw - 30px));
}

.photo-viewer-shell {
  padding: 0 28px 28px;
}

.photo-viewer img {
  width: 100%;
  max-height: calc(100dvh - 190px);
  border-radius: 16px;
  display: block;
  object-fit: contain;
  background: var(--sidebar);
}

.asset-proof-button:focus-visible,
.asset-record-actions button:focus-visible,
#asset-record-photo:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 680px) {
  #assets-view .control-header > .primary-action,
  #assets-empty .primary-action,
  .asset-records-heading .primary-action {
    width: 100%;
  }

  .asset-records-heading,
  .asset-record-heading,
  .asset-detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .asset-record-card {
    padding: 15px;
    grid-template-columns: 1fr;
  }

  .asset-proof-button {
    width: 100%;
    height: 160px;
  }

  .asset-record-actions {
    grid-column: auto;
    justify-content: stretch;
  }

  .asset-record-actions button,
  .asset-detail-actions button {
    width: 100%;
  }

  .photo-viewer-shell {
    padding: 0 14px 14px;
  }

  .photo-viewer .dialog-header {
    margin: 0 -14px 14px;
    padding: 16px 14px;
  }

  .overview-detail-grid,
  .worker-filter-bar {
    grid-template-columns: 1fr;
  }

  .attention-card,
  .pending-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .attention-card button,
  .pending-row button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 680px) {
  .access-shell::before {
    inset: 0 0 auto;
    width: auto;
    height: 10px;
  }

  .sidebar {
    height: 64px;
  }

  .sidebar nav {
    height: 70px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    border-color: rgba(255, 255, 255, .09);
    background: var(--sidebar);
  }

  .nav-item,
  .nav-item:not(.active) {
    min-width: 0;
    min-height: 70px;
    border-radius: 0;
    gap: 3px;
    padding: 7px 1px 5px;
    font-size: 8px;
  }

  .nav-item.active {
    background: transparent;
    color: var(--accent);
    box-shadow: inset 0 3px var(--accent);
  }

  .nav-item.active .nav-glyph {
    color: var(--accent);
  }

  .nav-label {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-glyph {
    width: 18px;
    height: 18px;
  }

  .topbar {
    min-height: 78px;
  }

  .content {
    padding: 14px 12px 94px;
  }

  .control-header {
    gap: 18px;
    padding: 18px 2px 24px;
  }

  .control-header h2 {
    font-size: clamp(32px, 10vw, 42px);
  }

  .control-header .topbar-actions,
  .control-header .topbar-actions .secondary-action,
  .control-header .topbar-actions .primary-action {
    width: 100%;
    display: flex;
  }

  .dashboard-context-bar {
    margin-top: 16px;
  }

  .surface-tray,
  .worksite-card,
  .control-panel,
  .billing-summary,
  .reminder-summary {
    border-width: 5px;
    border-radius: 20px;
  }

  .section-heading {
    padding: 19px;
  }

  .table-wrap {
    overflow: visible;
  }

  tbody tr {
    min-height: 0;
    padding: 18px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  tbody td,
  tbody td:first-child,
  tbody td:nth-child(2),
  tbody td:nth-child(3),
  tbody td:nth-child(4),
  tbody td:nth-child(5) {
    position: static;
    grid-column: auto;
    display: block;
  }

  tbody td::before {
    content: attr(data-label) !important;
    display: block !important;
    margin-bottom: 5px;
    color: var(--muted);
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: 8px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  .row-action {
    width: 100%;
    border: 1px solid var(--hairline);
    background: #fafbf9;
  }

  .settings-grid {
    gap: 14px;
  }

  .control-panel-heading {
    padding: 20px;
  }

  .panel-count {
    flex: 0 0 auto;
  }

  .billing-summary,
  .reminder-summary {
    min-width: 0;
    padding: 22px;
  }

  dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }

  dialog > form,
  .dialog-shell {
    padding: 0 18px 22px;
  }

  .dialog-header {
    margin: 0 -18px 18px;
    padding: 18px;
  }

  .worker-detail-heading {
    display: grid;
    grid-template-columns: auto 1fr;
  }

  .worker-detail-heading .status {
    grid-column: 1 / -1;
  }
}

@media (hover: hover) {
  .surface-tray,
  .worksite-card {
    transition: transform 500ms var(--motion-curve), box-shadow 500ms var(--motion-curve);
  }

  .surface-tray:hover,
  .worksite-card:hover {
    transform: translateY(-1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
