:root {
  font-family: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  color: #1f2a24;
  background: #f4f7f5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --surface: #ffffff;
  --line: #d9e2dc;
  --muted: #68746d;
  --green: #15803d;
  --green-soft: #e7f6ed;
  --yellow: #d99a08;
  --yellow-soft: #fff5ce;
  --red: #c8372c;
  --red-soft: #ffe1dc;
  --gray: #6b7280;
  --gray-soft: #edf0f2;
  --blue: #1d64d8;
  --blue-soft: #e4efff;
  --ink: #17201b;
  --shadow: 0 12px 30px rgba(31, 42, 36, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #f4f7f5;
  font-family: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 22px;
  background: #20352a;
  color: #f6fbf7;
}

.caravan-logo {
  display: inline-grid;
  gap: 2px;
  align-self: start;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  line-height: 1;
  letter-spacing: 0;
}

.caravan-logo span {
  font-size: 14px;
  font-weight: 900;
  color: #ffffff;
}

.caravan-logo strong {
  font-size: 12px;
  color: #9be1b3;
  text-transform: uppercase;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.brand .text-icon {
  width: 42px;
  height: 42px;
  padding: 8px;
  border-radius: 8px;
  background: #ecfdf3;
  color: var(--green);
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  line-height: 1;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 20px;
  line-height: 1.15;
}

.brand span {
  margin-top: 6px;
  color: #c8d8ce;
  line-height: 1.35;
}

.nav {
  display: grid;
  gap: 10px;
}

.nav-button {
  min-height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #f7fff9;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  font-weight: 700;
  text-align: left;
}

.nav-button .text-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-button.active {
  background: #f6fbf7;
  color: #173225;
}

.route-note {
  margin-top: auto;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #dce9df;
  line-height: 1.35;
}

.route-note .text-icon {
  flex: 0 0 auto;
}

.public-links-note code {
  display: inline-block;
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-weight: 850;
}

.content {
  padding: 24px;
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(231, 246, 237, 0.65), rgba(244, 247, 245, 0) 260px),
    #f4f7f5;
}

.page-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.eyebrow {
  color: var(--green);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 13px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 6px;
  font-size: 34px;
  letter-spacing: 0;
}

h2 {
  font-size: 20px;
  letter-spacing: 0;
}

.header-pill,
.task-badge,
.type-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 800;
}

.header-pill .text-icon {
  width: 20px;
}

.object-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.object-grid.single {
  grid-template-columns: minmax(320px, 720px);
}

.route-section {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
}

.task-alert-section {
  padding: 16px;
  border: 2px solid rgba(29, 100, 216, 0.22);
  border-radius: 8px;
  background: rgba(228, 239, 255, 0.72);
}

.route-section h2 {
  color: var(--ink);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-heading span {
  border-radius: 8px;
  padding: 8px 11px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 850;
}

.checked-section {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.object-card,
.task-card,
.detail-panel,
.form-section,
.stat-card,
.office-block,
.critical-record {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.object-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-left-width: 8px;
  box-shadow: var(--shadow);
}

.home-grid.input-tile-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 240px));
  align-items: start;
}

.input-menu-card {
  min-height: 210px;
  aspect-ratio: 1 / 0.92;
  align-content: space-between;
  border-left-width: 1px;
}

.ukv-object-grid .object-card {
  min-height: 168px;
}

.object-card.task-object {
  box-shadow: inset 0 0 0 2px rgba(29, 100, 216, 0.16);
}

.object-card.critical-card {
  border-color: #f3a199;
  border-left-color: var(--red);
  background: #fff8f7;
}

.badge-stack {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.critical-badge {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--red);
  color: #fff;
  font-weight: 950;
}

.object-top,
.task-heading,
.record-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.object-name {
  font-size: 24px;
  font-weight: 900;
  color: var(--ink);
}

.object-meta {
  margin-top: 5px;
  color: var(--muted);
  font-weight: 650;
}

.object-details,
.button-row,
.record-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.object-details span,
.record-grid span {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f4f7f5;
  color: #334038;
  font-weight: 700;
}

.object-details .age-badge {
  font-weight: 950;
}

.age-today {
  background: var(--green-soft) !important;
  color: var(--green) !important;
}

.age-yesterday {
  background: #eef7f0 !important;
  color: #2f6b43 !important;
}

.age-warning {
  background: var(--yellow-soft) !important;
  color: #8a5d00 !important;
}

.age-orange {
  background: #ffe8cf !important;
  color: #a74708 !important;
}

.age-old {
  background: var(--red-soft) !important;
  color: var(--red) !important;
}

.age-empty {
  background: var(--gray-soft) !important;
  color: #4b5563 !important;
}

.object-details .text-icon {
  width: 18px;
}

.status-badge {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 8px;
  font-weight: 900;
}

.status-unchecked {
  border-left-color: var(--gray);
}

.status-normal {
  border-left-color: var(--green);
}

.status-warning {
  border-left-color: var(--yellow);
}

.status-emergency {
  border-left-color: var(--red);
}

.status-badge.status-unchecked {
  background: var(--gray-soft);
  color: #4b5563;
}

.status-badge.status-normal {
  background: var(--green-soft);
  color: var(--green);
}

.status-badge.status-warning {
  background: var(--yellow-soft);
  color: #8a5d00;
}

.status-badge.status-emergency {
  background: var(--red-soft);
  color: var(--red);
}

.primary-action,
.ghost-action,
.button-row button,
.photo-button {
  min-height: 52px;
  border-radius: 8px;
  padding: 0 18px;
  border: 1px solid transparent;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.primary-action {
  width: 100%;
  background: var(--green);
  color: #fff;
  box-shadow: 0 8px 18px rgba(21, 128, 61, 0.18);
}

.primary-action.compact {
  width: auto;
}

.primary-action.wide {
  min-height: 60px;
}

.primary-action .text-icon,
.ghost-action .text-icon,
.photo-button .text-icon {
  width: 22px;
  height: 22px;
}

.ghost-action,
.button-row button {
  background: #fff;
  border-color: var(--line);
  color: #223128;
}

.ghost-action:hover,
.button-row button:hover {
  border-color: #9bb3a4;
  background: #f8fbf9;
}

.filters {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.search-field,
.select-field,
.text-field {
  display: grid;
  gap: 8px;
}

.search-field {
  position: relative;
}

.search-field .text-icon {
  position: absolute;
  left: 14px;
  top: 17px;
  color: var(--muted);
}

.search-field input,
.select-field select,
.text-field textarea,
.text-field input {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 14px;
  color: var(--ink);
}

.search-field input {
  padding-left: 46px;
}

.select-field span,
.text-field span,
.segmented legend {
  color: var(--muted);
  font-weight: 800;
}

.task-list {
  display: grid;
  gap: 14px;
}

.task-card {
  padding: 18px;
  display: grid;
  gap: 16px;
}

.priority-срочный {
  border-color: #f0aaa3;
  background: #fff8f7;
}

.priority-важный {
  border-color: #f1d281;
  background: #fffdf3;
}

.task-heading p {
  margin-top: 6px;
  color: var(--muted);
}

.priority {
  border-radius: 8px;
  padding: 9px 11px;
  font-weight: 900;
  background: #eef2f7;
}

.priority-высокий {
  background: var(--red-soft);
  color: var(--red);
}

.priority-средний {
  background: var(--yellow-soft);
  color: #835400;
}

.task-grid,
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.task-create-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.bottom-nav {
  position: sticky;
  bottom: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(6, minmax(92px, 1fr));
  gap: 8px;
  margin-top: 28px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 30px rgba(31, 42, 36, 0.12);
  backdrop-filter: blur(8px);
}

.bottom-nav button {
  min-height: 56px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 950;
}

.bottom-nav button.active {
  background: var(--green);
  border-color: #0b5d2c;
  color: #fff;
}

.map-board {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) 190px;
  gap: 22px;
  align-items: stretch;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.map-sections {
  display: grid;
  grid-template-rows: repeat(10, minmax(54px, 1fr));
  gap: 10px;
}

.map-section-tile {
  min-height: 58px;
  border: 2px solid #b9d8c4;
  border-radius: 8px;
  background: #f8fffa;
  color: #183423;
  font-size: 18px;
  font-weight: 950;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}

.map-section-tile:hover {
  background: var(--green-soft);
  border-color: var(--green);
}

.map-section-tile.is-disabled {
  border-color: #d8dedb;
  background: #f4f6f5;
  color: #7a857e;
  cursor: pointer;
}

.map-section-tile.is-disabled:hover {
  background: #eef2f0;
  border-color: #c7d1cc;
}

.map-mainline {
  position: relative;
  display: grid;
  grid-template-rows: repeat(10, 1fr);
  align-items: center;
  padding-left: 56px;
}

.map-mainline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 24px;
  width: 8px;
  border-radius: 8px;
  background: #111;
}

.map-mainline span {
  display: none;
}

.map-mainline i {
  display: block;
  width: 62px;
  height: 4px;
  background: #111;
}

.section-layout {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(360px, 420px);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.section-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.section-scheme-card {
  display: grid;
  gap: 12px;
}

.section-scheme-card h2 {
  font-size: 20px;
}

.irrigation-scheme {
  position: relative;
  min-height: 560px;
  padding: 34px 72px 34px 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(21, 128, 61, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(21, 128, 61, 0.035) 1px, transparent 1px),
    #fff;
  background-size: 28px 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.ore-bed {
  position: absolute;
  z-index: 0;
  top: 166px;
  left: 86px;
  right: 170px;
  bottom: 120px;
  border: 1px solid rgba(117, 94, 57, 0.28);
  border-radius: 10px;
  background:
    radial-gradient(ellipse at 24px 24px, rgba(103, 79, 47, 0.12) 0 4px, transparent 5px),
    radial-gradient(ellipse at 74px 48px, rgba(147, 113, 64, 0.1) 0 5px, transparent 6px),
    radial-gradient(ellipse at 124px 26px, rgba(102, 82, 55, 0.09) 0 4px, transparent 5px),
    linear-gradient(180deg, #eadfc4 0%, #ddcda6 52%, #cfb987 100%);
  background-size: 150px 92px, 172px 102px, 190px 110px, auto;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -10px 0 rgba(116, 88, 50, 0.11),
    0 10px 20px rgba(76, 61, 38, 0.08);
  opacity: 0.9;
  pointer-events: none;
}

.ore-bed::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(98, 78, 48, 0.08) 0 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px);
  background-size: 34px 34px;
  pointer-events: none;
}

.scheme-mainline {
  position: absolute;
  top: 24px;
  right: 34px;
  bottom: 24px;
  width: 12px;
  border-radius: 10px;
  background: #111;
  color: #111;
  font-size: 0;
}

.scheme-mainline::after {
  content: "Магистраль";
  position: absolute;
  top: 50%;
  right: 18px;
  font-size: 16px;
  font-weight: 950;
  writing-mode: vertical-rl;
  transform: translateY(-50%) rotate(180deg);
}

.scheme-node {
  display: none;
}

.scheme-node span {
  display: none;
}

.scheme-node b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  border: 3px solid var(--blue);
  border-radius: 999px;
  color: var(--blue);
  font-size: 15px;
}

.scheme-mainline-tap {
  position: absolute;
  right: 44px;
  bottom: 132px;
  width: 114px;
  height: 12px;
  border-radius: 10px;
  background: #1d63d6;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
}

.scheme-feed-drop {
  display: none;
}

.scheme-feed-joint {
  display: none;
}

.scheme-line {
  position: absolute;
  left: 48px;
  right: 122px;
  height: 12px;
  border-radius: 10px;
  background: #1d63d6;
  box-shadow:
    inset 0 -2px 0 rgba(0, 0, 0, 0.2),
    0 2px 5px rgba(29, 99, 214, 0.16);
}

.scheme-feed {
  bottom: 132px;
}

.scheme-return {
  top: 142px;
}

.scheme-line span {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 950;
}

.scheme-feed span {
  top: 20px;
}

.emitters-area {
  position: absolute;
  z-index: 1;
  top: 178px;
  bottom: 142px;
  left: 104px;
  right: 188px;
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  align-items: stretch;
  border-radius: 8px;
  pointer-events: none;
}

.emitters-area em {
  position: relative;
  display: block;
  justify-self: center;
  width: 7px;
  height: 100%;
  border-radius: 7px;
  background: #18422f;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.55),
    0 2px 5px rgba(24, 39, 31, 0.24);
}

.emitters-area em span {
  display: none;
}

.is-irrigating .emitters-area em span {
  position: absolute;
  left: 50%;
  display: block;
  width: 6px;
  height: 8px;
  border-radius: 999px 999px 999px 2px;
  background: rgba(30, 129, 214, 0.72);
  transform: translateX(-50%) rotate(45deg);
  box-shadow: 0 1px 3px rgba(24, 73, 120, 0.18);
}

.is-irrigating .emitters-area em span:nth-child(1) {
  top: 24%;
}

.is-irrigating .emitters-area em span:nth-child(2) {
  top: 52%;
}

.is-irrigating .emitters-area em span:nth-child(3) {
  top: 78%;
}

.is-dry .emitters-area em {
  background: #34483e;
  opacity: 0.86;
}

.scheme-control,
.drop-test-dot {
  position: absolute;
  z-index: 2;
  border: 2px solid #fff;
  background: #fff;
  color: var(--ink);
  font-weight: 950;
  box-shadow: 0 6px 14px rgba(31, 42, 36, 0.16);
}

.scheme-control {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 999px;
  line-height: 1;
}

.scheme-control small {
  position: absolute;
  left: 28px;
  top: -6px;
  width: max-content;
  max-width: 108px;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 4px 7px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
  box-shadow: 0 5px 12px rgba(31, 42, 36, 0.1);
}

.scheme-control.filled {
  border-color: #fff;
}

.pressure-dot {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
}

.valve-control {
  width: 54px;
  height: 38px;
  min-width: 54px;
  min-height: 38px;
  overflow: visible;
  border-radius: 8px;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.valve-symbol {
  position: relative;
  width: 52px;
  height: 34px;
  display: block;
}

.valve-symbol::before,
.valve-symbol::after {
  content: "";
  position: absolute;
  top: 15px;
  width: 14px;
  height: 7px;
  border-radius: 4px;
  background: #1d63d6;
}

.valve-symbol::before {
  left: 0;
}

.valve-symbol::after {
  right: 0;
}

.valve-symbol i {
  position: absolute;
  left: 13px;
  top: 10px;
  width: 26px;
  height: 16px;
  border: 3px solid #153326;
  border-radius: 4px;
  background: #eef8f2;
  transform: skewX(-18deg);
  box-shadow: 0 2px 6px rgba(23, 52, 35, 0.18);
}

.valve-symbol b {
  position: absolute;
  left: 21px;
  top: -1px;
  width: 13px;
  height: 13px;
  border-radius: 2px;
  background: #173423;
  transform: rotate(45deg);
  box-shadow: 0 0 0 2px #fff;
}

.valve-control:hover .valve-symbol i,
.valve-control:focus-visible .valve-symbol i {
  background: #dff7e9;
  border-color: var(--green);
}

.valve-control.filled .valve-symbol i {
  background: #dcfce7;
  border-color: var(--green);
}

.valve-control.filled .valve-symbol b {
  background: var(--green);
}

.valve-control small {
  left: 50%;
  top: 36px;
  transform: translateX(-50%);
  min-height: 22px;
  max-width: 92px;
  padding: 3px 7px;
  border-color: rgba(23, 52, 35, 0.18);
  background: rgba(255, 255, 255, 0.98);
  pointer-events: none;
  font-size: 11px;
  line-height: 1.05;
  text-align: center;
}

.inlet-valve {
  bottom: 116px;
  right: 112px;
}

.return-drain {
  top: 126px;
  left: 46px;
}

.feed-drain {
  bottom: 116px;
  left: 46px;
}

.pressure-control {
  background: var(--blue);
}

.pressure-dot {
  background: #fff;
  color: var(--blue);
}

.pressure-feed-start {
  bottom: 118px;
  right: 74px;
}

.pressure-feed-start small {
  left: auto;
  right: 36px;
  top: -10px;
  max-width: 132px;
  white-space: normal;
  text-align: left;
  line-height: 1.05;
}

.pressure-feed-end {
  bottom: 158px;
  right: 252px;
}

.pressure-return {
  top: 140px;
  right: 252px;
}

.pressure-node {
  top: 78px;
  right: 154px;
}

.drop-point-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.drop-test-dot {
  min-width: 76px;
  min-height: 34px;
  transform: translate(-50%, -50%);
  padding: 5px 7px;
  border-color: #9fc0e8;
  background: #fff;
  color: var(--blue);
  pointer-events: auto;
  font-size: 12px;
}

.drop-test-dot.pick {
  background: var(--blue-soft);
}

.drop-test-dot.saved {
  border-color: var(--green);
  background: #fff;
  color: var(--green);
}

.drop-average,
.result-label {
  position: absolute;
  z-index: 3;
  border-radius: 8px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 5px 12px rgba(31, 42, 36, 0.1);
}

.drop-average {
  right: 24px;
  bottom: 18px;
  background: #20352a;
  color: #fff;
}

.emitters-result {
  top: 262px;
  left: 38%;
}

.puddles-result {
  bottom: 214px;
  left: 42px;
}

.organic-result {
  right: 170px;
  bottom: 226px;
  background: rgba(48, 42, 32, 0.94);
  border-color: rgba(48, 42, 32, 0.94);
  color: #fff;
}

.puddle-visual {
  position: absolute;
  z-index: 1;
  border-radius: 52% 48% 54% 46%;
  background: rgba(40, 146, 190, 0.48);
  border: 1px solid rgba(14, 105, 146, 0.42);
  box-shadow:
    inset 0 3px 8px rgba(255, 255, 255, 0.28),
    0 3px 8px rgba(28, 99, 128, 0.16);
  pointer-events: none;
}

.puddle-visual.has-organic::before,
.puddle-visual.has-organic::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(32, 28, 22, 0.62);
}

.puddle-visual.has-organic::before {
  width: 14px;
  height: 8px;
  left: 22%;
  top: 36%;
}

.puddle-visual.has-organic::after {
  width: 10px;
  height: 6px;
  right: 24%;
  bottom: 28%;
}

.puddle-a {
  width: 112px;
  height: 54px;
  left: 118px;
  bottom: 188px;
  transform: rotate(-7deg);
}

.puddle-b {
  width: 86px;
  height: 42px;
  left: 330px;
  bottom: 206px;
  transform: rotate(9deg);
}

.puddle-c {
  width: 124px;
  height: 48px;
  left: 220px;
  bottom: 150px;
  transform: rotate(3deg);
}

.puddle-d {
  width: 96px;
  height: 52px;
  right: 244px;
  bottom: 178px;
  transform: rotate(-10deg);
}

.puddle-e {
  width: 148px;
  height: 64px;
  left: 176px;
  bottom: 248px;
  transform: rotate(11deg);
}

.puddle-f {
  width: 180px;
  height: 72px;
  right: 282px;
  bottom: 252px;
  transform: rotate(-5deg);
}

.drop-capture,
.pressure-capture {
  position: absolute;
  z-index: 4;
  top: 182px;
  bottom: 140px;
  left: 88px;
  right: 260px;
  border: 2px dashed var(--blue);
  border-radius: 8px;
  background: rgba(228, 239, 255, 0.4);
  color: var(--blue);
  font-weight: 950;
}

.pressure-capture {
  top: 78px;
  bottom: 132px;
  border-color: var(--green);
  background: rgba(231, 246, 237, 0.42);
  color: var(--green);
}

.pressure-extra-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pressure-extra-dot {
  position: absolute;
  z-index: 3;
  min-width: 34px;
  min-height: 34px;
  transform: translate(-50%, -50%);
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 950;
  box-shadow: 0 6px 14px rgba(31, 42, 36, 0.16);
  pointer-events: auto;
}

.pressure-extra-dot span {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin: auto;
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-size: 11px;
}

.pressure-extra-dot small {
  position: absolute;
  left: 28px;
  top: -6px;
  width: max-content;
  max-width: 132px;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 4px 7px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
  box-shadow: 0 5px 12px rgba(31, 42, 36, 0.1);
}

.section-connection-scheme {
  position: relative;
  min-height: 560px;
  padding: 34px 72px 34px 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(21, 128, 61, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(21, 128, 61, 0.035) 1px, transparent 1px),
    #fff;
  background-size: 28px 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.section-ore-zone {
  position: absolute;
  z-index: 0;
  top: 150px;
  left: 74px;
  right: 204px;
  bottom: 126px;
  border: 1px solid rgba(112, 91, 55, 0.28);
  border-radius: 8px;
  background:
    radial-gradient(circle at 24px 24px, rgba(91, 70, 44, 0.13) 0 3px, transparent 4px),
    radial-gradient(circle at 82px 48px, rgba(141, 111, 68, 0.12) 0 4px, transparent 5px),
    radial-gradient(circle at 138px 30px, rgba(101, 82, 52, 0.1) 0 3px, transparent 4px),
    linear-gradient(180deg, #efe4c9 0%, #decca4 52%, #cbb583 100%);
  background-size: 170px 96px, 190px 106px, 210px 118px, auto;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -8px 0 rgba(112, 85, 47, 0.1);
  pointer-events: none;
}

.section-mainline {
  position: absolute;
  z-index: 3;
  top: 42px;
  right: 46px;
  bottom: 42px;
  width: 14px;
  border-radius: 10px;
  background: #111;
}

.section-mainline span {
  position: absolute;
  top: 50%;
  right: 22px;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  color: #111;
  font-weight: 950;
}

.section-single-tap,
.section-feed-line,
.section-return-line {
  position: absolute;
  z-index: 2;
  height: 14px;
  border-radius: 12px;
  background: #1d63d6;
  box-shadow:
    inset 0 -2px 0 rgba(0, 0, 0, 0.18),
    0 2px 6px rgba(29, 99, 214, 0.18);
}

.section-single-tap {
  right: 58px;
  bottom: 140px;
  width: 156px;
}

.section-feed-line {
  left: 74px;
  right: 204px;
  bottom: 140px;
}

.section-return-line {
  left: 74px;
  right: 204px;
  top: 130px;
}

.section-feed-line span,
.section-return-line span {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: var(--ink);
  font-weight: 950;
}

.section-return-line span {
  top: -34px;
}

.section-feed-line span {
  top: 22px;
}

.section-emitters {
  position: absolute;
  z-index: 1;
  top: 164px;
  bottom: 160px;
  left: 108px;
  right: 238px;
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  align-items: stretch;
  border-radius: 8px;
  pointer-events: none;
}

.section-emitters em {
  position: relative;
  display: block;
  justify-self: center;
  width: 8px;
  height: 100%;
  border-radius: 8px;
  background: #153f31;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.5),
    0 2px 6px rgba(24, 39, 31, 0.24);
}

.section-emitters em span {
  display: none;
}

.section-connection-scheme.is-irrigating .section-emitters em span {
  position: absolute;
  left: 50%;
  display: block;
  width: 6px;
  height: 8px;
  border-radius: 999px 999px 999px 2px;
  background: rgba(40, 146, 190, 0.78);
  transform: translateX(-50%) rotate(45deg);
  box-shadow: 0 1px 3px rgba(24, 73, 120, 0.18);
}

.section-connection-scheme.is-irrigating .section-emitters em span:nth-child(1) {
  top: 24%;
}

.section-connection-scheme.is-irrigating .section-emitters em span:nth-child(2) {
  top: 52%;
}

.section-connection-scheme.is-irrigating .section-emitters em span:nth-child(3) {
  top: 78%;
}

.section-connection-scheme.is-dry .section-emitters em {
  background: #34483e;
  opacity: 0.82;
}

.section-connection-scheme .scheme-control,
.section-connection-scheme .drop-test-dot,
.section-connection-scheme .pressure-extra-dot,
.section-connection-scheme .result-label {
  z-index: 5;
}

.section-connection-scheme .inlet-valve {
  right: 174px;
  bottom: 125px;
}

.section-connection-scheme .feed-drain {
  left: 48px;
  bottom: 125px;
}

.section-connection-scheme .return-drain {
  left: 48px;
  top: 112px;
}

.section-connection-scheme .pressure-feed-start {
  right: 128px;
  bottom: 127px;
}

.section-connection-scheme .pressure-feed-start small {
  right: 36px;
  top: -10px;
}

.section-connection-scheme .emitters-result {
  top: 268px;
  left: 39%;
}

.section-connection-scheme .puddles-result {
  bottom: 224px;
  left: 46px;
}

.section-connection-scheme .organic-result {
  right: 210px;
  bottom: 226px;
}

.section-connection-scheme .puddle-a {
  left: 126px;
  bottom: 192px;
}

.section-connection-scheme .puddle-b {
  left: 330px;
  bottom: 214px;
}

.section-connection-scheme .puddle-c {
  left: 232px;
  bottom: 158px;
}

.section-connection-scheme .puddle-d {
  right: 292px;
  bottom: 184px;
}

.section-connection-scheme .puddle-e {
  left: 180px;
  bottom: 252px;
}

.section-connection-scheme .puddle-f {
  right: 330px;
  bottom: 254px;
}

.section-connection-scheme .drop-capture,
.section-connection-scheme .pressure-capture {
  top: 154px;
  bottom: 140px;
  left: 74px;
  right: 204px;
}

.feed-riser {
  position: absolute;
  z-index: 1;
  right: 155px;
  top: 120px;
  bottom: 132px;
  width: 5px;
  background: #111;
}

.drop-test-scheme .scheme-node,
.drop-test-scheme .scheme-node::after {
  display: none;
}

.emitter-modal {
  max-width: 640px;
}

.section-side-panel {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.section-side-panel h2 {
  font-size: 22px;
}

.panel-block {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}

.panel-block h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.18;
  font-weight: 950;
}

.nested-panel-block {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.nested-panel-block h4 {
  margin: 0;
  color: #334038;
  font-size: 15px;
  font-weight: 900;
}

.panel-action {
  min-height: 54px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 950;
}

.panel-action.selected {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}

.pressure-menu {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.pressure-menu button {
  min-height: 48px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  text-align: left;
  padding: 0 12px;
}

.pressure-menu button.selected {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}

.panel-critical {
  min-height: 58px;
  font-size: 17px;
}

.drop-list {
  display: grid;
  gap: 8px;
}

.drop-list button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  font-weight: 900;
  text-align: left;
  padding: 0 10px;
}

.section-history {
  margin-top: 6px;
}

.section-history-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 8px;
  background: #fff;
}

.section-history-card.is-critical {
  border-left-color: var(--red);
  background: #fff8f7;
}

.section-history-card strong {
  font-size: 17px;
}

.section-history-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.section-history-head span {
  border-radius: 8px;
  padding: 6px 9px;
  background: #f4f7f5;
  color: #334038;
  font-weight: 900;
}

.section-history-card p {
  margin: 0;
  color: #2e3a33;
  line-height: 1.4;
  font-weight: 750;
}

.section-history-lines {
  display: grid;
  gap: 5px;
}

.section-history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.section-history-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #f4f7f5;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.check-grid button {
  min-height: 52px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
}

.check-grid button.selected {
  background: var(--blue);
  border-color: #0f3f99;
  color: #fff;
}

.field-title {
  display: block;
  color: var(--muted);
  font-weight: 900;
}

.opening-note {
  min-height: 52px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef4f0;
  color: #2a392f;
  padding: 10px 12px;
  font-weight: 900;
}

.opening-note.ok-note {
  background: var(--green-soft);
  color: var(--green);
  border-color: rgba(21, 128, 61, 0.22);
}

.opening-note.warning-note {
  background: var(--yellow-soft);
  color: #8a5a00;
  border-color: rgba(217, 154, 8, 0.28);
}

.opening-note.danger-note {
  background: var(--red-soft);
  color: var(--red);
  border-color: rgba(200, 55, 44, 0.28);
}

.photo-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.photo-thumb {
  padding: 0;
  border: 0;
  background: transparent;
}

.photo-strip img {
  width: 88px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(14, 24, 18, 0.72);
}

.photo-modal {
  width: min(960px, 96vw);
  max-height: 92vh;
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.photo-modal img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 8px;
  background: #f4f7f5;
}

.modal-close {
  justify-self: end;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 14px;
  font-weight: 900;
}

.photo-missing {
  color: var(--muted);
  font-weight: 800;
}

.task-detail-block {
  display: grid;
  gap: 16px;
}

.inspection-result {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}

.inspection-result h3 {
  margin: 0;
  font-size: 18px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.result-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.result-card span {
  color: var(--muted);
  font-weight: 750;
}

.danger-text {
  color: var(--red);
  font-weight: 850;
}

.journal-filters button {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 850;
}

.journal-filters button.selected {
  background: var(--blue);
  color: #fff;
  border-color: #0f3f99;
}

.info {
  display: grid;
  gap: 5px;
  padding: 12px;
  border-radius: 8px;
  background: #f7faf8;
}

.info span {
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}

.info strong {
  font-size: 18px;
}

.detail-panel {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(360px, 1.1fr);
  gap: 18px;
  padding: 18px;
  border-left-width: 8px;
}

.detail-main,
.history {
  display: grid;
  gap: 16px;
  align-content: start;
}

.detail-title {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.type-chip {
  background: #eef4f0;
  color: #2a392f;
}

.record-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left-width: 6px;
  border-radius: 8px;
  background: #fff;
}

.record-card p {
  color: #39443d;
  line-height: 1.4;
}

.inspection-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 18px;
  padding-bottom: 86px;
}

.form-section {
  padding: 20px;
  display: grid;
  gap: 18px;
  align-content: start;
  box-shadow: var(--shadow);
  border-top: 5px solid #dce9df;
}

.form-section h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.photo-section {
  grid-column: 1 / -1;
}

.segmented {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  min-inline-size: 0;
}

.segmented legend {
  padding: 0;
  margin-bottom: 0;
}

.segmented div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 10px;
}

.segmented button {
  min-height: 58px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #2b352e;
  font-weight: 900;
  padding: 8px 10px;
  box-shadow: inset 0 -2px 0 rgba(31, 42, 36, 0.04);
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease, transform 0.12s ease;
}

.segmented button.selected,
.segmented button.active,
.segmented button[aria-pressed="true"] {
  background: var(--blue);
  color: #fff;
  border-color: #0f3f99;
  box-shadow: 0 0 0 3px rgba(29, 100, 216, 0.22), 0 8px 18px rgba(29, 100, 216, 0.22);
  transform: translateY(-1px);
}

.segmented button[aria-pressed="true"]::after {
  content: " ✓";
  font-weight: 950;
}

.segmented button:hover {
  border-color: #8fb8a0;
}

.text-field textarea {
  padding: 13px 14px;
  min-height: 106px;
  resize: vertical;
}

.compact-field input {
  min-height: 48px;
}

.object-description,
.form-hint {
  color: var(--muted);
  line-height: 1.45;
  font-weight: 650;
}

.form-info-block {
  background: #f9fffb;
  border-top-color: var(--green);
}

.critical-section {
  border-top-color: #f3a199;
  background: #fffafa;
}

.critical-section.is-critical {
  border-color: #f3a199;
  border-top-color: var(--red);
  background: #fff1ef;
}

.critical-toggle {
  width: 100%;
  min-height: 74px;
  border-radius: 8px;
  border: 2px solid #f3a199;
  background: #fff;
  color: var(--red);
  font-size: 20px;
  font-weight: 950;
}

.critical-toggle.selected,
.critical-toggle[aria-pressed="true"] {
  background: var(--red);
  border-color: #8f1d16;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(200, 55, 44, 0.2), 0 10px 24px rgba(200, 55, 44, 0.22);
}

.notice {
  margin-bottom: 14px;
  border: 1px solid #f2c94c;
  border-radius: 8px;
  background: #fff7d8;
  color: #7a5200;
  padding: 14px 16px;
  font-weight: 850;
}

.route-wide {
  grid-column: 1 / -1;
}

.valve-grid,
.line-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.valve-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.valve-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf9;
}

.valve-card h3 {
  margin: 0;
  font-size: 18px;
}

.field-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.photo-button {
  width: max-content;
  background: var(--blue);
  color: #fff;
  min-height: 60px;
}

.photo-button input {
  display: none;
}

.photo-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.photo-preview img {
  width: 168px;
  height: 126px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.photo-preview.small img {
  width: 112px;
  height: 84px;
}

.sticky-actions {
  position: fixed;
  right: 24px;
  bottom: 18px;
  left: 324px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 30px rgba(31, 42, 36, 0.14);
}

.sticky-actions .primary-action {
  max-width: 320px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 14px;
}

.office-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.office-tabs button {
  min-height: 46px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  font-weight: 950;
}

.office-tabs button.selected {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}

.compact-dashboard {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.office-block {
  display: grid;
  gap: 14px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.critical-office {
  border-color: #f3a199;
  border-top: 6px solid var(--red);
  background: #fff8f7;
}

.critical-office.no-critical {
  border-color: #b8dcc4;
  border-top-color: var(--green);
  background: #f7fcf8;
}

.ok-card {
  border: 1px solid #b8dcc4;
  border-radius: 8px;
  background: #f1fbf4;
  color: var(--green);
  padding: 16px;
  font-weight: 950;
}

.critical-record {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-color: #f3a199;
  border-left: 6px solid var(--red);
}

.critical-record strong,
.critical-record span {
  display: block;
}

.critical-record span {
  color: var(--muted);
  font-weight: 750;
}

.critical-type {
  width: max-content;
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--red);
  color: #fff;
  font-weight: 950;
}

.office-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.office-row {
  border-radius: 8px;
  background: #f8fbf9;
  padding: 12px;
  color: #2f3d35;
  font-weight: 750;
}

.office-row.danger-row {
  background: #fff1ef;
  color: #8f1d16;
}

.danger-zone {
  display: flex;
  justify-content: flex-end;
  padding: 18px 0 0;
}

.danger-action {
  color: var(--red);
  border-color: #f3a199;
}

.stat-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.compact-stat {
  min-height: 116px;
  gap: 5px;
}

.office-kpi {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--surface);
}

.office-kpi:hover,
.office-kpi.selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(29, 100, 216, 0.12), var(--shadow);
}

.stat-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 950;
}

.compact-stat small {
  color: var(--muted);
  font-weight: 800;
}

.stat-card .text-icon {
  color: var(--green);
  width: 30px;
  height: 30px;
  font-size: 24px;
}

.stat-card span {
  color: var(--muted);
  font-weight: 800;
}

.stat-card strong {
  font-size: 38px;
}

.compact-stat strong {
  font-size: 28px;
}

.change-grid,
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.change-card,
.mini-chart {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.change-card p {
  display: grid;
  gap: 3px;
  margin: 0 0 10px;
  padding: 10px;
  border-radius: 8px;
  background: #f8fbf9;
}

.change-card p span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.change-card h3,
.mini-chart h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(84px, 120px) 1fr 32px;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
  font-weight: 850;
}

.bar-row b {
  height: 10px;
  border-radius: 999px;
  background: var(--blue);
}

.office-detail-panel {
  border-color: var(--blue);
  box-shadow: 0 14px 34px rgba(29, 100, 216, 0.12);
}

.detail-card-grid,
.event-grid,
.signal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.detail-card,
.event-card,
.signal-card,
.map-analytics-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.detail-card h3,
.event-card h3,
.map-analytics-card h3 {
  margin: 0;
  font-size: 18px;
}

.detail-card p,
.event-card p,
.map-analytics-card p {
  margin: 0;
}

.detail-meta,
.event-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.detail-card.is-warning,
.event-card.is-warning {
  border-left: 6px solid var(--yellow);
}

.detail-card.is-repeated {
  border-left: 6px solid var(--red);
  background: #fff8f7;
}

.detail-card.is-resolved,
.event-card.is-normal {
  border-left: 6px solid var(--green);
}

.event-card.is-critical {
  border-left: 6px solid var(--red);
  background: #fff8f7;
}

.event-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

.period-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.period-controls button,
.period-controls input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
  font-weight: 850;
}

.period-controls button.selected {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}

.office-focus-card {
  display: grid;
  gap: 6px;
  width: 100%;
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
  text-align: left;
  box-shadow: var(--shadow);
}

.office-focus-card strong {
  font-size: 34px;
}

.office-focus-card small {
  color: var(--muted);
  font-weight: 800;
}

.office-focus-card.resolved-summary {
  border-color: #b8dcc4;
  background: #f7fcf8;
}

.office-table {
  display: grid;
  gap: 6px;
  overflow: auto;
}

.office-table-head,
.office-table-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) minmax(150px, 1fr) 100px 120px;
  gap: 10px;
  align-items: center;
}

.office-table-head {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.office-table-row {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf9;
  font-weight: 800;
}

.office-table-row small {
  display: block;
  color: var(--muted);
  font-weight: 750;
}

.signal-card {
  border-left: 6px solid var(--yellow);
  background: #fffdf2;
  font-weight: 900;
}

.object-analytics {
  display: grid;
  gap: 14px;
}

.map-analytics-card {
  border-top: 4px solid var(--green);
}

.journal-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.journal-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
}

.journal-table th,
.journal-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.journal-table tr.critical-row td {
  background: #fff1ef;
  color: #6e201a;
  font-weight: 800;
}

.journal-table th {
  position: sticky;
  top: 0;
  background: #eef4f0;
  color: #26352c;
  font-size: 13px;
  text-transform: uppercase;
}

.empty,
.empty-cell {
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 14px;
    gap: 12px;
  }

  .brand span,
  .route-note {
    display: none;
  }

  .nav {
    display: flex;
    overflow-x: auto;
  }

  .nav-button {
    flex: 0 0 auto;
  }

  .filters,
  .detail-panel,
  .inspection-form,
  .dashboard-grid,
  .field-pair,
  .section-layout {
    grid-template-columns: 1fr 1fr;
  }

  .sticky-actions {
    left: 14px;
    right: 14px;
  }
}

@media (max-width: 760px) {
  .content {
    padding: 16px;
  }

  .page-header {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: 28px;
  }

  .filters,
  .detail-panel,
  .inspection-form,
  .dashboard-grid,
  .field-pair,
  .section-layout,
  .map-board {
    grid-template-columns: 1fr;
  }

  .bottom-nav {
    grid-template-columns: repeat(3, 1fr);
  }

  .map-mainline {
    min-height: 180px;
  }

  .section-layout {
    gap: 14px;
  }

  .irrigation-scheme {
    min-height: 460px;
    padding-left: 18px;
  }

  .sticky-actions {
    flex-direction: column;
  }

  .sticky-actions .primary-action {
    max-width: none;
  }
}
