/* BCM Hub — single stylesheet. Palette and type follow the client prototype
   (charcoal, BCM orange, warm off-white, Geist) with larger, field-readable text. */

@font-face { font-family: 'Geist'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../fonts/geist-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../fonts/geist-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ink: #292929; --ink-2: #4b4b48; --muted: #6f6f6a; --line: #d7d6d1; --line-soft: #e7e6e1;
  --paper: #f8f7f3; --paper-2: #efeee9; --white: #fff;
  --orange: #ef6b2e; --orange-dark: #c9531f; --orange-soft: #fff0ea;
  --green: #2d725a; --green-soft: #e7f1ec; --blue: #294d6d; --blue-soft: #e8eef4;
  --red: #b3261e; --red-soft: #fbeae8; --amber: #8a5a00; --amber-soft: #fbf1dc;
  --radius: 10px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 20px rgba(0,0,0,.05);
  --font: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 var(--font); }
body.plain { background: var(--paper); }
img { max-width: 100%; }
a { color: var(--orange-dark); }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.02em; }
h1 { font-size: clamp(26px, 4vw, 38px); }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
p { margin: 0 0 .8em; }
small { font-size: 12px; }
code { background: var(--paper-2); padding: 1px 5px; border-radius: 4px; font-size: .92em; }
[hidden] { display: none !important; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid rgba(239,107,46,.45); outline-offset: 2px; }

.eyebrow, .kind { display: block; font-size: 11px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; color: var(--orange-dark); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center-note { text-align: center; margin-top: 16px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

/* ───────── Buttons, pills, badges ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); font: 650 14px var(--font); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--ink-2); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: var(--orange); border-color: var(--orange); }
.btn.orange { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn.danger { color: var(--red); border-color: #e5b5b1; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn.block { width: 100%; }
.btn[disabled], .btn:disabled { opacity: .45; cursor: not-allowed; }
.link-button { background: none; border: 0; padding: 0; color: var(--orange-dark); font: 650 14px var(--font); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--paper-2); color: var(--ink-2); }
.pill.good { background: var(--green-soft); color: var(--green); }
.pill.warn { background: var(--amber-soft); color: var(--amber); }
.pill.bad { background: var(--red-soft); color: var(--red); }
.pill.info { background: var(--blue-soft); color: var(--blue); }
.pill.orange { background: var(--orange-soft); color: var(--orange-dark); }
.badge, .count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--orange); color: #fff; font-size: 11px; font-weight: 800; }

/* ───────── Top bar & navigation ───────── */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px; height: 66px; padding: 0 clamp(14px, 3vw, 32px); background: var(--white); border-bottom: 1px solid var(--line-soft); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 46px; height: 32px; object-fit: contain; }
.brand span { display: flex; flex-direction: column; line-height: 1.05; }
.brand b { font-size: 17px; letter-spacing: .02em; }
.brand small { font-size: 9px; letter-spacing: .16em; color: var(--muted); font-weight: 650; }
.header-search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; background: var(--paper); border: 1px solid var(--line-soft); border-radius: 99px; }
.header-search input { flex: 1; border: 0; background: transparent; font: 14px var(--font); outline: none; min-width: 0; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-button { position: relative; width: 42px; height: 42px; border-radius: 99px; border: 1px solid var(--line-soft); background: var(--white); font-size: 18px; cursor: pointer; }
.icon-button .badge { position: absolute; top: -4px; right: -4px; }
.lang-toggle { height: 42px; border: 1px solid var(--line-soft); border-radius: 99px; background: var(--white); padding: 0 14px; font: 650 13px var(--font); cursor: pointer; }
.avatar { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 99px; border: 0; background: var(--ink); color: #fff; font: 750 14px var(--font); cursor: pointer; border-bottom: 3px solid var(--orange); }
.avatar.large { width: 54px; height: 54px; font-size: 18px; }

.section-nav { background: var(--ink); color: #fff; position: sticky; top: 66px; z-index: 25; }
.section-nav-inner { display: flex; align-items: center; gap: 2px; max-width: 1280px; margin: 0 auto; padding: 0 clamp(8px, 3vw, 24px); overflow-x: auto; scrollbar-width: none; }
.section-nav a { flex: none; color: #d9d9d4; text-decoration: none; font-size: 14px; font-weight: 600; padding: 12px 12px; border-bottom: 3px solid transparent; display: inline-flex; gap: 6px; align-items: center; }
.section-nav a:hover { color: #fff; }
.section-nav a.active { color: #fff; border-bottom-color: var(--orange); }
.section-nav .nav-spacer { flex: 1; min-width: 12px; }
.section-nav .nav-admin { color: #ffb48f; }

.mobile-nav { display: none; }

.page { max-width: 1280px; margin: 0 auto; padding: 26px clamp(14px, 3vw, 24px) 60px; min-height: 60vh; }
.site-footer { text-align: center; color: var(--muted); font-size: 12px; padding: 0 16px 32px; }

.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-weight: 600; border-left: 4px solid; }
.flash.success { background: var(--green-soft); border-color: var(--green); color: #1d4d3c; }
.flash.error { background: var(--red-soft); border-color: var(--red); color: #7a1a14; }
.flash.info { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); }
.flash.floating { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 60; width: min(560px, calc(100% - 32px)); box-shadow: var(--shadow); }

/* Drawers */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(20,20,20,.38); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--white); z-index: 50; display: flex; flex-direction: column; box-shadow: -10px 0 40px rgba(0,0,0,.15); overflow-y: auto; }
.drawer > header { display: flex; align-items: flex-start; gap: 12px; padding: 22px; border-bottom: 1px solid var(--line-soft); }
.drawer > header > div { flex: 1; }
.drawer > header small { font-size: 10px; letter-spacing: .14em; color: var(--muted); font-weight: 700; }
.drawer > header h2 { margin: 2px 0 0; }
.drawer > header p { margin: 2px 0 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.close { border: 0; background: var(--paper); width: 36px; height: 36px; border-radius: 99px; font-size: 22px; cursor: pointer; }
.drawer-controls { display: flex; justify-content: space-between; align-items: center; padding: 12px 22px; background: var(--paper); font-size: 13px; }
.notification-list article { display: flex; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line-soft); }
.notification-list article.unread { background: #fffaf6; }
.notification-list article.urgent .n-icon { background: var(--orange); color: #fff; }
.n-icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--paper-2); }
.notification-list small { font-size: 10px; letter-spacing: .12em; font-weight: 750; color: var(--orange-dark); }
.notification-list h3 { font-size: 15px; margin: 3px 0; }
.notification-list p { font-size: 13px; color: var(--ink-2); margin: 0 0 4px; }
.notification-list time { font-size: 12px; color: var(--muted); }
.facts { margin: 0; padding: 12px 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.facts dt { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.facts dd { margin: 2px 0 0; font-weight: 650; overflow-wrap: anywhere; }
.drawer-links { display: flex; flex-direction: column; padding: 8px 12px; }
.drawer-links a { padding: 12px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; }
.drawer-links a:hover { background: var(--paper); }
.drawer-footer { margin-top: auto; padding: 18px 22px; border-top: 1px solid var(--line-soft); }
.empty { color: var(--muted); padding: 22px; }

/* ───────── Page headers ───────── */
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; color: var(--ink-2); font-weight: 650; font-size: 14px; text-decoration: none; }
.back:hover { color: var(--orange-dark); }
.inner-hero { display: flex; align-items: center; gap: 18px; padding: 22px 24px; margin-bottom: 22px; background: var(--white); border: 1px solid var(--line-soft); border-left: 5px solid var(--orange); border-radius: var(--radius); box-shadow: var(--shadow); }
.inner-hero > div { flex: 1; min-width: 0; }
.inner-hero h1 { margin: 2px 0 4px; }
.inner-hero p { margin: 0; color: var(--ink-2); }
.inner-hero.compact h1 { font-size: 26px; }
.hero-icon { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 24px; font-weight: 800; }
.hero-icon.safety { background: var(--green); } .hero-icon.field { background: var(--blue); } .hero-icon.admin { background: var(--ink); } .hero-icon.orange { background: var(--orange); }
.hero-stat { flex: none; text-align: right; font-size: 32px; font-weight: 800; line-height: 1; }
.hero-stat small { display: block; font-size: 10px; letter-spacing: .14em; color: var(--muted); margin-top: 4px; }
.hero-actions { flex: none; display: flex; gap: 8px; flex-wrap: wrap; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 28px 0 12px; }
.section-heading h2 { margin: 0; display: flex; gap: 8px; align-items: center; }
.section-heading .tiny-icon { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--ink); color: #fff; font-size: 14px; }
.section-heading .tiny-icon.warn { background: var(--orange); }
.section-heading a { font-weight: 650; font-size: 14px; }

/* ───────── Cards & grids ───────── */
.card { background: var(--white); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }

.hero { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; padding: 28px; border-radius: 14px; background: linear-gradient(135deg, #222 0%, #333 70%, #3c3c3c 100%); color: #fff; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; width: 420px; height: 420px; border: 90px solid rgba(255,255,255,.035); right: -170px; bottom: -220px; transform: rotate(30deg); }
.hero .eyebrow { color: #ff9a6b; }
.hero h1 { margin: 6px 0; }
.hero p { color: #d2d2cd; max-width: 620px; }
.employee-context { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.employee-context span { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); border-radius: 99px; padding: 4px 12px; font-size: 13px; }
.employee-context span b { color: #ffb48f; }
.hero-side { position: relative; z-index: 1; text-align: right; }
.hero-side b { font-size: 34px; display: block; }
.hero-side small { color: #c9c9c4; }

.hub-choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 20px; }
.hub-choice { display: grid; grid-template-columns: 42% 1fr auto; align-items: center; gap: 0; min-height: 190px; background: var(--white); border: 1px solid var(--line-soft); border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.hub-choice:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,.09); }
.hub-choice-art { align-self: stretch; background-size: cover; background-position: center; clip-path: polygon(0 0, 100% 0, 86% 100%, 0 100%); border-right: 0; position: relative; }
.hub-choice-art::after { content: ''; position: absolute; top: 0; bottom: 0; right: 0; width: 18%; background: linear-gradient(105deg, transparent 60%, var(--orange) 60%, var(--orange) 70%, transparent 70%); }
.hub-choice-art.employee { background-image: url('../img/hub-employee.jpg'); }
.hub-choice-art.company { background-image: url('../img/hub-company.jpg'); }
.hub-choice > div { padding: 20px 8px 20px 18px; }
.hub-choice h2 { font-size: 26px; margin: 4px 0; }
.hub-choice p { color: var(--ink-2); margin: 0; }
.hub-choice .arrow { margin-right: 18px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 99px; background: var(--paper-2); color: var(--orange); font-size: 20px; }

.quick-card, .resource-card { display: flex; gap: 14px; align-items: flex-start; padding: 18px; background: var(--white); border: 1px solid var(--line-soft); border-radius: var(--radius); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); position: relative; transition: border-color .15s, transform .15s; }
.quick-card:hover, .resource-card:hover { border-color: var(--orange); transform: translateY(-1px); }
.quick-card .card-icon, .resource-icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 19px; }
.quick-card.safety .card-icon { background: var(--green); } .quick-card.field .card-icon { background: var(--blue); } .quick-card.admin .card-icon { background: var(--ink); }
.quick-card > div, .resource-card > div { flex: 1; min-width: 0; }
.quick-card h3, .resource-card h3 { margin: 3px 0 4px; }
.quick-card p, .resource-card p { margin: 0; color: var(--ink-2); font-size: 14px; }
.resource-card em { display: inline-block; margin-top: 8px; font-style: normal; font-size: 12px; font-weight: 700; color: var(--green); }
.resource-card.restricted { border-left: 4px solid var(--orange); }
.resource-card .go { color: var(--orange); font-weight: 800; }
.resource-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }

.announcement-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.announcement-card { display: flex; gap: 12px; padding: 16px; background: var(--white); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow); }
.announcement-card.urgent { border-left: 4px solid var(--orange); }
.announcement-card small { font-size: 10px; letter-spacing: .12em; font-weight: 750; color: var(--orange-dark); }
.announcement-card h3 { font-size: 15px; margin: 3px 0; }
.announcement-card p { font-size: 13px; color: var(--ink-2); margin: 0 0 4px; }
.announcement-card time { font-size: 12px; color: var(--muted); }

.toolbox-card { display: grid; grid-template-columns: 160px 1fr; overflow: hidden; padding: 0; text-decoration: none; color: var(--ink); }
.toolbox-art { background: var(--green); color: #fff; padding: 18px; font-weight: 800; font-size: 18px; line-height: 1.1; letter-spacing: .02em; display: flex; align-items: flex-end; }
.toolbox-art b { color: #ffd2bd; }
.toolbox-card > div:last-child { padding: 18px; }
.alert-card { border-left: 5px solid var(--orange); background: #fff8f4; }
.alert-card b { color: var(--orange-dark); letter-spacing: .08em; font-size: 12px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--white); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); display: block; }
.stat span { font-size: 11px; letter-spacing: .12em; font-weight: 750; color: var(--muted); text-transform: uppercase; }
.stat strong { display: block; font-size: 28px; margin: 4px 0 2px; letter-spacing: -.02em; }
.stat small { color: var(--muted); }
.stat.alert strong { color: var(--orange-dark); }
a.stat:hover { border-color: var(--orange); }

/* Lists */
.list { background: var(--white); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); text-decoration: none; color: var(--ink); }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover, button.list-item:hover { background: #fffaf6; }
.list-item .li-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; background: var(--paper-2); font-weight: 800; font-size: 13px; color: var(--ink-2); }
.list-item .li-icon.pdf { background: var(--red-soft); color: var(--red); }
.list-item .li-icon.folder { background: var(--amber-soft); color: var(--amber); }
.list-item .li-icon.orange { background: var(--orange); color: #fff; }
.list-item > div { flex: 1; min-width: 0; }
.list-item b { display: block; overflow-wrap: anywhere; }
.list-item small { color: var(--muted); }
.list-item .meta { flex: none; text-align: right; font-size: 13px; color: var(--muted); }
.list-empty { padding: 26px 18px; text-align: center; color: var(--muted); }

/* Tables */
.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--paper); font-weight: 750; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td small { display: block; color: var(--muted); }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #fffaf6; }
td.num, th.num { text-align: right; white-space: nowrap; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--ink-2); font-weight: 650; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--ink); border-bottom-color: var(--orange); }

/* ───────── Forms ───────── */
label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=url], input[type=search], input[type=tel], input:not([type]), select, textarea {
  display: block; width: 100%; margin-top: 6px; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); font: 15px var(--font); }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(239,107,46,.15); }
input[readonly] { background: var(--paper); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--orange); }
.form-card > label, .form-card > .form-grid, .form-card > .check { margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.form-section { background: var(--white); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.form-section > header { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.form-section > header > span { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--ink); color: #fff; font-weight: 800; font-size: 13px; }
.form-section > header h2, .form-section > header h3 { margin: 0; font-size: 18px; }
.form-section > header p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.form-section > * + label, .form-section > label + label { margin-top: 14px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.form-footer { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px 18px; margin-top: 8px; background: var(--ink); color: #fff; border-radius: var(--radius); }
.form-footer small { color: #bdbdb8; display: block; }
.form-footer .btn.primary { background: var(--orange); border-color: var(--orange); }
.certify { display: flex; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); margin-bottom: 16px; cursor: pointer; }
.certify input { width: 22px; height: 22px; flex: none; accent-color: var(--orange); }
.certify b { display: block; }
.certify small { color: var(--muted); }
.locked { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: var(--radius); background: var(--blue-soft); border: 1px solid #c9d7e4; margin-bottom: 16px; }
.locked .hero-icon { width: 44px; height: 44px; background: var(--blue); font-size: 18px; }
.locked small { color: var(--blue); font-weight: 750; letter-spacing: .1em; font-size: 11px; }
.locked b { display: block; }
.locked > em { margin-left: auto; font-style: normal; font-weight: 750; font-size: 12px; color: var(--green); }
.hint { font-size: 13px; color: var(--muted); font-weight: 500; margin-top: 4px; }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.choice-grid label { position: relative; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); cursor: pointer; }
.choice-grid input { position: absolute; opacity: 0; }
.choice-grid label:has(input:checked) { border-color: var(--orange); box-shadow: 0 0 0 2px rgba(239,107,46,.2); }

.survey-row { display: grid; grid-template-columns: 26px minmax(0, 1.2fr) 110px minmax(0, 1.4fr); gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.survey-row:last-child { border-bottom: 0; }
.survey-row b { padding-top: 12px; }
.survey-row span { padding-top: 11px; font-weight: 600; }
.survey-row select, .survey-row textarea { margin-top: 0; }
.survey-row textarea { min-height: 44px; }

.recipient-list { display: grid; gap: 8px; }
.recipient-list label { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); font-weight: 600; cursor: pointer; }
.recipient-list label input { width: 20px; height: 20px; accent-color: var(--orange); }
.recipient-list label > div { flex: 1; min-width: 0; }
.recipient-list small { display: block; color: var(--muted); font-weight: 500; overflow-wrap: anywhere; }
.recipient-list em { font-style: normal; font-size: 11px; letter-spacing: .1em; font-weight: 750; color: var(--muted); }
.recipient-list .required em { color: var(--orange-dark); }

.line-items table { font-size: 14px; }
.line-items td { padding: 6px; }
.line-items input, .line-items select { margin-top: 0; min-height: 40px; }
.line-items .remove { width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--line); background: var(--white); cursor: pointer; font-size: 18px; }
.line-items header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 14px 0 6px; }
.line-items header b { font-size: 15px; }

.photo-upload { display: flex; align-items: center; gap: 14px; padding: 18px; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--paper); cursor: pointer; }
.photo-upload input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.photo-upload > span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 99px; background: var(--ink); color: #fff; font-size: 22px; flex: none; }
.photo-upload small { display: block; color: var(--muted); font-weight: 500; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 12px; }
.photo-grid figure { margin: 0; border: 1px solid var(--line-soft); border-radius: 8px; overflow: hidden; background: var(--white); }
.photo-grid img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.photo-grid figcaption { padding: 6px 8px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }

.signature-pad { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); overflow: hidden; }
.signature-pad canvas { display: block; width: 100%; height: 170px; touch-action: none; background: repeating-linear-gradient(0deg, transparent 0 128px, #e2e1dc 128px 129px, transparent 129px); cursor: crosshair; }
.signature-pad footer { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: var(--paper); font-size: 12px; color: var(--muted); }
.signature-pad.signed { border-color: var(--green); }

.weather-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.weather-strip article { padding: 12px; border-radius: 8px; background: var(--paper); border: 1px solid var(--line-soft); }
.weather-strip small { color: var(--muted); font-weight: 700; }
.weather-strip b { display: block; font-size: 22px; }
.weather-strip p { margin: 0; font-size: 12px; color: var(--muted); }

.callout { padding: 14px 16px; border-radius: var(--radius); border-left: 4px solid var(--line); background: var(--paper); margin-bottom: 16px; }
.callout b, .callout strong { display: block; }
.callout.good { border-color: var(--green); background: var(--green-soft); }
.callout.warn { border-color: var(--amber); background: var(--amber-soft); }
.callout.danger { border-color: var(--red); background: var(--red-soft); }
.callout.info { border-color: var(--blue); background: var(--blue-soft); }
.callout.orange { border-color: var(--orange); background: var(--orange-soft); }

.checklist { display: grid; gap: 8px; margin-bottom: 16px; }
.checklist > div { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--white); }
.checklist span { font-weight: 800; color: var(--muted); }
.checklist p { margin: 0; }
.checklist-plain { list-style: none; padding: 0; }
.checklist-plain li { padding: 6px 0; }
.ok { color: var(--green); } .bad { color: var(--red); }

/* ───────── Printable documents ───────── */
.doc { background: var(--white); border: 1px solid var(--line-soft); border-radius: 4px; padding: clamp(18px, 4vw, 42px); box-shadow: var(--shadow); max-width: 900px; margin: 0 auto; }
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; border-bottom: 3px solid var(--ink); padding-bottom: 14px; margin-bottom: 18px; }
.doc-head img { width: 90px; }
.doc-head h1 { font-size: 26px; margin: 0; }
.doc-head small { letter-spacing: .14em; font-weight: 750; color: var(--muted); }
.doc-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0; border: 1px solid var(--line); margin-bottom: 18px; }
.doc-meta div { padding: 8px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.doc-meta dt { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 750; }
.doc-meta dd { margin: 2px 0 0; font-weight: 650; overflow-wrap: anywhere; }
.doc h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .1em; background: var(--paper-2); padding: 6px 10px; margin: 20px 0 10px; }
.doc .signature-img { max-width: 320px; max-height: 120px; display: block; border-bottom: 1px solid var(--ink); }
.doc-sign { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-top: 18px; }
.doc-sign small { color: var(--muted); display: block; }
.doc-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 18px 0; }
.doc table { font-size: 13px; }
.doc th { background: var(--paper-2); }

/* ───────── Login & install ───────── */
.login-screen { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.login-brand { position: relative; overflow: hidden; background: linear-gradient(135deg, #202020, #303030 70%, #3a3a3a); color: #fff; padding: 7vh 6vw; display: flex; flex-direction: column; }
.login-brand::after { content: ''; position: absolute; width: 550px; height: 550px; border: 110px solid rgba(255,255,255,.03); right: -250px; bottom: -250px; transform: rotate(32deg); }
.login-brand > img { width: 170px; filter: invert(1); opacity: .96; position: relative; z-index: 1; }
.login-brand > div { margin: auto 0; max-width: 540px; position: relative; z-index: 1; }
.login-brand > div > span { font-size: 11px; letter-spacing: .2em; color: #ef8a5d; font-weight: 800; }
.login-brand h1 { font-size: clamp(36px, 5vw, 58px); line-height: 1.02; letter-spacing: -.05em; margin: 16px 0; }
.login-brand p { color: #c7c7c2; font-size: 16px; max-width: 470px; }
.login-brand ul { list-style: none; margin: 0 0 36px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; position: relative; z-index: 1; }
.login-brand li { border-top: 1px solid rgba(255,255,255,.15); padding-top: 12px; color: #d4d4cf; font-size: 13px; }
.login-brand li span { display: block; color: var(--orange); margin-bottom: 4px; }
.login-brand > small { font-size: 10px; letter-spacing: .18em; color: #8f8f8b; position: relative; z-index: 1; }
.login-panel { display: flex; flex-direction: column; background: var(--paper); }
.login-panel > header { display: flex; justify-content: flex-end; padding: 22px 6vw; }
.login-form { width: min(420px, calc(100% - 40px)); margin: auto; padding: 10px 0 60px; }
.login-form > label { margin: 16px 0; }
.login-form h2 { font-size: 34px; margin: 8px 0; }
.login-form > p { color: var(--muted); }
.login-lock { width: 48px; height: 48px; background: var(--ink); color: #fff; display: grid; place-items: center; margin-bottom: 20px; font-size: 20px; border-bottom: 4px solid var(--orange); border-radius: 6px; }
.login-options { margin: 4px 0 18px; }
.login-form footer { margin-top: 22px; font-size: 13px; color: var(--muted); }
.install-page, .narrow-page { max-width: 640px; margin: 0 auto; padding: 32px 16px; }
.install-logo { width: 120px; }
.error-page { text-align: center; max-width: 560px; margin: 60px auto; }
.error-code { font-size: 64px; font-weight: 800; color: var(--orange); }

/* ───────── Module specifics ───────── */
.project-head-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.folder-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.folder-tile { display: flex; gap: 12px; align-items: center; padding: 14px; background: var(--white); border: 1px solid var(--line-soft); border-radius: var(--radius); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.folder-tile:hover { border-color: var(--orange); }
.folder-tile .li-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; background: var(--amber-soft); color: var(--amber); font-weight: 800; }
.folder-tile.app .li-icon { background: var(--orange); color: #fff; font-size: 12px; }
.folder-tile small { display: block; color: var(--muted); }
.folder-tile b { display: block; }
.action-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.action-tile { padding: 16px; border-radius: var(--radius); background: var(--ink); color: #fff; text-decoration: none; display: flex; flex-direction: column; gap: 4px; min-height: 110px; }
.action-tile:hover { background: var(--orange); }
.action-tile span { font-size: 22px; font-weight: 800; }
.action-tile small { color: #cfcfca; }

details.folder { background: var(--white); border: 1px solid var(--line-soft); border-radius: var(--radius); margin-bottom: 8px; box-shadow: var(--shadow); }
details.folder > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; }
details.folder > summary::-webkit-details-marker { display: none; }
details.folder > summary::after { content: '+'; margin-left: 8px; font-weight: 800; color: var(--muted); }
details.folder[open] > summary::after { content: '−'; }
details.folder > summary > div { flex: 1; min-width: 0; }
details.folder > summary small { color: var(--muted); letter-spacing: .08em; font-size: 11px; font-weight: 700; }
details.folder > summary h3 { margin: 2px 0 0; }
details.folder .folder-body { padding: 0 16px 16px; }
details.folder.priority { border-left: 4px solid var(--orange); }

.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filter-row a, .filter-row button { padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--white); color: var(--ink-2); text-decoration: none; font: 650 13px var(--font); cursor: pointer; }
.filter-row a.active, .filter-row button.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.toolbar { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar > label { flex: 1; min-width: 200px; }

.vendor-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.vendor-map { position: sticky; top: 130px; background: var(--white); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.vendor-map iframe { display: block; width: 100%; height: 420px; border: 0; }
.vendor-map footer { padding: 10px 14px; font-size: 13px; color: var(--muted); }
.vendor-item { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); align-items: start; }
.vendor-item:last-child { border-bottom: 0; }
.vendor-item .v-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; font-size: 18px; color: #fff; background: var(--ink-2); }
.v-icon.blue { background: var(--blue); } .v-icon.yellow { background: #b8860b; } .v-icon.orange { background: var(--orange); } .v-icon.green { background: var(--green); }
.vendor-item small { color: var(--muted); font-weight: 700; letter-spacing: .06em; }
.vendor-item h3 { margin: 2px 0; font-size: 16px; }
.vendor-item p { margin: 0; font-size: 13px; color: var(--ink-2); }
.vendor-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.vendor-actions details > summary { list-style: none; cursor: pointer; }
.vendor-actions details > summary::-webkit-details-marker { display: none; }
.vendor-request { margin-top: 8px; min-width: 260px; }

.pw-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px; align-items: start; }
.pw-detail { position: sticky; top: 130px; }
.history { border-left: 2px solid var(--line); padding-left: 14px; }
.history > div { margin-bottom: 12px; }
.history b { display: block; text-transform: capitalize; }
.history span { font-size: 12px; color: var(--muted); }
.history p { margin: 2px 0 0; font-size: 14px; }

.perm-matrix th, .perm-matrix td { text-align: center; }
.perm-matrix th:first-child, .perm-matrix td:first-child { text-align: left; }
.perm-matrix input { width: 20px; height: 20px; accent-color: var(--orange); }
.perm-group td { background: var(--paper); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 750; color: var(--muted); }

.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }

/* ───────── Responsive ───────── */
@media (max-width: 1024px) {
  .split, .vendor-layout, .pw-layout { grid-template-columns: 1fr; }
  .vendor-map, .pw-detail { position: static; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .action-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hub-choice-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; padding-bottom: 76px; }
  .topbar { height: 60px; gap: 10px; }
  .header-search, .lang-toggle span, .brand small { display: none; }
  .lang-toggle { padding: 0 10px; font-size: 12px; }
  .section-nav { display: none; }
  .mobile-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; background: var(--white); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 650; color: var(--muted); text-decoration: none; padding: 4px 0; }
  .mobile-nav a span { font-size: 20px; line-height: 1; }
  .mobile-nav a.active { color: var(--orange-dark); }
  .mobile-nav .nav-search span { display: grid; place-items: center; width: 40px; height: 40px; margin-top: -18px; border-radius: 99px; background: var(--ink); color: #fff; border: 3px solid var(--white); }
  .page { padding-top: 18px; }
  .grid-2, .grid-3, .grid-4, .form-grid, .form-grid.three, .form-grid.four { grid-template-columns: 1fr; }
  .inner-hero { flex-wrap: wrap; padding: 18px; }
  .hero-stat, .hero-actions { width: 100%; text-align: left; }
  .hero { flex-direction: column; align-items: flex-start; padding: 22px; }
  .hero-side { text-align: left; }
  .hub-choice { grid-template-columns: 1fr auto; grid-template-rows: 150px auto; }
  .hub-choice-art { grid-column: 1 / -1; clip-path: none; border-bottom: 4px solid var(--orange); }
  .hub-choice-art::after { display: none; }
  .toolbox-card { grid-template-columns: 1fr; }
  .toolbox-art { min-height: 90px; }
  .survey-row { grid-template-columns: 22px 1fr; }
  .survey-row select, .survey-row textarea { grid-column: 2; }
  .login-screen { grid-template-columns: 1fr; }
  .login-brand { padding: 32px 24px; min-height: auto; }
  .login-brand > div { margin: 28px 0; }
  .login-brand ul { display: none; }
  .vendor-item { grid-template-columns: 40px 1fr; }
  .vendor-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .vendor-actions details[open] { flex-basis: 100%; }
  .vendor-request { min-width: 0; width: 100%; }
  .weather-strip { grid-template-columns: 1fr; }
  .action-tiles { grid-template-columns: 1fr 1fr; }
  .list-item .meta { display: none; }
  .form-footer { bottom: 70px; }
  th, td { padding: 9px 10px; }
}

@media print {
  .topbar, .section-nav, .mobile-nav, .site-footer, .doc-actions, .back, .flash, .no-print, .drawer, .drawer-backdrop { display: none !important; }
  body { background: #fff; font-size: 12px; padding: 0; }
  .page { padding: 0; max-width: none; }
  .doc { border: 0; box-shadow: none; padding: 0; max-width: none; }
  a { color: inherit; text-decoration: none; }
}
