:root {
  color-scheme: light;
  --bg: #f2f4f7;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --surface-muted: #f7f8fa;
  --text: #17191d;
  --text-soft: #656b76;
  --text-faint: #969ca6;
  --line: rgba(24, 28, 35, 0.09);
  --line-strong: rgba(24, 28, 35, 0.15);
  --blue: #0a78f0;
  --blue-soft: #e8f2ff;
  --green: #27a568;
  --green-soft: #e9f8f0;
  --orange: #e8871a;
  --orange-soft: #fff3e4;
  --red: #d94b52;
  --red-soft: #feedef;
  --purple: #7c5ce7;
  --purple-soft: #f0edff;
  --shadow: 0 10px 30px rgba(28, 35, 48, 0.08), 0 2px 8px rgba(28, 35, 48, 0.04);
  --shadow-float: 0 16px 48px rgba(25, 32, 45, 0.15);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 13px;
  --spring: cubic-bezier(.2, .85, .28, 1.12);
  --ease: cubic-bezier(.2, .65, .3, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { min-height: 100vh; overflow-x: hidden; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 242px minmax(0, 1fr); }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px 18px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(248, 249, 251, 0.78);
  backdrop-filter: blur(24px) saturate(140%);
  z-index: 20;
}

.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 22px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  color: white; background: var(--blue); box-shadow: 0 8px 20px rgba(10, 120, 240, .24);
}
.brand-mark svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.brand strong { display: block; font-size: 15px; letter-spacing: -.01em; }
.brand span { display: block; margin-top: 2px; color: var(--text-soft); font-size: 12px; }

.nav-list { display: grid; gap: 5px; }
.nav-item {
  width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 13px;
  display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 8px;
  background: transparent; color: var(--text-soft); text-align: left; cursor: pointer;
  transition: transform 180ms var(--spring), color 180ms ease, background 180ms ease;
}
.nav-item:hover { background: rgba(255,255,255,.7); color: var(--text); }
.nav-item:active { transform: scale(.97); }
.nav-item.active { background: var(--surface-solid); color: var(--text); box-shadow: 0 4px 14px rgba(25, 32, 45, .07); font-weight: 650; }
.nav-icon { width: 24px; color: currentColor; font-size: 21px; line-height: 1; text-align: center; }
.nav-item.active .nav-icon { color: var(--blue); }
.nav-count { color: var(--text-faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.nav-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); opacity: 0; transform: scale(.5); transition: 180ms var(--spring); }
.nav-dot.visible { opacity: 1; transform: scale(1); }

.sidebar-footer { margin-top: auto; display: grid; gap: 4px; }
.full { width: 100%; }

.main-panel { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 15; height: 84px; padding: 0 clamp(22px, 4vw, 54px);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: rgba(242, 244, 247, .82); backdrop-filter: blur(24px) saturate(130%);
  border-bottom: 1px solid rgba(24, 28, 35, .055);
}
.topbar-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar h1 { margin: 0; font-size: 22px; line-height: 1.15; letter-spacing: -.025em; }
.topbar p { margin: 4px 0 0; color: var(--text-soft); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.save-state { display: inline-flex; align-items: center; gap: 7px; color: var(--text-soft); font-size: 12px; white-space: nowrap; }
.save-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); transition: background 160ms ease, transform 160ms var(--spring); }
.save-state.saving i { background: var(--orange); transform: scale(.75); }
.mobile-brand { display: none; }

.content { width: min(1260px, 100%); margin: 0 auto; padding: 32px clamp(22px, 4vw, 54px) 80px; }
.view { display: none; animation: viewIn 300ms var(--ease) both; }
.view.active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

.secondary-button, .primary-button, .quiet-button, .text-button, .icon-button, .segmented button {
  border: 0; cursor: pointer; transition: transform 160ms var(--spring), box-shadow 160ms ease, background 160ms ease, color 160ms ease;
}
.secondary-button, .primary-button, .quiet-button {
  min-height: 42px; padding: 0 16px; border-radius: 13px; font-weight: 650; letter-spacing: -.005em;
}
.primary-button { color: white; background: var(--blue); box-shadow: 0 8px 18px rgba(10,120,240,.22); }
.primary-button:hover { box-shadow: 0 10px 24px rgba(10,120,240,.3); }
.secondary-button { background: var(--surface-solid); box-shadow: 0 3px 12px rgba(25,32,45,.07); }
.quiet-button { background: rgba(24,28,35,.055); color: var(--text); }
.text-button { min-height: 36px; padding: 0 10px; border-radius: 10px; color: var(--blue); background: transparent; }
.text-button:hover { background: var(--blue-soft); }
.danger-text { color: var(--red); }
.secondary-button:active, .primary-button:active, .quiet-button:active, .text-button:active, .icon-button:active { transform: scale(.96); }
.primary-button:disabled, .secondary-button:disabled { opacity: .45; cursor: default; box-shadow: none; }

.hero {
  min-height: 310px; padding: clamp(28px, 5vw, 56px); border-radius: var(--radius-xl);
  background: var(--surface-solid); box-shadow: var(--shadow); overflow: hidden; position: relative;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 36px; align-items: center;
}
.hero::after { content: ""; position: absolute; width: 330px; height: 330px; right: -110px; top: -150px; border-radius: 50%; background: rgba(10,120,240,.08); }
.hero-copy { position: relative; z-index: 1; }
.eyebrow { margin: 0 0 11px; color: var(--blue); font-size: 12px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.hero h2 { margin: 0; max-width: 620px; font-size: clamp(30px, 4vw, 48px); line-height: 1.03; letter-spacing: -.045em; }
.hero p { max-width: 590px; margin: 18px 0 24px; color: var(--text-soft); font-size: 16px; line-height: 1.55; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.upload-card {
  position: relative; z-index: 1; min-height: 210px; padding: 24px; border: 1.5px dashed rgba(10,120,240,.28); border-radius: 22px;
  background: var(--blue-soft); display: grid; place-items: center; text-align: center; cursor: pointer;
  transition: transform 220ms var(--spring), background 180ms ease, border-color 180ms ease;
}
.upload-card:hover, .upload-card.dragging { transform: translateY(-3px) scale(1.01); background: #deedff; border-color: var(--blue); }
.upload-symbol { width: 58px; height: 58px; margin: 0 auto 13px; border-radius: 18px; display: grid; place-items: center; color: white; background: var(--blue); font-size: 28px; box-shadow: 0 10px 24px rgba(10,120,240,.24); }
.upload-card strong { display: block; font-size: 16px; }
.upload-card span { display: block; margin-top: 6px; color: var(--text-soft); font-size: 13px; }
.compact-hero { min-height: 280px; }
.logic-card { position: relative; z-index: 1; padding: 22px; border-radius: 22px; background: var(--surface-muted); display: grid; grid-template-columns: 34px 1fr; gap: 18px 12px; align-items: start; }
.logic-card > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: var(--blue); background: var(--blue-soft); font-size: 12px; font-weight: 800; }
.logic-card strong { font-size: 14px; }
.logic-card p { margin: 4px 0 0; color: var(--text-soft); font-size: 12px; line-height: 1.45; }

.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: 24px; letter-spacing: -.025em; }
.section-heading p { margin: 6px 0 0; color: var(--text-soft); font-size: 14px; }
.section-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 18px 0 24px; }
.stat-card { padding: 19px 20px; border-radius: var(--radius-lg); background: var(--surface-solid); box-shadow: 0 4px 18px rgba(25,32,45,.055); }
.stat-card span { display: block; color: var(--text-soft); font-size: 12px; }
.stat-card strong { display: block; margin-top: 8px; font-size: 25px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-card small { display: block; margin-top: 5px; color: var(--text-faint); }

.card { min-width: 0; background: var(--surface-solid); border-radius: var(--radius-lg); box-shadow: 0 4px 18px rgba(25,32,45,.055); }
.card + .card { margin-top: 16px; }
.card-header { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.card-header h3 { margin: 0; font-size: 16px; letter-spacing: -.01em; }
.card-header p { margin: 4px 0 0; color: var(--text-soft); font-size: 12px; }
.card-body { padding: 20px; }

.progress-shell { display: flex; align-items: center; gap: 12px; min-width: 210px; }
.progress-track { height: 7px; flex: 1; border-radius: 20px; background: rgba(24,28,35,.07); overflow: hidden; }
.progress-fill { height: 100%; width: 0; border-radius: inherit; background: var(--blue); transition: width 420ms var(--spring); }
.progress-shell span { min-width: 36px; color: var(--text-soft); font-size: 12px; text-align: right; }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.search-field { min-width: 220px; flex: 1; position: relative; }
.search-field input { padding-left: 39px; }
.search-field::before { content: "⌕"; position: absolute; left: 14px; top: 50%; transform: translateY(-52%); color: var(--text-faint); font-size: 19px; pointer-events: none; }

.field, .field-inline { display: grid; gap: 7px; }
.field label, .field-inline label { color: var(--text-soft); font-size: 12px; font-weight: 650; }
input, select, textarea {
  width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 12px;
  outline: none; background: var(--surface-solid); color: var(--text); transition: border 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
input::placeholder, textarea::placeholder { color: #a4a9b2; }
input:focus, select:focus, textarea:focus { border-color: rgba(10,120,240,.7); box-shadow: 0 0 0 4px rgba(10,120,240,.11); }
textarea { min-height: 88px; resize: vertical; }

.segmented { padding: 3px; display: inline-flex; gap: 2px; border-radius: 12px; background: rgba(24,28,35,.06); }
.segmented button { min-height: 34px; padding: 0 12px; border-radius: 9px; background: transparent; color: var(--text-soft); font-size: 12px; font-weight: 650; }
.segmented button.active { background: var(--surface-solid); color: var(--text); box-shadow: 0 2px 8px rgba(25,32,45,.08); }

.route-list { display: grid; gap: 11px; }
.route-card {
  padding: 16px; border: 1px solid transparent; border-radius: 17px; background: var(--surface-solid); box-shadow: 0 3px 14px rgba(25,32,45,.045);
  display: grid; grid-template-columns: minmax(205px, .9fr) minmax(390px, 1.55fr) minmax(145px, .5fr); align-items: center; gap: 18px;
  transition: transform 180ms var(--spring), box-shadow 180ms ease, border-color 180ms ease;
}
.route-card:hover { transform: translateY(-1px); box-shadow: 0 7px 20px rgba(25,32,45,.075); }
.route-card.incomplete { border-color: rgba(232,135,26,.25); }
.route-source { min-width: 0; }
.route-source-line { display: flex; align-items: center; gap: 8px; }
.route-index { width: 25px; height: 25px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; background: var(--surface-muted); color: var(--text-soft); font-size: 11px; font-weight: 700; }
.route-source strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.route-source small { display: block; margin: 8px 0 0 33px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pipe-chips { display: flex; gap: 5px; flex-wrap: wrap; margin: 7px 0 0 33px; }
.chip, .status-pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; white-space: nowrap; font-weight: 650; }
.chip { padding: 4px 8px; background: var(--surface-muted); color: var(--text-soft); font-size: 11px; }
.status-pill { padding: 6px 10px; font-size: 11px; }
.status-pill.blue { color: var(--blue); background: var(--blue-soft); }
.status-pill.green { color: var(--green); background: var(--green-soft); }
.status-pill.orange { color: var(--orange); background: var(--orange-soft); }
.status-pill.red { color: var(--red); background: var(--red-soft); }
.status-pill.purple { color: var(--purple); background: var(--purple-soft); }

.route-points { display: grid; grid-template-columns: 1fr 34px 1fr; align-items: end; gap: 8px; }
.route-points .icon-button { margin-bottom: 4px; }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-muted); color: var(--text-soft); }
.icon-button:hover { color: var(--blue); background: var(--blue-soft); }
.route-depth { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.route-depth-copy span { display: block; color: var(--text-soft); font-size: 11px; }
.route-depth-copy strong { display: block; margin-top: 5px; font-size: 13px; white-space: nowrap; }

.switch { display: inline-flex; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { width: 46px; height: 27px; padding: 2px; border-radius: 99px; background: #d7dbe1; transition: background 220ms ease; }
.switch-thumb { display: block; width: 23px; height: 23px; border-radius: 50%; background: white; box-shadow: 0 2px 5px rgba(0,0,0,.2); transition: transform 230ms var(--spring); }
.switch input:checked + .switch-track { background: var(--green); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(19px); }

.empty-state { padding: 50px 24px; text-align: center; color: var(--text-soft); }
.empty-state-symbol { width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 18px; display: grid; place-items: center; background: var(--surface-muted); font-size: 25px; }
.empty-state h3 { margin: 0; color: var(--text); }
.empty-state p { max-width: 480px; margin: 8px auto 18px; line-height: 1.5; }

.excluded-list { display: grid; gap: 8px; }
.excluded-row { padding: 13px 14px; border-radius: 13px; background: var(--surface-muted); display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; }
.excluded-row strong { font-size: 13px; }
.excluded-row small { display: block; margin-top: 4px; color: var(--text-soft); }

.diameter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 13px; }
.diameter-card { padding: 20px; border-radius: 18px; background: var(--surface-solid); box-shadow: 0 4px 18px rgba(25,32,45,.05); }
.diameter-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.diameter-title span { color: var(--text-soft); font-size: 12px; }
.diameter-card strong { display: block; margin-top: 12px; font-size: 27px; letter-spacing: -.035em; }
.diameter-card dl { margin: 17px 0 0; display: grid; gap: 8px; }
.diameter-card dl div { display: flex; justify-content: space-between; gap: 10px; color: var(--text-soft); font-size: 12px; }
.diameter-card dt, .diameter-card dd { margin: 0; }
.diameter-card dd { color: var(--text); font-variant-numeric: tabular-nums; }

.data-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.data-table th { padding: 0 10px 10px; color: var(--text-soft); font-size: 11px; font-weight: 700; text-align: left; }
.data-table td { padding: 10px; border-top: 1px solid var(--line); vertical-align: middle; }
.data-table td:first-child, .data-table th:first-child { padding-left: 0; }
.data-table td:last-child, .data-table th:last-child { padding-right: 0; }
.data-table input, .data-table select { min-height: 38px; }
.numeric-field { max-width: 92px; }
.unit-field { max-width: 88px; }
.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
.equipment-card { overflow: hidden; }
.equipment-card .table-wrap { min-width: 0; }
.equipment-table { width: 100%; min-width: 0; table-layout: fixed; }
.equipment-table input, .equipment-table select { min-width: 0; max-width: 100%; }
.equipment-table td:nth-child(1), .equipment-table th:nth-child(1) { width: 18%; }
.equipment-table td:nth-child(2), .equipment-table th:nth-child(2) { width: 25%; }
.equipment-table td:nth-child(3), .equipment-table th:nth-child(3) { width: 29%; }
.equipment-table td:nth-child(4), .equipment-table th:nth-child(4) { width: 11%; }
.equipment-table td:nth-child(5), .equipment-table th:nth-child(5) { width: 10%; }
.equipment-table td:nth-child(6), .equipment-table th:nth-child(6) { width: 44px; }
.cell-note { display: block; margin-top: 5px; color: var(--text-faint); font-size: 11px; }
.muted-row { opacity: .62; }
.road-control { min-width: 175px; display: flex; align-items: center; gap: 10px; }
.road-control div span { display: block; color: var(--text-soft); font-size: 11px; }
.road-control div strong { display: block; margin-top: 3px; font-size: 12px; white-space: nowrap; }
.cable-route-table { min-width: 860px; }
.cable-material-table { min-width: 650px; }
.demolition-hero .upload-symbol { width: 68px; font-size: 15px; font-weight: 800; letter-spacing: .05em; }
.demolition-stats .stat-card:last-child strong { font-size: 15px; line-height: 1.35; }
.demolition-table { min-width: 940px; }
.demolition-table td:nth-child(2) { min-width: 330px; }
.demolition-table td:nth-child(6) { min-width: 240px; }
.demolition-table tr { transition: background 160ms ease, opacity 160ms ease; }
.demolition-table tr:not(.selected-row) { opacity: .72; }
.demolition-table tr.selected-row { background: rgba(39,165,104,.045); }
.select-check { position: relative; width: 28px; height: 28px; display: block; cursor: pointer; }
.select-check input { position: absolute; opacity: 0; pointer-events: none; }
.select-check span { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 9px; background: white; color: transparent; font-size: 13px; font-weight: 800; transition: 180ms var(--spring); }
.select-check input:checked + span { border-color: var(--green); background: var(--green); color: white; transform: scale(1.04); }
.selection-footer { padding: 15px 20px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.selection-footer span { color: var(--text-soft); font-size: 13px; }
.selection-footer strong { color: var(--text); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.subsection-title { margin: 26px 0 13px; font-size: 15px; }

.check-list { display: grid; gap: 9px; }
.check-row { padding: 15px 16px; border-radius: 14px; background: var(--surface-muted); display: flex; align-items: center; gap: 12px; }
.check-icon { width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; font-size: 13px; font-weight: 800; }
.check-row.ok .check-icon { color: var(--green); background: var(--green-soft); }
.check-row.wait .check-icon { color: var(--orange); background: var(--orange-soft); }
.check-row strong { display: block; font-size: 13px; }
.check-row span { display: block; margin-top: 3px; color: var(--text-soft); font-size: 12px; }

.issue-list { display: grid; gap: 8px; }
.issue-row { padding: 13px 12px 13px 14px; border-radius: 13px; background: var(--orange-soft); display: flex; align-items: center; gap: 12px; }
.issue-copy { min-width: 0; flex: 1; }
.issue-row strong { color: #a75c08; font-size: 12px; }
.issue-row span { display: block; margin-top: 5px; font-size: 13px; overflow-wrap: anywhere; }
.issue-dismiss { width: 32px; height: 32px; flex: 0 0 32px; border: 0; border-radius: 10px; background: rgba(255,255,255,.58); color: #9a641f; font-size: 20px; line-height: 1; cursor: pointer; transition: background .16s ease, color .16s ease, transform .16s ease; }
.issue-dismiss:hover { background: rgba(255,255,255,.96); color: #c04d00; transform: scale(1.03); }
.danger-soft { color: #9a641f; }
.danger-soft:hover { color: #c04d00; background: var(--orange-soft); }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(290px, .7fr); gap: 16px; }
.next-step { padding: 20px; display: flex; align-items: flex-start; gap: 13px; }
.next-step-number { width: 29px; height: 29px; flex: 0 0 auto; border-radius: 9px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); font-size: 12px; font-weight: 800; }
.next-step strong { font-size: 14px; }
.next-step p { margin: 5px 0 0; color: var(--text-soft); font-size: 12px; line-height: 1.45; }

.toast-region { position: fixed; right: 24px; bottom: 24px; z-index: 100; display: grid; gap: 9px; pointer-events: none; }
.toast { min-width: 280px; max-width: 430px; padding: 14px 16px; border-radius: 14px; background: rgba(28,31,37,.94); color: white; box-shadow: var(--shadow-float); font-size: 13px; animation: toastIn 280ms var(--spring) both; }
.toast.error { background: rgba(173,47,55,.96); }
.toast.out { animation: toastOut 220ms ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(7px) scale(.97); } }

.loading-overlay { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(241,244,248,.72); backdrop-filter: blur(10px); }
.loading-card { padding: 24px 28px; border-radius: 20px; background: var(--surface-solid); box-shadow: var(--shadow-float); text-align: center; }
.spinner { width: 32px; height: 32px; margin: 0 auto 12px; border-radius: 50%; border: 3px solid var(--blue-soft); border-top-color: var(--blue); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.mobile-nav { display: none; }

@media (min-width: 781px) and (max-width: 1180px) {
  .equipment-table { min-width: 860px; table-layout: auto; }
  .equipment-table td:nth-child(1), .equipment-table th:nth-child(1) { min-width: 160px; }
  .equipment-table td:nth-child(2), .equipment-table th:nth-child(2) { min-width: 210px; }
  .equipment-table td:nth-child(3), .equipment-table th:nth-child(3) { min-width: 230px; }
  .equipment-table td:nth-child(4), .equipment-table th:nth-child(4) { min-width: 100px; }
  .equipment-table td:nth-child(5), .equipment-table th:nth-child(5) { min-width: 90px; }
}

@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 214px minmax(0, 1fr); }
  .route-card { grid-template-columns: minmax(180px, .8fr) minmax(340px, 1.4fr); }
  .route-depth { grid-column: 1 / -1; padding-left: 33px; justify-content: flex-start; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  body { padding-bottom: 72px; }
  .app-shell { display: block; }
  .sidebar { display: none; }
  .topbar { height: 70px; padding: 0 16px; }
  .topbar h1 { font-size: 18px; }
  .topbar p, .save-state { display: none; }
  .topbar-actions .secondary-button { width: 42px; padding: 0; font-size: 0; }
  .topbar-actions .secondary-button span { font-size: 22px; }
  .mobile-brand { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 12px; color: white; background: var(--blue); font-size: 12px; font-weight: 800; }
  .content { padding: 22px 14px 44px; }
  .mobile-nav { position: fixed; left: 10px; right: 10px; bottom: 9px; z-index: 60; height: 62px; padding: 5px; display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid rgba(255,255,255,.68); border-radius: 20px; background: rgba(250,251,252,.9); box-shadow: 0 10px 36px rgba(25,32,45,.16); backdrop-filter: blur(22px); }
  .mobile-nav button { border: 0; border-radius: 15px; background: transparent; color: var(--text-soft); display: grid; place-items: center; align-content: center; gap: 1px; }
  .mobile-nav button span { font-size: 18px; line-height: 1; }
  .mobile-nav button small { font-size: 9px; }
  .mobile-nav button.active { color: var(--blue); background: var(--blue-soft); }
  .hero { min-height: auto; padding: 26px 22px; grid-template-columns: 1fr; }
  .hero h2 { font-size: 34px; }
  .upload-card { min-height: 170px; }
  .overview-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-actions { width: 100%; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .search-field { width: 100%; }
  .segmented { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); }
  .route-card { grid-template-columns: 1fr; gap: 14px; padding: 15px; }
  .route-points { grid-template-columns: 1fr 34px 1fr; }
  .route-depth { grid-column: auto; padding-left: 0; justify-content: space-between; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .stats-grid { gap: 9px; }
  .stat-card { padding: 16px; }
  .stat-card strong { font-size: 22px; }
  .data-table { min-width: 830px; }
  .selection-footer { align-items: stretch; flex-direction: column; }
  .toast-region { right: 12px; left: 12px; bottom: 82px; }
  .toast { min-width: 0; max-width: none; }
}

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

/* Technical documentation */
.status-pill.neutral { color: var(--text-soft); background: var(--surface-muted); }
.year-picker { min-height: 42px; padding: 0 10px 0 12px; border-radius: 13px; background: var(--surface-solid); box-shadow: 0 3px 12px rgba(25,32,45,.07); display: inline-flex; align-items: center; gap: 9px; color: var(--text-soft); font-size: 12px; font-weight: 650; white-space: nowrap; }
.year-picker select { width: auto; min-width: 82px; min-height: 34px; padding: 6px 28px 6px 9px; border-radius: 9px; background-color: var(--surface-muted); }
.tech-storage { min-width: 0; padding: 15px 17px; border-radius: 16px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.tech-storage.ok { background: var(--green-soft); }
.tech-storage.error { background: var(--red-soft); }
.tech-storage-icon { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; background: rgba(255,255,255,.72); }
.tech-storage.ok .tech-storage-icon { color: var(--green); }
.tech-storage.error .tech-storage-icon { color: var(--red); }
.tech-storage strong { display: block; font-size: 13px; }
.tech-storage span:not(.status-pill) { display: block; margin-top: 4px; color: var(--text-soft); font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
.technical-card { overflow: hidden; }
.technical-card .card-body { min-width: 0; }
.technical-table { min-width: 860px; table-layout: fixed; }
.technical-table th:nth-child(1), .technical-table td:nth-child(1) { width: 29%; }
.technical-table th:nth-child(2), .technical-table td:nth-child(2) { width: 45%; }
.technical-table th:nth-child(3), .technical-table td:nth-child(3) { width: 11%; }
.technical-table th:nth-child(4), .technical-table td:nth-child(4) { width: 15%; }
.tech-doc-select { width: 100%; min-width: 0; }
.tech-suggestion { display: block; margin-top: 5px; color: var(--orange); font-size: 11px; white-space: normal; }
.tech-exclude { display: inline-flex; align-items: center; gap: 7px; color: var(--text-soft); font-size: 11px; white-space: nowrap; cursor: pointer; }
.tech-exclude input { width: 17px; height: 17px; min-height: 0; padding: 0; accent-color: var(--blue); }

@media (max-width: 780px) {
  .year-picker { width: 100%; justify-content: space-between; }
  .year-picker select { width: 110px; }
  .tech-storage { grid-template-columns: 34px minmax(0, 1fr); }
  .tech-storage > .status-pill { grid-column: 2; justify-self: start; }
  .technical-table { min-width: 760px; }
}

/* Workspace / project manager */
.no-active-project .project-only { display: none !important; }
.nav-separator { height: 1px; margin: 6px 12px; background: var(--line); }
.projects-hero { padding: 26px 0 18px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.projects-hero h2 { margin: 4px 0 7px; font-size: clamp(28px, 3vw, 42px); letter-spacing: -.045em; }
.projects-hero p:not(.eyebrow) { max-width: 690px; margin: 0; color: var(--text-soft); line-height: 1.5; }
.projects-toolbar { margin: 8px 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.segmented-control { padding: 4px; display: inline-flex; gap: 3px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.62); }
.segmented-control button { min-height: 34px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--text-soft); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.segmented-control button span { margin-left: 5px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.segmented-control button.active { background: white; color: var(--text); box-shadow: 0 2px 10px rgba(20,28,42,.07); }
.project-search { width: min(430px, 46vw); min-height: 42px; padding: 0 13px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 13px; background: white; color: var(--text-soft); }
.project-search:focus-within { border-color: rgba(12,116,244,.42); box-shadow: 0 0 0 3px rgba(12,116,244,.08); }
.project-search input { width: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: 13px; }
.project-list { display: grid; gap: 9px; }
.project-card { min-height: 92px; padding: 16px 17px 16px 19px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid rgba(214,219,227,.86); border-radius: 18px; background: rgba(255,255,255,.88); box-shadow: 0 4px 16px rgba(25,32,45,.035); cursor: pointer; transition: 160ms ease; }
.project-card:hover { transform: translateY(-1px); border-color: rgba(12,116,244,.26); box-shadow: 0 8px 26px rgba(25,32,45,.07); }
.project-card.current { border-color: rgba(39,165,104,.27); box-shadow: inset 3px 0 0 rgba(39,165,104,.72), 0 4px 18px rgba(25,32,45,.04); }
.project-card-main { min-width: 0; flex: 1; }
.project-card-title { display: flex; align-items: center; gap: 9px; min-width: 0; }
.project-card-title h3 { max-width: min(720px, 58vw); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.project-so { padding: 4px 7px; flex: 0 0 auto; border-radius: 7px; background: var(--surface-muted); color: var(--text-soft); font-size: 10px; font-weight: 800; }
.project-card-meta { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 7px 18px; color: var(--text-soft); font-size: 11px; }
.project-card-meta b { color: var(--text); font-weight: 650; }
.project-card-side { flex: 0 0 auto; display: grid; grid-template-columns: auto auto; align-items: center; gap: 7px 12px; }
.project-card-side small { color: var(--text-faint); font-size: 10px; text-align: right; }
.project-open-arrow { grid-row: 1 / 3; grid-column: 2; }
.new-project-card, .users-panel { margin-bottom: 16px; }
.new-project-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.new-project-grid .wide { grid-column: span 2; }
.form-actions { margin-top: 17px; display: flex; justify-content: flex-end; gap: 8px; }
.users-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
.user-row { min-height: 58px; padding: 10px 11px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-muted); }
.user-avatar { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 11px; background: white; color: var(--blue); font-size: 13px; font-weight: 800; }
.user-row > div:nth-child(2) { min-width: 0; flex: 1; }
.user-row strong, .user-row small { display: block; }
.user-row strong { font-size: 12px; }
.user-row small { margin-top: 3px; color: var(--text-faint); font-size: 10px; }
.new-user-form { margin-top: 13px; display: grid; grid-template-columns: minmax(220px, 1fr) 180px auto; gap: 8px; }
.project-switcher { max-width: 260px; min-height: 44px; padding: 6px 10px 6px 12px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.76); cursor: pointer; }
.project-switcher-copy { min-width: 0; display: block; text-align: left; }
.project-switcher-copy small { display: block; color: var(--text-faint); font-size: 9px; line-height: 1.1; }
.project-switcher-copy strong { max-width: 200px; display: block; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.user-switcher { max-width: 170px; min-height: 42px; border-radius: 12px; font-size: 11px; }
.save-state.save-error { color: #b34a50; }
.save-state.save-error i { background: #d5555d; }

/* History */
.history-grid { display: grid; grid-template-columns: minmax(300px, .75fr) minmax(420px, 1.25fr); gap: 16px; }
.history-list, .audit-list { display: grid; gap: 8px; }
.version-row { padding: 12px 13px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-radius: 13px; background: var(--surface-muted); }
.version-row strong, .version-row span, .version-row small { display: block; }
.version-row strong { font-size: 12px; }
.version-row span { margin-top: 3px; font-size: 12px; }
.version-row small { margin-top: 4px; color: var(--text-faint); font-size: 10px; }
.audit-row { position: relative; padding: 8px 6px 8px 24px; display: flex; gap: 10px; }
.audit-row:not(:last-child)::after { content: ""; position: absolute; left: 10px; top: 25px; bottom: -9px; width: 1px; background: var(--line); }
.audit-dot { position: absolute; left: 5px; top: 12px; width: 11px; height: 11px; border: 3px solid white; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 1px rgba(12,116,244,.2); }
.audit-row strong { display: block; font-size: 12px; line-height: 1.45; }
.audit-row small { display: block; margin-top: 4px; color: var(--text-faint); font-size: 10px; }
.empty-inline { padding: 18px; color: var(--text-soft); text-align: center; font-size: 12px; }

/* Quick project switch */
.command-palette { position: fixed; inset: 0; z-index: 150; padding-top: min(16vh, 150px); background: rgba(20,25,34,.28); backdrop-filter: blur(8px); }
.command-card { width: min(650px, calc(100vw - 32px)); max-height: min(600px, 72vh); margin: 0 auto; overflow: hidden; border: 1px solid rgba(255,255,255,.66); border-radius: 20px; background: rgba(251,252,253,.97); box-shadow: 0 28px 90px rgba(23,28,38,.25); }
.command-input-row { min-height: 62px; padding: 0 17px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.command-input-row input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; }
kbd { padding: 3px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: white; color: var(--text-faint); font: inherit; font-size: 9px; }
.command-results { max-height: 500px; padding: 8px; overflow: auto; }
.command-project { width: 100%; min-height: 58px; padding: 10px 11px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border: 0; border-radius: 12px; background: transparent; text-align: left; cursor: pointer; }
.command-project:hover, .command-project:focus { background: var(--blue-soft); outline: 0; }
.command-project strong, .command-project span { display: block; }
.command-project strong { font-size: 12px; }
.command-project span, .command-project small { margin-top: 4px; color: var(--text-soft); font-size: 10px; }
.command-empty { padding: 28px; color: var(--text-soft); text-align: center; font-size: 12px; }

/* Inventory -> equipment import */
.modal-layer { position: fixed; inset: 0; z-index: 140; display: grid; place-items: center; padding: 24px; background: rgba(20,25,34,.30); backdrop-filter: blur(8px); }
.modal-card { width: min(790px, 100%); max-height: min(760px, calc(100vh - 48px)); overflow: auto; border-radius: 22px; background: white; box-shadow: 0 28px 90px rgba(23,28,38,.25); }
.modal-header { padding: 22px 23px 15px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 3px 0 5px; font-size: 22px; letter-spacing: -.035em; }
.modal-header p:not(.eyebrow) { margin: 0; color: var(--text-soft); font-size: 12px; }
.inventory-import-preview, .comparison-list { padding: 14px 23px; display: grid; gap: 6px; }
.inventory-import-preview > div { min-height: 42px; display: grid; grid-template-columns: minmax(170px, .8fr) minmax(220px, 1.2fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.inventory-import-preview strong, .inventory-import-preview span, .inventory-import-preview b { font-size: 11px; }
.inventory-import-preview span { color: var(--text-soft); }
.modal-actions { padding: 15px 23px 18px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); }
.modal-note { margin: -7px 23px 20px; color: var(--text-faint); font-size: 10px; line-height: 1.45; }
.comparison-summary { padding: 14px 23px 4px; display: flex; flex-wrap: wrap; gap: 7px; }
.compare-row { min-height: 46px; padding: 7px 0; display: grid; grid-template-columns: 25px minmax(0, 1fr) auto; align-items: center; gap: 9px; border-bottom: 1px solid var(--line); }
.compare-mark { width: 21px; height: 21px; display: grid; place-items: center; border-radius: 7px; background: var(--surface-muted); font-size: 11px; font-weight: 800; }
.compare-mark.plus { color: var(--green); background: var(--green-soft); }
.compare-mark.minus { color: #9a6266; }
.compare-mark.change { color: var(--orange); background: var(--orange-soft); }
.compare-row strong, .compare-row small { display: block; }
.compare-row strong { font-size: 11px; }
.compare-row small { margin-top: 3px; color: var(--text-faint); font-size: 10px; }
.compare-row b { font-size: 11px; }

@media (max-width: 1180px) {
  .project-switcher { max-width: 190px; }
  .project-switcher-copy strong { max-width: 130px; }
  .user-switcher { max-width: 130px; }
  .new-project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-grid { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .mobile-nav { grid-template-columns: repeat(6, 1fr); }
  .projects-hero, .projects-toolbar { align-items: stretch; flex-direction: column; }
  .project-search { width: 100%; }
  .project-card { align-items: flex-start; }
  .project-card-title { flex-wrap: wrap; }
  .project-card-title h3 { max-width: 100%; white-space: normal; }
  .project-card-meta { display: grid; gap: 4px; }
  .project-card-side { grid-template-columns: 1fr; justify-items: end; }
  .project-open-arrow { display: none; }
  .new-project-grid { grid-template-columns: 1fr; }
  .new-project-grid .wide { grid-column: auto; }
  .new-user-form { grid-template-columns: 1fr; }
  .modal-layer { padding: 10px; }
  .modal-card { max-height: calc(100vh - 20px); }
  .inventory-import-preview > div { grid-template-columns: 1fr auto; }
  .inventory-import-preview span { grid-column: 1 / -1; }
}

[hidden] { display: none !important; }

/* Ver 3.1 — project PDF and user management */
.danger-icon:hover { color: #d93025; background: #fdebea; }
.project-pdf-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-muted); }
.project-pdf-row > div:first-child { min-width: 0; }
.project-pdf-row strong, .project-pdf-row small { display: block; }
.project-pdf-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-pdf-row small { margin-top: 4px; color: var(--text-faint); }
.muted-inline { color: var(--text-faint); font-weight: 400; }
.new-project-grid input[type="file"] { min-height: 42px; padding: 9px 10px; background: var(--surface-muted); border: 1px solid var(--line); border-radius: 12px; }
@media (max-width: 760px) {
  .project-pdf-row { align-items: stretch; flex-direction: column; }
  .project-pdf-row .section-actions { justify-content: flex-start; }
}

/* Ver 3.2 — cleaner project creation, PDF controls and history */
.new-project-files { margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.start-file-card { min-height: 78px; padding: 12px 13px; display: flex; align-items: center; gap: 12px; border: 1px dashed rgba(164,173,187,.7); border-radius: 15px; background: rgba(248,249,251,.8); }
.start-file-card.selected { border-style: solid; border-color: rgba(12,116,244,.22); background: rgba(12,116,244,.035); }
.start-file-icon { width: 46px; height: 46px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; background: #fff0ee; color: #d84c3f; font-size: 10px; font-weight: 900; letter-spacing: .04em; }
.start-file-icon.excel { background: #eaf7ef; color: #25834e; }
.start-file-copy { min-width: 0; flex: 1; }
.start-file-copy strong, .start-file-copy span, .start-file-copy small { display: block; }
.start-file-copy strong { font-size: 12px; }
.start-file-copy span { margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-soft); font-size: 10px; }
.start-file-copy small { margin-top: 5px; color: #278051; font-size: 9px; line-height: 1.35; }

.project-file-card, .project-file-empty { min-height: 72px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-muted); }
.project-file-badge { width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 11px; background: #fff0ee; color: #d84c3f; font-size: 10px; font-weight: 900; }
.project-file-copy, .project-file-empty > div { min-width: 0; flex: 1; }
.project-file-copy strong, .project-file-copy small, .project-file-empty strong, .project-file-empty small { display: block; }
.project-file-copy strong, .project-file-empty strong { font-size: 12px; }
.project-file-copy small, .project-file-empty small { margin-top: 4px; color: var(--text-faint); font-size: 10px; line-height: 1.4; }
.project-file-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-file-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; }
.project-file-empty { border-style: dashed; background: rgba(248,249,251,.72); }

.simplified-history .history-more { width: 100%; margin-top: 4px; }

@media (max-width: 900px) {
  .new-project-files { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .start-file-card, .project-file-card, .project-file-empty { align-items: stretch; flex-wrap: wrap; }
  .start-file-copy, .project-file-copy, .project-file-empty > div { flex-basis: calc(100% - 60px); }
  .project-file-actions { width: 100%; justify-content: flex-start; }
  .project-file-empty > .primary-button { margin-left: 56px; }
}

/* Ver 3.3 — workspace UX pass */
.project-search {
  position: relative;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.project-search:focus-within {
  border-color: rgba(10,120,240,.48);
  box-shadow: 0 0 0 3px rgba(10,120,240,.075);
}
.project-search input,
.project-search input:focus {
  border: 0;
  outline: 0;
  box-shadow: none;
  background: transparent;
}

.project-switcher {
  width: clamp(285px, 24vw, 390px);
  max-width: 390px;
  min-height: 58px;
  padding: 8px 11px 8px 14px;
  gap: 12px;
  border-radius: 15px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 3px 14px rgba(25,32,45,.055);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms var(--spring);
}
.project-switcher:hover {
  border-color: rgba(10,120,240,.25);
  box-shadow: 0 7px 20px rgba(25,32,45,.085);
}
.project-switcher:active { transform: scale(.985); }
.project-switcher-copy { flex: 1; }
.project-switcher-copy small { font-size: 9px; letter-spacing: .015em; }
.project-switcher-copy strong {
  max-width: none;
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.2;
}
.project-switcher-copy > span {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-soft);
  font-size: 9px;
  line-height: 1.2;
}
.project-switcher-chevron {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--surface-muted);
  color: var(--text-soft);
  font-size: 12px;
}

.routes-heading-actions { display: flex; align-items: center; gap: 14px; }
.routes-heading-actions .quiet-button { min-height: 38px; padding-inline: 13px; font-size: 11px; }

.project-card.possible-duplicate:not(.current) {
  border-color: rgba(232,135,26,.25);
}
.duplicate-project-modal { width: min(580px, 100%); }
.duplicate-project-preview {
  margin: 18px 22px 2px;
  padding: 16px 17px;
  border: 1px solid rgba(232,135,26,.20);
  border-radius: 15px;
  background: var(--orange-soft);
}
.duplicate-project-preview strong,
.duplicate-project-preview span,
.duplicate-project-preview small { display: block; }
.duplicate-project-preview strong { font-size: 14px; }
.duplicate-project-preview span { margin-top: 6px; font-size: 11px; }
.duplicate-project-preview small { margin-top: 6px; color: var(--text-soft); font-size: 10px; }

.custom-year-picker {
  position: relative;
  padding: 4px 5px 4px 12px;
  gap: 8px;
  overflow: visible;
}
.year-picker-button {
  min-width: 82px;
  min-height: 34px;
  padding: 0 9px 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: 9px;
  background: var(--surface-muted);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  transition: background 150ms ease, box-shadow 150ms ease;
}
.year-picker-button:hover,
.year-picker-button[aria-expanded="true"] { background: #eef2f7; }
.year-picker-button[aria-expanded="true"] { box-shadow: inset 0 0 0 1px rgba(10,120,240,.15); }
.year-picker-button > span { color: var(--text-faint); font-size: 10px; }
.year-picker-menu {
  position: absolute;
  z-index: 60;
  top: calc(100% + 7px);
  right: 0;
  width: 112px;
  padding: 5px;
  border: 1px solid rgba(24,28,35,.08);
  border-radius: 12px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 14px 38px rgba(24,31,43,.16), 0 3px 10px rgba(24,31,43,.06);
  backdrop-filter: blur(16px);
}
.year-picker-menu button {
  width: 100%;
  min-height: 34px;
  padding: 0 9px;
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}
.year-picker-menu button:hover { background: var(--surface-muted); }
.year-picker-menu button.active { color: var(--blue); background: var(--blue-soft); }
.year-picker-menu button span { text-align: center; font-size: 10px; }

@media (max-width: 1320px) {
  .project-switcher { width: 285px; max-width: 285px; }
  .project-switcher-copy strong { font-size: 12px; }
}
@media (max-width: 1180px) {
  .project-switcher { width: 220px; max-width: 220px; min-height: 52px; }
  .project-switcher-copy strong { max-width: 165px; }
  .project-switcher-copy > span { max-width: 165px; }
}
@media (max-width: 900px) {
  .routes-heading-actions { width: 100%; align-items: stretch; flex-direction: column; }
  .section-heading:has(.routes-heading-actions) { align-items: stretch; flex-direction: column; }
}
.empty-state .hero-actions { justify-content: center; }

/* ODD ↔ construction designation mapping */
.designation-panel { border: 1px solid var(--line); border-radius: 16px; background: rgba(248,249,251,.78); overflow: hidden; }
.designation-intro { padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.designation-intro > div { min-width: 0; }
.designation-intro strong, .designation-intro small { display: block; }
.designation-intro strong { font-size: 13px; }
.designation-intro small { margin-top: 4px; color: var(--text-faint); font-size: 11px; line-height: 1.45; }
.designation-groups { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
.designation-group { padding: 15px 16px 16px; min-width: 0; }
.designation-group + .designation-group { border-left: 1px solid var(--line); }
.designation-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.designation-head > div:first-child { min-width: 0; }
.designation-head strong, .designation-head small { display: block; }
.designation-head strong { font-size: 12px; }
.designation-head small { margin-top: 4px; color: var(--text-faint); font-size: 10px; line-height: 1.4; }
.mapping-segmented { flex: 0 0 auto; }
.mapping-segmented button { white-space: nowrap; }
.mapping-list { margin-top: 12px; display: grid; gap: 8px; }
.mapping-row { display: grid; grid-template-columns: minmax(0,1fr) 24px minmax(0,1fr) 32px; gap: 7px; align-items: center; }
.mapping-row input { min-width: 0; height: 38px; padding: 0 10px; border-radius: 10px; font-size: 12px; }
.mapping-arrow { text-align: center; color: var(--text-faint); font-weight: 800; }
.mapping-remove { width: 32px; height: 32px; }
.mapping-empty { margin-top: 12px; padding: 11px 12px; border: 1px dashed var(--line); border-radius: 11px; color: var(--text-faint); font-size: 11px; background: rgba(255,255,255,.54); }
.mapping-footer { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mapping-footer small { color: var(--text-faint); font-size: 10px; }
.mapping-footer b { color: var(--text-soft); }

@media (max-width: 900px) {
  .designation-groups { grid-template-columns: 1fr; }
  .designation-group + .designation-group { border-left: 0; border-top: 1px solid var(--line); }
  .designation-head { flex-direction: column; }
  .mapping-segmented { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
}

/* Equipment presets / inventory address source */
.equipment-presets { margin: -6px 0 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: var(--text-faint); font-size: 11px; }
.chip-button { min-height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--text-soft); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.chip-button:hover { border-color: rgba(10,120,240,.28); background: var(--blue-soft); color: var(--blue); }
.source-field { align-self: stretch; }
.read-only-source { min-height: 42px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-muted); color: var(--text-soft); font-size: 12px; }
.read-only-source small { display: block; margin-top: 4px; color: var(--text-faint); font-size: 10px; }

/* IPD cable journal */
.ipd-summary-card .card-header { align-items: center; }
.ipd-summary-card .section-actions { flex-wrap: wrap; justify-content: flex-end; }

/* Controller communication review */
.controller-panel { margin-top: 2px; }
.controller-direction-table { min-width: 920px; }
.controller-direction-table input,
.controller-direction-table select { width: 100%; min-width: 0; height: 36px; padding: 0 9px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font: inherit; font-size: 11px; color: var(--text); }
.controller-direction-table .compact-input { width: 58px; text-align: center; }
.controller-direction-table small.cell-note { display: block; margin-top: 4px; color: var(--text-faint); font-size: 9px; }
.controller-issues { margin-top: 10px; display: grid; gap: 4px; color: #9a5a00; }
.controller-issues small { font-size: 10px; }
.controller-panel .designation-intro span { display: block; margin-top: 4px; color: var(--text-faint); font-size: 11px; line-height: 1.4; }

@media (max-width: 900px) {
  .equipment-presets { align-items: flex-start; }
  .controller-panel .designation-intro { align-items: stretch; flex-direction: column; }
  .controller-panel .mapping-footer { align-items: stretch; flex-direction: column; }
}

/* Simplified controller communication workspace */
.controller-card { overflow: hidden; }
.controller-card-head { align-items: center; }
.controller-card-head p { max-width: 780px; }
.controller-help { margin-bottom: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(248,249,251,.9); }
.controller-help strong, .controller-help span { display: block; }
.controller-help strong { font-size: 12px; }
.controller-help span { margin-top: 4px; color: var(--text-faint); font-size: 11px; line-height: 1.45; }
.controller-direction-table { min-width: 860px; }
.controller-direction-table th:first-child { width: 108px; }
.controller-direction-table th:last-child { width: 46px; }
.controller-footer { margin-top: 14px; }
@media (max-width: 760px) {
  .controller-card-head { align-items: stretch; flex-direction: column; }
  .controller-card-head .secondary-button { width: 100%; }
  .controller-footer { align-items: stretch; flex-direction: column; }
}

/* Shared accounts */
.account-cluster{display:flex;align-items:center;gap:8px}.account-badge{display:grid;gap:1px;min-width:150px;padding:7px 10px;border:1px solid var(--line,#dfe5ea);border-radius:10px;background:#fff}.account-badge strong{font-size:12px;line-height:1.2}.account-badge small{font-size:10px;color:#71808d}.auth-screen{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;padding:24px;background:linear-gradient(145deg,#eef2f5,#f8fafb)}.auth-screen[hidden]{display:none}.auth-card{width:min(420px,100%);background:#fff;border:1px solid #dfe6eb;border-radius:20px;padding:28px;box-shadow:0 24px 70px rgba(26,45,58,.16)}.auth-brand{display:flex;align-items:center;gap:12px;margin-bottom:26px}.auth-brand .brand-mark{width:42px;height:42px}.auth-brand strong,.auth-brand span{display:block}.auth-brand span{font-size:12px;color:#758491;margin-top:2px}.auth-card h2{margin:0 0 7px;font-size:24px}.auth-card>p{margin:0 0 22px;color:#6f7f8c;font-size:13px;line-height:1.5}.auth-card form{display:grid;gap:14px}.auth-card label{display:grid;gap:6px;font-size:12px;font-weight:650;color:#445968}.auth-card input,.auth-card select{width:100%;height:44px;border:1px solid #cbd6de;border-radius:10px;padding:0 12px;background:#fff;color:#172a38;font:inherit;font-size:14px}.auth-card input:focus,.auth-card select:focus{outline:3px solid #dceff6;border-color:#6aa9bc}.auth-submit{width:100%;min-height:44px;margin-top:3px}.auth-error{padding:10px 12px;border:1px solid #efc0bd;border-radius:9px;background:#fff2f1;color:#9d3f37;font-size:12px;line-height:1.45}.user-row-main{flex:1;min-width:0}.user-row-actions{display:flex;align-items:center;gap:6px}.user-row.user-inactive{opacity:.58;background:#f6f7f8}.quiet-button.compact{padding:5px 8px;font-size:11px}.muted-note{margin:12px 0 0;color:#7b8994;font-size:11px;line-height:1.45}.new-user-form{grid-template-columns:minmax(140px,.8fr) minmax(180px,1.2fr) 150px auto!important}@media(max-width:760px){.account-badge{min-width:0}.account-badge small{display:none}.account-cluster .text-button{padding-inline:5px}.new-user-form{grid-template-columns:1fr!important}}

/* Ready bundle editor */
.bundle-file-card { margin-bottom: 16px; }
.bundle-editor-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 18px; }
.bundle-editor-grid .field { display:flex; flex-direction:column; gap:7px; }
.bundle-editor-grid .field span { font-size:12px; font-weight:700; color:#68707d; }
.bundle-editor-grid input,
.bundle-editor-grid select { width:100%; min-height:42px; border:1px solid #d9dee6; border-radius:11px; padding:9px 11px; background:#fff; font:inherit; }
.bundle-check { grid-column:1 / -1; display:flex; align-items:center; gap:9px; padding:10px 12px; border-radius:11px; background:#f6f7f9; }
.bundle-check input { width:17px; height:17px; }
@media (max-width: 820px) { .bundle-editor-grid { grid-template-columns:1fr; } }
.bundle-detection-note { grid-column:1 / -1; display:flex; flex-direction:column; gap:3px; padding:10px 12px; border-radius:11px; font-size:12px; line-height:1.35; }
.bundle-detection-note strong { font-size:12px; }
.bundle-detection-note span { color:#68707d; }
.bundle-detection-note.success { background:#effaf3; border:1px solid #cfead8; }
.bundle-detection-note.warning { background:#fff7e8; border:1px solid #f2d39a; }
.bundle-detection-note.neutral { background:#f6f7f9; border:1px solid #e2e5ea; }


/* Unified rounded dropdowns. The native select stays in the DOM for the
   existing application logic; the visible menu is rendered by app.js. */
.native-pretty-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
}
.pretty-select-button {
  width: 100%; min-height: 42px; padding: 9px 42px 9px 13px;
  position: relative; display: flex; align-items: center; text-align: left;
  border: 1px solid var(--line-strong); border-radius: 13px;
  outline: none; background: var(--surface-solid); color: var(--text);
  cursor: pointer; transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, transform 120ms var(--spring);
}
.pretty-select-button:hover { background: #fbfcfe; border-color: rgba(24,28,35,.22); }
.pretty-select-button:focus-visible, .pretty-select-button.open {
  border-color: rgba(10,120,240,.72); box-shadow: 0 0 0 4px rgba(10,120,240,.11);
}
.pretty-select-button:active { transform: scale(.995); }
.pretty-select-button:disabled { opacity: .52; cursor: default; background: var(--surface-muted); }
.pretty-select-button.is-placeholder .pretty-select-label { color: var(--text-faint); }
.pretty-select-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pretty-select-chevron {
  position: absolute; right: 14px; top: 50%; width: 8px; height: 8px;
  border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor;
  color: #6f7681; transform: translateY(-68%) rotate(45deg); transition: transform 160ms var(--ease);
}
.pretty-select-button.open .pretty-select-chevron { transform: translateY(-28%) rotate(225deg); }
.pretty-select-menu {
  position: fixed; z-index: 10020; padding: 6px; overflow-y: auto;
  border: 1px solid rgba(24,28,35,.1); border-radius: 16px;
  background: rgba(255,255,255,.98); box-shadow: 0 20px 52px rgba(25,32,45,.18), 0 4px 12px rgba(25,32,45,.08);
  backdrop-filter: blur(20px) saturate(140%);
  animation: prettyMenuIn 150ms var(--ease) both;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  touch-action: pan-y;
}
@keyframes prettyMenuIn { from { opacity: 0; transform: translateY(-4px) scale(.985); } to { opacity: 1; transform: none; } }
.pretty-select-option {
  width: 100%; min-height: 38px; padding: 8px 11px; border: 0; border-radius: 10px;
  display: flex; align-items: center; background: transparent; color: var(--text); text-align: left;
  cursor: pointer; font: inherit; font-size: 13px; transition: background 120ms ease, color 120ms ease;
}
.pretty-select-option:hover { background: rgba(10,120,240,.075); }
.pretty-select-option.selected { background: var(--blue-soft); color: #0665ca; font-weight: 700; }
.pretty-select-option:disabled { opacity: .45; cursor: default; }
.pretty-select-menu::-webkit-scrollbar { width: 9px; }
.pretty-select-menu::-webkit-scrollbar-thumb { background: rgba(24,28,35,.16); border: 3px solid transparent; background-clip: padding-box; border-radius: 12px; }
.tool-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.controller-direction-table .pretty-select-button { min-height: 36px; padding-top: 6px; padding-bottom: 6px; border-radius: 9px; font-size: 11px; }
.year-picker .pretty-select-button { min-width: 82px; min-height: 34px; padding: 5px 34px 5px 10px; border-radius: 9px; background: var(--surface-muted); }
.auth-card .pretty-select-button { min-height: 44px; border-color: #cbd6de; border-radius: 10px; }
.bundle-editor-grid .pretty-select-button { min-height: 42px; border-color: #d9dee6; border-radius: 11px; }

/* Category separators for grouped selects (primarily Technical Documentation). */
.pretty-select-group {
  padding: 10px 11px 5px;
  margin: 4px 2px 2px;
  color: #7b8491;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-top: 1px solid rgba(24,28,35,.07);
  user-select: none;
  pointer-events: none;
}
.pretty-select-group:first-child {
  margin-top: 0;
  border-top: 0;
  padding-top: 6px;
}
.tech-doc-select + .pretty-select-button + .pretty-select-menu .pretty-select-group { display: block; }
