:root {
  --accent: #f6821f;
  --accent-dark: #c96812;
  --accent-soft: #fff4e8;
  --blue: #086fff;
  --ink: #111827;
  --text: #1f2937;
  --muted: #5f6368;
  --subtle: #7b8190;
  --line: #dfe3ea;
  --line-soft: #edf0f5;
  --surface: #ffffff;
  --surface-soft: #f7f8fa;
  --surface-hover: #f2f4f7;
  --rail: #fbfbfc;
  --red: #b42318;
  --green: #147a3f;
  --green-soft: #e8f5ec;
  --yellow-soft: #fff4cf;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--surface-soft);
  font-size: 13px;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 620;
  padding: 6px 12px;
  cursor: pointer;
  box-shadow: none;
}

button:hover {
  background: var(--surface-hover);
  border-color: #c7ccd6;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.hidden {
  display: none !important;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f7f8fa;
}

.login-panel {
  width: min(386px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 26px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.08);
}

.login-logo {
  width: 190px;
  max-width: 100%;
  display: block;
  margin-bottom: 18px;
}

.login-panel h1 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 25px;
  font-weight: 720;
}

.login-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.form-stack {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  background: var(--surface);
  color: var(--ink);
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(246, 130, 31, 0.22);
  border-color: var(--accent);
}

.form-stack button,
#exportButton {
  background: var(--accent);
  border-color: var(--accent);
  color: #111827;
}

.form-stack button:hover,
#exportButton:hover {
  background: #f59b43;
}

.error-text {
  min-height: 18px;
  color: var(--red) !important;
  margin: 0;
}

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

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

.sidebar {
  min-height: 0;
  background: var(--rail);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 16px 20px;
}

.brand-block {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.brand-logo {
  width: 174px;
  display: block;
}

.sidebar-collapse-button {
  width: 30px;
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 7px;
  font-size: 18px;
  line-height: 1;
}

.sidebar-collapsed .sidebar {
  padding-inline: 12px;
}

.sidebar-collapsed .brand-logo,
.sidebar-collapsed .quick-search,
.sidebar-collapsed .nav-label,
.sidebar-collapsed .nav-caret,
.sidebar-collapsed .subnav,
.sidebar-collapsed #logoutButton {
  display: none;
}

.sidebar-collapsed .brand-block {
  justify-content: center;
}

.sidebar-collapsed .nav-item {
  grid-template-columns: 1fr;
  justify-items: center;
  padding-inline: 6px;
}

.sidebar-collapsed .nav-icon {
  width: 30px;
  height: 30px;
}

.quick-search {
  width: 100%;
  box-sizing: border-box;
  appearance: none;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--subtle);
  padding: 0 12px;
  font-size: 12px;
}

.quick-search:focus {
  border-color: var(--orange);
  outline: 2px solid rgba(246, 130, 31, 0.16);
}

nav {
  display: grid;
  gap: 3px;
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
  overflow: auto;
  min-height: 0;
}

.nav-item,
.ghost-button {
  width: 100%;
  min-height: 36px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  border-color: transparent;
  font-weight: 590;
  border-radius: 8px;
}

.nav-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #eef1f5;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-caret {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 17px;
  font-weight: 520;
  line-height: 1;
}

.nav-item.active .nav-icon {
  background: var(--accent);
  color: #111827;
}

.nav-item:hover,
.ghost-button:hover {
  background: var(--surface-hover);
  border-color: transparent;
}

.nav-item.active {
  background: #eef1f5;
  color: #111827;
  border-color: transparent;
}

.subnav {
  display: grid;
  gap: 2px;
  margin: -1px 0 7px 29px;
  padding: 4px 0 4px 12px;
  border-left: 1px solid var(--line);
}

.subnav-button {
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-size: 12px;
  font-weight: 620;
  line-height: 1.25;
}

.subnav-button:hover {
  background: var(--surface-hover);
  color: var(--ink);
}

.subnav-button.active {
  background: #f3f4f6;
  border-color: transparent;
  color: #111827;
}

.ghost-button {
  margin-top: auto;
  border-color: var(--line);
  background: var(--surface);
}

.content {
  min-width: 0;
  display: grid;
  grid-template-rows: 56px minmax(0, 1fr);
}

.cloud-header {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 0 34px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.account-chip,
.domain-chip,
.header-links {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.account-chip {
  color: var(--ink);
  font-weight: 620;
}

.cloud-mark {
  width: 22px;
  height: 14px;
  border-radius: 999px;
  background: var(--accent);
  display: inline-block;
  position: relative;
}

.cloud-mark::before,
.cloud-mark::after {
  content: "";
  position: absolute;
  background: var(--accent);
  border-radius: 999px;
}

.cloud-mark::before {
  width: 14px;
  height: 14px;
  left: 2px;
  top: -6px;
}

.cloud-mark::after {
  width: 10px;
  height: 10px;
  right: 1px;
  top: -3px;
}

.domain-chip {
  color: var(--ink);
  font-weight: 650;
}

.domain-chip small {
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--surface);
}

.header-links {
  color: var(--ink);
  font-weight: 620;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.live-lamp {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #c7ccd6;
  box-shadow: none;
}

.live-lamp.active {
  background: #16a34a;
  border-color: #16a34a;
  animation: pulseLamp 1.2s ease-in-out infinite;
}

@keyframes pulseLamp {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.16);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(22, 163, 74, 0.05);
  }
}

.page-shell {
  padding: 34px;
  overflow: auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.topbar h1 {
  margin: 0;
  color: #0b1220;
  font-size: 29px;
  line-height: 1.15;
  font-weight: 760;
}

.topbar p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

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

.recommendation-card {
  height: 90px;
  margin-bottom: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
}

.recommendation-card > div {
  min-width: 0;
  flex: 1;
}

.recommendation-card strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 680;
}

.summary-feed {
  height: 42px;
  margin-top: 6px;
  overflow-y: auto;
  padding-right: 8px;
  display: grid;
  gap: 5px;
  overscroll-behavior: contain;
}

.feed-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  color: var(--text);
  font-size: 12px;
  line-height: 1.25;
}

.feed-row time {
  color: var(--muted);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.feed-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.map-panel,
.panel-card {
  margin-bottom: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.map-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.map-copy {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.map-copy strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 720;
}

.map-copy small {
  display: block;
  margin-top: 4px;
  line-height: 1.4;
  max-width: 520px;
}

.turkey-map {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%),
    #fff;
}

.turkey-svg {
  width: 100%;
  height: auto;
  aspect-ratio: 1000 / 430;
  display: block;
}

.province-cell {
  cursor: pointer;
  outline: none;
  fill: #fff;
  stroke: rgba(246, 130, 31, 0.78);
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
  transition: fill 120ms ease, stroke 120ms ease, stroke-width 120ms ease, filter 120ms ease;
}

.province-cell:hover,
.province-cell:focus-visible {
  fill: #9ca3af;
  filter: drop-shadow(0 2px 3px rgba(17, 24, 39, 0.18));
}

.province-cell.active {
  fill: #ffb000;
  stroke: #f6821f;
}

.province-cell.selected {
  fill: #009844;
  stroke: #009844;
  stroke-width: 1.7;
  filter: drop-shadow(0 2px 4px rgba(0, 152, 68, 0.22));
}

.province-cell:hover,
.province-cell:focus-visible,
.province-cell.active:hover,
.province-cell.active:focus-visible,
.province-cell.selected:hover,
.province-cell.selected:focus-visible {
  fill: #9ca3af;
}

.map-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.map-tooltip {
  position: absolute;
  z-index: 6;
  min-width: max-content;
  pointer-events: none;
  opacity: 0;
  transform: translateY(3px);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #111827;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 760;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.14);
}

.map-tooltip.visible {
  opacity: 1;
}

.map-loading {
  min-height: 326px;
  display: grid;
  place-content: center;
  gap: 6px;
  text-align: center;
  color: var(--muted);
}

.map-loading strong {
  color: var(--ink);
  font-size: 14px;
}

.vehicle-tracking-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 18px;
  padding: 8px 0;
}

.google-location-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  padding: 8px 0;
}

.vehicle-list-card,
.vehicle-map-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.vehicle-list-card {
  padding: 12px;
}

.vehicle-list-title,
.vehicle-map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.vehicle-list-title strong,
.vehicle-map-header h3 {
  color: var(--ink);
  font-size: 16px;
  font-weight: 760;
}

.compact-action {
  padding: 8px 10px;
  font-size: 12px;
}

.vehicle-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.vehicle-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  padding: 14px;
}

.vehicle-row {
  width: 100%;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.vehicle-row:hover,
.vehicle-row.active {
  border-color: #f6821f;
  background: #fff7df;
}

.vehicle-code {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  border-radius: 7px;
  background: #111827;
  color: #ffb000;
  font-weight: 820;
  letter-spacing: 0;
}

.vehicle-row strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
}

.vehicle-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.vehicle-map-card {
  min-width: 0;
  padding: 14px;
}

.vehicle-map-header {
  margin-bottom: 10px;
}

.vehicle-map-header span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.vehicle-map-canvas {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
}

.google-map-shell {
  position: relative;
  height: 520px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #eef2f7;
}

.google-map-shell iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.google-marker-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.google-map-marker {
  position: absolute;
  transform: translate(-50%, -100%);
  pointer-events: auto;
  border: 2px solid #fff;
  border-radius: 999px 999px 999px 4px;
  background: #ffb000;
  color: #111827;
  min-width: 42px;
  min-height: 34px;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 820;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.22);
  cursor: pointer;
}

.google-map-marker.team {
  background: #111827;
  color: #ffb000;
}

.google-map-marker:hover,
.google-map-marker:focus-visible {
  outline: none;
  transform: translate(-50%, -105%);
}

.vehicle-turkey-svg {
  height: 430px;
}

.vehicle-province {
  fill: #fff;
}

.vehicle-province.active {
  fill: #ffe8a6;
}

.vehicle-map-button {
  cursor: pointer;
  outline: none;
}

.vehicle-map-button:focus-visible .vehicle-marker {
  stroke: #111827;
  stroke-width: 3;
}

.vehicle-marker-pulse {
  fill: rgba(255, 176, 0, 0.26);
  stroke: rgba(246, 130, 31, 0.45);
  stroke-width: 1;
}

.vehicle-marker-pulse.selected {
  fill: rgba(255, 176, 0, 0.4);
  stroke: #111827;
  stroke-width: 2;
}

.vehicle-marker {
  stroke: #fff;
  stroke-width: 2;
}

.vehicle-marker.online {
  fill: #16a34a;
}

.vehicle-marker.idle {
  fill: #f59e0b;
}

.vehicle-marker-label {
  fill: #111827;
  font-size: 11px;
  font-weight: 820;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 3px;
  stroke-linejoin: round;
  pointer-events: none;
}

.turkey-silhouette {
  position: absolute;
  inset: 38px 28px 42px;
  border: 2px solid rgba(246, 130, 31, 0.42);
  background:
    radial-gradient(circle at 23% 53%, rgba(255, 176, 0, 0.16) 0 11%, transparent 12%),
    radial-gradient(circle at 53% 50%, rgba(255, 176, 0, 0.12) 0 16%, transparent 17%),
    #fff8e6;
  clip-path: polygon(
    2% 35%, 8% 29%, 17% 30%, 24% 36%, 34% 33%, 45% 26%, 55% 31%, 66% 24%,
    80% 27%, 91% 19%, 99% 33%, 94% 47%, 98% 58%, 88% 67%, 78% 66%, 70% 75%,
    58% 68%, 48% 77%, 37% 72%, 29% 83%, 20% 76%, 12% 83%, 7% 70%, 1% 65%,
    6% 53%, 0 45%
  );
}

.map-watermark {
  position: absolute;
  left: 34px;
  top: 22px;
  color: #c26b00;
  font-size: 12px;
  font-weight: 760;
}

.province {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  width: 14px;
  height: 14px;
  display: flex;
  place-items: center;
  justify-content: center;
  border: 1px solid rgba(246, 130, 31, 0.58);
  border-radius: 999px;
  color: #4b5563;
  font-size: 10px;
  line-height: 1;
  background: #fff;
  transform: translate(-50%, -50%);
  padding: 0;
  box-shadow: none;
  z-index: 2;
}

.province span {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  min-width: max-content;
  max-width: 120px;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 5px 7px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.12);
}

.province:hover span,
.province.selected span {
  opacity: 1;
}

.province.active {
  background: #ffb000;
  color: #111827;
  border-color: #f6821f;
  font-weight: 720;
}

.province.selected {
  width: 18px;
  height: 18px;
  background: #009844;
  border-color: #009844;
  outline: none;
  outline-offset: 2px;
  z-index: 4;
}

.map-legend {
  position: absolute;
  right: 14px;
  bottom: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  padding: 6px 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 9px;
  height: 9px;
  display: inline-block;
  border-radius: 999px;
  border: 1px solid #f6821f;
  background: #fff;
}

.legend-dot.active {
  background: #ffb000;
}

.legend-dot.selected {
  background: #009844;
  border-color: #009844;
}

.province-detail {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfd;
  padding: 14px;
}

.forklift-table .clickable-row {
  cursor: pointer;
  transition: background 120ms ease;
}

.forklift-table .clickable-row:hover,
.forklift-table .clickable-row:focus-visible {
  outline: none;
  background: #fff7ed;
}

.forklift-detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.province-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 12px;
}

.province-detail-header strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 760;
}

.province-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.province-metrics div {
  min-height: 66px;
  display: grid;
  align-content: center;
  gap: 5px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.province-metrics span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.province-metrics strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.province-detail-note {
  display: grid;
  gap: 3px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.province-detail-note strong {
  color: var(--ink);
}

.company-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.company-entry-panel {
  max-width: 980px;
}

.company-form .wide-input {
  grid-column: span 2;
}

.company-form button {
  background: var(--accent);
  border-color: var(--accent);
  color: #111827;
}

.compact-button,
.small-action-button {
  min-height: 0;
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.2;
}

.small-action-button {
  margin-left: 10px;
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
  font-weight: 650;
  vertical-align: middle;
}

.small-action-button:hover {
  border-color: var(--accent);
  background: #fff8e6;
}

.hint-text {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.recommendation-card > span {
  align-self: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.stats-grid article,
.table-card,
.filters {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
}

.stats-grid article {
  padding: 14px 16px;
}

.stats-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
}

.stats-grid strong {
  display: block;
  margin-top: 10px;
  color: var(--ink);
  font-size: 25px;
  line-height: 1;
  font-weight: 680;
}

.filters {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 150px 150px;
  align-items: end;
  gap: 10px;
  padding: 12px;
  margin-bottom: 24px;
}

.table-card {
  overflow: hidden;
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 700;
}

.table-header small {
  color: var(--muted);
  font-weight: 600;
}

.table-wrap {
  overflow: auto;
}

.page-shell.dashboard-mode {
  background:
    linear-gradient(180deg, #080d14 0%, #111827 330px, #f7f8fb 330px, #f7f8fb 100%);
}

.page-shell.dashboard-mode .topbar h1 {
  color: #ffffff;
}

.page-shell.dashboard-mode .topbar p {
  color: #a9b6c8;
}

.page-shell.dashboard-mode .topbar .ghost-button {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  color: #f8fafc;
}

.page-shell.dashboard-mode .topbar .primary-button {
  box-shadow: 0 14px 28px rgba(255, 176, 0, 0.28);
}

.table-card.dashboard-table-shell {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.dashboard-table-shell .table-header {
  display: none;
}

.dashboard-table-shell .table-wrap {
  overflow: visible;
}

.dashboard-table-shell table {
  min-width: 0;
}

.dashboard-table-shell tbody tr,
.dashboard-table-shell tbody tr:hover {
  background: transparent;
}

.dashboard-table-shell td {
  padding: 0;
  border-bottom: 0;
  background: transparent;
}

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

.analytics-dashboard {
  display: grid;
  gap: 16px;
  border: 1px solid #2b3a4e;
  border-radius: 16px;
  background:
    radial-gradient(circle at 18% 4%, rgba(47, 155, 255, 0.24), transparent 28%),
    radial-gradient(circle at 88% 8%, rgba(40, 209, 124, 0.14), transparent 24%),
    linear-gradient(135deg, #070b12 0%, #111827 52%, #07111f 100%);
  color: #e5edf7;
  padding: 20px;
  box-shadow: 0 26px 70px rgba(2, 6, 23, 0.38);
}

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

.analytics-head h3 {
  margin: 5px 0 4px;
  color: #ffffff;
  font-size: 19px;
  line-height: 1.1;
  font-weight: 760;
}

.analytics-head p {
  margin: 0;
  color: #9aa8ba;
  font-size: 12px;
  line-height: 1.45;
}

.analytics-dashboard .subpage-eyebrow {
  color: #2f9bff;
}

.analytics-period {
  min-width: 140px;
  border: 1px solid #314257;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  padding: 10px 12px;
  text-align: right;
}

.analytics-period span,
.analytics-period strong {
  display: block;
}

.analytics-period span {
  color: #9aa8ba;
  font-size: 11px;
  font-weight: 700;
}

.analytics-period strong {
  margin-top: 4px;
  color: #ffffff;
  font-size: 12px;
}

.analytics-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.analytics-kpi {
  min-height: 96px;
  border: 1px solid #2f4055;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(21, 31, 45, 0.98), rgba(13, 22, 34, 0.98));
  padding: 13px 14px;
}

.analytics-kpi span,
.analytics-kpi small {
  display: block;
  color: #91a0b4;
}

.analytics-kpi span {
  font-size: 11px;
  font-weight: 720;
}

.analytics-kpi strong {
  display: block;
  margin-top: 9px;
  color: #ffffff;
  font-size: 25px;
  line-height: 1;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.analytics-kpi small {
  margin-top: 9px;
  font-size: 11px;
}

.analytics-kpi.up strong {
  color: #2f9bff;
}

.analytics-kpi.flat strong {
  color: #28d17c;
}

.analytics-kpi.warn strong {
  color: #ffb000;
}

.analytics-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(280px, 0.9fr);
  gap: 14px;
}

.analytics-chart-card,
.analytics-donut-card,
.analytics-mini-list,
.dashboard-insight-grid.dark .dashboard-mini-table {
  border: 1px solid #2b3a4e;
  border-radius: 12px;
  background: rgba(8, 14, 24, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.analytics-chart-card {
  min-height: 360px;
  padding: 14px;
}

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

.analytics-donut-card,
.analytics-mini-list {
  min-height: 172px;
  padding: 14px;
}

.analytics-card-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.analytics-card-title strong {
  color: #ffffff;
  font-size: 13px;
  font-weight: 750;
}

.analytics-card-title span {
  color: #758397;
  font-size: 11px;
  font-weight: 650;
}

.analytics-chart {
  height: 292px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 8px;
}

.analytics-chart svg {
  width: 100%;
  height: 100%;
  display: block;
}

.chart-grid line {
  stroke: rgba(145, 160, 180, 0.18);
  stroke-width: 0.5;
}

.trend-area {
  fill: url(#trendFill);
}

.trend-line {
  fill: none;
  stroke: #1c8dff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.analytics-chart circle {
  fill: #dbeafe;
  stroke: #1c8dff;
  stroke-width: 0.8;
}

.chart-axis {
  display: flex;
  justify-content: space-between;
  color: #758397;
  font-size: 11px;
  font-weight: 650;
}

.analytics-donut-wrap {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.analytics-donut {
  width: 108px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle, #0d131c 0 47%, transparent 48%),
    conic-gradient(#1c8dff 0 var(--completed), #24b47e var(--completed) calc(var(--completed) + var(--open)), #ffb000 calc(var(--completed) + var(--open)) 360deg);
}

.analytics-donut span {
  color: #ffffff;
  font-size: 20px;
  font-weight: 780;
}

.analytics-legend {
  display: grid;
  gap: 9px;
  color: #aab6c6;
  font-size: 11px;
  font-weight: 650;
}

.analytics-legend span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.analytics-legend i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.legend-completed {
  background: #1c8dff;
}

.legend-open {
  background: #24b47e;
}

.legend-missing {
  background: #ffb000;
}

.analytics-actions {
  display: grid;
  gap: 8px;
}

.analytics-actions div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid rgba(145, 160, 180, 0.16);
  padding: 7px 0;
}

.analytics-actions div:last-child {
  border-bottom: 0;
}

.analytics-actions span {
  color: #aab6c6;
  font-size: 12px;
  font-weight: 650;
}

.analytics-actions strong {
  color: #ffffff;
  font-size: 13px;
  font-weight: 760;
}

.dashboard-insight-grid.dark {
  gap: 14px;
}

.dashboard-insight-grid.dark .dashboard-mini-table {
  background: rgba(10, 17, 27, 0.78);
}

.dashboard-insight-grid.dark .dashboard-mini-title {
  border-bottom-color: rgba(145, 160, 180, 0.16);
}

.dashboard-insight-grid.dark .dashboard-mini-title strong,
.dashboard-insight-grid.dark .dashboard-mini-table td {
  color: #e5edf7;
}

.dashboard-insight-grid.dark .dashboard-mini-title span,
.dashboard-insight-grid.dark .dashboard-mini-table th {
  color: #91a0b4;
}

.dashboard-insight-grid.dark .dashboard-mini-table th,
.dashboard-insight-grid.dark .dashboard-mini-table td {
  border-bottom-color: rgba(145, 160, 180, 0.14);
}

.dashboard-panels {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 2px 0;
}

.dashboard-panels article {
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 14px;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.dashboard-panels article:hover {
  background: #ffffff;
  border-color: #cfd5df;
  transform: translateY(-1px);
}

.dashboard-panels strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 720;
}

.dashboard-panels span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.4;
  font-size: 12px;
}

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

.module-dashboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 6px 0 16px;
}

.module-dashboard article {
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.module-dashboard strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
}

.module-dashboard span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.stock-workspace {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 2px 0 12px;
}

.stock-summary-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.stock-summary-row article {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px 14px;
}

.stock-summary-row span,
.stock-summary-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.stock-summary-row strong {
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  font-weight: 720;
}

.stock-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.stock-toolbar h3 {
  margin: 5px 0 4px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
  font-weight: 760;
}

.stock-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.stock-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

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

.stock-table {
  min-width: 1180px;
  border-collapse: collapse;
}

.stock-table th,
.stock-table td {
  white-space: nowrap;
  padding: 9px 12px;
  font-size: 12px;
}

.stock-table th {
  color: #4b5563;
  font-weight: 730;
}

.stock-table tr:hover {
  background: #fbfcfd;
}

.stock-code {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfd;
  color: var(--ink);
  font-size: 11px;
  font-weight: 760;
}

.stock-product {
  font-weight: 720;
  color: var(--ink);
}

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

.stock-entry-card .stock-toolbar {
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  padding: 0 0 12px;
}

.stock-form-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.stock-form-grid label {
  display: grid;
  gap: 6px;
}

.stock-form-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.stock-form-grid input,
.stock-form-grid select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
  font-size: 13px;
}

.stock-form-grid input:focus,
.stock-form-grid select:focus {
  outline: 2px solid rgba(255, 176, 0, 0.22);
  border-color: var(--accent);
}

.stock-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
}

.stock-form-footer span {
  color: var(--muted);
  font-size: 12px;
}

.stock-form-footer button {
  min-width: 150px;
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
}

.stock-form-footer button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.dashboard-mini-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.dashboard-mini-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.dashboard-mini-title strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 740;
}

.dashboard-mini-title span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
}

.dashboard-mini-table table {
  width: 100%;
  border-collapse: collapse;
}

.dashboard-mini-table th,
.dashboard-mini-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  font-size: 12px;
  vertical-align: top;
}

.dashboard-mini-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.dashboard-mini-table tr:last-child td {
  border-bottom: 0;
}

.module-workspace {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 2px 0 12px;
}

.module-health-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.module-health-row article {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.module-health-row span,
.module-health-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.module-health-row strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.2;
  font-weight: 760;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-subpage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.module-page-card {
  min-height: 86px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.module-page-card:hover {
  background: #fbfcfd;
  border-color: #c9d0d8;
}

.module-page-card.active {
  background: #fff8eb;
  border-color: rgba(255, 169, 0, 0.58);
}

.module-page-card strong,
.module-page-card small {
  display: block;
}

.module-page-card strong {
  margin-top: 9px;
  font-size: 13px;
  font-weight: 720;
}

.module-page-card small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 620;
}

.module-page-index {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef1f5;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.subpage-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.subpage-panel.compact {
  align-items: start;
}

.module-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 320px;
  gap: 12px;
}

.module-form-card,
.module-list-card,
.module-detail-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.module-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.module-section-title span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
}

.module-section-title small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.module-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.module-form .wide-field,
.module-form button {
  grid-column: 1 / -1;
}

.module-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.module-toolbar h3 {
  margin: 4px 0 0;
  font-size: 17px;
}

.module-toolbar-actions {
  width: min(190px, 100%);
}

.module-state-line,
.module-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
}

.module-state-line {
  padding: 8px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.module-table-scroll {
  overflow: auto;
  margin: 10px -14px;
}

.module-table {
  min-width: 780px;
}

.module-table th,
.module-table td {
  padding: 8px 12px;
}

.table-sort {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 760;
}

.table-sort:hover {
  background: transparent;
  color: var(--blue);
}

.module-pagination {
  justify-content: flex-end;
}

.detail-kv {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 8px 10px;
  font-size: 12px;
}

.detail-kv span {
  color: var(--muted);
  font-weight: 650;
}

.detail-kv strong {
  color: var(--ink);
  font-weight: 650;
  overflow-wrap: anywhere;
}

.timeline.compact-timeline {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.timeline.compact-timeline strong {
  color: var(--ink);
  font-size: 12px;
}

.timeline.compact-timeline span {
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  display: grid;
  gap: 5px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
}

.panel-error {
  display: grid;
  justify-items: start;
  gap: 8px;
  border: 1px solid #f2c2bd;
  border-radius: 8px;
  background: #fff8f7;
  color: var(--ink);
  padding: 18px;
}

.panel-error strong {
  font-size: 14px;
}

.panel-error span {
  color: var(--red);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.subpage-eyebrow {
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: 0;
}

.subpage-panel h3 {
  margin: 7px 0 8px;
  font-size: 20px;
  line-height: 1.2;
}

.subpage-panel p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.subpage-meta-grid {
  display: grid;
  gap: 8px;
  align-content: start;
}

.subpage-meta-grid span {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 620;
}

.subpage-meta-grid strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

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

th,
td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: middle;
}

th {
  color: #3f4754;
  background: #fbfcfd;
  font-size: 12px;
  font-weight: 690;
  text-transform: none;
}

td {
  color: var(--ink);
  font-size: 13px;
}

tbody tr:hover {
  background: #fbfcfd;
}

.primary-cell {
  color: var(--ink);
  font-size: 13px;
  font-weight: 690;
}

.muted-cell,
small {
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.pill.green {
  background: var(--green-soft);
  color: var(--green);
}

.pill.yellow {
  background: var(--yellow-soft);
  color: #7a5100;
}

.pill.red {
  background: #ffe7e3;
  color: var(--red);
}

.pill.blue {
  background: #eaf2ff;
  color: #0957c3;
}

.row-actions {
  display: flex;
  gap: 8px;
  white-space: nowrap;
}

.row-actions button {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 12px;
}

.secondary-button {
  background: var(--surface);
  border-color: var(--line);
  color: var(--blue);
}

.secondary-button:hover {
  background: #f5f9ff;
  border-color: #bdd2ff;
}

.quiet-button {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

.danger-button {
  background: #fff;
  border-color: #f2c2bd;
  color: var(--red);
}

.danger-button:hover {
  background: #fff5f4;
  border-color: #e9aaa3;
}

.detail-panel {
  position: fixed;
  top: 16px;
  right: 16px;
  bottom: 16px;
  width: min(560px, calc(100vw - 32px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

.detail-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.detail-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 720;
}

.detail-header p {
  margin: 4px 0 0;
  color: var(--muted);
}

.icon-button {
  width: 32px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
}

.detail-content {
  overflow: auto;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.detail-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface);
}

.detail-section h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 720;
}

.field-grid {
  display: grid;
  grid-template-columns: 138px 1fr;
  gap: 6px 10px;
  font-size: 12px;
}

.field-grid span:nth-child(odd) {
  color: var(--muted);
  font-weight: 650;
}

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

.compact-list > div {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fbfcfd;
}

.compact-list strong {
  color: var(--ink);
  font-size: 12px;
}

.compact-list span,
.crm-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.photo-grid img,
.signature-img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
}

.photo-grid img {
  aspect-ratio: 4 / 3;
}

.signature-img {
  max-height: 130px;
  object-fit: contain;
  background: var(--surface-soft);
}

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

  .sidebar {
    position: static;
  }

  .content {
    grid-template-rows: auto 1fr;
  }

  .cloud-header {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 14px 18px;
    gap: 10px;
  }

  .page-shell {
    padding: 22px 16px;
  }

  .stats-grid,
  .analytics-kpis,
  .analytics-main-grid,
  .analytics-donut-wrap,
  .filters,
  .company-form,
  .map-stack,
  .google-location-layout,
  .vehicle-tracking-layout,
  .dashboard-panels,
  .dashboard-insight-grid,
  .module-dashboard,
  .module-health-row,
  .stock-summary-row,
  .stock-form-grid,
  .province-metrics,
  .module-subpage-grid,
  .module-grid,
  .module-form,
  .subpage-panel {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
  }

  .analytics-head {
    flex-direction: column;
  }

  .analytics-period {
    width: 100%;
    text-align: left;
  }

  .stock-toolbar,
  .stock-form-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .stock-toolbar-actions {
    justify-content: flex-start;
  }
}
