:root {
  color-scheme: light only;
  --bg: #fafafa;
  --card: #ffffff;
  --surface: #f5f5f5;
  --surface-hover: #ececec;
  --text: #171717;
  --text-muted: #737373;
  --muted: #737373;
  --border: #e5e5e5;
  --border-strong: #d4d4d4;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-float: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.06);
  --glow-blue: none;
  --radius-xl: 12px;
  --radius-lg: 10px;
  --radius-md: 8px;
  --radius-pill: 999px;
  --accent: #171717;
  --accent-blue: #171717;
  --accent-blue-strong: #000000;
  --accent-blue-soft: #f5f5f5;
  --accent-ai: #525252;
  --danger-bg: #fef2f2;
  --danger-text: #991b1b;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light only;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-sans, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  background-color: var(--bg);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.025) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0, 0, 0, 0.025) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.card,
.content,
.view-panel,
.sidebar,
.login-card,
.chip,
.option-row,
.filter-group__toggle {
  color: var(--text);
}

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

.app-shell {
  min-height: 100vh;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  flex-shrink: 0;
}

.app-header__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.app-header__title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.app-header__tagline {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: var(--text-label, 0.8125rem);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: normal;
}

.app-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.app-header__user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 6px;
  border-left: 1px solid var(--border);
}

.app-header__user .auth-user-name {
  margin: 0;
}

.main-area {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.workspace {
  display: flex;
  align-items: stretch;
  gap: 24px;
  flex: 1;
  min-height: 0;
}

.layout {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 24px;
  min-height: 0;
}

.card {
  background: var(--card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.sidebar {
  display: flex;
  flex-direction: column;
  padding: 28px;
  min-height: 0;
  max-height: none;
  overflow: hidden;
}

.stats-card {
  flex-shrink: 0;
}

.sidebar-filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 6px;
  margin-right: -2px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(37, 99, 235, 0.35) rgba(15, 23, 42, 0.06);
}

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

.sidebar-filters::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.05);
  border-radius: 999px;
}

.sidebar-filters::-webkit-scrollbar-thumb {
  background: rgba(37, 99, 235, 0.28);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.sidebar-filters::-webkit-scrollbar-thumb:hover {
  background: rgba(37, 99, 235, 0.42);
  background-clip: padding-box;
}

.filter-group {
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.55);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.filter-group--muted {
  background: rgba(255, 255, 255, 0.72);
}

.filter-group__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.filter-group__toggle:hover {
  background: rgba(255, 255, 255, 0.72);
}

.filter-group__title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.filter-group__chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.18s ease;
  flex-shrink: 0;
}

.filter-group.is-collapsed .filter-group__chevron {
  transform: rotate(-45deg);
}

.filter-group__body {
  padding: 0 14px 14px;
}

.filter-group.is-collapsed .filter-group__body {
  display: none;
}

.filter-group__hint {
  margin: 0;
}

.field-block--compact {
  margin-bottom: 0;
}

.filter-group .toolbar {
  margin-bottom: 0;
}

.filter-group .option-list {
  margin-bottom: 12px;
}

.content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.profile-block {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.auth-user-name {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.profile-block .btn-soft--compact {
  margin-left: auto;
  flex-shrink: 0;
}

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

.login-card {
  width: min(440px, 100%);
  padding: 36px;
  box-shadow: var(--shadow-float);
}

.login-form {
  display: flex;
  flex-direction: column;
}

.login-error {
  margin: 0 0 12px;
  color: var(--danger-text);
  font-size: 14px;
}

.profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
  box-shadow: none;
}

.profile-block h1 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-display-2);
  font-weight: 600;
  letter-spacing: var(--text-display-2-ls);
  line-height: var(--text-display-2-lh);
}

.page-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1.5rem, 2.5vw, 1.875rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.profile-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}

.subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  max-width: 56ch;
}

.subtitle code {
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 12px;
}

.stats-card {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.95);
}

.stats-card::before,
.stats-card::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.stats-card::before {
  width: 120px;
  height: 120px;
  right: -40px;
  top: -50px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12), transparent 70%);
}

.stats-card::after {
  display: none;
}

.stats-card__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.stats-card__sync {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.45;
}

.stats-card__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stats-card__grid strong {
  display: block;
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.04em;
  color: var(--text);
}

.stats-card__grid span {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

.section {
  margin-bottom: 18px;
}

.section-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.field-block {
  margin-bottom: 18px;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}

.field-input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.field-input::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

.field-input:focus {
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.18), 0 8px 24px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

.field-input--inline {
  min-width: 280px;
  width: auto;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.btn-soft,
.btn-primary,
.icon-btn,
.nav-btn {
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.btn-soft {
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: none;
}

.btn-soft--compact {
  padding: 8px 12px;
  font-size: 12px;
}

.btn-soft:hover {
  background: var(--surface);
  box-shadow: none;
  transform: none;
}

.btn-soft:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: none;
}

.btn-primary:hover {
  background: #000000;
  transform: none;
  box-shadow: none;
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary--block {
  width: 100%;
  margin-bottom: 10px;
}

.btn-primary--compact {
  padding: 10px 16px;
  font-size: 13px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.76);
  display: inline-grid;
  place-items: center;
}

.icon-btn--settings svg {
  display: block;
}

.icon-btn--active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 22px rgba(9, 11, 15, 0.22);
}

.icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.filters {
  display: grid;
  gap: 8px;
}

.chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(244, 247, 252, 0.9);
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.76);
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.chip:hover {
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transform: translateX(2px);
}

.chip input {
  appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  background: white;
  position: relative;
  flex-shrink: 0;
}

.chip input:checked {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.1);
}

.chip input:checked::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent-blue);
}

.chip-label {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.chip-count,
.muted-badge {
  font-size: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  padding: 4px 8px;
  border-radius: var(--radius-pill);
}

.option-list {
  display: grid;
  gap: 0;
  background: rgba(244, 247, 252, 0.9);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.76);
}

.option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.18s ease;
}

.option-row:hover {
  background: rgba(255, 255, 255, 0.68);
}

.option-row:last-child {
  border-bottom: none;
}

.option-row__text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.option-check {
  appearance: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  background: white;
  position: relative;
  flex-shrink: 0;
}

.option-check:checked {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.1);
}

.option-check:checked::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--accent-blue);
}

.color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 18px 18px 0;
  padding: 0;
  background: transparent;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  align-self: stretch;
  max-width: none;
  width: calc(100% - 36px);
  box-shadow: none;
  backdrop-filter: none;
}

.domain-hint {
  margin: 10px 18px 0;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.nav-btn {
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
}

.nav-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
}

.nav-btn--active {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
}

.nav-btn--active:hover {
  color: #ffffff;
  background: var(--accent);
}

.stations-subnav {
  display: inline-flex;
  gap: 6px;
  margin: 0 28px 16px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-pill);
  align-self: flex-start;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.95), var(--shadow-soft);
}

.stations-subnav[hidden] {
  display: none;
}

.stations-subnav__btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.stations-subnav__btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
}

.stations-subnav__btn--active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.view-panel {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.view-panel[hidden] {
  display: none !important;
}

.view-panel[data-view="map"] {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.map-workspace {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  flex: 1;
  min-height: calc(100vh - 300px);
  margin: 0 28px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #ffffff;
}

.map-sidebar {
  border-right: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
  max-height: none;
  min-height: 0;
}

.map-main {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.view-panel[data-view="map"] .map-wrap {
  flex: 1 1 auto;
  margin: 0;
  border-radius: 0;
  height: 100%;
  min-height: 480px;
  box-shadow: none;
  border: none;
}

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 28px 8px;
  align-items: flex-start;
}

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

.table-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 28px;
  color: var(--text-muted);
  font-size: 13px;
}

.card-inner {
  margin: 0 28px;
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: auto;
  max-height: calc(100vh - 260px);
  box-shadow: none;
}

.table-wrap {
  margin: 0 28px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.96);
  z-index: 1;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.data-table td {
  color: var(--text);
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.78);
}

.table-empty {
  text-align: center;
  color: var(--muted);
  padding: 28px;
}

.table-empty.error {
  color: var(--danger-text);
}

.table-pager {
  display: flex;
  gap: 10px;
  padding: 16px 28px 28px;
}

.settings-status {
  margin: 0 24px 16px;
  color: var(--muted);
  font-size: 14px;
}

.scrape-progress,
.sources-list {
  display: grid;
  gap: 10px;
  padding: 0 24px 24px;
}

.scrape-item,
.source-card {
  background: rgba(244, 247, 252, 0.9);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.scrape-item:hover,
.source-card:hover {
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.scrape-item__head,
.source-card__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.scrape-item__msg,
.source-card__count,
.source-card__meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.source-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.source-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.source-card__scrape {
  margin-top: 10px;
  padding: 10px 12px;
}

.source-card__scrape .scrape-item__head {
  margin-top: 0;
}

.source-card__download {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.source-card__download--disabled {
  opacity: 0.45;
  pointer-events: none;
}

.scrape-item--running {
  background: #eff6ff;
}

.scrape-item--done {
  background: #f0fdf4;
}

.scrape-item--error {
  background: var(--danger-bg);
}

.settings-module {
  margin: 0 24px 24px;
  padding-top: 8px;
}

.settings-module + .settings-module {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

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

.settings-module__head .section-title {
  margin-bottom: 6px;
}

.settings-module__head .subtitle {
  margin: 0;
}

body[data-active-domain="promotions"] .layout,
body[data-active-domain="fuel-stock"] .layout,
body[data-view="settings"] .layout {
  grid-template-columns: 1fr;
}

.promo-sync-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.promo-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 8px 28px 24px;
}

.promo-stat-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.promo-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.promo-stat-card strong {
  display: block;
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: -0.04em;
  color: var(--text);
}

.promo-stat-card span {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 400;
}

.promo-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 320px;
  gap: 20px;
  padding: 0 28px 28px;
  min-height: 0;
}

.promo-sidebar {
  padding: 16px;
  max-height: calc(100vh - 320px);
  overflow: auto;
}

.promo-filter-block + .promo-filter-block {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.promo-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.promo-filter-head .section-title {
  margin: 0;
}

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

.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 12px;
}

.promo-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.promo-card:hover,
.promo-card--selected {
  transform: none;
  box-shadow: none;
  border-color: var(--border-strong);
  background: var(--surface);
}

.promo-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--surface);
}

.promo-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.promo-card__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 42px;
  font-weight: 700;
  color: var(--accent-blue);
}

.promo-card__status {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
}

.promo-card__status--active {
  color: #166534;
  background: #ecfdf5;
}

.promo-card__status--expiring {
  color: #9a3412;
  background: #fff7ed;
}

.promo-card__status--expired {
  color: #991b1b;
  background: #fef2f2;
}

.promo-card__body {
  padding: 14px;
}

.promo-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
}

.promo-card__provider {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.promo-card__category {
  color: var(--muted);
}

.promo-card__title {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.35;
}

.promo-card__description {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.promo-card__footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.promo-detail {
  padding: 18px;
  max-height: calc(100vh - 320px);
  overflow: auto;
}

.promo-detail__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.promo-detail__header h3 {
  margin: 8px 0 0;
  font-size: 20px;
  line-height: 1.3;
}

.promo-detail__image {
  width: 100%;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
}

.promo-detail__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.promo-detail__facts {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
}

.promo-detail__facts div {
  display: grid;
  gap: 4px;
}

.promo-detail__facts dt {
  color: var(--muted);
  font-size: 12px;
}

.promo-detail__facts dd {
  margin: 0;
  font-size: 14px;
}

.promo-detail__section + .promo-detail__section {
  margin-top: 16px;
}

.promo-detail__section h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.promo-detail__section p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.promo-detail__link {
  display: inline-flex;
  margin-top: 18px;
  text-decoration: none;
}

.promo-breakdown {
  display: grid;
  gap: 8px;
}

.promo-breakdown__item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.promo-breakdown__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.promo-empty,
.promo-empty-note {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 28px 16px;
}

.promo-empty strong {
  display: block;
  color: var(--text);
  margin-bottom: 8px;
}

.promo-empty p {
  margin: 0;
}

.promo-empty.error {
  color: var(--danger-text);
}

.chip--muted {
  opacity: 0.55;
}

@media (max-width: 1180px) {
  .promo-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .promo-detail {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  .promo-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 12px 16px;
  }

  .promo-layout {
    grid-template-columns: 1fr;
    padding: 0 12px 16px;
  }

  .promo-sidebar,
  .promo-detail {
    max-height: none;
  }
}

.map-wrap {
  position: relative;
  height: calc(100vh - 132px);
  min-height: 520px;
  margin: 16px 28px 28px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(248, 250, 252, 0.6);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.85);
}

#map {
  width: 100%;
  height: 100%;
}

.map-balloon {
  max-width: 320px;
  color: var(--text);
  font-family: var(--font-sans);
}

.map-balloon__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.map-balloon__badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  color: var(--accent-blue);
  background: var(--accent-blue-soft);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
}

.map-balloon__meta,
.map-balloon__city {
  color: var(--muted);
}

.map-balloon__address {
  margin: 12px 0;
  line-height: 1.45;
}

.map-balloon__section {
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 12px;
}

.map-balloon__section strong {
  display: block;
  margin-bottom: 3px;
}

.map-balloon__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.map-balloon__btn {
  border: none;
  border-radius: var(--radius-pill);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(244, 247, 252, 0.95);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.map-balloon__btn:hover {
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.map-balloon__btn--muted {
  color: var(--muted);
}

.station-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 120px;
}

.station-refresh-toast {
  position: fixed;
  right: 24px;
  bottom: 88px;
  z-index: 1100;
  max-width: min(360px, calc(100vw - 48px));
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  font-size: 14px;
  box-shadow: var(--shadow);
}

.station-refresh-toast--error {
  background: rgba(153, 27, 27, 0.94);
}

.station-refresh-toast[hidden] {
  display: none !important;
}

.banner {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 13px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
  max-width: calc(100% - 32px);
}

.banner.error {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.chat-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.chat-fab:hover {
  transform: none;
  background: var(--surface);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

body.chat-open.chat-mode-sidebar .chat-fab {
  opacity: 1;
  pointer-events: auto;
}

.chat-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.18);
}

.chat-backdrop[hidden] {
  display: none !important;
}

body.chat-mode-sidebar .chat-backdrop {
  display: none !important;
}

body.chat-mode-modal .chat-panel {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1001;
  width: min(420px, calc(100vw - 32px));
  height: min(620px, calc(100vh - 96px));
}

body.chat-open.chat-mode-modal .chat-fab {
  opacity: 0;
  pointer-events: none;
}

body.chat-mode-sidebar .chat-panel {
  position: relative;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  transform: none;
  z-index: 1;
  flex: 0 0 min(400px, 30vw);
  width: min(400px, 30vw);
  min-width: 320px;
  height: auto;
  min-height: calc(100vh - 36px);
  max-height: calc(100vh - 36px);
}

.chat-panel {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.82);
  overflow: hidden;
}

.chat-panel[hidden] {
  display: none !important;
}

.chat-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.chat-panel__title {
  min-width: 0;
}

.chat-panel__title strong {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.chat-panel__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chat-mode-switch {
  display: inline-flex;
  padding: 2px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: none;
}

.chat-mode-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: calc(var(--radius-md) - 2px);
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.chat-mode-btn.is-active {
  background: #ffffff;
  color: var(--text);
  box-shadow: none;
  border: 1px solid var(--border);
}

.chat-mode-btn:hover {
  color: var(--text);
}

.chat-panel__status {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.chat-panel__status.error {
  color: var(--danger-text);
}

.chat-empty {
  flex: 1;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 24px 28px;
  text-align: center;
  color: var(--muted);
}

.chat-empty strong {
  color: var(--text);
  font-size: 16px;
}

.chat-empty p {
  margin: 0 auto;
  font-size: 14px;
  line-height: 1.5;
  max-width: 36ch;
}

.chat-prompts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  max-width: 420px;
}

.chat-prompt {
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: var(--text);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.chat-prompt:hover {
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.chat-empty[hidden] {
  display: none !important;
}

.chat-panel__messages {
  flex: 1;
  overflow: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg);
}

.chat-panel__messages[hidden] {
  display: none !important;
}

.chat-message {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 100%;
}

.chat-message--user {
  align-items: flex-end;
}

.chat-message--assistant {
  align-items: flex-start;
}

.chat-message__meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-message--user .chat-message__meta {
  flex-direction: row-reverse;
}

.chat-message__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.chat-message--user .chat-message__avatar {
  background: var(--accent);
  color: #ffffff;
  box-shadow: none;
}

.chat-message--assistant .chat-message__avatar {
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.chat-message__author {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.chat-message__bubble {
  max-width: min(100%, 680px);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.55;
  word-break: break-word;
}

.chat-message--user .chat-message__bubble {
  background: var(--accent);
  color: #ffffff;
  box-shadow: none;
}

.chat-message--assistant .chat-message__bubble {
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--border);
}

.chat-md {
  font-size: 13px;
  line-height: 1.5;
}

.chat-md p {
  margin: 0 0 0.6em;
}

.chat-md p:last-child {
  margin-bottom: 0;
}

.chat-md ul,
.chat-md ol {
  margin: 0.4em 0 0.8em;
  padding-left: 1.2em;
}

.chat-md h1,
.chat-md h2,
.chat-md h3,
.chat-md h4 {
  margin: 0.6em 0 0.4em;
  font-size: 14px;
}

.chat-md code {
  background: rgba(17, 24, 39, 0.06);
  padding: 0.1em 0.35em;
  border-radius: 6px;
  font-size: 12px;
}

.chat-md pre {
  margin: 0.6em 0;
  padding: 12px;
  border-radius: var(--radius-md);
  background: #111827;
  color: #f9fafb;
  overflow: auto;
}

.chat-md pre code {
  background: none;
  padding: 0;
}

.chat-md blockquote {
  margin: 0.6em 0;
  padding-left: 10px;
  border-left: 3px solid #cbd5e1;
  color: var(--muted);
}

.chat-md .table-scroll {
  overflow-x: auto;
  margin: 0.6em 0;
}

.chat-md table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.chat-md th,
.chat-md td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.chat-md th {
  font-weight: 600;
  color: var(--muted);
}

.chat-md a {
  color: var(--accent-blue);
}

.chat-panel__composer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 16px;
  background: #ffffff;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.chat-input {
  min-height: 88px;
  resize: vertical;
}

.chat-panel__composer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chat-hint {
  font-size: 12px;
  color: var(--muted);
}

@media (min-width: 981px) and (max-width: 1199px) {
  body.chat-mode-modal .chat-panel {
    width: min(480px, calc(100vw - 32px));
    height: min(680px, calc(100vh - 96px));
  }

  body.chat-mode-sidebar .chat-panel {
    flex-basis: min(360px, 34vw);
    width: min(360px, 34vw);
  }
}

@media (min-width: 1200px) {
  body.chat-mode-modal .chat-panel {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translate(-50%, -50%);
    width: min(820px, calc(100vw - 80px));
    height: min(820px, calc(100vh - 80px));
    max-height: none;
  }

  body.chat-mode-sidebar .chat-panel {
    flex-basis: min(420px, 28vw);
    width: min(420px, 28vw);
  }

  body.chat-mode-modal .chat-panel__messages,
  body.chat-mode-sidebar .chat-panel__messages {
    padding: 28px 32px;
    gap: 24px;
  }

  body.chat-mode-modal .chat-message__bubble,
  body.chat-mode-sidebar .chat-message__bubble {
    font-size: 15px;
    max-width: min(100%, 560px);
  }

  body.chat-mode-modal .chat-message--user .chat-message__bubble,
  body.chat-mode-sidebar .chat-message--user .chat-message__bubble {
    max-width: min(100%, 480px);
  }
}

.chat-message--typing .chat-message__bubble {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--muted);
}

.chat-typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
  animation: chat-typing 1.2s infinite ease-in-out;
}

.chat-typing-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.chat-typing-dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes chat-typing {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@media (max-width: 980px) {
  .app-header {
    flex-direction: column;
    align-items: stretch;
  }

  .app-header__actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .app-header__user {
    border-left: none;
    padding-left: 0;
    width: 100%;
    justify-content: flex-end;
  }

  .workspace {
    flex-direction: column;
    min-height: auto;
  }

  .chat-mode-switch {
    display: none;
  }

  body.chat-mode-sidebar .chat-panel {
    position: fixed;
    inset: 0;
    width: 100%;
    min-width: 0;
    flex: none;
    max-height: none;
    min-height: 0;
    height: 100%;
    border-radius: 0;
    z-index: 1001;
  }

  .chat-panel {
    inset: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
    transform: none;
  }

  .app-shell {
    padding: 10px;
  }

  .layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .map-workspace {
    grid-template-columns: 1fr;
    margin: 0 12px 16px;
  }

  .map-sidebar {
    max-height: 42vh;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .view-panel[data-view="map"] .map-wrap {
    min-height: 360px;
  }

  .sidebar-filters {
    max-height: 36vh;
  }

  .nav-tabs {
    margin: 12px;
    flex-wrap: wrap;
  }

  .page-header {
    flex-direction: column;
  }

  .field-input--inline {
    width: 100%;
    min-width: 0;
  }

  .card-inner {
    max-height: none;
  }
}

.fuel-stock-status-note {
  margin: 0 28px 14px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.fuel-stock-status-note strong {
  color: var(--text);
  font-weight: 600;
}

.fuel-stock-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 0 28px 20px;
}

.fuel-stock-stats .promo-stat-card {
  padding: 18px 20px;
}

.fuel-stock-stats .promo-stat-card:hover {
  transform: none;
  box-shadow: var(--shadow-soft);
}

.fuel-stock-stat-card__label {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.fuel-stock-stat-card__desc {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.fuel-stock-stat-card--ok {
  border-left: 3px solid #2e7d32;
}

.fuel-stock-stat-card--partial {
  border-left: 3px solid #ef6c00;
}

.fuel-stock-stat-card--gas {
  border-left: 3px solid #c62828;
}

.fuel-stock-stat-card--full {
  border-left: 3px solid #b71c1c;
}

.fuel-stock-inactive-note {
  flex: 1 1 240px;
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.fuel-stock-subnav__btn--inactive.fuel-stock-subnav__btn--active {
  color: #ffffff;
  background: #dc2626;
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.28);
}

.fuel-stock-subnav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 28px 20px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-lg);
  border-bottom: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.95), var(--shadow-soft);
}

.fuel-stock-subnav__btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.fuel-stock-subnav__btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
}

.fuel-stock-subnav__btn--active {
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
}

.fuel-stock-tab-panel {
  min-height: 0;
}

.fuel-stock-detail-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  align-items: center;
}

.fuel-stock-columns-control .col-filter-popover {
  width: auto;
}

.fuel-stock-toolbar-filter {
  border: none !important;
  background: rgba(244, 247, 252, 0.86) !important;
  color: var(--text) !important;
  border-radius: var(--radius-pill) !important;
  padding: 10px 16px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72) !important;
  min-width: 132px;
  text-align: center !important;
}

.fuel-stock-toolbar-filter.col-filter-popover__toggle--active {
  background: #ffffff !important;
  color: var(--accent-blue) !important;
  box-shadow: var(--shadow-soft) !important;
}

.fuel-stock-summary-row {
  cursor: pointer;
}

.fuel-stock-summary-row:hover {
  background: rgba(0, 0, 0, 0.03);
}

.fuel-stock-section {
  margin: 0 28px 28px;
}

.fuel-stock-section .section-title {
  margin: 0 0 14px;
}

.stockout-source-note {
  margin: 0 28px 18px;
  color: var(--text-muted);
  font-size: 13px;
}

.stockout-source-note.error {
  color: var(--danger);
}

.stockout-table-wrap {
  overflow: auto;
  max-height: calc(100vh - 420px);
  min-height: 320px;
}

.stockout-table th,
.stockout-table td {
  white-space: nowrap;
}

.stockout-table {
  --stockout-col-1-width: 108px;
  --stockout-col-2-width: 136px;
  --stockout-fuel-metric-width: 88px;
  --stockout-col-status-width: 148px;
  border-collapse: separate;
  border-spacing: 0;
}

.stockout-table .stockout-col-station,
.stockout-table td.stockout-col-station {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface);
  width: var(--stockout-col-1-width);
  min-width: var(--stockout-col-1-width);
  max-width: var(--stockout-col-1-width);
}

.stockout-table thead .stockout-col-station,
.stockout-table thead .stockout-col-region {
  z-index: 6;
}

.stockout-table thead .stockout-col-status {
  z-index: 3;
}

.stockout-table .stockout-col-region,
.stockout-table td.stockout-col-region {
  position: sticky;
  left: var(--stockout-col-1-width);
  z-index: 2;
  background: var(--surface);
  width: var(--stockout-col-2-width);
  min-width: var(--stockout-col-2-width);
  max-width: var(--stockout-col-2-width);
}

.stockout-table .stockout-col-status,
.stockout-table td.stockout-col-status {
  min-width: var(--stockout-col-status-width);
  width: var(--stockout-col-status-width);
  max-width: var(--stockout-col-status-width);
}

.stockout-fuel-block {
  border-left: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(244, 247, 252, 0.42);
}

.stockout-fuel-block.stockout-fuel-metric-head--first,
.stockout-fuel-block.stockout-fuel-metric-cell--first,
.stockout-fuel-grade {
  border-left-width: 2px;
  border-left-color: rgba(47, 109, 243, 0.18);
}

.stockout-fuel-block.stockout-fuel-metric-head--last,
.stockout-fuel-block.stockout-fuel-metric-cell--last,
.stockout-fuel-filter-cell {
  border-right: 1px solid rgba(15, 23, 42, 0.08);
}

.stockout-fuel-grade {
  text-align: center;
  vertical-align: middle;
  padding: 10px 8px;
  background: rgba(47, 109, 243, 0.06);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.stockout-fuel-grade__name {
  display: inline;
}

.stockout-fuel-metric-head {
  text-align: center;
  vertical-align: middle;
  padding: 6px 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-muted);
  white-space: normal;
  line-height: 1.2;
  min-width: var(--stockout-fuel-metric-width);
  width: var(--stockout-fuel-metric-width);
}

.stockout-fuel-metric-cell {
  text-align: right;
  vertical-align: middle;
  padding: 8px 6px;
  font-size: 12px;
  line-height: 1.3;
  min-width: var(--stockout-fuel-metric-width);
  width: var(--stockout-fuel-metric-width);
  font-variant-numeric: tabular-nums;
}

.stockout-fuel-metric__value {
  color: var(--text);
}

.stockout-fuel-filter-cell {
  padding: 6px 8px;
  vertical-align: middle;
  background: rgba(244, 247, 252, 0.72);
}

.stockout-fuel-filter-cell .col-filter-popover__toggle {
  border: none;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.stockout-fuel-filter-cell .col-filter-popover__toggle--active {
  background: #ffffff;
  color: var(--accent-blue);
  box-shadow: inset 0 0 0 1px rgba(47, 109, 243, 0.35);
}

.stockout-head-row--grades th {
  background: rgba(244, 247, 252, 0.96);
}

.stockout-head-row--metrics th {
  top: 42px;
}

.stockout-head-row--filters th {
  top: 68px;
}

.stockout-filter-cell--compact {
  background: rgba(244, 247, 252, 0.72);
}

.stockout-table tbody tr:hover .stockout-fuel-block {
  background: rgba(255, 255, 255, 0.92);
}

.stockout-table tbody tr:hover .stockout-fuel-metric-cell {
  background: rgba(255, 255, 255, 0.92);
}

.stockout-value--negative {
  color: #c62828;
  font-weight: 600;
}

.stockout-value--positive {
  color: #2e7d32;
}

.stockout-value--zero {
  color: var(--text-muted);
}

.stockout-value--empty {
  color: var(--text-muted);
}

.stockout-status {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}

.stockout-status--ok {
  background: rgba(46, 125, 50, 0.12);
  color: #2e7d32;
}

.stockout-status--partial {
  background: rgba(245, 124, 0, 0.14);
  color: #ef6c00;
}

.stockout-status--gas {
  background: rgba(211, 47, 47, 0.1);
  color: #c62828;
}

.stockout-status--full {
  background: rgba(183, 28, 28, 0.16);
  color: #b71c1c;
}

.stockout-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 24px;
}

.data-table--compact th,
.data-table--compact td {
  padding: 8px 10px;
  font-size: 13px;
}

.table-sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.table-sortable:hover {
  background: rgba(0, 0, 0, 0.04);
}

.table-sortable--active {
  color: var(--accent, #1a56db);
}

.table-sortable__label {
  display: inline;
}

.table-sortable__indicator {
  margin-left: 4px;
  font-size: 11px;
  opacity: 0.85;
}

.stockout-filter-row th {
  background: rgba(244, 247, 252, 0.96);
  padding: 6px 8px;
  vertical-align: middle;
  overflow: visible;
  z-index: 3;
}

.stockout-filter-row .stockout-col-station,
.stockout-filter-row .stockout-col-region,
.stockout-filter-row .stockout-col-status {
  z-index: 4;
}

.stockout-filter-row .stockout-col-station {
  position: sticky;
  left: 0;
}

.stockout-filter-row .stockout-col-region {
  position: sticky;
  left: var(--stockout-col-1-width);
}

.stockout-filter-cell--active .col-filter-select,
.stockout-filter-cell--active .col-filter-popover__toggle {
  border-color: var(--accent, #1a56db);
  color: var(--accent, #1a56db);
}

.col-filter-select {
  width: 100%;
  min-width: 88px;
  max-width: 140px;
  font-size: 12px;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.col-filter-popover {
  position: relative;
  z-index: 5;
  display: block;
  width: 100%;
}

.col-filter-popover__toggle {
  list-style: none;
  cursor: pointer;
  font-size: 12px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  white-space: nowrap;
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
}

.col-filter-popover__toggle::-webkit-details-marker {
  display: none;
}

.col-filter-popover__toggle--active {
  border-color: var(--accent, #1a56db);
  color: var(--accent, #1a56db);
}

.col-filter-popover__panel {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 5;
  min-width: 220px;
  max-height: 280px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.col-filter-popover--align-left .col-filter-popover__panel {
  left: 0;
  right: auto;
}

.col-filter-popover__actions {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.col-filter-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  line-height: 1.3;
  padding: 4px 0;
}

/* Modern AI workspace theme */
:root {
  --bg: #fafafa;
  --card: #ffffff;
  --surface: #f5f5f5;
  --surface-hover: #ececec;
  --text: #171717;
  --text-muted: #737373;
  --muted: #737373;
  --border: #e5e5e5;
  --border-strong: #d4d4d4;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-float: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.06);
  --glow-blue: none;
  --radius-xl: 12px;
  --radius-lg: 10px;
  --radius-md: 8px;
  --accent: #171717;
  --accent-blue: #171717;
  --accent-blue-strong: #000000;
  --accent-blue-soft: #f5f5f5;
  --accent-ai: #525252;
  --danger: #b42318;
}

html,
body {
  background: var(--bg);
}

body::before {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.025) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0, 0, 0, 0.025) 1px, transparent 1px);
  background-size: 24px 24px;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid #171717;
  outline-offset: 2px;
}

.app-shell {
  gap: 16px;
  padding: 16px;
}

.card,
.sidebar,
.content,
.chat-panel,
.card-inner,
.settings-module,
.promo-stat-card,
.promo-card {
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: none;
  backdrop-filter: none;
}

.app-header {
  min-height: 68px;
  padding: 12px 18px;
  border-radius: 16px;
}

.profile-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #171717;
  color: #ffffff;
  box-shadow: none;
}

.app-header__title {
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  font-weight: 500;
}

.page-title {
  font-family: var(--font-sans);
  font-size: clamp(1.5rem, 2.5vw, 1.875rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.subtitle,
.promo-sync-note,
.stats-card__sync,
.domain-hint {
  font-size: var(--text-body-lg);
  line-height: var(--text-body-lg-lh);
  letter-spacing: var(--text-body-lg-ls);
  font-weight: 400;
}

.nav-btn,
.stations-subnav__btn,
.fuel-stock-subnav__btn {
  font-family: var(--font-sans);
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: normal;
}

.data-table th {
  font-family: var(--font-sans);
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
}

.data-table td {
  font-size: var(--text-body);
  line-height: var(--text-body-lh);
}

.overview-kpis strong {
  font-family: var(--font-sans);
  font-weight: 600;
}

.login-page h1 {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.sheet-insights h3 {
  font-family: var(--font-sans);
  font-size: var(--text-heading);
  font-weight: 600;
  letter-spacing: var(--text-heading-ls);
}

.app-header__tagline,
.subtitle,
.promo-sync-note,
.stats-card__sync {
  color: var(--text-muted);
}

.layout {
  grid-template-columns: 1fr;
  gap: 16px;
}

.sidebar {
  padding: 18px;
}

.stats-card {
  padding: 0;
}

.stats-card::before,
.stats-card::after {
  display: none;
}

.stats-card__grid strong,
.promo-stat-card strong,
.overview-kpis strong {
  font-variant-numeric: tabular-nums;
}

.filter-group,
.chip,
.option-list,
.option-row {
  background: #ffffff;
  border-color: var(--border);
  box-shadow: none;
}

.chip:hover,
.option-row:hover,
.filter-group__toggle:hover {
  background: var(--surface);
  transform: none;
}

.btn-primary,
.btn-soft,
.icon-btn {
  box-shadow: none;
  font-family: var(--font-sans);
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: normal;
}

.btn-primary {
  background: #171717;
  color: #ffffff;
}

.btn-primary:hover,
.btn-soft:hover,
.icon-btn:hover {
  transform: none;
  box-shadow: none;
}

.btn-soft {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text);
}

.field-input {
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: none;
}

.field-input:focus {
  border-color: #171717;
  box-shadow: none;
}

.nav-tabs {
  display: flex;
  width: calc(100% - 36px);
  margin: 18px 18px 0;
  padding: 0;
  gap: 0;
  background: transparent;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.nav-btn {
  border-radius: 0;
  padding: 14px 16px;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
}

.nav-btn:hover {
  background: transparent;
  color: var(--text);
}

.nav-btn--active,
.nav-btn--active:hover {
  background: transparent;
  color: var(--text);
  box-shadow: none;
  border-bottom-color: #171717;
}

.stations-subnav,
.fuel-stock-subnav {
  background: transparent;
  border: 1px solid var(--border);
  box-shadow: none;
}

.stations-subnav__btn--active,
.fuel-stock-subnav__btn--active {
  background: #171717;
  color: #ffffff;
  box-shadow: none;
}

.view-panel {
  background: #ffffff;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: var(--text-caption, 0.75rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.overview-panel {
  padding: 28px;
}

.overview-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 8px 0 28px;
  border-bottom: 1px solid var(--border);
}

.overview-title {
  max-width: 820px;
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.overview-copy {
  max-width: 680px;
  margin: 20px 0 0;
  color: var(--text-muted);
  font-size: var(--text-body-lg);
  line-height: var(--text-body-lg-lh);
  letter-spacing: var(--text-body-lg-ls);
  font-weight: 400;
}

.overview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding-top: 18px;
}

.overview-card,
.overview-link-card {
  min-height: 148px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #ffffff;
  color: var(--text);
}

.overview-card--wide {
  grid-column: span 3;
}

.overview-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--text-muted);
  font-size: 12px;
}

.overview-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.overview-kpis div {
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.overview-kpis strong {
  display: block;
  font-family: var(--font-sans);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}

.overview-kpis span,
.overview-link-card span {
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 13px;
}

.insight-panel {
  background: #ffffff;
  color: var(--text);
  border-left: 3px solid var(--accent);
}

.insight-panel .eyebrow,
.insight-panel p {
  color: var(--text-muted);
}

.insight-panel h2 {
  margin: 0 0 10px;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.insight-panel .btn-soft {
  margin-top: 12px;
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.insight-panel .btn-soft:hover {
  background: #000000;
  border-color: #000000;
}

.overview-link-card {
  text-align: left;
  cursor: pointer;
}

.overview-link-card:hover {
  background: var(--surface);
}

.overview-link-card strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  line-height: 1.25;
}

.page-header {
  padding: 24px 28px 14px;
}

.page-header--compact {
  padding-bottom: 0;
}

.map-wrap {
  border: 1px solid var(--border);
  box-shadow: none;
}

.sheet-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  padding: 0 28px 28px;
}

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

.sheet-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 12px;
}

.sheet-toolbar strong {
  color: var(--text);
}

.sheet-wrap {
  margin: 0;
  border-radius: var(--radius-md);
  max-height: calc(100vh - 292px);
}

.data-table {
  border-collapse: separate;
  border-spacing: 0;
}

.data-table th,
.data-table td {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.data-table th:last-child,
.data-table td:last-child {
  border-right: none;
}

.data-table th {
  background: #f4f2ec;
  color: #3c3a36;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
}

.data-table td {
  background: #ffffff;
  font-size: 13px;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

.data-table tbody tr:hover td,
.data-table tbody tr.is-active-row td {
  background: #fff9dc;
}

.data-table--sheet th,
.data-table--sheet td {
  padding: 9px 10px;
  white-space: nowrap;
}

.sheet-column-row th {
  top: 0;
  padding: 5px 10px;
  background: #ebe7dc;
  color: #8a8377;
  font-size: 10px;
  text-align: center;
}

.data-table--station-sheet thead tr:not(.sheet-column-row) th.col-resize-cell {
  top: 26px;
  z-index: 5;
}

.sheet-frozen,
.sheet-frozen-secondary {
  position: sticky;
  z-index: 1;
}

.sheet-frozen {
  left: 0;
}

.sheet-frozen-secondary {
  left: var(--col-resize-frozen-2-left, 148px);
}

.data-table--station-sheet.col-resize-table th:nth-child(1),
.data-table--station-sheet.col-resize-table td:nth-child(1),
.data-table--station-sheet.col-resize-table th:nth-child(2),
.data-table--station-sheet.col-resize-table td:nth-child(2) {
  min-width: unset;
  max-width: unset;
}

.data-table--station-sheet:not(.col-resize-table) th:nth-child(1),
.data-table--station-sheet:not(.col-resize-table) td:nth-child(1) {
  min-width: 120px;
}

.data-table--station-sheet:not(.col-resize-table) th:nth-child(2),
.data-table--station-sheet:not(.col-resize-table) td:nth-child(2) {
  min-width: 160px;
}

.sheet-insights {
  align-self: start;
  position: sticky;
  top: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #ffffff;
}

.sheet-insights h3 {
  margin: 0 0 12px;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.sheet-prompt {
  width: 100%;
  display: block;
  padding: 12px 0;
  border: none;
  border-top: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.sheet-prompt:hover {
  color: #000000;
  text-decoration: underline;
}

.promo-stats,
.fuel-stock-stats {
  gap: 10px;
}

.fuel-stock-insights {
  position: static;
  display: grid;
  grid-template-columns: auto 1fr repeat(3, minmax(150px, 1fr));
  align-items: center;
  gap: 12px;
  margin: 0 28px 18px;
}

.fuel-stock-insights .eyebrow,
.fuel-stock-insights h3 {
  margin: 0;
}

.fuel-stock-insights .sheet-prompt {
  padding: 0 0 0 12px;
  border-top: none;
  border-left: 1px solid var(--border);
}

.promo-stat-card {
  padding: 16px;
  border-radius: var(--radius-md);
}

.promo-stat-card:hover {
  transform: none;
  box-shadow: none;
}

.promo-stat-card strong {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.promo-layout {
  grid-template-columns: 260px minmax(0, 1fr) 320px;
  gap: 16px;
}

.promo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #ffffff;
}

.promo-sheet-head,
.promo-sheet-row {
  display: grid;
  grid-template-columns: var(
    --sheet-grid-columns,
    140px 320px 140px 120px 180px 110px
  );
  min-width: max-content;
}

.promo-sheet-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f4f2ec;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}

.promo-sheet-head span,
.promo-sheet-row > span,
.promo-sheet-row > strong {
  padding: 10px 12px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.promo-sheet-row {
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.promo-sheet-row:hover,
.promo-sheet-row.promo-card--selected {
  transform: none;
  box-shadow: none;
  background: #fff9dc;
}

.promo-sheet-row:hover > *,
.promo-sheet-row.promo-card--selected > * {
  background: #fff9dc;
}

.promo-card__status {
  position: static;
  justify-self: start;
  align-self: center;
}

.promo-card__title {
  margin: 0;
  font-size: 13px;
}

.promo-detail {
  margin: 0;
}

.stockout-table-wrap {
  max-height: calc(100vh - 380px);
}

.stockout-table .stockout-col-station,
.stockout-table td.stockout-col-station,
.stockout-table .stockout-col-region,
.stockout-table td.stockout-col-region {
  background: #fffdf7;
}

.stockout-fuel-grade {
  background: #f4f2ec;
}

.stockout-fuel-block {
  background: #fffdf7;
}

.stockout-status {
  border-radius: 999px;
}

.chat-fab {
  right: 20px;
  bottom: 20px;
  background: #171717;
  box-shadow: none;
}

body.chat-mode-sidebar .chat-panel {
  border-radius: 16px;
}

.chat-panel__header,
.chat-panel__composer {
  background: #ffffff;
  border-color: var(--border);
}

.chat-message__avatar {
  background: #171717;
}

.chat-message__bubble {
  border: 1px solid var(--border);
  box-shadow: none;
}

.chat-message--assistant .chat-message__bubble {
  background: #ffffff;
}

.chat-message--user .chat-message__bubble {
  background: #171717;
}

@media (max-width: 1180px) {
  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-card--wide {
    grid-column: 1 / -1;
  }

  .sheet-layout {
    grid-template-columns: 1fr;
  }

  .sheet-insights {
    position: static;
  }

  .fuel-stock-insights {
    grid-template-columns: 1fr;
  }

  .fuel-stock-insights .sheet-prompt {
    padding: 12px 0;
    border-top: 1px solid var(--border);
    border-left: none;
  }
}

@media (max-width: 980px) {
  .app-shell {
    padding: 8px;
  }

  .overview-panel {
    padding: 18px;
  }

  .overview-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .overview-grid,
  .overview-kpis {
    grid-template-columns: 1fr;
  }

  .nav-tabs {
    width: calc(100% - 24px);
    margin: 12px;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .nav-btn {
    white-space: nowrap;
  }

  .sheet-layout {
    padding: 0 12px 18px;
  }

  .promo-sheet-head,
  .promo-sheet-row {
    min-width: min(100%, 860px);
  }
}

/* Column resize + responsive tables */
.col-resize-table {
  table-layout: fixed;
  width: max-content;
  min-width: 100%;
}

.col-resize-table th:nth-child(1),
.col-resize-table td:nth-child(1) {
  width: var(--cr-col-1-width, auto);
  min-width: var(--cr-col-1-width, auto);
  max-width: var(--cr-col-1-width, auto);
}

.col-resize-table th:nth-child(2),
.col-resize-table td:nth-child(2) {
  width: var(--cr-col-2-width, auto);
  min-width: var(--cr-col-2-width, auto);
  max-width: var(--cr-col-2-width, auto);
}

.col-resize-table th:nth-child(3),
.col-resize-table td:nth-child(3) {
  width: var(--cr-col-3-width, auto);
  min-width: var(--cr-col-3-width, auto);
  max-width: var(--cr-col-3-width, auto);
}

.col-resize-table th:nth-child(4),
.col-resize-table td:nth-child(4) {
  width: var(--cr-col-4-width, auto);
  min-width: var(--cr-col-4-width, auto);
  max-width: var(--cr-col-4-width, auto);
}

.col-resize-table th:nth-child(5),
.col-resize-table td:nth-child(5) {
  width: var(--cr-col-5-width, auto);
  min-width: var(--cr-col-5-width, auto);
  max-width: var(--cr-col-5-width, auto);
}

.col-resize-table th:nth-child(6),
.col-resize-table td:nth-child(6) {
  width: var(--cr-col-6-width, auto);
  min-width: var(--cr-col-6-width, auto);
  max-width: var(--cr-col-6-width, auto);
}

.col-resize-table th:nth-child(7),
.col-resize-table td:nth-child(7) {
  width: var(--cr-col-7-width, auto);
  min-width: var(--cr-col-7-width, auto);
  max-width: var(--cr-col-7-width, auto);
}

.col-resize-table th:nth-child(8),
.col-resize-table td:nth-child(8) {
  width: var(--cr-col-8-width, auto);
  min-width: var(--cr-col-8-width, auto);
  max-width: var(--cr-col-8-width, auto);
}

.col-resize-table th:nth-child(9),
.col-resize-table td:nth-child(9) {
  width: var(--cr-col-9-width, auto);
  min-width: var(--cr-col-9-width, auto);
  max-width: var(--cr-col-9-width, auto);
}

.col-resize-table th:nth-child(10),
.col-resize-table td:nth-child(10) {
  width: var(--cr-col-10-width, auto);
  min-width: var(--cr-col-10-width, auto);
  max-width: var(--cr-col-10-width, auto);
}

.col-resize-table th:nth-child(11),
.col-resize-table td:nth-child(11) {
  width: var(--cr-col-11-width, auto);
  min-width: var(--cr-col-11-width, auto);
  max-width: var(--cr-col-11-width, auto);
}

.col-resize-table th:nth-child(12),
.col-resize-table td:nth-child(12) {
  width: var(--cr-col-12-width, auto);
  min-width: var(--cr-col-12-width, auto);
  max-width: var(--cr-col-12-width, auto);
}

.col-resize-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.col-resize-table thead th.col-resize-cell {
  overflow: visible;
  z-index: 4;
}

.col-resize-cell {
  position: relative;
  padding-right: 16px !important;
}

.col-resize-handle {
  position: absolute;
  top: 0;
  right: 0;
  width: 16px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
  z-index: 30;
  transform: translateX(50%);
}

.data-table--station-sheet .col-resize-handle {
  top: -26px;
  height: calc(100% + 26px);
}

.col-resize-handle::after {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 5px;
  width: 2px;
  border-radius: 1px;
  background: transparent;
  transition: background 0.15s ease;
}

.col-resize-handle:hover::after,
.col-resize-handle:focus-visible::after,
.is-col-resizing .col-resize-handle::after,
.col-resize-table.is-col-resizing .col-resize-handle::after {
  background: #171717;
}

.col-resize-handle:focus-visible {
  outline: 2px solid #171717;
  outline-offset: -2px;
}

body.col-resize-active {
  cursor: col-resize;
  user-select: none;
}

body.col-resize-active * {
  cursor: col-resize !important;
}

.sheet-toolbar__hint {
  margin-left: auto;
  color: var(--text-muted);
}

.btn-soft--compact {
  padding: 6px 10px;
  font-size: 11px;
}

.table-scroll-wrap {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  max-height: min(calc(100dvh - 280px), calc(100vh - 280px));
}

.table-scroll-wrap::after {
  content: "";
  position: sticky;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.data-table--sheet td {
  white-space: nowrap;
}

.data-table--sheet td:nth-child(4),
.data-table--sheet td:nth-child(5),
.data-table--sheet td:nth-child(6) {
  white-space: normal;
  word-break: break-word;
}

.col-resize-grid .promo-sheet-head > span.col-resize-cell {
  position: relative;
  overflow: visible;
  z-index: 2;
}

.col-resize-grid .promo-sheet-row > * {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.promo-grid {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 1180px) {
  .page-header {
    flex-wrap: wrap;
  }

  .page-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .field-input--inline {
    flex: 1 1 220px;
    min-width: 0;
  }

  .table-meta,
  .card-inner,
  .table-wrap {
    margin-left: 16px;
    margin-right: 16px;
  }

  .sheet-layout {
    padding-left: 16px;
    padding-right: 16px;
  }

  .fuel-stock-insights {
    margin-left: 16px;
    margin-right: 16px;
  }
}

@media (max-width: 980px) {
  .page-header {
    padding: 18px 12px 8px;
    gap: 14px;
  }

  .page-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .page-actions .btn-primary,
  .page-actions .btn-soft,
  .page-actions .field-input {
    width: 100%;
  }

  .sheet-toolbar {
    gap: 8px;
  }

  .sheet-toolbar__hint {
    width: 100%;
    margin-left: 0;
    order: 3;
  }

  .table-meta,
  .card-inner,
  .table-wrap {
    margin-left: 12px;
    margin-right: 12px;
  }

  .table-scroll-wrap,
  .sheet-wrap,
  .stockout-table-wrap {
    max-height: min(calc(100dvh - 240px), calc(100vh - 240px));
  }

  .data-table--sheet th,
  .data-table--sheet td {
    padding: 8px;
    font-size: 12px;
  }

  .table-pager {
    padding: 12px;
    flex-wrap: wrap;
  }

  .fuel-stock-detail-toolbar {
    padding: 0 12px;
  }

  .fuel-stock-insights {
    margin: 0 12px 12px;
    grid-template-columns: 1fr;
  }

  .promo-layout {
    grid-template-columns: 1fr;
  }
}
