:root {
  --bg: #eef3f8;
  --panel: #fff;
  --line: #d7e0ec;
  --text: #172033;
  --muted: #68768b;
  --blue: #1463d8;
  --red: #c93b4a;
  --shadow: 0 12px 34px rgba(24, 39, 66, 0.1);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: linear-gradient(180deg, #e7eef8 0, var(--bg) 260px);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}
[hidden] { display: none !important; }
button, input, select { font: inherit; }
textarea { font: inherit; }

.landing-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(0, 166, 118, .14), transparent 32vw),
    radial-gradient(circle at top left, rgba(20, 99, 216, .13), transparent 36vw),
    linear-gradient(180deg, #f8fbff 0, #eef3f8 58%, #e8eef7 100%);
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 58px);
  background: rgba(255,255,255,.88);
  border-bottom: 1px solid rgba(215,224,236,.86);
  backdrop-filter: blur(14px);
}

.landing-nav strong {
  font-size: 20px;
  color: #10213c;
}

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

.landing-nav a {
  color: #284467;
  font-weight: 800;
  text-decoration: none;
}

.hero-section,
.landing-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .85fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
  min-height: calc(100vh - 70px);
  padding: 54px 0 42px;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 12px;
  color: #1463d8;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero-copy h1,
.landing-section h2 {
  margin: 0;
  color: #111c31;
  letter-spacing: 0;
}

.hero-copy h1 {
  max-width: 780px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: .98;
}

.hero-copy p,
.landing-section p,
.problem-list {
  color: #526176;
  font-size: 17px;
  line-height: 1.6;
}

.hero-copy .hero-note {
  max-width: 650px;
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid #c9d8ed;
  border-left: 4px solid #1463d8;
  border-radius: 8px;
  background: rgba(255,255,255,.72);
  color: #334155;
  font-size: 15px;
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.landing-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  text-decoration: none;
}

.hero-product-preview {
  display: grid;
  gap: 16px;
}

.hero-board {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(24, 39, 66, .16);
  transform: translateY(8px);
}

.hero-plan {
  transform: translateY(0);
  box-shadow: 0 18px 48px rgba(24, 39, 66, .13);
}

.mini-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #10213c;
  color: #fff;
}

.mini-board-head strong {
  font-size: 14px;
}

.mini-board-head span {
  color: #c8d7ed;
  font-size: 12px;
  font-weight: 800;
}

.mini-group {
  border-top: 1px solid var(--line);
}

.mini-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: #f5f8fc;
  border-left: 4px solid #94a3b8;
  color: #17233a;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.mini-group-title strong {
  display: inline-grid;
  min-width: 26px;
  min-height: 24px;
  place-items: center;
  border-radius: 6px;
  background: #fff;
  color: #10213c;
  box-shadow: inset 0 0 0 1px var(--line);
}

.mini-group-empty .mini-group-title {
  border-left-color: #2f80ed;
}

.mini-group-pl .mini-group-title {
  border-left-color: #06945d;
}

.mini-group-foreign .mini-group-title {
  border-left-color: #8b5cf6;
}

.mini-group-repair .mini-group-title {
  border-left-color: #df3446;
}

.mini-table {
  display: grid;
  grid-template-columns: .86fr .9fr 1fr .94fr .94fr .82fr .96fr;
  align-items: center;
}

.mini-table-empty {
  grid-template-columns: .9fr 1.15fr 1.15fr .95fr;
}

.mini-table > * {
  min-height: 38px;
  padding: 8px 7px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}

.mini-table > strong,
.mini-table > :nth-child(7n + 1) {
  white-space: nowrap;
}

.mini-table:not(.mini-table-empty) > :nth-child(-n+7) {
  background: #eef3f9;
  color: #334155;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.mini-table-empty > :nth-child(-n+4) {
  background: #eef3f9;
  color: #334155;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.chip {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 11px;
  line-height: 1.05;
  text-align: center;
  white-space: nowrap;
}
.chip.status-blue { background: #0087c7; }
.chip.status-green { background: #059669; }
.chip.status-violet { background: #7c3aed; }
.chip.status-red { background: #d23b3b; }
.chip.status-brown { background: #91563c; }
.chip.driver-gold { background: #d89b18; color: #10213c; }
.chip.driver-teal { background: #12a6a6; }
.chip.driver-violet { background: #7c3aed; }
.muted-chip {
  background: #eef3f9;
  color: #334155;
  font-weight: 800;
  text-align: center;
}

.mini-plan-grid {
  display: grid;
  grid-template-columns: 1.02fr repeat(4, minmax(0, 1fr));
}

.mini-plan-grid > * {
  min-height: 44px;
  padding: 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.mini-plan-head {
  background: #eef3f9;
  color: #334155;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.mini-plan-person {
  display: grid;
  gap: 4px;
  background: #f8fbff;
}

.mini-plan-person strong {
  color: #10213c;
  font-size: 12px;
  text-transform: uppercase;
}

.mini-plan-person span,
.mini-plan-task small,
.mini-plan-off span {
  color: #526176;
  font-size: 10px;
  font-weight: 800;
}

.mini-plan-task {
  border-left: 4px solid #1463d8;
  background: #f2f7ff;
}

.mini-plan-load {
  border-left-color: #e0a313;
  background: #fff8e1;
}

.mini-plan-return {
  border-left-color: #00a676;
  background: #effff6;
}

.mini-plan-task strong,
.mini-plan-task span,
.mini-plan-task small,
.mini-plan-off strong,
.mini-plan-off span {
  display: block;
}

.mini-plan-task strong {
  color: #0f5fbb;
  font-size: 10px;
}

.mini-plan-task span {
  margin-top: 2px;
  color: #10213c;
  font-size: 11px;
  font-weight: 950;
  line-height: 1.18;
}

.mini-plan-off {
  border-left: 4px solid #111827;
  background: #f8fafc;
}

.mini-plan-off strong {
  color: #111827;
  font-size: 11px;
}

.mini-plan-empty {
  display: grid;
  place-items: center;
  color: #1463d8;
  font-size: 16px;
  font-weight: 950;
  background: #fff;
}

.module-section {
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(520px, 1.05fr);
  gap: 28px;
  align-items: center;
}

.board-showcase {
  align-items: start;
}

.module-copy p {
  margin-bottom: 0;
}

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

.module-points span,
.integration-card {
  border: 1px solid #cddced;
  border-radius: 8px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 10px 26px rgba(24, 39, 66, .07);
}

.module-points span {
  padding: 11px 12px;
  color: #20324d;
  font-size: 13px;
  font-weight: 900;
}

.planner-showcase-card,
.board-showcase-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(24, 39, 66, .14);
}

.showcase-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: #f5f8fc;
  border-bottom: 1px solid var(--line);
  color: #10213c;
}

.showcase-toolbar.dark {
  background: #10213c;
  color: #fff;
}

.showcase-toolbar span {
  color: #526176;
  font-size: 12px;
  font-weight: 800;
}

.showcase-toolbar.dark span {
  color: #c8d7ed;
}

.showcase-plan-grid {
  display: grid;
  grid-template-columns: 1.1fr repeat(5, minmax(95px, 1fr));
}

.showcase-plan-grid > * {
  min-height: 58px;
  padding: 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.showcase-head {
  display: grid;
  place-items: center;
  background: #eaf1f9;
  color: #20324d;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.showcase-head.is-today {
  background: #dcebff;
  color: #0453b5;
  box-shadow: inset 0 -3px 0 #1463d8;
}

.showcase-person {
  display: grid;
  align-content: center;
  gap: 4px;
  background: #f8fbff;
}

.showcase-person strong {
  color: #10213c;
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

.showcase-person span {
  width: max-content;
  max-width: 100%;
  padding: 4px 7px;
  border-radius: 5px;
  background: #e8eef6;
  color: #10213c;
  font-size: 12px;
  font-weight: 950;
}

.showcase-task {
  border-left: 4px solid #1463d8;
  background: #f3f7ff;
}

.showcase-task.load {
  border-left-color: #e0a313;
  background: #fff8e3;
}

.showcase-task.unload {
  border-left-color: #00a676;
  background: #effff6;
}

.showcase-task.loop {
  border-left-color: #8b5cf6;
  background: #f5f1ff;
}

.showcase-task strong,
.showcase-task span,
.showcase-off strong,
.showcase-off span {
  display: block;
}

.showcase-task strong {
  color: #10213c;
  font-size: 12px;
  line-height: 1.18;
}

.showcase-task span {
  margin-top: 4px;
  color: #526176;
  font-size: 11px;
  font-weight: 800;
}

.showcase-off {
  border-left: 4px solid #111827;
  background: #f8fafc;
}

.showcase-off.workshop {
  border-left-color: #df3446;
}

.showcase-off strong {
  color: #111827;
  font-size: 12px;
}

.showcase-off span {
  margin-top: 4px;
  color: #526176;
  font-size: 11px;
  font-weight: 800;
}

.showcase-empty {
  display: grid;
  place-items: center;
  color: #1463d8;
  font-size: 18px;
  font-weight: 950;
  background: #fff;
}

.integration-card {
  margin-top: 20px;
  padding: 16px;
}

.integration-card strong {
  color: #10213c;
  font-size: 16px;
}

.integration-card p {
  margin-top: 8px;
  font-size: 14px;
}

.showcase-board-grid {
  display: grid;
}

.board-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: #f5f8fc;
  border-left: 4px solid #94a3b8;
  color: #10213c;
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

.board-group-title.pl {
  border-left-color: #91563c;
}

.board-group-title.empty {
  border-left-color: #2f80ed;
}

.board-group-title.foreign {
  border-left-color: #8b5cf6;
}

.board-group-title strong {
  display: inline-grid;
  min-width: 26px;
  min-height: 24px;
  place-items: center;
  border-radius: 6px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.board-row {
  display: grid;
  grid-template-columns: .8fr 1.35fr 1fr .9fr .9fr 1fr;
  align-items: stretch;
}

.board-row > * {
  min-height: 44px;
  padding: 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.board-row.head > * {
  min-height: 34px;
  background: #eaf1f9;
  color: #334155;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.board-row .chip {
  min-height: 44px;
}

.landing-section {
  padding: 50px 0;
}

.section-title {
  max-width: 760px;
  margin-bottom: 22px;
}

.landing-section h2 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
}

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

.feature-grid article,
.demo-card,
.legal-section details {
  background: rgba(255,255,255,.86);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.feature-grid article {
  padding: 18px;
}

.feature-grid h3 {
  margin: 0 0 8px;
}

.feature-grid p {
  margin: 0;
  font-size: 14px;
}

.split-section,
.demo-section {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(320px, 1fr);
  gap: 26px;
  align-items: start;
}

.problem-list {
  margin: 0;
  padding: 20px 24px;
  background: #10213c;
  color: #e7eef8;
  border-radius: 8px;
}

.problem-list li + li {
  margin-top: 10px;
}

.demo-benefits {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.demo-benefits span {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #20324d;
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(24,39,66,.06);
}

.demo-benefits span::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #00a676;
}

.demo-card {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.demo-card h3 {
  margin: 0;
  font-size: 22px;
  color: #10213c;
}

.form-note {
  margin: -2px 0 4px;
  padding: 12px;
  border: 1px solid #c9d8ed;
  border-radius: 8px;
  background: #f5f9ff;
  color: #526176;
  font-size: 14px;
  line-height: 1.45;
}

.demo-form-group {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dce5f1;
  border-radius: 8px;
  background: #fff;
}

.demo-form-group > span {
  color: #1463d8;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.demo-card input,
.demo-card textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
}

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

.consent-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  color: #526176;
  font-size: 13px;
  line-height: 1.4;
}

.pricing-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .36fr);
  gap: 20px;
  align-items: center;
  padding: 24px;
  background: #10213c;
  border-radius: 10px;
  color: #eef5ff;
  box-shadow: 0 24px 70px rgba(24, 39, 66, .18);
}

.pricing-card h3 {
  margin: 10px 0 8px;
  font-size: 28px;
}

.pricing-card p {
  margin: 0;
  color: #cbd8ea;
}

.pricing-badge {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  color: #cfe3ff;
  font-weight: 900;
  font-size: 12px;
  text-transform: uppercase;
}

.price-box {
  display: grid;
  gap: 8px;
  padding: 18px;
  background: #fff;
  border-radius: 8px;
  color: var(--text);
}

.price-box strong {
  font-size: 24px;
}

.price-box span {
  color: var(--muted);
  font-weight: 800;
}

.price-box small {
  color: #64748b;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
}

.legal-section details {
  padding: 16px 18px;
  margin-bottom: 10px;
}

.legal-section summary {
  cursor: pointer;
  font-weight: 900;
}

.mail-details {
  white-space: pre-wrap;
  margin: 0;
  font: inherit;
  font-size: 12px;
  color: #334155;
}

.demo-account-banner {
  position: sticky;
  top: 76px;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 20px 0;
  padding: 14px 16px;
  background: #fff7dc;
  border: 1px solid #f0d47a;
  border-left: 6px solid #f3a51c;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.demo-account-banner strong {
  display: block;
  color: #624800;
}

.demo-account-banner p {
  margin: 4px 0 0;
  color: #6d5000;
  font-size: 13px;
  font-weight: 700;
}

.activation-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 20px 0;
  padding: 14px 16px;
  border: 1px solid #c9d8ed;
  border-left: 5px solid var(--blue);
  border-radius: 10px;
  background: #f8fbff;
  box-shadow: var(--shadow);
}

.activation-notice strong {
  display: block;
  margin-bottom: 4px;
  color: #10213c;
}

.activation-notice p {
  margin: 0;
  color: #526176;
  font-size: 13px;
  font-weight: 700;
}

.activation-notice a {
  color: #1463d8;
  font-weight: 900;
  text-decoration: none;
}

.welcome-help-notice {
  border-left-color: #00a676;
}

.pricing-view-panel {
  padding: 22px;
}

.pricing-view-panel h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  color: #10213c;
}

.app-pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.app-price-card {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 250px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(24,39,66,.08);
}

.app-price-card.is-featured {
  border-color: #1463d8;
  box-shadow: 0 16px 36px rgba(20,99,216,.16);
}

.app-price-card span {
  color: #1463d8;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.app-price-card strong {
  color: #10213c;
  font-size: 30px;
  line-height: 1.05;
}

.app-price-card p {
  margin: 0;
  color: #526176;
  font-size: 14px;
}

.pricing-note {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #c9d8ed;
  border-left: 5px solid #1463d8;
  border-radius: 10px;
  background: #f8fbff;
}

.pricing-note strong {
  display: block;
  margin-bottom: 4px;
  color: #10213c;
}

.help-panel h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  color: #10213c;
}

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

.help-grid article,
.onboarding-help {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #c9d8ed;
  border-radius: 10px;
  background: #f8fbff;
}

.help-grid strong,
.onboarding-help strong {
  color: #10213c;
}

.help-grid a,
.onboarding-help a {
  color: #1463d8;
  font-weight: 900;
  text-decoration: none;
}

.onboarding-help {
  border-left: 5px solid #1463d8;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 20px;
}
.login-card {
  display: grid;
  gap: 12px;
  width: min(420px, 100%);
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.auth-shell {
  background:
    radial-gradient(circle at top left, rgba(20, 99, 216, .18), transparent 32vw),
    linear-gradient(135deg, #101827 0%, #233e61 100%);
}
.auth-shell .login-card {
  border-color: rgba(255,255,255,.22);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .26);
}
.login-card h1 { margin: 0; }
.login-card p { margin: 0 0 8px; color: var(--muted); }
.login-card input, .inline-form input, .inline-form select, .toolbar input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  background: #fff;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 22px;
  background: linear-gradient(135deg, #101827 0%, #1f334f 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar h1 { margin: 0; font-size: 23px; }
.topbar p { margin: 4px 0 0; color: #b8c7dc; font-size: 13px; }
.topbar-actions, .toolbar, .section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.view { padding: 18px 20px 24px; }

.primary-btn, .ghost-btn, .danger-btn {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 13px;
  cursor: pointer;
  font-weight: 700;
}
.primary-btn { background: linear-gradient(180deg, #1f7af2, var(--blue)); color: #fff; }
.ghost-btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: #eef5ff; }
.ghost-btn.is-active { background: #fff; color: #12365f; }
.light-btn { background: #fff; border-color: var(--line); color: var(--text); }
.danger-btn { background: #fff1f3; border-color: #f0b8bf; color: #9d2430; }
.error-text { color: var(--red); min-height: 20px; font-weight: 700; }
.info-text { color: #0f7a4b; min-height: 20px; font-weight: 700; }
.link-btn {
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-weight: 800;
  padding: 4px;
}
.file-btn input { display: none; }

.toolbar, .panel {
  background: rgba(255,255,255,.78);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.toolbar { margin-bottom: 12px; padding: 12px; }
.panel { margin-bottom: 16px; padding: 16px; }
.sync-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -2px 0 12px;
  padding: 10px 12px;
  background: #fff7dc;
  border: 1px solid #f0d47a;
  border-radius: 8px;
  color: #6d5000;
  font-weight: 700;
}
.panel h2 { margin: 0 0 4px; }
.panel h3 {
  margin: 18px 0 8px;
  font-size: 15px;
}
.panel p { margin: 0 0 12px; color: var(--muted); font-size: 13px; }

.driver-plan-panel {
  background: #f8fbff;
}

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

.week-controls input {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 9px;
  background: #fff;
}

.driver-plan-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.driver-plan-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #45566f;
  font-size: 12px;
  font-weight: 800;
}

.driver-plan-legend strong {
  color: #10213c;
}

.driver-plan-table-wrap {
  max-height: calc(100vh - 220px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 12px 28px rgba(15, 23, 42, .08);
}

.driver-plan-table {
  min-width: 930px;
  table-layout: fixed;
}

.driver-plan-table th,
.driver-plan-table td {
  height: auto;
  vertical-align: top;
}

.driver-plan-table th {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 9px 8px;
  background: #eaf1f9;
  color: #14233b;
}

.driver-plan-table th strong {
  display: block;
  margin-top: 3px;
  color: #1463d8;
  font-size: 13px;
}

.driver-plan-table th.is-today {
  background: #dbeafe;
  box-shadow: inset 0 -3px 0 #1463d8;
}

.driver-plan-table th.is-today strong {
  color: #0f4fb3;
}

.driver-plan-holidays {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px;
  margin-top: 5px;
}

.driver-plan-holidays span {
  display: inline-flex;
  min-width: 24px;
  justify-content: center;
  padding: 2px 4px;
  border-radius: 999px;
  background: #fff3cd;
  color: #7a4b00;
  border: 1px solid #f0d48a;
  font-size: 10px;
  font-weight: 950;
}

.driver-plan-person {
  width: 142px;
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
}

th.driver-plan-person {
  top: 0;
  z-index: 8;
  background: #eaf1f9;
}

.driver-plan-person-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.driver-plan-order-btn {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid #b7c8de;
  border-radius: 50%;
  background: #fff;
  color: #1463d8;
  cursor: pointer;
  font-weight: 900;
}

.driver-plan-table td.driver-plan-person {
  padding: 4px 5px;
}

.driver-plan-driver,
.driver-plan-tractor {
  display: block;
  width: 100%;
  border-radius: 4px;
  padding: 5px 6px;
  font-weight: 900;
  line-height: 1.05;
  font-size: 12px;
}

.driver-plan-driver {
  color: #fff;
  text-transform: uppercase;
}

.driver-plan-tractor {
  margin-top: 3px;
  background: #eef3f9;
  color: #22314a;
  font-size: 12px;
}

.driver-plan-day {
  width: 138px;
  min-width: 138px;
  padding: 4px;
  background: #fff;
}

.driver-plan-day.is-today {
  background: #f0f6ff;
  box-shadow: inset 3px 0 0 #1463d8;
}

.driver-plan-day.is-blocked {
  background: #f8fbff;
}

.driver-plan-day.is-empty {
  padding: 3px;
  text-align: center;
}

.driver-plan-auto {
  display: grid;
  gap: 4px;
}

.driver-plan-task {
  position: relative;
  width: 100%;
  border: 1px solid #b9d4f7;
  border-left: 4px solid #1463d8;
  border-radius: 6px;
  padding: 5px 24px 5px 6px;
  background: linear-gradient(180deg, #f7fbff 0%, #eef6ff 100%);
  color: #13233c;
  text-align: left;
  box-shadow: 0 2px 5px rgba(20, 99, 216, .08);
}

.driver-plan-task.is-return {
  border-color: #b8e4cb;
  border-left-color: #00a676;
  background: linear-gradient(180deg, #f5fff9 0%, #eafff3 100%);
}

.driver-plan-task.is-load {
  border-color: #f1d99a;
  border-left-color: #e0a313;
  background: linear-gradient(180deg, #fffdf3 0%, #fff6d9 100%);
}

.driver-plan-task strong,
.driver-plan-task span,
.driver-plan-task small {
  display: block;
}

.driver-plan-task strong {
  color: #0f5fbb;
  font-size: 11px;
}

.driver-plan-task span {
  margin-top: 2px;
  font-weight: 900;
  line-height: 1.2;
  font-size: 12px;
}

.driver-plan-task small {
  margin-top: 3px;
  color: #526176;
  line-height: 1.2;
}

#driverPlanTable.is-mono .driver-plan-table th,
#driverPlanTable.is-mono th.driver-plan-person {
  background: #f2f4f7;
  color: #111827;
}

#driverPlanTable.is-mono .driver-plan-table th strong {
  color: #111827;
}

#driverPlanTable.is-mono .driver-plan-table th.is-today {
  background: #e5e7eb;
  box-shadow: inset 0 -3px 0 #111827;
}

#driverPlanTable.is-mono .driver-plan-day.is-today {
  background: #f7f7f7;
  box-shadow: inset 3px 0 0 #111827;
}

#driverPlanTable.is-mono .driver-plan-task,
#driverPlanTable.is-mono .driver-plan-task.is-load,
#driverPlanTable.is-mono .driver-plan-task.is-return,
#driverPlanTable.is-mono .driver-plan-task.is-note,
#driverPlanTable.is-mono .driver-plan-note-card {
  border-color: #111827;
  border-left-color: #111827;
  background: #fff;
  color: #111827;
  box-shadow: none;
}

#driverPlanTable.is-mono .driver-plan-task strong,
#driverPlanTable.is-mono .driver-plan-task small {
  color: #111827;
}

.driver-plan-note-card {
  position: relative;
  width: 100%;
  border: 1px solid #ead28c;
  border-radius: 6px;
  padding: 5px 24px 5px 6px;
  background: #fff8dc;
  color: #172033;
  text-align: left;
  font-size: 12px;
  line-height: 1.35;
}

.driver-plan-edit,
.driver-plan-note-edit {
  position: absolute;
  top: 4px;
  right: 4px;
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid #b7c8de;
  border-radius: 50%;
  background: #fff;
  color: #1463d8;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.driver-plan-add {
  width: 100%;
  min-height: 22px;
  margin-top: 3px;
  border: 1px solid #cdd8e7;
  border-radius: 6px;
  background: #fff;
  color: #1463d8;
  font-weight: 900;
  cursor: pointer;
}

.driver-plan-day.is-empty .driver-plan-add {
  display: inline-grid;
  width: 22px;
  min-height: 22px;
  place-items: center;
  margin: 0;
  border-radius: 50%;
  border-color: #b7c8de;
  padding: 0;
  font-size: 14px;
  line-height: 1;
}

.driver-order-modal {
  width: min(520px, calc(100vw - 28px));
}

.driver-order-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  max-height: min(60vh, 560px);
  overflow: auto;
}

.driver-order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px 38px;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.driver-order-row strong,
.driver-order-row span {
  display: block;
}

.driver-order-row strong {
  width: max-content;
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 5px;
  color: #fff;
  font-size: 13px;
  text-transform: uppercase;
}

.driver-order-row span {
  width: max-content;
  max-width: 100%;
  margin-top: 4px;
  padding: 4px 7px;
  border-radius: 5px;
  background: #e8eef6;
  color: #10213c;
  font-size: 12px;
  font-weight: 900;
}

.driver-order-row button {
  min-height: 34px;
  border: 1px solid #bfd0e5;
  border-radius: 6px;
  background: #fff;
  color: #1463d8;
  cursor: pointer;
  font-weight: 950;
}

.driver-order-row button:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.driver-task-driver-change {
  margin: 10px 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.driver-task-driver-change label {
  display: grid;
  gap: 6px;
  color: #3c4d67;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.driver-task-driver-change select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.summary-card {
  min-height: auto;
  padding: 11px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(24,39,66,.07);
}
.summary-card span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.summary-card strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.groups { display: grid; gap: 16px; }
.group {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.group-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: #f8fbff;
  border-bottom: 1px solid var(--line);
  font-weight: 800;
}
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 1560px; border-collapse: collapse; background: #fff; table-layout: fixed; }
.col-task { width: 170px; }
.col-load { width: 280px; }
.col-date { width: 280px; }
.col-driver { width: 180px; }
.col-tractor { width: 140px; }
.col-status { width: 170px; }
.col-last-load { width: 190px; }
.col-last-driver { width: 170px; }
.col-delete { width: 42px; }
th, td { height: 36px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 0; }
th { padding: 9px 8px; background: #eef3f9; color: #334155; font-size: 12px; text-transform: uppercase; }
th:nth-child(3),
td:nth-child(3) {
  min-width: 280px;
  width: 280px;
}
td input, td select { width: 100%; height: 36px; border: 0; padding: 6px 8px; background: transparent; }
.load-cell {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 36px;
  min-height: 36px;
}

.load-cell.return-enabled {
  grid-template-columns: 1fr 28px;
}

.load-cell.has-return {
  grid-template-rows: 36px 36px;
}

.load-cell.has-route {
  grid-template-rows: 36px 36px;
}

.load-cell.has-route.has-return {
  grid-template-rows: 36px 36px 36px;
}

.load-cell .current-load {
  grid-column: 1;
  grid-row: 1;
}

.unload-place {
  display: none;
  grid-column: 1;
  grid-row: 2;
  border-top: 1px solid var(--line);
  background: #fff7e8;
}

.load-cell.has-route .unload-place {
  display: block;
}

.return-load-add {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  justify-self: center;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: #13a65a;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  line-height: 20px;
  padding: 0;
}

.return-load-add.is-active {
  background: #0d7f45;
}

.load-remove {
  display: none;
  align-self: center;
  justify-self: center;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: #d23b3b;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  line-height: 20px;
  padding: 0;
}

.current-load-remove {
  grid-column: 2;
  grid-row: 1;
}

.return-load-remove {
  grid-column: 2;
  grid-row: 2;
}

.load-cell.has-route .return-load-remove,
.load-cell.has-route .return-load {
  grid-row: 3;
}

.load-cell.has-return .return-load-add {
  display: none;
}

.load-cell.has-return .load-remove {
  display: block;
}

.return-load {
  display: none;
  grid-column: 1;
  grid-row: 2;
  border-top: 1px solid var(--line);
  background: #f4fff8;
}

.load-cell.has-return .return-load {
  display: block;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, .44);
}

.modal-card {
  width: min(760px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
}

.driver-task-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 12px;
}

.driver-task-grid label {
  display: grid;
  gap: 6px;
  color: #3c4d67;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.driver-task-grid input,
.driver-task-grid select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  background: #fff;
  color: var(--text);
  font-weight: 600;
  text-transform: none;
}

.driver-task-update-board {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  color: #24364f;
  font-weight: 800;
}

.driver-task-update-board input {
  width: 18px;
  height: 18px;
}

.driver-task-warning {
  margin: 10px 0 0;
}

.driver-task-trailer-field { grid-column: 1; grid-row: 1; }
.driver-task-type-field { grid-column: 2; grid-row: 1; }

.driver-task-load-field:nth-of-type(3) { grid-column: 1; grid-row: 2; }
.driver-task-load-field:nth-of-type(4) { grid-column: 2; grid-row: 2; }
.driver-task-load-field:nth-of-type(5) { grid-column: 3; grid-row: 2; }

.driver-task-unload-field:nth-of-type(6) { grid-column: 1; grid-row: 3; }
.driver-task-unload-field:nth-of-type(7) { grid-column: 2; grid-row: 3; }
.driver-task-unload-field:nth-of-type(8) { grid-column: 3; grid-row: 3; }

.driver-task-return-field:nth-of-type(9) { grid-column: 1; grid-row: 4; }
.driver-task-return-field:nth-of-type(10) { grid-column: 2; grid-row: 4; }
.driver-task-return-field:nth-of-type(11) { grid-column: 3; grid-row: 4; }

.driver-task-return-unload-field:nth-of-type(12) { grid-column: 1; grid-row: 5; }
.driver-task-return-unload-field:nth-of-type(13) { grid-column: 2; grid-row: 5; }
.driver-task-return-unload-field:nth-of-type(14) { grid-column: 3; grid-row: 5; }

.driver-task-note-field {
  grid-column: 1 / -1;
  grid-row: 6;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

tr.has-return-load td {
  height: 72px;
}

tr.has-return-load .delete-row {
  height: 72px;
}

tr.has-return-load td select,
tr.has-return-load td > input:not(.current-load):not(.return-load) {
  height: 72px;
}
.date-cell {
  display: grid;
  grid-template-rows: 36px;
  min-width: 280px;
  width: 100%;
}

tr.has-return-load .date-cell {
  grid-template-rows: 36px 36px;
}

.date-time-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  height: 36px;
  min-width: 280px;
  width: 100%;
}

.date-time-fields input {
  min-width: 0;
  border-right: 1px solid var(--line);
}

.date-time-fields .unload-date-field {
  min-width: 138px;
}

.date-time-fields .unload-time-field {
  min-width: 112px;
  text-align: center;
}

.date-time-fields input:last-child {
  border-right: 0;
}

.return-date-time-fields {
  display: none;
  border-top: 1px solid var(--line);
  background: #f4fff8;
}

tr.has-return-load .return-date-time-fields {
  display: grid;
}
.driver-select, .tractor-select, .status-select { color: #fff; font-weight: 800; text-shadow: 0 1px 1px rgba(0,0,0,.28); }
.status-select { text-align: center; text-align-last: center; }
.delete-row { width: 100%; height: 36px; border: 0; background: #fff; color: var(--red); cursor: pointer; }
.empty { padding: 14px; color: var(--muted); font-weight: 700; }
.save-state {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.history-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr)) repeat(2, minmax(130px, auto)) auto;
  gap: 8px;
  margin-bottom: 10px;
  padding: 12px;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.audit-filters {
  grid-template-columns: minmax(220px, 2fr) minmax(140px, 1fr) repeat(2, minmax(130px, auto)) auto;
}

.history-filters input {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 9px;
  background: #fff;
}

.history-meta {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

tbody tr:hover td {
  background: #f9fbff;
}

td input:focus,
td select:focus,
.settings-row input:focus,
.settings-row select:focus,
.history-filters input:focus {
  outline: 2px solid rgba(20, 99, 216, 0.22);
  outline-offset: -1px;
}

.inline-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.settings-actions, .toggle-list, .settings-list {
  display: grid;
  gap: 10px;
}

.settings-actions {
  grid-template-columns: repeat(auto-fit, minmax(150px, max-content));
}

.billing-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: 8px;
}

.billing-panel h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.billing-panel p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.billing-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.billing-details span {
  padding: 7px 9px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--line);
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}

.settings-row {
  display: grid;
  gap: 8px;
  align-items: center;
}

.status-row { grid-template-columns: 54px minmax(220px, 1fr) 38px; }
.tractor-row { grid-template-columns: 54px minmax(220px, 1fr) 38px; }
.driver-row { grid-template-columns: 54px minmax(180px, 1fr) minmax(180px, 1fr) 38px; }
.load-hint-row { grid-template-columns: minmax(220px, 1fr) 38px; }

.settings-row input,
.settings-row select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 9px;
  background: #fff;
}

.settings-choice-row {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(180px, 260px);
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #24364f;
  font-weight: 800;
}

.settings-choice-row select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 9px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
}

.holiday-country-row {
  align-items: start;
  grid-template-columns: minmax(180px, 260px) minmax(260px, 1fr);
}

.holiday-country-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.holiday-country-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
  max-height: 330px;
  overflow: auto;
  padding-right: 4px;
}

.mini-switch-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  color: #24364f;
  font-size: 13px;
  font-weight: 900;
}

.mini-switch-row input {
  display: none;
}

.mini-switch-row .switch-track {
  width: 42px;
  height: 22px;
}

.mini-switch-row .switch-track::after {
  width: 18px;
  height: 18px;
}

.mini-switch-row input:checked + .switch-track {
  background: #16a085;
}

.mini-switch-row input:checked + .switch-track::after {
  transform: translateX(20px);
}

.mini-switch-row small {
  display: inline;
  margin: 0 0 0 4px;
  color: #68768b;
  font-size: 11px;
  font-weight: 900;
}

.color-preset {
  color: #fff;
  font-weight: 800;
  text-align: center;
  text-shadow: 0 1px 1px rgba(0,0,0,.35);
}

.compact-delete {
  height: 36px;
  border-radius: 6px;
  background: #fff1f3;
}

.switch-row {
  display: grid;
  grid-template-columns: 48px auto;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  cursor: pointer;
}

.switch-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  width: 48px;
  height: 26px;
  border-radius: 999px;
  background: #b9c4d3;
}

.switch-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.22);
  transition: transform .15s ease;
}

.switch-row input:checked + .switch-track { background: #16a085; }
.switch-row input:checked + .switch-track::after { transform: translateX(22px); }

.date-overdue { background: #ffe4e8; color: #9d2430; font-weight: 800; }
.date-today { background: #fff0cf; color: #8a4a00; font-weight: 800; }
.date-tomorrow { background: #fff9d8; color: #735c00; font-weight: 800; }
.readonly-colored-cell {
  font-weight: 800;
  text-shadow: 0 1px 1px rgba(0,0,0,.28);
}

@media (max-width: 760px) {
  body { background: var(--bg); }
  .landing-nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px;
  }
  .landing-nav nav {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }
  .landing-nav nav > * {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .hero-section,
  .landing-section,
  .split-section,
  .demo-section,
  .module-section,
  .pricing-card {
    width: calc(100% - 20px);
    grid-template-columns: 1fr;
  }
  .hero-section {
    min-height: auto;
    padding: 30px 0;
  }
  .hero-board {
    overflow-x: auto;
  }
  .planner-showcase-card,
  .board-showcase-card {
    overflow-x: auto;
  }
  .mini-table,
  .mini-plan-grid,
  .showcase-plan-grid,
  .showcase-board-grid {
    min-width: 980px;
  }
  .module-points {
    grid-template-columns: 1fr;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .hero-actions .landing-cta {
    width: 100%;
  }
  .demo-account-banner {
    top: 92px;
    align-items: stretch;
    flex-direction: column;
    margin: 8px;
  }
  .demo-account-banner .primary-btn {
    width: 100%;
  }
  .app-pricing-grid {
    grid-template-columns: 1fr;
  }
  .help-grid {
    grid-template-columns: 1fr;
  }
  .activation-notice {
    align-items: stretch;
    flex-direction: column;
    margin: 8px;
  }
  .activation-notice .ghost-btn {
    width: 100%;
  }
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 10px 10px 8px;
    position: sticky;
  }
  .topbar h1 { font-size: 18px; line-height: 1.1; }
  .topbar p {
    margin-top: 2px;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .topbar-actions {
    display: flex;
    width: calc(100vw - 20px);
    gap: 6px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 2px 0 4px;
    scrollbar-width: thin;
  }
  .topbar-actions .ghost-btn,
  .topbar-actions .danger-btn {
    flex: 0 0 auto;
    width: auto;
    min-height: 32px;
    padding: 0 10px;
    font-size: 13px;
    white-space: nowrap;
  }
  .view { padding: 8px; }
  .toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 8px;
    padding: 8px;
  }
  .toolbar .primary-btn,
  .toolbar .ghost-btn,
  .toolbar input {
    width: 100%;
    min-height: 34px;
  }
  .save-state {
    justify-content: center;
    min-height: 34px;
  }
  .sync-notice {
    align-items: stretch;
    flex-direction: column;
    font-size: 13px;
  }
  .summary-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .summary-card {
    min-height: 52px;
    padding: 9px 10px;
  }
  .summary-card strong { font-size: 20px; }
  .group { border-radius: 6px; }
  .group-header { padding: 10px; }
  .table-wrap {
    margin: 0 -1px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .history-filters, .audit-filters { grid-template-columns: 1fr; }
  .status-row, .tractor-row, .driver-row, .load-hint-row, .settings-actions, .billing-panel { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .toolbar { grid-template-columns: 1fr; }
  .summary-cards { grid-template-columns: 1fr; }
}
