/* ==========================================================================
   LiftOps — Application layout
   Splash, auth, the two app shells (mobile / operations desktop), screens.
   ========================================================================== */

/* ==========================================================================
   Splash
   ========================================================================== */
.splash {
  position: fixed; inset: 0; z-index: var(--z-splash);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 20%, var(--brand-800), var(--brand-900) 62%);
  color: #fff; text-align: center; padding: var(--sp-6);
  transition: opacity var(--dur-slow) var(--ease), visibility var(--dur-slow);
}
.splash.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.splash__inner { display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); }
.splash__logo { width: 96px; height: 96px; animation: liftIn 700ms var(--ease); }
.splash__name {
  font-size: 42px; font-weight: var(--fw-bold); letter-spacing: -0.5px; line-height: 1;
  animation: fadeUp 600ms var(--ease) 120ms both;
}
.splash__tagline {
  font-size: var(--fs-sm); color: var(--brand-200); max-width: 30ch; line-height: 1.6;
  animation: fadeUp 600ms var(--ease) 240ms both;
}
.splash__bar {
  width: 168px; height: 3px; border-radius: var(--r-pill); background: rgba(255,255,255,.16);
  overflow: hidden; margin-top: var(--sp-4);
}
.splash__bar span { display: block; height: 100%; background: #fff; border-radius: var(--r-pill);
  animation: loadBar 1500ms var(--ease) forwards; }
.splash__motto {
  margin-top: var(--sp-3); font-size: var(--fs-xs); letter-spacing: 2px; color: rgba(255,255,255,.55);
  text-transform: uppercase; animation: fadeUp 600ms var(--ease) 420ms both;
}
.splash__foot {
  position: absolute; inset-block-end: var(--sp-7); font-size: var(--fs-xs); color: rgba(255,255,255,.42);
}
@keyframes liftIn { from { opacity: 0; transform: translateY(22px) scale(.9); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }
@keyframes loadBar { from { width: 0; } to { width: 100%; } }

/* ==========================================================================
   Auth / login
   ========================================================================== */
.auth {
  min-height: 100dvh; display: flex; align-items: stretch;
  background: var(--bg);
}
.auth__aside {
  flex: 1 1 0; background:
    linear-gradient(150deg, var(--brand-900) 0%, var(--brand-800) 55%, var(--brand-700) 100%);
  color: #fff; padding: var(--sp-9) var(--sp-8); display: none; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.auth__aside::after {
  content: ""; position: absolute; inset-block-start: -120px; inset-inline-end: -120px;
  width: 420px; height: 420px; border-radius: 50%; background: rgba(255,255,255,.035);
}
.auth__aside-inner { position: relative; max-width: 460px; }
.auth__aside h2 { color: #fff; font-size: 32px; line-height: 1.35; margin-bottom: var(--sp-4); }
.auth__aside p { color: var(--brand-200); font-size: var(--fs-md); line-height: 1.8; }
.auth__points { list-style: none; padding: 0; margin: var(--sp-6) 0 0; display: grid; gap: var(--sp-3); }
.auth__points li { display: flex; gap: var(--sp-3); align-items: flex-start; font-size: var(--fs-sm); color: #E3EAF9; }
.auth__points .ico { color: #7FE0A8; margin-top: 2px; }

.auth__main {
  flex: 0 0 auto; width: 100%; max-width: 520px; background: var(--surface);
  padding: var(--sp-6) var(--sp-5) var(--sp-8); display: flex; flex-direction: column;
  justify-content: center; overflow-y: auto; box-shadow: var(--sh-lg);
}
.auth__brand { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-7); }
.auth__brand-logo { width: 46px; height: 46px; }
.auth__brand-name { font-size: var(--fs-2xl); font-weight: var(--fw-bold); line-height: 1; letter-spacing: -.3px; }
.auth__brand-sub { font-size: var(--fs-xs); color: var(--muted); }
.auth__title { font-size: var(--fs-2xl); margin-bottom: 4px; }
.auth__sub { color: var(--muted); font-size: var(--fs-sm); margin-bottom: var(--sp-6); }
.auth__demo { margin-top: var(--sp-6); }
.auth__demo-title {
  display: flex; align-items: center; gap: var(--sp-3); color: var(--muted);
  font-size: var(--fs-xs); font-weight: var(--fw-semi); margin-bottom: var(--sp-3);
}
.auth__demo-title::before, .auth__demo-title::after {
  content: ""; height: 1px; background: var(--divider); flex: 1 1 auto;
}
.auth__roles { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.auth__role {
  display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-3);
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2);
  cursor: pointer; text-align: start; min-height: var(--tap);
  transition: all var(--dur-fast) var(--ease);
}
.auth__role:hover { border-color: var(--primary); background: var(--primary-soft); }
.auth__role-name { font-size: var(--fs-sm); font-weight: var(--fw-semi); line-height: 1.3; }
.auth__role-desc { font-size: var(--fs-2xs); color: var(--muted); }
.auth__foot { margin-top: var(--sp-7); font-size: var(--fs-xs); color: var(--muted-2); text-align: center; line-height: 1.8; }

/* ==========================================================================
   App shell — shared
   ========================================================================== */
.app { min-height: 100dvh; }
.app[hidden] { display: none; }

/* --------------------------------------------------------------------------
   MOBILE SHELL (customer + technician)
   On desktop it is presented inside a device frame — these roles are
   genuinely phone-first products, not shrunken dashboards.
   -------------------------------------------------------------------------- */
.mshell {
  display: flex; flex-direction: column;
  min-height: 100dvh; background: var(--bg); position: relative;
  max-width: 100%; margin: 0 auto;
}
.mshell__top {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: var(--sp-3) var(--sp-4);
  padding-top: calc(var(--sp-3) + env(safe-area-inset-top, 0px));
  display: flex; align-items: center; gap: var(--sp-3); min-height: 58px;
}
.mshell__top--brand {
  background: linear-gradient(135deg, var(--brand-900), var(--brand-700));
  color: #fff; border-bottom: 0;
}
.mshell__top--brand .mshell__title, .mshell__top--brand .btn--ghost { color: #fff; }
.mshell__top--brand .mshell__sub { color: var(--brand-200); }
.mshell__top--brand .btn--ghost:hover { background: rgba(255,255,255,.12); }
.mshell__title { font-size: var(--fs-lg); font-weight: var(--fw-bold); line-height: 1.25; }
.mshell__sub { font-size: var(--fs-xs); color: var(--muted); }
.mshell__main {
  flex: 1 1 auto; padding: var(--sp-4);
  padding-bottom: calc(var(--bottomnav-h) + var(--sp-6) + env(safe-area-inset-bottom, 0px));
}
.mshell__main--flush { padding-inline: 0; }

/* Bottom navigation */
.bnav {
  position: fixed; inset-block-end: 0; inset-inline: 0; z-index: var(--z-nav);
  background: rgba(255,255,255,.97); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  max-width: 100%; margin: 0 auto;
}
.bnav__item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: var(--bottomnav-h); border: 0; background: none; cursor: pointer;
  color: var(--muted); font-size: var(--fs-2xs); font-weight: var(--fw-medium);
  position: relative; padding: 6px 2px; transition: color var(--dur-fast) var(--ease);
}
.bnav__item .ico { width: 21px; height: 21px; }
.bnav__item--active { color: var(--primary); font-weight: var(--fw-bold); }
.bnav__item--active::before {
  content: ""; position: absolute; inset-block-start: 0; inset-inline: 28%;
  height: 3px; border-radius: 0 0 var(--r-pill) var(--r-pill); background: var(--primary);
}
.bnav__item--cta { color: var(--primary); }
.bnav__item--cta .bnav__cta-circle {
  width: 42px; height: 42px; border-radius: 50%; background: var(--primary); color: #fff;
  display: grid; place-items: center; box-shadow: 0 4px 12px rgba(36,86,230,.4); margin-top: -14px;
}
.bnav__badge {
  position: absolute; inset-block-start: 6px; inset-inline-end: 22%;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--r-pill);
  background: var(--danger); color: #fff; font-size: 9.5px; font-weight: var(--fw-bold);
  display: grid; place-items: center; line-height: 1;
}

/* Sticky primary action above the bottom nav */
.sticky-cta {
  position: sticky; inset-block-end: calc(var(--bottomnav-h) + var(--sp-2));
  z-index: calc(var(--z-nav) - 1); margin-top: var(--sp-5);
}

/* Mobile hero (customer/technician greeting block) */
.hero {
  background: linear-gradient(135deg, var(--brand-900), var(--brand-700));
  color: #fff; padding: var(--sp-5) var(--sp-4) var(--sp-8);
  margin: calc(var(--sp-4) * -1) calc(var(--sp-4) * -1) 0;
  border-radius: 0 0 var(--r-xl) var(--r-xl);
}
.hero__greet { font-size: var(--fs-xs); color: var(--brand-200); }
.hero__name { font-size: var(--fs-2xl); font-weight: var(--fw-bold); line-height: 1.2; }
.hero__meta { font-size: var(--fs-xs); color: var(--brand-200); margin-top: 2px; }
.hero + * { margin-top: calc(var(--sp-6) * -1); position: relative; }
.hero__cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-2); }
.hero__card {
  background: var(--surface); border-radius: var(--r-md); padding: var(--sp-3) var(--sp-2);
  text-align: center; box-shadow: var(--sh-sm); border: 1px solid var(--border);
}
.hero__card-value { font-size: var(--fs-xl); font-weight: var(--fw-bold); line-height: 1.2; color: var(--text); }
.hero__card-label { font-size: 10px; color: var(--muted); line-height: 1.35; }

/* Quick action grid */
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); }
.quick {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: var(--sp-3) var(--sp-2);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  cursor: pointer; font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--text-2);
  min-height: 82px; justify-content: center; text-align: center;
  transition: all var(--dur-fast) var(--ease);
}
.quick:hover { border-color: var(--primary); color: var(--primary); box-shadow: var(--sh-sm); }
.quick__icon {
  width: 36px; height: 36px; border-radius: var(--r-sm); display: grid; place-items: center;
  background: var(--primary-soft); color: var(--brand-600);
}
.quick--danger .quick__icon { background: var(--danger-soft); color: var(--danger-text); }
.quick--warning .quick__icon { background: var(--warning-soft); color: var(--warning-text); }
.quick--success .quick__icon { background: var(--success-soft); color: var(--success-text); }
.quick--info .quick__icon { background: var(--info-soft); color: var(--info-text); }

/* --------------------------------------------------------------------------
   OPERATIONS SHELL (supervisor / operations manager / admin)
   Real desktop layout: fixed sidebar + topbar + fluid content.
   -------------------------------------------------------------------------- */
.oshell { display: flex; min-height: 100dvh; }

.osidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: var(--sidebar-bg); color: var(--sidebar-text);
  display: flex; flex-direction: column; position: fixed; inset-block: 0; inset-inline-start: 0;
  z-index: var(--z-drawer); overflow-y: auto;
  transition: transform var(--dur) var(--ease);
}
.osidebar__brand {
  display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4);
  border-bottom: 1px solid rgba(255,255,255,.08); min-height: var(--topbar-h);
}
.osidebar__brand-logo { width: 34px; height: 34px; flex: 0 0 auto; }
.osidebar__brand-name { color: #fff; font-weight: var(--fw-bold); font-size: var(--fs-lg); line-height: 1; letter-spacing: -.2px; }
.osidebar__brand-sub { font-size: 10px; color: rgba(255,255,255,.45); }
.osidebar__tenant {
  margin: var(--sp-3); padding: var(--sp-3); border-radius: var(--r-md);
  background: rgba(255,255,255,.06); display: flex; align-items: center; gap: var(--sp-2);
}
.osidebar__tenant-name { font-size: var(--fs-xs); font-weight: var(--fw-semi); color: #fff; line-height: 1.3; }
.osidebar__tenant-plan { font-size: 10px; color: rgba(255,255,255,.45); }
.osidebar__nav { padding: var(--sp-2) var(--sp-3) var(--sp-5); display: flex; flex-direction: column; gap: 2px; }
.osidebar__group {
  font-size: 10px; font-weight: var(--fw-bold); color: rgba(255,255,255,.35);
  padding: var(--sp-4) var(--sp-3) var(--sp-2); letter-spacing: .6px;
}
.osidebar__link {
  display: flex; align-items: center; gap: var(--sp-3); padding: 0 var(--sp-3);
  min-height: 42px; border-radius: var(--r-sm); color: var(--sidebar-text);
  font-size: var(--fs-sm); font-weight: var(--fw-medium); cursor: pointer; border: 0;
  background: transparent; width: 100%; text-align: start;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.osidebar__link:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.osidebar__link--active { background: var(--primary); color: #fff; font-weight: var(--fw-semi); box-shadow: var(--sh-sm); }
.osidebar__link .ico { width: 18px; height: 18px; }
.osidebar__link-badge {
  margin-inline-start: auto; background: rgba(255,255,255,.16); color: #fff;
  font-size: 10px; font-weight: var(--fw-bold); padding: 1px 7px; border-radius: var(--r-pill);
}
.osidebar__link-badge--danger { background: var(--danger); }
.osidebar__foot { margin-top: auto; padding: var(--sp-3); border-top: 1px solid rgba(255,255,255,.08); }

.osidebar__backdrop { display: none; }

.omain { flex: 1 1 auto; min-width: 0; margin-inline-start: var(--sidebar-w); display: flex; flex-direction: column; }

.otopbar {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: rgba(255,255,255,.96); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  min-height: var(--topbar-h); display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-5);
}
.otopbar__title { font-size: var(--fs-lg); font-weight: var(--fw-bold); line-height: 1.2; }
.otopbar__sub { font-size: var(--fs-xs); color: var(--muted); }
.otopbar__search { position: relative; flex: 0 1 340px; margin-inline-start: var(--sp-4); }
.otopbar__search .input { min-height: 38px; background: var(--surface-inset); border-color: transparent; }
.otopbar__search .input:focus { background: var(--surface); border-color: var(--primary); }
.otopbar__kbd {
  position: absolute; inset-inline-end: 8px; inset-block-start: 50%; transform: translateY(-50%);
  font-size: 10px; color: var(--muted-2); background: var(--surface); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 5px; pointer-events: none;
}
.otopbar__actions { margin-inline-start: auto; display: flex; align-items: center; gap: var(--sp-2); }

.ocontent { padding: var(--sp-5); flex: 1 1 auto; }
.ocontent--tight { padding: var(--sp-4); }

.page-head { display: flex; align-items: flex-start; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-5); }
.page-head__title { font-size: var(--fs-2xl); font-weight: var(--fw-bold); line-height: 1.25; }
.page-head__sub { font-size: var(--fs-sm); color: var(--muted); }
.page-head__actions { margin-inline-start: auto; display: flex; gap: var(--sp-2); flex-wrap: wrap; }

/* Dashboard grids */
.grid { display: grid; gap: var(--sp-4); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid--1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }

/* Activity feed */
.feed { display: flex; flex-direction: column; }
.feed__item { display: flex; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--divider); }
.feed__item:last-child { border-bottom: 0; }
.feed__icon { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
  background: var(--surface-inset); color: var(--muted); }
.feed__text { font-size: var(--fs-sm); line-height: 1.5; }
.feed__time { font-size: var(--fs-xs); color: var(--muted-2); }

/* Ticket cards (mobile + list contexts) */
.tcard {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--sp-3) var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2);
  cursor: pointer; position: relative; overflow: hidden;
  transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.tcard:hover { box-shadow: var(--sh-md); border-color: var(--border-strong); }
.tcard::before {
  content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: var(--neutral);
}
.tcard--normal::before    { background: var(--prio-normal); }
.tcard--urgent::before    { background: var(--prio-urgent); }
.tcard--emergency::before { background: var(--prio-emergency); }
.tcard--emergency { border-color: rgba(220,43,60,.32); background: linear-gradient(90deg, rgba(220,43,60,.045), transparent 45%); }
.tcard__head { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.tcard__title { font-weight: var(--fw-semi); font-size: var(--fs-md); line-height: 1.35; }
.tcard__meta { font-size: var(--fs-xs); color: var(--muted); display: flex; align-items: center; gap: var(--sp-1); flex-wrap: wrap; }
.tcard__foot { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; padding-top: var(--sp-1); }
.tcard__actions { display: flex; gap: var(--sp-2); margin-top: var(--sp-1); }
.tcard__actions .btn { flex: 1 1 0; }

/* Detail page header block */
.dhead {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-3);
}
.dhead--emergency { border-color: rgba(220,43,60,.35); box-shadow: 0 0 0 3px rgba(220,43,60,.07); }
.dhead__top { display: flex; align-items: flex-start; gap: var(--sp-3); flex-wrap: wrap; }
.dhead__id { font-size: var(--fs-lg); font-weight: var(--fw-bold); }
.dhead__title { font-size: var(--fs-xl); font-weight: var(--fw-bold); line-height: 1.3; }
.dhead__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--sp-3);
  padding-top: var(--sp-3); border-top: 1px solid var(--divider); }
.dfact__label { font-size: var(--fs-2xs); color: var(--muted); }
.dfact__value { font-size: var(--fs-sm); font-weight: var(--fw-semi); }

/* Technician availability strip */
.avail-bar {
  display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
}

/* Work timer */
.worktimer {
  display: flex; align-items: center; justify-content: center; gap: var(--sp-3);
  background: var(--brand-900); color: #fff; border-radius: var(--r-lg); padding: var(--sp-4);
}
.worktimer__value { font-size: var(--fs-3xl); font-weight: var(--fw-bold); font-family: var(--font-mono);
  font-variant-numeric: tabular-nums; letter-spacing: 1px; direction: ltr; }
.worktimer__label { font-size: var(--fs-xs); color: var(--brand-200); }

/* GPS verification panel */
.gpsbox {
  border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface);
}
.gpsbox__row {
  display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--divider); font-size: var(--fs-sm);
}
.gpsbox__row:last-child { border-bottom: 0; }
.gpsbox__dist { font-size: var(--fs-2xl); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
.gpsbox--ok { border-color: rgba(18,161,80,.4); }
.gpsbox--far { border-color: rgba(222,123,8,.4); }

/* Checklist */
.chk-item {
  display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--divider);
}
.chk-item:last-child { border-bottom: 0; }
.chk-item__label { flex: 1 1 auto; font-size: var(--fs-sm); font-weight: var(--fw-medium); min-width: 0; }
.chk-item__opts { display: flex; gap: 4px; flex: 0 0 auto; }
.chk-opt {
  min-width: 38px; height: 34px; border-radius: var(--r-sm); border: 1px solid var(--border-strong);
  background: var(--surface); cursor: pointer; display: grid; place-items: center; color: var(--muted);
  font-size: var(--fs-xs); font-weight: var(--fw-semi); padding: 0 8px;
}
.chk-opt--pass.is-on { background: var(--success); border-color: var(--success); color: #fff; }
.chk-opt--fail.is-on { background: var(--danger); border-color: var(--danger); color: #fff; }
.chk-opt--na.is-on   { background: var(--neutral); border-color: var(--neutral); color: #fff; }

/* Rating */
.rate-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-2) 0; }

/* Scorecard */
.score-ring { display: flex; align-items: center; gap: var(--sp-4); }
.score-ring__circle {
  width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
  position: relative; background: conic-gradient(var(--primary) var(--pct, 0%), var(--surface-inset) 0);
}
.score-ring__circle::after {
  content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--surface);
}
.score-ring__num { position: relative; z-index: 1; font-size: var(--fs-xl); font-weight: var(--fw-bold); }
.score-bd { display: grid; gap: 7px; flex: 1 1 auto; min-width: 0; }
.score-bd__row { display: grid; grid-template-columns: minmax(96px, 34%) 1fr auto; align-items: center; gap: var(--sp-2);
  font-size: var(--fs-xs); }

/* Alert row (supervisor alerts) */
.alert-row {
  display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--divider); cursor: pointer;
}
.alert-row:last-child { border-bottom: 0; }
.alert-row:hover { background: var(--surface-2); }

/* Notification item */
.notif { display: flex; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--divider);
  cursor: pointer; background: var(--surface); text-align: start; width: 100%; border-inline: 0; border-top: 0; }
.notif:hover { background: var(--surface-2); }
.notif--unread { background: var(--primary-soft); }
.notif--unread:hover { background: #E4ECFF; }
.notif__icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
  background: var(--surface-inset); color: var(--muted); }
.notif__title { font-size: var(--fs-sm); font-weight: var(--fw-semi); line-height: 1.4; }
.notif__body { font-size: var(--fs-xs); color: var(--muted); line-height: 1.5; }
.notif__time { font-size: var(--fs-2xs); color: var(--muted-2); margin-inline-start: auto; flex: 0 0 auto; }
.notif__unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex: 0 0 auto; margin-top: 6px; }

/* Audit trail */
.audit { font-size: var(--fs-sm); }
.audit__row { display: grid; grid-template-columns: 96px 1fr; gap: var(--sp-3); padding: var(--sp-2) 0;
  border-bottom: 1px dashed var(--divider); align-items: baseline; }
.audit__row:last-child { border-bottom: 0; }
.audit__time { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--muted); direction: ltr; text-align: start; }
.audit__act { font-weight: var(--fw-semi); }
.audit__meta { font-size: var(--fs-xs); color: var(--muted); }

/* Report card in reports centre */
.report-card {
  display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-4);
  border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.report-card:hover { border-color: var(--primary); box-shadow: var(--sh-md); }
.report-card__icon { width: 40px; height: 40px; border-radius: var(--r-sm); display: grid; place-items: center;
  background: var(--primary-soft); color: var(--brand-600); flex: 0 0 auto; }

/* Integration card */
.integ {
  display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4);
  border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface);
}
.integ__logo { width: 40px; height: 40px; border-radius: var(--r-sm); display: grid; place-items: center;
  background: var(--surface-inset); color: var(--text-2); flex: 0 0 auto; }

/* Demo / presentation mode bar */
/* The demo bar is a fixed strip of exactly --demobar-h so the bottom
   navigation and the scroll padding can both offset by a known amount.
   It scrolls horizontally rather than wrapping — a wrapping bar would grow
   unpredictably and cover the navigation beneath it. */
:root { --demobar-h: 48px; }

.demobar {
  position: fixed; inset-block-end: 0; inset-inline: 0; z-index: var(--z-sticky);
  background: var(--brand-900); color: #fff; padding: 0 var(--sp-3);
  height: var(--demobar-h);
  display: flex; align-items: center; gap: var(--sp-2); flex-wrap: nowrap;
  overflow-x: auto; scrollbar-width: none;
  box-shadow: 0 -4px 16px rgba(11,27,58,.25);
}
.demobar::-webkit-scrollbar { display: none; }
.demobar > * { flex: 0 0 auto; }
.demobar__label { font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--brand-200);
  display: flex; align-items: center; gap: 6px; }
.demobar__btn {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: #fff;
  border-radius: var(--r-pill); padding: 5px 12px; font-size: var(--fs-xs); font-weight: var(--fw-medium);
  cursor: pointer; min-height: 32px;
}
.demobar__btn:hover { background: rgba(255,255,255,.2); }

/* Everything anchored to the bottom shifts up by exactly the bar's height. */
body.has-demobar .bnav { inset-block-end: var(--demobar-h); }
body.has-demobar .toast-root { inset-block-end: calc(var(--bottomnav-h) + var(--demobar-h) + var(--sp-4)); }
body.has-demobar .mshell__main {
  padding-bottom: calc(var(--bottomnav-h) + var(--demobar-h) + var(--sp-6) + env(safe-area-inset-bottom, 0px));
}
body.has-demobar .ocontent { padding-bottom: calc(var(--demobar-h) + var(--sp-6)); }
body.has-demobar .sticky-cta { inset-block-end: calc(var(--bottomnav-h) + var(--demobar-h) + var(--sp-2)); }

/* Role switcher pill in topbar */
.roleswitch {
  display: flex; align-items: center; gap: var(--sp-2); padding: 4px 4px 4px var(--sp-3);
  border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface);
  cursor: pointer; min-height: 40px;
}
.roleswitch:hover { border-color: var(--primary); }
.roleswitch__name { font-size: var(--fs-sm); font-weight: var(--fw-semi); line-height: 1.2; }
.roleswitch__role { font-size: var(--fs-2xs); color: var(--muted); }

/* Offline banner */
.net-banner {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: var(--z-toast);
  background: var(--warning-text); color: #fff; text-align: center;
  font-size: var(--fs-xs); font-weight: var(--fw-semi); padding: 6px var(--sp-4);
}

/* Success screen (ticket created) */
.success-screen { text-align: center; padding: var(--sp-6) var(--sp-4); }
.success-screen__icon {
  width: 88px; height: 88px; border-radius: 50%; margin: 0 auto var(--sp-4);
  background: var(--success-soft); color: var(--success); display: grid; place-items: center;
  animation: popIn 460ms var(--ease);
}
@keyframes popIn { from { transform: scale(.6); opacity: 0; } }
.success-screen__ticket {
  font-family: var(--font-mono); font-size: var(--fs-2xl); font-weight: var(--fw-bold);
  color: var(--brand-700); direction: ltr; letter-spacing: .5px;
}

/* Repeated-fault warning */
.repeat-warn {
  display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-4);
  background: linear-gradient(135deg, #FFF8E9, #FDF2E2); border: 1px solid rgba(222,123,8,.3);
  border-radius: var(--r-lg);
}

/* AI teaser card */
.ai-card {
  background: linear-gradient(135deg, #1A1035, #2C1B5A); color: #fff;
  border-radius: var(--r-lg); padding: var(--sp-4); position: relative; overflow: hidden;
}
.ai-card::after {
  content: ""; position: absolute; inset-block-start: -40px; inset-inline-end: -40px;
  width: 160px; height: 160px; border-radius: 50%; background: rgba(168,132,255,.18);
}
.ai-card__badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-2xs); font-weight: var(--fw-bold);
  background: rgba(255,255,255,.16); padding: 3px 9px; border-radius: var(--r-pill);
}
.ai-card__quote { font-size: var(--fs-sm); line-height: 1.7; position: relative; }
.ai-card__sugg { font-size: var(--fs-xs); color: #CDBEFF; position: relative; }

/* Contract / list mini rows */
.mini-row { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--divider); font-size: var(--fs-sm); }
.mini-row:last-child { border-bottom: 0; }

/* Filter bar */
.filterbar {
  display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center;
  padding: var(--sp-3); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); margin-bottom: var(--sp-4);
}
.filterbar .select, .filterbar .input { min-height: 38px; width: auto; min-width: 140px; flex: 0 1 auto; font-size: var(--fs-sm); }
.filterbar__count { margin-inline-start: auto; font-size: var(--fs-xs); color: var(--muted); }

/* Search results */
.sresult { display: flex; gap: var(--sp-3); align-items: center; padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--divider); cursor: pointer; }
.sresult:hover { background: var(--surface-2); }
.sresult__type { font-size: var(--fs-2xs); color: var(--muted); }
