/* Родина.Имущество — демо-интерфейс */

@font-face {
  font-family: "Rodina Club Display";
  src: url("fonts/rodina-club-display.85326942db47.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --navy: #001B2D;
  --navy-2: #06263D;
  --ink: #0A1628;
  --cyan: #00B3E4;
  --cyan-dark: #0097C2;
  --paper: #F2F8FC;
  --white: #FFFFFF;
  --card: #FFFFFF;
  --soft: #FAFBFC;
  --hover: #F7F9FB;
  --input-bg: #FFFFFF;
  --table-head: #FAFBFC;
  --sidebar-bg: #001B2D;
  --topbar-bg: rgba(255, 255, 255, .86);
  --line: #DCE3EA;
  --line-soft: #E9EEF3;
  --muted: #5C6B7A;
  --muted-2: #8B98A6;
  --green: #1E9E63;
  --green-bg: #E8F6EE;
  --amber: #C98A00;
  --amber-bg: #FFF5DE;
  --red: #D64545;
  --red-bg: #FDECEC;
  --gray: #8B98A6;
  --gray-bg: #F0F3F6;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(0, 27, 45, .04), 0 14px 34px rgba(0, 27, 45, .06);
  --shadow-lift: 0 18px 50px rgba(0, 27, 45, .16);
  --sidebar-w: 256px;
  --display: "Rodina Club Display", Georgia, "Times New Roman", serif;
  --body: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
}

body[data-theme="dark"] {
  --ink: #F2F8FC;
  --paper: #06131F;
  --white: #0B2333;
  --card: #0B2333;
  --soft: #0E293A;
  --hover: #123246;
  --input-bg: #0A2030;
  --table-head: #0A2030;
  --sidebar-bg: #04101A;
  --topbar-bg: rgba(6, 19, 31, .86);
  --line: rgba(181, 202, 215, .18);
  --line-soft: rgba(181, 202, 215, .10);
  --muted: #A9BECB;
  --muted-2: #7F95A5;
  --cyan-dark: #5BD6F5;
  --green: #9FDEC4;
  --green-bg: rgba(159, 222, 196, .14);
  --amber: #FFC585;
  --amber-bg: rgba(255, 197, 133, .14);
  --red: #FF8E8E;
  --red-bg: rgba(255, 142, 142, .14);
  --gray: #8FA6B5;
  --gray-bg: rgba(143, 166, 181, .12);
  --shadow: 0 20px 50px rgba(0, 0, 0, .24);
  --shadow-lift: 0 24px 60px rgba(0, 0, 0, .42);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(900px 520px at 88% -12%, rgba(0, 179, 228, .07), transparent 62%),
    var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
}

body[data-theme="dark"] {
  background:
    radial-gradient(900px 520px at 88% -12%, rgba(0, 179, 228, .12), transparent 62%),
    var(--paper);
}

button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.muted { color: var(--muted); }
.tabular { font-variant-numeric: tabular-nums; }

/* Layout */

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 22px 14px 16px;
  background: var(--sidebar-bg);
  color: #fff;
  z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 10px 22px;
}

.brand-mark {
  width: 34px;
  height: 50px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong {
  font-family: var(--display);
  font-size: 27px;
  font-weight: 400;
  letter-spacing: .08em;
  line-height: 1;
}
.brand-text span {
  margin-top: 5px;
  color: rgba(255, 255, 255, .55);
  font-size: 10.5px;
  letter-spacing: .03em;
  text-transform: none;
}

.nav { display: flex; flex-direction: column; gap: 3px; }

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, .68);
  text-align: left;
  transition: background .16s, color .16s;
}
.nav-item .icon { width: 17px; height: 17px; opacity: .9; }
.nav-item span:not(.nav-count) { flex: 1; min-width: 0; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.is-active {
  background: rgba(0, 179, 228, .14);
  color: #fff;
}
.nav-item.is-active::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--cyan);
}
.nav-item.is-active .icon { color: var(--cyan); }

.nav-count {
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .09);
  color: rgba(255, 255, 255, .7);
  font-size: 10.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.nav-count-alert { background: rgba(214, 69, 69, .25); color: #FFB9B9; }
.nav-sep { height: 1px; margin: 14px 10px; background: rgba(255, 255, 255, .08); }

.sidebar-foot { margin-top: auto; }
.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 10px 12px;
  padding: 5px 8px;
  border: 1px solid rgba(0, 179, 228, .28);
  border-radius: 6px;
  color: rgba(255, 255, 255, .65);
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px 2px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.user-text { display: flex; flex-direction: column; min-width: 0; }
.user-text strong { font-size: 12.5px; font-weight: 600; }
.user-text span { color: rgba(255, 255, 255, .48); font-size: 10.5px; }

.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #D8EEF6;
  color: #075A73;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  flex: 0 0 auto;
}
.avatar-sm { width: 34px; height: 34px; border: 0; background: #E4EEF4; color: #0A4B60; }
.avatar-green { background: #DDF2E7; color: #156A43; }
.avatar-amber { background: #FFF0D0; color: #8A5B00; }
.avatar-red { background: #FBE0E0; color: #9E2A2A; }
.avatar-blue { background: #DCEFF8; color: #0E607A; }
.avatar-violet { background: #E9E4F8; color: #4D3A85; }

.main { min-width: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 70px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: var(--topbar-bg);
  backdrop-filter: blur(12px);
}

.breadcrumb { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.breadcrumb span { margin: 0 7px; color: #B2BEC9; }
.breadcrumb strong { color: var(--ink); font-weight: 600; }

.topbar-right { display: flex; align-items: center; gap: 10px; min-width: 0; }

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 290px;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--muted);
}
.search:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0, 179, 228, .12); }
.search .icon { width: 16px; height: 16px; }
.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}
.search input::placeholder { color: #96A3AF; }

.sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform .12s, background .16s, border-color .16s, box-shadow .16s;
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--cyan); color: var(--navy); box-shadow: 0 6px 18px rgba(0, 179, 228, .18); }
.btn-primary:hover { background: #16C2F1; box-shadow: 0 8px 24px rgba(0, 179, 228, .26); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: #082B44; }
.btn-ghost { border-color: var(--line); background: #fff; color: var(--ink); }
.btn-ghost:hover { border-color: #B9C7D2; background: #FBFCFD; }
.btn-danger { background: var(--red); color: #fff; }
.btn-block { width: 100%; }

.content { max-width: 1520px; margin: 0 auto; padding: 24px 28px 48px; }

.view { display: none; animation: viewIn .18s ease both; }
.view.is-active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.page-head {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 18px;
  padding: clamp(22px, 2.6vw, 32px);
  border-radius: 14px;
  color: #fff;
  background:
    radial-gradient(circle at 77% 130%, transparent 63px, rgba(92, 182, 203, .45) 64px, transparent 65px),
    linear-gradient(110deg, #002A41 10%, #06465B 100%);
  box-shadow: 0 16px 40px rgba(0, 27, 45, .14);
}
.page-head::after {
  content: "";
  position: absolute;
  right: -88px;
  bottom: -196px;
  width: 340px;
  height: 340px;
  border: 1px solid rgba(92, 182, 203, .28);
  border-radius: 50%;
  pointer-events: none;
}
.page-head > * { position: relative; z-index: 1; }
.page-head .eyebrow { color: #96DEF1; }
.page-head .eyebrow::before { color: rgba(255, 255, 255, .55); }
.page-head h1 { color: #fff; }
.page-head .sub { color: rgba(255, 255, 255, .64); }
.page-head .btn { min-height: 42px; font-size: 13px; }
.page-head .btn-ghost {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .07);
  color: #fff;
}
.page-head .btn-ghost:hover {
  border-color: rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .13);
}
.page-head .btn-primary { box-shadow: 0 8px 24px rgba(0, 179, 228, .24); }
.eyebrow {
  margin: 0 0 7px;
  color: var(--cyan-dark);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: none;
}
.eyebrow::before {
  content: "ФК «Родина» · ";
  color: var(--muted);
  font-weight: 600;
}
h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 56px;
  font-weight: 400;
  letter-spacing: .012em;
  line-height: .95;
  text-transform: uppercase;
}
.sub { margin: 7px 0 0; color: var(--muted); font-size: 12.5px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* KPI */

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.kpi {
  position: relative;
  padding: 14px 15px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.kpi::after {
  content: "";
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 0;
  height: 2px;
  background: var(--line-soft);
}
.kpi.kpi-green::after { background: var(--green); }
.kpi.kpi-amber::after { background: var(--amber); }
.kpi.kpi-red::after { background: var(--red); }
.kpi.kpi-cyan::after { background: var(--cyan); }
.kpi-label { display: block; color: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.kpi-value { display: block; margin-top: 5px; font-size: 25px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpi-sub { display: block; margin-top: 2px; color: var(--muted-2); font-size: 10.5px; }
.kpi-progress { height: 4px; margin-top: 8px; border-radius: 99px; background: #EDF1F4; overflow: hidden; }
.kpi-progress span { display: block; height: 100%; border-radius: inherit; background: var(--green); }

.kpi-coverage { display: flex; align-items: center; gap: 10px; }
.coverage-ring { position: relative; width: 48px; height: 48px; flex: 0 0 auto; }
.coverage-ring svg { width: 48px; height: 48px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--line-soft); stroke-width: 4; }
.ring-value { fill: none; stroke: var(--green); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset .9s cubic-bezier(.2, .7, .2, 1); }
.coverage-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi-copy { min-width: 0; }

/* Cards and grid */

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}
.card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(0, 179, 228, .09), transparent 64%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
.card:hover::before { opacity: 1; }
.card > * { position: relative; z-index: 1; }
body[data-theme="dark"] .card::before {
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(0, 179, 228, .13), transparent 64%);
}
.view.is-active .grid > .card {
  animation: cardIn .45s cubic-bezier(.2, .7, .2, 1) both;
}
.view.is-active .grid > .card:nth-child(2) { animation-delay: .04s; }
.view.is-active .grid > .card:nth-child(3) { animation-delay: .08s; }
.view.is-active .grid > .card:nth-child(4) { animation-delay: .12s; }
.view.is-active .grid > .card:nth-child(5) { animation-delay: .16s; }
.view.is-active .grid > .card:nth-child(6) { animation-delay: .20s; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 18px 0;
}
.card-head h2 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.card-head p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 0;
  background: transparent;
  color: var(--cyan-dark);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.link .icon { width: 13px; height: 13px; }
.link:hover { color: var(--navy); }

.badge {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
}
.badge-red { background: var(--red-bg); color: #A82D2D; }
.badge-amber { background: var(--amber-bg); color: #7C5200; }
.badge-green { background: var(--green-bg); color: #166B45; }
.badge-gray { background: var(--gray-bg); color: #5E6B79; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.chip:hover { border-color: #B9C7D2; color: var(--ink); }
.chip.is-active { border-color: var(--navy); background: var(--navy); color: #fff; }
.chip-cyan { border-color: rgba(0, 179, 228, .25); background: #E8F8FD; color: #06647E; }

.segmented {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #F1F4F7;
  gap: 2px;
}
.segmented button {
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.segmented button:hover { color: var(--ink); }
.segmented button.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 27, 45, .12); }

/* Map */

.map-card { grid-column: span 8; overflow: hidden; }
.map-card .card-head { padding-bottom: 8px; }
.map-wrap { padding: 4px 12px 0; }
.map-svg { width: 100%; height: auto; display: block; }
.map-svg text { font-family: "Segoe UI", Inter, sans-serif; }
.zone { cursor: pointer; }
.zone .zone-shape { transition: stroke .16s, filter .16s; }
.zone:hover .zone-shape { stroke: var(--cyan); stroke-width: 2.4; filter: drop-shadow(0 4px 8px rgba(0, 27, 45, .12)); }
.zone.is-selected .zone-shape { stroke: var(--cyan); stroke-width: 3; filter: drop-shadow(0 6px 12px rgba(0, 179, 228, .22)); }
.zone-label { fill: var(--ink); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.zone-sub { fill: var(--muted); font-size: 10px; }
.zone-code { fill: var(--muted); font-size: 9px; letter-spacing: .08em; }
.zone-status { font-size: 10px; font-weight: 700; }
.zone-pct { font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; }
.zone-pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: zonePulse 2.8s ease-out infinite;
  pointer-events: none;
}
@keyframes zonePulse {
  0% { transform: scale(1); opacity: .55; }
  70%, 100% { transform: scale(2.6); opacity: 0; }
}
.map-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 8px 18px 16px;
  color: var(--muted);
  font-size: 10.5px;
}
.map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.legend-green { background: var(--green); }
.legend-amber { background: var(--amber); }
.legend-red { background: var(--red); }
.legend-gray { background: var(--gray); }
.map-hint { margin-left: auto; color: var(--muted-2); }

/* Attention */

.attention-card { grid-column: span 4; }
.attention-list { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.attention-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 11px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.attention-item:hover { background: #F7F9FB; }
.attention-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex: 0 0 auto;
}
.attention-icon .icon { width: 15px; height: 15px; }
.attention-icon.red { background: var(--red-bg); color: var(--red); }
.attention-icon.amber { background: var(--amber-bg); color: var(--amber); }
.attention-icon.cyan { background: #E8F8FD; color: #067A96; }
.attention-icon.gray { background: var(--gray-bg); color: #5E6B79; }
.attention-text { min-width: 0; flex: 1; }
.attention-text strong { display: block; font-size: 12.5px; font-weight: 650; }
.attention-text span { display: block; margin-top: 2px; color: var(--muted); font-size: 10.5px; }
.attention-arrow { color: #AAB6C1; margin-top: 6px; }
.attention-arrow .icon { width: 14px; height: 14px; }

.quick-label {
  margin: 4px 18px 8px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 0 18px 18px;
}
.quick-action {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #FAFBFC;
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 600;
  text-align: left;
}
.quick-action:hover { border-color: #B9C7D2; background: #fff; }
.quick-action .icon { width: 14px; height: 14px; color: var(--cyan-dark); }

/* Audits table */

.audits-card { grid-column: span 5; }
.audit-table { padding: 8px 12px 14px; }
.audit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px 86px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 8px;
  border: 0;
  border-top: 1px solid var(--line-soft);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.audit-row:first-child { border-top: 0; }
.audit-row:hover { background: #F7F9FB; }
.audit-name { min-width: 0; }
.audit-name strong { display: block; font-size: 12px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.audit-name span { display: block; margin-top: 2px; color: var(--muted); font-size: 10.5px; }
.audit-progress { min-width: 0; }
.progress { height: 5px; border-radius: 99px; background: #EDF1F4; overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--cyan); }
.progress.green span { background: var(--green); }
.progress.amber span { background: var(--amber); }
.progress.red span { background: var(--red); }
.audit-progress small { display: block; margin-top: 4px; color: var(--muted-2); font-size: 9.5px; font-variant-numeric: tabular-nums; }
.audit-status { justify-self: end; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 23px;
  padding: 0 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-green { background: var(--green-bg); color: #176A45; }
.status-amber { background: var(--amber-bg); color: #7C5200; }
.status-red { background: var(--red-bg); color: #A82D2D; }
.status-gray { background: var(--gray-bg); color: #5E6B79; }
.status-cyan { background: #E8F8FD; color: #06647E; }

/* Value */

.value-card { grid-column: span 3; }
.value-body { padding: 14px 18px 18px; }
.value-main { font-size: 26px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.value-main small { font-size: 13px; font-weight: 600; color: var(--muted); }
.value-sub { margin-top: 2px; color: var(--muted); font-size: 10.5px; }
.value-bars { display: flex; flex-direction: column; gap: 11px; margin-top: 16px; }
.value-bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; }
.value-bar-row label { grid-column: 1 / -1; color: var(--muted); font-size: 10.5px; }
.value-bar-row .bar { height: 6px; border-radius: 99px; background: #EDF1F4; overflow: hidden; }
.value-bar-row .bar span { display: block; height: 100%; border-radius: inherit; background: var(--navy); }
.value-bar-row .bar span.cyan { background: var(--cyan); }
.value-bar-row .bar span.gray { background: var(--gray); }
.value-bar-row b { font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.value-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 15px; padding-top: 12px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 10.5px; }
.value-foot strong { color: var(--ink); }

/* People */

.people-card { grid-column: span 4; }
.people-list { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.person-row { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 8px; }
.person-row:hover { background: #F7F9FB; }
.person-info { flex: 1; min-width: 0; }
.person-info strong { display: block; font-size: 12px; font-weight: 650; }
.person-info span { display: block; margin-top: 1px; color: var(--muted); font-size: 10.5px; }
.person-metric { text-align: right; }
.person-metric b { display: block; font-size: 12px; font-variant-numeric: tabular-nums; }
.person-metric span { color: var(--muted-2); font-size: 9.5px; }

/* Sync */

.sync-card { grid-column: span 4; }
.sync-body { padding: 14px 18px 18px; }
.sync-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.sync-top b { font-size: 24px; letter-spacing: -.03em; }
.sync-top span { color: var(--muted); font-size: 10.5px; }
.sync-line { height: 7px; margin: 14px 0 8px; border-radius: 99px; background: #EDF1F4; overflow: hidden; }
.sync-line span { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), #68C894); }
.sync-meta { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 10.5px; }
.sync-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.sync-item { padding: 9px 10px; border: 1px solid var(--line-soft); border-radius: 8px; background: #FAFBFC; }
.sync-item b { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }
.sync-item span { display: block; margin-top: 2px; color: var(--muted); font-size: 9.5px; }
.sync-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 11px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 10.5px; }

/* Activity */

.activity-card { grid-column: span 4; }
.activity-list { padding: 10px 18px 16px; display: flex; flex-direction: column; }
.activity-item { position: relative; display: flex; gap: 10px; padding: 8px 0 8px 14px; }
.activity-item::before { content: ""; position: absolute; left: 3px; top: 15px; bottom: -6px; width: 1px; background: var(--line); }
.activity-item:last-child::before { display: none; }
.activity-dot { position: absolute; left: 0; top: 14px; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); }
.activity-dot.green { background: var(--green); }
.activity-dot.amber { background: var(--amber); }
.activity-dot.gray { background: var(--gray); }
.activity-text { min-width: 0; }
.activity-text strong { display: block; font-size: 11.5px; font-weight: 600; }
.activity-text span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }

/* Toolbar and tables */

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 12px; flex-wrap: wrap; }
.filter-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.toolbar-right { color: var(--muted); font-size: 11.5px; }
.table-card { overflow-x: auto; overflow-y: hidden; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  background: #FAFBFC;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.data-table tbody tr { cursor: pointer; }
.data-table tbody tr:hover { background: #F8FAFC; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.col-check { width: 38px; }
.col-check input { accent-color: var(--navy); }
.col-cost { text-align: right; }
.asset-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.asset-thumb {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #EEF4F7;
  color: #3A6B7D;
  font-size: 11px;
  font-weight: 700;
  flex: 0 0 auto;
}
.asset-thumb .icon { width: 16px; height: 16px; }
.asset-name-text { min-width: 0; }
.asset-name-text strong { display: block; font-size: 12px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-name-text span { display: block; margin-top: 1px; color: var(--muted); font-size: 10px; }
.mono { font-family: Consolas, "IBM Plex Mono", monospace; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.cost { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-foot { display: flex; align-items: center; justify-content: space-between; padding: 11px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10.5px; }
.pager { display: flex; gap: 4px; }
.page-btn { min-width: 26px; height: 26px; padding: 0 7px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--muted); font-size: 10.5px; }
.page-btn.is-active { border-color: var(--navy); background: var(--navy); color: #fff; }
.page-btn:disabled { opacity: .4; cursor: default; }

/* Rooms */

.floor-tabs { margin-bottom: 16px; }
.floor-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  margin: -4px 0 16px;
  color: var(--muted);
  font-size: 11px;
}
.floor-summary b { color: var(--ink); font-variant-numeric: tabular-nums; }
.floor-summary .warn { color: var(--red); font-weight: 600; }
.room-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.room-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 142px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .14s, border-color .14s, box-shadow .14s;
}
.room-card:hover { transform: translateY(-2px); border-color: #B9C7D2; box-shadow: 0 12px 30px rgba(0, 27, 45, .09); }
.room-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.room-code { font-family: Consolas, "IBM Plex Mono", monospace; font-size: 10.5px; color: var(--muted); letter-spacing: .04em; }
.room-name { margin: 3px 0 0; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.room-mol { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10.5px; }
.room-mol .avatar { width: 22px; height: 22px; font-size: 8px; }
.room-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 10px; }
.room-foot b { color: var(--ink); font-size: 11px; }
.room-status-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.room-status-dot.green { background: var(--green); }
.room-status-dot.amber { background: var(--amber); }
.room-status-dot.red { background: var(--red); }
.room-status-dot.gray { background: var(--gray); }

/* Audits */

.audit-grid { margin-bottom: 16px; }
.audit-card { grid-column: span 4; padding: 16px; }
.audit-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.audit-card h3 { margin: 0; font-size: 14px; font-weight: 700; }
.audit-card .audit-meta { margin-top: 3px; color: var(--muted); font-size: 10.5px; }
.audit-card .progress { margin-top: 14px; }
.audit-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; color: var(--muted); font-size: 10.5px; }
.audit-card-foot b { color: var(--ink); font-variant-numeric: tabular-nums; }
.completed-card { margin-top: 0; }
.completed-card .card-head { padding-bottom: 10px; }
.history-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 100px 80px; align-items: center; gap: 10px; padding: 10px 18px; border-top: 1px solid var(--line-soft); font-size: 11px; }
.history-row:first-child { border-top: 0; }
.history-row strong { font-weight: 650; }
.history-row span { color: var(--muted); }
.history-row .link { justify-self: end; }

/* Reconciliation report */

.reconcile-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.reconcile-stat {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.reconcile-stat b { display: block; font-size: 24px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.reconcile-stat span { display: block; margin-top: 2px; color: var(--muted); font-size: 10.5px; }
.reconcile-stat.red b { color: var(--red); }
.reconcile-card .card-head { padding-bottom: 9px; }
.reconcile-card { overflow-x: auto; }
.reconcile-table { min-width: 860px; }
.reconcile-table td:nth-child(3),
.reconcile-table td:nth-child(4),
.reconcile-table td:nth-child(5) { text-align: center; font-variant-numeric: tabular-nums; }
.reconcile-table td:nth-child(5) { font-weight: 700; }
.reconcile-table td:nth-child(5).red { color: var(--red); }
.reconcile-table td:nth-child(5).green { color: var(--green); }
.reconcile-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.5px;
}
.reconcile-foot .link { flex: 0 0 auto; }

/* Requests */

.request-tabs { margin-bottom: 16px; }
.request-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.request-card { padding: 16px; }
.request-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.request-card h3 { margin: 0; font-size: 14px; font-weight: 700; }
.request-card .request-meta { margin-top: 4px; color: var(--muted); font-size: 10.5px; }
.request-desc { margin: 12px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.request-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.request-person { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10.5px; }
.request-person .avatar { width: 22px; height: 22px; font-size: 8px; }

/* Mobile phone */

.mobile-layout {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  padding: 8px 0 20px;
}
.phone-shell {
  position: relative;
  width: 390px;
  max-width: 100%;
  margin: 0 auto;
  padding: 10px;
  border-radius: 42px;
  background: #0B1622;
  box-shadow: 0 30px 70px rgba(0, 27, 45, .28), inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.phone-speaker {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 76px;
  height: 5px;
  border-radius: 99px;
  background: #1E2A36;
  z-index: 2;
}
.phone-screen {
  position: relative;
  overflow: hidden;
  border-radius: 33px;
  background: #F7F9FB;
}
.phone-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
  padding: 0 20px;
  color: #0B1622;
  font-size: 10px;
  font-weight: 700;
  background: #F7F9FB;
}
.phone-status-icons { letter-spacing: .12em; font-size: 9px; }
.phone-app { display: flex; flex-direction: column; min-height: 640px; background: #F7F9FB; }

.scanner-top {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px 12px;
}
.scanner-top .icon-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.scanner-top .icon-btn .icon { width: 15px; height: 15px; }
.scanner-title { flex: 1; min-width: 0; }
.scanner-title strong { display: block; font-size: 13px; font-weight: 700; }
.scanner-title span { display: block; margin-top: 1px; color: var(--muted); font-size: 9.5px; }
.offline-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 5px;
  background: var(--amber-bg);
  color: #7C5200;
  font-size: 8.5px;
  font-weight: 700;
  white-space: nowrap;
}
.offline-badge .icon { width: 11px; height: 11px; }

.scan-stage {
  margin: 0 12px;
  overflow: hidden;
  border-radius: 18px;
  background: #071B2A;
}
.scan-bed {
  position: relative;
  display: grid;
  place-items: center;
  height: 300px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(0, 179, 228, .16), transparent 55%),
    linear-gradient(160deg, #0B2A40, #061622 70%);
}
.scan-grid {
  position: absolute;
  inset: 0;
  opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.14) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.14) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at 50% 50%, #000 35%, transparent 72%);
}
.qr-frame {
  position: relative;
  width: 188px;
  height: 188px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .03);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.qr-corner { position: absolute; width: 28px; height: 28px; border-color: var(--cyan); border-style: solid; }
.qr-corner.tl { top: -2px; left: -2px; border-width: 3px 0 0 3px; border-radius: 10px 0 0 0; }
.qr-corner.tr { top: -2px; right: -2px; border-width: 3px 3px 0 0; border-radius: 0 10px 0 0; }
.qr-corner.bl { bottom: -2px; left: -2px; border-width: 0 0 3px 3px; border-radius: 0 0 0 10px; }
.qr-corner.br { bottom: -2px; right: -2px; border-width: 0 3px 3px 0; border-radius: 0 0 10px 0; }
.scan-line {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 20px;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  box-shadow: 0 0 14px rgba(0, 179, 228, .8);
  animation: scanline 2.2s ease-in-out infinite;
}
@keyframes scanline { 0%, 100% { top: 18px; opacity: .25; } 50% { top: 166px; opacity: 1; } }
.qr-ghost {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 60px;
  height: 60px;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, .18);
  stroke-width: 1.2;
}
.scan-target-label {
  position: absolute;
  bottom: 13px;
  left: 0;
  right: 0;
  color: rgba(255, 255, 255, .48);
  font-size: 9px;
  text-align: center;
  letter-spacing: .04em;
}
.scan-manual {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 7px;
  background: rgba(7, 27, 42, .72);
  color: rgba(255, 255, 255, .88);
  font-size: 9px;
  font-weight: 600;
  backdrop-filter: blur(6px);
}
.scan-manual .icon { width: 12px; height: 12px; }
.scan-manual:hover { background: rgba(0, 179, 228, .22); border-color: rgba(0, 179, 228, .5); }
.scan-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  color: rgba(255, 255, 255, .62);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}
.scan-progress span:first-child { color: var(--cyan); font-weight: 700; }

.scan-result { margin: 10px 12px 0; }
.scan-result-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}
.scan-result-card.green { border-color: #BCE4CE; background: #F2FBF6; }
.scan-result-card.amber { border-color: #F0D9A4; background: #FFFBF1; }
.scan-result-card.red { border-color: #F2C4C4; background: #FFF6F6; }
.scan-result-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; flex: 0 0 auto; }
.scan-result-icon.green { background: var(--green-bg); color: var(--green); }
.scan-result-icon.amber { background: var(--amber-bg); color: var(--amber); }
.scan-result-icon.red { background: var(--red-bg); color: var(--red); }
.scan-result-icon .icon { width: 15px; height: 15px; }
.scan-result-text { min-width: 0; flex: 1; }
.scan-result-text strong { display: block; font-size: 11.5px; font-weight: 700; }
.scan-result-text span { display: block; margin-top: 2px; color: var(--muted); font-size: 9.5px; }
.scan-result-text .mono { margin-top: 4px; font-size: 9px; }
.scan-result-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.scan-result-actions button {
  min-height: 24px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font-size: 8.5px;
  font-weight: 600;
}

.phone-actions { display: flex; flex-direction: column; gap: 7px; margin: 10px 12px 0; }
.phone-actions .btn { min-height: 38px; font-size: 11.5px; }
.phone-action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.phone-action-row .btn { min-height: 34px; padding: 0 6px; gap: 5px; font-size: 10px; }
.phone-action-row .icon { width: 13px; height: 13px; }
.demo-note {
  margin: 9px 12px 0;
  padding: 8px 9px;
  border-radius: 7px;
  background: var(--amber-bg);
  color: var(--amber);
  font-size: 8.5px;
  line-height: 1.4;
}
.phone-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin-top: auto;
  padding: 9px 8px 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.phone-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: 0;
  background: transparent;
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 600;
}
.phone-nav button .icon { width: 17px; height: 17px; }
.phone-nav button.is-active { color: var(--navy); }
.phone-nav button.is-active .icon { color: var(--cyan-dark); }

.mobile-notes { display: flex; flex-direction: column; gap: 10px; padding-top: 8px; }
.mobile-notes > h2 { margin: 0 0 6px; font-family: var(--display); font-size: 24px; font-weight: 400; letter-spacing: .02em; text-transform: uppercase; }
.note-card { display: flex; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.note-num { font-family: Consolas, monospace; color: var(--cyan-dark); font-size: 11px; font-weight: 700; padding-top: 2px; }
.note-card h3 { margin: 0; font-size: 13px; font-weight: 700; }
.note-card p { margin: 4px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.note-accent { border-color: rgba(0, 179, 228, .28); background: #F2FBFE; }

/* Drawer, modal, toast */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 27, 45, .34);
  backdrop-filter: blur(2px);
}
.scrim[hidden] { display: none; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 50;
  width: min(420px, 100vw);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: -20px 0 60px rgba(0, 27, 45, .18);
  transform: translateX(104%);
  transition: transform .22s ease;
}
.drawer.is-open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 12px; border-bottom: 1px solid var(--line); }
.drawer-kicker { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.icon-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
}
.icon-btn:hover { border-color: #B9C7D2; color: var(--ink); }
.icon-btn .icon { width: 15px; height: 15px; }
.drawer-body { overflow: auto; padding: 18px; }
.drawer h2 { margin: 0; font-family: var(--display); font-size: 26px; font-weight: 400; letter-spacing: .01em; }
.drawer .drawer-sub { margin: 5px 0 0; color: var(--muted); font-size: 11.5px; }
.drawer-section { margin-top: 18px; }
.drawer-section h3 { margin: 0 0 8px; color: var(--muted); font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.drawer-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.drawer-stat { padding: 10px; border: 1px solid var(--line-soft); border-radius: 8px; background: #FAFBFC; }
.drawer-stat b { display: block; font-size: 17px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.drawer-stat span { display: block; margin-top: 2px; color: var(--muted); font-size: 9.5px; }
.drawer-list { display: flex; flex-direction: column; border-top: 1px solid var(--line-soft); }
.drawer-row { display: flex; align-items: center; gap: 9px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.drawer-row:last-child { border-bottom: 0; }
.drawer-row-main { flex: 1; min-width: 0; }
.drawer-row-main strong { display: block; font-size: 11.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-row-main span { display: block; margin-top: 1px; color: var(--muted); font-size: 9.5px; }
.drawer-actions { display: flex; flex-direction: column; gap: 7px; margin-top: 18px; }
.drawer-actions .btn { width: 100%; }
.photo-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.photo-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  aspect-ratio: 4 / 3;
  border: 1px solid #C9DDE7;
  border-radius: 7px;
  background: linear-gradient(145deg, #DCEFF8, #EEF7FA);
  color: #2A6A7F;
  font-size: 7.5px;
  text-align: center;
}
.photo-thumb .icon { width: 15px; height: 15px; }
.photo-link { margin-top: 7px; padding: 0; }
.drawer-note { margin-top: 14px; padding: 11px 12px; border-radius: 8px; background: #F2FBFE; color: #075A73; font-size: 10.5px; line-height: 1.5; }
.drawer-note.amber { background: var(--amber-bg); color: #7C5200; }
.drawer-note.gray { background: var(--gray-bg); color: #5E6B79; }
.asset-hero {
  display: grid;
  place-items: center;
  height: 150px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: linear-gradient(150deg, #E8F4F8, #F4F8FA);
  color: #2A6A7F;
}
.asset-hero .icon { width: 44px; height: 44px; stroke-width: 1.2; }
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item { position: relative; padding: 0 0 14px 18px; border-left: 1px solid var(--line); }
.timeline-item:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline-item::before { content: ""; position: absolute; left: -4px; top: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); }
.timeline-item strong { display: block; font-size: 11.5px; font-weight: 650; }
.timeline-item span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }

.modal-wrap {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 27, 45, .42);
  backdrop-filter: blur(3px);
}
.modal-wrap[hidden] { display: none; }
.modal {
  position: relative;
  width: min(460px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 26px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 27, 45, .3);
}
.modal-close { position: absolute; top: 14px; right: 14px; }
.modal-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--green-bg); color: var(--green); margin-bottom: 14px; }
.modal-icon .icon { width: 22px; height: 22px; }
.modal h2 { margin: 0; font-family: var(--display); font-size: 29px; font-weight: 400; letter-spacing: .01em; }
.modal p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.modal-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.modal-stat { padding: 11px; border-radius: 9px; background: #F6F8FA; text-align: center; }
.modal-stat b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.modal-stat span { display: block; margin-top: 2px; color: var(--muted); font-size: 9.5px; }
.modal-actions { display: flex; gap: 8px; margin-top: 20px; }
.modal-actions .btn { flex: 1; }

/* Photo report and manual add */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 12px;
}
.photo-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #F7F9FB;
  color: var(--muted);
  font-size: 8.5px;
  text-align: center;
  cursor: pointer;
}
.photo-slot:hover { border-color: var(--cyan); color: var(--cyan-dark); }
.photo-slot .icon { width: 18px; height: 18px; }
.photo-slot.filled {
  border-style: solid;
  border-color: #C9DDE7;
  background: linear-gradient(145deg, #DCEFF8, #EEF7FA);
  color: #2A6A7F;
}
.photo-slot.filled::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 20%, rgba(255,255,255,.55), transparent 40%);
  pointer-events: none;
}
.photo-slot small {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 3px 4px;
  background: rgba(0, 27, 45, .55);
  color: #fff;
  font-size: 7px;
  line-height: 1.2;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 13px;
}
.field { display: flex; flex-direction: column; gap: 4px; }
.field.full { grid-column: 1 / -1; }
.field label { color: var(--muted); font-size: 9.5px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font-size: 11px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 179, 228, .12);
}
.field textarea { min-height: 60px; resize: vertical; }
.checkline {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.4;
}
.checkline input { margin-top: 2px; accent-color: var(--navy); }
.form-note {
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 7px;
  background: #F2FBFE;
  color: #075A73;
  font-size: 9.5px;
  line-height: 1.45;
}
.form-note.amber { background: var(--amber-bg); color: #7C5200; }
.manual-temp {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
  padding: 8px 10px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-size: 9.5px;
}
.manual-temp code { color: var(--ink); font-size: 10px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 70;
  transform: translate(-50%, 12px);
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font-size: 11.5px;
  box-shadow: var(--shadow-lift);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s, transform .18s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Small utilities used by rendered rows */

.person-inline { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.avatar-xs { width: 22px; height: 22px; font-size: 8px; }
.avatar-xs.avatar-green { background: #DDF2E7; color: #156A43; }
.avatar-xs.avatar-amber { background: #FFF0D0; color: #8A5B00; }
.avatar-xs.avatar-red { background: #FBE0E0; color: #9E2A2A; }
.avatar-xs.avatar-blue { background: #DCEFF8; color: #0E607A; }
.avatar-xs.avatar-violet { background: #E9E4F8; color: #4D3A85; }
.empty-state { padding: 28px 16px; color: var(--muted); font-size: 12px; text-align: center; }

.map-floor-switch {
  display: inline-flex;
  gap: 2px;
  margin: 2px 18px 6px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #F1F4F7;
}
.map-floor-switch button {
  height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
}
.map-floor-switch button.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 27, 45, .12); }

.drawer-row-btn {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.drawer-row-btn:hover { background: #F7F9FB; }
.has-drawer { overflow: hidden; }

/* Theme toggle and dark surfaces */

.theme-toggle {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
  color: var(--muted);
}
.theme-toggle:hover { color: var(--ink); }
.theme-toggle .icon { width: 17px; height: 17px; }
.theme-toggle .icon-sun { display: none; }
body[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
body[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.bell-btn { position: relative; }
.bell-btn .icon { width: 17px; height: 17px; }
.bell-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  place-items: center;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 99px;
  background: var(--red);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
}
@media (max-width: 720px) {
  .bell-btn { display: none; }
}

body[data-theme="dark"] .card,
body[data-theme="dark"] .kpi,
body[data-theme="dark"] .search,
body[data-theme="dark"] .sync-badge,
body[data-theme="dark"] .chip,
body[data-theme="dark"] .page-btn,
body[data-theme="dark"] .room-card,
body[data-theme="dark"] .icon-btn,
body[data-theme="dark"] .drawer,
body[data-theme="dark"] .modal,
body[data-theme="dark"] .note-card,
body[data-theme="dark"] .scan-result-card,
body[data-theme="dark"] .phone-nav,
body[data-theme="dark"] .phone-screen,
body[data-theme="dark"] .phone-status,
body[data-theme="dark"] .phone-app {
  background: var(--card);
  color: var(--ink);
  border-color: var(--line);
}
body[data-theme="dark"] .scan-result-card.green {
  background: rgba(159, 222, 196, .10);
  border-color: rgba(159, 222, 196, .28);
}
body[data-theme="dark"] .scan-result-card.amber {
  background: rgba(255, 197, 133, .10);
  border-color: rgba(255, 197, 133, .28);
}
body[data-theme="dark"] .scan-result-card.red {
  background: rgba(255, 142, 142, .10);
  border-color: rgba(255, 142, 142, .28);
}
body[data-theme="dark"] .scan-result-actions button {
  background: var(--soft);
  color: var(--ink);
  border-color: var(--line);
}
body[data-theme="dark"] .scan-result-actions button:hover {
  background: var(--hover);
}
body[data-theme="dark"] .data-table th,
body[data-theme="dark"] .table-foot {
  background: var(--table-head);
  color: var(--muted);
  border-color: var(--line);
}
body[data-theme="dark"] .data-table tbody tr:hover,
body[data-theme="dark"] .attention-item:hover,
body[data-theme="dark"] .audit-row:hover,
body[data-theme="dark"] .person-row:hover,
body[data-theme="dark"] .drawer-row-btn:hover {
  background: var(--hover);
}
body[data-theme="dark"] .segmented { background: var(--soft); border-color: var(--line); }
body[data-theme="dark"] .segmented button.is-active { background: var(--card); color: var(--ink); }
body[data-theme="dark"] .btn-ghost { background: transparent; color: var(--ink); }
body[data-theme="dark"] .btn-ghost:hover { background: var(--hover); border-color: var(--line); }
body[data-theme="dark"] .btn-dark { background: var(--cyan); color: var(--navy); }
body[data-theme="dark"] .btn-dark:hover { background: #5BD6F5; }
body[data-theme="dark"] .chip.is-active { background: var(--cyan); border-color: var(--cyan); color: var(--navy); }
body[data-theme="dark"] .page-btn.is-active { background: var(--cyan); border-color: var(--cyan); color: var(--navy); }
body[data-theme="dark"] .search input::placeholder { color: var(--muted-2); }
body[data-theme="dark"] .kpi-progress,
body[data-theme="dark"] .progress,
body[data-theme="dark"] .value-bar-row .bar,
body[data-theme="dark"] .sync-line { background: rgba(255, 255, 255, .08); }
body[data-theme="dark"] .asset-thumb { background: var(--soft); color: var(--cyan); }
body[data-theme="dark"] .asset-hero {
  background: linear-gradient(150deg, #0E2A3A, #0A2030);
  color: var(--cyan);
}
body[data-theme="dark"] .photo-slot { background: var(--soft); }
body[data-theme="dark"] .photo-slot.filled,
body[data-theme="dark"] .photo-thumb {
  background: linear-gradient(145deg, #0E2A3A, #123246);
  border-color: rgba(0, 179, 228, .2);
  color: #9FDEC4;
}
body[data-theme="dark"] .modal-stat,
body[data-theme="dark"] .sync-item,
body[data-theme="dark"] .drawer-stat,
body[data-theme="dark"] .quick-action { background: var(--soft); border-color: var(--line-soft); }
body[data-theme="dark"] .quick-action:hover { background: var(--hover); border-color: var(--line); }
body[data-theme="dark"] .form-note,
body[data-theme="dark"] .drawer-note { background: rgba(0, 179, 228, .10); color: #9FDEC4; }
body[data-theme="dark"] .drawer-note.amber { background: rgba(255, 197, 133, .12); color: #FFC585; }
body[data-theme="dark"] .drawer-note.gray { background: rgba(143, 166, 181, .10); color: #B5CAD7; }
body[data-theme="dark"] .field input,
body[data-theme="dark"] .field select,
body[data-theme="dark"] .field textarea {
  background: var(--input-bg);
  color: var(--ink);
  border-color: var(--line);
}
body[data-theme="dark"] .field input:focus,
body[data-theme="dark"] .field select:focus,
body[data-theme="dark"] .field textarea:focus { border-color: var(--cyan); }
body[data-theme="dark"] .modal-wrap { background: rgba(0, 0, 0, .56); }
body[data-theme="dark"] .scrim { background: rgba(0, 0, 0, .5); }
body[data-theme="dark"] .sidebar { border-right: 1px solid rgba(255, 255, 255, .06); }
body[data-theme="dark"] .avatar { background: #123246; color: #9FDEC4; }
body[data-theme="dark"] .avatar-sm { background: #123246; color: #9FDEC4; }
body[data-theme="dark"] .map-floor-switch { background: var(--soft); border-color: var(--line); }
body[data-theme="dark"] .map-floor-switch button.is-active { background: var(--card); color: var(--ink); }
body[data-theme="dark"] .room-card:hover { border-color: rgba(0, 179, 228, .35); }
body[data-theme="dark"] .scan-stage { background: #030D16; }

/* Responsive */

@media (max-width: 1240px) {
  .kpi-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .map-card { grid-column: span 12; }
  .attention-card { grid-column: span 5; }
  .audits-card { grid-column: span 7; }
  .value-card { grid-column: span 4; }
  .people-card { grid-column: span 4; }
  .sync-card { grid-column: span 4; }
  .activity-card { grid-column: span 12; }
  .audit-card { grid-column: span 6; }
  .request-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-layout { grid-template-columns: 360px minmax(0, 1fr); gap: 24px; }
  .phone-shell { width: 360px; }
  .room-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  :root { --sidebar-w: 72px; }
  .brand { justify-content: center; padding-left: 0; padding-right: 0; }
  .brand-text { display: none; }
  .nav-item { justify-content: center; padding: 10px; }
  .nav-item span:not(.nav-count) { display: none; }
  .nav-count { display: none; }
  .nav-item.is-active::before { left: -14px; }
  .demo-badge, .user-text { display: none; }
  .user { justify-content: center; padding-left: 0; padding-right: 0; }
  .topbar { padding: 0 18px; }
  .search { width: 220px; }
  .content { padding: 20px 18px 40px; }
  h1 { font-size: 44px; }
  .attention-card, .audits-card, .value-card, .people-card, .sync-card { grid-column: span 12; }
  .reconcile-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-layout { grid-template-columns: 1fr; }
  .phone-shell { margin: 0 auto; }
  .mobile-notes { max-width: 520px; margin: 0 auto; }
}

@media (max-width: 720px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { height: 62px; padding: 0 14px; }
  .breadcrumb { display: none; }
  .search { width: 100%; }
  .sync-badge { display: none; }
  .topbar-right { width: 100%; }
  .topbar-right .btn span { display: none; }
  .topbar-right .btn { width: 38px; padding: 0; }
  .content { padding: 16px 14px 36px; }
  .page-head { flex-direction: column; align-items: flex-start; padding: 18px; border-radius: 12px; }
  .page-head::after { right: -120px; bottom: -210px; opacity: .6; }
  .page-actions { width: 100%; justify-content: flex-start; }
  h1 { font-size: 32px; }
  .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-value { font-size: 21px; }
  .room-grid, .request-grid { grid-template-columns: 1fr; }
  .audit-card { grid-column: span 12; }
  .data-table th:nth-child(3), .data-table td:nth-child(3),
  .data-table th:nth-child(4), .data-table td:nth-child(4),
  .data-table th:nth-child(8), .data-table td:nth-child(8) { display: none; }
  .data-table { min-width: 620px; }
  .table-card { overflow-x: auto; }
  .map-legend { gap: 8px; }
  .map-hint { display: none; }
  .history-row { grid-template-columns: minmax(0, 1fr) 90px; }
  .history-row span:nth-child(3), .history-row .link { display: none; }
  .modal-actions { flex-direction: column; }
  .phone-shell { width: 100%; max-width: 360px; }
}

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