:root {
  --bg: #f3f5f7;
  --sidebar: #172026;
  --sidebar-soft: #223039;
  --panel: #ffffff;
  --text: #18212b;
  --muted: #647285;
  --line: #dde4ec;
  --primary: #157a63;
  --primary-dark: #0f5f4d;
  --danger: #b42318;
  --warning: #a15c07;
  --soft: #edf7f3;
  --blue-soft: #edf4ff;
  --yellow-soft: #fff7e6;
  --red-soft: #fff0ed;
}

/* Linepolymer site visual system */
:root {
  --bg: oklch(98% 0.006 125);
  --surface: oklch(100% 0 0);
  --surface-strong: oklch(94% 0.025 125);
  --fg: oklch(19% 0.022 135);
  --muted: oklch(48% 0.018 135);
  --border: oklch(86% 0.018 125);
  --accent: oklch(45% 0.13 128);
  --accent-ink: oklch(24% 0.09 128);
  --accent-soft: oklch(91% 0.06 128);
  --success: oklch(46% 0.13 145);
  --warn: oklch(58% 0.12 75);
  --danger: oklch(48% 0.15 30);
  --shadow: 0 20px 50px rgba(27, 55, 32, .1);
  --font-display: 'Avenir Next', 'Segoe UI', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --panel: var(--surface);
  --text: var(--fg);
  --line: var(--border);
  --primary: var(--accent-ink);
  --primary-dark: color-mix(in oklch, var(--accent-ink), black 12%);
  --warning: var(--warn);
  --soft: var(--accent-soft);
  --sidebar: var(--surface);
  --sidebar-soft: var(--surface-strong);
  --blue-soft: oklch(94% 0.035 250);
  --yellow-soft: oklch(96% 0.055 82);
  --red-soft: oklch(96% 0.045 30);
}

body {
  background:
    radial-gradient(circle at 18% 0%, color-mix(in oklch, var(--accent-soft), transparent 58%), transparent 30rem),
    linear-gradient(180deg, var(--bg), oklch(96% 0.012 125));
  color: var(--fg);
  font: 15px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:focus-visible {
  outline: 3px solid color-mix(in oklch, var(--accent), white 20%);
  outline-offset: 3px;
}

.topbar {
  background: color-mix(in oklch, var(--surface), transparent 8%);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid color-mix(in oklch, var(--border), transparent 15%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .7);
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav-shell {
  align-items: center;
  display: flex;
  gap: 18px;
  margin: 0 auto;
  min-height: 76px;
  padding: 0 24px;
  width: min(1380px, 100%);
}

.brand {
  align-items: center;
  color: var(--fg);
  display: inline-flex;
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-weight: 650;
  gap: 12px;
  letter-spacing: -.01em;
  min-width: 196px;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: var(--accent-ink);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
  color: #fff;
  display: inline-flex;
  font: 750 14px/1 var(--font-display);
  height: 38px;
  justify-content: center;
  width: 38px;
}

.brand small {
  color: var(--muted);
  display: block;
  font: 12px/1.1 var(--font-mono);
  letter-spacing: .06em;
  margin-top: 2px;
  text-transform: uppercase;
}

.brand strong {
  color: var(--fg);
  display: block;
  line-height: 1.1;
}

.nav-links {
  align-items: center;
  display: flex;
  flex: 1;
  flex-wrap: nowrap;
  gap: 4px;
  justify-content: flex-start;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 560;
  padding: 8px 8px;
}

.nav-links a:hover {
  background: var(--surface-strong);
  color: var(--fg);
  text-decoration: none;
}

.logout-form {
  flex: 0 0 auto;
  margin: 0;
}

.mobile-menu {
  display: none;
}

.page {
  margin: 0 auto;
  max-width: 1280px;
  padding: 34px 28px 64px;
}

h1,
h2,
h3 {
  color: var(--fg);
  font-family: var(--font-display);
  letter-spacing: -.02em;
}

h1 {
  font-size: clamp(32px, 4vw, 48px);
}

h2 {
  font-size: clamp(22px, 2.5vw, 31px);
}

.page-head {
  align-items: end;
  margin-bottom: 26px;
}

.page-head p,
.lead,
p {
  color: var(--muted);
}

button,
.button {
  border-radius: 999px;
  font-weight: 650;
  min-height: 42px;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

button:hover,
.button:hover {
  border-color: color-mix(in oklch, var(--accent), var(--border) 35%);
  transform: translateY(-1px);
}

button:active,
.button:active {
  transform: translateY(0);
}

.primary {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
}

.primary:hover {
  background: color-mix(in oklch, var(--accent-ink), black 12%);
}

.panel,
.quick-status,
.day,
.login-box,
.stats div,
.table-wrap,
.filters,
.funnel-column,
.list-panel,
.map-panel {
  background: var(--surface);
  border-color: var(--border);
  border-radius: 22px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .02);
}

.stats strong,
.kpi {
  font-family: var(--font-display);
  letter-spacing: -.03em;
}

.status,
.pill,
.payline {
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 650;
}

th {
  background: color-mix(in oklch, var(--surface-strong), white 22%);
  color: color-mix(in oklch, var(--fg), var(--muted) 22%);
}

input,
select,
textarea {
  background: #fff;
  border-radius: 14px;
  min-height: 44px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  outline: 0;
}

.message {
  background: color-mix(in oklch, var(--accent-soft), white 52%);
  border-color: color-mix(in oklch, var(--accent), white 48%);
  color: var(--accent-ink);
}

.empty-state {
  background: color-mix(in oklch, var(--accent-soft), white 52%);
  border-color: color-mix(in oklch, var(--accent), white 45%);
  border-radius: 20px;
  color: var(--accent-ink);
}

.mini-card,
.object-card,
.feed-row,
.check-row {
  border-color: color-mix(in oklch, var(--border), transparent 12%);
}

.spb-map {
  background:
    linear-gradient(120deg, color-mix(in oklch, var(--accent-soft), transparent 28%), transparent 36%),
    linear-gradient(35deg, oklch(92% 0.035 250 / .72), transparent 44%),
    color-mix(in oklch, var(--surface-strong), white 32%);
  border-radius: 22px;
}

.login-box {
  box-shadow: var(--shadow);
}

@media (max-width: 1120px) {
  .nav-links {
    display: none;
  }

  .mobile-menu {
    display: block;
    margin-left: auto;
    position: relative;
  }

  .mobile-menu summary {
    background: var(--accent-ink);
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    font-weight: 650;
    list-style: none;
    padding: 10px 14px;
  }

  .mobile-menu summary::-webkit-details-marker {
    display: none;
  }

  .mobile-menu-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow);
    min-width: 230px;
    overflow: hidden;
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    z-index: 30;
  }

  .mobile-menu nav {
    display: grid;
  }

  .mobile-menu nav a {
    border-bottom: 1px solid var(--border);
    color: var(--fg);
    padding: 12px 15px;
  }
}

@media (max-width: 900px) {
  .app-shell {
    display: block;
  }

  .sidebar,
  .mobile-topbar {
    display: none;
  }

  .nav-shell {
    min-height: 68px;
    padding: 10px 14px;
  }

  .logout-form {
    display: none;
  }

  .page {
    padding: 22px 14px 48px;
  }
}

@media (max-width: 560px) {
  .brand small {
    display: none;
  }

  .brand strong {
    font-size: 15px;
  }

  .panel,
  .quick-status,
  .day,
  .login-box,
  .stats div,
  .table-wrap,
  .filters,
  .funnel-column,
  .list-panel,
  .map-panel {
    border-radius: 18px;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, sans-serif;
  font-size: 15px;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.sidebar {
  background: var(--sidebar);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  align-items: center;
  color: #fff;
  display: flex;
  gap: 12px;
}

.brand:hover {
  text-decoration: none;
}

.brand small {
  color: #aab7c3;
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.brand-mark {
  align-items: center;
  background: var(--primary);
  border-radius: 8px;
  display: inline-flex;
  font-weight: 700;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.side-nav {
  display: grid;
  gap: 4px;
}

.side-nav a {
  border-radius: 7px;
  color: #dce5ed;
  padding: 10px 12px;
}

.side-nav a:hover {
  background: var(--sidebar-soft);
  color: #fff;
  text-decoration: none;
}

.logout-form {
  margin-top: auto;
}

.main-area {
  min-width: 0;
}

.mobile-topbar {
  display: none;
}

.mobile-menu {
  position: relative;
}

.mobile-menu summary {
  background: var(--primary);
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  list-style: none;
  padding: 9px 12px;
}

.mobile-menu summary::-webkit-details-marker {
  display: none;
}

.mobile-menu-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(24, 33, 43, .22);
  min-width: 220px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
}

.mobile-menu nav {
  display: grid;
  overflow: hidden;
}

.mobile-menu nav a {
  border-bottom: 1px solid var(--line);
  color: var(--text);
  padding: 11px 14px;
}

.mobile-menu form {
  margin: 0;
  padding: 10px;
}

.page {
  margin: 0 auto;
  max-width: 1280px;
  padding: 28px;
}

.page-head {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 22px;
}

.eyebrow {
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2 {
  line-height: 1.2;
  margin: 0;
}

h1 {
  font-size: 30px;
}

h2 {
  font-size: 18px;
}

p {
  margin: 8px 0 0;
}

section {
  margin-bottom: 22px;
}

.panel,
.quick-status,
.day,
.login-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.panel-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.grid,
.dashboard-grid {
  display: grid;
  gap: 18px;
}

.grid.two,
.dashboard-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stats {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.stats span,
.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.stats strong {
  display: block;
  font-size: 24px;
  margin-top: 7px;
}

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

button,
.button {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  display: inline-block;
  font: inherit;
  padding: 9px 12px;
}

button:hover,
.button:hover {
  border-color: var(--primary);
  text-decoration: none;
}

.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.primary:hover {
  background: var(--primary-dark);
}

.small-button {
  padding: 6px 8px;
}

.table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
}

.panel .table-wrap {
  border-radius: 7px;
}

table {
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

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

th {
  background: #f7f9fb;
  color: #4b5969;
  font-size: 13px;
  font-weight: 700;
}

tr:last-child td {
  border-bottom: 0;
}

.nowrap {
  white-space: nowrap;
}

.strong-link {
  color: var(--text);
  font-weight: 700;
}

.status,
.pill,
.payline {
  background: var(--soft);
  border-radius: 999px;
  color: var(--primary-dark);
  display: inline-block;
  font-size: 13px;
  padding: 4px 8px;
}

.status-new,
.status-in_progress {
  background: var(--yellow-soft);
  color: var(--warning);
}

.status-done {
  background: var(--blue-soft);
  color: #24558f;
}

.status-cancelled {
  background: var(--red-soft);
  color: var(--danger);
}

.debt,
.error {
  color: var(--danger);
}

.messages {
  margin-bottom: 16px;
}

.message {
  background: #fff8e5;
  border: 1px solid #f2d680;
  border-radius: 8px;
  padding: 10px 12px;
}

.filters,
.edit-form {
  margin: 0;
}

.filters {
  align-items: end;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
}

label {
  color: var(--muted);
  display: grid;
  gap: 6px;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  padding: 9px 10px;
  width: 100%;
}

textarea {
  resize: vertical;
}

.edit-form {
  display: grid;
  gap: 14px;
}

.edit-form p {
  margin: 0;
}

.edit-form ul {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.edit-form li label {
  align-items: center;
  color: var(--text);
  display: flex;
  gap: 8px;
}

.edit-form input[type="checkbox"] {
  width: auto;
}

.month-title {
  color: var(--text);
  font-weight: 700;
  padding: 8px 4px;
}

.calendar-month {
  overflow-x: auto;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(132px, 1fr));
}

.calendar-weekdays span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 0 10px 10px;
}

.calendar-grid {
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
}

.calendar-cell {
  background: #fff;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  min-height: 132px;
  padding: 9px;
}

.muted-cell {
  background: #f8fafc;
}

.today-cell {
  box-shadow: inset 0 0 0 2px var(--primary);
}

.calendar-date {
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 8px;
}

.calendar-items {
  display: grid;
  gap: 6px;
}

.calendar-chip {
  background: var(--soft);
  border-radius: 7px;
  color: var(--primary-dark);
  display: grid;
  gap: 2px;
  padding: 7px;
}

.calendar-chip:hover {
  text-decoration: none;
}

.calendar-chip span {
  font-size: 12px;
}

.calendar-chip strong {
  font-size: 13px;
  line-height: 1.2;
}

.map-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.8fr);
}

.map-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.spb-map {
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(120deg, rgba(21, 122, 99, .08), transparent 36%),
    linear-gradient(35deg, rgba(36, 85, 143, .12), transparent 44%),
    #eef3f7;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.spb-map::before,
.spb-map::after {
  background: rgba(255, 255, 255, .65);
  content: "";
  position: absolute;
}

.spb-map::before {
  height: 1px;
  left: 8%;
  right: 8%;
  top: 50%;
}

.spb-map::after {
  bottom: 8%;
  left: 50%;
  top: 8%;
  width: 1px;
}

.river {
  background: rgba(79, 142, 204, .35);
  border-radius: 999px;
  position: absolute;
}

.river-main {
  height: 40px;
  left: -8%;
  top: 48%;
  transform: rotate(-12deg);
  width: 116%;
}

.river-small {
  height: 24px;
  left: 34%;
  top: 24%;
  transform: rotate(52deg);
  width: 60%;
}

.map-label {
  color: rgba(24, 33, 43, .55);
  font-size: 13px;
  font-weight: 700;
  position: absolute;
}

.map-label.center {
  left: 42%;
  top: 43%;
}

.map-label.north {
  left: 18%;
  top: 16%;
}

.map-label.south {
  bottom: 15%;
  right: 18%;
}

.map-point {
  align-items: center;
  background: var(--primary);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(24, 33, 43, .22);
  color: #fff;
  display: flex;
  height: 32px;
  justify-content: center;
  position: absolute;
  transform: translate(-50%, -50%);
  width: 32px;
  z-index: 2;
}

.map-point:hover {
  transform: translate(-50%, -50%) scale(1.08);
  text-decoration: none;
}

.map-point.status-new,
.map-point.status-in_progress {
  background: #c77b10;
}

.map-point.status-done {
  background: #24558f;
}

.object-card {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: 34px minmax(0, 1fr);
  padding: 12px 0;
}

.object-card:first-of-type {
  border-top: 0;
}

.object-number {
  align-items: center;
  background: var(--soft);
  border-radius: 50%;
  color: var(--primary-dark);
  display: flex;
  font-weight: 700;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.object-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

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

.funnel-column,
.list-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.mini-card {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 5px;
  padding: 12px 0;
}

.mini-card:first-of-type {
  border-top: 0;
}

.check-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 10px 0;
}

.check-row:first-child {
  border-top: 0;
}

.check-button {
  min-width: 42px;
}

.done {
  color: var(--muted);
  text-decoration: line-through;
}

.inline-form {
  margin: 0;
}

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

.compact-form button {
  align-self: end;
}

.feed-row {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 6px;
  padding: 12px 0;
}

.feed-row:first-child {
  border-top: 0;
}

.icon-danger {
  border-color: #f3b5ae;
  color: var(--danger);
  font-size: 20px;
  line-height: 1;
  min-width: 36px;
  padding: 6px 10px;
}

.empty-state {
  background: #f8fafc;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 18px;
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.login-box {
  width: min(420px, calc(100vw - 32px));
}

.login-box form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

@media (max-width: 900px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .mobile-topbar {
    align-items: center;
    background: var(--sidebar);
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
  }

  .page {
    padding: 18px 14px 48px;
  }

  .page-head,
  .calendar-order {
    align-items: stretch;
    flex-direction: column;
  }

  .grid.two,
  .dashboard-grid,
  .stats,
  .map-layout {
    grid-template-columns: 1fr;
  }

  .calendar-weekdays,
  .calendar-grid {
    grid-template-columns: repeat(7, minmax(112px, 1fr));
  }

  table {
    min-width: 720px;
  }

  .edit-form p {
    min-width: 0;
  }
}

.glass-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.glass-trigger {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .38)),
    color-mix(in oklch, var(--accent-soft), white 45%);
  border-color: color-mix(in oklch, var(--accent), white 45%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 12px 28px rgba(27, 55, 32, .08);
  color: var(--accent-ink);
}

.glass-modal[hidden] {
  display: none;
}

.glass-modal {
  inset: 0;
  position: fixed;
  z-index: 60;
}

.glass-backdrop {
  background:
    radial-gradient(circle at 20% 8%, rgba(209, 235, 196, .42), transparent 34rem),
    rgba(12, 24, 18, .22);
  backdrop-filter: blur(18px) saturate(1.35);
  inset: 0;
  position: absolute;
}

.glass-sheet {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .58)),
    color-mix(in oklch, var(--surface), transparent 10%);
  border: 1px solid rgba(255, 255, 255, .66);
  border-radius: 30px;
  box-shadow: 0 30px 90px rgba(10, 32, 20, .24), inset 0 1px 0 rgba(255, 255, 255, .86);
  left: 50%;
  max-height: min(760px, calc(100vh - 42px));
  overflow: auto;
  padding: 24px;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, calc(100vw - 32px));
}

.glass-head {
  align-items: start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.glass-head h2 {
  margin-top: 8px;
}

.glass-close {
  align-items: center;
  background: rgba(255, 255, 255, .54);
  border-color: rgba(255, 255, 255, .72);
  border-radius: 50%;
  display: inline-flex;
  font-size: 28px;
  height: 44px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 44px;
}

.glass-body {
  display: grid;
  gap: 14px;
}

.glass-body .glass-modal-field {
  margin: 0;
}

body.modal-open {
  overflow: hidden;
}

.order-subnav {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .48)),
    color-mix(in oklch, var(--surface), transparent 10%);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 999px;
  box-shadow: 0 14px 40px rgba(27, 55, 32, .08), inset 0 1px 0 rgba(255, 255, 255, .8);
  display: flex;
  gap: 6px;
  margin: -8px 0 22px;
  overflow-x: auto;
  padding: 8px;
  position: sticky;
  scrollbar-width: none;
  top: 82px;
  z-index: 15;
}

.order-subnav::-webkit-scrollbar {
  display: none;
}

.order-subnav a {
  border-radius: 999px;
  color: var(--muted);
  flex: 0 0 auto;
  font-weight: 650;
  padding: 9px 13px;
}

.order-subnav a:hover {
  background: color-mix(in oklch, var(--accent-soft), white 35%);
  color: var(--accent-ink);
  text-decoration: none;
}

.glass-section {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .54)),
    color-mix(in oklch, var(--surface), transparent 8%);
  border: 1px solid rgba(255, 255, 255, .66);
  border-radius: 24px;
  box-shadow: 0 16px 44px rgba(27, 55, 32, .08), inset 0 1px 0 rgba(255, 255, 255, .78);
  scroll-margin-top: 112px;
}

.employee-picker {
  display: grid;
  gap: 10px;
  width: 100%;
}

.employee-picker-row {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.employee-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.employee-chip {
  background: var(--accent-soft);
  border-color: color-mix(in oklch, var(--accent), white 45%);
  color: var(--accent-ink);
  min-height: 34px;
  padding: 6px 10px;
}

.order-filters {
  align-items: end;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.checkbox-filter {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 8px;
  min-height: 44px;
}

.checkbox-filter input {
  min-height: 0;
  width: auto;
}

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

.payment-indicator {
  align-items: center;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border: 1px solid var(--border);
  border-left: 5px solid var(--muted);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(22, 47, 34, 0.08);
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
  padding: 16px 18px;
}

.payment-indicator span,
.payment-indicator small {
  color: var(--muted);
}

.payment-indicator strong {
  color: var(--fg);
  font-size: 20px;
}

.payment-indicator-paid {
  background: color-mix(in srgb, #e6f8ee 78%, white);
  border-left-color: #1f9d55;
}

.payment-indicator-partial {
  background: color-mix(in srgb, #fff5d6 78%, white);
  border-left-color: #d79a13;
}

.payment-indicator-unpaid {
  background: color-mix(in srgb, #ffe8e3 78%, white);
  border-left-color: #d84632;
}

.document-upload-form {
  background: color-mix(in srgb, var(--surface-strong) 72%, white);
  border: 1px solid var(--border);
  border-radius: 18px;
  margin: 16px 0;
  padding: 14px;
}

.document-request-status {
  align-items: center;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 14px 0;
  padding: 12px 14px;
}

.response-table-scroll {
  max-height: 440px;
  overflow: auto;
}

.response-table-scroll thead th {
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 2;
}

.response-row-selected {
  background: #f0faf4;
}

.response-row-rejected {
  background: var(--red-soft);
}

.pill.decision-pill-selected {
  background: #e6f8ee;
  color: #1f7a43;
}

.pill.decision-pill-rejected {
  background: var(--red-soft);
  color: var(--danger);
}

.response-decision-actions {
  margin-top: 8px;
}

.decision-button-accept {
  border-color: #9ad5b2;
  color: #1f7a43;
}

.decision-button-reject {
  border-color: #efb0a9;
  color: var(--danger);
}

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

.photo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  color: var(--fg);
  display: grid;
  gap: 8px;
  overflow: hidden;
  padding: 10px;
}

.photo-card:hover {
  text-decoration: none;
}

.photo-card img {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  object-fit: cover;
  width: 100%;
}

.photo-card small {
  color: var(--muted);
}

.warning-panel {
  background: color-mix(in oklch, var(--yellow-soft), white 36%);
  border: 1px solid color-mix(in oklch, var(--warn), white 35%);
  border-radius: 18px;
  padding: 18px;
}

.warning-panel ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

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

.readiness-form p {
  background: color-mix(in oklch, var(--surface-strong), white 40%);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 10px 12px;
}

.office-widget canvas {
  aspect-ratio: 8 / 5;
  background: #14142a;
  display: block;
  image-rendering: pixelated;
  max-width: 100%;
  width: 100%;
}

@media (max-width: 560px) {
  .glass-actions {
    display: grid;
  }

  .glass-trigger {
    width: 100%;
  }

  .glass-sheet {
    border-radius: 26px 26px 0 0;
    bottom: 0;
    left: 0;
    max-height: calc(100vh - 24px);
    padding: 20px;
    top: auto;
    transform: none;
    width: 100%;
  }
}

/* Practical CRM shell based on the uploaded 2026 interface mockup. */
:root {
  --bg: #f3f5f7;
  --sidebar: #172026;
  --sidebar-soft: #223039;
  --panel: #ffffff;
  --surface: #ffffff;
  --surface-strong: #f8fafc;
  --fg: #18212b;
  --text: #18212b;
  --muted: #647285;
  --border: #dde4ec;
  --line: #dde4ec;
  --accent: #157a63;
  --accent-ink: #0f5f4d;
  --accent-soft: #edf7f3;
  --primary: #157a63;
  --primary-dark: #0f5f4d;
  --danger: #b42318;
  --warning: #a15c07;
  --blue-soft: #edf4ff;
  --yellow-soft: #fff7e6;
  --red-soft: #fff0ed;
  --shadow: 0 18px 48px rgba(23, 32, 38, .10);
}

html {
  background: var(--bg);
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font-body);
}

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

.sidebar {
  background: var(--sidebar);
  color: #eef5f1;
  display: flex;
  flex-direction: column;
  gap: 22px;
  height: 100vh;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 24px 18px;
  position: sticky;
  scrollbar-color: rgba(255, 255, 255, .24) transparent;
  scrollbar-width: thin;
  top: 0;
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .22);
  border-radius: 999px;
}

.sidebar .brand {
  color: #eef5f1;
  display: flex;
  gap: 12px;
  min-width: 0;
  padding: 4px 8px 14px;
}

.sidebar .brand-mark {
  background: var(--primary);
  border-radius: 14px;
  color: #fff;
  height: 42px;
  width: 42px;
}

.sidebar .brand small,
.sidebar-card p,
.sidebar-card small {
  color: #aab7c3;
}

.nav-group {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.nav-title {
  color: #8d9aa5;
  font: 700 11px/1 var(--font-mono);
  letter-spacing: .09em;
  padding: 0 10px 5px;
  text-transform: uppercase;
}

.nav-link {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #dce5ed;
  display: flex;
  font-weight: 620;
  min-height: 42px;
  padding: 10px 11px;
}

.nav-link:hover,
.nav-link.active {
  background: var(--sidebar-soft);
  border-color: rgba(255, 255, 255, .06);
  color: #fff;
  text-decoration: none;
}

.sidebar-card {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  margin-top: auto;
  padding: 14px;
}

.sidebar-card small {
  display: block;
  font: 700 11px/1.25 var(--font-mono);
  letter-spacing: .08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.sidebar-card strong {
  color: #fff;
  display: block;
  font-size: 18px;
}

.sidebar-card .button {
  width: 100%;
}

.content {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  padding: 24px;
}

.topbar {
  align-items: center;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(221, 228, 236, .84);
  border-radius: 24px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .82);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-width: 0;
  padding: 14px;
  position: sticky;
  top: 16px;
  z-index: 10;
}

.page-title {
  display: grid;
  gap: 6px;
  padding: 0 8px;
}

.page-title strong {
  color: var(--text);
  font: 700 20px/1.15 var(--font-display);
}

.top-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  min-width: 0;
}

.top-actions .logout-form {
  margin: 0;
}

.page {
  margin: 0;
  max-width: none;
  min-width: 0;
  padding: 0;
  width: 100%;
}

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

h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
}

h2 {
  font-size: 20px;
}

button,
.button,
.chip-btn {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  display: inline-flex;
  font-weight: 650;
  gap: 8px;
  justify-content: center;
  min-width: 0;
  min-height: 42px;
  padding: 0 14px;
  white-space: normal;
}

button:hover,
.button:hover,
.chip-btn:hover {
  border-color: color-mix(in srgb, var(--primary), var(--line) 45%);
  box-shadow: 0 8px 18px rgba(23, 32, 38, .06);
  text-decoration: none;
}

.primary,
.button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.button.ghost {
  background: #f8fafc;
}

.panel,
.quick-status,
.day,
.login-box,
.stats div,
.filters,
.funnel-column,
.list-panel,
.map-panel,
.glass-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .82);
  overflow: hidden;
}

.panel,
.quick-status,
.day,
.login-box,
.glass-section {
  padding: 18px;
}

.panel-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: -18px -18px 16px;
  padding: 18px;
}

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

.stats div {
  padding: 18px;
}

.stats strong {
  font: 700 30px/1 var(--font-display);
  margin-top: 10px;
}

.filters,
.edit-form {
  display: grid;
  gap: 12px;
}

.filters {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  padding: 16px;
}

.filters label,
.edit-form p,
.edit-form label {
  display: grid;
  gap: 6px;
}

label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

input,
select,
textarea {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--text);
  min-height: 42px;
  padding: 0 11px;
  width: 100%;
}

textarea {
  min-height: 92px;
  padding: 10px 11px;
}

.table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow-x: auto;
  padding: 14px 18px 18px;
}

.panel .table-wrap,
.glass-section .table-wrap {
  border-radius: 18px;
}

table {
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

th {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: .07em;
  padding: 0 12px 10px;
  text-transform: uppercase;
}

td {
  border-top: 1px solid var(--line);
  padding: 13px 12px;
  vertical-align: middle;
}

.status,
.pill,
.payline {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
}

.status-new {
  background: var(--blue-soft);
  color: #24558f;
}

.status-in_progress,
.status-processed,
.status-assigned,
.status-confirmed,
.status-accepted,
.status-on_way,
.status-started {
  background: var(--accent-soft);
  color: var(--primary-dark);
}

.status-done {
  background: #e6f8ee;
  color: #1f7a43;
}

.status-cancelled {
  background: var(--red-soft);
  color: var(--danger);
}

.messages {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.message,
.empty-state {
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--primary), white 62%);
  border-radius: 18px;
  color: var(--primary-dark);
  padding: 12px 14px;
}

.order-subnav {
  top: 102px;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
    width: 100%;
  }

  .sidebar {
    height: auto;
    max-width: 100%;
    min-height: auto;
    padding: 14px 18px;
    position: static;
    width: 100%;
  }

  .sidebar .brand {
    padding-bottom: 6px;
  }

  .nav-group {
    display: flex;
    gap: 8px;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    width: 100%;
  }

  .nav-group::-webkit-scrollbar {
    display: none;
  }

  .nav-title,
  .sidebar-card {
    display: none;
  }

  .nav-link {
    flex: 0 0 auto;
    min-height: 38px;
  }

  .content {
    max-width: 100%;
    padding: 18px;
    width: 100%;
  }
}

@media (max-width: 860px) {
  .topbar,
  .page-head {
    align-items: stretch;
    flex-direction: column;
    position: static;
    width: 100%;
  }

  .topbar > *,
  .page-head > * {
    min-width: 0;
  }

  .top-actions,
  .page-head .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: stretch;
    width: 100%;
  }

  .top-actions .logout-form,
  .top-actions .logout-form button {
    width: 100%;
  }

  .grid.two,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 14px;
  }

  .content {
    padding: 12px;
  }

  .topbar,
  .panel,
  .quick-status,
  .day,
  .login-box,
  .stats div,
  .filters,
  .funnel-column,
  .list-panel,
  .map-panel,
  .glass-section,
  .table-wrap {
    border-radius: 18px;
  }

  .top-actions,
  .page-head .actions {
    grid-template-columns: 1fr;
  }

  .filters {
    grid-template-columns: 1fr;
  }
}

/* Linepolymer landscaping theme for CRM. */
:root {
  --paper: #efece2;
  --paper-deep: #ded9cb;
  --ink: #172019;
  --muted: #647066;
  --pine: #153822;
  --pine-deep: #0d1a11;
  --moss: #52733b;
  --lime: #c5dc54;
  --line: rgba(23, 32, 25, .16);
  --border: rgba(23, 32, 25, .16);
  --panel: rgba(255, 255, 255, .56);
  --surface: rgba(255, 255, 255, .66);
  --surface-strong: rgba(239, 236, 226, .78);
  --fg: var(--ink);
  --text: var(--ink);
  --accent: var(--moss);
  --accent-ink: var(--pine);
  --accent-soft: rgba(197, 220, 84, .18);
  --primary: var(--pine);
  --primary-dark: var(--pine-deep);
  --soft: rgba(197, 220, 84, .18);
  --shadow: 0 24px 70px rgba(15, 30, 23, .14);
}

html {
  background: var(--paper);
  scrollbar-color: var(--moss) var(--paper);
}

body {
  background:
    linear-gradient(180deg, rgba(239, 236, 226, .94), rgba(239, 236, 226, .88)),
    linear-gradient(135deg, rgba(197, 220, 84, .16), transparent 38%),
    linear-gradient(315deg, rgba(82, 115, 59, .16), transparent 42%),
    var(--paper);
  color: var(--ink);
}

body::before {
  background:
    linear-gradient(rgba(23, 32, 25, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 32, 25, .04) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  inset: 0;
  opacity: .38;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

.app-shell {
  grid-template-columns: 286px minmax(0, 1fr);
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(13, 26, 17, .96), rgba(21, 56, 34, .94)),
    var(--pine-deep);
  border-right: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 18px 0 70px rgba(10, 26, 16, .18);
  color: #fff;
  padding: 22px 16px;
}

.sidebar .brand {
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 22px;
  background: rgba(255, 255, 255, .06);
  padding: 12px;
}

.sidebar .brand-mark {
  background: #fff;
  border: 1px solid rgba(197, 220, 84, .42);
  border-radius: 50%;
  color: var(--pine);
  font-weight: 900;
}

.sidebar .brand strong {
  letter-spacing: .04em;
  text-transform: uppercase;
}

.sidebar .brand small,
.sidebar-card p,
.sidebar-card small {
  color: rgba(255, 255, 255, .66);
}

.nav-title {
  color: rgba(197, 220, 84, .72);
}

.nav-link {
  border-radius: 999px;
  color: rgba(255, 255, 255, .76);
  font-weight: 720;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, .09);
  border-color: rgba(197, 220, 84, .38);
  color: #fff;
}

.nav-link.active {
  box-shadow: inset 0 0 0 1px rgba(197, 220, 84, .18);
}

.sidebar-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .055));
  border-color: rgba(255, 255, 255, .16);
  border-radius: 22px;
  backdrop-filter: blur(14px);
}

.content {
  gap: 22px;
  padding: 26px;
}

.topbar {
  background:
    linear-gradient(145deg, rgba(239, 236, 226, .78), rgba(255, 255, 255, .56));
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 28px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .84);
  backdrop-filter: blur(18px) saturate(1.18);
}

.page-title .eyebrow,
.eyebrow {
  color: var(--moss);
  font-weight: 850;
  letter-spacing: .15em;
}

.page-title strong,
h1,
h2,
h3 {
  color: var(--ink);
}

h1 {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 780;
}

button,
.button,
.chip-btn {
  background: rgba(255, 255, 255, .52);
  border-color: rgba(23, 32, 25, .14);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 760;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

button:hover,
.button:hover,
.chip-btn:hover {
  border-color: rgba(82, 115, 59, .36);
  box-shadow: 0 12px 28px rgba(15, 30, 23, .11);
  transform: translateY(-1px);
}

.primary,
.button.primary,
.button--lime {
  background: var(--lime);
  border-color: var(--lime);
  color: #17210f;
}

.button.ghost {
  background: rgba(255, 255, 255, .42);
}

.logout-form button {
  background: rgba(21, 56, 34, .08);
}

.panel,
.quick-status,
.day,
.login-box,
.stats div,
.filters,
.funnel-column,
.list-panel,
.map-panel,
.glass-section,
.table-wrap,
.warning-panel,
.empty-state,
.message {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .64), rgba(239, 236, 226, .58));
  border: 1px solid rgba(255, 255, 255, .68);
  border-radius: 28px;
  box-shadow: 0 18px 54px rgba(15, 30, 23, .10), inset 0 1px 0 rgba(255, 255, 255, .82);
  backdrop-filter: blur(16px) saturate(1.12);
}

.panel-head {
  background: rgba(255, 255, 255, .16);
  border-bottom-color: rgba(23, 32, 25, .12);
}

.stats div {
  min-height: 128px;
}

.stats span {
  color: var(--muted);
}

.stats strong {
  color: var(--pine);
}

.filters,
.edit-form {
  gap: 14px;
}

label {
  color: var(--muted);
  font-weight: 760;
  letter-spacing: .035em;
}

input,
select,
textarea {
  background: rgba(255, 255, 255, .48);
  border-color: rgba(23, 32, 25, .14);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .56);
}

input:focus,
select:focus,
textarea:focus {
  background: rgba(255, 255, 255, .74);
  border-color: rgba(82, 115, 59, .48);
  outline: 3px solid rgba(197, 220, 84, .34);
  outline-offset: 2px;
}

.order-subnav {
  background:
    linear-gradient(145deg, rgba(21, 56, 34, .92), rgba(13, 26, 17, .84));
  border-color: rgba(255, 255, 255, .16);
  border-radius: 999px;
  box-shadow: 0 18px 50px rgba(15, 30, 23, .18);
  top: 104px;
}

.order-subnav a {
  color: rgba(255, 255, 255, .72);
}

.order-subnav a:hover,
.order-subnav a:focus-visible {
  background: rgba(197, 220, 84, .16);
  color: #fff;
}

.table-wrap {
  padding: 14px;
}

table {
  border-spacing: 0;
}

th {
  color: var(--moss);
}

td {
  border-top-color: rgba(23, 32, 25, .11);
}

tbody tr:hover {
  background: rgba(197, 220, 84, .08);
}

.status,
.pill,
.payline,
.employee-chip {
  border: 1px solid rgba(82, 115, 59, .18);
  border-radius: 999px;
}

.status-new,
.status-in_progress,
.status-processed,
.status-assigned,
.status-confirmed,
.status-accepted,
.status-on_way,
.status-started,
.employee-chip {
  background: rgba(197, 220, 84, .18);
  color: var(--pine);
}

.payment-indicator {
  background: rgba(255, 255, 255, .46);
  border-color: rgba(255, 255, 255, .68);
  border-radius: 24px;
}

.payment-indicator-paid {
  background: rgba(219, 246, 224, .68);
}

.payment-indicator-partial {
  background: rgba(255, 245, 214, .74);
}

.payment-indicator-unpaid {
  background: rgba(255, 232, 227, .72);
}

.glass-trigger {
  background: rgba(197, 220, 84, .2);
  border-color: rgba(197, 220, 84, .46);
  color: var(--pine);
}

.glass-sheet {
  background:
    linear-gradient(145deg, rgba(239, 236, 226, .86), rgba(255, 255, 255, .68));
  border-color: rgba(255, 255, 255, .72);
  border-radius: 32px;
}

.document-upload-form,
.document-request-status {
  background: rgba(255, 255, 255, .38);
  border-color: rgba(23, 32, 25, .12);
}

.strong-link {
  color: var(--pine);
}

.warning-panel {
  border-color: rgba(161, 92, 7, .26);
}

@media (max-width: 1180px) {
  .sidebar {
    background:
      linear-gradient(135deg, rgba(13, 26, 17, .96), rgba(21, 56, 34, .92));
    border-bottom: 1px solid rgba(255, 255, 255, .16);
    border-right: 0;
  }

  .sidebar .brand {
    width: max-content;
  }

  .nav-link {
    background: rgba(255, 255, 255, .055);
  }

  .order-subnav {
    top: 0;
  }
}

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

  .topbar {
    border-radius: 24px;
  }
}

@media (max-width: 640px) {
  .content {
    padding: 12px;
  }

  .topbar,
  .panel,
  .quick-status,
  .day,
  .login-box,
  .stats div,
  .filters,
  .funnel-column,
  .list-panel,
  .map-panel,
  .glass-section,
  .table-wrap,
  .warning-panel {
    border-radius: 22px;
  }

  .sidebar {
    padding: 12px;
  }
}

/* Compact workflow layout: lighter order blocks and tighter tables. */
.content {
  gap: 16px;
  padding: 20px;
}

.page {
  display: grid;
  gap: 16px;
}

.page-head {
  align-items: center;
  margin-bottom: 0;
}

.page-head h1 {
  font-size: clamp(26px, 3vw, 38px);
}

.page-head p {
  margin-top: 6px;
}

.panel,
.quick-status,
.day,
.login-box,
.filters,
.funnel-column,
.list-panel,
.map-panel,
.glass-section,
.warning-panel {
  border-radius: 22px;
}

.panel,
.quick-status,
.day,
.login-box,
.glass-section {
  padding: 14px;
}

.panel-head {
  margin: -14px -14px 12px;
  padding: 14px;
}

.panel-head h2,
.glass-section > h2,
.quick-status h2 {
  font-size: 18px;
}

.glass-section > .muted {
  margin: -4px 0 12px;
}

.order-subnav {
  margin: -2px 0 6px;
  padding: 6px;
  top: 94px;
}

.order-subnav a {
  font-size: 13px;
  min-height: 34px;
  padding: 7px 11px;
}

.stats {
  gap: 12px;
}

.stats div {
  border-radius: 20px;
  min-height: 96px;
  padding: 14px;
}

.stats strong {
  font-size: 24px;
}

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

.edit-form p,
.edit-form label {
  gap: 5px;
}

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

input,
select,
textarea,
button,
.button,
.chip-btn {
  min-height: 38px;
}

textarea {
  min-height: 78px;
}

.table-wrap {
  border-radius: 20px;
  padding: 8px 10px 10px;
}

table {
  font-size: 14px;
}

th {
  padding: 0 10px 8px;
}

td {
  padding: 10px;
}

.status,
.pill,
.payline {
  min-height: 24px;
  padding: 0 8px;
}

.response-table-scroll {
  max-height: 360px;
}

.response-table-scroll table {
  min-width: 1160px;
}

.response-decision-actions {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-top: 8px;
  min-width: max-content;
}

.response-decision-actions form {
  flex: 0 0 auto;
  margin: 0;
}

.response-decision-actions button {
  min-height: 36px;
  padding: 0 12px;
  white-space: nowrap;
}

.decision-button-accept,
.decision-button-reject {
  background: rgba(255, 255, 255, .44);
}

.quick-status .actions {
  gap: 8px;
}

.quick-status .actions button {
  min-height: 36px;
}

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

  .order-subnav {
    top: 0;
  }
}

@media (max-width: 640px) {
  .content {
    padding: 10px;
  }

  .page {
    gap: 12px;
  }

  .panel,
  .quick-status,
  .day,
  .login-box,
  .glass-section {
    padding: 12px;
  }

  .panel-head {
    margin: -12px -12px 10px;
    padding: 12px;
  }
}

/* Fit modal groups and keep form actions compact. */
.edit-form > button[type="submit"],
.compact-form > button[type="submit"],
.document-upload-form > button[type="submit"] {
  align-self: end;
  justify-self: start;
  min-width: 150px;
  width: auto;
}

#order-main .edit-form > button[type="submit"] {
  grid-column: 1 / -1;
}

.glass-actions {
  align-items: center;
  gap: 8px;
}

.glass-trigger {
  min-height: 36px;
  padding: 0 13px;
}

.glass-sheet {
  left: 50%;
  max-height: min(680px, calc(100dvh - 28px));
  padding: 18px;
  top: 50%;
  width: min(620px, calc(100vw - 28px));
}

.glass-head {
  margin-bottom: 12px;
}

.glass-head h2 {
  font-size: 22px;
  margin-top: 4px;
}

.glass-body {
  gap: 10px;
}

.glass-body .glass-modal-field {
  max-width: 100%;
}

.glass-body input,
.glass-body select,
.glass-body textarea {
  min-width: 0;
}

.glass-close {
  height: 38px;
  width: 38px;
}

@media (max-width: 760px) {
  .glass-sheet {
    bottom: 10px;
    left: 10px;
    max-height: calc(100dvh - 20px);
    right: 10px;
    top: auto;
    transform: none;
    width: auto;
  }
}

/* Scroll long glass dialogs without moving the CRM page behind them. */
.glass-modal {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 28px 12px;
}

.glass-sheet {
  left: auto;
  margin: 0 auto;
  max-height: none;
  overflow: visible;
  position: relative;
  top: auto;
  transform: none;
}

@media (max-width: 760px) {
  .glass-modal {
    padding: 10px;
  }

  .glass-sheet {
    bottom: auto;
    left: auto;
    max-height: none;
    right: auto;
    width: min(620px, 100%);
  }
}

/* Executive dashboard and action logs. */
.executive-stats {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.executive-stats div {
  min-height: 104px;
}

.attention-list {
  display: grid;
  gap: 10px;
}

.attention-list a {
  align-items: center;
  background: rgba(255, 255, 255, .38);
  border: 1px solid rgba(23, 32, 25, .12);
  border-radius: 18px;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  min-height: 54px;
  padding: 10px 12px;
  text-decoration: none;
}

.attention-list a:hover {
  background: rgba(197, 220, 84, .16);
  border-color: rgba(197, 220, 84, .42);
}

.attention-list span {
  color: var(--muted);
  font-weight: 760;
}

.attention-list strong {
  color: var(--pine);
  font-size: 24px;
}

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

.timeline-item {
  background: rgba(255, 255, 255, .34);
  border: 1px solid rgba(23, 32, 25, .11);
  border-radius: 18px;
  display: grid;
  gap: 6px;
  grid-template-columns: auto auto 1fr;
  padding: 12px;
}

.timeline-item time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.timeline-item strong {
  color: var(--pine);
}

.timeline-item p {
  grid-column: 1 / -1;
  margin: 0;
}

.compact-timeline {
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

@media (max-width: 640px) {
  .timeline-item {
    grid-template-columns: 1fr;
  }
}
