:root {
  --ink: #172622;
  --muted: #687672;
  --forest: #173f3b;
  --forest-2: #245a53;
  --mint: #eaf7f3;
  --mint-strong: #d5eee6;
  --coral: #f2876b;
  --coral-soft: #fff0eb;
  --amber: #d99725;
  --amber-soft: #fff7df;
  --blue: #5578b8;
  --blue-soft: #eef3ff;
  --surface: #fffefa;
  --canvas: #f4f5ef;
  --line: #e2e7e1;
  --danger: #b44545;
  --shadow: 0 18px 50px rgba(26, 58, 52, 0.1);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; min-height: 100vh; background: var(--canvas); }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
a { color: inherit; }
.is-hidden { display: none !important; }

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 1.05fr) minmax(430px, 0.95fr);
  background: var(--surface);
}

.login-story {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px clamp(40px, 6vw, 92px);
  color: #f8fffc;
  background:
    radial-gradient(circle at 10% 82%, rgba(242, 135, 107, 0.25), transparent 28%),
    radial-gradient(circle at 84% 14%, rgba(145, 210, 190, 0.25), transparent 26%),
    var(--forest);
}

.login-story::after {
  content: "";
  position: absolute;
  right: -190px;
  bottom: -210px;
  width: 480px;
  height: 480px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 50%;
  box-shadow: 0 0 0 80px rgba(255,255,255,.03), 0 0 0 160px rgba(255,255,255,.02);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--forest);
  font-size: 18px;
  font-weight: 760;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand-light { color: white; position: relative; z-index: 1; }
.story-copy { position: relative; z-index: 1; max-width: 700px; }
.story-copy h1 {
  max-width: 680px;
  margin: 13px 0 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(40px, 5.1vw, 72px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.04em;
}
.story-copy > p:last-child {
  max-width: 570px;
  margin: 0;
  color: rgba(247, 255, 252, 0.74);
  font-size: 18px;
  line-height: 1.6;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--forest-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.eyebrow-light { color: #a9dccd; }

.story-proof {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 46px;
  margin-top: 38px;
}
.story-proof div { display: grid; gap: 4px; }
.story-proof strong { font-size: 25px; }
.story-proof span { color: rgba(255,255,255,.62); font-size: 13px; }

.login-panel {
  display: grid;
  place-items: center;
  padding: 42px;
  background:
    linear-gradient(rgba(23,63,59,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23,63,59,.025) 1px, transparent 1px),
    var(--surface);
  background-size: 32px 32px;
}

.login-card { width: min(100%, 430px); }
.login-heading { margin-bottom: 30px; }
.login-heading h2 {
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -.035em;
}
.login-heading > p:last-child { margin: 0; color: var(--muted); line-height: 1.5; }
.mobile-logo { display: none; }

.field { display: grid; gap: 7px; margin-bottom: 17px; }
.field > span { font-size: 13px; font-weight: 700; color: #475752; }
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid #d9e1db;
  border-radius: 12px;
  outline: none;
  padding: 12px 13px;
  color: var(--ink);
  background: white;
  transition: border-color .18s, box-shadow .18s;
}
.field textarea { resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: #6ca295;
  box-shadow: 0 0 0 4px rgba(89, 153, 139, .12);
}
.field input::placeholder, .field textarea::placeholder { color: #a2ada8; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 9px 15px;
  cursor: pointer;
  font-weight: 750;
  transition: transform .15s, background .15s, box-shadow .15s;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .58; transform: none; }
.button-primary { color: white; background: var(--forest); box-shadow: 0 8px 20px rgba(23,63,59,.16); }
.button-primary:hover { background: #0f3431; }
.button-secondary { color: var(--forest); background: white; border-color: var(--line); }
.button-secondary:hover { background: var(--mint); }
.button-soft { color: var(--forest); background: var(--mint); }
.button-danger { color: var(--danger); background: #fff2f2; }
.button-small { min-height: 34px; padding: 6px 10px; border-radius: 9px; font-size: 13px; }
.button-large { width: 100%; min-height: 50px; font-size: 15px; }

.form-error { min-height: 20px; margin: 9px 0 0; color: var(--danger); font-size: 13px; }
.demo-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 14px; color: #9aa59f; font-size: 12px; }
.demo-divider::before, .demo-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.demo-users { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.demo-user {
  display: grid;
  justify-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px 6px;
  cursor: pointer;
  background: rgba(255,255,255,.78);
}
.demo-user:hover { border-color: #98bcb2; background: var(--mint); }
.demo-user > span:last-child { display: grid; gap: 2px; text-align: center; }
.demo-user strong { font-size: 12px; }
.demo-user small { color: var(--muted); font-size: 9px; }
.avatar {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 850;
}
.avatar-coral { color: #8b3c29; background: #ffd9ce; }
.avatar-blue { color: #31538f; background: #dce7ff; }
.avatar-green { color: #1c5a4e; background: #d4eee6; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 258px minmax(0, 1fr); }
.sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  width: 258px;
  display: flex;
  flex-direction: column;
  padding: 24px 17px 16px;
  border-right: 1px solid #dde4de;
  background: rgba(255, 254, 250, .96);
  backdrop-filter: blur(16px);
}
.sidebar .brand { padding: 0 10px 25px; }
.main-nav { display: grid; gap: 4px; }
.nav-item {
  width: 100%;
  display: grid;
  grid-template-columns: 29px 1fr auto;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 11px;
  padding: 10px 11px;
  color: #5f6f69;
  cursor: pointer;
  text-align: left;
  background: transparent;
  font-size: 14px;
  font-weight: 680;
}
.nav-item:hover { color: var(--forest); background: #f2f5f0; }
.nav-item.is-active { color: var(--forest); background: var(--mint); }
.nav-icon { display: grid; place-items: center; font-size: 19px; font-weight: 500; }
.nav-counter {
  min-width: 22px;
  border-radius: 999px;
  padding: 2px 6px;
  color: white;
  background: var(--coral);
  text-align: center;
  font-size: 10px;
}
.sidebar-insight {
  margin: auto 6px 18px;
  border: 1px solid #d8e7e0;
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(145deg, #f4fbf8, #edf5f0);
}
.insight-icon { display: inline-grid; place-items: center; width: 29px; height: 29px; margin-bottom: 8px; border-radius: 9px; color: white; background: var(--forest); }
.sidebar-insight strong { display: block; font-size: 13px; }
.sidebar-insight p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.profile-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 8px 2px;
  border-top: 1px solid var(--line);
}
.profile-copy { min-width: 0; display: grid; gap: 2px; }
.profile-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.profile-copy small { color: var(--muted); font-size: 10px; }
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  color: var(--muted);
  background: transparent;
  font-size: 19px;
}
.icon-button:hover { color: var(--forest); background: var(--mint); }
.profile-menu .icon-button { margin-left: auto; }

.app-content { grid-column: 2; min-width: 0; padding: 0 clamp(22px, 3.7vw, 58px) 54px; }
.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 94px;
  margin: 0 -8px 20px;
  padding: 16px 8px;
  background: rgba(244,245,239,.9);
  backdrop-filter: blur(14px);
}
.topbar h1 { margin: 1px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: 31px; font-weight: 500; letter-spacing: -.03em; }
.crumb { margin: 0; color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.today-chip { color: var(--muted); font-size: 12px; font-weight: 650; }
.mobile-nav { display: none; }

.page-stack { display: grid; gap: 19px; }
.hero-banner {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  min-height: 208px;
  border-radius: 23px;
  padding: clamp(24px, 4vw, 40px);
  color: white;
  background: var(--forest);
  box-shadow: var(--shadow);
}
.hero-banner::before {
  content: "";
  position: absolute;
  width: 330px;
  height: 330px;
  right: -100px;
  top: -150px;
  border: 56px solid rgba(255,255,255,.04);
  border-radius: 50%;
}
.hero-copy { position: relative; z-index: 1; align-self: center; max-width: 690px; }
.hero-copy h2 { max-width: 640px; margin: 5px 0 12px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(28px, 3.2vw, 42px); font-weight: 500; line-height: 1.1; letter-spacing: -.035em; }
.hero-copy p { max-width: 560px; margin: 0; color: rgba(255,255,255,.68); line-height: 1.55; }
.hero-action { position: relative; z-index: 1; align-self: end; justify-self: end; display: grid; gap: 9px; justify-items: end; }
.hero-action .button { color: var(--forest); background: #f8fffc; box-shadow: none; }
.hero-action small { color: rgba(255,255,255,.57); }

.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.metric-card {
  position: relative;
  overflow: hidden;
  min-height: 137px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 19px;
  background: var(--surface);
}
.metric-card::after { content: ""; position: absolute; right: -24px; bottom: -28px; width: 83px; height: 83px; border-radius: 50%; background: var(--metric-soft, var(--mint)); }
.metric-top { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; font-weight: 700; }
.metric-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 9px; color: var(--metric, var(--forest)); background: var(--metric-soft, var(--mint)); font-size: 16px; }
.metric-value { position: relative; z-index: 1; display: block; margin-top: 16px; font-family: Georgia, "Times New Roman", serif; font-size: 31px; font-weight: 600; letter-spacing: -.025em; }
.metric-note { position: relative; z-index: 1; display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.metric-card.coral { --metric: #a04934; --metric-soft: var(--coral-soft); }
.metric-card.amber { --metric: #9a6412; --metric-soft: var(--amber-soft); }
.metric-card.blue { --metric: #3f609c; --metric-soft: var(--blue-soft); }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(310px, .75fr); gap: 16px; }
.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.panel-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding: 19px 20px 14px; }
.panel-header h2 { margin: 0; font-size: 16px; letter-spacing: -.015em; }
.panel-header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.panel-body { padding: 0 20px 20px; }
.panel-body.flush { padding: 0; }
.text-button { border: 0; padding: 0; cursor: pointer; color: var(--forest-2); background: none; font-size: 12px; font-weight: 750; }
.text-button:hover { text-decoration: underline; }

.data-list { display: grid; }
.data-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.3fr) minmax(150px, 1fr) minmax(105px, .7fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 68px;
  padding: 12px 20px;
  border-top: 1px solid #edf0ec;
}
.data-row:first-child { border-top: 0; }
.data-row:hover { background: #fafbf8; }
.primary-cell { min-width: 0; display: flex; align-items: center; gap: 11px; }
.equipment-icon { display: grid; place-items: center; width: 37px; height: 37px; flex: 0 0 auto; border-radius: 11px; color: var(--forest); background: var(--mint); }
.cell-copy { min-width: 0; display: grid; gap: 3px; }
.cell-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.cell-copy small, .secondary-cell { color: var(--muted); font-size: 11px; }
.secondary-cell { display: grid; gap: 3px; }
.secondary-cell strong { color: var(--ink); font-size: 12px; }
.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--forest);
  background: var(--mint);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: currentColor; }
.badge-warning { color: #91600e; background: var(--amber-soft); }
.badge-danger { color: #a44935; background: var(--coral-soft); }
.badge-blue { color: #3d5f9b; background: var(--blue-soft); }
.badge-muted { color: #66736e; background: #eef0ed; }
.badge-success { color: #1d6857; background: #e2f5ee; }

.request-list { display: grid; gap: 10px; }
.request-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
}
.request-card:hover { border-color: #b9d3ca; }
.request-card .avatar { width: 34px; height: 34px; }
.request-main { min-width: 0; display: grid; gap: 3px; }
.request-main strong { font-size: 12px; }
.request-main span { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.request-time { color: #89958f; font-size: 10px; }

.section-intro { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 3px; }
.section-intro h2 { margin: 0 0 5px; font-family: Georgia, "Times New Roman", serif; font-size: 25px; font-weight: 500; letter-spacing: -.025em; }
.section-intro p { margin: 0; color: var(--muted); font-size: 13px; }
.toolbar { display: flex; align-items: center; gap: 9px; }
.search-box { position: relative; }
.search-box span { position: absolute; left: 12px; top: 50%; translate: 0 -50%; color: #89958f; }
.search-box input { width: 260px; border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px 10px 34px; outline: none; background: white; }
.search-box input:focus { border-color: #7eab9f; box-shadow: 0 0 0 4px rgba(89,153,139,.1); }

.table-wrap { overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th { padding: 11px 16px; color: #7a8782; background: #fafbf8; text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.data-table td { padding: 13px 16px; border-top: 1px solid #edf0ec; vertical-align: middle; }
.data-table tbody tr:hover { background: #fbfcf9; }
.table-person { display: flex; align-items: center; gap: 10px; }
.table-person strong { display: block; margin-bottom: 2px; }
.table-person small { color: var(--muted); }
.row-actions { display: flex; justify-content: flex-end; gap: 6px; }

.cards-list { display: grid; gap: 12px; }
.workflow-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(170px, .8fr) auto;
  align-items: center;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 17px;
  background: var(--surface);
}
.workflow-card:hover { border-color: #b6d1c8; box-shadow: 0 9px 24px rgba(25, 64, 57, .05); }
.workflow-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.workflow-title h3 { margin: 0 0 4px; font-size: 14px; }
.workflow-title p { margin: 0; color: var(--muted); font-size: 11px; }
.workflow-meta { display: grid; gap: 4px; color: var(--muted); font-size: 11px; }
.workflow-meta strong { color: var(--ink); font-size: 12px; }
.workflow-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }

.technician-board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, .45fr); gap: 16px; }
.route-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--radius);
  padding: 22px;
  color: white;
  background: linear-gradient(145deg, #1d4b46, #153733);
}
.route-card::after { content: "◇"; position: absolute; right: 22px; bottom: -18px; color: rgba(255,255,255,.08); font-size: 140px; }
.route-card h3 { position: relative; z-index: 1; max-width: 350px; margin: 7px 0; font-family: Georgia, "Times New Roman", serif; font-size: 26px; font-weight: 500; }
.route-card p { position: relative; z-index: 1; margin: 0; color: rgba(255,255,255,.66); font-size: 12px; }
.route-card .button { position: relative; z-index: 1; width: fit-content; color: var(--forest); background: white; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.settings-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--surface); }
.settings-card h3 { margin: 0 0 6px; font-size: 15px; }
.settings-card > p { min-height: 39px; margin: 0 0 15px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.feature-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.feature-list li { display: flex; align-items: center; gap: 9px; font-size: 12px; }
.feature-list li::before { content: "✓"; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 7px; color: var(--forest); background: var(--mint); font-weight: 850; }
.feature-list li.todo::before { content: "→"; color: #956313; background: var(--amber-soft); }

.empty-state { display: grid; justify-items: center; gap: 8px; padding: 45px 20px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 15px; color: var(--forest); background: var(--mint); font-size: 24px; }
.empty-state h3 { margin: 5px 0 0; font-size: 15px; }
.empty-state p { max-width: 390px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

.modal {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  border: 0;
  border-radius: 21px;
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(14, 43, 38, .28);
}
.modal::backdrop { background: rgba(14, 34, 30, .45); backdrop-filter: blur(5px); }
.modal-frame { display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; padding: 22px 24px 15px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 25px; font-weight: 500; letter-spacing: -.025em; }
.modal-close { font-size: 25px; }
.modal-body { overflow: auto; padding: 21px 24px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 9px; padding: 15px 24px 20px; border-top: 1px solid var(--line); }
.modal-compact { width: min(510px, calc(100vw - 32px)); }
.modal-passport { width: min(680px, calc(100vw - 32px)); }
.form-section + .form-section { margin-top: 23px; padding-top: 19px; border-top: 1px solid var(--line); }
.form-section h3 { margin: 0 0 14px; font-size: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 15px; }
.field-wide { grid-column: 1 / -1; }
.check-field { display: flex; align-items: flex-start; gap: 9px; margin: 3px 0 15px; color: #4d5d57; font-size: 12px; line-height: 1.4; }
.check-field input { margin-top: 2px; accent-color: var(--forest); }
.summary-callout { margin-bottom: 17px; border-radius: 12px; padding: 13px; color: #35544d; background: var(--mint); font-size: 12px; line-height: 1.5; }
.input-suffix { display: flex; }
.input-suffix input { border-radius: 12px 0 0 12px; }
.input-suffix span { display: grid; place-items: center; min-width: 43px; border: 1px solid #d9e1db; border-left: 0; border-radius: 0 12px 12px 0; color: var(--muted); background: #f5f7f3; font-weight: 700; }

.passport-detail-grid { display: grid; grid-template-columns: 1fr 190px; gap: 22px; }
.passport-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fact { border-radius: 12px; padding: 13px; background: #f7f8f4; }
.fact span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.fact strong { font-size: 12px; }
.qr-card { display: grid; align-content: start; justify-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 14px; padding: 13px; text-align: center; }
.qr-card img { width: 150px; height: 150px; }
.qr-card small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.passport-link { overflow-wrap: anywhere; color: var(--forest-2); font-size: 10px; }
.detail-note { margin-top: 16px; border-left: 3px solid var(--coral); border-radius: 0 9px 9px 0; padding: 11px 13px; background: var(--coral-soft); font-size: 12px; line-height: 1.5; }
.detail-actions { display: flex; gap: 8px; margin-top: 16px; }

.toast-region { position: fixed; z-index: 100; right: 22px; bottom: 22px; display: grid; gap: 9px; }
.toast {
  width: min(360px, calc(100vw - 44px));
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #cee1da;
  border-radius: 13px;
  padding: 13px 14px;
  color: var(--forest);
  background: white;
  box-shadow: var(--shadow);
  animation: toast-in .22s ease-out;
  font-size: 12px;
  line-height: 1.45;
}
.toast::before { content: "✓"; display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 auto; border-radius: 7px; background: var(--mint); font-weight: 850; }
.toast.error { color: var(--danger); border-color: #f1caca; }
.toast.error::before { content: "!"; background: #fff0f0; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1100px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
  .technician-board { grid-template-columns: 1fr; }
  .story-copy h1 { font-size: 52px; }
}

@media (max-width: 860px) {
  .login-page { grid-template-columns: 1fr; }
  .login-story { display: none; }
  .login-panel { min-height: 100vh; padding: 28px; }
  .mobile-logo { display: inline-block; margin-bottom: 20px; }
  .app-shell { display: block; }
  .sidebar { display: none; }
  .app-content { padding: 0 18px 94px; }
  .topbar { min-height: 82px; margin-bottom: 12px; }
  .today-chip { display: none; }
  .mobile-nav {
    position: fixed;
    z-index: 30;
    inset: auto 12px 11px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid rgba(210,221,214,.8);
    border-radius: 16px;
    padding: 7px;
    background: rgba(255,254,250,.94);
    box-shadow: 0 14px 40px rgba(25,55,50,.16);
    backdrop-filter: blur(14px);
  }
  .mobile-nav button { display: grid; justify-items: center; gap: 2px; border: 0; border-radius: 10px; padding: 7px 3px; color: var(--muted); background: transparent; font-size: 9px; font-weight: 750; }
  .mobile-nav button span { font-size: 17px; }
  .mobile-nav button.is-active { color: var(--forest); background: var(--mint); }
  .hero-banner { grid-template-columns: 1fr; }
  .hero-action { justify-self: start; margin-top: 26px; justify-items: start; }
  .workflow-card { grid-template-columns: 1fr; gap: 13px; }
  .workflow-actions { justify-content: flex-start; }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .login-panel { padding: 22px; }
  .login-heading h2 { font-size: 34px; }
  .demo-users { grid-template-columns: 1fr; }
  .demo-user { grid-template-columns: auto 1fr; justify-items: start; text-align: left; padding: 10px 12px; }
  .demo-user > span:last-child { justify-items: start; text-align: left; }
  .topbar h1 { font-size: 25px; }
  .topbar .button { width: 42px; overflow: hidden; white-space: nowrap; padding: 9px 11px; }
  .topbar .button span { font-size: 20px; }
  .metrics-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metric-card { min-height: 123px; padding: 15px; }
  .metric-value { font-size: 26px; }
  .hero-banner { min-height: 244px; padding: 24px; }
  .hero-copy h2 { font-size: 30px; }
  .section-intro { align-items: flex-start; flex-direction: column; }
  .toolbar { width: 100%; }
  .search-box { flex: 1; }
  .search-box input { width: 100%; }
  .panel-header { padding: 16px; }
  .data-row { grid-template-columns: 1fr auto; gap: 10px; padding: 13px 16px; }
  .data-row .secondary-cell:nth-of-type(2) { display: none; }
  .data-row .secondary-cell:nth-of-type(3) { grid-column: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .modal { width: calc(100vw - 16px); max-height: calc(100vh - 16px); border-radius: 17px; }
  .modal-frame { max-height: calc(100vh - 16px); }
  .modal-header, .modal-body, .modal-footer { padding-left: 17px; padding-right: 17px; }
  .modal-footer .button { flex: 1; }
  .passport-detail-grid { grid-template-columns: 1fr; }
  .qr-card { width: 100%; }
  .passport-facts { grid-template-columns: 1fr 1fr; }
}
