* {
  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 ===== */

/* ===== TELEPHONY ADVANCED SETTINGS START ===== */
.advanced-settings-block {
  grid-column: 1 / -1;
  padding: 16px;
  border: 1px dashed #d1d5db;
  border-radius: 16px;
  background: #f9fafb;
}

.advanced-settings-block summary {
  cursor: pointer;
  font-weight: 800;
  color: #374151;
}

.advanced-settings-block label {
  margin-top: 16px;
}
/* ===== TELEPHONY ADVANCED SETTINGS END ===== */

/* ===== OPERATOR PHONE START ===== */
.operator-phone-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

.operator-status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.operator-phone-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 18px 0;
}

.call-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
}

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

.call-card span {
  color: #6b7280;
  font-weight: 700;
}

.call-card strong {
  margin-top: 6px;
  font-size: 22px;
}

.operator-log {
  margin-top: 22px;
}

.operator-log pre {
  min-height: 180px;
  max-height: 320px;
  overflow: auto;
  padding: 14px;
  border-radius: 14px;
  background: #111827;
  color: #d1fae5;
  font-size: 13px;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

@media (max-width: 960px) {
  .operator-phone-layout {
    grid-template-columns: 1fr;
  }

  .operator-status-grid {
    grid-template-columns: 1fr;
  }
}
/* ===== OPERATOR PHONE END ===== */
