:root {
  color-scheme: dark;
  --bg: #050a07;
  --surface: #0a120e;
  --surface-strong: #0e1913;
  --surface-soft: #101e16;
  --surface-raised: #14251b;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f5fbf7;
  --muted: #94a89b;
  --muted-strong: #bac8bf;
  --green: #24e879;
  --green-strong: #00c95f;
  --green-soft: rgba(36, 232, 121, 0.12);
  --amber: #ffc857;
  --danger: #ff6b6b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 12% -8%, rgba(36, 232, 121, 0.12), transparent 30rem),
    radial-gradient(circle at 95% 18%, rgba(36, 232, 121, 0.05), transparent 23rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button,
a {
  touch-action: manipulation;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(36, 232, 121, 0.35);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(72px + var(--safe-top));
  padding: calc(10px + var(--safe-top)) clamp(16px, 4vw, 28px) 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 10, 7, 0.86);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}

.brand-button {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.brand-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 15px;
  box-shadow: 0 10px 28px rgba(0, 201, 95, 0.13);
}

.brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-copy strong {
  overflow: hidden;
  font-size: clamp(0.98rem, 4vw, 1.08rem);
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-content: center;
  gap: 5px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
}

.icon-button span {
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: var(--text);
}

.main-container:focus {
  outline: none;
}

.main-container {
  width: min(100%, 1040px);
  flex: 1;
  margin: 0 auto;
  padding: 24px clamp(16px, 4vw, 30px) 52px;
}

.app-footer {
  width: min(100%, 1040px);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: auto auto 0;
  padding: 18px clamp(16px, 4vw, 30px) calc(24px + var(--safe-bottom));
  color: #708278;
  font-size: 0.72rem;
  border-top: 1px solid var(--line);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 7px;
  height: 7px;
  content: "";
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(36, 232, 121, 0.1);
}

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

.page-header h1,
.hero-copy h1,
.route-title h1 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 3.6rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.page-header p,
.hero-copy p,
.route-title p {
  max-width: 650px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 3vw, 1.08rem);
  line-height: 1.6;
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(210px, 0.6fr);
  align-items: stretch;
  gap: 20px;
  min-height: 270px;
  margin-bottom: 28px;
  padding: clamp(24px, 6vw, 44px);
  border: 1px solid rgba(36, 232, 121, 0.18);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(36, 232, 121, 0.12), transparent 48%),
    var(--surface);
  box-shadow: var(--shadow);
}

.hero::after {
  position: absolute;
  right: -110px;
  bottom: -160px;
  width: 380px;
  height: 380px;
  content: "";
  border: 54px solid rgba(36, 232, 121, 0.055);
  border-radius: 50%;
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
}

.hero-copy h1 span {
  color: var(--green);
}

.hero-stat {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 190px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(5, 10, 7, 0.62);
  backdrop-filter: blur(16px);
}

.hero-date {
  color: var(--muted);
  font-size: 0.84rem;
}

.hero-day {
  display: block;
  margin-top: 4px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero-stat strong {
  display: block;
  color: var(--green);
  font-size: 3rem;
  line-height: 1;
  letter-spacing: -0.06em;
}

.hero-stat small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.35;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 26px 0 14px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

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

.route-card {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--surface-strong), var(--surface));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.route-card::after {
  position: absolute;
  right: -35px;
  top: -46px;
  width: 150px;
  height: 150px;
  content: "";
  border: 28px solid rgba(36, 232, 121, 0.04);
  border-radius: 50%;
}

.route-card:hover {
  transform: translateY(-3px);
  border-color: rgba(36, 232, 121, 0.26);
  background: linear-gradient(145deg, var(--surface-soft), var(--surface));
}

.route-card-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.route-number {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.route-number small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.route-number strong {
  font-size: 2.5rem;
  letter-spacing: -0.07em;
}

.route-arrow {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 1.25rem;
  font-weight: 700;
}

.route-summary {
  position: relative;
  z-index: 2;
  margin: auto 0 18px;
  color: var(--muted-strong);
  font-size: 0.92rem;
  line-height: 1.5;
}

.route-meta {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-pill,
.status-pill,
.route-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 750;
}

.meta-pill.ready,
.status-pill.ready {
  border-color: rgba(36, 232, 121, 0.22);
  background: var(--green-soft);
  color: var(--green);
}

.info-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.018);
}

.info-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 900;
}

.info-strip strong {
  display: block;
  margin: 0 0 4px;
}

.info-strip p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--muted-strong);
  cursor: pointer;
  font-weight: 750;
}

.back-link:hover {
  color: var(--green);
}

.route-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(210px, 0.65fr);
  gap: 16px;
  margin-bottom: 22px;
}

.route-title,
.route-overview-stat {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.route-title h1 {
  font-size: clamp(2.3rem, 10vw, 4rem);
}

.route-overview-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.route-overview-stat strong {
  color: var(--green);
  font-size: 2.8rem;
  letter-spacing: -0.055em;
}

.route-overview-stat span {
  color: var(--muted);
  line-height: 1.45;
}

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

.day-card {
  min-height: 150px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  cursor: pointer;
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease;
}

.day-card:hover {
  transform: translateY(-2px);
  border-color: rgba(36, 232, 121, 0.24);
}

.day-card.today {
  border-color: rgba(36, 232, 121, 0.3);
  box-shadow: inset 0 0 0 1px rgba(36, 232, 121, 0.08);
}

.day-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.day-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.day-count {
  min-width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 1.35rem;
  font-weight: 850;
}

.day-count.empty {
  background: rgba(255, 200, 87, 0.1);
  color: var(--amber);
}

.route-toolbar {
  position: sticky;
  top: calc(72px + var(--safe-top));
  z-index: 35;
  display: grid;
  gap: 12px;
  margin: 0 -4px 18px;
  padding: 12px 4px;
  background: linear-gradient(var(--bg) 76%, transparent);
}

.route-toolbar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.route-context {
  min-width: 0;
}

.route-context h1 {
  overflow: hidden;
  margin: 2px 0 0;
  font-size: clamp(1.55rem, 6vw, 2.2rem);
  letter-spacing: -0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-context p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.progress-ring {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--green) var(--progress, 0%), var(--surface-raised) 0);
  box-shadow: inset 0 0 0 1px var(--line);
}

.progress-ring::before {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  content: attr(data-label);
  border-radius: 50%;
  background: var(--bg);
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 850;
}

.toolbar-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 9px;
}

.search-wrap {
  position: relative;
  min-width: 0;
}

.search-wrap::before {
  position: absolute;
  left: 14px;
  top: 50%;
  content: "⌕";
  color: var(--muted);
  font-size: 1.2rem;
  transform: translateY(-52%);
}

.search-input,
.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-strong);
  color: var(--text);
}

.search-input {
  height: 46px;
  padding: 0 14px 0 40px;
}

.search-input::placeholder,
.field input::placeholder,
.field textarea::placeholder {
  color: #65766b;
}

.toolbar-button,
.primary-button,
.secondary-button,
.danger-button,
.compact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.toolbar-button:active,
.primary-button:active,
.secondary-button:active,
.compact-button:active {
  transform: scale(0.975);
}

.toolbar-button {
  min-height: 46px;
  padding: 0 15px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--muted-strong);
}

.toolbar-button.active {
  border-color: rgba(36, 232, 121, 0.28);
  background: var(--green-soft);
  color: var(--green);
}

.primary-button,
.secondary-button,
.danger-button {
  min-height: 48px;
  padding: 0 18px;
}

.primary-button {
  border: 1px solid var(--green);
  background: var(--green);
  color: #041008;
}

.primary-button:hover {
  background: #4df08f;
}

.secondary-button {
  border: 1px solid var(--line-strong);
  background: var(--surface-soft);
  color: var(--text);
}

.danger-button {
  border: 1px solid rgba(255, 107, 107, 0.28);
  background: rgba(255, 107, 107, 0.08);
  color: var(--danger);
}

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

.stop-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.12);
  transition: border-color 170ms ease, opacity 170ms ease, transform 170ms ease;
}

.stop-card.completed {
  border-color: rgba(36, 232, 121, 0.22);
  background: linear-gradient(135deg, rgba(36, 232, 121, 0.07), var(--surface));
}

.stop-card.completed .stop-name {
  color: #b6c6bc;
}

.stop-card.filtered-out {
  display: none;
}

.stop-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 106px;
  padding: 15px;
}

.stop-number {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 15px;
  background: var(--surface-raised);
  color: var(--green);
  font-size: 1rem;
  font-weight: 900;
}

.completed .stop-number {
  background: var(--green);
  color: #041008;
}

.stop-copy {
  min-width: 0;
}

.stop-name {
  overflow: hidden;
  display: block;
  margin: 0;
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stop-address {
  overflow: hidden;
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stop-indicators {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.stop-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 145px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted-strong);
  font-size: 0.66rem;
  white-space: nowrap;
}

.stop-indicator.notes {
  color: var(--amber);
}

.stop-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.stop-icon-button,
.complete-button,
.reorder-button {
  border: 1px solid var(--line);
  background: var(--surface-strong);
  cursor: pointer;
}

.stop-icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--muted-strong);
  font-size: 1rem;
  font-weight: 900;
}

.stop-icon-button:hover {
  border-color: rgba(36, 232, 121, 0.25);
  color: var(--green);
}

.complete-button {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--muted);
  font-size: 1.2rem;
}

.complete-button.checked {
  border-color: var(--green);
  background: var(--green);
  color: #041008;
}

.stop-details {
  display: none;
  padding: 0 16px 17px 75px;
  border-top: 1px solid transparent;
}

.stop-card.expanded .stop-details {
  display: block;
  border-top-color: var(--line);
  padding-top: 16px;
}

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

.field {
  display: grid;
  gap: 7px;
}

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

.field label {
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 750;
}

.field input {
  height: 44px;
  padding: 0 12px;
}

.field textarea {
  min-height: 88px;
  padding: 12px;
  resize: vertical;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 13px;
}

.compact-button {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--muted-strong);
  font-size: 0.78rem;
}

.compact-button.danger {
  color: var(--danger);
}

.reorder-panel {
  display: none;
  align-items: center;
  gap: 7px;
}

.reorder-mode .reorder-panel {
  display: flex;
}

.reorder-mode .complete-button,
.reorder-mode .stop-actions .stop-icon-button {
  display: none;
}

.reorder-button {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--muted-strong);
  font-weight: 900;
}

.reorder-button:disabled {
  opacity: 0.28;
  cursor: not-allowed;
}

.reorder-tip {
  display: none;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(36, 232, 121, 0.18);
  border-radius: 14px;
  background: var(--green-soft);
  color: var(--muted-strong);
  font-size: 0.8rem;
}

.reorder-mode .reorder-tip {
  display: block;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 46px 22px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.018);
  text-align: center;
}

.empty-icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 1.8rem;
  font-weight: 900;
}

.empty-state h2 {
  margin: 0;
  font-size: 1.25rem;
}

.empty-state p {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.search-empty {
  display: none;
  padding: 28px 18px;
  color: var(--muted);
  text-align: center;
}

.search-empty.visible {
  display: block;
}

.app-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  visibility: hidden;
  pointer-events: none;
}

.app-menu.open {
  visibility: visible;
  pointer-events: auto;
}

.menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  opacity: 0;
  backdrop-filter: blur(3px);
  transition: opacity 180ms ease;
}

.app-menu.open .menu-backdrop {
  opacity: 1;
}

.menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(88vw, 390px);
  height: 100%;
  overflow-y: auto;
  padding: calc(22px + var(--safe-top)) 18px calc(22px + var(--safe-bottom));
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: -30px 0 80px rgba(0, 0, 0, 0.45);
  transform: translateX(102%);
  transition: transform 220ms ease;
}

.app-menu.open .menu-panel {
  transform: translateX(0);
}

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

.menu-heading h2 {
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: -0.035em;
}

.close-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-strong);
  cursor: pointer;
  font-size: 1.5rem;
}

.menu-action {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  margin-bottom: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-strong);
  cursor: pointer;
  text-align: left;
}

.menu-action:hover {
  border-color: rgba(36, 232, 121, 0.22);
}

.menu-action-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 1.2rem;
  font-weight: 900;
}

.menu-action strong,
.menu-action small {
  display: block;
}

.menu-action strong {
  margin-bottom: 3px;
}

.menu-action small {
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.35;
}

.privacy-note {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid rgba(36, 232, 121, 0.15);
  border-radius: 16px;
  background: var(--green-soft);
}

.privacy-note strong {
  color: var(--green);
}

.privacy-note p {
  margin: 6px 0 0;
  color: var(--muted-strong);
  font-size: 0.78rem;
  line-height: 1.5;
}

.menu-version {
  margin: 18px 0 0;
  color: #637269;
  font-size: 0.7rem;
  text-align: center;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--safe-bottom));
  z-index: 300;
  max-width: min(88vw, 440px);
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #15231b;
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 0.82rem;
  font-weight: 750;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 18px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.modal-root {
  position: relative;
  z-index: 200;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: end center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(4px);
}

.modal-card {
  width: min(100%, 560px);
  max-height: min(88vh, 760px);
  overflow-y: auto;
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.modal-card h2 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.035em;
}

.modal-card > p {
  margin: 8px 0 20px;
  color: var(--muted);
  line-height: 1.5;
}

.modal-fields {
  display: grid;
  gap: 13px;
}

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

@media (max-width: 740px) {
  .hero,
  .route-overview {
    grid-template-columns: 1fr;
  }

  .hero-stat {
    min-height: 135px;
  }

  .route-grid,
  .day-grid {
    grid-template-columns: 1fr;
  }

  .route-card {
    min-height: 205px;
  }
}

@media (max-width: 600px) {
  .main-container {
    padding-top: 18px;
  }

  .hero {
    min-height: auto;
    padding: 24px;
  }

  .hero::after {
    right: -150px;
  }

  .toolbar-actions {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .toolbar-actions .add-stop-button {
    grid-column: 1 / -1;
  }

  .stop-main {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    padding: 13px;
  }

  .stop-number {
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }

  .stop-actions {
    flex-direction: column;
  }

  .complete-button,
  .stop-icon-button {
    width: 40px;
    height: 40px;
  }

  .stop-details,
  .stop-card.expanded .stop-details {
    padding-left: 13px;
    padding-right: 13px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .field.full {
    grid-column: auto;
  }

  .route-toolbar {
    top: calc(70px + var(--safe-top));
  }
}

@media (max-width: 390px) {
  .brand-copy small {
    display: none;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .app-header {
    min-height: calc(66px + var(--safe-top));
  }

  .route-toolbar {
    top: calc(64px + var(--safe-top));
  }

  .toolbar-button {
    padding: 0 12px;
    font-size: 0.78rem;
  }

  .stop-address {
    max-width: 180px;
  }
}

@media (min-width: 760px) {
  .modal-overlay {
    place-items: center;
  }

  .stop-card:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.13);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* --- V0.3 shared route knowledge additions --- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cloud-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #65766b;
  box-shadow: 0 0 0 5px rgba(101, 118, 107, 0.08);
}

.cloud-dot.online {
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(36, 232, 121, 0.1);
}

.cloud-dot.offline {
  background: var(--amber);
  box-shadow: 0 0 0 5px rgba(255, 200, 87, 0.1);
}

.route-finder {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.route-finder > span {
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 800;
}

.route-finder input {
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-strong);
  color: var(--text);
}

.meta-pill.pin-ready {
  border-color: rgba(36, 232, 121, 0.2);
  color: var(--green);
}

.meta-pill.pin-missing {
  color: var(--amber);
}

.info-strip.warning {
  border-color: rgba(255, 200, 87, 0.22);
  background: rgba(255, 200, 87, 0.055);
}

.info-strip.warning .info-icon {
  background: rgba(255, 200, 87, 0.14);
  color: var(--amber);
}

.info-strip.mini {
  margin-top: 22px;
  padding: 14px 16px;
}

.route-title-row,
.route-context-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.lock-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.lock-pill.unlocked {
  border-color: rgba(36, 232, 121, 0.22);
  background: var(--green-soft);
  color: var(--green);
}

.route-access-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.compact-primary {
  min-height: 42px;
  padding: 0 15px;
}

.route-context-meta {
  margin-bottom: 6px;
}

.sync-label {
  display: block;
  margin-top: 7px;
  color: #708278;
  font-size: 0.7rem;
}

.toolbar-actions {
  grid-template-columns: minmax(180px, 1fr) repeat(4, auto);
}

.unlock-button {
  border-color: rgba(36, 232, 121, 0.25);
  color: var(--green);
}

.reorder-tip {
  display: block;
  border-color: var(--line);
  background: rgba(255,255,255,0.025);
  color: var(--muted);
}

.reorder-mode .reorder-tip {
  border-color: rgba(36, 232, 121, 0.18);
  background: var(--green-soft);
  color: var(--muted-strong);
}

.stop-indicator.geo {
  color: var(--green);
}

.stop-indicator.photo {
  color: #8dc7ff;
}

.detail-section {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.detail-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.detail-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.detail-section-title > span {
  font-size: 0.78rem;
  font-weight: 850;
}

.detail-section-title > small {
  color: var(--muted);
  font-size: 0.68rem;
}

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

.read-only-details > div {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,0.018);
}

.read-only-details > div.full {
  grid-column: 1 / -1;
}

.read-only-details span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.68rem;
}

.read-only-details strong,
.read-only-details p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.78rem;
  line-height: 1.45;
}

.detail-empty,
.photo-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.geo-saved-card,
.geo-empty-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px;
  border: 1px solid rgba(36, 232, 121, 0.18);
  border-radius: 16px;
  background: rgba(36, 232, 121, 0.055);
}

.geo-saved-card > div:first-child {
  min-width: 0;
}

.geo-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--green);
  font-size: 0.68rem;
  font-weight: 800;
}

.geo-saved-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8rem;
}

.geo-saved-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.66rem;
}

.geo-empty-card strong {
  font-size: 0.8rem;
}

.geo-empty-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.geo-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  flex: 0 0 auto;
}

.geo-nav-button {
  border-color: rgba(36, 232, 121, 0.2);
  color: var(--green);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 8px;
}

.photo-thumb-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
}

.photo-thumb,
.photo-add {
  width: 100%;
  height: 100%;
  min-height: 88px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-strong);
  cursor: pointer;
}

.photo-thumb {
  padding: 0;
}

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

.photo-add {
  display: grid;
  place-content: center;
  gap: 3px;
  color: var(--green);
}

.photo-add span {
  font-size: 1.4rem;
  font-weight: 900;
}

.photo-add small {
  color: var(--muted-strong);
  font-size: 0.68rem;
  font-weight: 750;
}

.photo-remove {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,107,107,0.28);
  border-radius: 50%;
  background: #271313;
  color: var(--danger);
  cursor: pointer;
  font-weight: 900;
}

.photo-modal {
  width: min(100%, 760px);
}

.photo-viewer img {
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
  border-radius: 16px;
  background: #020403;
}

.photo-viewer-copy {
  display: grid;
  gap: 4px;
  margin-top: 12px;
}

.photo-viewer-copy span {
  color: var(--muted);
  font-size: 0.78rem;
}

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

.choice-card {
  min-height: 122px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-strong);
  text-align: left;
  cursor: pointer;
}

.choice-card:hover {
  border-color: rgba(36, 232, 121, 0.25);
}

.choice-card strong {
  color: var(--green);
}

.choice-card small {
  color: var(--muted);
  line-height: 1.45;
}

.modal-actions.single {
  justify-content: flex-start;
}

.gps-working,
.loading-state {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 34px 18px;
  text-align: center;
}

.gps-working h2,
.loading-state h2 {
  margin: 0;
}

.gps-working p,
.loading-state p {
  max-width: 440px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.loading-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255,255,255,0.08);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: eps-spin 800ms linear infinite;
}

@keyframes eps-spin {
  to { transform: rotate(360deg); }
}

.gps-result {
  display: grid;
  gap: 6px;
  margin: 18px 0 0;
  padding: 16px;
  border: 1px solid rgba(36, 232, 121, 0.18);
  border-radius: 16px;
  background: var(--green-soft);
}

.gps-result strong {
  font-size: 1rem;
}

.gps-result span {
  color: var(--muted-strong);
  font-size: 0.76rem;
}

.input-error {
  border-color: rgba(255,107,107,0.6) !important;
}

.field select,
.pin-manager-row select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-strong);
  color: var(--text);
}

.admin-modal {
  width: min(100%, 860px);
  max-height: min(92vh, 900px);
}

.admin-heading,
.admin-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-heading {
  margin-bottom: 16px;
}

.admin-heading h2,
.admin-section h3 {
  margin: 0;
}

.admin-section {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.admin-section:first-of-type {
  border-top: 0;
}

.admin-section-heading p {
  max-width: 590px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.link-button {
  text-decoration: none;
  flex: 0 0 auto;
}

.import-format {
  margin: 12px 0 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  font-size: 0.7rem;
}

.import-textarea {
  width: 100%;
  min-height: 150px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #07100b;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  resize: vertical;
}

.import-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}

.file-button {
  position: relative;
}

.import-preview {
  margin-top: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.018);
}

.import-preview > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.import-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.import-summary > div {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 12px;
  background: var(--surface-strong);
}

.import-summary strong {
  color: var(--green);
  font-size: 1.25rem;
}

.import-summary span {
  color: var(--muted);
  font-size: 0.68rem;
}

.import-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.import-groups span {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  color: var(--muted-strong);
  font-size: 0.66rem;
}

.import-warning {
  margin: 10px 0 0 !important;
  color: var(--amber) !important;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 12px 0;
  color: var(--muted-strong);
  font-size: 0.74rem;
  line-height: 1.45;
}

.check-row input {
  margin-top: 2px;
  accent-color: var(--green);
}

.full-button {
  width: 100%;
}

.primary-button:disabled,
.secondary-button:disabled,
.toolbar-button:disabled,
.compact-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pin-manager-row {
  display: grid;
  grid-template-columns: 0.7fr 1.4fr auto;
  align-items: end;
  gap: 10px;
  margin: 12px 0;
}

.generate-button {
  min-height: 44px;
}

.admin-note {
  margin-bottom: 2px;
}

.generated-pin-panel {
  margin: 18px 0 12px;
  padding: 14px;
  border: 1px solid rgba(36,232,121,0.18);
  border-radius: 16px;
  background: var(--green-soft);
}

.generated-pin-panel > p {
  margin: 5px 0 12px;
  color: var(--muted-strong);
  font-size: 0.74rem;
  line-height: 1.45;
}

.generated-pin-list {
  display: grid;
  gap: 7px;
}

.generated-pin-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(5,10,7,0.55);
}

.generated-pin-list span {
  color: var(--muted-strong);
  font-size: 0.74rem;
}

.generated-pin-list code,
.single-pin-display code {
  color: var(--green);
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.single-pin-display {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid rgba(36,232,121,0.22);
  border-radius: 16px;
  background: var(--green-soft);
  text-align: center;
}

.success-note {
  color: var(--green) !important;
}

@media (max-width: 800px) {
  .toolbar-actions {
    grid-template-columns: minmax(0, 1fr) repeat(2, auto);
  }

  .toolbar-actions .search-wrap {
    grid-column: 1 / -1;
  }

  .pin-manager-row {
    grid-template-columns: 1fr 1fr;
  }

  .generate-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .toolbar-actions {
    grid-template-columns: 1fr 1fr;
  }

  .toolbar-actions .search-wrap {
    grid-column: 1 / -1;
  }

  .toolbar-actions .add-stop-button {
    grid-column: auto;
  }

  .route-finder {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .route-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .read-only-details,
  .pin-choice-grid,
  .pin-manager-row {
    grid-template-columns: 1fr;
  }

  .read-only-details > div.full {
    grid-column: auto;
  }

  .geo-saved-card,
  .geo-empty-card {
    align-items: stretch;
    flex-direction: column;
  }

  .geo-actions {
    justify-content: stretch;
  }

  .geo-actions .compact-button,
  .geo-empty-card .compact-button {
    flex: 1;
  }

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

  .admin-section-heading {
    flex-direction: column;
  }

  .link-button {
    width: 100%;
  }

  .import-summary {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --- V0.3.1 offline door-point sync --- */
.geo-saved-card.pending-sync {
  border-style: dashed;
}

.geo-pending-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 7px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* --- V0.3.2 fast route editing --- */
.position-jump {
  display: grid;
  grid-template-columns: auto 54px;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.position-jump input {
  width: 54px;
  height: 30px;
  padding: 0 5px;
  border: 0;
  border-radius: 8px;
  background: rgba(255,255,255,0.055);
  color: var(--text);
  text-align: center;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
}

.position-jump input:focus {
  outline: 2px solid rgba(36, 232, 121, 0.38);
  outline-offset: 1px;
}

@media (max-width: 600px) {
  .reorder-mode .stop-main {
    align-items: center;
  }

  .reorder-mode .stop-actions {
    flex-shrink: 0;
  }

  .reorder-mode .reorder-panel {
    gap: 5px;
  }

  .reorder-mode .reorder-button {
    width: 36px;
    height: 38px;
  }

  .reorder-mode .position-jump {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 1px;
    height: 48px;
    padding: 3px 5px;
  }

  .reorder-mode .position-jump span {
    font-size: 0.56rem;
    line-height: 1;
  }

  .reorder-mode .position-jump input {
    width: 46px;
    height: 25px;
  }
}

/* --- V0.3.3 reorder clarity + stable arrow moves --- */
.reorder-mode .reorder-panel {
  flex-wrap: nowrap;
}

.reorder-mode .position-jump {
  border-color: rgba(36, 232, 121, 0.28);
  background: rgba(36, 232, 121, 0.07);
}

.reorder-mode .position-jump span {
  white-space: nowrap;
}

@media (max-width: 600px) {
  .reorder-mode .stop-main {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

  .reorder-mode .stop-actions {
    grid-column: 1 / -1;
    width: 100%;
    flex-direction: row;
  }

  .reorder-mode .reorder-panel {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 8px;
    width: 100%;
  }

  .reorder-mode .reorder-button {
    width: 42px;
    height: 42px;
    font-size: 1.05rem;
  }

  .reorder-mode .position-jump {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 42px;
    padding: 4px 8px;
  }

  .reorder-mode .position-jump span {
    display: inline;
    font-size: 0.68rem;
    line-height: 1;
  }

  .reorder-mode .position-jump input {
    width: 58px;
    height: 30px;
    font-size: 0.9rem;
  }
}

/* --- V0.3.4 route administration --- */
.route-create-grid {
  display: grid;
  grid-template-columns: minmax(140px, 0.55fr) minmax(0, 1.45fr);
  gap: 14px;
  margin-top: 14px;
}

.service-days-field {
  min-width: 0;
}

.service-day-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(48px, 1fr));
  gap: 7px;
}

.service-day-chip {
  position: relative;
  cursor: pointer;
}

.service-day-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.service-day-chip span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-strong);
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 850;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.service-day-chip input:checked + span {
  border-color: rgba(36, 232, 121, 0.48);
  background: var(--green-soft);
  color: var(--green);
}

.service-day-chip input:focus-visible + span {
  outline: 3px solid rgba(36, 232, 121, 0.35);
  outline-offset: 2px;
}

.service-day-shortcuts {
  display: flex;
  gap: 14px;
  margin: 8px 0 12px;
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--green);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 800;
}

.route-structure-actions {
  display: flex;
  gap: 9px;
}

.route-structure-actions .primary-button {
  flex: 1;
}

.admin-route-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.admin-route-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,0.018);
}

.admin-route-row.archived {
  opacity: 0.64;
  border-style: dashed;
}

.admin-route-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.admin-route-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-route-main > span {
  color: var(--muted);
  font-size: 0.7rem;
}

.admin-route-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.archived-pill {
  color: var(--amber);
  border-color: rgba(255, 200, 87, 0.22);
  background: rgba(255, 200, 87, 0.07);
}

.danger-outline {
  border-color: rgba(255, 107, 107, 0.24) !important;
  color: var(--danger) !important;
}

.admin-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
}

@media (max-width: 720px) {
  .route-create-grid {
    grid-template-columns: 1fr;
  }

  .service-day-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .admin-route-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-route-actions {
    width: 100%;
  }

  .admin-route-actions .compact-button {
    flex: 1;
  }
}


/* V0.4 Smart Import */
.route-card.filtered-out { display: none !important; }
.smart-import-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:14px; }
.smart-import-card { border:1px solid var(--border); background:var(--surface-2, rgba(255,255,255,.04)); border-radius:18px; padding:16px; }
.smart-import-card h4 { margin:0 0 6px; font-size:1rem; }
.smart-import-card p { margin:0 0 12px; color:var(--muted); font-size:.9rem; line-height:1.45; }
.smart-import-card .compact-button { width:100%; justify-content:center; }
.ai-status { display:flex; align-items:flex-start; gap:10px; border-radius:14px; padding:11px 12px; margin-top:10px; background:rgba(255,255,255,.04); font-size:.86rem; color:var(--muted); }
.ai-status.ready strong { color:var(--text); }
.mapping-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:12px 0; }
.mapping-field { display:flex; flex-direction:column; gap:6px; }
.mapping-field label { font-size:.78rem; color:var(--muted); font-weight:700; }
.mapping-field select { width:100%; }
.import-source-badge { display:inline-flex; align-items:center; gap:6px; font-size:.76rem; font-weight:800; padding:6px 9px; border-radius:999px; background:rgba(255,255,255,.06); margin-bottom:8px; }
.impact-panel { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-top:12px; }
.impact-panel div { padding:10px; border:1px solid var(--border); border-radius:12px; text-align:center; }
.impact-panel strong { display:block; font-size:1.1rem; }
.impact-panel span { font-size:.72rem; color:var(--muted); }
.manifest-review { margin-top:12px; display:flex; flex-direction:column; gap:8px; }
.manifest-row { display:grid; grid-template-columns:72px minmax(160px,1fr) minmax(110px,.65fr) minmax(190px,1.2fr) 38px; gap:8px; align-items:center; }
.manifest-row input { min-width:0; width:100%; }
.manifest-row .remove-row { width:38px; height:38px; border-radius:10px; border:1px solid var(--border); background:transparent; color:var(--muted); font-size:1.15rem; }
.manifest-review-head { display:grid; grid-template-columns:72px minmax(160px,1fr) minmax(110px,.65fr) minmax(190px,1.2fr) 38px; gap:8px; font-size:.72rem; color:var(--muted); font-weight:800; padding:0 2px; }
.scan-preview-image { width:100%; max-height:280px; object-fit:contain; border-radius:14px; border:1px solid var(--border); background:#111; margin-top:10px; }
.smart-warning { border:1px solid var(--warning, #b98d2b); border-radius:12px; padding:10px 12px; font-size:.84rem; color:var(--muted); margin-top:10px; }
@media(max-width:700px){
  .smart-import-grid,.mapping-grid { grid-template-columns:1fr; }
  .impact-panel { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .manifest-review { overflow-x:auto; padding-bottom:6px; }
  .manifest-row,.manifest-review-head { min-width:780px; }
}


/* V0.4.1 multi-page paper manifest scanning */
.manifest-page-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:10px; margin-top:10px; }
.manifest-page-thumb { position:relative; border:1px solid var(--border); border-radius:14px; padding:8px; background:var(--surface); }
.manifest-page-thumb span { display:block; font-size:.72rem; font-weight:800; color:var(--muted); margin-bottom:6px; }
.manifest-page-thumb img { width:100%; aspect-ratio:3/4; object-fit:cover; border-radius:10px; background:#111; }
.manifest-page-thumb button { position:absolute; top:4px; right:4px; width:30px; height:30px; border-radius:999px; border:1px solid var(--border); background:var(--surface); color:var(--text); font-size:1rem; }
.manifest-review-previews { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; margin:10px 0 14px; }
.manifest-review-previews > div { border:1px solid var(--border); border-radius:14px; padding:8px; }
.manifest-review-previews span { display:block; font-size:.72rem; font-weight:800; color:var(--muted); margin-bottom:5px; }
.manifest-review-previews .scan-preview-image { margin-top:0; max-height:220px; }

/* V0.4.2 multi-door points, empty bags and seasonal calls */
.field select { width:100%; min-height:46px; border:1px solid var(--line); border-radius:12px; background:var(--panel); color:var(--ink); padding:0 12px; font:inherit; }
.stop-indicator.bags { background:rgba(120,120,120,.10); }
.stop-indicator.season { background:rgba(120,120,120,.08); }
.geo-add-row { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:10px; flex-wrap:wrap; }
.geo-add-row small { color:var(--muted); }
.danger-compact { border-color:rgba(180,50,50,.25)!important; }
.geo-saved-card + .geo-saved-card { margin-top:10px; }
@media (max-width:640px){ .geo-actions{width:100%;}.geo-actions .compact-button{flex:1}.geo-add-row .compact-button{width:100%;} }


/* V0.4.3 private portal + release shell */
.portal-gate{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 50% 12%,rgba(57,130,88,.18),transparent 40%),#050a07;color:var(--ink)}
.portal-gate[hidden]{display:none!important}.portal-locked .app-shell{visibility:hidden;pointer-events:none}.portal-card{width:min(100%,520px);padding:30px;border:1px solid var(--line);border-radius:26px;background:rgba(10,20,14,.96);box-shadow:0 24px 80px rgba(0,0,0,.42);text-align:center}.portal-mark{width:76px;height:76px;border-radius:20px;margin-bottom:16px}.portal-card h1{font-size:2rem;margin:5px 0 4px}.portal-tagline{margin:0 0 24px;color:var(--muted);font-size:1rem}.portal-form{text-align:left}.portal-form label{display:block;font-size:.82rem;font-weight:800;margin-bottom:7px}.portal-password-row{display:flex;gap:9px}.portal-password-row input{flex:1;min-width:0;min-height:48px;border:1px solid var(--line);border-radius:13px;background:var(--panel);color:var(--ink);padding:0 13px;font:inherit}.portal-password-row button{min-width:108px}.portal-error{min-height:20px;margin:8px 2px 0;color:#ff9d9d;font-size:.84rem}.portal-trust{display:flex;flex-direction:column;gap:4px;text-align:left;margin-top:18px;padding:13px 14px;border-radius:14px;background:rgba(255,255,255,.04);color:var(--muted);font-size:.82rem}.portal-trust strong{color:var(--ink)}.portal-version{margin:18px 0 0;color:var(--muted);font-size:.75rem}@media(max-width:520px){.portal-card{padding:24px 18px}.portal-password-row{flex-direction:column}.portal-password-row button{width:100%}}


/* V0.4.4 demo workspace entry */
.portal-demo-entry{margin:16px 0 4px}.portal-divider{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:.72rem;text-transform:uppercase;letter-spacing:.08em;margin:10px 0}.portal-divider:before,.portal-divider:after{content:"";height:1px;background:var(--line);flex:1}.portal-demo-button{display:flex;align-items:center;justify-content:space-between;gap:14px;text-decoration:none;text-align:left;padding:14px 15px;border:1px solid rgba(155,228,177,.3);border-radius:14px;background:rgba(155,228,177,.075);color:var(--ink);transition:.18s ease}.portal-demo-button:hover{transform:translateY(-1px);border-color:rgba(155,228,177,.55);background:rgba(155,228,177,.11)}.portal-demo-button span{display:flex;flex-direction:column;gap:3px}.portal-demo-button small{color:var(--muted);font-size:.75rem;font-weight:500}.portal-demo-button b{color:#bff2cc;font-size:1.2rem}


.stop-account { display:block; font-size:.875rem; color:var(--muted); margin:4px 0; overflow-wrap:anywhere; }
