:root {
  --bg: #eef2f7;
  --paper: #ffffff;
  --ink: #182b43;
  --muted: #52657a;
  --line: #d5dfea;
  --primary: #1859d0;
  --primary-dark: #1245a6;
  --cyan: #56dbef;
  --navy: #101d30;
  --navy-soft: #192c45;
  --radius: 6px;
  --shadow: 0 4px 14px #172b4210;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  font-size: 16px;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; border: 0; }
button:disabled { opacity: .65; cursor: wait; }
a { color: inherit; text-decoration: none; }
h1, h2, p { margin: 0; }
h1 { font-size: 36px; line-height: 1.2; letter-spacing: -1.1px; font-weight: 720; }
h2 { font-size: 21px; line-height: 1.35; letter-spacing: -.4px; font-weight: 680; }
p { line-height: 1.65; }
[hidden] { display: none !important; }
.text-muted { color: var(--muted); }

input, select, textarea {
  width: 100%; min-width: 0; min-height: 48px;
  border: 1px solid #aebed0; border-radius: 5px;
  padding: 12px 14px; background: #fff; color: var(--ink);
  font-size: 16px; line-height: 1.4;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #65788d; opacity: 1; }
input:focus, select:focus, textarea:focus {
  outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px #1859d024;
}
button:focus-visible, a:focus-visible { outline: 3px solid #258bdb; outline-offset: 4px; }
.icon {
  width: 22px; height: 22px; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.svg-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap;
}
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 17px; border: 1px solid transparent;
  border-radius: 5px; font-size: 15px; line-height: 1.3; font-weight: 650;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.button .icon { width: 20px; height: 20px; }
.primary { background: var(--primary); color: #fff; box-shadow: 0 2px 5px #1859d020; }
.primary:hover { background: var(--primary-dark); }
.secondary { color: #27486d; background: #fff; border-color: #bdcbdc; }
.secondary:hover { background: #edf4ff; border-color: #7196c5; }
.small { min-height: 44px; padding: 9px 13px; }
.icon-button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex-shrink: 0;
  color: #48617d; background: transparent; border-radius: 5px;
}
.icon-button:hover { background: #e6effa; color: var(--primary); }
.eyebrow {
  margin-bottom: 12px; color: #3f668f; font: 650 13px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 1.3px;
}
.eyebrow.light { color: #84d8eb; }

/* The navigation stays visually distinct from the working area. */
.brand { display: flex; align-items: center; gap: 12px; font-size: 30px; line-height: 1; font-weight: 720; letter-spacing: -.8px; }
.brand-mark {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 44px; height: 48px; color: var(--cyan); background: #16374e;
  border: 1px solid #2e627e; border-radius: 6px 6px 6px 0;
}
.brand-mark svg { width: 30px; height: 30px; }
.brand-sub { display: block; font-size: 13px; font-weight: 550; line-height: 1; letter-spacing: 1.7px; margin-top: 8px; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 30; width: 256px;
  display: flex; flex-direction: column; padding: 30px 16px 0;
  color: #e3edf9; background: var(--navy); border-right: 1px solid #263a53;
  overflow-y: auto;
}
.sidebar .brand { padding-left: 8px; }
.workspace-label {
  display: flex; align-items: center; gap: 10px; margin: 28px 0 26px; padding: 18px 5px;
  border-top: 1px solid #2b3b51; border-bottom: 1px solid #2b3b51;
}
.workspace-icon {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 36px; height: 38px; background: #203650; color: #83dcf1;
  border: 1px solid #385975; border-radius: 4px; font-size: 13px; font-weight: 650;
}
.workspace-label strong { display: block; font-size: 14px; font-weight: 600; }
.workspace-label div > span { display: block; color: #afc0d4; font-size: 13px; line-height: 1.5; margin-top: 5px; }
.nav-caption { padding-left: 12px; color: #9cb2cc; font-size: 13px; font-weight: 650; letter-spacing: 1px; margin-bottom: 14px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px;
  min-height: 50px; padding: 12px; margin-bottom: 8px;
  border: 1px solid transparent; border-radius: 5px;
  color: #c1d0e3; font-size: 16px; font-weight: 500; line-height: 1.3;
}
.nav-item .icon { width: 21px; height: 21px; }
.nav-item:hover { background: #1b304a; color: #fff; }
.nav-item.active { color: #fff; background: #174e9f; border-color: #2e72c9; font-weight: 650; }
.nav-item.active::before { content: ""; position: absolute; left: -1px; top: 11px; bottom: 11px; width: 3px; background: var(--cyan); }
.nav-count { margin-left: auto; min-width: 26px; padding: 3px 6px; font-size: 13px; text-align: center; color: #e4f3ff; background: #294362; border-radius: 3px; }
.sidebar-bottom { margin-top: auto; padding-top: 32px; }
.sidebar-note { padding: 17px 13px; margin-bottom: 21px; background: #15273e; border: 1px solid #2b415b; border-radius: 5px; }
.sidebar-note strong { font-size: 14px; font-weight: 650; }
.note-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 2px; background: #52cfe6; box-shadow: 0 0 10px #52cfe630; }
.sidebar-note p { margin-top: 8px; font-size: 13px; line-height: 1.65; color: #b1c2d9; }
.sidebar-note > span:last-child { display: block; margin-top: 14px; font: 13px/1.4 ui-monospace, Consolas, monospace; color: #91abc7; }
.user-card { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; align-items: center; margin-top: 18px; padding: 22px 6px; border-top: 1px solid #2b3b51; }
.avatar { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: #9de2f0; background: #243e56; border: 1px solid #3d5d76; border-radius: 5px; font-size: 14px; font-weight: 650; }
.user-card > div { min-width: 0; }
.user-card strong { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 14px; line-height: 1.3; }
.user-card div > span { display: block; color: #a5bad2; font-size: 13px; margin-top: 5px; }
.logout-button { display: flex; align-items: center; justify-content: center; gap: 9px; grid-column: 1 / -1; width: 100%; min-height: 44px; margin-top: 5px; border: 1px solid #3a506a; border-radius: 4px; color: #c2d4e8; background: transparent; font-size: 14px; }
.logout-button:hover { color: #fff; background: #243b57; }
.logout-button .icon { width: 19px; height: 19px; }

/* Header, hierarchy and overview. */
.app-shell { display: flex; flex-direction: column; min-height: 100vh; min-width: 0; margin-left: 256px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 80px; padding: 18px 32px; background: #fff; border-bottom: 1px solid var(--line); }
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.breadcrumb { display: flex; align-items: center; gap: 14px; color: #65788e; font-size: 14px; }
.breadcrumb-separator { color: #536a82; }
.breadcrumb strong { font-weight: 650; color: #263d58; }
.topbar-right { display: flex; align-items: center; gap: 18px; color: #536a82; font-size: 13px; }
.connection-status { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.connection-status > span { width: 7px; height: 7px; display: block; background: #889cb4; border-radius: 2px; }
.connection-status.connected > span { background: #18744a; box-shadow: 0 0 0 3px #18744a12; }
.connection-status.disconnected > span { background: #b55c15; }
.topbar-divider { height: 20px; width: 1px; background: var(--line); }
.topbar-date { text-transform: capitalize; white-space: nowrap; }
.main-content { width: 100%; max-width: 1800px; min-width: 0; flex: 1; margin: 0 auto; padding: 36px 32px 20px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 26px; margin-bottom: 28px; }
.page-heading > div { min-width: 0; }
.page-heading h1 + p { color: var(--muted); font-size: 15px; margin-top: 12px; }
.page-heading .button { flex-shrink: 0; }
.heading-dot { color: var(--primary); }
.demo-notice { display: flex; align-items: center; gap: 14px; padding: 15px 17px; margin-bottom: 26px; border: 1px solid #bed4ef; border-left: 3px solid #2c79d7; border-radius: 4px; color: #385f8b; background: #e5effb; }
.demo-notice p { font-size: 13px; line-height: 1.6; }
.demo-badge { padding: 5px 8px; color: #24569a; background: #d3e5fb; border: 1px solid #adcaec; border-radius: 3px; font: 650 13px/1.3 ui-monospace, Consolas, monospace; white-space: nowrap; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 28px; }
.stat-card { display: block; min-width: 0; padding: 22px; text-align: left; color: var(--ink); background: #fff; border: 1px solid #cbd8e6; border-top: 3px solid #7296c1; border-radius: 5px; box-shadow: var(--shadow); transition: border-color .15s, background .15s, box-shadow .15s; }
.stat-card:hover { border-color: #518cd7; background: #f8fbff; box-shadow: 0 4px 18px #1859d018; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stat-top > span:first-child { font-size: 15px; color: #465d76; font-weight: 600; line-height: 1.4; }
.stat-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 36px; height: 36px; border: 1px solid #00000008; border-radius: 5px; }
.stat-icon .icon { width: 20px; height: 20px; }
.amber { background: #fff2d8; color: #8c5703; }
.blue { background: #e5efff; color: #235eaf; }
.green { background: #e3f4eb; color: #26754b; }
.neutral { background: #e9eef7; color: #506987; }
.stat-card > strong { display: block; margin: 20px 0 14px; font: 650 44px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: -1.5px; }
.stat-foot { display: block; color: #546b84; font-size: 13px; line-height: 1.5; }
.stat-foot::after { content: " ↗"; color: var(--primary); font-size: 16px; }
.overview-columns { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 24px; align-items: start; }
.panel { min-width: 0; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 24px; }
.panel-heading p { color: var(--muted); font-size: 14px; margin-top: 7px; }
.text-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; color: #205aaa; font-size: 14px; font-weight: 650; white-space: nowrap; }
.text-link:hover { color: #113f85; text-decoration: underline; }
.text-link .icon { width: 18px; height: 18px; }
.table-scroll { position: relative; max-width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { padding: 15px 16px; border-top: 1px solid #dce5ef; border-bottom: 1px solid #d5e0ed; background: #f0f4f9; color: #4b6380; font-size: 13px; font-weight: 650; line-height: 1.5; letter-spacing: .3px; text-transform: uppercase; }
.data-table td { padding: 20px 16px; border-bottom: 1px solid #e1e8f0; color: #4c627b; font-size: 14px; line-height: 1.5; }
.data-table th:first-child, .data-table td:first-child { padding-left: 24px; }
.data-table th:last-child, .data-table td:last-child { padding-right: 24px; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #f7faff; }
.intervention-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.intervention-symbol { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 38px; height: 40px; color: #55769b; background: #edf3fa; border: 1px solid #d5e1f0; border-radius: 5px; }
.intervention-symbol .icon { width: 21px; height: 21px; }
.intervention-info { min-width: 0; }
.intervention-info strong { display: block; min-width: 140px; color: #253e5b; font-size: 16px; font-weight: 650; line-height: 1.5; overflow-wrap: anywhere; }
.intervention-info span { display: block; margin-top: 5px; color: #5e728b; font-size: 14px; line-height: 1.5; }
.table-date { color: #455f7c !important; font-size: 14px !important; }
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid transparent; border-radius: 4px; font-size: 13px; font-weight: 650; line-height: 1.4; white-space: nowrap; }
.badge::before { content: ""; width: 5px; height: 5px; background: currentColor; border-radius: 1px; flex-shrink: 0; }
.badge.a_planifier { color: #865008; background: #fff3d8; border-color: #ead19b; }
.badge.en_cours { color: #1857a0; background: #e4efff; border-color: #b6d0f1; }
.badge.terminee, .badge.operationnel { color: #1a6b43; background: #e5f4eb; border-color: #b7d9c5; }
.badge.maintenance { color: #915016; background: #fff0df; border-color: #e8c59f; }
.priority { display: inline-flex; align-items: center; gap: 7px; color: #4a627e; font-size: 14px; font-weight: 550; }
.priority::before { content: ""; width: 7px; height: 7px; background: #7695b8; border-radius: 2px; }
.priority.haute { color: #a43b26; }
.priority.haute::before { background: #c35036; }
.priority.basse::before { background: #6493a4; }
.row-edit { min-height: 44px; padding: 10px 12px; font-size: 14px; white-space: nowrap; }
.row-edit .icon { width: 17px; height: 17px; }
.table-empty { padding: 45px 24px !important; text-align: center !important; color: #586d85 !important; font-size: 15px !important; line-height: 1.8; }
.panel-foot { display: flex; align-items: center; gap: 9px; padding: 17px 24px; border-top: 1px solid var(--line); color: #536c87; font-size: 13px; line-height: 1.6; }
.small-dot { flex-shrink: 0; width: 6px; height: 6px; background: #357a99; border-radius: 2px; }

/* A compact control panel with a CSS-only circuit pattern. */
.activity-card { position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 26px 24px; color: #fff; background: var(--navy); border: 1px solid #304965; border-top: 3px solid #43bcd9; border-radius: 6px; }
.activity-card::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(#4b799315 1px, transparent 1px), linear-gradient(90deg, #4b799315 1px, transparent 1px); background-size: 24px 24px; pointer-events: none; }
.activity-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: relative; z-index: 1; }
.activity-card-top .eyebrow { font-size: 13px; letter-spacing: .5px; margin: 0; }
.activity-card-top .icon { width: 23px; height: 23px; color: #8edbed; }
.activity-card h2 { position: relative; z-index: 1; font-size: 28px; line-height: 1.3; font-weight: 600; margin-top: 24px; }
.activity-card > p { position: relative; z-index: 1; color: #b9cce1; font-size: 14px; line-height: 1.8; margin: 17px 0 28px; }
.progress-label { display: flex; justify-content: space-between; gap: 12px; position: relative; z-index: 1; color: #bdd1e6; font-size: 13px; line-height: 1.5; }
.progress-label strong { flex-shrink: 0; color: #9ee8f5; font-weight: 650; }
.progress-track { position: relative; z-index: 1; height: 7px; margin-top: 13px; background: #334a64; border-radius: 2px; overflow: hidden; }
.progress-track progress { display: block; width: 100%; height: 7px; border: 0; appearance: none; background: transparent; }
.progress-track progress::-webkit-progress-bar { background: transparent; }
.progress-track progress::-webkit-progress-value { background: #5ad2ed; }
.progress-track progress::-moz-progress-bar { background: #5ad2ed; }
.light-button { position: relative; z-index: 1; justify-content: space-between; color: #102e4b; background: #9de1ef; margin-top: 28px; padding: 12px; font-size: 14px; }
.light-button:hover { background: #c8f2fa; }
.light-button .icon { width: 18px; height: 18px; }
.activity-orbit { position: absolute; width: 220px; height: 220px; border: 1px solid #6dcae025; right: -130px; top: 100px; border-radius: 35px; transform: rotate(45deg); }
.activity-orbit::before, .activity-orbit::after { content: ""; position: absolute; inset: 18px; border: 1px solid #6dcae025; border-radius: 26px; }
.activity-orbit::after { inset: -20px; border-radius: 45px; }
.bottom-note { display: flex; align-items: flex-start; gap: 10px; padding: 24px 0; color: #536b84; font-size: 13px; line-height: 1.6; }
.bottom-note .icon { width: 18px; height: 18px; margin-top: 2px; }
.version-text { flex-shrink: 0; margin-left: auto; padding-left: 15px; font: 13px/1.7 ui-monospace, Consolas, monospace; }
.app-footer { padding: 18px 32px 28px; text-align: center; color: #53677f; font-size: 13px; }

/* Interventions, equipment and account settings. */
.filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; padding: 22px 24px; }
.search-field { position: relative; flex: 1; min-width: 250px; }
.search-field > .icon { position: absolute; left: 14px; top: 14px; width: 20px; height: 20px; color: #6c829c; }
.search-field input { padding-left: 43px; }
.filter-bar select { width: 190px; }
.result-count { color: #566e87; font-size: 14px; white-space: nowrap; }
.simple-badge { border: 1px solid #bbcadb; background: #e4ebf5; color: #456486; padding: 9px 12px; font: 13px/1.5 ui-monospace, Consolas, monospace; border-radius: 4px; }
.equipment-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.equipment-card { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 24px; box-shadow: var(--shadow); }
.equipment-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 23px; }
.equipment-symbol { width: 44px; height: 46px; background: #e9f1fc; border: 1px solid #d1e0f5; border-radius: 5px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #456d9e; }
.equipment-card h2 { font-size: 19px; line-height: 1.5; margin-bottom: 7px; }
.equipment-client { color: #5a708b; font-size: 15px; }
.equipment-details { display: grid; gap: 14px; border-top: 1px solid var(--line); margin: 24px 0 0; padding-top: 20px; }
.equipment-details > div { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; line-height: 1.5; }
.equipment-details dt { color: #5f738d; }
.equipment-details dd { margin: 0; color: #314d6e; overflow-wrap: anywhere; text-align: right; }
.section-note { color: #576c83; font-size: 14px; margin-top: 24px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; align-items: start; max-width: 1100px; }
.settings-panel { padding: 28px; }
.settings-panel > p { font-size: 15px; margin-top: 9px; }
.account-details { margin: 28px 0 0; }
.account-details div + div { margin-top: 25px; }
.account-details dt { color: #536e8b; font-size: 14px; margin-bottom: 8px; }
.account-details dd { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
.stacked-form { display: flex; flex-direction: column; margin-top: 25px; gap: 9px; }
.stacked-form label { margin-top: 12px; font-size: 15px; font-weight: 600; }
.stacked-form .button { align-self: flex-start; margin-top: 19px; }
.form-error { padding: 12px 14px; color: #983a27; background: #fff0eb; border: 1px solid #dfb1a5; border-radius: 4px; font-size: 14px; line-height: 1.6; }
.error-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px; margin-bottom: 24px; background: #fff0e0; border: 1px solid #ddbc8e; color: #80501f; border-radius: 4px; font-size: 15px; line-height: 1.5; }
.toast { position: fixed; bottom: 24px; left: calc(50% + 128px); transform: translateX(-50%); z-index: 100; display: flex; align-items: center; gap: 11px; width: max-content; max-width: calc(100vw - 40px); padding: 16px 20px; border: 1px solid #456483; border-radius: 6px; background: #173653; color: #fff; box-shadow: 0 6px 24px #10243838; font-size: 15px; line-height: 1.5; }
.toast .icon { color: #77e1c3; width: 21px; height: 21px; }

/* Native dialog preserves keyboard focus and Escape behavior. */
dialog { width: 680px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow: auto; color: var(--ink); background: #fff; border: 1px solid #b9cee5; border-top: 3px solid var(--primary); border-radius: 7px; box-shadow: 0 24px 90px #071a3540; }
dialog::backdrop { background: #0c1c32b5; backdrop-filter: blur(3px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 24px 28px; border-bottom: 1px solid var(--line); }
.dialog-heading .eyebrow { margin-bottom: 8px; }
.dialog-heading h2 { font-size: 24px; }
.dialog-body { padding: 24px 28px; }
.field { display: flex; flex-direction: column; gap: 9px; min-width: 0; margin-bottom: 21px; }
.field label { font-size: 15px; font-weight: 600; }
.field label > span { color: var(--primary); }
.field:last-child { margin-bottom: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.dialog-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; padding: 20px 28px; border-top: 1px solid var(--line); background: #f3f6fa; }
.dialog-footer > span { margin-right: auto; color: #5d7188; font-size: 13px; line-height: 1.5; }
.dialog-footer .button { font-size: 15px; }
.mobile-menu { display: none; }
.mobile-backdrop { position: fixed; inset: 0; background: #0c2039a0; z-index: 25; }

/* Login uses the same industrial console palette and larger labels. */
.login-page { background: #f1f5fa; }
.login-layout { display: grid; grid-template-columns: 1fr 1fr; min-height: 100dvh; }
.login-intro { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 48px 10%; color: #fff; background: var(--navy); border-right: 1px solid #2c4665; }
.login-intro::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(#598bb518 1px, transparent 1px), linear-gradient(90deg, #598bb518 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(transparent, #000); }
.login-brand { position: relative; width: fit-content; color: #f2f7ff; }
.login-pitch { position: relative; margin: auto 0; padding: 65px 0 42px; }
.login-pitch .eyebrow { font-size: 13px; margin-bottom: 26px; }
.login-pitch h1 { font-size: 46px; line-height: 1.22; font-weight: 650; letter-spacing: -1.5px; }
.login-pitch > p { max-width: 440px; margin-top: 24px; color: #b9cee3; font-size: 17px; line-height: 1.8; }
.login-footnote { position: relative; padding-bottom: 6px; color: #a8c1da; font-size: 14px; }
.login-illustration { position: relative; margin-top: 48px; padding: 20px 0; max-width: 400px; }
.illustration-grid { position: absolute; inset: 0 -20px; border: 1px solid #3b668c4d; border-radius: 4px; }
.illustration-grid::before, .illustration-grid::after { content: ""; position: absolute; width: 9px; height: 9px; background: var(--cyan); border: 3px solid #193951; top: -5px; left: -5px; }
.illustration-grid::after { top: auto; left: auto; right: -5px; bottom: -5px; }
.sample-card { position: relative; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 24px; background: #1b304a; border: 1px solid #3c6184; border-radius: 5px; box-shadow: 8px 8px 0 #0a142130; }
.sample-icon { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; color: #8be8cf; background: #1d4a4a; border: 1px solid #398777; border-radius: 4px; font-size: 24px; }
.sample-card strong { display: block; color: #ecf5ff; font-size: 15px; line-height: 1.5; font-weight: 600; }
.sample-card div > span { display: block; margin-top: 6px; color: #afc9e2; font-size: 13px; }
.sample-lines { display: grid; gap: 10px; width: 100%; margin-top: 15px; }
.sample-lines i { height: 7px; border-radius: 2px; background: #365575; width: 100%; }
.sample-lines i:nth-child(2) { width: 80%; background: #32587c; }
.sample-lines i:nth-child(3) { width: 60%; background: #337a9c; }
.login-form-side { position: relative; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 70px 10%; }
.login-form-wrap { width: 100%; max-width: 430px; }
.version-pill { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 25px; padding: 7px 10px; border: 1px solid #bad1eb; border-radius: 3px; color: #345f91; background: #e3edfa; font: 13px/1.4 ui-monospace, Consolas, monospace; letter-spacing: .5px; }
.version-pill > span { width: 6px; height: 6px; background: #256cba; border-radius: 1px; }
.login-form-wrap h2 { font-size: 32px; letter-spacing: -.8px; font-weight: 700; }
.login-form-wrap > p { margin-top: 13px; font-size: 16px; }
.login-form { display: flex; flex-direction: column; margin-top: 34px; gap: 11px; }
.login-form label { font-size: 16px; font-weight: 600; color: #304d6e; }
.login-form input { min-height: 52px; }
.password-label { margin-top: 15px; }
.password-field { position: relative; }
.password-field input { padding-right: 51px; }
.password-toggle { position: absolute; right: 4px; top: 4px; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: #5b7695; background: transparent; border-radius: 3px; }
.password-toggle:hover { background: #eaf1fb; color: #1c5799; }
.password-toggle svg { width: 22px; height: 22px; }
.login-submit { min-height: 52px; justify-content: space-between; margin-top: 18px; font-size: 16px; }
.login-submit > span:last-child { font-size: 23px; font-weight: 400; }
.login-help { display: flex; align-items: center; gap: 13px; border-top: 1px solid #cedbea; margin-top: 30px; padding-top: 23px; }
.login-help svg { width: 24px; height: 24px; flex-shrink: 0; color: #607d9f; }
.login-help p { color: #4f6d8b; font-size: 14px; line-height: 1.8; }
.login-help p span { color: #536a82; font-size: 13px; }
.login-copyright { position: absolute; bottom: 28px; left: 20px; right: 20px; text-align: center; color: #536a82; font-size: 13px; }
.login-form .form-error { margin-top: 6px; }

/* Intermediate widths preserve readable type instead of shrinking it. */
@media (min-width: 1600px) {
  .main-content { padding: 42px 44px 20px; }
  .topbar { padding-left: 44px; padding-right: 44px; }
  .overview-columns { grid-template-columns: minmax(0, 1fr) 350px; }
  .activity-card { padding: 29px; }
}

@media (max-width: 1450px) {
  .overview-columns { grid-template-columns: minmax(0, 1fr); }
  .activity-card { display: grid; grid-template-columns: 1.1fr 1fr; gap: 13px 34px; }
  .activity-card-top { grid-column: 1 / -1; }
  .activity-card h2 { grid-column: 1; grid-row: 2 / 4; margin-top: 5px; font-size: 30px; }
  .activity-card > p { grid-column: 2; grid-row: 2; margin: 0; }
  .activity-card .progress-label { grid-column: 2; grid-row: 3; align-self: end; }
  .activity-card .progress-track { grid-column: 2; grid-row: 4; margin-top: 0; align-self: center; }
  .activity-card .light-button { grid-column: 1; grid-row: 4; margin-top: 2px; max-width: 290px; }
  .page-heading { align-items: flex-start; }
  .page-heading .button { margin-top: 20px; }
  .page-heading h1 { font-size: 34px; }
  .stat-card { padding: 20px 18px; }
  .equipment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1250px) {
  .main-content { padding: 30px 25px 18px; }
  .topbar { padding: 18px 25px; }
  .topbar-date, .topbar-divider { display: none; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-heading { flex-wrap: wrap; gap: 18px; }
  .page-heading .button { margin-top: 0; }
  .settings-grid { grid-template-columns: 1fr; max-width: 760px; }
  .version-text { display: none; }
  .login-pitch h1 { font-size: 40px; }
  .login-intro { padding-left: 9%; padding-right: 9%; }
  .login-form-side { padding-left: 8%; padding-right: 8%; }

  /* Keep the table elements and labels, lay each intervention out as a card. */
  .data-table:not(.recent-table), .data-table:not(.recent-table) tbody { display: block; width: 100%; }
  .data-table:not(.recent-table) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .data-table:not(.recent-table) tbody { padding: 0 22px 22px; }
  .data-table:not(.recent-table) tr { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 22px; padding: 22px; margin-top: 16px; border: 1px solid #cfdce9; border-left: 3px solid #8daed5; border-radius: 5px; background: #fff; }
  .data-table:not(.recent-table) td { display: block; min-width: 0; padding: 0; border: 0; overflow-wrap: anywhere; }
  .data-table:not(.recent-table) td::before { content: attr(data-label); display: block; margin-bottom: 7px; color: #5b7390; font-size: 13px; font-weight: 600; }
  .data-table:not(.recent-table) td:first-child, .data-table:not(.recent-table) td:last-child { grid-column: 1 / -1; }
  .data-table:not(.recent-table) td:first-child::before, .data-table:not(.recent-table) td:last-child::before { display: none; }
  .data-table:not(.recent-table) td:last-child { padding-top: 16px; border-top: 1px solid #e0e8f1; }
  .data-table:not(.recent-table) .table-empty { grid-column: 1 / -1; }
}

@media (max-width: 1100px) {
  .recent-table, .recent-table tbody { display: block; width: 100%; }
  .recent-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .recent-table tbody { padding: 0 22px 22px; }
  .recent-table tr { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 18px 20px; padding: 22px; margin-top: 16px; border: 1px solid #cfdeed; border-left: 3px solid #8daed5; border-radius: 5px; }
  .recent-table td { display: block; padding: 0; border: 0; min-width: 0; }
  .recent-table td:first-child { grid-column: 1 / -1; padding: 0 0 14px; border-bottom: 1px solid #e0e8f1; }
  .recent-table td:last-child { grid-column: 1 / -1; padding: 0; }
  .recent-table td:nth-child(2)::before { content: attr(data-label); display: block; margin-bottom: 7px; color: #5b7390; font-size: 13px; font-weight: 600; }
  .recent-table .table-empty { grid-column: 1 / -1; border-bottom: 0 !important; }
  .recent-table .row-edit { width: 100%; }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; width: 270px; padding-left: 18px; padding-right: 18px; }
  .sidebar.open { transform: translateX(0); }
  .app-shell { margin-left: 0; }
  .mobile-menu { display: flex; }
  .toast { left: 50%; }
  .sidebar-note { display: none; }
  .sidebar-bottom { padding-top: 24px; }
  .login-layout { grid-template-columns: 1fr; }
  .login-intro { padding: 30px 34px; }
  .login-pitch { padding: 36px 0 0; margin: 0; }
  .login-pitch h1 { font-size: 36px; }
  .login-pitch h1 br { display: none; }
  .login-pitch > p { font-size: 16px; margin-top: 17px; max-width: 640px; }
  .login-pitch .eyebrow { margin-bottom: 17px; }
  .login-illustration, .login-footnote { display: none; }
  .login-form-side { padding: 40px 32px 85px; }
  .login-form-wrap { max-width: 530px; }
  .login-copyright { bottom: 24px; }
}

@media (max-width: 600px) {
  h1 { font-size: 32px; }
  .topbar { flex-wrap: wrap; align-items: flex-start; gap: 4px; min-height: 94px; padding: 10px 16px 13px; }
  .topbar-left { width: 100%; gap: 10px; }
  .breadcrumb { gap: 10px; font-size: 14px; }
  .breadcrumb-root, .breadcrumb-separator { display: none; }
  .topbar-right { width: 100%; padding-left: 54px; font-size: 13px; }
  .main-content { padding: 28px 16px 14px; }
  .page-heading { margin-bottom: 24px; gap: 20px; }
  .page-heading h1 { font-size: 32px; }
  .page-heading h1 + p { font-size: 15px; }
  .page-heading .button { width: 100%; min-height: 50px; }
  .eyebrow { font-size: 13px; letter-spacing: .8px; }
  .demo-notice { align-items: flex-start; flex-direction: column; gap: 10px; padding: 15px; margin-bottom: 22px; }
  .demo-notice p { font-size: 13px; }
  .stats-grid { gap: 12px; margin-bottom: 22px; }
  .stat-card { padding: 17px 14px; }
  .stat-top { gap: 8px; align-items: flex-start; }
  .stat-top > span:first-child { font-size: 14px; min-height: 40px; }
  .stat-icon { width: 30px; height: 32px; }
  .stat-icon .icon { width: 18px; height: 18px; }
  .stat-card > strong { margin: 15px 0 12px; font-size: 40px; }
  .stat-foot { font-size: 13px; }
  .overview-columns { gap: 22px; }
  .panel-heading { align-items: flex-start; padding: 22px 18px 12px; gap: 12px; }
  .panel-heading h2 { font-size: 21px; }
  .panel-heading p { font-size: 14px; }
  .text-link { font-size: 14px; gap: 5px; }
  .panel-foot { padding: 16px 18px; font-size: 13px; }
  .recent-table tbody, .data-table:not(.recent-table) tbody { padding: 0 14px 17px; }
  .recent-table tr, .data-table:not(.recent-table) tr { padding: 17px 15px; gap: 16px 12px; margin-top: 13px; }
  .intervention-cell { gap: 10px; align-items: flex-start; }
  .intervention-symbol { width: 34px; height: 37px; margin-top: 3px; }
  .intervention-symbol .icon { width: 19px; height: 19px; }
  .intervention-info strong { min-width: 0; font-size: 16px; line-height: 1.5; }
  .intervention-info span { font-size: 14px; }
  .recent-table td:nth-child(2) { font-size: 14px !important; }
  .badge { padding: 6px 8px; font-size: 13px; gap: 5px; }
  .row-edit { width: 100%; min-height: 46px; font-size: 15px; }
  .activity-card { display: flex; gap: 0; padding: 24px 22px; }
  .activity-card h2 { margin-top: 24px; font-size: 29px; }
  .activity-card h2 br { display: none; }
  .activity-card > p { margin: 16px 0 25px; font-size: 15px; }
  .activity-card .progress-label { width: 100%; align-self: stretch; }
  .activity-card .progress-track { margin-top: 13px; width: 100%; }
  .activity-card .light-button { max-width: none; margin-top: 26px; min-height: 48px; font-size: 15px; }
  .bottom-note { font-size: 13px; padding: 22px 0; }
  .app-footer { font-size: 13px; padding: 14px 20px 27px; }
  .filter-bar { gap: 12px; padding: 19px 17px; }
  .search-field { flex-basis: 100%; min-width: 0; }
  .filter-bar select { width: 100%; }
  .filter-bar > .button { flex: 1; }
  .result-count { font-size: 14px; }
  .equipment-grid { grid-template-columns: 1fr; gap: 18px; }
  .equipment-card { padding: 22px; }
  .equipment-card h2 { font-size: 20px; }
  .equipment-details > div { font-size: 14px; }
  .section-note { font-size: 14px; }
  .settings-panel { padding: 23px 20px; }
  .stacked-form .button { width: 100%; }
  .error-banner { flex-wrap: wrap; }
  .toast { padding: 14px 17px; font-size: 14px; }
  .dialog-heading { padding: 20px; gap: 10px; align-items: flex-start; }
  .dialog-heading h2 { font-size: 22px; }
  .dialog-body { padding: 22px 20px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .dialog-footer { padding: 18px 20px; gap: 11px; }
  .dialog-footer > span { flex-basis: 100%; margin-bottom: 3px; }
  .dialog-footer .button { width: 100%; }
  .dialog-footer .primary { order: 1; }
  .dialog-footer .secondary { order: 2; }
  .login-intro { padding: 27px 25px; }
  .login-pitch { padding-top: 32px; }
  .login-pitch h1 { font-size: 34px; }
  .login-pitch .eyebrow { font-size: 13px; }
  .login-form-side { padding: 34px 25px 90px; }
  .login-form-wrap h2 { font-size: 30px; }
  .login-form-wrap > p { font-size: 16px; }
  .login-form { margin-top: 28px; }
  .login-copyright { font-size: 13px; }
}

@media (max-width: 360px) {
  .main-content { padding-left: 12px; padding-right: 12px; }
  .stat-card { padding: 15px 12px; }
  .stat-top { flex-wrap: wrap-reverse; }
  .stat-top > span:first-child { flex-basis: 100%; }
  .stat-card > strong { margin-top: 13px; }
  .recent-table tr { grid-template-columns: 1fr; }
  .recent-table td:first-child, .recent-table td:last-child { grid-column: 1; }
  .recent-table td:nth-child(3) { padding-bottom: 2px; }
  .data-table:not(.recent-table) tr { grid-template-columns: 1fr; }
  .panel-heading { flex-wrap: wrap; }
  .login-form-side { padding-left: 21px; padding-right: 21px; }
  .login-pitch h1 { font-size: 32px; }
}

@media (min-width: 901px) and (max-height: 950px) {
  .sidebar-note { display: none; }
  .sidebar-bottom { padding-top: 20px; }
}

/* Documents use the same readable controls as the maintenance workspace. */
.document-guides { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 26px; }
.document-guide { display: flex; align-items: flex-start; gap: 15px; padding: 22px; background: #e5eef9; border: 1px solid #c3d5eb; border-left: 3px solid #5c8dc3; border-radius: 5px; }
.document-guide-icon { display: flex; align-items: center; justify-content: center; width: 40px; height: 42px; flex-shrink: 0; color: #285f9e; background: #f5f9ff; border: 1px solid #bed2eb; border-radius: 4px; }
.document-guide h2 { margin: 0 0 9px; color: #294a70; font-size: 17px; line-height: 1.5; }
.document-guide p { color: #405e80; font-size: 14px; line-height: 1.75; }
.document-filter-bar { border-bottom: 1px solid var(--line); }
.document-filter-bar .search-field { max-width: 650px; }
.document-filter-bar .result-count { margin-left: auto; }
.document-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding: 24px; }
.document-list:empty { display: none; }
.document-card { min-width: 0; padding: 23px; border: 1px solid #cbd9e9; border-top: 3px solid #759cc8; border-radius: 5px; background: #fbfdff; }
.document-card-heading { display: flex; align-items: flex-start; gap: 15px; }
.document-card-heading > div { min-width: 0; flex: 1; }
.document-card h2 { color: #26415f; font-size: 19px; line-height: 1.5; overflow-wrap: anywhere; }
.document-format { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px; width: 49px; min-height: 62px; padding: 7px 5px; flex-shrink: 0; color: #2f5d91; background: #e8f1fc; border: 1px solid #c6d9ef; border-radius: 4px; }
.document-format .icon { width: 23px; height: 23px; }
.document-format > span { font: 650 13px/1.3 ui-monospace, Consolas, monospace; }
.document-filename { margin-top: 6px; color: #5a708b; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.document-details { display: grid; grid-template-columns: 1fr 1fr; gap: 17px 20px; margin: 22px 0; padding-top: 18px; border-top: 1px solid #dce5ef; }
.document-details > div { min-width: 0; }
.document-details dt { margin-bottom: 6px; color: #526c89; font-size: 13px; font-weight: 600; }
.document-details dd { margin: 0; color: #304e70; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.document-relation { grid-column: 1 / -1; }
.document-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.document-actions .button { min-height: 44px; padding: 11px 12px; font-size: 14px; }
.document-actions .icon { width: 18px; height: 18px; }
.document-actions .document-open { color: #fff; background: #235db2; border-color: #235db2; }
.document-actions .document-open:hover { background: #17498f; border-color: #17498f; }
.document-delete-action { color: #993e30; background: #fff; border-color: #d9b3ab; }
.document-delete-action:hover { background: #fff0eb; border-color: #bc8174; }
.document-storage { border-top: 1px solid var(--line); padding: 19px 24px; background: #f4f7fb; }
.document-storage > div { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 24px; color: #4b6684; font-size: 13px; line-height: 1.7; }
.document-storage progress { display: block; width: 100%; height: 6px; margin-top: 13px; border: 0; border-radius: 2px; appearance: none; background: #d9e4f1; overflow: hidden; }
.document-storage progress::-webkit-progress-bar { background: #d9e4f1; }
.document-storage progress::-webkit-progress-value { background: #3b79bb; }
.document-storage progress::-moz-progress-bar { background: #3b79bb; }
.documents-error { margin: 22px 24px; }
.documents-message { padding: 30px 24px; text-align: center; color: #506c8d; font-size: 15px; }
.documents-empty { padding: 42px 25px; text-align: center; }
.document-empty-icon { display: flex; align-items: center; justify-content: center; width: 58px; height: 62px; margin: 0 auto 20px; color: #3e71a9; background: #e7f0fc; border: 1px solid #c3d7ef; border-radius: 5px; }
.document-empty-icon .icon { width: 29px; height: 29px; }
.documents-empty h2 { font-size: 22px; }
.documents-empty p { max-width: 540px; margin: 14px auto 22px; color: #516c8a; font-size: 15px; line-height: 1.8; }
.field-help { color: #526b88; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.field-help:empty { display: none; }
.field label > .optional-label { color: #526b88; font-size: 13px; font-weight: 400; }
input[type="file"] { padding: 9px; font-size: 14px; min-height: 58px; background: #f6f9fd; }
input[type="file"]::file-selector-button { min-height: 38px; margin-right: 12px; padding: 9px 12px; color: #2b5282; background: #e5eefb; border: 1px solid #adc8e9; border-radius: 3px; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
input[type="file"]::file-selector-button:hover { background: #d7e7fc; }
.document-scan-help { display: flex; align-items: flex-start; gap: 12px; padding: 15px; margin: 4px 0 20px; color: #3c5f86; background: #edf3fb; border: 1px solid #cddced; border-radius: 4px; }
.document-scan-help .icon { margin-top: 2px; width: 21px; height: 21px; }
.document-scan-help p { font-size: 14px; line-height: 1.7; }
.upload-status { margin-top: 15px; color: #285f9d; font-size: 14px; line-height: 1.7; }
.confirm-dialog { width: 580px; }
.delete-document-name { margin-bottom: 15px; color: #223e5c; font-size: 18px; font-weight: 650; overflow-wrap: anywhere; }
.delete-document-description { color: #4d6885; font-size: 15px; line-height: 1.8; }
.confirm-dialog .form-error { margin-top: 18px; }
.danger { color: #fff; background: #aa3d2c; border-color: #aa3d2c; }
.danger:hover { background: #8c2c1e; border-color: #8c2c1e; }

@media (max-width: 1250px) {
  .document-guides, .document-list { grid-template-columns: 1fr; }
  .document-guide { padding: 20px; }
}

@media (max-width: 600px) {
  .document-guides { gap: 15px; margin-bottom: 22px; }
  .document-guide { gap: 12px; padding: 18px 15px; }
  .document-guide-icon { width: 34px; height: 38px; }
  .document-guide-icon .icon { width: 20px; height: 20px; }
  .document-guide h2 { font-size: 16px; }
  .document-guide p { font-size: 14px; }
  .document-filter-bar .result-count { margin-left: 0; }
  .document-list { padding: 16px 14px; gap: 17px; }
  .document-card { padding: 19px 16px; }
  .document-card-heading { gap: 12px; }
  .document-card h2 { font-size: 18px; }
  .document-format { width: 43px; min-height: 58px; }
  .document-actions { flex-direction: column; align-items: stretch; }
  .document-actions .button { width: 100%; min-height: 46px; font-size: 15px; }
  .document-storage { padding: 17px; }
  .document-storage > div { flex-direction: column; gap: 6px; }
  .documents-error { margin: 18px 16px; }
  .documents-message { padding: 25px 18px; }
  .documents-empty { padding: 32px 20px; }
  .documents-empty h2 { font-size: 21px; }
  .documents-empty .button { width: 100%; }
  .document-scan-help { padding: 13px; gap: 10px; }
  .confirm-dialog .dialog-footer .danger { order: 1; }
  .confirm-dialog .dialog-footer .secondary { order: 2; }
}

/* A company is an explicit workspace, carried by the page URL. */
.organization-switcher { margin: 28px 0 23px; padding: 19px 0; border-top: 1px solid #2b3b51; border-bottom: 1px solid #2b3b51; }
.organization-switcher label { display: block; margin-bottom: 9px; color: #bdd0e6; font-size: 14px; font-weight: 600; }
.organization-switcher select { min-height: 48px; padding: 11px 10px; border-color: #416081; color: #edf6ff; background: #1b314b; font-size: 14px; }
.organization-switcher select:focus { border-color: #70cce9; box-shadow: 0 0 0 3px #56dbef25; }
.organization-switcher select:disabled { opacity: .75; }
.organization-switcher option { color: #edf6ff; background: #1b314b; }
#tenant-navigation .nav-caption { margin-top: 22px; margin-bottom: 12px; font-size: 13px; letter-spacing: .5px; }
#breadcrumb-organization { min-width: 0; max-width: 260px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.breadcrumb strong { flex-shrink: 0; }
.organization-context { display: flex; align-items: center; gap: 17px; padding: 19px 23px; margin-bottom: 30px; color: #233f60; background: #fff; border: 1px solid #bed1e8; border-left: 4px solid #2a72c6; border-radius: 5px; box-shadow: var(--shadow); }
.organization-context-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 45px; height: 48px; color: #326ba7; background: #e8f1fc; border: 1px solid #c5d9ef; border-radius: 5px; }
.organization-context-icon .icon { width: 25px; height: 25px; }
.organization-context > div { flex: 1; min-width: 0; }
.organization-context p { margin-bottom: 6px; color: #526d8c; font: 13px/1.4 ui-monospace, Consolas, monospace; letter-spacing: .6px; }
.organization-context strong { display: block; color: #234469; font-size: 22px; line-height: 1.45; font-weight: 680; overflow-wrap: anywhere; }
.organization-context .button { flex-shrink: 0; font-size: 14px; }
.organizations-intro { display: flex; align-items: flex-start; gap: 13px; padding: 19px 21px; margin-bottom: 26px; color: #375d87; background: #e5effb; border: 1px solid #c0d4ec; border-radius: 5px; }
.organizations-intro .icon { margin-top: 3px; width: 22px; height: 22px; }
.organizations-intro p { font-size: 15px; line-height: 1.7; }
.organizations-loading { padding: 22px 0; color: #546e8a; font-size: 15px; }
.organization-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.organization-card { display: flex; flex-direction: column; min-width: 0; padding: 25px; background: #fff; border: 1px solid #cad9ea; border-top: 3px solid #7da1cd; border-radius: 6px; box-shadow: var(--shadow); }
.organization-card.selected { border-color: #7ca8d8; border-top-color: #286cc2; background: #f7fbff; }
.organization-card-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.organization-card-icon { display: flex; align-items: center; justify-content: center; width: 49px; height: 52px; color: #356ba5; background: #e7f0fb; border: 1px solid #c5d9ef; border-radius: 5px; }
.organization-card-icon .icon { width: 27px; height: 27px; }
.organization-open-badge { padding: 6px 9px; color: #205c9d; background: #dfedff; border: 1px solid #a9c9ee; border-radius: 4px; font-size: 13px; font-weight: 600; }
.organization-card h2 { color: #28496f; font-size: 23px; line-height: 1.45; overflow-wrap: anywhere; }
.organization-card-date { margin-top: 9px; color: #59728e; font-size: 13px; }
.organization-card-description { margin: 19px 0 23px; color: #4d6988; font-size: 15px; line-height: 1.75; }
.organization-card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; margin-top: auto; padding-top: 20px; border-top: 1px solid #d9e3ef; }
.organization-card-actions .button { min-height: 46px; padding: 11px 14px; font-size: 14px; }
.organizations-empty { padding: 42px 28px; text-align: center; }
.organizations-empty h2 { font-size: 24px; }
.organizations-empty p { max-width: 570px; margin: 17px auto 24px; color: #526d8a; font-size: 16px; line-height: 1.8; }
.dialog-organization-context { margin-bottom: 23px; padding: 12px 14px; color: #4c6888; background: #eaf2fc; border-left: 3px solid #75a5d8; border-radius: 3px; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.dialog-organization-context strong { color: #2b517b; font-weight: 650; }
#organization-form-error { margin-top: 18px; }

@media (max-width: 1500px) {
  .organization-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  #breadcrumb-organization { max-width: 180px; }
  .organization-context { flex-wrap: wrap; }
  .organization-context .button { margin-left: 62px; }
  .organization-card { padding: 22px; }
}

@media (max-width: 600px) {
  .organization-context { gap: 13px; padding: 18px 16px; margin-bottom: 25px; }
  .organization-context-icon { width: 38px; height: 43px; }
  .organization-context strong { font-size: 20px; }
  .organization-context .button { margin: 3px 0 0; width: 100%; min-height: 44px; }
  .organizations-intro { gap: 11px; padding: 17px 15px; }
  .organizations-intro p { font-size: 14px; }
  .organization-grid { grid-template-columns: 1fr; gap: 18px; }
  .organization-card { padding: 22px; }
  .organization-card h2 { font-size: 22px; }
  .organization-card-actions { flex-direction: column; align-items: stretch; }
  .organization-card-actions .button { width: 100%; font-size: 15px; }
  .organizations-empty { padding: 32px 22px; }
  .organizations-empty h2 { font-size: 22px; }
  .organizations-empty .button { width: 100%; }
}

/* Keep account access visible as company navigation adds a section. */
@media (min-width: 901px) and (max-height: 1050px) {
  .sidebar-note { display: none; }
  .sidebar-bottom { padding-top: 20px; }
}

@media (max-height: 780px) {
  .sidebar { padding-top: 23px; }
  .organization-switcher { margin-top: 20px; margin-bottom: 16px; padding: 15px 0; }
  #tenant-navigation .nav-caption { margin-top: 17px; }
  .sidebar-bottom { padding-top: 15px; }
  .user-card { margin-top: 12px; padding-top: 17px; padding-bottom: 17px; }
}

@media (min-width: 901px) and (max-height: 760px) {
  .sidebar .nav-item { min-height: 46px; padding-top: 10px; padding-bottom: 10px; margin-bottom: 6px; }
}

/* SIREN lookup is a preview step; creation remains an explicit action. */
.organization-create-mode { min-width: 0; margin: 0 0 24px; padding: 0; border: 0; }
.organization-create-mode legend { padding: 0; margin-bottom: 12px; color: #314e70; font-size: 15px; font-weight: 600; }
.organization-mode-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.organization-mode-options label { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px 14px; color: #385c85; background: #f6f9fd; border: 1px solid #bfcee0; border-radius: 5px; font-size: 15px; font-weight: 600; line-height: 1.5; cursor: pointer; }
.organization-mode-options label:has(input:checked) { color: #1c5598; background: #e6effd; border-color: #759ed0; box-shadow: inset 0 0 0 1px #759ed0; }
.organization-mode-options input[type="radio"] { width: 18px; height: 18px; min-height: 18px; margin: 0; padding: 0; flex-shrink: 0; accent-color: #205fbb; }
.organization-mode-options input[type="radio"]:focus-visible { outline: 3px solid #258bdb; outline-offset: 4px; }
.siren-search-row { display: flex; align-items: stretch; gap: 12px; }
.siren-search-row input { min-width: 0; flex: 1; font-family: ui-monospace, Consolas, monospace; letter-spacing: .7px; }
.siren-search-row .button { flex-shrink: 0; white-space: nowrap; }
.siren-lookup-status { margin: 0 0 20px; color: #2f639c; font-size: 14px; line-height: 1.7; }
#siren-lookup-error { margin: 0 0 12px; }
#siren-manual-help { margin-bottom: 22px; }
.siren-preview { padding: 21px; margin: 2px 0 23px; background: #f1f6fc; border: 1px solid #b8cee8; border-left: 3px solid #3878bb; border-radius: 5px; }
.siren-found-badge { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 13px; padding: 5px 8px; color: #206742; background: #e2f1e9; border: 1px solid #b6d8c4; border-radius: 4px; font-size: 13px; font-weight: 600; }
.siren-found-badge .icon { width: 16px; height: 16px; }
.siren-preview h3 { margin: 0; color: #24466d; font-size: 21px; font-weight: 650; line-height: 1.5; overflow-wrap: anywhere; }
.siren-preview-details { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 23px; margin: 20px 0; }
.siren-preview-details > div { min-width: 0; }
.siren-preview-details dt { margin-bottom: 6px; color: #536e8c; font-size: 13px; font-weight: 600; line-height: 1.5; }
.siren-preview-details dd { margin: 0; color: #2c4e75; font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.siren-preview-details .siren-address-row { grid-column: 1 / -1; }
#siren-preview-number { font-family: ui-monospace, Consolas, monospace; letter-spacing: .4px; }
.siren-preview > .text-link { align-items: flex-start; justify-content: flex-start; min-height: 44px; padding-top: 13px; border-top: 1px solid #c8daee; white-space: normal; line-height: 1.65; }
.siren-preview > .text-link .icon { margin-top: 3px; }
.siren-existing { padding: 19px; margin-bottom: 22px; color: #375e88; background: #e9f2fc; border: 1px solid #bdd2ea; border-radius: 5px; }
.siren-existing p { margin-bottom: 16px; font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }
.siren-existing strong { color: #254b78; }
.organization-registry { display: grid; gap: 8px; margin-top: 16px; padding: 14px 0; border-top: 1px solid #d7e3ef; border-bottom: 1px solid #d7e3ef; }
.organization-registry > span { color: #31577e; font: 600 14px/1.6 ui-monospace, Consolas, monospace; }
.organization-registry > p { color: #526d8b; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }

@media (max-width: 600px) {
  .siren-search-row { flex-direction: column; }
  .siren-search-row .button { width: 100%; min-height: 46px; }
  .siren-preview { padding: 17px 15px; }
  .siren-preview h3 { font-size: 20px; }
  .siren-preview-details { gap: 15px; }
  .siren-existing { padding: 17px 15px; }
  .siren-existing .button { width: 100%; }
}

@media (max-width: 420px) {
  .organization-mode-options { grid-template-columns: 1fr; gap: 10px; }
  .siren-preview-details { grid-template-columns: 1fr; }
}

/* Plant topology keeps the hierarchy readable without a wide canvas. */
.structure-heading-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 11px; }
.structure-heading .structure-heading-actions .button { margin-top: 0; }
.structure-intro { display: flex; align-items: flex-start; gap: 15px; padding: 20px 22px; margin-bottom: 24px; border: 1px solid #b9d0e9; border-left: 3px solid #367ec7; border-radius: 5px; color: #315776; background: #e6f0fc; }
.structure-intro > .icon { margin-top: 3px; color: #2b639d; }
.structure-intro > div { min-width: 0; }
.structure-intro strong { font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; }
.structure-intro p { margin-top: 7px; font-size: 14px; }
.structure-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 15px; margin: 24px 0; }
.structure-summary > div { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; min-width: 0; padding: 20px; background: #fff; border: 1px solid #cbd9e8; border-top: 3px solid #76a1cd; border-radius: 5px; }
.structure-summary span { flex: 1; color: #4d6580; font-size: 14px; line-height: 1.5; }
.structure-summary strong { font: 650 32px/1.15 ui-monospace,Consolas,monospace; color: #284767; }
.structure-switch { display: flex; flex-wrap: wrap; gap: 12px; padding-bottom: 21px; margin-bottom: 24px; border-bottom: 1px solid #c5d5e6; }
.structure-switch .active { color: #fff; background: #205ba6; border-color: #205ba6; }
.structure-switch .active:hover { background: #164a8d; }
.structure-filters { margin-bottom: 18px; }
.structure-filters .filter-bar { padding-bottom: 14px; }
.structure-filters select { width: 210px; }
.structure-filter-count { margin: 0 24px 19px; color: #526b86; font-size: 14px; }
.structure-tree-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-bottom: 17px; }
.structure-tree-tools p { flex: 1; min-width: 240px; color: #546b83; font-size: 13px; }
.structure-tree-tools .text-link { padding: 0; background: transparent; }
.structure-tree { display: grid; gap: 20px; min-width: 0; }
.structure-node { min-width: 0; border: 1px solid #bfd1e5; border-radius: 5px; background: #fff; box-shadow: 0 3px 12px #17334a08; }
.structure-node > summary { display: flex; align-items: center; gap: 15px; padding: 20px; min-height: 72px; border-radius: 4px; color: #24466a; background: #edf4fc; cursor: pointer; list-style: none; }
.structure-node > summary::-webkit-details-marker { display: none; }
.structure-node > summary:hover { background: #e4effc; }
.structure-node > summary:focus-visible { outline: 3px solid #258bdb; outline-offset: 3px; }
.structure-node[open] > summary { border-bottom: 1px solid #c9d9e9; border-radius: 4px 4px 0 0; }
.structure-chevron { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 25px; height: 30px; font-size: 31px; line-height: 1; transform-origin: center; transition: transform .15s; }
.structure-node[open] > summary > .structure-chevron { transform: rotate(90deg); }
.structure-node-label { display: flex; flex: 1; flex-direction: column; gap: 6px; min-width: 0; }
.structure-node-kind { color: #516d8d; font: 13px/1.5 ui-monospace,Consolas,monospace; }
.structure-node-label strong { font-size: 20px; line-height: 1.45; overflow-wrap: anywhere; }
.structure-node-summary { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 12px; color: #4b6580; font-size: 13px; line-height: 1.5; }
.structure-max { display: flex; align-items: center; gap: 8px; }
.structure-node-body { min-width: 0; padding: 18px; }
.structure-node-notes { color: #536c85; font-size: 14px; line-height: 1.75; white-space: pre-line; overflow-wrap: anywhere; margin-bottom: 17px; }
.structure-node-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.structure-node-actions .button { font-size: 13px; }
.structure-children { display: grid; gap: 16px; margin: 18px 0 0 11px; padding-left: 17px; border-left: 2px solid #b6cde6; }
.structure-zone > summary { background: #f0f5fb; }
.structure-line > summary { background: #f6f8fc; }
.structure-unclassified { border-style: dashed; }
.structure-unclassified > summary { background: #f4f5f7; }
.structure-level-empty { color: #576f88; padding: 11px 0; font-size: 14px; }
.structure-equipment-list { display: grid; gap: 12px; }
.structure-equipment { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 17px; min-width: 0; padding: 19px; border: 1px solid #d1dfec; border-left: 3px solid #74a0cb; border-radius: 5px; background: #fff; }
.structure-equipment-main { display: flex; flex: 1; align-items: flex-start; gap: 13px; min-width: 0; }
.structure-equipment-main > div { min-width: 0; }
.structure-equipment-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 38px; height: 42px; color: #356a9b; background: #edf4fc; border: 1px solid #c8dcee; border-radius: 4px; }
.structure-equipment h3 { margin: 0; color: #294969; font-size: 17px; font-weight: 650; line-height: 1.5; overflow-wrap: anywhere; }
.structure-equipment-main p { margin-top: 5px; color: #536d87; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.structure-equipment-badges { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.structure-equipment-main .structure-inheritance { margin-top: 9px; font-size: 13px; }
.structure-item-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.structure-item-actions .button { font-size: 14px; }
.structure-item-actions .icon { width: 17px; height: 17px; }
.criticality-badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid; border-radius: 4px; font-size: 13px; font-weight: 650; line-height: 1.4; white-space: nowrap; }
.criticality-badge::before { content: ""; width: 6px; height: 6px; background: currentColor; flex-shrink: 0; border-radius: 1px; }
.criticality-undefined { color: #53647a; background: #eef1f5; border-color: #cad2df; }
.criticality-faible { color: #206446; background: #e7f4ed; border-color: #b3d6c4; }
.criticality-moderee { color: #1e5b96; background: #e7f1fe; border-color: #b7d1f0; }
.criticality-haute { color: #87500b; background: #fff1d5; border-color: #dfc38d; }
.criticality-critique { color: #a1262c; background: #ffedef; border-color: #e3b1b6; }
.structure-empty { padding: 30px; text-align: center; color: #516c85; font-size: 15px; line-height: 1.8; margin-top: 20px; }
.structure-empty h2 { color: #294969; font-size: 23px; }
.structure-empty p { max-width: 640px; margin: 16px auto 22px; }
.structure-family-heading { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 18px; margin-bottom: 23px; }
.structure-family-heading > div { flex: 1; min-width: 230px; }
.structure-family-heading p { margin-top: 9px; color: #526b85; font-size: 14px; }
.structure-families { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.structure-family-card { display: flex; flex-direction: column; min-width: 0; padding: 23px; background: #fff; border: 1px solid #cbd9e9; border-top: 3px solid #709bc8; border-radius: 5px; }
.structure-family-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.structure-family-card h3 { margin: 0; color: #294969; font-size: 21px; line-height: 1.5; overflow-wrap: anywhere; }
.structure-family-default { margin-top: 5px; color: #5a7089; font-size: 13px; }
.structure-family-description { color: #4e6782; font-size: 14px; margin-top: 16px; white-space: pre-line; overflow-wrap: anywhere; }
.structure-family-count { margin: 20px 0; color: #536d87; font-size: 14px; }
.structure-family-card .structure-item-actions { margin-top: auto; padding-top: 17px; border-top: 1px solid #d9e4ef; }
.structure-effective { padding: 14px; margin-top: 5px; border: 1px solid #bad0e9; border-left: 3px solid #457cb3; border-radius: 4px; color: #315676; background: #eaf3fc; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.equipment-criticality { margin-top: 21px; }
.equipment-criticality p { color: #536e88; font-size: 13px; margin-top: 8px; overflow-wrap: anywhere; }
.structure-equipment-details { margin-top: 18px; }
.equipment-card-actions { display: flex; margin-top: 22px; }
.equipment-card-actions .button { min-height: 44px; }

@media (max-width: 1450px) {
  .structure-heading { flex-wrap: wrap; }
  .structure-heading-actions { justify-content: flex-start; }
  .structure-families { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .structure-equipment > .structure-item-actions { flex-basis: 100%; padding-top: 13px; border-top: 1px solid #e0e9f2; }
}
@media (max-width: 1100px) {
  .structure-node-summary { justify-content: flex-start; }
  .structure-node > summary { flex-wrap: wrap; gap: 12px; }
  .structure-node-summary { flex-basis: 100%; padding-left: 37px; }
  .structure-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 600px) {
  .structure-heading-actions { width: 100%; }
  .structure-intro { padding: 18px 15px; gap: 11px; }
  .structure-intro strong { font-size: 15px; }
  .structure-summary { gap: 12px; }
  .structure-summary > div { padding: 16px; }
  .structure-summary span { font-size: 13px; }
  .structure-switch { gap: 10px; }
  .structure-switch .button { width: 100%; }
  .structure-filters select { width: 100%; }
  .structure-filter-count { margin-left: 17px; margin-right: 17px; }
  .structure-tree-tools { gap: 2px 23px; }
  .structure-tree-tools p { min-width: 0; flex-basis: 100%; }
  .structure-node > summary { padding: 15px 12px; gap: 10px; }
  .structure-node-label strong { font-size: 18px; }
  .structure-node-kind { font-size: 13px; }
  .structure-node-summary { padding-left: 35px; gap: 9px; }
  .structure-node-body { padding: 12px; }
  .structure-node-actions { gap: 8px; }
  .structure-node-actions .button { flex: 1 1 100%; min-width: 0; font-size: 14px; }
  .structure-children { margin-left: 0; padding-left: 7px; border-left-width: 1px; gap: 13px; }
  .structure-children .structure-node-body { padding: 9px; }
  .structure-equipment { padding: 14px 11px; }
  .structure-equipment-main { flex-wrap: wrap; gap: 10px; }
  .structure-equipment-main > div { flex-basis: 100%; }
  .structure-equipment h3 { font-size: 17px; }
  .structure-equipment-icon { width: 33px; height: 35px; }
  .structure-item-actions { width: 100%; }
  .structure-item-actions .button { width: 100%; font-size: 14px; }
  .structure-max { flex-wrap: wrap; }
  .structure-family-heading > div { min-width: 0; flex-basis: 100%; }
  .structure-family-heading > .button { width: 100%; }
  .structure-families { grid-template-columns: 1fr; }
  .structure-family-card { padding: 22px; }
  .structure-family-card .structure-item-actions { width: auto; }
  .structure-empty { padding: 25px 18px; }
  .structure-empty .button, .equipment-card-actions .button { width: 100%; }
}
/* Make room for Structure without reducing navigation text or touch targets. */
@media (min-width: 901px) and (max-height: 800px) {
  .sidebar { padding-top: 18px; }
  .organization-switcher { margin-top: 17px; margin-bottom: 12px; padding: 12px 0; }
  #tenant-navigation .nav-caption { margin-top: 12px; margin-bottom: 9px; }
  .sidebar .nav-item { min-height: 44px; padding-top: 9px; padding-bottom: 9px; margin-bottom: 4px; }
  .sidebar-bottom { padding-top: 10px; }
  .user-card { margin-top: 8px; padding-top: 13px; padding-bottom: 13px; }
}

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