* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f4f6f8;
  color: #1f2937;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.hero {
  width: 100%;
  max-width: 860px;
  background: #ffffff;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

.auth-card {
  max-width: 520px;
}

.badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}

h1 {
  margin: 0 0 16px;
  font-size: 42px;
  line-height: 1.1;
}

h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

p {
  margin: 0 0 24px;
  font-size: 18px;
  line-height: 1.6;
  color: #4b5563;
}

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

.actions a,
.form button,
.tenant-button,
.ghost-button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.actions a,
.form button {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 12px;
  background: #111827;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
}

.actions .secondary-link {
  background: #e5e7eb;
  color: #111827;
}

.secondary-actions {
  margin-top: 18px;
}

code {
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 6px;
}

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

.form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.form input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font-size: 16px;
}

.alert {
  padding: 12px 14px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 700;
}

.top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.ghost-button {
  padding: 10px 14px;
  border-radius: 12px;
  background: #f3f4f6;
  color: #111827;
  font-weight: 700;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 16px;
}

.info-card {
  padding: 18px;
  border-radius: 18px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.info-card span,
.info-card small {
  display: block;
  color: #6b7280;
}

.info-card strong {
  display: block;
  margin: 8px 0;
  font-size: 18px;
}

.module-list {
  margin-top: 28px;
}

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

.modules div {
  padding: 16px;
  border-radius: 16px;
  background: #111827;
  color: white;
  font-weight: 700;
}

.tenant-list {
  display: grid;
  gap: 12px;
}

.tenant-button {
  width: 100%;
  text-align: left;
  padding: 16px;
  border-radius: 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.tenant-button strong,
.tenant-button span {
  display: block;
}

.tenant-button span {
  margin-top: 4px;
  color: #6b7280;
}

.logout-form {
  margin-top: 18px;
}

@media (max-width: 760px) {
  .hero {
    padding: 24px;
  }

  h1 {
    font-size: 32px;
  }

  .info-grid,
  .modules {
    grid-template-columns: 1fr;
  }

  .top-row {
    display: block;
  }
}

.wide-page {
  max-width: 1100px;
}

.table-wrap {
  margin-top: 22px;
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

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

.data-table th {
  background: #f9fafb;
  color: #374151;
  font-size: 14px;
}

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

.muted {
  display: block;
  margin-top: 4px;
  color: #6b7280;
  font-size: 12px;
}

.pill {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
}

.modules a {
  display: block;
  padding: 16px;
  border-radius: 16px;
  background: #111827;
  color: white;
  font-weight: 700;
  text-decoration: none;
}


/* ===== LANDING PAGE START ===== */

:root {
  --bg-main: #eef4ff;
  --bg-soft: #ffffff;
  --bg-soft-2: #f8fbff;
  --bg-accent: #e7f0ff;
  --bg-dark-block: #123d7a;
  --text-main: #13315c;
  --text-soft: #51627f;
  --text-on-dark: #ffffff;
  --border: #c9d9f2;
  --brand-blue: #1554b8;
  --brand-blue-2: #1d6ee8;
  --brand-yellow: #f4c430;
  --brand-yellow-2: #ffd84d;
  --success-bg: #d7f7df;
  --success-text: #166534;
  --shadow: 0 18px 48px rgba(21, 84, 184, 0.12);
}

html[data-theme="dark"] {
  --bg-main: #0f1d36;
  --bg-soft: #162742;
  --bg-soft-2: #1b2f4f;
  --bg-accent: #1f3d68;
  --bg-dark-block: #10233f;
  --text-main: #e7f0ff;
  --text-soft: #b7c8e6;
  --text-on-dark: #ffffff;
  --border: #28466f;
  --brand-blue: #68a5ff;
  --brand-blue-2: #8cbcff;
  --brand-yellow: #f4c430;
  --brand-yellow-2: #ffd84d;
  --success-bg: #173b2d;
  --success-text: #baf2c8;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.landing-page {
  background:
    radial-gradient(circle at top left, rgba(21, 84, 184, 0.16), transparent 26%),
    radial-gradient(circle at top right, rgba(244, 196, 48, 0.14), transparent 24%),
    var(--bg-main);
  color: var(--text-main);
  transition: background 0.25s ease, color 0.25s ease;
}

.landing-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  width: min(1200px, calc(100% - 40px));
  margin: 18px auto 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: color-mix(in srgb, var(--bg-soft) 88%, transparent);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-main);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-2));
  color: #ffffff;
  font-weight: 900;
  letter-spacing: -0.05em;
  box-shadow: 0 10px 20px rgba(21, 84, 184, 0.22);
}

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

.brand small {
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.landing-nav {
  display: flex;
  gap: 20px;
  align-items: center;
}

.landing-nav a {
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}

.landing-nav a:hover {
  color: var(--brand-blue);
}

.header-actions,
.hero-actions,
.cta-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.theme-toggle {
  min-height: 44px;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-soft-2);
  color: var(--text-main);
  font-weight: 800;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 800;
  border: 1px solid transparent;
}

.btn-large {
  min-height: 52px;
  padding: 14px 20px;
  border-radius: 12px;
}

.btn-dark {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-2));
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(21, 84, 184, 0.25);
}

.btn-muted {
  background: var(--brand-yellow);
  color: #2e2a12;
  border-color: #e1b623;
}

.btn-light {
  background: var(--bg-soft);
  color: var(--brand-blue);
  border-color: var(--border);
}

.enterprise-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  gap: 46px;
  align-items: center;
  width: min(1200px, calc(100% - 40px));
  margin: 70px auto 42px;
}

.hero-copy h1 {
  max-width: 820px;
  margin: 0 0 24px;
  font-size: clamp(42px, 5.6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.065em;
  color: var(--text-main);
}

.hero-copy p {
  max-width: 760px;
  margin: 0 0 28px;
  font-size: 19px;
  line-height: 1.75;
  color: var(--text-soft);
}

.landing-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 16px;
  padding: 7px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand-yellow) 28%, var(--bg-soft));
  color: var(--text-main);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.dark-badge {
  background: rgba(255, 216, 77, 0.14);
  color: #fff2ba;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 34px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--border);
}

.trust-strip div {
  padding: 18px;
  background: var(--bg-soft);
}

.trust-strip strong,
.trust-strip span {
  display: block;
}

.trust-strip strong {
  margin-bottom: 6px;
  color: var(--text-main);
}

.trust-strip span {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.45;
}

.enterprise-panel {
  padding: 24px;
  border-radius: 24px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-header small,
.panel-header strong {
  display: block;
}

.panel-header small {
  margin-bottom: 4px;
  color: var(--text-soft);
  font-weight: 700;
}

.panel-header strong {
  font-size: 20px;
  color: var(--text-main);
}

.system-status {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--success-bg);
  color: var(--success-text);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.operation-metric {
  padding: 16px;
  border-radius: 16px;
  background: var(--bg-soft-2);
  border: 1px solid var(--border);
}

.operation-metric.primary {
  background: linear-gradient(135deg, var(--brand-blue), #0f3f86);
  color: #ffffff;
  border-color: transparent;
}

.operation-metric span,
.operation-metric strong,
.operation-metric small {
  display: block;
}

.operation-metric span {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 800;
}

.operation-metric.primary span,
.operation-metric.primary small {
  color: #dbeafe;
}

.operation-metric strong {
  margin: 8px 0 4px;
  font-size: 32px;
  line-height: 1;
  color: inherit;
}

.operation-metric small {
  color: var(--text-soft);
}

.dispatch-card {
  margin-top: 14px;
  padding: 18px;
  border-radius: 18px;
  background: var(--bg-soft-2);
  border: 1px solid var(--border);
}

.dispatch-row,
.dispatch-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dispatch-row span {
  color: var(--text-soft);
  font-weight: 800;
}

.dispatch-row strong {
  color: var(--text-main);
}

.dispatch-route {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  padding: 16px;
  border-radius: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.dispatch-route small,
.dispatch-route strong {
  display: block;
}

.dispatch-route small {
  margin-bottom: 4px;
  color: var(--text-soft);
  font-weight: 800;
}

.dispatch-route strong {
  color: var(--text-main);
}

.dispatch-footer {
  color: var(--text-soft);
}

.dispatch-footer strong {
  font-size: 22px;
  color: var(--brand-blue);
}

.landing-section {
  width: min(1200px, calc(100% - 40px));
  margin: 42px auto;
  padding: 54px;
  border-radius: 26px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 30px;
}

.section-heading h2,
.process-section h2,
.final-cta h2 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.07;
  letter-spacing: -0.055em;
  color: var(--text-main);
}

.section-heading p,
.process-section p,
.final-cta p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.75;
  font-size: 17px;
}

.architecture-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--border);
}

.architecture-grid article {
  padding: 24px;
  background: var(--bg-soft-2);
}

.architecture-grid span {
  display: block;
  margin-bottom: 28px;
  color: var(--brand-blue);
  font-size: 13px;
  font-weight: 900;
}

.architecture-grid h3,
.serious-feature-grid h3 {
  margin: 0 0 10px;
  color: var(--text-main);
  font-size: 20px;
}

.architecture-grid p,
.serious-feature-grid p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.65;
}

.serious-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--border);
}

.serious-feature-grid article {
  padding: 26px;
  background: var(--bg-soft-2);
}

.process-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 38px;
  align-items: start;
}

.process-table {
  display: grid;
  gap: 12px;
}

.process-table div {
  padding: 20px;
  border-radius: 18px;
  background: var(--bg-soft-2);
  border: 1px solid var(--border);
}

.process-table span {
  display: block;
  margin-bottom: 10px;
  color: var(--brand-blue);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.process-table strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text-main);
  font-size: 18px;
}

.process-table p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.serious-dark {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand-blue) 84%, #0f274b), var(--bg-dark-block));
  color: var(--text-on-dark);
  border-color: transparent;
}

.serious-dark .section-heading h2 {
  color: var(--text-on-dark);
}

.serious-dark .section-heading p {
  color: #d9e7ff;
}

.serious-provider-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.14);
}

.serious-provider-grid div {
  padding: 26px;
  background: rgba(255, 255, 255, 0.06);
}

.serious-provider-grid span {
  display: block;
  margin-bottom: 20px;
  color: #ffe89b;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.serious-provider-grid strong {
  display: block;
  margin-bottom: 8px;
  font-size: 24px;
  color: #ffffff;
}

.serious-provider-grid p {
  margin: 0;
  color: #d8e5ff;
  line-height: 1.65;
}

.final-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.final-cta > div:first-child {
  max-width: 760px;
}

.landing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1200px, calc(100% - 40px));
  margin: 30px auto 46px;
  color: var(--text-soft);
}

.landing-footer a {
  color: var(--brand-blue);
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 1040px) {
  .landing-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .landing-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-top: 4px;
  }

  .enterprise-hero,
  .process-section {
    grid-template-columns: 1fr;
  }

  .architecture-grid,
  .serious-feature-grid,
  .serious-provider-grid {
    grid-template-columns: 1fr 1fr;
  }

  .final-cta {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  .landing-header,
  .enterprise-hero,
  .landing-section,
  .landing-footer {
    width: min(100% - 24px, 1200px);
  }

  .landing-header {
    margin-top: 12px;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions .btn,
  .theme-toggle {
    flex: 1;
  }

  .enterprise-hero {
    margin-top: 42px;
  }

  .hero-copy h1 {
    font-size: 40px;
  }

  .trust-strip,
  .operations-grid,
  .architecture-grid,
  .serious-feature-grid,
  .serious-provider-grid {
    grid-template-columns: 1fr;
  }

  .landing-section {
    padding: 28px;
    border-radius: 22px;
  }

  .enterprise-panel {
    padding: 18px;
    border-radius: 22px;
  }

  .dispatch-row,
  .dispatch-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .landing-footer {
    display: grid;
    gap: 10px;
  }
}

/* ===== LANDING PAGE END ===== */



/* ===== AUTH THEME START ===== */

.auth-page {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(21, 84, 184, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(244, 196, 48, 0.16), transparent 26%),
    var(--bg-main);
  color: var(--text-main);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
  gap: 32px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0;
  align-items: center;
}

.auth-side {
  padding: 42px;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 72px;
  color: var(--text-main);
  text-decoration: none;
}

.auth-brand strong,
.auth-brand small {
  display: block;
}

.auth-brand small {
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 12px;
}

.auth-copy h1 {
  max-width: 720px;
  margin: 0 0 20px;
  font-size: clamp(40px, 5vw, 66px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.auth-copy p {
  max-width: 680px;
  margin: 0;
  color: var(--text-soft);
  font-size: 19px;
  line-height: 1.75;
}

.auth-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  max-width: 760px;
  margin-top: 42px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--border);
}

.auth-info-grid div {
  padding: 18px;
  background: var(--bg-soft);
}

.auth-info-grid strong,
.auth-info-grid span {
  display: block;
}

.auth-info-grid strong {
  margin-bottom: 6px;
  color: var(--text-main);
}

.auth-info-grid span {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.45;
}

.auth-form-panel {
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}

.auth-panel-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.auth-panel-top h2 {
  margin: 0;
  color: var(--text-main);
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.auth-panel-text {
  margin: 0 0 22px;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.6;
}

.auth-form {
  margin-top: 20px;
}

.auth-form label span {
  color: var(--text-main);
}

.auth-form input {
  background: var(--bg-soft-2);
  border-color: var(--border);
  color: var(--text-main);
}

.auth-form input:focus {
  outline: 3px solid color-mix(in srgb, var(--brand-blue) 22%, transparent);
  border-color: var(--brand-blue);
}

.auth-form button {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-2));
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(21, 84, 184, 0.25);
}

.auth-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.auth-links a {
  color: var(--brand-blue);
  font-weight: 800;
  text-decoration: none;
}

html[data-theme="dark"] .auth-links a {
  color: var(--brand-yellow-2);
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
    padding: 24px 0;
  }

  .auth-side {
    padding: 18px 0 0;
  }

  .auth-brand {
    margin-bottom: 34px;
  }

  .auth-info-grid {
    grid-template-columns: 1fr;
  }

  .auth-form-panel {
    padding: 26px;
  }
}

@media (max-width: 560px) {
  .auth-shell {
    width: min(100% - 24px, 1180px);
  }

  .auth-panel-top {
    display: grid;
  }

  .theme-toggle {
    width: 100%;
  }
}

/* ===== AUTH THEME END ===== */

.section-block {
  margin-top: 28px;
}

.success-box {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  background: #dcfce7;
  color: #14532d;
  border: 1px solid #86efac;
}

.success-box strong,
.success-box span {
  display: block;
}

.form select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font-size: 16px;
  background: #ffffff;
  color: #1f2937;
}

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

.row-actions form {
  margin: 0;
}

.mini-button {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 10px;
  border: 0;
  border-radius: 10px;
  background: #e5e7eb;
  color: #111827;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.warning-button {
  background: #fef3c7;
  color: #92400e;
}

.danger-button {
  background: #fee2e2;
  color: #991b1b;
}

.status-pill {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #374151;
  font-size: 13px;
  font-weight: 800;
}

.status-active {
  background: #dcfce7;
  color: #166534;
}

.status-blocked {
  background: #fee2e2;
  color: #991b1b;
}

.action-alert {
  margin-top: 18px;
}

.driver-apply-form {
  margin-top: 24px;
}

.form-section {
  display: grid;
  gap: 16px;
  margin-top: 22px;
  padding: 20px;
  border-radius: 18px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.form-section h2 {
  margin: 0;
}

.consent-box {
  display: grid;
  gap: 12px;
  margin: 22px 0;
  padding: 18px;
  border-radius: 18px;
  background: #fff7d6;
  border: 1px solid #facc15;
}

.checkbox-label {
  display: flex !important;
  grid-template-columns: unset !important;
  align-items: flex-start;
  gap: 10px !important;
  font-weight: 700;
}

.checkbox-label input {
  width: auto;
  margin-top: 4px;
}

.count-badge {
  display: inline-flex;
  margin-left: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #facc15;
  color: #422006;
  font-size: 13px;
  font-weight: 900;
  vertical-align: middle;
}

.highlight-row td {
  background: #fff7d6;
}

.status-new {
  background: #fef3c7;
  color: #92400e;
}

.module-link-with-badge {
  display: grid !important;
  gap: 6px;
}

.module-link-with-badge strong {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #facc15;
  color: #422006;
  font-size: 12px;
}

.application-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 24px;
}

.detail-card {
  padding: 20px;
  border-radius: 18px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.detail-card h2 {
  margin: 0 0 14px;
}

.detail-card p {
  margin: 8px 0;
  font-size: 15px;
}

.decision-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.decision-form label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.decision-form textarea,
.decision-form input {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font: inherit;
}

.approve-button,
.reject-button {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  font-weight: 900;
  cursor: pointer;
}

.approve-button {
  background: #16a34a;
  color: #ffffff;
}

.reject-button {
  background: #dc2626;
  color: #ffffff;
}

@media (max-width: 800px) {
  .application-detail-grid {
    grid-template-columns: 1fr;
  }
}

.driver-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

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

.car-edit-card {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding: 20px;
  border-radius: 18px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.car-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.remove-car-form {
  margin: 8px 0 20px;
}

@media (max-width: 760px) {
  .driver-edit-grid {
    grid-template-columns: 1fr;
  }
}

.checks-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.check-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 18px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.check-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.check-card label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.check-card select,
.check-card textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font: inherit;
}

.danger-count {
  background: #fee2e2;
  color: #991b1b;
}

.neutral-count {
  background: #e5e7eb;
  color: #374151;
}

.warning-box {
  background: #fff7d6;
  color: #854d0e;
  border-color: #facc15;
}

.approve-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 800px) {
  .checks-grid {
    grid-template-columns: 1fr;
  }
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.external-sources-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.external-source-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.external-source-card h3 {
  margin: 0 0 8px;
}

.external-source-card p {
  margin: 0;
  color: #6b7280;
  line-height: 1.5;
}

.source-values {
  display: grid;
  gap: 8px;
}

.source-values div {
  display: grid;
  gap: 4px;
}

.source-values span {
  color: #6b7280;
  font-size: 13px;
  font-weight: 800;
}

.source-values code {
  display: block;
  white-space: normal;
  word-break: break-word;
}

.source-button {
  width: fit-content;
  background: #dbeafe;
  color: #1d4ed8;
}

@media (max-width: 1000px) {
  .external-sources-grid {
    grid-template-columns: 1fr;
  }
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.mail-settings-form {
  margin-top: 18px;
}

.mail-enabled-row {
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 16px;
  background: #eef4ff;
  border: 1px solid #c9d9f2;
}

.mail-test-box {
  margin-top: 28px;
  padding: 20px;
  border-radius: 18px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.mail-test-box h3 {
  margin-top: 0;
}

.mail-error-text {
  color: #991b1b;
  font-weight: 800;
  word-break: break-word;
}

.mail-help {
  display: grid;
  gap: 14px;
}

.mail-help h2 {
  margin: 0;
}

.mail-help-card {
  padding: 18px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

.mail-help-card h3 {
  margin: 0 0 10px;
}

.mail-help-card p {
  margin: 6px 0;
  color: #374151;
}

.mail-help-note {
  padding: 16px;
  border-radius: 16px;
  background: #fff7d6;
  border: 1px solid #facc15;
  color: #854d0e;
  font-weight: 800;
}

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

.mail-log-error {
  display: inline-block;
  max-width: 420px;
  color: #991b1b;
  font-weight: 800;
  word-break: break-word;
}

/* ===== ORDERS MODULE START ===== */
.form select,
.form textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
  background: #ffffff;
  color: #1f2937;
}

.form textarea {
  min-height: 96px;
  resize: vertical;
}

.form-grid {
  display: grid;
  gap: 16px;
}

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

@media (max-width: 760px) {
  .form-grid.two-columns {
    grid-template-columns: 1fr;
  }
}
/* ===== ORDERS MODULE END ===== */

/* ===== ORDERS MODAL START ===== */
.header-actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-button,
.form button.primary-button {
  border: 0;
  cursor: pointer;
  display: inline-block;
  padding: 12px 18px;
  border-radius: 12px;
  background: #111827;
  color: #ffffff;
  text-decoration: none;
  font: inherit;
  font-weight: 700;
}

.ghost-link {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 12px;
  background: #f3f4f6;
  color: #111827;
  text-decoration: none;
  font-weight: 700;
}

.orders-top-section {
  margin-top: 26px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.55);
}

.modal-overlay.is-open {
  display: flex;
}

.modal-card {
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 28px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.28);
}

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

.modal-header h2 {
  margin-bottom: 0;
}

.modal-close-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  color: #111827;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
}

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

@media (max-width: 760px) {
  .header-actions-row {
    justify-content: flex-start;
    margin-top: 16px;
  }

  .modal-overlay {
    align-items: flex-start;
    padding: 12px;
  }

  .modal-card {
    padding: 20px;
    border-radius: 20px;
  }
}
/* ===== ORDERS MODAL END ===== */

/* ===== Staff / Telephony polish ===== */

.staff-page {
  max-width: 1280px;
}

.staff-page .table-wrap {
  overflow-x: auto;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.82);
}

.staff-table {
  min-width: 1180px;
}

.staff-table th {
  white-space: nowrap;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #64748b;
}

.staff-table td {
  vertical-align: top;
}

.telephony-card {
  min-width: 260px;
  max-width: 320px;
  padding: 14px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.96));
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

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

.telephony-card-head strong {
  display: block;
  font-size: 0.95rem;
}

.telephony-card-head small {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 0.78rem;
}

.telephony-grid {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 7px 10px;
  align-items: center;
}

.telephony-grid span {
  color: #64748b;
  font-size: 0.78rem;
}

.telephony-card code,
.telephony-grid code,
.sip-password-box code {
  display: inline-block;
  max-width: 100%;
  padding: 4px 7px;
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.sip-password-box {
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.sip-password-box summary {
  cursor: pointer;
  color: #2563eb;
  font-weight: 700;
  font-size: 0.84rem;
}

.sip-password-box code {
  margin-top: 8px;
}

.telephony-note {
  margin-top: 10px;
  color: #64748b;
  font-size: 0.82rem;
}

.row-actions {
  align-items: flex-start;
}

@media (max-width: 900px) {
  .staff-table {
    min-width: 1040px;
  }

  .telephony-card {
    min-width: 240px;
  }
}

/* ===== Operator dashboard telephony ===== */

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

.section-title-row h2 {
  margin-bottom: 4px;
}

.phone-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(320px, 1fr);
  gap: 18px;
  align-items: stretch;
}

.telephony-card-large {
  max-width: none;
  min-width: 0;
}

.phone-instruction-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.96));
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.phone-instruction-card h3 {
  margin-top: 0;
  margin-bottom: 12px;
}

.phone-instruction-card ol {
  margin: 0;
  padding-left: 20px;
}

.phone-instruction-card li {
  margin-bottom: 8px;
  color: #0f172a;
}

.phone-instruction-card code {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 0.86rem;
}

@media (max-width: 860px) {
  .phone-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .section-title-row {
    flex-direction: column;
  }
}


/* =========================================================
   TAXIKON CABINET GLOBAL POLISH
   Unified cabinet/admin visual layer matching landing page
   ========================================================= */

body:not(.landing-page) {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(21, 84, 184, 0.14), transparent 30%),
    radial-gradient(circle at top right, rgba(244, 196, 48, 0.14), transparent 24%),
    linear-gradient(180deg, #eef4ff 0%, #f8fbff 48%, #ffffff 100%);
  color: var(--text-main);
}

body:not(.landing-page) .page {
  align-items: flex-start;
  padding: 34px 20px;
}

body:not(.landing-page) .hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.94), rgba(248,251,255,0.94));
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

body:not(.landing-page) .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top right, rgba(244, 196, 48, 0.13), transparent 24%),
    radial-gradient(circle at bottom left, rgba(21, 84, 184, 0.08), transparent 30%);
}

body:not(.landing-page) .hero > * {
  position: relative;
  z-index: 1;
}

body:not(.landing-page) .dashboard {
  max-width: 1180px;
}

body:not(.landing-page) .wide-page {
  max-width: 1320px;
}

body:not(.landing-page) h1 {
  color: var(--text-main);
  letter-spacing: -0.045em;
}

body:not(.landing-page) h2,
body:not(.landing-page) h3 {
  color: var(--text-main);
  letter-spacing: -0.02em;
}

body:not(.landing-page) p {
  color: var(--text-soft);
}

.badge {
  background: color-mix(in srgb, var(--brand-yellow) 30%, #ffffff);
  color: var(--text-main);
  border: 1px solid rgba(244, 196, 48, 0.42);
}

.top-row {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(201, 217, 242, 0.8);
  margin-bottom: 22px;
}

.ghost-button,
.actions .secondary-link,
.secondary-link {
  background: var(--bg-soft-2);
  color: var(--brand-blue);
  border: 1px solid var(--border);
  text-decoration: none;
}

.ghost-button:hover,
.actions .secondary-link:hover,
.secondary-link:hover {
  border-color: var(--brand-blue-2);
  transform: translateY(-1px);
}

.actions a,
.form button,
.primary-button,
.approve-button {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-2));
  color: #ffffff;
  border: 1px solid transparent;
  box-shadow: 0 12px 24px rgba(21, 84, 184, 0.18);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.actions a:hover,
.form button:hover,
.primary-button:hover,
.approve-button:hover,
.mini-button:hover {
  transform: translateY(-1px);
}

button,
a {
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.form input,
.form select,
.form textarea,
select,
textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"] {
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text-main);
  border-radius: 14px;
  outline: none;
}

.form input:focus,
.form select:focus,
.form textarea:focus,
select:focus,
textarea:focus,
input:focus {
  border-color: var(--brand-blue-2);
  box-shadow: 0 0 0 4px rgba(29, 110, 232, 0.12);
}

.info-grid {
  margin-top: 0;
}

.info-card,
.section-block,
.detail-card,
.check-card,
.external-source-card,
.car-edit-card,
.mail-help-card,
.mail-test-box,
.tenant-button {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(248,251,255,0.96));
  border: 1px solid var(--border);
  box-shadow: 0 14px 34px rgba(21, 84, 184, 0.08);
}

.info-card {
  border-radius: 20px;
}

.info-card span,
.info-card small,
.muted {
  color: var(--text-soft);
}

.info-card strong {
  color: var(--text-main);
}

.section-block {
  margin-top: 26px;
  padding: 24px;
  border-radius: 24px;
}

.module-list {
  margin-top: 28px;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.94), rgba(239,246,255,0.94));
  box-shadow: 0 14px 34px rgba(21, 84, 184, 0.08);
}

.modules {
  gap: 14px;
}

.modules a,
.modules div {
  position: relative;
  min-height: 72px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--brand-blue), #0f3f86);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(21, 84, 184, 0.18);
  overflow: hidden;
}

.modules a::after,
.modules div::after {
  content: "";
  position: absolute;
  right: -26px;
  top: -26px;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: rgba(255, 216, 77, 0.18);
}

.modules a {
  text-decoration: none;
}

.modules .module-disabled {
  background:
    linear-gradient(135deg, rgba(21,84,184,0.14), rgba(21,84,184,0.08));
  color: var(--text-main);
  border: 1px solid var(--border);
  box-shadow: none;
}

.module-link-with-badge {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.module-link-with-badge strong,
.count-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--brand-yellow);
  color: #2e2a12;
  font-size: 12px;
  font-weight: 900;
}

.table-wrap {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.74);
  box-shadow: 0 12px 30px rgba(21, 84, 184, 0.07);
}

.data-table {
  background: transparent;
}

.data-table th {
  background: #edf5ff;
  color: var(--text-main);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  border-bottom: 1px solid rgba(201, 217, 242, 0.7);
}

.data-table tbody tr {
  transition: background 0.14s ease;
}

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

.pill,
.status-pill {
  border: 1px solid transparent;
}

.pill {
  background: #edf5ff;
  color: var(--brand-blue);
  border-color: var(--border);
}

.status-active {
  background: var(--success-bg);
  color: var(--success-text);
}

.status-blocked {
  background: #fee2e2;
  color: #991b1b;
}

.status-new {
  background: rgba(244, 196, 48, 0.24);
  color: #7a5b00;
}

.alert {
  border: 1px solid #fecaca;
  box-shadow: 0 10px 22px rgba(153, 27, 27, 0.08);
}

.success-box {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(22, 101, 52, 0.18);
  background: var(--success-bg);
  color: var(--success-text);
  box-shadow: 0 10px 24px rgba(22, 101, 52, 0.08);
}

.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 11px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--brand-blue);
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}

.warning-button {
  border-color: rgba(244, 196, 48, 0.58);
  background: rgba(244, 196, 48, 0.22);
  color: #6f5200;
}

.danger-button,
.reject-button {
  border-color: #fecaca;
  background: #fee2e2;
  color: #991b1b;
}

.row-actions {
  gap: 8px;
}

.telephony-card {
  border-color: rgba(21, 84, 184, 0.18);
  background:
    radial-gradient(circle at top right, rgba(244, 196, 48, 0.16), transparent 26%),
    linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.98));
}

.phone-instruction-card {
  border-color: var(--border);
}

.auth-card {
  border-radius: 28px;
}

.auth-card .badge {
  margin-bottom: 18px;
}

.mail-settings-form,
.driver-edit-grid,
.form-grid {
  gap: 16px;
}

.cards-grid,
.application-detail-grid,
.checks-grid,
.external-sources-grid,
.provider-grid,
.serious-provider-grid {
  gap: 18px;
}

@media (max-width: 760px) {
  body:not(.landing-page) .page {
    padding: 20px 12px;
  }

  body:not(.landing-page) .hero {
    border-radius: 22px;
    padding: 22px;
  }

  .section-block,
  .module-list {
    padding: 18px;
    border-radius: 20px;
  }

  .top-row {
    display: grid;
    gap: 14px;
  }
}

/* ===== Tenant telephony settings ===== */

.telephony-settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 22px;
  align-items: start;
  margin-top: 24px;
}

.telephony-settings-form .section-block:first-child {
  margin-top: 0;
}

.telephony-help-card {
  margin-top: 0;
  position: sticky;
  top: 24px;
}

.telephony-mode-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.94), rgba(239,246,255,0.94));
  margin-bottom: 14px;
}

.telephony-mode-card h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

.telephony-mode-card p {
  font-size: 14px;
  margin-bottom: 12px;
}

@media (max-width: 980px) {
  .telephony-settings-layout {
    grid-template-columns: 1fr;
  }

  .telephony-help-card {
    position: static;
  }
}

/* ===== Telephony provider control panel ===== */

.telephony-top-actions {
  align-items: center;
}

.telephony-provider-section {
  margin-top: 26px;
}

.telephony-provider-grid {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

.telephony-provider-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(21, 84, 184, 0.08), transparent 34%),
    var(--bg-soft);
  box-shadow: var(--shadow);
}

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

.provider-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.provider-card-header h3 {
  margin: 0;
  color: var(--text-main);
  font-size: 26px;
}

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

.provider-values div {
  min-height: 86px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-soft-2);
}

.provider-values span,
.provider-values strong,
.provider-values code {
  display: block;
}

.provider-values span {
  margin-bottom: 8px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 800;
}

.provider-values strong {
  color: var(--text-main);
  font-size: 15px;
  line-height: 1.4;
}

.provider-values code {
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.provider-status-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--brand-blue) 8%, var(--bg-soft));
  color: var(--text-main);
  line-height: 1.5;
}

.provider-actions {
  margin-top: 16px;
}

.line-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft-2);
  color: var(--text-main);
  font-size: 13px;
}

.line-status.compact {
  white-space: nowrap;
}

.line-status-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #9ca3af;
  box-shadow: 0 0 0 4px rgba(156, 163, 175, 0.14);
}

.line-status-ok .line-status-dot {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16), 0 0 18px rgba(34, 197, 94, 0.65);
}

.line-status-error .line-status-dot {
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.16), 0 0 18px rgba(239, 68, 68, 0.55);
}

.line-status-disabled .line-status-dot,
.line-status-unknown .line-status-dot {
  background: #94a3b8;
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.16);
}

.telephony-help-strip {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 20px;
  margin-top: 22px;
}

.telephony-help-strip p {
  margin-bottom: 0;
}

.telephony-modal-card {
  max-width: 900px;
}

.telephony-provider-form {
  margin-top: 18px;
}

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

@media (max-width: 920px) {
  .provider-values,
  .provider-checkbox-grid,
  .telephony-help-strip {
    grid-template-columns: 1fr;
  }

  .provider-card-header {
    display: grid;
  }

  .line-status.compact {
    white-space: normal;
  }
}

/* ===== Compact telephony provider UI ===== */

.telephony-top-actions {
  align-items: center;
}

.telephony-compact-table-wrap {
  margin-top: 20px;
}

.telephony-compact-table td {
  vertical-align: middle;
}

.line-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft-2);
  color: var(--text-main);
  font-size: 13px;
}

.line-status-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #94a3b8;
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.16);
}

.line-status-ok .line-status-dot {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16), 0 0 18px rgba(34, 197, 94, 0.65);
}

.line-status-error .line-status-dot {
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.16), 0 0 18px rgba(239, 68, 68, 0.55);
}

.line-status-disabled .line-status-dot,
.line-status-unknown .line-status-dot {
  background: #94a3b8;
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.16);
}

.telephony-help-strip {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 20px;
  margin-top: 22px;
}

.telephony-help-strip p {
  margin-bottom: 0;
}

.telephony-modal-card {
  max-width: 920px;
}

.provider-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.provider-details-grid div {
  min-height: 82px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-soft-2);
}

.provider-details-grid span,
.provider-details-grid strong,
.provider-details-grid code {
  display: block;
}

.provider-details-grid span {
  margin-bottom: 8px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 800;
}

.provider-details-grid code {
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.provider-status-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--brand-blue) 8%, var(--bg-soft));
  color: var(--text-main);
  line-height: 1.5;
}

.telephony-provider-form {
  margin-top: 18px;
}

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

@media (max-width: 920px) {
  .provider-details-grid,
  .provider-checkbox-grid,
  .telephony-help-strip {
    grid-template-columns: 1fr;
  }
}


/* ===== Call distribution strategy UI ===== */

.strategy-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--border, #c9d9f2);
  border-radius: 999px;
  background: var(--bg-soft-2, #f8fbff);
  color: var(--text-main, #13315c);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.strategy-chip span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--brand-yellow, #f4c430);
  color: #2e2a12;
}

.strategy-options {
  display: grid;
  gap: 12px;
}

.strategy-option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--border, #c9d9f2);
  border-radius: 16px;
  background: var(--bg-soft-2, #f8fbff);
  cursor: pointer;
}

.strategy-option input {
  margin-top: 4px;
}

.strategy-option strong,
.strategy-option small {
  display: block;
}

.strategy-option small {
  margin-top: 4px;
  color: var(--text-soft, #51627f);
  line-height: 1.45;
}

.strategy-option em {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--brand-blue, #1554b8);
  color: #ffffff;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

/* ===== Order detail card ===== */

.order-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
  margin-top: 24px;
}

.order-main-card {
  min-height: 220px;
}

.route-card {
  display: grid;
  gap: 14px;
}

.route-card div {
  padding: 16px;
  border-radius: 18px;
  background: var(--bg-soft-2);
  border: 1px solid var(--border);
}

.route-card span,
.route-card strong {
  display: block;
}

.route-card span {
  margin-bottom: 6px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 800;
}

.route-card strong {
  color: var(--text-main);
  font-size: 18px;
}

@media (max-width: 860px) {
  .order-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Incoming calls panel ===== */

.incoming-calls-panel {
  margin-top: 20px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(29, 110, 232, 0.28);
  background:
    linear-gradient(135deg, rgba(21, 84, 184, 0.10), rgba(244, 196, 48, 0.10)),
    var(--bg-soft);
  box-shadow: var(--shadow);
}

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

.incoming-calls-head strong,
.incoming-calls-head small {
  display: block;
}

.incoming-calls-head strong {
  color: var(--text-main);
  font-size: 20px;
}

.incoming-calls-head small {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 13px;
}

.incoming-calls-list {
  display: grid;
  gap: 12px;
}

.incoming-call-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-radius: 18px;
  background: var(--bg-soft-2);
  border: 1px solid var(--border);
}

.incoming-call-card span,
.incoming-call-card strong,
.incoming-call-card small {
  display: block;
}

.incoming-call-card span {
  margin-bottom: 4px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 800;
}

.incoming-call-card strong {
  color: var(--text-main);
  font-size: 20px;
}

.incoming-call-card small {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 12px;
}

.accept-call-button {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-2));
  color: #ffffff;
}

@media (max-width: 760px) {
  .incoming-call-card,
  .incoming-calls-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ===== Compact orders workspace ===== */

.orders-top-section {
  margin-top: 16px;
}

.orders-top-section .section-title-row {
  margin-bottom: 8px;
}

.orders-top-section h2 {
  margin-bottom: 4px;
  font-size: 20px;
}

.orders-top-section .table-wrap {
  margin-top: 12px;
  border-radius: 14px;
}

.orders-top-section .data-table th,
.orders-top-section .data-table td {
  padding: 9px 11px;
  font-size: 13px;
  line-height: 1.35;
}

.orders-top-section .data-table th {
  font-size: 12px;
}

.orders-top-section .muted {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.3;
}

.orders-top-section .status-pill,
.orders-top-section .pill {
  padding: 4px 7px;
  font-size: 11px;
}

/* Incoming calls: compact */

.incoming-calls-panel {
  margin-top: 14px;
  padding: 12px;
  border-radius: 16px;
}

.incoming-calls-head {
  margin-bottom: 10px;
}

.incoming-calls-head strong {
  font-size: 17px;
}

.incoming-calls-head small {
  margin-top: 2px;
  font-size: 11px;
}

.incoming-calls-list {
  gap: 8px;
}

.incoming-call-card {
  padding: 10px 12px;
  border-radius: 14px;
}

.incoming-call-card span {
  margin-bottom: 2px;
  font-size: 11px;
}

.incoming-call-card strong {
  font-size: 16px;
}

.incoming-call-card small {
  margin-top: 2px;
  font-size: 11px;
}

.incoming-call-card .row-actions {
  gap: 8px;
}

.incoming-call-card .mini-button {
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 12px;
}

/* New order modal: compact */

#orderModal .modal-card {
  width: min(760px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  padding: 18px;
  border-radius: 18px;
}

#orderModal .modal-header {
  margin-bottom: 12px;
}

#orderModal .modal-header .badge {
  margin-bottom: 8px;
  padding: 5px 9px;
  font-size: 11px;
}

#orderModal .modal-header h2 {
  margin-bottom: 0;
  font-size: 21px;
}

#orderModal .form {
  gap: 10px;
}

#orderModal .form-grid {
  gap: 10px;
}

#orderModal .form label {
  gap: 5px;
  font-size: 13px;
}

#orderModal .form label span {
  font-size: 12px;
}

#orderModal .form input,
#orderModal .form select,
#orderModal .form textarea {
  padding: 9px 10px;
  min-height: 38px;
  border-radius: 10px;
  font-size: 14px;
}

#orderModal .form textarea {
  min-height: 72px;
  resize: vertical;
}

#orderModal .modal-actions {
  margin-top: 8px;
  gap: 8px;
}

#orderModal .modal-actions button {
  min-height: 38px;
  padding: 9px 13px;
  border-radius: 10px;
  font-size: 13px;
}

/* Header density on orders page */

.dashboard .top-row .header-actions-row {
  gap: 8px;
}

.dashboard .top-row .header-actions-row .primary-button,
.dashboard .top-row .header-actions-row .ghost-button,
.dashboard .top-row .header-actions-row .ghost-link {
  padding: 9px 12px;
  min-height: 38px;
  border-radius: 10px;
  font-size: 13px;
}

@media (max-width: 760px) {
  #orderModal .modal-card {
    width: calc(100% - 20px);
    padding: 14px;
  }

  #orderModal .form-grid.two-columns {
    grid-template-columns: 1fr;
  }

  .orders-top-section .data-table th,
  .orders-top-section .data-table td {
    padding: 8px;
  }
}

/* ===== Operator line beacon on orders page ===== */

.operator-line-beacon {
  display: grid;
  grid-template-columns: 10px minmax(0, auto);
  align-items: center;
  gap: 3px 9px;
  max-width: 420px;
  padding: 8px 11px;
  border-radius: 14px;
  border: 1px solid var(--border, #d7e2f4);
  background: #f8fbff;
  color: #13315c;
  font-size: 12px;
  line-height: 1.25;
}

.operator-line-dot {
  grid-row: 1 / span 2;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #9ca3af;
  box-shadow: 0 0 0 4px rgba(156, 163, 175, 0.14);
}

.operator-line-beacon strong,
.operator-line-beacon small {
  display: block;
  min-width: 0;
}

.operator-line-beacon strong {
  font-size: 13px;
  font-weight: 900;
}

.operator-line-beacon small {
  color: #5f718f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.operator-line-ok {
  border-color: #b7efc5;
  background: #ecfdf3;
  color: #14532d;
}

.operator-line-ok .operator-line-dot {
  background: #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.16);
}

.operator-line-warn {
  border-color: #fde68a;
  background: #fffbeb;
  color: #78350f;
}

.operator-line-warn .operator-line-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.operator-line-error {
  border-color: #fecaca;
  background: #fff1f2;
  color: #7f1d1d;
}

.operator-line-error .operator-line-dot {
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.16);
}

.operator-line-neutral .operator-line-dot {
  background: #94a3b8;
}

@media (max-width: 760px) {
  .operator-line-beacon {
    max-width: 100%;
    width: 100%;
  }
}


/* ===== Order card redesign: dispatcher workspace ===== */

#orderModal .order-card-modal {
  width: min(980px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(29, 110, 232, 0.10), transparent 34%),
    #ffffff;
}

#orderModal .order-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(29, 110, 232, 0.08), rgba(244, 196, 48, 0.08));
}

#orderModal .order-card-header h2 {
  margin: 8px 0 6px;
  color: var(--text-main);
  font-size: 25px;
  line-height: 1.15;
}

#orderModal .order-card-header p {
  max-width: 620px;
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.45;
}

#orderModal .order-card-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

#orderModal .order-card-hotkey {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

#orderModal .order-card-form {
  gap: 0;
}

#orderModal .order-card-layout {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: #f6f8fc;
}

#orderModal .order-card-section {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

#orderModal .order-card-section-title {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 13px;
}

#orderModal .order-card-section-title > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--brand-blue);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

#orderModal .order-card-section-title strong,
#orderModal .order-card-section-title small {
  display: block;
}

#orderModal .order-card-section-title strong {
  color: var(--text-main);
  font-size: 15px;
}

#orderModal .order-card-section-title small {
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 12px;
}

#orderModal .order-card-client-grid,
#orderModal .order-card-route-grid,
#orderModal .order-card-extra-grid {
  display: grid;
  gap: 12px;
}

#orderModal .order-card-client-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

#orderModal .order-card-route-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

#orderModal .order-card-extra-grid {
  grid-template-columns: minmax(0, 2fr) minmax(220px, 0.8fr);
  align-items: start;
}

#orderModal .order-card-section label {
  margin: 0;
}

#orderModal .order-card-section input,
#orderModal .order-card-section select,
#orderModal .order-card-section textarea {
  background: #fbfdff;
}

#orderModal .order-card-section input:focus,
#orderModal .order-card-section select:focus,
#orderModal .order-card-section textarea:focus {
  background: #ffffff;
  border-color: rgba(29, 110, 232, 0.62);
  box-shadow: 0 0 0 3px rgba(29, 110, 232, 0.12);
  outline: none;
}

#orderModal .order-card-section textarea {
  min-height: 92px;
}

#orderModal .order-card-actions {
  margin-top: 0;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--border);
  background: #ffffff;
}

#orderModal .order-card-actions button[type="submit"] {
  min-width: 170px;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-2));
  color: #ffffff;
}

@media (max-width: 860px) {
  #orderModal .order-card-header {
    flex-direction: column;
  }

  #orderModal .order-card-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  #orderModal .order-card-client-grid,
  #orderModal .order-card-route-grid,
  #orderModal .order-card-extra-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  #orderModal .order-card-modal {
    width: calc(100% - 18px);
    border-radius: 18px;
  }

  #orderModal .order-card-header,
  #orderModal .order-card-layout,
  #orderModal .order-card-actions {
    padding-left: 14px;
    padding-right: 14px;
  }

  #orderModal .order-card-hotkey {
    display: none;
  }

  #orderModal .order-card-actions {
    flex-direction: column-reverse;
  }

  #orderModal .order-card-actions button {
    width: 100%;
  }
}

/* ===== Address suggestions in order card ===== */

#orderModal .address-suggest-field {
  position: relative;
}

#orderModal .address-suggest-control {
  position: relative;
}

#orderModal .address-suggest-dropdown {
  position: absolute;
  z-index: 80;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
}

#orderModal .address-suggest-option {
  display: block;
  width: 100%;
  min-height: auto;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
}

#orderModal .address-suggest-option:hover,
#orderModal .address-suggest-option:focus {
  background: #eef5ff;
  outline: none;
}

#orderModal .address-suggest-option strong,
#orderModal .address-suggest-option small {
  display: block;
}

#orderModal .address-suggest-option strong {
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.25;
}

#orderModal .address-suggest-option small {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.3;
}

#orderModal .address-suggest-empty {
  padding: 10px;
  color: var(--text-soft);
  font-size: 12px;
}

#orderModal .address-suggest-hint {
  margin-top: 5px;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.25;
}

#orderModal .address-suggest-hint.is-ok {
  color: #166534;
}

#orderModal .address-suggest-hint.is-error {
  color: #b91c1c;
}

@media (max-width: 860px) {
  #orderModal .address-suggest-dropdown {
    max-height: 220px;
  }
}

/* ===== Address input clear button ===== */

#orderModal .address-suggest-control input[data-address-suggest-input] {
  padding-right: 42px;
}

#orderModal .address-suggest-clear {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #e5edf8;
  color: #48617f;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}

#orderModal .address-suggest-clear:hover,
#orderModal .address-suggest-clear:focus {
  background: #d7e6fb;
  color: var(--brand-blue);
  outline: none;
}

#orderModal .address-suggest-clear[hidden] {
  display: none;
}


/* ===== Extra route points in order card ===== */

#orderModal .route-extra-addresses {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
}

#orderModal .route-add-address-row {
  grid-column: 1 / -1;
}

#orderModal .route-add-address-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(37, 99, 235, 0.35);
  border-radius: 999px;
  background: #eff6ff;
  color: var(--brand-blue);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

#orderModal .route-add-address-button:hover,
#orderModal .route-add-address-button:focus {
  background: #dbeafe;
  outline: none;
}

#orderModal .route-extra-address-field {
  padding: 12px;
  border: 1px dashed rgba(37, 99, 235, 0.35);
  border-radius: 16px;
  background: rgba(239, 246, 255, 0.55);
}

#orderModal .route-remove-address-button {
  min-height: 36px;
  margin-left: 8px;
  padding: 0 12px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 999px;
  background: #fff1f2;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}


#orderModal .route-extra-address-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

#orderModal .route-extra-address-header span {
  color: var(--text-main);
  font-size: 12px;
  font-weight: 900;
}

#orderModal .route-extra-address-control {
  position: relative;
}

#orderModal .route-remove-address-button:hover,
#orderModal .route-remove-address-button:focus {
  background: #ffe4e6;
  outline: none;
}

/* ===== Fix order card scroll after extra route addresses ===== */

#orderModal .order-card-modal {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#orderModal .order-card-header,
#orderModal .order-card-actions {
  flex-shrink: 0;
}

#orderModal .order-card-form {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  flex-direction: column;
}

#orderModal .order-card-layout {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* ===== Compact order card layout ===== */

#orderModal .order-card-modal {
  width: min(1060px, calc(100% - 20px));
  max-height: calc(100vh - 20px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#orderModal .order-card-header {
  flex-shrink: 0;
  align-items: center;
  padding: 10px 14px;
}

#orderModal .order-card-header .badge,
#orderModal .order-card-header p,
#orderModal .order-card-hotkey {
  display: none;
}

#orderModal .order-card-header h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
}

#orderModal .order-card-header-actions {
  margin-left: auto;
}

#orderModal .modal-close-button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 23px;
}

#orderModal .order-card-form {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  flex-direction: column;
}

#orderModal .order-card-layout {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(440px, 1.22fr);
  grid-template-areas:
    "client route"
    "extra route";
  gap: 10px;
  padding: 10px;
  background: #f6f8fc;
}

#orderModal .order-card-client-section {
  grid-area: client;
}

#orderModal .order-card-route-section {
  grid-area: route;
}

#orderModal .order-card-extra-section {
  grid-area: extra;
}

#orderModal .order-card-section {
  padding: 10px;
  border-radius: 14px;
}

#orderModal .order-card-section-title {
  gap: 8px;
  margin-bottom: 8px;
}

#orderModal .order-card-section-title > span {
  width: 22px;
  height: 22px;
  font-size: 11px;
}

#orderModal .order-card-section-title strong {
  font-size: 13px;
}

#orderModal .order-card-section-title small {
  display: none;
}

#orderModal .order-card-client-grid,
#orderModal .order-card-route-grid,
#orderModal .order-card-extra-grid {
  gap: 8px;
}

#orderModal .order-card-client-grid {
  grid-template-columns: 1fr;
}

#orderModal .order-card-route-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

#orderModal .order-card-extra-grid {
  grid-template-columns: 1fr;
}

#orderModal .order-card-section label {
  gap: 4px;
}

#orderModal .order-card-section label > span {
  font-size: 12px;
}

#orderModal .order-card-section input,
#orderModal .order-card-section select,
#orderModal .order-card-section textarea {
  min-height: 38px;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 14px;
}

#orderModal .order-card-section textarea {
  min-height: 56px;
}

#orderModal .address-suggest-control input[data-address-suggest-input] {
  padding-right: 38px;
}

#orderModal .address-suggest-clear {
  right: 8px;
  width: 22px;
  height: 22px;
  min-height: 22px;
  font-size: 16px;
}

#orderModal .address-suggest-hint {
  display: none;
}

#orderModal .address-suggest-hint.is-error {
  display: block;
  margin-top: 4px;
}

#orderModal .route-extra-addresses {
  gap: 8px;
}

#orderModal .route-extra-address-field {
  padding: 8px;
  border-radius: 12px;
}

#orderModal .route-extra-address-header {
  margin-bottom: 5px;
}

#orderModal .route-add-address-button {
  min-height: 32px;
  padding: 0 13px;
  font-size: 12px;
}

#orderModal .route-remove-address-button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 11px;
}

#orderModal .order-card-actions {
  flex-shrink: 0;
  padding: 10px 14px;
}

#orderModal .order-card-actions button {
  min-height: 36px;
  padding: 9px 14px;
}

@media (max-width: 960px) {
  #orderModal .order-card-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "client"
      "route"
      "extra";
  }

  #orderModal .order-card-route-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Route address vertical layout ===== */

#orderModal .order-card-route-grid {
  grid-template-columns: 1fr !important;
}

#orderModal .order-card-route-grid > .address-suggest-field,
#orderModal .order-card-route-grid > .route-add-address-row,
#orderModal .order-card-route-grid > .route-extra-addresses {
  grid-column: 1 / -1;
}

#orderModal .order-card-route-grid > [data-address-suggest-field="pickup"] {
  order: 1;
}

#orderModal .order-card-route-grid > .route-add-address-row {
  order: 2;
  display: flex;
  justify-content: flex-start;
}

#orderModal .order-card-route-grid > .route-extra-addresses {
  order: 3;
}

#orderModal .order-card-route-grid > [data-address-suggest-field="destination"] {
  order: 4;
}

#orderModal .route-add-address-button {
  width: auto;
  min-width: 230px;
}

#orderModal .route-extra-addresses {
  width: 100%;
}

#orderModal .route-extra-address-field {
  width: 100%;
}

#orderModal .address-suggest-control input[data-address-suggest-input] {
  width: 100%;
}

/* ===== Hide order card section numbers ===== */

#orderModal .order-card-section-title > span {
  display: none;
}

/* ===== Route details visible block ===== */

#orderModal .order-card-route-details-section {
  min-height: 108px;
  padding-top: 10px;
  padding-bottom: 10px;
}

#orderModal .route-details-box {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-height: 46px;
  margin-top: 8px;
}

#orderModal .route-details-metric {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 46px;
  padding: 7px 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  background: #f8fafc;
}

#orderModal .route-details-metric span {
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.2;
}

#orderModal .route-details-metric strong {
  margin-top: 2px;
  color: var(--text-main);
  font-size: 15px;
  line-height: 1.2;
}

#orderModal .route-details-status {
  display: block;
  min-height: 15px;
  margin-top: 7px;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.25;
}

#orderModal .order-card-route-details-section.is-ready .route-details-status {
  color: #166534;
}

#orderModal .order-card-route-details-section.is-error .route-details-status {
  color: #b91c1c;
}

#orderModal .order-card-route-details-section.is-loading .route-details-status {
  color: #1d4ed8;
}

@media (max-width: 860px) {
  #orderModal .route-details-box {
    grid-template-columns: 1fr;
  }

  #orderModal .order-card-route-details-section {
    min-height: 200px;
  }
}


/* ===== Order card route map ===== */
#orderModal .order-card-modal {
  width: min(1280px, calc(100% - 20px));
}

#orderModal .order-card-route-workspace {
  display: grid;
  grid-template-columns: minmax(340px, 0.86fr) minmax(420px, 1.14fr);
  gap: 10px;
  align-items: stretch;
}

#orderModal .order-card-route-fields,
#orderModal .order-card-route-map-column {
  min-width: 0;
}

#orderModal .order-card-route-map-column {
  display: grid;
  grid-template-rows: minmax(300px, 1fr) auto;
  gap: 10px;
}

#orderModal .order-route-map-panel {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  padding: 10px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.98));
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

#orderModal .route-map-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

#orderModal .route-map-header strong,
#orderModal .route-map-header small {
  display: block;
}

#orderModal .route-map-header strong {
  color: var(--text-main);
  font-size: 13px;
}

#orderModal .route-map-header small {
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.25;
}

#orderModal .route-map {
  position: relative;
  flex: 1 1 auto;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(219, 234, 254, 0.72), rgba(248, 250, 252, 0.92));
}

#orderModal .route-map-placeholder,
#orderModal .route-map-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  color: var(--text-soft);
  text-align: center;
  font-size: 13px;
  line-height: 1.45;
}

#orderModal .route-map-fallback {
  align-content: center;
  place-items: stretch;
  text-align: left;
  background: rgba(248, 250, 252, 0.95);
}

#orderModal .route-map-fallback strong,
#orderModal .route-map-fallback small {
  display: block;
  text-align: center;
}

#orderModal .route-map-fallback ol {
  max-height: 170px;
  margin: 12px 0 0;
  padding-left: 20px;
  overflow: auto;
}

#orderModal .route-map-fallback li {
  margin-bottom: 6px;
}

#orderModal .route-map-status {
  display: block;
  min-height: 15px;
  margin-top: 7px;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.25;
}

#orderModal .route-map-status.is-ready {
  color: #166534;
}

#orderModal .route-map-status.is-error {
  color: #b91c1c;
}

#orderModal .route-map-status.is-loading {
  color: #1d4ed8;
}

#orderModal .order-card-route-details-section {
  min-height: auto;
  padding: 10px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

#orderModal .order-card-route-details-section .order-card-section-title {
  margin-bottom: 6px;
}

#orderModal .leaflet-container {
  width: 100%;
  height: 100%;
  font: inherit;
}

#orderModal .leaflet-control-attribution {
  font-size: 9px;
}

@media (max-width: 1120px) {
  #orderModal .order-card-route-workspace {
    grid-template-columns: 1fr;
  }

  #orderModal .order-card-route-map-column {
    grid-template-rows: minmax(280px, auto) auto;
  }
}

@media (max-width: 960px) {
  #orderModal .order-card-modal {
    width: calc(100% - 18px);
  }

  #orderModal .route-map {
    min-height: 240px;
  }
}

/* ===== Order card route map render/layout fix ===== */
#orderModal .order-card-route-workspace {
  display: grid !important;
  grid-template-columns: minmax(720px, 1.75fr) minmax(360px, 0.75fr) !important;
  gap: 14px !important;
  align-items: start !important;
}

#orderModal .order-card-route-form-column {
  min-width: 0 !important;
}

#orderModal .order-card-route-section {
  padding: 16px !important;
}

#orderModal .order-card-route-map-column {
  min-width: 340px !important;
  padding: 14px !important;
}

#orderModal .order-card-route-map {
  position: relative !important;
  width: 100% !important;
  height: clamp(340px, 44vh, 560px) !important;
  min-height: 340px !important;
  overflow: hidden !important;
  border-radius: 18px !important;
  background: #e8eef7 !important;
}

#orderModal .order-card-route-map.leaflet-container {
  height: clamp(340px, 44vh, 560px) !important;
  min-height: 340px !important;
}

#orderModal .order-card-route-map .leaflet-container {
  width: 100% !important;
  height: 100% !important;
}

#orderModal .order-card-route-map-placeholder {
  position: absolute !important;
  inset: 12px !important;
  z-index: 500 !important;
  display: grid !important;
  place-items: center !important;
  padding: 14px !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.82) !important;
  color: #64748b !important;
  text-align: center !important;
  pointer-events: none !important;
}

#orderModal .order-card-route-map-placeholder[hidden] {
  display: none !important;
}

#orderModal .order-card-route-details-section {
  padding: 10px 12px !important;
}

#orderModal .order-card-route-details-section .order-card-section-title {
  margin-bottom: 8px !important;
}

#orderModal .route-details-box {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

#orderModal .route-details-metric {
  padding: 8px 10px !important;
  min-height: auto !important;
}

#orderModal .route-details-metric span {
  font-size: 11px !important;
}

#orderModal .route-details-metric strong {
  font-size: 15px !important;
}

#orderModal .route-details-status {
  margin-top: 6px !important;
  font-size: 12px !important;
}

@media (max-width: 1180px) {
  #orderModal .order-card-route-workspace {
    grid-template-columns: 1fr !important;
  }

  #orderModal .order-card-route-map-column {
    min-width: 0 !important;
  }
}

/* ORDER ROUTE MAP LAYOUT FIX V3 START */

/* Общая модалка */
#orderModal .modal-card,
#orderModal .order-card-modal {
  width: min(98vw, 1700px) !important;
  max-width: 98vw !important;
  overflow-x: hidden !important;
}

#orderModal .order-card-form {
  overflow-x: hidden !important;
}

/* Левый блок чуть шире, основной блок чуть компактнее */
#orderModal .order-card-layout {
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 2.28fr) !important;
  gap: 14px !important;
  align-items: start !important;
  min-width: 0 !important;
}

#orderModal .order-card-client-section,
#orderModal .order-card-extra-section {
  min-width: 0 !important;
}

#orderModal .order-card-client-grid,
#orderModal .order-card-extra-grid {
  grid-template-columns: 1fr !important;
  gap: 10px !important;
}

/* Внутри маршрута: средний блок немного уже, карта чуть просторнее */
#orderModal .order-card-route-workspace {
  display: grid !important;
  grid-template-columns: minmax(480px, 1.7fr) minmax(420px, 1.1fr) !important;
  gap: 16px !important;
  align-items: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
}

#orderModal .order-card-route-form-column {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

#orderModal .order-card-route-section {
  flex: 0 0 auto !important;
}

#orderModal .order-card-route-details-section {
  flex: 0 0 auto !important;
  padding: 12px 16px !important;
}

#orderModal .route-details-box {
  gap: 10px !important;
}

#orderModal .route-details-metric {
  min-height: 54px !important;
  padding: 10px 12px !important;
}

#orderModal .order-card-route-map-column {
  min-width: 0 !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  min-height: 460px !important;
  overflow: hidden !important;
}

#orderModal .order-card-route-map {
  display: block !important;
  flex: 1 1 auto !important;
  width: 100% !important;
  height: 500px !important;
  min-height: 500px !important;
  max-height: none !important;
  position: relative !important;
  overflow: hidden !important;
  border-radius: 18px !important;
  background: #e8eef7 !important;
}

#orderModal .order-card-route-map.leaflet-container {
  width: 100% !important;
  height: 500px !important;
  min-height: 500px !important;
  max-width: 100% !important;
}

#orderModal .order-card-route-map .leaflet-tile,
#orderModal .order-card-route-map .leaflet-marker-icon,
#orderModal .order-card-route-map .leaflet-marker-shadow {
  max-width: none !important;
  max-height: none !important;
}

#orderModal .order-card-route-map-placeholder {
  position: absolute !important;
  inset: 0 !important;
  z-index: 450 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 18px !important;
  pointer-events: none !important;
}

#orderModal .order-card-route-map-placeholder[hidden] {
  display: none !important;
}

@media (max-width: 1250px) {
  #orderModal .order-card-layout {
    grid-template-columns: 1fr !important;
  }

  #orderModal .order-card-route-workspace {
    grid-template-columns: 1fr !important;
  }

  #orderModal .order-card-route-map-column {
    min-height: 360px !important;
  }

  #orderModal .order-card-route-map,
  #orderModal .order-card-route-map.leaflet-container {
    height: 360px !important;
    min-height: 360px !important;
  }
}

/* ORDER ROUTE MAP LAYOUT FIX V3 END */

/* ORDER CARD LEFT DETAILS UNDER CLIENT FIX V1 START */

/*
  Внешняя сетка карточки:
  слева: Клиент + Детали
  справа: Маршрут/карта на всю высоту
*/
#orderModal .order-card-layout {
  display: grid !important;
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 2.22fr) !important;
  grid-template-areas:
    "client route"
    "details route" !important;
  grid-auto-rows: auto !important;
  align-items: start !important;
  gap: 14px !important;
}

/* Блок Клиент */
#orderModal .order-card-client-section {
  grid-area: client !important;
}

/* Блок Детали прямо под Клиентом */
#orderModal .order-card-extra-section {
  grid-area: details !important;
  align-self: start !important;
  margin-top: 0 !important;
}

/* Блок маршрута занимает правую часть и не толкает Детали вниз */
#orderModal .order-card-route-workspace,
#orderModal .order-card-route-section,
#orderModal [data-order-route-workspace] {
  grid-area: route !important;
  align-self: start !important;
}

/* Убираем лишнее растягивание левой колонки */
#orderModal .order-card-client-section,
#orderModal .order-card-extra-section {
  width: 100% !important;
  min-width: 0 !important;
}

/* На узких экранах всё снова одной колонкой */
@media (max-width: 1250px) {
  #orderModal .order-card-layout {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "client"
      "details"
      "route" !important;
  }

  #orderModal .order-card-client-section,
  #orderModal .order-card-extra-section,
  #orderModal .order-card-route-workspace,
  #orderModal .order-card-route-section,
  #orderModal [data-order-route-workspace] {
    grid-area: auto !important;
  }
}

/* ORDER CARD LEFT DETAILS UNDER CLIENT FIX V1 END */

/* ORDER CARD TRUE LEFT COLUMN FIX V1 START */

#orderModal .order-card-layout {
  display: grid !important;
  grid-template-columns: minmax(330px, 0.86fr) minmax(0, 2.14fr) !important;
  grid-template-areas: "left route" !important;
  gap: 16px !important;
  align-items: start !important;
  width: 100% !important;
  min-width: 0 !important;
}

#orderModal .order-card-left-column {
  grid-area: left !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  align-items: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
}

#orderModal .order-card-client-section,
#orderModal .order-card-extra-section {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  grid-area: auto !important;
}

#orderModal .order-card-route-workspace,
#orderModal [data-order-route-workspace] {
  grid-area: route !important;
  align-self: start !important;
  width: 100% !important;
  min-width: 0 !important;
}

#orderModal .order-card-client-grid,
#orderModal .order-card-extra-grid {
  grid-template-columns: 1fr !important;
}

@media (max-width: 1250px) {
  #orderModal .order-card-layout {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "left"
      "route" !important;
  }

  #orderModal .order-card-left-column,
  #orderModal .order-card-route-workspace,
  #orderModal [data-order-route-workspace] {
    grid-area: auto !important;
  }
}

/* ORDER CARD TRUE LEFT COLUMN FIX V1 END */

/* ORDER CARD ROUTE BLOCK WIDTH FIX V1 START */

/*
  В правой части карточки:
  слева внутри неё: Маршрут + Детали маршрута одинаковой ширины
  справа: Карта маршрута
*/
#orderModal [data-order-route-workspace] {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(410px, 0.52fr) !important;
  grid-template-areas:
    "routeForm map"
    "routeDetails map" !important;
  gap: 16px !important;
  align-items: start !important;
  width: 100% !important;
  min-width: 0 !important;
}

/* Блок Маршрут должен занимать всю левую колонку */
#orderModal .order-card-route-section {
  grid-area: routeForm !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}

/* Детали маршрута — та же левая колонка, такая же ширина */
#orderModal [data-route-details-panel],
#orderModal .route-details-panel,
#orderModal .order-card-route-details {
  grid-area: routeDetails !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}

/* Карта остаётся справа и занимает высоту верхней части */
#orderModal [data-route-map-column],
#orderModal .order-card-route-map-column {
  grid-area: map !important;
  width: 100% !important;
  min-width: 0 !important;
  align-self: start !important;
}

/* Поля внутри Маршрута растягиваем на всю доступную ширину */
#orderModal .order-card-route-section .address-suggest-field,
#orderModal .order-card-route-section .address-suggest-control,
#orderModal .order-card-route-section input[data-address-suggest-input],
#orderModal .order-card-route-section [data-route-extra-addresses],
#orderModal .order-card-route-section .route-extra-address-field,
#orderModal .order-card-route-section .route-add-address-row {
  width: 100% !important;
  max-width: none !important;
}

/* Кнопка промежуточного адреса пусть не задаёт ширину всему блоку */
#orderModal .route-add-address-button {
  width: auto !important;
  max-width: 100% !important;
}

/* На узких экранах карта уходит ниже */
@media (max-width: 1250px) {
  #orderModal [data-order-route-workspace] {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "routeForm"
      "routeDetails"
      "map" !important;
  }

  #orderModal .order-card-route-section,
  #orderModal [data-route-details-panel],
  #orderModal .route-details-panel,
  #orderModal .order-card-route-details,
  #orderModal [data-route-map-column],
  #orderModal .order-card-route-map-column {
    grid-area: auto !important;
  }
}

/* ORDER CARD ROUTE BLOCK WIDTH FIX V1 END */

/* ORDER ROUTE MARKER TOOLTIP LABELS V2 START */
#orderModal .leaflet-tooltip.route-point-label-tooltip {
  background: #1d4ed8 !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  padding: 5px 9px !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.22) !important;
  pointer-events: none !important;
  white-space: nowrap !important;
}

#orderModal .leaflet-tooltip-top.route-point-label-tooltip::before {
  border-top-color: #1d4ed8 !important;
}

#orderModal .leaflet-tooltip-bottom.route-point-label-tooltip::before {
  border-bottom-color: #1d4ed8 !important;
}
/* ORDER ROUTE MARKER TOOLTIP LABELS V2 END */

/* ORDER ROUTE LABEL-ONLY MARKERS START */
#orderModal .leaflet-marker-icon.route-point-label-anchor,
#orderModal .leaflet-div-icon.route-point-label-anchor {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  width: 1px !important;
  height: 1px !important;
}

#orderModal .leaflet-tooltip.route-point-label-tooltip {
  background: #1d4ed8 !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  padding: 5px 10px !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18) !important;
  pointer-events: none !important;
  white-space: nowrap !important;
}

#orderModal .leaflet-tooltip-top.route-point-label-tooltip::before {
  border-top-color: #1d4ed8 !important;
}

#orderModal .leaflet-tooltip-bottom.route-point-label-tooltip::before {
  border-bottom-color: #1d4ed8 !important;
}
/* ORDER ROUTE LABEL-ONLY MARKERS END */

/* ORDER OPTIONS AND COST LAYOUT V1 START */

/* Левая колонка: Клиент -> Детали -> Детали маршрута */
#orderModal .order-card-left-column [data-route-details-panel] {
  grid-area: auto !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
}

#orderModal .order-card-left-column [data-route-details-panel] .route-details-grid,
#orderModal .order-card-left-column [data-route-details-panel] [data-route-details-grid] {
  grid-template-columns: 1fr !important;
}

/* Центральная часть: Маршрут -> Опции заказа -> Расчёт стоимости */
#orderModal [data-order-route-workspace] {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(410px, 0.52fr) !important;
  grid-template-areas:
    "routeForm map"
    "routePanels map" !important;
  gap: 16px !important;
  align-items: start !important;
  width: 100% !important;
  min-width: 0 !important;
}

#orderModal .order-card-route-section {
  grid-area: routeForm !important;
  width: 100% !important;
  max-width: none !important;
}

#orderModal [data-order-route-panels] {
  grid-area: routePanels !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  width: 100% !important;
  min-width: 0 !important;
}

#orderModal [data-route-map-column],
#orderModal .order-card-route-map-column {
  grid-area: map !important;
}

/* Опции заказа */
#orderModal .order-card-order-options-panel,
#orderModal .order-card-cost-panel {
  width: 100% !important;
  min-width: 0 !important;
}

#orderModal .order-options-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin-top: 10px !important;
}

#orderModal .order-option-item {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  min-height: 42px !important;
  padding: 10px 12px !important;
  border: 1px solid #bfd7ff !important;
  border-radius: 14px !important;
  background: rgba(248, 251, 255, 0.92) !important;
  color: #12315f !important;
  font-weight: 800 !important;
  cursor: pointer !important;
}

#orderModal .order-option-item input {
  width: 17px !important;
  height: 17px !important;
  accent-color: #1d4ed8 !important;
}

#orderModal .order-options-hint,
#orderModal .order-cost-hint {
  display: block !important;
  margin-top: 10px !important;
  color: #52688d !important;
}

/* Расчёт стоимости */
#orderModal .order-cost-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin-top: 10px !important;
}

#orderModal .order-cost-card {
  min-height: 64px !important;
  padding: 12px 14px !important;
  border: 1px solid #cbdaf2 !important;
  border-radius: 14px !important;
  background: rgba(248, 251, 255, 0.96) !important;
}

#orderModal .order-cost-card small {
  display: block !important;
  margin-bottom: 8px !important;
  color: #52688d !important;
}

#orderModal .order-cost-card strong {
  color: #12315f !important;
  font-size: 20px !important;
}

/* На узких экранах всё становится одной колонкой */
@media (max-width: 1250px) {
  #orderModal [data-order-route-workspace] {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "routeForm"
      "routePanels"
      "map" !important;
  }

  #orderModal .order-options-grid,
  #orderModal .order-cost-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ORDER OPTIONS AND COST LAYOUT V1 END */

/* COMPACT ORDER CARD UI V1 START */

/* Общая компактность карточки заказа */
#orderModal {
  font-size: 14px !important;
}

#orderModal .modal-content,
#orderModal .order-modal-content,
#orderModal .order-card-modal {
  font-size: 14px !important;
}

#orderModal .modal-body,
#orderModal .order-card-body {
  padding-top: 10px !important;
}

/* Сетки и промежутки */
#orderModal .order-card-layout {
  gap: 12px !important;
}

#orderModal .order-card-left-column {
  gap: 10px !important;
}

#orderModal [data-order-route-workspace] {
  gap: 12px !important;
}

#orderModal [data-order-route-panels] {
  gap: 10px !important;
}

/* Все основные секции делаем ниже и плотнее */
#orderModal .order-card-section {
  padding: 12px 14px !important;
  border-radius: 14px !important;
}

#orderModal .order-card-section h3 {
  margin: 0 0 10px !important;
  font-size: 16px !important;
  line-height: 1.15 !important;
}

/* Label */
#orderModal label {
  font-size: 13px !important;
}

#orderModal .order-card-section label {
  margin-bottom: 5px !important;
}

/* Поля ввода */
#orderModal input[type="text"],
#orderModal input[type="tel"],
#orderModal input[type="number"],
#orderModal input[type="email"],
#orderModal select,
#orderModal textarea,
#orderModal [data-address-suggest-input] {
  min-height: 38px !important;
  height: 38px !important;
  padding: 8px 10px !important;
  font-size: 14px !important;
  border-radius: 11px !important;
}

#orderModal textarea {
  min-height: 58px !important;
  height: 58px !important;
  line-height: 1.25 !important;
}

/* Адресные поля */
#orderModal .address-suggest-control {
  min-height: 38px !important;
}

#orderModal .address-suggest-field {
  gap: 5px !important;
}

#orderModal .address-suggest-dropdown {
  font-size: 14px !important;
}

#orderModal .address-suggest-option {
  padding: 9px 12px !important;
  min-height: 38px !important;
}

#orderModal .address-suggest-option strong {
  font-size: 14px !important;
  line-height: 1.2 !important;
}

/* Кнопка промежуточного адреса */
#orderModal .route-add-address-row {
  margin: 8px 0 10px !important;
}

#orderModal .route-add-address-button {
  min-height: 32px !important;
  padding: 6px 12px !important;
  font-size: 13px !important;
  border-radius: 999px !important;
}

/* Блок опций заказа */
#orderModal .order-card-order-options-panel {
  padding: 12px 14px !important;
}

#orderModal .order-options-grid {
  gap: 8px !important;
  margin-top: 6px !important;
}

#orderModal .order-option-item {
  min-height: 34px !important;
  padding: 7px 10px !important;
  border-radius: 11px !important;
  font-size: 13px !important;
  gap: 8px !important;
}

#orderModal .order-option-item input {
  width: 15px !important;
  height: 15px !important;
}

#orderModal .order-options-hint {
  margin-top: 7px !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
}

/* Расчёт стоимости */
#orderModal .order-card-cost-panel {
  padding: 12px 14px !important;
}

#orderModal .order-cost-grid {
  gap: 8px !important;
  margin-top: 6px !important;
}

#orderModal .order-cost-card {
  min-height: 48px !important;
  padding: 9px 11px !important;
  border-radius: 11px !important;
}

#orderModal .order-cost-card small {
  margin-bottom: 5px !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
}

#orderModal .order-cost-card strong {
  font-size: 18px !important;
  line-height: 1.05 !important;
}

#orderModal .order-cost-hint {
  margin-top: 7px !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
}

/* Детали маршрута слева */
#orderModal [data-route-details-panel] {
  padding: 12px 14px !important;
}

#orderModal [data-route-details-panel] .route-details-grid,
#orderModal [data-route-details-panel] [data-route-details-grid] {
  gap: 8px !important;
}

#orderModal .route-detail-card,
#orderModal [data-route-details-panel] [class*="route-detail"] {
  min-height: 46px !important;
  padding: 8px 10px !important;
  border-radius: 11px !important;
}

#orderModal [data-route-details-panel] small,
#orderModal [data-route-details-hint],
#orderModal [data-route-details-status] {
  font-size: 12px !important;
  line-height: 1.2 !important;
}

/* Карта чуть компактнее по заголовку */
#orderModal .order-card-route-map-column {
  padding: 12px 14px !important;
}

#orderModal .order-card-route-map-column h3 {
  font-size: 16px !important;
  margin-bottom: 10px !important;
}

/* Нижние кнопки */
#orderModal .modal-actions,
#orderModal .order-card-actions {
  padding: 10px 14px !important;
  gap: 10px !important;
}

#orderModal .modal-actions button,
#orderModal .order-card-actions button,
#orderModal button[type="submit"] {
  min-height: 38px !important;
  padding: 8px 18px !important;
  font-size: 14px !important;
}

/* COMPACT ORDER CARD UI V1 END */

/* NO SCROLL ORDER CARD UI V1 START */

/* Модалка должна помещаться в экран */
#orderModal .modal-dialog,
#orderModal .modal-content,
#orderModal .order-modal-content,
#orderModal .order-card-modal {
  max-height: calc(100vh - 24px) !important;
}

/* Тело карточки — максимально плотное */
#orderModal .modal-body,
#orderModal .order-card-body {
  padding: 8px 12px 72px !important;
  overflow-y: auto !important;
}

/* Главная сетка плотнее */
#orderModal .order-card-layout {
  gap: 8px !important;
  align-items: start !important;
}

#orderModal .order-card-left-column {
  gap: 8px !important;
}

#orderModal [data-order-route-workspace] {
  gap: 8px !important;
}

#orderModal [data-order-route-panels] {
  gap: 8px !important;
}

/* Секции меньше по высоте */
#orderModal .order-card-section {
  padding: 9px 11px !important;
  border-radius: 13px !important;
}

#orderModal .order-card-section h3 {
  margin-bottom: 7px !important;
  font-size: 15px !important;
}

/* Поля ещё компактнее */
#orderModal input[type="text"],
#orderModal input[type="tel"],
#orderModal input[type="number"],
#orderModal input[type="email"],
#orderModal select,
#orderModal textarea,
#orderModal [data-address-suggest-input] {
  min-height: 34px !important;
  height: 34px !important;
  padding: 6px 9px !important;
  font-size: 13px !important;
  border-radius: 10px !important;
}

#orderModal textarea {
  min-height: 50px !important;
  height: 50px !important;
}

/* Маршрут */
#orderModal .route-add-address-row {
  margin: 6px 0 8px !important;
}

#orderModal .route-add-address-button {
  min-height: 29px !important;
  padding: 5px 10px !important;
  font-size: 12.5px !important;
}

/* Опции заказа: 3 колонки, чтобы убрать лишнюю высоту */
#orderModal .order-options-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 7px !important;
  margin-top: 5px !important;
}

#orderModal .order-option-item {
  min-height: 31px !important;
  padding: 5px 8px !important;
  border-radius: 10px !important;
  font-size: 12.5px !important;
  line-height: 1.1 !important;
}

#orderModal .order-option-item input {
  width: 14px !important;
  height: 14px !important;
}

#orderModal .order-options-hint {
  margin-top: 6px !important;
  font-size: 11.5px !important;
}

/* Расчёт стоимости — короткий горизонтальный блок */
#orderModal .order-card-cost-panel {
  padding: 9px 11px !important;
}

#orderModal .order-cost-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 7px !important;
  margin-top: 5px !important;
}

#orderModal .order-cost-card {
  min-height: 40px !important;
  padding: 7px 9px !important;
  border-radius: 10px !important;
}

#orderModal .order-cost-card small {
  margin-bottom: 3px !important;
  font-size: 11.5px !important;
}

#orderModal .order-cost-card strong {
  font-size: 16px !important;
}

#orderModal .order-cost-hint {
  margin-top: 5px !important;
  font-size: 11.5px !important;
}

/* Детали маршрута слева компактнее */
#orderModal [data-route-details-panel] .route-details-grid,
#orderModal [data-route-details-panel] [data-route-details-grid] {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 7px !important;
}

#orderModal .route-detail-card,
#orderModal [data-route-details-panel] [class*="route-detail"] {
  min-height: 38px !important;
  padding: 6px 8px !important;
}

#orderModal [data-route-details-hint],
#orderModal [data-route-details-status] {
  font-size: 11.5px !important;
}

/* Карта ниже, чтобы не раздувала карточку */
#orderModal .order-card-route-map,
#orderModal [data-route-map] {
  height: clamp(330px, calc(100vh - 245px), 430px) !important;
  min-height: 330px !important;
}

/* Правая колонка карты без лишних отступов */
#orderModal .order-card-route-map-column {
  padding: 9px 11px !important;
}

#orderModal .order-card-route-map-column h3 {
  margin-bottom: 7px !important;
  font-size: 15px !important;
}

/* Футер кнопок компактный */
#orderModal .modal-actions,
#orderModal .order-card-actions {
  min-height: 58px !important;
  padding: 8px 12px !important;
}

#orderModal .modal-actions button,
#orderModal .order-card-actions button,
#orderModal button[type="submit"] {
  min-height: 34px !important;
  padding: 7px 16px !important;
  font-size: 13px !important;
}

/* На очень узких экранах опции снова в 2 колонки */
@media (max-width: 1350px) {
  #orderModal .order-options-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* NO SCROLL ORDER CARD UI V1 END */

/* ROUTE DETAILS UNDER MAP V1 START */

/* Правая колонка: Карта -> Детали маршрута */
#orderModal [data-route-map-column],
#orderModal .order-card-route-map-column {
  display: flex !important;
  flex-direction: column !important;
  gap: 9px !important;
}

/* Карту уменьшаем, чтобы под ней помещались детали маршрута */
#orderModal .order-card-route-map,
#orderModal [data-route-map] {
  height: clamp(245px, calc(100vh - 360px), 330px) !important;
  min-height: 245px !important;
  max-height: 330px !important;
}

/* Детали маршрута под картой */
#orderModal [data-route-map-column] [data-route-details-panel],
#orderModal .order-card-route-map-column [data-route-details-panel] {
  width: 100% !important;
  margin: 0 !important;
  padding: 9px 11px !important;
  border-radius: 13px !important;
  box-shadow: none !important;
}

/* В правой колонке детали маршрута компактнее */
#orderModal [data-route-map-column] [data-route-details-panel] h3,
#orderModal .order-card-route-map-column [data-route-details-panel] h3 {
  font-size: 15px !important;
  margin-bottom: 7px !important;
}

#orderModal [data-route-map-column] [data-route-details-panel] .route-details-grid,
#orderModal [data-route-map-column] [data-route-details-panel] [data-route-details-grid],
#orderModal .order-card-route-map-column [data-route-details-panel] .route-details-grid,
#orderModal .order-card-route-map-column [data-route-details-panel] [data-route-details-grid] {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 7px !important;
}

#orderModal [data-route-map-column] [data-route-details-panel] .route-detail-card,
#orderModal [data-route-map-column] [data-route-details-panel] [class*="route-detail"],
#orderModal .order-card-route-map-column [data-route-details-panel] .route-detail-card,
#orderModal .order-card-route-map-column [data-route-details-panel] [class*="route-detail"] {
  min-height: 37px !important;
  padding: 6px 8px !important;
  border-radius: 10px !important;
}

#orderModal [data-route-map-column] [data-route-details-panel] small,
#orderModal .order-card-route-map-column [data-route-details-panel] small {
  font-size: 11.5px !important;
  line-height: 1.15 !important;
}

/* Если старые правила пытались держать детали в левой колонке — здесь их перебиваем */
#orderModal .order-card-left-column [data-route-details-panel] {
  display: none !important;
}

/* ROUTE DETAILS UNDER MAP V1 END */

/* COST UNDER DETAILS AND NO SCROLL V1 START */

/* Убираем вертикальный скролл внутри карточки */
#orderModal .modal-body,
#orderModal .order-card-body {
  overflow-y: hidden !important;
  overflow-x: hidden !important;
  padding-bottom: 64px !important;
}

/* Левая колонка теперь держит: Клиент -> Детали -> Расчёт стоимости */
#orderModal .order-card-left-column {
  gap: 8px !important;
}

/* Расчёт стоимости в левой колонке компактный */
#orderModal .order-card-left-column [data-order-cost-panel],
#orderModal .order-card-left-column .order-card-cost-panel {
  width: 100% !important;
  padding: 9px 11px !important;
  margin: 0 !important;
  border-radius: 13px !important;
}

#orderModal .order-card-left-column [data-order-cost-panel] h3,
#orderModal .order-card-left-column .order-card-cost-panel h3 {
  font-size: 15px !important;
  margin: 0 0 7px !important;
}

/* В левой колонке стоимость делаем в 3 маленьких ячейки */
#orderModal .order-card-left-column .order-cost-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 7px !important;
  margin-top: 5px !important;
}

#orderModal .order-card-left-column .order-cost-card {
  min-height: 38px !important;
  padding: 6px 7px !important;
  border-radius: 10px !important;
}

#orderModal .order-card-left-column .order-cost-card small {
  margin-bottom: 3px !important;
  font-size: 11px !important;
  line-height: 1.1 !important;
}

#orderModal .order-card-left-column .order-cost-card strong {
  font-size: 15px !important;
  line-height: 1 !important;
}

#orderModal .order-card-left-column .order-cost-hint {
  margin-top: 5px !important;
  font-size: 11.5px !important;
  line-height: 1.15 !important;
}

/* Центральная колонка теперь короче: Маршрут -> Опции */
#orderModal [data-order-route-panels] {
  gap: 8px !important;
}

/* Если блок расчёта вдруг остался в центре — скрываем только центральную копию */
#orderModal [data-order-route-panels] > [data-order-cost-panel] {
  display: none !important;
}

/* Опции заказа ещё ниже по высоте */
#orderModal .order-options-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

#orderModal .order-option-item {
  min-height: 29px !important;
  padding: 5px 7px !important;
  font-size: 12px !important;
}

/* Карта + детали маршрута справа должны помещаться без скролла */
#orderModal .order-card-route-map,
#orderModal [data-route-map] {
  height: clamp(230px, calc(100vh - 390px), 300px) !important;
  min-height: 230px !important;
  max-height: 300px !important;
}

/* Детали маршрута под картой ещё компактнее */
#orderModal [data-route-map-column] [data-route-details-panel],
#orderModal .order-card-route-map-column [data-route-details-panel] {
  padding: 8px 10px !important;
}

#orderModal [data-route-map-column] [data-route-details-panel] .route-details-grid,
#orderModal [data-route-map-column] [data-route-details-panel] [data-route-details-grid],
#orderModal .order-card-route-map-column [data-route-details-panel] .route-details-grid,
#orderModal .order-card-route-map-column [data-route-details-panel] [data-route-details-grid] {
  gap: 6px !important;
}

#orderModal [data-route-map-column] [data-route-details-panel] .route-detail-card,
#orderModal [data-route-map-column] [data-route-details-panel] [class*="route-detail"],
#orderModal .order-card-route-map-column [data-route-details-panel] .route-detail-card,
#orderModal .order-card-route-map-column [data-route-details-panel] [class*="route-detail"] {
  min-height: 35px !important;
  padding: 5px 7px !important;
}

/* Футер фиксированный, но компактный */
#orderModal .modal-actions,
#orderModal .order-card-actions {
  min-height: 56px !important;
  padding: 8px 12px !important;
}

/* COST UNDER DETAILS AND NO SCROLL V1 END */

/* HARD NO SCROLL MAP FIX V1 START */

/* Убираем внутренний скролл модалки */
#orderModal .modal-body,
#orderModal .order-card-body,
#orderModal .order-card-scroll,
#orderModal [class*="modal-body"],
#orderModal [class*="order-card-body"] {
  overflow: hidden !important;
}

/* Вся рабочая область должна помещаться в высоту экрана */
#orderModal .order-card-layout {
  align-items: start !important;
  gap: 8px !important;
}

/* Правая колонка: карта + детали маршрута */
#orderModal [data-route-map-column],
#orderModal .order-card-route-map-column {
  gap: 8px !important;
  max-height: calc(100vh - 150px) !important;
  overflow: hidden !important;
}

/* Жёстко уменьшаем карту */
#orderModal [data-route-map],
#orderModal .order-card-route-map,
#orderModal [data-route-map].leaflet-container,
#orderModal .order-card-route-map.leaflet-container {
  height: 390px !important;
  min-height: 390px !important;
  max-height: 390px !important;
}

/* Если внутри карты Leaflet создал контейнер — тоже фиксируем */
#orderModal [data-route-map] .leaflet-container,
#orderModal .order-card-route-map .leaflet-container {
  height: 390px !important;
  min-height: 390px !important;
  max-height: 390px !important;
}

/* Детали маршрута под картой — компактно */
#orderModal [data-route-map-column] [data-route-details-panel],
#orderModal .order-card-route-map-column [data-route-details-panel] {
  padding: 8px 10px !important;
  margin: 0 !important;
}

#orderModal [data-route-map-column] [data-route-details-panel] h3,
#orderModal .order-card-route-map-column [data-route-details-panel] h3 {
  margin: 0 0 6px !important;
  font-size: 14px !important;
}

#orderModal [data-route-map-column] [data-route-details-panel] .route-details-grid,
#orderModal [data-route-map-column] [data-route-details-panel] [data-route-details-grid],
#orderModal .order-card-route-map-column [data-route-details-panel] .route-details-grid,
#orderModal .order-card-route-map-column [data-route-details-panel] [data-route-details-grid] {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

#orderModal [data-route-map-column] [data-route-details-panel] .route-detail-card,
#orderModal [data-route-map-column] [data-route-details-panel] [class*="route-detail"],
#orderModal .order-card-route-map-column [data-route-details-panel] .route-detail-card,
#orderModal .order-card-route-map-column [data-route-details-panel] [class*="route-detail"] {
  min-height: 34px !important;
  padding: 5px 7px !important;
}

#orderModal [data-route-map-column] [data-route-details-panel] small,
#orderModal .order-card-route-map-column [data-route-details-panel] small {
  font-size: 11px !important;
  line-height: 1.1 !important;
}

/* Центральный блок поджимаем вверх */
#orderModal [data-order-route-panels] {
  gap: 8px !important;
}

#orderModal .order-options-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

#orderModal .order-option-item {
  min-height: 30px !important;
  padding: 5px 8px !important;
}

/* HARD NO SCROLL MAP FIX V1 END */

/* ROUTE GAP AND MAP HEIGHT FIX V1 START */

/* Убираем большой вертикальный разрыв между блоком Маршрут и Опции заказа */
#orderModal [data-order-route-workspace] {
  align-content: start !important;
  align-items: start !important;
  row-gap: 8px !important;
  column-gap: 8px !important;
  grid-auto-rows: max-content !important;
}

#orderModal .order-card-route-section {
  align-self: start !important;
  min-height: 0 !important;
  height: auto !important;
  padding-bottom: 9px !important;
  margin-bottom: 0 !important;
}

#orderModal [data-order-route-panels] {
  align-self: start !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Сжимаем внутренние отступы маршрута */
#orderModal .order-card-route-section .address-suggest-field {
  margin-bottom: 6px !important;
}

#orderModal .order-card-route-section .route-add-address-row {
  margin: 6px 0 7px !important;
}

/* Если где-то остался искусственный spacer/min-height — гасим */
#orderModal .order-card-route-section,
#orderModal .order-card-route-section > *,
#orderModal [data-order-route-panels],
#orderModal [data-order-route-panels] > * {
  max-height: none !important;
}

/* Ещё уменьшаем карту по высоте */
#orderModal [data-route-map],
#orderModal .order-card-route-map,
#orderModal [data-route-map].leaflet-container,
#orderModal .order-card-route-map.leaflet-container {
  height: 335px !important;
  min-height: 335px !important;
  max-height: 335px !important;
}

#orderModal [data-route-map] .leaflet-container,
#orderModal .order-card-route-map .leaflet-container {
  height: 335px !important;
  min-height: 335px !important;
  max-height: 335px !important;
}

/* Правая колонка после уменьшения карты */
#orderModal [data-route-map-column],
#orderModal .order-card-route-map-column {
  gap: 7px !important;
}

/* ROUTE GAP AND MAP HEIGHT FIX V1 END */

/* ROUTE MAIN COLUMN AND COMPACT OPTIONS V1 START */

/* Рабочая зона: центральная колонка + правая колонка карты */
#orderModal [data-order-route-workspace] {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.56fr) !important;
  grid-template-areas: none !important;
  grid-template-rows: none !important;
  grid-auto-rows: unset !important;
  align-items: start !important;
  align-content: start !important;
  gap: 8px !important;
}

/* Центральная колонка: Маршрут -> Опции заказа */
#orderModal [data-order-route-main-column] {
  display: flex !important;
  flex-direction: column !important;
  gap: 7px !important;
  min-width: 0 !important;
  width: 100% !important;
}

/* Сбрасываем старые grid-area, которые создавали большой вертикальный зазор */
#orderModal .order-card-route-section,
#orderModal [data-order-route-panels],
#orderModal [data-route-map-column],
#orderModal .order-card-route-map-column {
  grid-area: auto !important;
}

#orderModal .order-card-route-section {
  margin: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 9px 11px !important;
}

#orderModal [data-order-route-panels] {
  margin: 0 !important;
  padding: 0 !important;
  gap: 7px !important;
}

/* Ужимаем расстояния внутри блока Маршрут */
#orderModal .order-card-route-section h3 {
  margin-bottom: 6px !important;
}

#orderModal .order-card-route-section .address-suggest-field {
  margin-bottom: 5px !important;
}

#orderModal .order-card-route-section .route-add-address-row {
  margin: 5px 0 6px !important;
}

/* Опции заказа ниже по высоте */
#orderModal .order-card-order-options-panel {
  padding: 9px 11px !important;
}

#orderModal .order-card-order-options-panel h3 {
  margin-bottom: 6px !important;
}

#orderModal .order-options-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 5px !important;
  margin-top: 4px !important;
}

#orderModal .order-option-item {
  min-height: 26px !important;
  height: 26px !important;
  padding: 3px 7px !important;
  border-radius: 9px !important;
  font-size: 11.5px !important;
  line-height: 1 !important;
  gap: 6px !important;
}

#orderModal .order-option-item input {
  width: 13px !important;
  height: 13px !important;
  flex: 0 0 auto !important;
}

#orderModal .order-option-item span {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#orderModal .order-options-hint {
  margin-top: 5px !important;
  font-size: 11px !important;
  line-height: 1.1 !important;
}

/* Карта немного ниже */
#orderModal [data-route-map],
#orderModal .order-card-route-map,
#orderModal [data-route-map].leaflet-container,
#orderModal .order-card-route-map.leaflet-container {
  height: 315px !important;
  min-height: 315px !important;
  max-height: 315px !important;
}

#orderModal [data-route-map] .leaflet-container,
#orderModal .order-card-route-map .leaflet-container {
  height: 315px !important;
  min-height: 315px !important;
  max-height: 315px !important;
}

/* ROUTE MAIN COLUMN AND COMPACT OPTIONS V1 END */

/* PRELIMINARY ORDER UI V1 START */

#orderModal .order-card-preliminary-panel {
  padding: 7px 10px !important;
  border-radius: 13px !important;
}

#orderModal .preliminary-order-toggle {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  color: #12315f !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
}

#orderModal .preliminary-order-toggle input {
  width: 14px !important;
  height: 14px !important;
  margin: 0 !important;
  accent-color: #1d4ed8 !important;
  flex: 0 0 auto !important;
}

#orderModal .preliminary-order-toggle strong {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 22px !important;
  padding: 3px 8px !important;
  border-radius: 999px !important;
  background: #1d4ed8 !important;
  color: #ffffff !important;
  font-size: 11px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

#orderModal .preliminary-order-mini-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10030 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(15, 23, 42, 0.24) !important;
  padding: 16px !important;
}

#orderModal .preliminary-order-mini-modal[hidden] {
  display: none !important;
}

#orderModal .preliminary-order-mini-card {
  width: min(360px, calc(100vw - 32px)) !important;
  padding: 14px !important;
  border: 1px solid #b8d2ff !important;
  border-radius: 18px !important;
  background: #ffffff !important;
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.25) !important;
}

#orderModal .preliminary-order-mini-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-bottom: 12px !important;
}

#orderModal .preliminary-order-mini-header strong {
  color: #12315f !important;
  font-size: 15px !important;
}

#orderModal .preliminary-order-mini-close {
  width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: #eff6ff !important;
  color: #0f172a !important;
  font-size: 20px !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

#orderModal .preliminary-order-mini-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
}

#orderModal .preliminary-order-mini-grid label {
  display: grid !important;
  gap: 5px !important;
  color: #12315f !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

#orderModal .preliminary-order-mini-grid input {
  height: 36px !important;
  min-height: 36px !important;
  padding: 7px 9px !important;
  border: 1px solid #b8d2ff !important;
  border-radius: 11px !important;
  font-size: 13px !important;
}

#orderModal .preliminary-order-error {
  display: block !important;
  margin-top: 8px !important;
  color: #b91c1c !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

#orderModal .preliminary-order-error[hidden] {
  display: none !important;
}

#orderModal .preliminary-order-mini-actions {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  margin-top: 12px !important;
}

#orderModal .preliminary-order-mini-actions button {
  min-height: 32px !important;
  padding: 6px 13px !important;
  border-radius: 11px !important;
  font-size: 12px !important;
}

/* PRELIMINARY ORDER UI V1 END */

/* PRELIMINARY ORDER RUNTIME V3 START */

#orderModal [data-preliminary-runtime-panel] {
  display: block !important;
  padding: 7px 10px !important;
  border-radius: 13px !important;
}

#orderModal .preliminary-runtime-toggle {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  cursor: pointer !important;
  color: #12315f !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

#orderModal .preliminary-runtime-toggle input {
  width: 14px !important;
  height: 14px !important;
  margin: 0 !important;
  accent-color: #1d4ed8 !important;
  flex: 0 0 auto !important;
}

#orderModal .preliminary-runtime-summary {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 21px !important;
  padding: 3px 8px !important;
  border-radius: 999px !important;
  background: #1d4ed8 !important;
  color: #ffffff !important;
  font-size: 11px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

#orderModal .preliminary-runtime-summary[hidden] {
  display: none !important;
}

#preliminaryRuntimeModalV3 {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10080 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(15, 23, 42, 0.26) !important;
  padding: 16px !important;
}

#preliminaryRuntimeModalV3[hidden] {
  display: none !important;
}

#preliminaryRuntimeModalV3 .preliminary-runtime-card {
  width: min(360px, calc(100vw - 32px)) !important;
  padding: 14px !important;
  border: 1px solid #b8d2ff !important;
  border-radius: 18px !important;
  background: #ffffff !important;
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.25) !important;
}

#preliminaryRuntimeModalV3 .preliminary-runtime-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-bottom: 12px !important;
}

#preliminaryRuntimeModalV3 .preliminary-runtime-header strong {
  color: #12315f !important;
  font-size: 15px !important;
}

#preliminaryRuntimeModalV3 .preliminary-runtime-close {
  width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: #eff6ff !important;
  color: #0f172a !important;
  font-size: 20px !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

#preliminaryRuntimeModalV3 .preliminary-runtime-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
}

#preliminaryRuntimeModalV3 .preliminary-runtime-grid label {
  display: grid !important;
  gap: 5px !important;
  color: #12315f !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

#preliminaryRuntimeModalV3 input[type="date"],
#preliminaryRuntimeModalV3 input[type="time"] {
  height: 36px !important;
  min-height: 36px !important;
  padding: 7px 9px !important;
  border: 1px solid #b8d2ff !important;
  border-radius: 11px !important;
  font-size: 13px !important;
}

#preliminaryRuntimeModalV3 .preliminary-runtime-error {
  display: block !important;
  margin-top: 8px !important;
  color: #b91c1c !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

#preliminaryRuntimeModalV3 .preliminary-runtime-error[hidden] {
  display: none !important;
}

#preliminaryRuntimeModalV3 .preliminary-runtime-actions {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  margin-top: 12px !important;
}

#preliminaryRuntimeModalV3 .preliminary-runtime-actions button {
  min-height: 32px !important;
  padding: 6px 13px !important;
  border-radius: 11px !important;
  font-size: 12px !important;
}

/* PRELIMINARY ORDER RUNTIME V3 END */

/* CHECKBOX FOCUS UI FIX V1 START */

/* Убираем некрасивую системную рамку вокруг чекбоксов в карточке заказа */
#orderModal .order-option-item input[type="checkbox"],
#orderModal .preliminary-runtime-toggle input[type="checkbox"],
#orderModal .preliminary-order-toggle input[type="checkbox"] {
  outline: none !important;
  box-shadow: none !important;
}

/* Убираем рамку, если браузер подсвечивает label через focus-within */
#orderModal .order-option-item:focus,
#orderModal .order-option-item:focus-visible,
#orderModal .order-option-item:focus-within,
#orderModal .preliminary-runtime-toggle:focus,
#orderModal .preliminary-runtime-toggle:focus-visible,
#orderModal .preliminary-runtime-toggle:focus-within,
#orderModal .preliminary-order-toggle:focus,
#orderModal .preliminary-order-toggle:focus-visible,
#orderModal .preliminary-order-toggle:focus-within {
  outline: none !important;
  box-shadow: none !important;
}

/* Выбранный чекбокс оставляем аккуратным */
#orderModal .order-option-item input[type="checkbox"]:checked,
#orderModal .preliminary-runtime-toggle input[type="checkbox"]:checked,
#orderModal .preliminary-order-toggle input[type="checkbox"]:checked {
  accent-color: #1d4ed8 !important;
}

/* CHECKBOX FOCUS UI FIX V1 END */

/* ORDER SETTINGS PAGE V1 START */

.order-settings-form {
  display: grid;
  gap: 16px;
}

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

.settings-grid label,
.settings-full-row,
.tenant-order-option-row label {
  display: grid;
  gap: 6px;
  color: #12315f;
  font-weight: 800;
}

.settings-checkbox-row {
  display: flex !important;
  align-items: center;
  gap: 8px;
  align-self: end;
  min-height: 42px;
}

.settings-checkbox-row input {
  width: 16px;
  height: 16px;
}

.tenant-order-options-list {
  display: grid;
  gap: 10px;
}

.tenant-order-option-row {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(220px, 1fr) minmax(160px, 0.45fr);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #bfd7ff;
  border-radius: 14px;
  background: rgba(248, 251, 255, 0.92);
}

.tenant-order-option-row small {
  color: #52688d;
}

.settings-actions {
  justify-content: flex-end;
}

.success-message {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #dcfce7;
  color: #166534;
  font-weight: 800;
}

.error-message {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 800;
}

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

  .tenant-order-option-row {
    grid-template-columns: 1fr;
  }
}

/* ORDER SETTINGS PAGE V1 END */

/* COMPACT ORDER SETTINGS UI V1 START */

.order-settings-page {
  min-height: 100vh;
  padding: 22px;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 34%),
    linear-gradient(135deg, #eef5ff 0%, #f8fbff 100%);
}

.order-settings-page-card {
  width: min(1180px, calc(100vw - 44px));
  margin: 0 auto;
  padding: 20px;
  border: 1px solid #bdd4fb;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.10);
}

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

.order-settings-page h1 {
  margin: 0 0 5px;
  color: #12315f;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 900;
}

.order-settings-page h2 {
  margin: 0 0 12px;
  color: #12315f;
  font-size: 20px;
  line-height: 1.15;
  font-weight: 900;
}

.order-settings-page .muted {
  margin: 0;
  color: #52688d;
  font-size: 13px;
}

.order-settings-page .order-card-section {
  padding: 16px;
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.05);
}

.order-settings-form {
  gap: 14px;
}

.order-settings-page .settings-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.order-settings-page .settings-grid label,
.order-settings-page .settings-full-row,
.order-settings-page .tenant-order-option-row label {
  gap: 5px;
  color: #12315f;
  font-size: 13px;
  line-height: 1.15;
  font-weight: 800;
}

.order-settings-page input,
.order-settings-page select,
.order-settings-page textarea {
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #bdd4fb;
  border-radius: 11px;
  color: #12315f;
  background: #ffffff;
  font-size: 13px;
  line-height: 1.2;
  box-sizing: border-box;
}

.order-settings-page textarea {
  min-height: 62px;
  resize: vertical;
}

.order-settings-page input[type="checkbox"] {
  width: 15px;
  height: 15px;
  min-height: 15px;
  padding: 0;
  accent-color: #1d4ed8;
}

.order-settings-page .settings-checkbox-row {
  min-height: 34px;
  gap: 8px;
}

.order-settings-page .tenant-order-options-list {
  gap: 8px;
}

.order-settings-page .tenant-order-option-row {
  grid-template-columns: 220px 1fr 160px;
  gap: 12px;
  min-height: 54px;
  padding: 9px 12px;
  border-radius: 14px;
}

.order-settings-page .tenant-order-option-row small {
  color: #52688d;
  font-size: 12px;
  line-height: 1.25;
}

.order-settings-page .modal-actions.settings-actions {
  margin-top: 4px;
  padding-top: 8px;
}

.order-settings-page .modal-actions.settings-actions a,
.order-settings-page .modal-actions.settings-actions button,
.order-settings-page .ghost-button,
.order-settings-page .primary-button {
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 900;
}

.order-settings-page .success-message,
.order-settings-page .error-message {
  margin: 10px 0;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 13px;
}

@media (max-width: 1100px) {
  .order-settings-page .settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order-settings-page .tenant-order-option-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .order-settings-page {
    padding: 10px;
  }

  .order-settings-page-card {
    width: calc(100vw - 20px);
    padding: 12px;
    border-radius: 18px;
  }

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

  .order-settings-page .settings-grid {
    grid-template-columns: 1fr;
  }
}

/* COMPACT ORDER SETTINGS UI V1 END */

/* DYNAMIC ORDER OPTIONS SETTINGS V1 START */

.order-settings-page .tenant-order-options-section {
  display: grid;
  gap: 12px;
}

.order-settings-page .tenant-order-options-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.order-settings-page .tenant-order-options-header h2 {
  margin-bottom: 4px;
}

.order-settings-page .tenant-order-option-add-button {
  white-space: nowrap;
}

.order-settings-page .tenant-order-options-empty {
  padding: 16px;
  border: 1px dashed #9fc2ff;
  border-radius: 14px;
  background: rgba(239, 246, 255, 0.72);
  color: #52688d;
  font-size: 13px;
  font-weight: 800;
}

.order-settings-page .tenant-order-option-row {
  grid-template-columns: 1fr auto;
  min-height: 58px;
}

.order-settings-page .tenant-order-option-main {
  display: grid;
  gap: 3px;
}

.order-settings-page .tenant-order-option-main strong {
  color: #12315f;
  font-size: 14px;
  font-weight: 900;
}

.order-settings-page .tenant-order-option-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.order-settings-page .tenant-order-option-actions form {
  margin: 0;
}

.order-settings-page .danger-button {
  color: #991b1b !important;
  border-color: #fecaca !important;
  background: #fff7f7 !important;
}

.order-option-settings-modal {
  position: fixed;
  inset: 0;
  z-index: 10090;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.32);
}

.order-option-settings-modal[hidden] {
  display: none;
}

.order-option-settings-card {
  width: min(460px, calc(100vw - 36px));
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #bdd4fb;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
}

.order-option-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.order-option-settings-header strong {
  color: #12315f;
  font-size: 17px;
  font-weight: 900;
}

.order-option-settings-close {
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #eff6ff;
  color: #0f172a;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.order-option-settings-card label {
  display: grid;
  gap: 6px;
  color: #12315f;
  font-size: 13px;
  font-weight: 800;
}

.order-option-settings-card input,
.order-option-settings-card select {
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid #bdd4fb;
  border-radius: 12px;
  color: #12315f;
  font-size: 13px;
  box-sizing: border-box;
}

.order-option-settings-grid {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 10px;
}

@media (max-width: 720px) {
  .order-settings-page .tenant-order-options-header {
    flex-direction: column;
  }

  .order-settings-page .tenant-order-option-row {
    grid-template-columns: 1fr;
  }

  .order-settings-page .tenant-order-option-actions {
    justify-content: flex-start;
  }

  .order-option-settings-grid {
    grid-template-columns: 1fr;
  }
}

/* DYNAMIC ORDER OPTIONS SETTINGS V1 END */

/* ORDER CARD OPTIONS FROM SETTINGS V1 START */

#orderModal .order-options-empty {
  padding: 10px 12px !important;
  border: 1px dashed #9fc2ff !important;
  border-radius: 13px !important;
  background: rgba(239, 246, 255, 0.72) !important;
  color: #52688d !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

#orderModal .order-options-note {
  display: block !important;
  margin-top: 7px !important;
  color: #52688d !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
}

/* ORDER CARD OPTIONS FROM SETTINGS V1 END */

/* OPTION SETTINGS MODAL UI FIX V1 START */

.order-option-settings-modal {
  padding: 20px !important;
  background: rgba(15, 23, 42, 0.38) !important;
  backdrop-filter: blur(2px);
}

.order-option-settings-card {
  width: min(520px, calc(100vw - 40px)) !important;
  max-width: 520px !important;
  padding: 18px !important;
  gap: 14px !important;
  border-radius: 20px !important;
  overflow: hidden !important;
}

.order-option-settings-header {
  margin-bottom: 2px !important;
}

.order-option-settings-header strong {
  font-size: 20px !important;
  line-height: 1.15 !important;
}

.order-option-settings-close {
  flex: 0 0 auto !important;
  width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  border-radius: 13px !important;
  font-size: 22px !important;
}

.order-option-settings-card label {
  min-width: 0 !important;
  gap: 7px !important;
  font-size: 13px !important;
}

.order-option-settings-card input,
.order-option-settings-card select {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 9px 12px !important;
  border-radius: 13px !important;
  font-size: 14px !important;
  box-sizing: border-box !important;
}

.order-option-settings-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 150px) !important;
  gap: 12px !important;
  align-items: end !important;
}

.order-option-settings-card .modal-actions.settings-actions {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  margin-top: 2px !important;
  padding-top: 0 !important;
}

.order-option-settings-card .modal-actions.settings-actions button {
  min-width: 126px !important;
  min-height: 42px !important;
  border-radius: 14px !important;
  font-size: 14px !important;
}

@media (max-width: 560px) {
  .order-option-settings-grid {
    grid-template-columns: 1fr !important;
  }

  .order-option-settings-card .modal-actions.settings-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
  }

  .order-option-settings-card .modal-actions.settings-actions button {
    min-width: 0 !important;
    width: 100% !important;
  }
}

/* OPTION SETTINGS MODAL UI FIX V1 END */

/* TARIFF LIST SETTINGS UI V1 START */

.order-settings-page .tenant-order-tariffs-section {
  display: grid;
  gap: 12px;
}

.order-settings-page .tenant-order-tariffs-list {
  display: grid;
  gap: 8px;
}

.order-settings-page .tenant-order-tariff-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid #bfd7ff;
  border-radius: 14px;
  background: rgba(248, 251, 255, 0.92);
}

.order-settings-page .tenant-order-tariff-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.order-settings-page .tenant-order-tariff-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.order-settings-page .tenant-order-tariff-title-row strong {
  color: #12315f;
  font-size: 14px;
  font-weight: 900;
}

.order-settings-page .tariff-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
}

.order-settings-page .tariff-status-badge.is-enabled {
  background: #dcfce7;
  color: #166534;
}

.order-settings-page .tariff-status-badge.is-disabled {
  background: #fee2e2;
  color: #991b1b;
}

.order-settings-page .tenant-order-tariff-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #52688d;
  font-size: 12px;
  line-height: 1.25;
}

.order-settings-page .tenant-order-tariff-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef6ff;
}

.order-tariff-settings-modal {
  position: fixed;
  inset: 0;
  z-index: 10095;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(2px);
}

.order-tariff-settings-modal[hidden] {
  display: none;
}

.order-tariff-settings-card {
  width: min(860px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #bdd4fb;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
}

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

.order-tariff-settings-card label,
.tariff-days-box {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #12315f;
  font-size: 13px;
  font-weight: 800;
}

.order-tariff-settings-card input,
.order-tariff-settings-card select,
.order-tariff-settings-card textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #bdd4fb;
  border-radius: 12px;
  color: #12315f;
  font-size: 13px;
  box-sizing: border-box;
}

.order-tariff-settings-card textarea {
  min-height: 58px;
  resize: vertical;
}

.order-tariff-settings-card input[type="checkbox"] {
  width: 15px;
  height: 15px;
  min-height: 15px;
  padding: 0;
  accent-color: #1d4ed8;
}

.tariff-field-wide {
  grid-column: span 2;
}

.tariff-enabled-row {
  align-self: end;
}

.tariff-days-box {
  padding: 10px;
  border: 1px solid #d7e7ff;
  border-radius: 14px;
  background: #f8fbff;
}

.tariff-days-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tariff-days-grid label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #bdd4fb;
  border-radius: 999px;
  background: #ffffff;
  font-size: 12px;
  cursor: pointer;
}

.tariff-notes-field {
  grid-column: 1 / -1;
}

.order-tariff-settings-card .modal-actions.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 0;
  margin-top: 0;
}

.order-tariff-settings-card .modal-actions.settings-actions button {
  min-width: 132px;
  min-height: 40px;
  border-radius: 14px;
  font-size: 13px;
}

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

  .order-settings-page .tenant-order-tariff-row {
    grid-template-columns: 1fr;
  }

  .order-settings-page .tenant-order-option-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .tariff-modal-grid {
    grid-template-columns: 1fr;
  }

  .tariff-field-wide {
    grid-column: span 1;
  }

  .order-tariff-settings-card .modal-actions.settings-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .order-tariff-settings-card .modal-actions.settings-actions button {
    min-width: 0;
    width: 100%;
  }
}

/* TARIFF LIST SETTINGS UI V1 END */

/* BASE EXCEPTION TARIFF UI V1 START */

.order-settings-page .tenant-order-base-tariff-section,
.order-settings-page .tenant-order-tariffs-section {
  display: grid;
  gap: 12px;
}

.order-settings-page .tenant-order-tariffs-list {
  display: grid;
  gap: 8px;
}

.order-settings-page .tenant-order-tariff-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid #bfd7ff;
  border-radius: 14px;
  background: rgba(248, 251, 255, 0.92);
}

.order-settings-page .tenant-order-tariff-row.is-base-tariff {
  border-color: #93c5fd;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.96));
}

.order-settings-page .tenant-order-tariff-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.order-settings-page .tenant-order-tariff-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.order-settings-page .tenant-order-tariff-title-row strong {
  color: #12315f;
  font-size: 14px;
  font-weight: 900;
}

.order-settings-page .tariff-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
}

.order-settings-page .tariff-status-badge.is-base {
  background: #dbeafe;
  color: #1d4ed8;
}

.order-settings-page .tariff-status-badge.is-enabled {
  background: #dcfce7;
  color: #166534;
}

.order-settings-page .tariff-status-badge.is-disabled {
  background: #fee2e2;
  color: #991b1b;
}

.order-settings-page .tenant-order-tariff-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #52688d;
  font-size: 12px;
  line-height: 1.25;
}

.order-settings-page .tenant-order-tariff-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef6ff;
}

.order-tariff-settings-modal {
  position: fixed;
  inset: 0;
  z-index: 10095;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(2px);
}

.order-tariff-settings-modal[hidden] {
  display: none;
}

.order-tariff-settings-card {
  width: min(820px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #bdd4fb;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
}

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

.order-tariff-settings-card label,
.tariff-days-box {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #12315f;
  font-size: 13px;
  font-weight: 800;
}

.order-tariff-settings-card input,
.order-tariff-settings-card select,
.order-tariff-settings-card textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #bdd4fb;
  border-radius: 12px;
  color: #12315f;
  font-size: 13px;
  box-sizing: border-box;
}

.order-tariff-settings-card textarea {
  min-height: 58px;
  resize: vertical;
}

.order-tariff-settings-card input[type="checkbox"] {
  width: 15px;
  height: 15px;
  min-height: 15px;
  padding: 0;
  accent-color: #1d4ed8;
}

.tariff-field-wide {
  grid-column: span 2;
}

.tariff-enabled-row {
  align-self: end;
}

.tariff-days-box {
  padding: 10px;
  border: 1px solid #d7e7ff;
  border-radius: 14px;
  background: #f8fbff;
}

.tariff-days-box[hidden],
[data-tariff-time-field][hidden],
[data-tariff-enabled-row][hidden] {
  display: none !important;
}

.tariff-days-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tariff-days-grid label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #bdd4fb;
  border-radius: 999px;
  background: #ffffff;
  font-size: 12px;
  cursor: pointer;
}

.tariff-notes-field {
  grid-column: 1 / -1;
}

.order-tariff-settings-card .modal-actions.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 0;
  margin-top: 0;
}

.order-tariff-settings-card .modal-actions.settings-actions button {
  min-width: 132px;
  min-height: 40px;
  border-radius: 14px;
  font-size: 13px;
}

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

  .order-settings-page .tenant-order-tariff-row {
    grid-template-columns: 1fr;
  }

  .order-settings-page .tenant-order-option-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .tariff-modal-grid {
    grid-template-columns: 1fr;
  }

  .tariff-field-wide {
    grid-column: span 1;
  }

  .order-tariff-settings-card .modal-actions.settings-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .order-tariff-settings-card .modal-actions.settings-actions button {
    min-width: 0;
    width: 100%;
  }
}

/* BASE EXCEPTION TARIFF UI V1 END */

/* WEATHER SURCHARGE SETTINGS UI V1 START */

.order-settings-page .tenant-order-weather-section {
  display: grid;
  gap: 12px;
}

.order-settings-page .weather-enabled-toggle {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid #bdd4fb;
  border-radius: 999px;
  background: #f8fbff;
  white-space: nowrap;
}

.order-settings-page .weather-settings-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: #52688d;
  font-size: 12px;
  line-height: 1.25;
}

.order-settings-page .weather-settings-summary span:not(.tariff-status-badge) {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef6ff;
}

.order-settings-page .tenant-order-weather-actions {
  display: flex;
  justify-content: flex-start;
}

.order-weather-settings-modal {
  position: fixed;
  inset: 0;
  z-index: 10100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(2px);
}

.order-weather-settings-modal[hidden] {
  display: none;
}

.order-weather-settings-card {
  width: min(760px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #bdd4fb;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
}

.weather-settings-top-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 12px;
  align-items: end;
}

.order-weather-settings-card label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #12315f;
  font-size: 13px;
  font-weight: 800;
}

.order-weather-settings-card input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #bdd4fb;
  border-radius: 12px;
  color: #12315f;
  font-size: 13px;
  box-sizing: border-box;
}

.order-weather-settings-card input[type="checkbox"] {
  width: 15px;
  height: 15px;
  min-height: 15px;
  padding: 0;
  accent-color: #1d4ed8;
}

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

.weather-factor-row {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) 130px 150px;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid #d7e7ff;
  border-radius: 14px;
  background: #f8fbff;
}

.weather-factor-fixed {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border: 1px dashed #bdd4fb;
  border-radius: 12px;
  color: #52688d;
  font-size: 13px;
  font-weight: 800;
  background: #ffffff;
  box-sizing: border-box;
}

.weather-settings-note {
  color: #52688d;
  font-size: 12px;
  line-height: 1.35;
}

.order-weather-settings-card .modal-actions.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 0;
  margin-top: 0;
}

.order-weather-settings-card .modal-actions.settings-actions button {
  min-width: 128px;
  min-height: 40px;
  border-radius: 14px;
  font-size: 13px;
}

@media (max-width: 760px) {
  .weather-settings-top-row,
  .weather-factor-row {
    grid-template-columns: 1fr;
  }

  .order-weather-settings-card .modal-actions.settings-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .order-weather-settings-card .modal-actions.settings-actions button {
    width: 100%;
    min-width: 0;
  }
}

/* WEATHER SURCHARGE SETTINGS UI V1 END */

/* WEATHER RUNTIME UI V1 START */

.order-settings-page .weather-runtime-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: #12315f;
  font-size: 12px;
  line-height: 1.25;
}

.order-settings-page .weather-runtime-summary span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e0f2fe;
}

.order-settings-page .tenant-order-weather-actions {
  gap: 8px;
  flex-wrap: wrap;
}

.order-settings-page .tenant-order-weather-actions form {
  margin: 0;
}

/* WEATHER RUNTIME UI V1 END */

/* ORDER FARE CALCULATION UI V1 START */

#orderModal .order-card-cost-panel.is-loading {
  opacity: 0.78;
}

#orderModal .order-card-cost-panel.is-ready {
  border-color: rgba(34, 197, 94, 0.36) !important;
}

#orderModal .order-card-cost-panel.is-error {
  border-color: rgba(239, 68, 68, 0.42) !important;
}

#orderModal .order-cost-card.is-total {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
}

#orderModal .order-cost-card.is-total strong {
  color: #1d4ed8 !important;
  font-size: 15px !important;
}

/* ORDER FARE CALCULATION UI V1 END */

/* WEATHER CHECK ERROR UI V1 START */

.order-settings-page .weather-check-error {
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 14px;
  background: #fff7f7;
  color: #991b1b;
  font-size: 13px;
  font-weight: 800;
}

/* WEATHER CHECK ERROR UI V1 END */

/* FARE ROUNDING SETTINGS UI V1 START */

.order-settings-page .tenant-order-fare-rounding-section {
  display: grid;
  gap: 10px;
}

.order-settings-page .fare-rounding-form {
  display: grid;
  grid-template-columns: minmax(260px, 360px) auto;
  gap: 12px;
  align-items: end;
  margin: 0;
}

.order-settings-page .fare-rounding-form label {
  display: grid;
  gap: 6px;
  color: #12315f;
  font-size: 13px;
  font-weight: 800;
}

.order-settings-page .fare-rounding-form select {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #bdd4fb;
  border-radius: 12px;
  color: #12315f;
  background: #ffffff;
  font-size: 13px;
  box-sizing: border-box;
}

.order-settings-page .fare-rounding-note {
  color: #52688d;
  font-size: 12px;
  line-height: 1.35;
}

@media (max-width: 640px) {
  .order-settings-page .fare-rounding-form {
    grid-template-columns: 1fr;
  }
}

/* FARE ROUNDING SETTINGS UI V1 END */

/* ORDER LIST STATUS SELECT UI V1 START */

.order-list-status-form {
  margin: 0;
}

.order-list-status-select {
  width: 100%;
  min-width: 128px;
  min-height: 32px;
  padding: 5px 28px 5px 10px;
  border: 1px solid #bdd4fb;
  border-radius: 999px;
  background: #ffffff;
  color: #12315f;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.order-list-status-select.status-new {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.order-list-status-select.status-preorder {
  border-color: #c4b5fd;
  background: #f5f3ff;
  color: #6d28d9;
}

.order-list-status-select.status-in_work {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.order-list-status-select.status-done {
  border-color: #d1d5db;
  background: #f9fafb;
  color: #374151;
}

.order-list-status-select.status-cancelled {
  border-color: #fecaca;
  background: #fff7f7;
  color: #991b1b;
}

/* ORDER LIST STATUS SELECT UI V1 END */

/* PRELIMINARY_NEW STATUS LABEL UI FIX START */

.order-list-status-select.status-preliminary_new {
  border-color: #c4b5fd;
  background: #f5f3ff;
  color: #6d28d9;
}

/* PRELIMINARY_NEW STATUS LABEL UI FIX END */

/* PREORDER STATUS UI FINAL START */

.order-list-status-select.status-preorder {
  border-color: #c4b5fd;
  background: #f5f3ff;
  color: #6d28d9;
}

/* PREORDER STATUS UI FINAL END */

/* ORDER STATUSES AND ARCHIVE UI V1 START */

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

.orders-count-badge {
  display: inline-flex;
  min-width: 32px;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #bdd4fb;
  background: #eff6ff;
  color: #12315f;
  font-weight: 900;
}

.orders-data-table .order-list-row,
.data-table .order-list-row {
  transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.orders-data-table .order-list-row:hover,
.data-table .order-list-row:hover {
  box-shadow: inset 4px 0 0 rgba(37, 99, 235, 0.24);
}

.order-status-row-new {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.08), rgba(255, 255, 255, 0.98));
}

.order-status-row-preorder {
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.10), rgba(255, 255, 255, 0.98));
}

.order-status-row-car_found {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.10), rgba(255, 255, 255, 0.98));
}

.order-status-row-car_arrived {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.13), rgba(255, 255, 255, 0.98));
}

.order-status-row-in_progress {
  background: linear-gradient(90deg, rgba(249, 115, 22, 0.13), rgba(255, 255, 255, 0.98));
}

.order-status-row-done {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.10), rgba(255, 255, 255, 0.98));
}

.order-status-row-cancelled {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.10), rgba(255, 255, 255, 0.98));
}

.order-list-status-select.status-new {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.order-list-status-select.status-preorder {
  border-color: #c4b5fd;
  background: #f5f3ff;
  color: #6d28d9;
}

.order-list-status-select.status-car_found {
  border-color: #7dd3fc;
  background: #f0f9ff;
  color: #0369a1;
}

.order-list-status-select.status-car_arrived {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}

.order-list-status-select.status-in_progress {
  border-color: #fdba74;
  background: #fff7ed;
  color: #9a3412;
}

.order-list-status-select.status-done {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.order-list-status-select.status-cancelled {
  border-color: #fecaca;
  background: #fff7f7;
  color: #991b1b;
}

.orders-archive-filter-section {
  margin-top: 14px;
}

.orders-archive-filter-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
}

.orders-archive-filter-form label {
  display: grid;
  gap: 5px;
  color: #12315f;
  font-size: 12px;
  font-weight: 900;
}

.orders-archive-filter-form input,
.orders-archive-filter-form select {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid #bdd4fb;
  border-radius: 12px;
  background: #ffffff;
  color: #12315f;
  font-size: 13px;
  box-sizing: border-box;
}

.orders-archive-filter-actions {
  display: flex;
  align-items: end;
}

@media (max-width: 1200px) {
  .orders-archive-filter-form {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
}

@media (max-width: 760px) {
  .orders-archive-filter-form {
    grid-template-columns: 1fr;
  }
}

/* ORDER STATUSES AND ARCHIVE UI V1 END */

/* COMPACT ORDERS ARCHIVE UI V1 START */

.orders-archive-page {
  height: calc(100vh - 48px);
  min-height: 720px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  padding-top: 18px !important;
  padding-bottom: 16px !important;
}

.orders-archive-page .orders-archive-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  margin: 0;
  padding: 0 0 8px;
  align-items: center;
  border-bottom: 1px solid rgba(147, 197, 253, 0.42);
  background: linear-gradient(90deg, rgba(255,255,255,0.96), rgba(248,251,255,0.92));
}

.orders-archive-page .orders-archive-topbar-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.orders-archive-page .orders-archive-topbar-title .badge {
  font-size: 13px;
  padding: 7px 12px;
}

.orders-archive-page .header-actions-row {
  gap: 8px;
}

.orders-archive-page .header-actions-row .ghost-link,
.orders-archive-page .header-actions-row .ghost-button {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 13px;
}

.orders-archive-page .orders-archive-filter-section {
  position: sticky;
  top: 48px;
  z-index: 35;
  margin: 0;
  padding: 12px 14px !important;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

.orders-archive-page .orders-archive-filter-section .section-title-row {
  margin-bottom: 8px;
}

.orders-archive-page .orders-archive-filter-section .section-title-row h2 {
  font-size: 19px;
  line-height: 1.1;
}

.orders-archive-page .orders-archive-filter-section .mini-button {
  min-height: 30px;
  padding: 5px 11px;
  font-size: 12px;
}

.orders-archive-page .orders-archive-filter-form {
  grid-template-columns: 1fr 1fr 1.1fr 1.1fr 1.1fr 1fr 1.3fr 0.8fr 0.8fr auto;
  gap: 7px;
  align-items: end;
}

.orders-archive-page .orders-archive-filter-form label {
  gap: 4px;
  font-size: 11px;
  line-height: 1.1;
}

.orders-archive-page .orders-archive-filter-form input,
.orders-archive-page .orders-archive-filter-form select {
  min-height: 31px;
  padding: 5px 8px;
  border-radius: 10px;
  font-size: 12px;
}

.orders-archive-page .orders-archive-filter-actions .primary-button {
  min-height: 31px;
  padding: 5px 16px;
  border-radius: 10px;
  font-size: 13px;
}

.orders-archive-page .orders-archive-filter-section > small.muted {
  display: none;
}

.orders-archive-page .orders-archive-list-section {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 14px !important;
  overflow: hidden;
}

.orders-archive-page .orders-archive-list-section .section-title-row {
  flex: 0 0 auto;
  margin-bottom: 10px;
}

.orders-archive-page .orders-archive-list-section .section-title-row h2 {
  font-size: 20px;
}

.orders-archive-page .orders-archive-list-section .table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
  border-radius: 16px;
}

.orders-archive-page .orders-archive-list-section .data-table {
  min-width: 1280px;
}

.orders-archive-page .orders-archive-list-section .data-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #eaf3ff;
  box-shadow: 0 1px 0 rgba(147, 197, 253, 0.75);
}

.orders-archive-page .orders-archive-list-section .data-table td,
.orders-archive-page .orders-archive-list-section .data-table th {
  padding-top: 8px;
  padding-bottom: 8px;
}

@media (max-width: 1400px) {
  .orders-archive-page .orders-archive-filter-form {
    grid-template-columns: repeat(5, minmax(130px, 1fr));
  }
}

@media (max-width: 900px) {
  .orders-archive-page {
    height: auto;
    overflow: visible;
  }

  .orders-archive-page .orders-archive-filter-section,
  .orders-archive-page .orders-archive-topbar {
    position: static;
  }

  .orders-archive-page .orders-archive-filter-form {
    grid-template-columns: 1fr;
  }

  .orders-archive-page .orders-archive-list-section .table-wrap {
    max-height: 70vh;
  }
}

/* COMPACT ORDERS ARCHIVE UI V1 END */

/* ARCHIVE LAYOUT FIX V2 START */

.orders-archive-page {
  height: calc(100vh - 48px) !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: auto auto minmax(0, 1fr) !important;
  gap: 12px !important;
  overflow: hidden !important;
}

.orders-archive-page .orders-archive-topbar {
  position: relative !important;
  top: auto !important;
  z-index: 50 !important;
  min-height: 54px !important;
  padding-bottom: 10px !important;
}

.orders-archive-page .orders-archive-filter-section {
  position: relative !important;
  top: auto !important;
  z-index: 40 !important;
  margin: 0 !important;
  padding: 10px 14px 12px !important;
  overflow: visible !important;
}

.orders-archive-page .orders-archive-filter-section .section-title-row {
  margin-bottom: 7px !important;
}

.orders-archive-page .orders-archive-filter-section .section-title-row h2 {
  font-size: 18px !important;
  margin: 0 !important;
}

.orders-archive-page .orders-archive-filter-form {
  display: grid !important;
  grid-template-columns:
    minmax(90px, 0.8fr)
    minmax(130px, 1fr)
    minmax(145px, 1fr)
    minmax(145px, 1fr)
    minmax(145px, 1fr)
    minmax(130px, 0.9fr)
    minmax(160px, 1.2fr)
    minmax(90px, 0.7fr)
    minmax(90px, 0.7fr)
    auto !important;
  gap: 7px !important;
  align-items: end !important;
}

.orders-archive-page .orders-archive-filter-form label {
  min-width: 0 !important;
  font-size: 11px !important;
}

.orders-archive-page .orders-archive-filter-form input,
.orders-archive-page .orders-archive-filter-form select {
  min-height: 30px !important;
  height: 30px !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
}

.orders-archive-page .orders-archive-filter-actions .primary-button {
  min-height: 30px !important;
  height: 30px !important;
  padding: 4px 16px !important;
  font-size: 13px !important;
}

.orders-archive-page .orders-archive-list-section {
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 12px 14px !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  overflow: hidden !important;
}

.orders-archive-page .orders-archive-list-section .section-title-row {
  margin-bottom: 8px !important;
}

.orders-archive-page .orders-archive-list-section .section-title-row h2 {
  font-size: 20px !important;
  margin: 0 !important;
}

.orders-archive-page .orders-archive-list-section .table-wrap {
  min-height: 0 !important;
  height: 100% !important;
  overflow: auto !important;
  border-radius: 16px !important;
}

.orders-archive-page .orders-archive-list-section .data-table {
  min-width: 1280px !important;
}

.orders-archive-page .orders-archive-list-section .data-table thead th {
  position: sticky !important;
  top: 0 !important;
  z-index: 20 !important;
  background: #eaf3ff !important;
}

.orders-archive-page .orders-archive-list-section .data-table td,
.orders-archive-page .orders-archive-list-section .data-table th {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

@media (max-width: 1500px) {
  .orders-archive-page .orders-archive-filter-form {
    grid-template-columns: repeat(5, minmax(130px, 1fr)) !important;
  }

  .orders-archive-page {
    grid-template-rows: auto auto minmax(0, 1fr) !important;
  }
}

@media (max-width: 900px) {
  .orders-archive-page {
    height: auto !important;
    overflow: visible !important;
    display: flex !important;
  }

  .orders-archive-page .orders-archive-filter-form {
    grid-template-columns: 1fr !important;
  }

  .orders-archive-page .orders-archive-list-section .table-wrap {
    max-height: 70vh !important;
  }
}

/* ARCHIVE LAYOUT FIX V2 END */

/* ARCHIVE WIDTH FIX V3 START */

.orders-archive-page {
  width: calc(100vw - 56px) !important;
  max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.orders-archive-page .orders-archive-topbar,
.orders-archive-page .orders-archive-filter-section,
.orders-archive-page .orders-archive-list-section {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
}

.orders-archive-page .orders-archive-list-section .table-wrap {
  width: 100% !important;
  overflow-x: auto !important;
}

.orders-archive-page .orders-archive-list-section .data-table {
  width: 100% !important;
  min-width: 1180px !important;
  table-layout: fixed !important;
}

.orders-archive-page .orders-archive-list-section .data-table th:nth-child(1),
.orders-archive-page .orders-archive-list-section .data-table td:nth-child(1) {
  width: 46px !important;
}

.orders-archive-page .orders-archive-list-section .data-table th:nth-child(2),
.orders-archive-page .orders-archive-list-section .data-table td:nth-child(2) {
  width: 130px !important;
}

.orders-archive-page .orders-archive-list-section .data-table th:nth-child(3),
.orders-archive-page .orders-archive-list-section .data-table td:nth-child(3) {
  width: 340px !important;
}

.orders-archive-page .orders-archive-list-section .data-table th:nth-child(4),
.orders-archive-page .orders-archive-list-section .data-table td:nth-child(4) {
  width: 120px !important;
}

.orders-archive-page .orders-archive-list-section .data-table th:nth-child(5),
.orders-archive-page .orders-archive-list-section .data-table td:nth-child(5) {
  width: 180px !important;
}

.orders-archive-page .orders-archive-list-section .data-table th:nth-child(6),
.orders-archive-page .orders-archive-list-section .data-table td:nth-child(6) {
  width: 120px !important;
}

.orders-archive-page .orders-archive-list-section .data-table th:nth-child(7),
.orders-archive-page .orders-archive-list-section .data-table td:nth-child(7) {
  width: 95px !important;
}

.orders-archive-page .orders-archive-list-section .data-table th:nth-child(8),
.orders-archive-page .orders-archive-list-section .data-table td:nth-child(8) {
  width: 70px !important;
}

.orders-archive-page .orders-archive-list-section .data-table th:nth-child(9),
.orders-archive-page .orders-archive-list-section .data-table td:nth-child(9) {
  width: 90px !important;
}

.orders-archive-page .orders-archive-list-section .data-table th:nth-child(10),
.orders-archive-page .orders-archive-list-section .data-table td:nth-child(10) {
  width: 96px !important;
}

.orders-archive-page .orders-archive-list-section .data-table td,
.orders-archive-page .orders-archive-list-section .data-table th {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.orders-archive-page .orders-archive-list-section .data-table td:nth-child(3),
.orders-archive-page .orders-archive-list-section .data-table td:nth-child(4) {
  white-space: normal !important;
}

.orders-archive-page .orders-archive-list-section .mini-button {
  min-width: 82px !important;
  padding-left: 10px !important;
  padding-right: 10px !important;
}

@media (min-width: 1600px) {
  .orders-archive-page {
    width: calc(100vw - 72px) !important;
  }

  .orders-archive-page .orders-archive-list-section .data-table {
    min-width: 1280px !important;
  }
}

/* ARCHIVE WIDTH FIX V3 END */

/* HIDE ARCHIVE LIST TITLE V1 START */

.orders-archive-page .orders-archive-list-section > .section-title-row {
  display: none !important;
}

.orders-archive-page .orders-archive-list-section {
  grid-template-rows: minmax(0, 1fr) !important;
}

/* HIDE ARCHIVE LIST TITLE V1 END */

/* ARCHIVE FILTER GRID FIX V4 START */

.orders-archive-page .orders-archive-filter-form {
  grid-template-columns: repeat(5, minmax(170px, 1fr)) !important;
  gap: 10px 12px !important;
  align-items: end !important;
}

.orders-archive-page .orders-archive-filter-form label {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

.orders-archive-page .orders-archive-filter-form input,
.orders-archive-page .orders-archive-filter-form select {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.orders-archive-page .orders-archive-filter-actions {
  align-self: end !important;
}

.orders-archive-page .orders-archive-filter-actions .primary-button {
  width: 100% !important;
  min-width: 110px !important;
}

.orders-archive-page .orders-archive-filter-section {
  padding-bottom: 14px !important;
}

@media (min-width: 1501px) {
  .orders-archive-page .orders-archive-filter-form {
    grid-template-columns: repeat(5, minmax(170px, 1fr)) !important;
  }
}

@media (max-width: 1180px) {
  .orders-archive-page .orders-archive-filter-form {
    grid-template-columns: repeat(3, minmax(160px, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  .orders-archive-page .orders-archive-filter-form {
    grid-template-columns: 1fr !important;
  }
}

/* ARCHIVE FILTER GRID FIX V4 END */

/* ORDER ROW SORT AND ANIMATION V1 START */

@keyframes orderRowAppearV1 {
  0% {
    opacity: 0;
    transform: translateY(-12px) scale(0.985);
    box-shadow: inset 5px 0 0 rgba(37, 99, 235, 0.55), 0 14px 24px rgba(37, 99, 235, 0.12);
  }

  55% {
    opacity: 1;
    transform: translateY(0) scale(1);
    box-shadow: inset 5px 0 0 rgba(37, 99, 235, 0.45), 0 10px 22px rgba(37, 99, 235, 0.10);
  }

  100% {
    opacity: 1;
    transform: none;
    box-shadow: none;
  }
}

@keyframes orderRowArchiveV1 {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateX(28px) scale(0.98);
    filter: blur(1px);
  }
}

.order-list-row.order-row-newly-created {
  animation: orderRowAppearV1 1.15s ease both;
}

.order-list-row.order-row-archiving {
  animation: orderRowArchiveV1 0.52s ease forwards;
  pointer-events: none;
}

.order-list-row.order-row-archiving td {
  border-color: transparent !important;
}

/* ORDER ROW SORT AND ANIMATION V1 END */

/* ADDRESS EDITOR V1 START */

.address-editor-page {
  max-width: 1500px;
}

.address-editor-grid {
  display: grid;
  grid-template-columns: 420px minmax(420px, 1fr);
  gap: 16px;
  align-items: stretch;
}

.address-editor-form {
  display: grid;
  gap: 12px;
}

.address-editor-form label {
  display: grid;
  gap: 6px;
  color: #12315f;
  font-weight: 900;
  font-size: 13px;
}

.address-editor-form input,
.address-editor-search-row input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #bdd4fb;
  border-radius: 12px;
  box-sizing: border-box;
  color: #12315f;
}

.address-editor-coordinates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.address-editor-form-actions,
.address-editor-search-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.address-editor-search-row input {
  flex: 1;
}

.address-editor-map {
  min-height: 430px;
  height: 100%;
  border: 1px solid #bdd4fb;
  border-radius: 20px;
  overflow: hidden;
  background: #eaf3ff;
}

.address-editor-search-results {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.address-editor-search-item {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #bdd4fb;
  border-radius: 14px;
  background: #fff;
  color: #12315f;
  text-align: left;
  cursor: pointer;
}

.address-editor-search-item:hover,
.address-editor-search-item.is-selected {
  border-color: #2563eb;
  background: #eff6ff;
}

.address-editor-search-item small,
.address-editor-search-empty {
  color: #60708f;
}

.danger-mini-button {
  border-color: #fecaca !important;
  background: #fff7f7 !important;
  color: #991b1b !important;
}

@media (max-width: 1050px) {
  .address-editor-grid {
    grid-template-columns: 1fr;
  }

  .address-editor-map {
    min-height: 360px;
  }
}

/* ADDRESS EDITOR V1 END */

.address-editor-map-error {
  display: grid;
  place-items: center;
  min-height: 430px;
  padding: 24px;
  color: #991b1b;
  font-weight: 900;
  text-align: center;
  background: #fff7f7;
}

.address-reverse-status {
  padding: 9px 11px;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.address-reverse-status[data-mode="loading"] {
  background: #fff7ed;
  color: #9a3412;
}

.address-reverse-status[data-mode="success"] {
  background: #ecfdf5;
  color: #166534;
}

.address-reverse-status[data-mode="error"] {
  background: #fff1f2;
  color: #991b1b;
}

/* ADDRESS EDITOR COMPACT UI V1 START */

.address-editor-page {
  padding-top: 18px;
  padding-bottom: 18px;
}

.address-editor-page .top-row {
  margin-bottom: 12px;
}

.address-editor-page .badge {
  font-size: 13px;
  padding: 6px 10px;
}

.address-editor-page .section-block {
  padding: 12px;
  border-radius: 16px;
}

.address-editor-page .section-title-row {
  margin-bottom: 8px;
  gap: 8px;
}

.address-editor-page .section-title-row h2 {
  font-size: 16px;
  line-height: 1.15;
  margin: 0;
}

.address-editor-page .section-title-row p,
.address-editor-page .muted,
.address-editor-page small {
  font-size: 12px;
  line-height: 1.3;
}

.address-editor-grid {
  gap: 10px;
  grid-template-columns: 360px minmax(420px, 1fr);
}

.address-editor-form {
  gap: 8px;
}

.address-editor-form label {
  gap: 4px;
  font-size: 12px;
}

.address-editor-form input,
.address-editor-search-row input,
.address-book-filter-row input {
  min-height: 32px;
  padding: 6px 9px;
  border-radius: 10px;
  font-size: 13px;
}

.address-editor-coordinates {
  gap: 7px;
}

.address-editor-form-actions,
.address-editor-search-row {
  gap: 7px;
}

.address-editor-page .primary-button,
.address-editor-page .ghost-button,
.address-editor-page .mini-button {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
}

.address-editor-map {
  min-height: 350px;
  border-radius: 16px;
}

.address-editor-search-section {
  margin-top: 10px;
}

.address-editor-search-results {
  gap: 6px;
  margin-top: 8px;
}

.address-editor-search-item {
  padding: 7px 9px;
  border-radius: 11px;
}

.address-editor-search-item strong {
  font-size: 13px;
}

.address-editor-search-item small {
  font-size: 11px;
}

.address-reverse-status {
  padding: 7px 9px;
  border-radius: 10px;
  font-size: 12px;
}

.address-book-title-row {
  align-items: center;
}

.address-book-filter-row {
  margin: 0 0 8px;
}

.address-editor-page .table-wrap {
  max-height: 360px;
  overflow: auto;
  border-radius: 14px;
}

.address-editor-page .data-table {
  font-size: 12px;
}

.address-editor-page .data-table th,
.address-editor-page .data-table td {
  padding: 7px 8px;
  vertical-align: top;
}

.address-editor-page .data-table strong {
  font-size: 12px;
}

.address-editor-page .data-table small {
  display: block;
  margin-top: 2px;
}

.address-editor-page .orders-count-badge {
  min-width: 28px;
  min-height: 24px;
  padding: 3px 8px;
  font-size: 12px;
}

@media (max-width: 1050px) {
  .address-editor-grid {
    grid-template-columns: 1fr;
  }

  .address-editor-map {
    min-height: 320px;
  }
}

/* ADDRESS EDITOR COMPACT UI V1 END */

/* ORDER ADDRESS COMMENTS V1 START */

.address-comment-input {
  width: 100%;
  min-height: 26px;
  margin-top: 4px;
  padding: 4px 8px;
  border: 1px solid #d8e4f8;
  border-radius: 9px;
  background: #f8fbff;
  color: #234;
  font-size: 12px;
  line-height: 1.2;
  box-sizing: border-box;
}

.address-comment-input::placeholder {
  color: #7b8da8;
}

.route-extra-address-comment {
  margin-top: 5px;
}

.order-address-list-comment {
  display: block;
  font-size: 11px;
  line-height: 1.25;
}

/* ORDER ADDRESS COMMENTS V1 END */

/* GLOBAL THEME TOGGLE V1 START */

.theme-toggle-button {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99999;
  min-width: 96px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #b9cff5;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #0b2a55;
  font-weight: 900;
  font-size: 13px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.theme-toggle-button:hover {
  transform: translateY(-1px);
}

html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.20), transparent 34%),
    linear-gradient(135deg, #07111f 0%, #0d1b2f 52%, #111827 100%) !important;
  color: #dbeafe;
}

html[data-theme="dark"] .page,
html[data-theme="dark"] .hero,
html[data-theme="dark"] .dashboard,
html[data-theme="dark"] .wide-page,
html[data-theme="dark"] .section-block,
html[data-theme="dark"] .modal-card,
html[data-theme="dark"] .order-card-modal,
html[data-theme="dark"] .order-card-section,
html[data-theme="dark"] .order-card-route-map-column,
html[data-theme="dark"] .incoming-calls-panel,
html[data-theme="dark"] .address-editor-page {
  background: rgba(15, 23, 42, 0.94) !important;
  color: #dbeafe !important;
  border-color: rgba(96, 165, 250, 0.35) !important;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="dark"] .modal-overlay {
  background: rgba(2, 6, 23, 0.82) !important;
}

html[data-theme="dark"] .badge,
html[data-theme="dark"] .orders-count-badge,
html[data-theme="dark"] .operator-line-beacon,
html[data-theme="dark"] .route-details-metric,
html[data-theme="dark"] .order-cost-card,
html[data-theme="dark"] .order-option-item,
html[data-theme="dark"] .address-editor-search-item,
html[data-theme="dark"] .address-reverse-status,
html[data-theme="dark"] .success-box {
  background: rgba(30, 41, 59, 0.94) !important;
  color: #dbeafe !important;
  border-color: rgba(96, 165, 250, 0.35) !important;
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] strong,
html[data-theme="dark"] th,
html[data-theme="dark"] label,
html[data-theme="dark"] .section-title-row,
html[data-theme="dark"] .order-card-section-title,
html[data-theme="dark"] .route-details-status {
  color: #eff6ff !important;
}

html[data-theme="dark"] .muted,
html[data-theme="dark"] small,
html[data-theme="dark"] p {
  color: #a9bdd8 !important;
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .address-comment-input {
  background: rgba(15, 23, 42, 0.96) !important;
  color: #eff6ff !important;
  border-color: rgba(96, 165, 250, 0.42) !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #7f95b5 !important;
}

html[data-theme="dark"] .data-table,
html[data-theme="dark"] table {
  background: rgba(15, 23, 42, 0.88) !important;
  color: #dbeafe !important;
}

html[data-theme="dark"] .data-table thead,
html[data-theme="dark"] .data-table th {
  background: rgba(30, 41, 59, 0.96) !important;
}

html[data-theme="dark"] .data-table td,
html[data-theme="dark"] .data-table th {
  border-color: rgba(96, 165, 250, 0.22) !important;
}

html[data-theme="dark"] .ghost-link,
html[data-theme="dark"] .ghost-button,
html[data-theme="dark"] .mini-button,
html[data-theme="dark"] .route-add-address-button,
html[data-theme="dark"] .modal-close-button,
html[data-theme="dark"] .address-suggest-clear {
  background: rgba(30, 41, 59, 0.92) !important;
  color: #dbeafe !important;
  border-color: rgba(96, 165, 250, 0.35) !important;
}

html[data-theme="dark"] .primary-button,
html[data-theme="dark"] button[type="submit"]:not(.ghost-button):not(.mini-button),
html[data-theme="dark"] .order-card-actions button[type="submit"] {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #3b82f6 !important;
}

html[data-theme="dark"] .address-suggest-dropdown {
  background: #0f172a !important;
  border-color: rgba(96, 165, 250, 0.42) !important;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.42) !important;
}

html[data-theme="dark"] .address-suggest-option,
html[data-theme="dark"] .address-suggest-empty {
  background: #0f172a !important;
  color: #dbeafe !important;
  border-color: rgba(96, 165, 250, 0.18) !important;
}

html[data-theme="dark"] .address-suggest-option:hover {
  background: #1e3a8a !important;
}

html[data-theme="dark"] .order-status-row-new,
html[data-theme="dark"] .order-status-row-preorder,
html[data-theme="dark"] .order-status-row-car_found,
html[data-theme="dark"] .order-status-row-car_arrived,
html[data-theme="dark"] .order-status-row-in_progress {
  background: rgba(30, 41, 59, 0.72) !important;
}

html[data-theme="dark"] .order-status-row-done {
  background: rgba(20, 83, 45, 0.28) !important;
}

html[data-theme="dark"] .order-status-row-cancelled {
  background: rgba(127, 29, 29, 0.28) !important;
}

html[data-theme="dark"] .theme-toggle-button {
  background: rgba(15, 23, 42, 0.96);
  color: #fef3c7;
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .leaflet-container {
  filter: brightness(0.78) contrast(1.08) saturate(0.82);
}

/* GLOBAL THEME TOGGLE V1 END */

/* GLOBAL THEME TOGGLE POSITION V2 START */

.theme-toggle-button {
  top: 12px !important;
  left: 12px !important;
  right: auto !important;
  bottom: auto !important;
  min-width: 74px !important;
  min-height: 30px !important;
  padding: 5px 9px !important;
  font-size: 11px !important;
  line-height: 1 !important;
  border-radius: 999px !important;
  z-index: 100000 !important;
}

@media (max-width: 700px) {
  .theme-toggle-button {
    top: 8px !important;
    left: 8px !important;
    min-width: 68px !important;
    min-height: 28px !important;
    padding: 4px 8px !important;
    font-size: 10px !important;
  }
}

/* GLOBAL THEME TOGGLE POSITION V2 END */

/* DRIVER WORKSPACE V1 START */

.driver-work-page {
  align-items: flex-start;
}

.driver-work-shell {
  max-width: 1280px;
}

.driver-work-grid {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(360px, 1fr);
  gap: 14px;
  align-items: stretch;
}

.driver-work-status-card,
.driver-work-order-card,
.driver-work-history-card {
  border: 1px solid #c8daf7;
}

.driver-work-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.driver-work-status-off_duty {
  background: #f1f5f9;
  color: #475569;
}

.driver-work-status-available {
  background: #dcfce7;
  color: #166534;
}

.driver-work-status-break {
  background: #fef3c7;
  color: #92400e;
}

.driver-work-status-busy {
  background: #dbeafe;
  color: #1d4ed8;
}

.driver-work-car-card {
  display: grid;
  gap: 4px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #d7e4fa;
  border-radius: 16px;
  background: #f8fbff;
}

.driver-work-car-card span,
.driver-work-car-card small,
.driver-work-shift-note {
  color: #60708f;
  font-size: 12px;
}

.driver-work-car-card strong {
  color: #12315f;
  font-size: 18px;
}

.driver-work-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: end;
}

.driver-work-main-button {
  min-width: 180px;
}

.driver-work-car-select {
  display: grid;
  gap: 5px;
  flex: 1 1 100%;
  color: #12315f;
  font-size: 12px;
  font-weight: 900;
}

.driver-work-car-select select {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #bdd4fb;
  border-radius: 12px;
  background: #fff;
}

.danger-soft-button {
  color: #991b1b !important;
  border-color: #fecaca !important;
  background: #fff7f7 !important;
}

.driver-work-empty-order {
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 20px;
  border: 1px dashed #b8cdf0;
  border-radius: 18px;
  background: #f8fbff;
  text-align: center;
}

.driver-work-empty-order strong {
  color: #12315f;
  font-size: 22px;
}

.driver-work-empty-order small {
  color: #60708f;
}

.driver-work-empty-order.is-ready {
  border-color: #86efac;
  background: #f0fdf4;
}

.driver-work-timeline-placeholder {
  display: grid;
  place-items: center;
  min-height: 80px;
  border: 1px dashed #bdd4fb;
  border-radius: 16px;
  color: #60708f;
  font-weight: 800;
}

html[data-theme="dark"] .driver-work-car-card,
html[data-theme="dark"] .driver-work-empty-order,
html[data-theme="dark"] .driver-work-timeline-placeholder {
  background: rgba(15, 23, 42, 0.82) !important;
  border-color: rgba(96, 165, 250, 0.32) !important;
}

html[data-theme="dark"] .driver-work-car-card strong,
html[data-theme="dark"] .driver-work-empty-order strong {
  color: #eff6ff !important;
}

@media (max-width: 900px) {
  .driver-work-grid {
    grid-template-columns: 1fr;
  }

  .driver-work-actions {
    display: grid;
  }
}

/* DRIVER WORKSPACE V1 END */

/* ROLE SELECT LOGIN V1 START */

.role-select-list {
  gap: 10px;
}

.role-select-button {
  text-align: left;
}

.role-select-button small {
  display: block;
  margin-top: 4px;
  color: #5d6d86;
  font-size: 12px;
}

.role-select-driver {
  border-color: #86efac !important;
  background: linear-gradient(135deg, #f0fdf4, #ffffff) !important;
}

.role-select-tenant_owner,
.role-select-tenant_admin {
  border-color: #bfdbfe !important;
}

.driver-dashboard-direct-v1 {
  margin-top: 14px;
  border-color: #86efac;
  background: #f0fdf4;
}

html[data-theme="dark"] .role-select-driver,
html[data-theme="dark"] .driver-dashboard-direct-v1 {
  background: rgba(20, 83, 45, 0.26) !important;
  border-color: rgba(134, 239, 172, 0.45) !important;
}

/* ROLE SELECT LOGIN V1 END */

/* UNIVERSAL ROLE SELECT V2 START */

.role-select-list {
  gap: 10px;
}

.role-select-button {
  text-align: left;
}

.role-select-button small {
  display: block;
  margin-top: 4px;
  color: #5d6d86;
  font-size: 12px;
}

.role-select-driver {
  border-color: #86efac !important;
  background: linear-gradient(135deg, #f0fdf4, #ffffff) !important;
}

.role-select-operator {
  border-color: #fde68a !important;
  background: linear-gradient(135deg, #fffbeb, #ffffff) !important;
}

.role-select-tenant_owner,
.role-select-tenant_admin {
  border-color: #bfdbfe !important;
}

.driver-dashboard-direct-v1 {
  margin-top: 14px;
  border-color: #86efac;
  background: #f0fdf4;
}

html[data-theme="dark"] .role-select-driver,
html[data-theme="dark"] .driver-dashboard-direct-v1 {
  background: rgba(20, 83, 45, 0.26) !important;
  border-color: rgba(134, 239, 172, 0.45) !important;
}

html[data-theme="dark"] .role-select-operator {
  background: rgba(120, 53, 15, 0.24) !important;
  border-color: rgba(253, 230, 138, 0.42) !important;
}

/* UNIVERSAL ROLE SELECT V2 END */

/* DRIVER TERMINAL V1 START */

.driver-terminal-note {
  font-size: 12px;
  color: #60708f;
}

html[data-theme="dark"] .driver-terminal-note {
  color: #a9bdd8;
}

/* DRIVER TERMINAL V1 END */

/* DRIVER TERMINAL HEADER WIDGETS V1 START */

.driver-terminal-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.driver-terminal-header-widgets {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.driver-terminal-settings-button {
  width: 34px;
  height: 34px;
  border: 1px solid #bdd4fb;
  border-radius: 12px;
  background: #f8fbff;
  color: #12315f;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(40, 90, 160, 0.10);
}

.driver-terminal-settings-button:hover {
  transform: translateY(-1px);
}

.driver-terminal-header-chip {
  display: grid;
  gap: 1px;
  min-width: 92px;
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid #d7e4fa;
  border-radius: 12px;
  background: #f8fbff;
  box-sizing: border-box;
}

.driver-terminal-header-chip span {
  color: #60708f;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.driver-terminal-header-chip strong {
  color: #12315f;
  font-size: 12px;
  line-height: 1.1;
  white-space: nowrap;
}

.driver-terminal-gps-chip.is-on {
  border-color: #86efac;
  background: #f0fdf4;
}

.driver-terminal-gps-chip.is-on strong {
  color: #166534;
}

.driver-terminal-gps-chip.is-off {
  border-color: #fecaca;
  background: #fff7f7;
}

.driver-terminal-gps-chip.is-off strong {
  color: #991b1b;
}

html[data-theme="dark"] .driver-terminal-settings-button,
html[data-theme="dark"] .driver-terminal-header-chip {
  background: rgba(15, 23, 42, 0.92) !important;
  color: #eff6ff !important;
  border-color: rgba(96, 165, 250, 0.35) !important;
}

html[data-theme="dark"] .driver-terminal-header-chip strong {
  color: #eff6ff !important;
}

html[data-theme="dark"] .driver-terminal-gps-chip.is-on {
  background: rgba(20, 83, 45, 0.28) !important;
  border-color: rgba(134, 239, 172, 0.45) !important;
}

html[data-theme="dark"] .driver-terminal-gps-chip.is-off {
  background: rgba(127, 29, 29, 0.24) !important;
  border-color: rgba(252, 165, 165, 0.40) !important;
}

@media (max-width: 760px) {
  .driver-terminal-header-actions {
    justify-content: flex-start;
  }

  .driver-terminal-header-widgets {
    width: 100%;
    justify-content: flex-start;
  }

  .driver-terminal-header-chip {
    min-width: 86px;
  }
}

/* DRIVER TERMINAL HEADER WIDGETS V1 END */

/* DRIVER TERMINAL MOBILE HEADER V2 START */

.driver-terminal-top-row {
  align-items: flex-start;
  gap: 10px;
}

.driver-terminal-title-block {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.driver-terminal-identity {
  display: grid;
  gap: 2px;
}

.driver-terminal-identity strong {
  color: #12315f;
  font-size: 14px;
  line-height: 1.1;
}

.driver-terminal-identity small {
  color: #60708f;
  font-size: 11px;
  line-height: 1.2;
}

.driver-terminal-header-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.driver-terminal-header-widgets {
  display: flex;
  align-items: stretch;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.driver-terminal-header-chip {
  min-width: 84px;
  min-height: 34px;
  padding: 5px 8px;
}

.driver-terminal-car-chip {
  min-width: 140px;
}

.driver-terminal-header-chip small {
  display: block;
  margin-top: 2px;
  color: #60708f;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

.driver-terminal-shift-form {
  display: flex;
  align-items: stretch;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.driver-terminal-car-select {
  min-height: 34px;
  max-width: 210px;
  padding: 6px 9px;
  border: 1px solid #bdd4fb;
  border-radius: 11px;
  background: #fff;
  color: #12315f;
  font-size: 12px;
  font-weight: 800;
}

.driver-terminal-shift-button,
.driver-terminal-exit-button {
  min-height: 34px !important;
  padding: 6px 10px !important;
  border-radius: 11px !important;
  font-size: 12px !important;
  white-space: nowrap;
}

.driver-work-mobile-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
  flex-wrap: wrap;
}

.driver-work-mobile-status-row small {
  color: #60708f;
  font-size: 12px;
}

.driver-terminal-main-grid {
  grid-template-columns: minmax(360px, 1fr) minmax(280px, 380px);
}

.driver-terminal-current-order .section-title-row,
.driver-terminal-events .section-title-row {
  margin-bottom: 8px;
}

.driver-terminal-current-order h2,
.driver-terminal-events h2 {
  font-size: 18px;
}

html[data-theme="dark"] .driver-terminal-identity strong {
  color: #eff6ff !important;
}

html[data-theme="dark"] .driver-terminal-car-select {
  background: rgba(15, 23, 42, 0.92) !important;
  color: #eff6ff !important;
  border-color: rgba(96, 165, 250, 0.35) !important;
}

html[data-theme="dark"] .driver-terminal-header-chip small,
html[data-theme="dark"] .driver-terminal-identity small,
html[data-theme="dark"] .driver-work-mobile-status-row small {
  color: #a9bdd8 !important;
}

@media (max-width: 980px) {
  .driver-terminal-top-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .driver-terminal-header-actions {
    justify-content: flex-start;
  }

  .driver-terminal-header-widgets {
    width: 100%;
    justify-content: flex-start;
  }

  .driver-terminal-shift-form {
    width: 100%;
    justify-content: flex-start;
  }

  .driver-terminal-main-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .driver-work-page {
    padding: 8px;
  }

  .driver-work-shell {
    padding: 12px !important;
    border-radius: 18px !important;
  }

  .driver-terminal-title-block {
    width: 100%;
    align-items: flex-start;
  }

  .driver-terminal-header-actions {
    display: grid;
    width: 100%;
    gap: 8px;
  }

  .driver-terminal-header-widgets {
    display: grid;
    grid-template-columns: 38px 1fr 1fr;
    gap: 6px;
  }

  .driver-terminal-settings-button {
    width: 38px;
    height: 100%;
    min-height: 42px;
  }

  .driver-terminal-car-chip {
    grid-column: span 2;
    min-width: 0;
  }

  .driver-terminal-header-chip {
    min-width: 0;
    width: 100%;
  }

  .driver-terminal-shift-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .driver-terminal-car-select {
    grid-column: 1 / -1;
    max-width: none;
    width: 100%;
  }

  .driver-terminal-shift-button {
    width: 100%;
  }

  .driver-terminal-logout-form {
    width: 100%;
  }

  .driver-terminal-exit-button {
    width: 100%;
  }

  .driver-work-empty-order {
    min-height: 150px;
    padding: 14px;
  }

  .driver-work-empty-order strong {
    font-size: 18px;
  }

  .driver-terminal-current-order h2,
  .driver-terminal-events h2 {
    font-size: 16px;
  }
}

@media (max-width: 420px) {
  .driver-terminal-header-widgets {
    grid-template-columns: 38px 1fr;
  }

  .driver-terminal-car-chip {
    grid-column: 1 / -1;
  }

  .driver-terminal-shift-form {
    grid-template-columns: 1fr;
  }
}

/* DRIVER TERMINAL MOBILE HEADER V2 END */

/* DRIVER TERMINAL ARCHIVE BUTTON V3 START */

.driver-terminal-archive-button {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #bdd4fb;
  border-radius: 11px;
  background: #f8fbff;
  color: #12315f;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.driver-terminal-archive-button:hover {
  transform: translateY(-1px);
}

.driver-terminal-main-grid {
  grid-template-columns: 1fr !important;
}

.driver-terminal-current-order {
  min-height: 260px;
}

html[data-theme="dark"] .driver-terminal-archive-button {
  background: rgba(15, 23, 42, 0.92) !important;
  color: #eff6ff !important;
  border-color: rgba(96, 165, 250, 0.35) !important;
}

@media (max-width: 640px) {
  .driver-terminal-header-widgets {
    grid-template-columns: 38px 1fr 1fr !important;
  }

  .driver-terminal-archive-button {
    width: 100%;
    min-height: 42px;
    font-size: 11px;
  }
}

@media (max-width: 420px) {
  .driver-terminal-header-widgets {
    grid-template-columns: 38px 1fr !important;
  }

  .driver-terminal-archive-button {
    grid-column: span 1;
  }
}

/* DRIVER TERMINAL ARCHIVE BUTTON V3 END */

/* DRIVER TERMINAL COMPACT MOBILE HEADER V4 START */

@media (max-width: 640px) {
  .driver-work-page {
    padding: 6px !important;
  }

  .driver-work-shell {
    padding: 9px !important;
    border-radius: 16px !important;
  }

  .driver-terminal-top-row {
    gap: 6px !important;
    margin-bottom: 6px !important;
  }

  .driver-terminal-title-block {
    display: grid !important;
    grid-template-columns: auto 1fr !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .driver-terminal-title-block .badge {
    padding: 4px 7px !important;
    font-size: 10px !important;
    line-height: 1 !important;
  }

  .driver-terminal-identity {
    gap: 0 !important;
    min-width: 0 !important;
  }

  .driver-terminal-identity strong {
    font-size: 12px !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .driver-terminal-identity small {
    font-size: 9px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .driver-terminal-header-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    gap: 5px !important;
  }

  .driver-terminal-header-widgets {
    display: grid !important;
    grid-template-columns: 28px 78px 1fr 64px 70px !important;
    gap: 4px !important;
    align-items: stretch !important;
    width: 100% !important;
  }

  .driver-terminal-settings-button {
    width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 !important;
    border-radius: 9px !important;
    font-size: 13px !important;
  }

  .driver-terminal-archive-button {
    width: 100% !important;
    min-height: 28px !important;
    padding: 3px 5px !important;
    border-radius: 9px !important;
    font-size: 9px !important;
    line-height: 1 !important;
  }

  .driver-terminal-header-chip {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    min-width: 0 !important;
    min-height: 28px !important;
    width: 100% !important;
    padding: 3px 5px !important;
    border-radius: 9px !important;
    overflow: hidden !important;
  }

  .driver-terminal-header-chip span {
    font-size: 8px !important;
    line-height: 1 !important;
    flex: 0 0 auto !important;
  }

  .driver-terminal-header-chip strong {
    min-width: 0 !important;
    font-size: 10px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .driver-terminal-header-chip small {
    display: none !important;
  }

  .driver-terminal-car-chip {
    grid-column: auto !important;
  }

  .driver-terminal-car-chip span {
    display: none !important;
  }

  .driver-terminal-car-chip strong {
    font-size: 10px !important;
  }

  .driver-terminal-shift-form {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4px !important;
    width: 100% !important;
  }

  .driver-terminal-car-select {
    grid-column: 1 / -1 !important;
    min-height: 28px !important;
    height: 28px !important;
    max-width: none !important;
    width: 100% !important;
    padding: 3px 7px !important;
    border-radius: 9px !important;
    font-size: 10px !important;
  }

  .driver-terminal-shift-button,
  .driver-terminal-exit-button {
    min-height: 28px !important;
    height: 28px !important;
    padding: 3px 7px !important;
    border-radius: 9px !important;
    font-size: 10px !important;
    line-height: 1 !important;
  }

  .driver-terminal-logout-form {
    width: 100% !important;
  }

  .driver-terminal-exit-button {
    width: 100% !important;
  }

  .driver-work-mobile-status-row {
    margin: 5px 0 7px !important;
    gap: 5px !important;
  }

  .driver-work-mobile-status-row .driver-work-status-pill {
    min-height: 22px !important;
    padding: 3px 8px !important;
    font-size: 10px !important;
  }

  .driver-work-mobile-status-row small {
    font-size: 10px !important;
  }

  .driver-terminal-current-order {
    min-height: auto !important;
  }

  .driver-work-empty-order {
    min-height: 130px !important;
  }
}

@media (max-width: 430px) {
  .driver-terminal-header-widgets {
    grid-template-columns: 28px 74px 1fr 58px !important;
  }

  .driver-terminal-gps-chip {
    grid-column: span 1 !important;
  }

  .driver-terminal-header-chip span {
    display: none !important;
  }

  .driver-terminal-header-chip strong {
    font-size: 9px !important;
  }

  .driver-terminal-shift-form {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 360px) {
  .driver-terminal-header-widgets {
    grid-template-columns: 28px 1fr 56px !important;
  }

  .driver-terminal-car-chip {
    grid-column: 1 / -1 !important;
  }

  .driver-terminal-shift-form {
    grid-template-columns: 1fr !important;
  }
}

/* DRIVER TERMINAL COMPACT MOBILE HEADER V4 END */

/* DRIVER TERMINAL GPS ICON V5 START */

.driver-work-mobile-status-row {
  display: none !important;
}

.driver-terminal-gps-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  border: 1px solid #d7e4fa;
  border-radius: 12px;
  background: #f8fbff;
  box-sizing: border-box;
}

.driver-terminal-gps-icon span {
  display: block;
  width: 13px;
  height: 13px;
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.15);
}

.driver-terminal-gps-icon.is-on span {
  background: #16a34a;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}

.driver-terminal-gps-icon.is-off span {
  background: #dc2626;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.18);
}

.driver-terminal-gps-icon::after {
  content: "GPS";
  position: absolute;
  left: 50%;
  bottom: -13px;
  transform: translateX(-50%);
  color: #60708f;
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
}

html[data-theme="dark"] .driver-terminal-gps-icon {
  background: rgba(15, 23, 42, 0.92) !important;
  border-color: rgba(96, 165, 250, 0.35) !important;
}

html[data-theme="dark"] .driver-terminal-gps-icon::after {
  color: #a9bdd8;
}

@media (max-width: 640px) {
  .driver-terminal-gps-icon {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    border-radius: 9px !important;
  }

  .driver-terminal-gps-icon span {
    width: 11px !important;
    height: 11px !important;
  }

  .driver-terminal-gps-icon::after {
    display: none !important;
  }
}

/* DRIVER TERMINAL GPS ICON V5 END */

/* DRIVER TERMINAL HEADER COMPACT FIX V6 START */

.driver-terminal-car-line {
  display: block;
  margin-top: 1px;
  color: #60708f;
  font-size: 10px;
  line-height: 1.15;
}

.driver-terminal-car-chip,
.driver-work-mobile-status-row,
.driver-work-shell > .success-box {
  display: none !important;
}

@media (max-width: 640px) {
  .driver-terminal-header-widgets {
    grid-template-columns: 28px minmax(74px, 1fr) 62px 28px !important;
  }

  .driver-terminal-title-block {
    margin-bottom: 2px !important;
  }

  .driver-terminal-identity small {
    display: block !important;
    font-size: 9px !important;
    line-height: 1.08 !important;
  }

  .driver-terminal-car-line {
    font-size: 9px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

@media (max-width: 430px) {
  .driver-terminal-header-widgets {
    grid-template-columns: 28px 1fr 58px 28px !important;
  }
}

html[data-theme="dark"] .driver-terminal-car-line {
  color: #a9bdd8 !important;
}

/* DRIVER TERMINAL HEADER COMPACT FIX V6 END */

/* DRIVER BALANCE V1 START */

.driver-balance-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 950;
  white-space: nowrap;
}

.driver-balance-value.is-positive,
.money-positive {
  color: #166534 !important;
}

.driver-balance-value.is-negative,
.money-negative,
[data-driver-balance].is-negative {
  color: #b91c1c !important;
}

.driver-balance-form {
  display: grid;
  grid-template-columns: 180px 160px minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

.driver-balance-form label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 900;
  color: #12315f;
}

.driver-balance-form input,
.driver-balance-form select {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #bdd4fb;
  border-radius: 12px;
  background: #fff;
  color: #12315f;
  box-sizing: border-box;
}

.driver-balance-history {
  margin-top: 14px;
}

.driver-balance-history h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.driver-terminal-shift-button:disabled,
button:disabled {
  opacity: 0.55;
  cursor: not-allowed !important;
  transform: none !important;
}

.driver-work-empty-order.is-balance-blocked {
  border-color: #fecaca;
  background: #fff7f7;
}

.driver-work-empty-order.is-balance-blocked strong {
  color: #b91c1c;
}

html[data-theme="dark"] .driver-balance-form label {
  color: #eff6ff !important;
}

html[data-theme="dark"] .driver-balance-form input,
html[data-theme="dark"] .driver-balance-form select {
  background: rgba(15, 23, 42, 0.92) !important;
  color: #eff6ff !important;
  border-color: rgba(96, 165, 250, 0.35) !important;
}

html[data-theme="dark"] .driver-work-empty-order.is-balance-blocked {
  background: rgba(127, 29, 29, 0.24) !important;
  border-color: rgba(252, 165, 165, 0.40) !important;
}

@media (max-width: 900px) {
  .driver-balance-form {
    grid-template-columns: 1fr 1fr;
  }

  .driver-balance-comment-field {
    grid-column: 1 / -1;
  }

  .driver-balance-form button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .driver-balance-form {
    grid-template-columns: 1fr;
  }
}

/* DRIVER BALANCE V1 END */

/* DRIVER BALANCE AUTO REFRESH V2 START */

.driver-terminal-current-order.is-balance-negative-live .driver-work-empty-order {
  border-color: #fecaca !important;
  background: #fff7f7 !important;
}

.driver-terminal-current-order.is-balance-negative-live .driver-work-empty-order strong {
  color: #b91c1c !important;
}

html[data-theme="dark"] .driver-terminal-current-order.is-balance-negative-live .driver-work-empty-order {
  background: rgba(127, 29, 29, 0.24) !important;
  border-color: rgba(252, 165, 165, 0.40) !important;
}

/* DRIVER BALANCE AUTO REFRESH V2 END */

/* DRIVER CAR OPTIONS V1 START */

.driver-option-manageable-badge,
.driver-option-locked-badge {
  display: inline-flex;
  width: fit-content;
  margin-top: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.driver-option-manageable-badge {
  background: #dcfce7;
  color: #166534;
}

.driver-option-locked-badge {
  background: #f1f5f9;
  color: #475569;
}

.driver-manageable-option-row {
  margin-top: 4px;
}

.driver-car-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 9px;
}

.driver-car-option-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: flex-start;
  padding: 10px;
  border: 1px solid #d7e4fa;
  border-radius: 14px;
  background: #f8fbff;
  cursor: pointer;
}

.driver-car-option-card.is-assigned {
  border-color: #86efac;
  background: #f0fdf4;
}

.driver-car-option-card span {
  display: grid;
  gap: 2px;
}

.driver-car-option-card small,
.driver-car-option-card em {
  color: #60708f;
  font-size: 11px;
  line-height: 1.2;
}

.driver-car-option-card em {
  font-style: normal;
  font-weight: 900;
}

.driver-terminal-settings-modal {
  position: fixed;
  inset: 0;
  z-index: 100010;
  display: grid;
  place-items: center;
  padding: 14px;
  background: rgba(15, 23, 42, 0.54);
}

.driver-terminal-settings-modal[hidden] {
  display: none !important;
}

.driver-terminal-settings-card {
  width: min(560px, 100%);
  max-height: min(720px, 88vh);
  overflow: auto;
  padding: 16px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.driver-terminal-settings-section h3 {
  margin: 0 0 4px;
}

.driver-terminal-options-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.driver-terminal-option-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #d7e4fa;
  border-radius: 14px;
  background: #f8fbff;
}

.driver-terminal-option-row strong,
.driver-terminal-option-row small {
  display: block;
}

.driver-terminal-option-row small {
  margin-top: 2px;
  color: #60708f;
  font-size: 11px;
}

.driver-terminal-option-row.is-manageable {
  border-color: #bfdbfe;
}

.driver-terminal-option-row.is-locked {
  opacity: 0.82;
}

.driver-terminal-option-lock {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

html[data-theme="dark"] .driver-car-option-card,
html[data-theme="dark"] .driver-terminal-settings-card,
html[data-theme="dark"] .driver-terminal-option-row {
  background: rgba(15, 23, 42, 0.96) !important;
  color: #eff6ff !important;
  border-color: rgba(96, 165, 250, 0.35) !important;
}

html[data-theme="dark"] .driver-car-option-card.is-assigned {
  background: rgba(20, 83, 45, 0.25) !important;
  border-color: rgba(134, 239, 172, 0.45) !important;
}

html[data-theme="dark"] .driver-car-option-card small,
html[data-theme="dark"] .driver-car-option-card em,
html[data-theme="dark"] .driver-terminal-option-row small {
  color: #a9bdd8 !important;
}

@media (max-width: 560px) {
  .driver-terminal-settings-card {
    padding: 12px;
    border-radius: 16px;
  }

  .driver-terminal-option-row {
    grid-template-columns: 1fr;
  }

  .driver-terminal-option-toggle-form button {
    width: 100%;
  }
}

/* DRIVER CAR OPTIONS V1 END */

/* DRIVER OPTION MANAGE FLAG V2 START */

.driver-car-option-card {
  align-items: stretch;
}

.driver-car-option-main-check,
.driver-car-option-manage-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: start;
}

.driver-car-option-main-check span,
.driver-car-option-manage-check span {
  display: grid;
  gap: 2px;
}

.driver-car-option-manage-check {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #c8daf7;
  font-size: 12px;
  font-weight: 900;
  color: #12315f;
}

.driver-car-option-manage-check small {
  display: block;
  color: #8a98ad;
  font-size: 10px;
  font-weight: 700;
}

.driver-car-option-manage-check.is-disabled {
  opacity: 0.62;
}

html[data-theme="dark"] .driver-car-option-manage-check {
  color: #eff6ff !important;
  border-top-color: rgba(96, 165, 250, 0.35) !important;
}

html[data-theme="dark"] .driver-car-option-manage-check small {
  color: #a9bdd8 !important;
}

/* DRIVER OPTION MANAGE FLAG V2 END */

/* DRIVER OPTION ICONS V1 START */

.order-option-icon-preview {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  margin-right: 5px;
  padding: 0 4px;
  border-radius: 9px;
  background: #eef5ff;
  color: #12315f;
  font-size: 14px;
  line-height: 1;
  vertical-align: middle;
}

.driver-terminal-option-icons-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.driver-terminal-option-icon {
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  padding: 0 4px;
  border: 1px solid #d7e4fa;
  border-radius: 8px;
  background: #f8fbff;
  color: #12315f;
  font-size: 12px;
  line-height: 1;
  box-sizing: border-box;
}

.driver-terminal-option-icon.is-enabled {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.driver-terminal-option-icon.is-disabled {
  opacity: 0.38;
  filter: grayscale(1);
}

html[data-theme="dark"] .order-option-icon-preview,
html[data-theme="dark"] .driver-terminal-option-icon {
  background: rgba(15, 23, 42, 0.92) !important;
  color: #eff6ff !important;
  border-color: rgba(96, 165, 250, 0.35) !important;
}

html[data-theme="dark"] .driver-terminal-option-icon.is-enabled {
  background: rgba(20, 83, 45, 0.28) !important;
  border-color: rgba(134, 239, 172, 0.45) !important;
  color: #bbf7d0 !important;
}

@media (max-width: 640px) {
  .driver-terminal-option-icons-row {
    gap: 3px;
    margin-top: 2px;
  }

  .driver-terminal-option-icon {
    min-width: 18px;
    height: 18px;
    padding: 0 3px;
    border-radius: 7px;
    font-size: 10px;
  }

  .order-option-icon-preview {
    min-width: 20px;
    height: 20px;
    border-radius: 7px;
    font-size: 12px;
  }
}

/* DRIVER OPTION ICONS V1 END */

/* ORDER OPTION ICON CATALOG V2 START */

.order-option-icon-catalog-field {
  display: grid;
  gap: 7px;
}

.order-option-icon-catalog-field > span {
  color: #12315f;
  font-size: 12px;
  font-weight: 900;
}

.order-option-icon-catalog-field > span b {
  color: #dc2626;
}

.order-option-icon-catalog-field > small {
  color: #60708f;
  font-size: 11px;
  line-height: 1.25;
}

.order-option-icon-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
  gap: 6px;
  max-height: 210px;
  overflow: auto;
  padding: 8px;
  border: 1px solid #d7e4fa;
  border-radius: 14px;
  background: #f8fbff;
}

.order-option-icon-choice {
  display: grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid #d7e4fa;
  border-radius: 11px;
  background: #ffffff;
  color: #12315f;
  font-size: 16px;
  font-weight: 950;
  cursor: pointer;
}

.order-option-icon-choice:hover,
.order-option-icon-choice.is-selected {
  border-color: #2563eb;
  background: #dbeafe;
  transform: translateY(-1px);
}

html[data-theme="dark"] .order-option-icon-catalog-field > span {
  color: #eff6ff !important;
}

html[data-theme="dark"] .order-option-icon-catalog-field > small {
  color: #a9bdd8 !important;
}

html[data-theme="dark"] .order-option-icon-catalog,
html[data-theme="dark"] .order-option-icon-choice {
  background: rgba(15, 23, 42, 0.92) !important;
  color: #eff6ff !important;
  border-color: rgba(96, 165, 250, 0.35) !important;
}

html[data-theme="dark"] .order-option-icon-choice.is-selected {
  background: rgba(37, 99, 235, 0.32) !important;
  border-color: rgba(147, 197, 253, 0.85) !important;
}

/* ORDER OPTION ICON CATALOG V2 END */

/* DRIVER ORDER MAP TABS V1 START */

.driver-terminal-current-order {
  padding-top: 12px;
}

.driver-terminal-order-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}

.driver-terminal-order-tabs button {
  min-height: 34px;
  border: 1px solid #d7e4fa;
  border-radius: 12px;
  background: #f8fbff;
  color: #12315f;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
}

.driver-terminal-order-tabs button.is-active {
  border-color: #2563eb;
  background: #dbeafe;
  color: #1d4ed8;
}

.driver-terminal-tab-panel {
  display: none;
}

.driver-terminal-tab-panel.is-active {
  display: block;
}

.driver-terminal-map {
  width: 100%;
  height: min(58vh, 520px);
  min-height: 360px;
  overflow: hidden;
  border: 1px solid #d7e4fa;
  border-radius: 18px;
  background: #eaf1fb;
}

.driver-terminal-map-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  color: #60708f;
  font-size: 12px;
  font-weight: 800;
}

.driver-map-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.driver-terminal-list-panel .driver-work-empty-order {
  min-height: 220px;
}

html[data-theme="dark"] .driver-terminal-order-tabs button {
  background: rgba(15, 23, 42, 0.92) !important;
  color: #eff6ff !important;
  border-color: rgba(96, 165, 250, 0.35) !important;
}

html[data-theme="dark"] .driver-terminal-order-tabs button.is-active {
  background: rgba(37, 99, 235, 0.32) !important;
  color: #eff6ff !important;
  border-color: rgba(147, 197, 253, 0.85) !important;
}

html[data-theme="dark"] .driver-terminal-map {
  border-color: rgba(96, 165, 250, 0.35) !important;
  background: rgba(15, 23, 42, 0.92) !important;
}

html[data-theme="dark"] .driver-terminal-map-hint {
  color: #a9bdd8 !important;
}

@media (max-width: 640px) {
  .driver-terminal-current-order {
    padding: 8px !important;
  }

  .driver-terminal-order-tabs {
    gap: 4px;
    margin-bottom: 7px;
  }

  .driver-terminal-order-tabs button {
    min-height: 30px;
    border-radius: 10px;
    font-size: 11px;
  }

  .driver-terminal-map {
    height: 54vh;
    min-height: 330px;
    border-radius: 14px;
  }

  .driver-terminal-map-hint {
    font-size: 10px;
  }
}

/* DRIVER ORDER MAP TABS V1 END */

/* DRIVER ORDER MAP FIX V2 START */

.driver-terminal-map {
  height: min(52vh, 468px) !important;
  min-height: 324px !important;
}

@media (max-width: 640px) {
  .driver-terminal-map {
    height: 49vh !important;
    min-height: 297px !important;
  }
}

/* DRIVER ORDER MAP FIX V2 END */

/* DRIVER CAR MARKER START */
.driver-terminal-car-marker {
  background: transparent !important;
  border: 0 !important;
}

.driver-terminal-car-icon-wrap {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 4px 10px rgba(15, 23, 42, 0.28));
  transform-origin: 50% 50%;
  transition: transform 0.25s ease-out;
  will-change: transform;
  pointer-events: none;
}

.driver-terminal-car-icon {
  width: 48px;
  height: 48px;
  display: block;
}
/* DRIVER CAR MARKER END */

/* DRIVER TEST ORDER ROUTE V1 START */

.driver-terminal-order-marker {
  background: transparent !important;
  border: 0 !important;
}

.driver-terminal-order-pin {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 3px solid #ffffff;
  border-radius: 999px 999px 999px 6px;
  background: #dc2626;
  color: #ffffff;
  font-size: 14px;
  font-weight: 950;
  box-shadow: 0 5px 14px rgba(127, 29, 29, 0.34);
  transform: rotate(-45deg);
}

.driver-terminal-order-pin::first-letter {
  transform: rotate(45deg);
}

.driver-terminal-free-orders-list {
  display: grid;
  gap: 8px;
}

.driver-terminal-free-order-card {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid #d7e4fa;
  border-radius: 14px;
  background: #f8fbff;
}

.driver-terminal-free-order-card strong {
  color: #12315f;
}

.driver-terminal-free-order-card span {
  color: #12315f;
  font-size: 13px;
  font-weight: 900;
}

.driver-terminal-free-order-card small {
  color: #60708f;
  font-size: 12px;
}

html[data-theme="dark"] .driver-terminal-free-order-card {
  background: rgba(15, 23, 42, 0.92) !important;
  border-color: rgba(96, 165, 250, 0.35) !important;
}

html[data-theme="dark"] .driver-terminal-free-order-card strong,
html[data-theme="dark"] .driver-terminal-free-order-card span {
  color: #eff6ff !important;
}

html[data-theme="dark"] .driver-terminal-free-order-card small {
  color: #a9bdd8 !important;
}

/* DRIVER TEST ORDER ROUTE V1 END */

/* OPERATOR NEAREST DRIVER V1 START */

.route-details-driver-eta {
  border-color: #bfdbfe !important;
  background: #eff6ff !important;
}

.nearest-driver-status {
  display: block;
  margin-top: 6px;
  color: #1d4ed8;
  font-weight: 900;
}

.operator-nearest-driver-marker {
  background: transparent !important;
  border: 0 !important;
}

.operator-nearest-driver-car {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 4px 10px rgba(15, 23, 42, 0.28));
  transform-origin: 50% 50%;
}

.operator-nearest-driver-car svg {
  width: 42px;
  height: 42px;
  display: block;
}

.operator-nearest-driver-car.is-releasing {
  opacity: 0.92;
}

html[data-theme="dark"] .route-details-driver-eta {
  background: rgba(37, 99, 235, 0.22) !important;
  border-color: rgba(147, 197, 253, 0.50) !important;
}

html[data-theme="dark"] .nearest-driver-status {
  color: #bfdbfe !important;
}

/* OPERATOR NEAREST DRIVER V1 END */

/* ===== Order cost block compact redesign ===== */
.order-cost-grid {
  gap: 10px;
}

.order-cost-card {
  min-height: 84px;
  padding: 10px 12px;
  border-radius: 14px;
}

.order-cost-card small {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  line-height: 1.2;
}

.order-cost-card strong {
  display: block;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 800;
}

.order-cost-card--tariff .order-cost-tariff-name {
  font-size: 11px;
  line-height: 1.15;
  font-weight: 700;
  color: #31456f;
  word-break: break-word;
}

.order-cost-card--total {
  border-width: 2px;
  box-shadow: 0 8px 20px rgba(31, 111, 67, 0.10);
}

.order-cost-card--total small {
  font-size: 13px;
  font-weight: 700;
}

.order-cost-total-value {
  font-size: 32px !important;
  line-height: 1;
  font-weight: 900;
  color: #1f8b4c !important;
}

@media (max-width: 768px) {
  .order-cost-grid {
    gap: 8px;
  }

  .order-cost-card {
    min-height: 74px;
    padding: 8px 10px;
    border-radius: 12px;
  }

  .order-cost-card small {
    font-size: 11px;
    margin-bottom: 3px;
  }

  .order-cost-card strong {
    font-size: 14px;
  }

  .order-cost-card--tariff .order-cost-tariff-name {
    font-size: 10px;
  }

  .order-cost-total-value {
    font-size: 26px !important;
  }
}

/* ORDER COST UI HARD V2 START */

.order-card-cost-panel .order-cost-grid {
  gap: 8px !important;
  align-items: stretch !important;
}

.order-card-cost-panel .order-cost-card {
  min-height: 70px !important;
  padding: 8px 10px !important;
  border-radius: 12px !important;
}

.order-card-cost-panel .order-cost-card small {
  display: block !important;
  margin-bottom: 3px !important;
  font-size: 11px !important;
  line-height: 1.1 !important;
  font-weight: 700 !important;
}

.order-card-cost-panel .order-cost-card strong {
  display: block !important;
  font-size: 14px !important;
  line-height: 1.12 !important;
  font-weight: 850 !important;
}

.order-card-cost-panel .order-cost-card--tariff strong,
.order-card-cost-panel .order-cost-tariff-name {
  font-size: 11px !important;
  line-height: 1.08 !important;
  font-weight: 750 !important;
  color: #31456f !important;
  word-break: break-word !important;
}

.order-card-cost-panel .order-cost-card--total {
  min-height: 82px !important;
  padding: 10px 12px !important;
  border: 2px solid #86efac !important;
  background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 100%) !important;
  box-shadow: 0 10px 22px rgba(22, 101, 52, 0.14) !important;
}

.order-card-cost-panel .order-cost-card--total small {
  font-size: 13px !important;
  color: #166534 !important;
}

.order-card-cost-panel .order-cost-card--total strong,
.order-card-cost-panel .order-cost-total-value {
  font-size: 34px !important;
  line-height: 0.95 !important;
  font-weight: 950 !important;
  color: #16a34a !important;
}

html[data-theme="dark"] .order-card-cost-panel .order-cost-card--tariff strong,
html[data-theme="dark"] .order-card-cost-panel .order-cost-tariff-name {
  color: #bfdbfe !important;
}

html[data-theme="dark"] .order-card-cost-panel .order-cost-card--total {
  border-color: rgba(134, 239, 172, 0.55) !important;
  background: rgba(20, 83, 45, 0.34) !important;
}

html[data-theme="dark"] .order-card-cost-panel .order-cost-card--total small,
html[data-theme="dark"] .order-card-cost-panel .order-cost-card--total strong,
html[data-theme="dark"] .order-card-cost-panel .order-cost-total-value {
  color: #86efac !important;
}

@media (max-width: 768px) {
  .order-card-cost-panel .order-cost-card {
    min-height: 64px !important;
    padding: 7px 8px !important;
  }

  .order-card-cost-panel .order-cost-card--total {
    min-height: 74px !important;
  }

  .order-card-cost-panel .order-cost-card--total strong,
  .order-card-cost-panel .order-cost-total-value {
    font-size: 28px !important;
  }
}

/* ORDER COST UI HARD V2 END */

/* ORDER COST UI FINAL OVERRIDE START */

.order-card-cost-panel .order-cost-grid {
  gap: 8px !important;
}

.order-card-cost-panel .order-cost-card {
  min-height: 74px !important;
  padding: 8px 10px !important;
  border-radius: 12px !important;
}

.order-card-cost-panel .order-cost-card small {
  font-size: 11px !important;
  line-height: 1.05 !important;
  margin-bottom: 3px !important;
}

.order-card-cost-panel .order-cost-card strong {
  font-size: 15px !important;
  line-height: 1.08 !important;
}

/* Тариф — принудительно мельче */
.order-card-cost-panel [data-order-cost-tariff] {
  font-size: 13px !important;
  line-height: 1.08 !important;
  font-weight: 800 !important;
  color: #0b2f67 !important;
}

/* Итого — главный визуальный блок */
.order-card-cost-panel [data-order-cost-total] {
  font-size: 34px !important;
  line-height: 0.95 !important;
  font-weight: 950 !important;
  color: #16a34a !important;
}

/* Карточка Итого, если класс уже проставлен */
.order-card-cost-panel .order-cost-card--total {
  min-height: 86px !important;
  border: 2px solid #86efac !important;
  background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 100%) !important;
  box-shadow: 0 10px 22px rgba(22, 101, 52, 0.14) !important;
}

.order-card-cost-panel .order-cost-card--total small {
  color: #166534 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

html[data-theme="dark"] .order-card-cost-panel [data-order-cost-tariff] {
  color: #bfdbfe !important;
}

html[data-theme="dark"] .order-card-cost-panel [data-order-cost-total] {
  color: #86efac !important;
}

html[data-theme="dark"] .order-card-cost-panel .order-cost-card--total {
  border-color: rgba(134, 239, 172, 0.55) !important;
  background: rgba(20, 83, 45, 0.34) !important;
}

@media (max-width: 768px) {
  .order-card-cost-panel .order-cost-card {
    min-height: 66px !important;
    padding: 7px 8px !important;
  }

  .order-card-cost-panel [data-order-cost-tariff] {
    font-size: 11px !important;
  }

  .order-card-cost-panel [data-order-cost-total] {
    font-size: 30px !important;
  }
}

/* ORDER COST UI FINAL OVERRIDE END */

/* ===== TENANT BILLING START ===== */

.billing-page {
  max-width: 1180px;
}

.billing-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 18px;
  margin-top: 24px;
}

.billing-balance-card,
.billing-topup-card,
.empty-state {
  padding: 22px;
  border-radius: 20px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.billing-balance-card span,
.billing-balance-card strong,
.billing-balance-card small,
.billing-topup-card span,
.billing-topup-card strong,
.billing-topup-card small {
  display: block;
}

.billing-balance-card span,
.billing-topup-card span {
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
}

.billing-balance-card strong {
  margin: 10px 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1;
}

.billing-topup-card strong {
  margin: 10px 0;
  font-size: 24px;
}

.billing-topup-card .ghost-button {
  margin-top: 16px;
  opacity: 0.65;
  cursor: not-allowed;
}

.notice {
  padding: 12px 14px;
  margin: 18px 0;
  border-radius: 12px;
  font-weight: 700;
}

.notice.success {
  background: #dcfce7;
  color: #166534;
}

.section-block {
  margin-top: 28px;
}

.section-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.empty-state {
  color: #6b7280;
  font-weight: 700;
}

html[data-theme="dark"] .billing-balance-card,
html[data-theme="dark"] .billing-topup-card,
html[data-theme="dark"] .empty-state {
  background: var(--bg-soft-2);
  border-color: var(--border);
}

@media (max-width: 760px) {
  .billing-summary-grid {
    grid-template-columns: 1fr;
  }

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

/* ===== TENANT BILLING END ===== */


/* ===== TENANT BILLING TOPUP FORM START ===== */

.billing-topup-form {
  display: grid;
  gap: 12px;
}

.billing-topup-form label {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.billing-topup-form input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font-size: 16px;
}

.primary-button {
  border: 0;
  cursor: pointer;
  font: inherit;
  display: inline-block;
  padding: 12px 18px;
  border-radius: 12px;
  background: #111827;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
}

html[data-theme="dark"] .billing-topup-form input {
  background: var(--bg-soft);
  color: var(--text-main);
  border-color: var(--border);
}

/* ===== TENANT BILLING TOPUP FORM END ===== */


/* ===== TENANT BILLING SPEEDPAY START ===== */

.speedpay-status {
  padding: 10px 12px;
  border-radius: 12px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 13px;
  font-weight: 700;
}

.speedpay-status-error {
  background: #fee2e2;
  color: #991b1b;
}

.speedpay-container {
  display: grid;
  gap: 10px;
  min-height: 44px;
}

.billing-fallback-form {
  margin: 0;
  display: grid;
}

html[data-theme="dark"] .speedpay-status {
  background: var(--bg-accent);
  color: var(--text-main);
}

html[data-theme="dark"] .speedpay-status-error {
  background: #3f1d24;
  color: #fecdd3;
}

/* ===== TENANT BILLING SPEEDPAY END ===== */


/* ===== BILLING GUARD ALERTS START ===== */

.billing-guard-warning-list {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.billing-guard-alert {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid transparent;
}

.billing-guard-alert strong,
.billing-guard-alert p {
  display: block;
}

.billing-guard-alert strong {
  margin-bottom: 6px;
  font-size: 15px;
}

.billing-guard-alert p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.billing-guard-alert .mini-button {
  margin-top: 10px;
}

.billing-guard-alert-warning {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
}

.billing-guard-alert-danger {
  margin: 18px 0;
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

.order-card-billing-lock,
.order-card-billing-warning-list {
  margin: 0 0 14px;
}

.order-card-actions button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

html[data-theme="dark"] .billing-guard-alert-warning {
  background: #3b2f12;
  border-color: #854d0e;
  color: #fde68a;
}

html[data-theme="dark"] .billing-guard-alert-danger {
  background: #3f1d24;
  border-color: #7f1d1d;
  color: #fecdd3;
}

/* ===== BILLING GUARD ALERTS END ===== */


/* ===== SUPPORT EMAIL CONTACT START ===== */

.support-footer {
  margin-top: 22px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
}

.support-footer span {
  color: var(--text-muted);
}

.support-footer a,
.support-email-link,
.landing-footer a {
  color: inherit;
  font-weight: 800;
  text-decoration: none;
}

.support-footer a:hover,
.support-email-link:hover,
.landing-footer a:hover {
  text-decoration: underline;
}

.billing-support-card {
  padding: 18px;
  border-radius: 18px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  display: grid;
  gap: 8px;
}

.billing-support-card span,
.billing-support-card small {
  color: var(--text-muted);
}

.billing-support-card strong {
  font-size: 18px;
}

.support-email-link {
  width: fit-content;
}

.mini-button-muted {
  background: transparent;
}

@media (max-width: 720px) {
  .support-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ===== SUPPORT EMAIL CONTACT END ===== */


/* ===== TENANT EMAIL VERIFICATION START ===== */

.register-tenant-card {
  max-width: 760px;
}

.registration-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.registration-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  background: var(--bg-soft);
  color: var(--text-muted);
}

.registration-step strong {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.08);
  color: inherit;
}

.registration-step-active {
  color: var(--text-main);
  border-color: rgba(37, 99, 235, 0.35);
}

.registration-step-done {
  color: #166534;
  border-color: rgba(22, 101, 52, 0.35);
}

.verification-panel,
.verified-email-box {
  margin: 18px 0;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--border-soft);
  background: var(--bg-soft);
}

.verification-panel h2 {
  margin-top: 0;
}

.verification-form,
.verification-code-form {
  margin-top: 14px;
}

.code-input {
  max-width: 220px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 8px;
  text-align: center;
}

.verified-email-box {
  display: grid;
  gap: 4px;
  border-color: rgba(22, 101, 52, 0.35);
}

.verified-email-box strong {
  color: #166534;
}

.support-inline-note {
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-muted);
}

.support-inline-note a {
  color: inherit;
  font-weight: 800;
  text-decoration: none;
}

.support-inline-note a:hover {
  text-decoration: underline;
}

html[data-theme="dark"] .registration-step-done,
html[data-theme="dark"] .verified-email-box strong {
  color: #86efac;
}

@media (max-width: 720px) {
  .registration-steps {
    grid-template-columns: 1fr;
  }
}

/* ===== TENANT EMAIL VERIFICATION END ===== */


/* ===== SUPPORT FORM START ===== */

.support-page-card {
  max-width: 760px;
}

.support-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 150px;
}

.support-hidden-field {
  position: absolute;
  left: -10000px;
  opacity: 0;
  pointer-events: none;
}

.support-context-box,
.support-direct-email {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  background: var(--bg-soft);
  display: grid;
  gap: 4px;
}

.support-context-box span,
.support-direct-email span {
  color: var(--text-muted);
  font-size: 13px;
}

.support-context-box strong,
.support-direct-email strong {
  font-size: 15px;
}

/* ===== SUPPORT FORM END ===== */


/* ===== ORDER DISPATCH SETTINGS START ===== */

.tenant-order-dispatch-section {
  border-color: rgba(37, 99, 235, 0.25);
}

.dispatch-settings-form {
  display: grid;
  gap: 18px;
}

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

.dispatch-field-wide {
  grid-column: 1 / -1;
}

.dispatch-settings-note {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: 14px;
}

.dispatch-punishment-box {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px dashed var(--border-soft);
  background: rgba(15, 23, 42, 0.02);
}

html[data-theme="dark"] .dispatch-punishment-box {
  background: rgba(255, 255, 255, 0.03);
}

@media (max-width: 760px) {
  .dispatch-settings-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== ORDER DISPATCH SETTINGS END ===== */


/* ===== DRIVER DISPATCH OFFER LIST START ===== */

.driver-terminal-offer-list-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(37, 99, 235, 0.28);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.98));
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
}

.driver-terminal-offer-list-badge {
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: #1d4ed8;
  color: #ffffff;
  font-size: 12px;
  font-weight: 950;
}

.driver-terminal-offer-list-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.driver-terminal-offer-list-title strong {
  font-size: 18px;
}

.driver-terminal-offer-list-title span {
  color: #16a34a;
  font-size: 19px;
  font-weight: 950;
  white-space: nowrap;
}

.driver-terminal-offer-list-grid {
  display: grid;
  grid-template-columns: minmax(86px, auto) 1fr;
  gap: 7px 10px;
  align-items: start;
}

.driver-terminal-offer-list-grid span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.driver-terminal-offer-list-grid strong {
  color: #0f172a;
  font-size: 14px;
  line-height: 1.35;
}

.driver-terminal-offer-list-punishment {
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255, 247, 237, 0.95);
  border: 1px solid rgba(251, 146, 60, 0.3);
  color: #9a3412;
  font-weight: 850;
  line-height: 1.35;
}

.driver-terminal-offer-list-actions {
  display: grid;
  gap: 8px;
}

.driver-terminal-offer-list-actions form {
  display: grid;
}

.driver-terminal-offer-list-accept,
.driver-terminal-offer-list-decline {
  width: 100%;
  border-radius: 14px;
  min-height: 48px;
  font-size: 15px;
  font-weight: 950;
  cursor: pointer;
}

.driver-terminal-offer-list-accept {
  border: 0;
  color: #ffffff;
  background: #16a34a;
  box-shadow: 0 10px 22px rgba(22, 163, 74, 0.22);
}

.driver-terminal-offer-list-decline {
  color: #991b1b;
  background: rgba(254, 226, 226, 0.92);
  border: 1px solid rgba(248, 113, 113, 0.45);
}

html[data-theme="dark"] .driver-terminal-offer-list-card {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
  border-color: rgba(96, 165, 250, 0.38);
}

html[data-theme="dark"] .driver-terminal-offer-list-grid strong {
  color: #e5e7eb;
}

html[data-theme="dark"] .driver-terminal-offer-list-punishment {
  background: rgba(124, 45, 18, 0.32);
  color: #fed7aa;
}

/* ===== DRIVER DISPATCH OFFER LIST END ===== */


/* ===== DRIVER ACTIVE OFFER MAP MARKER START ===== */

.driver-terminal-active-offer-marker {
  background: transparent !important;
  border: 0 !important;
}

.driver-terminal-active-offer-button {
  display: grid;
  place-items: center;
  min-width: 106px;
  height: 32px;
  padding: 0 10px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.32);
  font-size: 11px;
  line-height: 1;
  font-weight: 950;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

/* ===== DRIVER ACTIVE OFFER MAP MARKER END ===== */

/* ORDER ROUTE MAP MOUSE DRAG FIX V1 START */
#orderModal [data-route-map],
#orderModal .order-card-route-map,
#orderModal [data-route-map].leaflet-container,
#orderModal .order-card-route-map.leaflet-container {
  cursor: grab !important;
  touch-action: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  pointer-events: auto !important;
}

#orderModal [data-route-map].leaflet-dragging,
#orderModal [data-route-map].leaflet-dragging .leaflet-grab,
#orderModal [data-route-map].leaflet-dragging .leaflet-marker-draggable {
  cursor: grabbing !important;
}

#orderModal [data-route-map] .leaflet-pane,
#orderModal [data-route-map] .leaflet-map-pane,
#orderModal [data-route-map] .leaflet-tile-pane,
#orderModal [data-route-map] .leaflet-overlay-pane,
#orderModal [data-route-map] .leaflet-marker-pane,
#orderModal [data-route-map] .leaflet-tooltip-pane,
#orderModal [data-route-map] .leaflet-popup-pane,
#orderModal [data-route-map] .leaflet-control-container,
#orderModal [data-route-map] .leaflet-top,
#orderModal [data-route-map] .leaflet-bottom,
#orderModal [data-route-map] .leaflet-control,
#orderModal [data-route-map] .leaflet-interactive {
  pointer-events: auto !important;
}

#orderModal [data-route-map-placeholder] {
  pointer-events: none !important;
}
/* ORDER ROUTE MAP MOUSE DRAG FIX V1 END */

/* OPERATOR ORDERS LIVE STATUS V1 START */
.operator-assigned-car-badge-live .operator-driver-live-status-line {
  margin-top: 3px;
  padding-top: 3px;
  border-top: 1px dashed rgba(22, 101, 52, 0.24);
  color: #14532d;
  font-weight: 900;
}

.order-list-row[data-operator-live-updated-at] {
  transition: background-color 0.18s ease;
}
/* OPERATOR ORDERS LIVE STATUS V1 END */

/* ORDER ROUTE MAP LEAFLET LAYERS DRAG FIX V1 START */
#orderModal [data-route-map] .leaflet-overlay-pane,
#orderModal [data-route-map] .leaflet-overlay-pane svg,
#orderModal [data-route-map] .leaflet-overlay-pane path,
#orderModal [data-route-map] .leaflet-marker-pane,
#orderModal [data-route-map] .leaflet-marker-icon,
#orderModal [data-route-map] .leaflet-marker-shadow,
#orderModal [data-route-map] .leaflet-tooltip-pane,
#orderModal [data-route-map] .leaflet-tooltip,
#orderModal [data-route-map] .operator-nearest-driver-marker,
#orderModal [data-route-map] .operator-assigned-order-driver-marker,
#orderModal [data-route-map] .operator-standalone-assigned-driver-marker-v1,
#orderModal [data-route-map] .order-route-label-marker,
#orderModal [data-route-map] .route-point-label-anchor,
#orderModal [data-route-map] .route-point-label-tooltip {
  pointer-events: none !important;
}

#orderModal [data-route-map] .leaflet-control-container,
#orderModal [data-route-map] .leaflet-control-container *,
#orderModal [data-route-map] .leaflet-popup-pane,
#orderModal [data-route-map] .leaflet-popup-pane * {
  pointer-events: auto !important;
}
/* ORDER ROUTE MAP LEAFLET LAYERS DRAG FIX V1 END */
