﻿:root {
  --bg: #f6f2ea;
  --ink: #182524;
  --muted: #6c7772;
  --line: rgba(24, 37, 36, 0.12);
  --panel: rgba(255, 255, 255, 0.88);
  --green: #0f766e;
  --green-dark: #0a5853;
  --coral: #d45b38;
  --blue: #3563a8;
  --amber: #d89a2b;
  --leaf: #dcefe8;
  --paper: #fffaf0;
  --shadow: 0 24px 70px rgba(24, 37, 36, 0.13);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.20), transparent 36rem),
    linear-gradient(135deg, #f6f2ea 0%, #eef6f3 52%, #fff8ec 100%);
  font-family: "Segoe UI", "Noto Sans KR", Arial, sans-serif;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.76);
  backdrop-filter: blur(18px);
}

.brand, .hero, .panel-header, .hero-actions, .dialog-header, .dialog-actions {
  display: flex;
  align-items: center;
}

.brand { gap: 12px; }

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--green), #2c9a7a);
  border-radius: 14px;
  font-weight: 900;
  box-shadow: 0 14px 34px rgba(15, 118, 110, 0.26);
}

.brand h1, .brand p, .hero h2, .hero p, .panel-header h3, .panel-header p {
  margin: 0;
}

.brand h1 { font-size: 20px; letter-spacing: 0; }
.brand p, .eyebrow, .panel-header p, .metric p, .item p, .small, .academy-card p, .child-card p { color: var(--muted); }

.nav-tabs {
  display: grid;
  gap: 8px;
}

.nav-tab {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  color: var(--muted);
  text-align: left;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
}

.nav-tab.active, .nav-tab:hover {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.brand-story {
  margin-top: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.brand-story span { color: var(--coral); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.brand-story strong { display: block; margin-top: 8px; font-size: 28px; }
.brand-story p { margin: 8px 0 0; color: var(--muted); line-height: 1.55; }

.main { padding: 28px; }

.hero {
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
  padding: 28px;
  color: white;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(8, 79, 74, 0.96), rgba(15, 118, 110, 0.88)),
    linear-gradient(45deg, transparent, rgba(216, 154, 43, 0.25));
  box-shadow: var(--shadow);
}

.hero h2 {
  max-width: 760px;
  margin-top: 6px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.12;
  letter-spacing: 0;
}

.hero p, .hero .eyebrow { color: rgba(255, 255, 255, 0.78); }
.hero-actions { gap: 10px; }

.primary-button, .secondary-button, .ghost-button, .icon-button {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid transparent;
}

.primary-button {
  padding: 0 18px;
  color: white;
  background: var(--coral);
  box-shadow: 0 12px 26px rgba(212, 91, 56, 0.22);
}

.primary-button:hover { filter: brightness(0.96); }

.secondary-button, .ghost-button {
  padding: 0 14px;
  color: var(--ink);
  background: white;
  border-color: var(--line);
}

.hero .ghost-button {
  color: white;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.24);
}

.icon-button {
  width: 42px;
  color: var(--muted);
  background: transparent;
  font-size: 24px;
}

.view { display: none; }
.view.active { display: grid; gap: 20px; }

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

.metric, .panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metric {
  min-height: 150px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.metric::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -44px;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
}

.metric span { color: var(--muted); font-size: 14px; font-weight: 700; }
.metric strong { display: block; margin-top: 10px; font-size: 34px; letter-spacing: 0; }
.metric p { margin: 10px 0 0; }
.metric.mint { background: #e5f4ee; }
.metric.coral { background: #ffe9df; }
.metric.blue { background: #e8f0ff; }
.metric.amber { background: #fff2cc; }

.panel { padding: 22px; }
.panel-header { justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.panel-header h3 { font-size: 21px; }
.panel-header p { margin-top: 5px; font-size: 13px; }

.content-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 20px;
}

.profile-strip, .child-grid, .academy-grid, .list, .cost-bars {
  display: grid;
  gap: 12px;
}

.profile-strip { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.child-grid, .academy-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.child-card, .academy-card, .item, .empty {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
}

.child-card, .academy-card { padding: 18px; }

.child-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.avatar {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: white;
  border-radius: 16px;
  background: var(--green);
  font-weight: 900;
}

.child-card h4, .academy-card h4, .item h4 { margin: 0; }
.child-card p, .academy-card p, .item p { margin: 6px 0 0; line-height: 1.45; }

.info-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pill, .status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.pill { color: var(--green-dark); background: var(--leaf); }

.item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.color-dot {
  width: 12px;
  height: 44px;
  border-radius: 999px;
  background: var(--green);
}

.tag { color: var(--muted); font-size: 13px; white-space: nowrap; }
.empty { padding: 18px; color: var(--muted); border-style: dashed; }



.kid-panel {
  background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(255,242,204,0.70));
}

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

.kid-task {
  display: grid;
  grid-template-columns: 78px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.82);
}

.kid-task.done {
  opacity: 0.66;
}

.kid-task.makeup {
  border-color: rgba(53, 99, 168, 0.36);
  background: #e8f0ff;
}

.kid-task.cancel {
  border-color: rgba(212, 91, 56, 0.34);
  background: #ffe9df;
}

.task-time {
  display: grid;
  place-items: center;
  min-height: 56px;
  color: white;
  border-radius: 16px;
  background: var(--coral);
  font-size: 20px;
  font-weight: 900;
}

.task-main h4,
.task-main p {
  margin: 0;
}

.task-main h4 {
  margin-top: 4px;
  font-size: 18px;
}

.task-main p {
  margin-top: 5px;
  color: var(--muted);
}

.task-kind {
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

.task-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.route-timeline {
  display: grid;
  gap: 12px;
}

.route-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,0.86), rgba(229,244,238,0.72));
}

.route-time {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 78px;
  padding: 10px;
  color: white;
  border-radius: 14px;
  background: var(--green);
  text-align: center;
}

.route-time strong {
  font-size: 20px;
}

.route-time span {
  font-size: 12px;
  color: rgba(255,255,255,0.76);
}

.route-body h4,
.route-body p {
  margin: 0;
}

.route-body p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}
.cost-row {
  display: grid;
  grid-template-columns: 160px 1fr 120px;
  gap: 12px;
  align-items: center;
}

.bar-track {
  height: 12px;
  overflow: hidden;
  background: rgba(24, 37, 36, 0.08);
  border-radius: 999px;
}

.bar-fill { height: 100%; background: linear-gradient(90deg, var(--green), var(--coral)); }

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(140px, 1fr));
  gap: 10px;
  overflow-x: auto;
}

.day-column {
  min-height: 270px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 250, 240, 0.56);
}

.day-column h4 { margin: 0 0 10px; font-size: 14px; }

.schedule-chip {
  margin-bottom: 8px;
  padding: 10px;
  border-left: 5px solid var(--green);
  border-radius: 14px;
  background: white;
}

.schedule-chip strong, .schedule-chip span { display: block; }
.schedule-chip span { margin-top: 4px; color: var(--muted); font-size: 12px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 880px; border-collapse: collapse; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
th { color: var(--muted); font-weight: 800; }

.status.due { color: #8a4b00; background: #fff1c2; }
.status.paid { color: #0f5f47; background: #dff5ea; }
.status.overdue { color: #9f1239; background: #ffe4e6; }

dialog {
  width: min(760px, calc(100vw - 28px));
  border: 0;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

dialog::backdrop { background: rgba(12, 20, 24, 0.45); }
.dialog-card { padding: 22px; }
.dialog-header { justify-content: space-between; margin-bottom: 16px; }
.dialog-header h3 { margin: 0; }

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

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input, select, textarea {
  width: 100%;
  padding: 11px 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

textarea { resize: vertical; }
.full-field { grid-column: 1 / -1; }
.dialog-actions { justify-content: flex-end; gap: 10px; margin-top: 18px; }
.hidden { display: none; }

@media (max-width: 1040px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 2; gap: 14px; padding: 14px; }
  .nav-tabs { grid-template-columns: repeat(16, minmax(0, 1fr)); }
  .nav-tab { padding: 0 8px; text-align: center; font-size: 13px; }
  .brand-story { display: none; }
  .main { padding: 16px; }
  .hero { align-items: stretch; flex-direction: column; border-radius: 22px; }
  .hero-actions { width: 100%; }
  .hero-actions button { flex: 1; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .brand p { display: none; }
  .metric-grid, .form-grid, 

.kid-panel {
  background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(255,242,204,0.70));
}

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

.kid-task {
  display: grid;
  grid-template-columns: 78px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.82);
}

.kid-task.done {
  opacity: 0.66;
}

.kid-task.makeup {
  border-color: rgba(53, 99, 168, 0.36);
  background: #e8f0ff;
}

.kid-task.cancel {
  border-color: rgba(212, 91, 56, 0.34);
  background: #ffe9df;
}

.task-time {
  display: grid;
  place-items: center;
  min-height: 56px;
  color: white;
  border-radius: 16px;
  background: var(--coral);
  font-size: 20px;
  font-weight: 900;
}

.task-main h4,
.task-main p {
  margin: 0;
}

.task-main h4 {
  margin-top: 4px;
  font-size: 18px;
}

.task-main p {
  margin-top: 5px;
  color: var(--muted);
}

.task-kind {
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

.task-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.route-timeline {
  display: grid;
  gap: 12px;
}

.route-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,0.86), rgba(229,244,238,0.72));
}

.route-time {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 78px;
  padding: 10px;
  color: white;
  border-radius: 14px;
  background: var(--green);
  text-align: center;
}

.route-time strong {
  font-size: 20px;
}

.route-time span {
  font-size: 12px;
  color: rgba(255,255,255,0.76);
}

.route-body h4,
.route-body p {
  margin: 0;
}

.route-body p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}
.cost-row { grid-template-columns: 1fr; }
  .hero h2 { font-size: 30px; }
}

.dialog-note {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.5;
}

.receipt-reminder {
  margin-top: 14px;
  padding: 12px 14px;
  color: #8a4b00;
  border: 1px solid rgba(216, 154, 43, 0.36);
  border-radius: 14px;
  background: #fff1c2;
  font-weight: 800;
}
.location-panel {
  background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(232,240,255,0.72));
}

.location-settings {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.78);
}

.toggle-row input {
  width: auto;
}

.privacy-note {
  margin-bottom: 14px;
  padding: 12px 14px;
  color: #23406f;
  border: 1px solid rgba(53, 99, 168, 0.24);
  border-radius: 14px;
  background: #e8f0ff;
  font-weight: 700;
  line-height: 1.5;
}

.location-log {
  display: grid;
  gap: 12px;
}

.location-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.82);
}

.location-card h4,
.location-card p {
  margin: 0;
}

.location-card p {
  margin-top: 5px;
  color: var(--muted);
}

.map-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.reward-panel {
  background: linear-gradient(135deg, rgba(255,255,255,0.94), rgba(255,233,223,0.72));
}

.reward-settings {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.point-board,
.notification-log {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.point-card,
.notice-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.82);
}

.point-card strong {
  margin-left: auto;
  color: var(--coral);
  font-size: 28px;
}

.point-card h4,
.point-card p,
.notice-card h4,
.notice-card p {
  margin: 0;
}

.point-card p,
.notice-card p {
  margin-top: 5px;
  color: var(--muted);
}

.sponsored-band {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid rgba(216, 154, 43, 0.32);
  border-radius: 22px;
  background: linear-gradient(135deg, #fff7df, #ffffff);
  box-shadow: var(--shadow);
}

.sponsored-band span,
.market-card span,
.issue-kind {
  color: var(--coral);
  font-size: 12px;
  font-weight: 900;
}

.sponsored-band strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.sponsored-band p {
  margin: 5px 0 0;
  color: var(--muted);
}

.marketplace-grid,
.academy-issue-list {
  display: grid;
  gap: 12px;
}

.marketplace-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.market-card,
.issue-card,
.partner-flow article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.82);
}

.market-card h4,
.market-card p,
.issue-card h4,
.issue-card p {
  margin: 0;
}

.market-card h4,
.issue-card h4 {
  margin-top: 6px;
}

.market-card p,
.issue-card p {
  margin-top: 6px;
  color: var(--muted);
}

.issue-card {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  align-items: center;
}

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

.partner-flow strong,
.partner-flow span {
  display: block;
}

.partner-flow span {
  margin-top: 6px;
  color: var(--muted);
}

.driver-panel,
.vehicle-parent-panel {
  background: linear-gradient(135deg, rgba(255,255,255,0.94), rgba(220,239,232,0.72));
}

.vehicle-status,
.driver-stop-list {
  display: grid;
  gap: 12px;
}

.vehicle-summary,
.vehicle-map-card,
.driver-stop {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.84);
}

.vehicle-summary span,
.vehicle-map-card span {
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

.vehicle-summary h4,
.vehicle-summary p,
.vehicle-map-card h4,
.vehicle-map-card p,
.driver-stop h4,
.driver-stop p {
  margin: 0;
}

.vehicle-summary h4,
.vehicle-map-card h4,
.driver-stop h4 {
  margin-top: 5px;
}

.vehicle-summary p,
.vehicle-map-card p,
.driver-stop p {
  margin-top: 6px;
  color: var(--muted);
}

.driver-stop.boarded {
  border-color: rgba(15, 118, 110, 0.35);
  background: #e5f4ee;
}

.driver-stop.dropped {
  border-color: rgba(53, 99, 168, 0.28);
  background: #e8f0ff;
}

.driver-stop.late {
  border-color: rgba(212, 91, 56, 0.34);
  background: #ffe9df;
}

.billing-panel,
.pg-panel {
  background: linear-gradient(135deg, rgba(255,255,255,0.94), rgba(232,240,255,0.72));
}

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

.billing-summary article,
.billing-card,
.pg-flow article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.84);
}

.billing-summary span,
.billing-card span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.billing-summary strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
}

.billing-request-list,
.pg-flow {
  display: grid;
  gap: 12px;
}

.billing-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.billing-card h4,
.billing-card p,
.pg-flow strong,
.pg-flow span {
  margin: 0;
}

.billing-card h4 {
  margin-top: 6px;
}

.billing-card p,
.pg-flow span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.billing-card.paid {
  background: #e5f4ee;
}

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

.plans-panel,
.feature-gate-panel {
  background: linear-gradient(135deg, rgba(255,255,255,0.94), rgba(255,242,204,0.72));
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.plan-card,
.feature-gate-row {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.84);
}

.plan-card.featured {
  border-color: rgba(212, 91, 56, 0.42);
  background: #ffe9df;
}

.plan-card span,
.feature-gate-row span {
  color: var(--coral);
  font-size: 12px;
  font-weight: 900;
}

.plan-card h4,
.plan-card strong,
.feature-gate-row strong,
.feature-gate-row p {
  margin: 0;
}

.plan-card h4 {
  margin-top: 8px;
  font-size: 22px;
}

.plan-card strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.plan-card ul {
  min-height: 150px;
  margin: 14px 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.feature-gate-list {
  display: grid;
  gap: 10px;
}

.feature-gate-row {
  display: grid;
  grid-template-columns: 180px 150px 1fr;
  gap: 12px;
  align-items: center;
}

.feature-gate-row p {
  color: var(--muted);
}

.portal-panel,
.portal-list-panel {
  background: linear-gradient(135deg, rgba(255,255,255,0.94), rgba(229,244,238,0.72));
}

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

.portal-form label:nth-child(5),
.portal-form label:nth-child(6),
.portal-form label:nth-child(7) {
  grid-column: 1 / -1;
}

.portal-academy-list {
  display: grid;
  gap: 14px;
}

.portal-academy-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.84);
}

.portal-academy-card span {
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

.portal-academy-card h4,
.portal-academy-card p {
  margin: 0;
}

.portal-academy-card h4,
.portal-academy-card p {
  margin-top: 6px;
}

.portal-academy-card p {
  color: var(--muted);
  line-height: 1.5;
}

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

.portal-detail-grid p {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.76);
}

.portal-detail-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

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

.academy-policy-strip article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,0.82);
}

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

.academy-policy-strip span {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.overview-panel,
.roadmap-panel,
.risk-panel {
  background: linear-gradient(135deg, rgba(255,255,255,0.94), rgba(255,250,240,0.78));
}

.overview-grid,
.roadmap-list,
.risk-list {
  display: grid;
  gap: 14px;
}

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

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

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

.overview-card,
.roadmap-card,
.risk-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.86);
}

.overview-card strong,
.roadmap-card strong,
.risk-card strong,
.roadmap-card span {
  display: block;
}

.roadmap-card span {
  color: var(--coral);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 8px;
}

.overview-card p,
.roadmap-card p,
.risk-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.role-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.role-chip {
  min-height: 36px;
  padding: 0 13px;
  color: rgba(255,255,255,0.78);
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
}

.role-chip.active {
  color: var(--ink);
  background: white;
}

.demo-guide {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  border: 1px solid rgba(216, 154, 43, 0.32);
  border-radius: 18px;
  background: #fff7df;
  box-shadow: var(--shadow);
}

.demo-guide strong {
  color: var(--coral);
  white-space: nowrap;
}

.demo-guide span {
  color: var(--muted);
}

.command-panel {
  background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(229,244,238,0.74));
}

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

.command-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.86);
}

.command-card.warn {
  border-color: rgba(212, 91, 56, 0.34);
  background: #ffe9df;
}

.command-card span {
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

.command-card strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
}

.command-card h4,
.command-card p {
  margin: 0;
}

.command-card h4 {
  margin-top: 8px;
}

.command-card p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.vehicle-route-map {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.map-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.map-header span {
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

.map-header h4 {
  margin: 5px 0 0;
}

.mock-map {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(90deg, rgba(53,99,168,0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(53,99,168,0.08) 1px, transparent 1px),
    #f9fcfb;
  background-size: 44px 44px;
}

.map-line {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 92px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--coral), var(--blue));
}

.map-stop {
  position: absolute;
  top: 55px;
  width: 92px;
  transform: translateX(-50%);
  text-align: center;
  z-index: 1;
}

.map-stop span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  margin: 0 auto 8px;
  color: white;
  border-radius: 999px;
  background: var(--green);
  font-weight: 900;
}

.map-stop strong {
  display: block;
  font-size: 12px;
  line-height: 1.35;
}

.route-stage-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.route-stage {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,0.84);
}

.route-stage.done {
  background: #e5f4ee;
}

.route-stage span,
.route-stage strong,
.route-stage p {
  display: block;
  margin: 0;
}

.route-stage span {
  color: var(--coral);
  font-size: 12px;
  font-weight: 900;
}

.route-stage strong {
  margin-top: 6px;
}

.route-stage p {
  margin-top: 5px;
  color: var(--muted);
}

.export-panel {
  background: linear-gradient(135deg, rgba(255,255,255,0.94), rgba(232,240,255,0.72));
}

.export-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 260px));
  gap: 14px;
  margin-bottom: 14px;
}

.calendar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  color: var(--muted);
}

.schedule-export-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,0.86);
}

.export-card-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.export-card-header span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.export-card-header h4,
.export-card-header strong {
  margin: 0;
}

.export-card-header h4 {
  margin-top: 5px;
  font-size: 24px;
}

.export-schedule-list {
  display: grid;
  gap: 10px;
}

.export-schedule-list article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,0.82);
}

.export-schedule-list span {
  color: var(--coral);
  font-size: 12px;
  font-weight: 900;
}

.export-schedule-list strong,
.export-schedule-list p {
  display: block;
  margin: 0;
}

.export-schedule-list strong {
  margin-top: 6px;
}

.export-schedule-list p {
  margin-top: 5px;
  color: var(--muted);
}

/* Director pass: role-first navigation and service flow */
.role-nav-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.74);
}

.role-nav-panel > span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

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

.sidebar .role-chip {
  min-height: 38px;
  padding: 0 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
}

.sidebar .role-chip.active {
  color: white;
  background: var(--green);
}

.flow-nav {
  position: relative;
  gap: 10px;
  padding-left: 8px;
}

.flow-nav::before {
  content: "";
  position: absolute;
  left: 25px;
  top: 18px;
  bottom: 18px;
  width: 2px;
  background: rgba(15,118,110,0.18);
}

.flow-nav .nav-tab {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 46px;
  padding: 0 12px 0 4px;
  background: rgba(255,255,255,0.62);
}

.flow-nav .nav-tab::before {
  content: attr(data-step);
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--green-dark);
  border: 1px solid rgba(15,118,110,0.22);
  border-radius: 999px;
  background: white;
  font-size: 12px;
  font-weight: 900;
  z-index: 1;
}

.flow-nav .nav-tab.active::before {
  color: white;
  background: var(--coral);
  border-color: var(--coral);
}

.service-flow-panel {
  background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(232,240,255,0.76));
}

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

.flow-step-card {
  position: relative;
  min-height: 170px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.86);
}

.flow-step-card:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--coral);
  font-weight: 900;
  z-index: 1;
}

.flow-step-card span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: white;
  border-radius: 999px;
  background: var(--green);
  font-weight: 900;
}

.flow-step-card strong,
.flow-step-card h4,
.flow-step-card p {
  display: block;
  margin: 0;
}

.flow-step-card strong {
  margin-top: 14px;
  color: var(--coral);
  font-size: 13px;
}

.flow-step-card h4 {
  margin-top: 6px;
  font-size: 18px;
}

.flow-step-card p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 1040px) {
  .role-rail {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .flow-nav {
    display: flex;
    overflow-x: auto;
    padding-left: 0;
  }

  .flow-nav::before {
    display: none;
  }

  .flow-nav .nav-tab {
    min-width: 126px;
  }

  .service-flow-grid {
    grid-template-columns: 1fr;
  }

  .flow-step-card:not(:last-child)::after {
    content: "↓";
    right: 20px;
    top: auto;
    bottom: -18px;
    transform: none;
  }
}

.tenant-panel {
  background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(229,244,238,0.78));
}

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

.tenant-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.86);
}

.tenant-card span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.tenant-card strong,
.tenant-card p {
  display: block;
  margin: 0;
}

.tenant-card strong {
  margin-top: 8px;
}

.tenant-card p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

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

/* Target precision panel */
.target-brief-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1.25fr) minmax(280px, 1fr) minmax(240px, 0.85fr);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(239,247,244,0.92));
  box-shadow: 0 12px 28px rgba(20, 57, 52, 0.07);
}

.target-brief-copy,
.target-revenue-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.78);
}

.target-brief-copy span,
.target-revenue-card span {
  display: block;
  color: var(--coral);
  font-size: 12px;
  font-weight: 900;
}

.target-brief-copy h3 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: clamp(20px, 2.2vw, 30px);
  line-height: 1.2;
}

.target-brief-copy p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.target-action-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.target-action-stack article {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 54px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.target-action-stack strong {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: white;
  border-radius: 999px;
  background: var(--green);
  font-size: 12px;
}

.target-action-stack span {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.target-revenue-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.target-revenue-card strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}

@media (max-width: 1180px) {
  .target-brief-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .target-action-stack {
    grid-template-columns: 1fr;
  }
}

/* Visual calendar and child-first mission view */
.calendar-panel {
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(240,247,255,0.9));
}

.calendar-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(92px, 1fr));
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.calendar-mode {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}

.calendar-mode.active {
  color: white;
  background: var(--green);
}

.calendar-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.calendar-summary article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.82);
}

.calendar-summary span,
.agenda-header span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.calendar-summary strong {
  display: block;
  margin-top: 5px;
  font-size: 20px;
}

.visual-calendar.week-mode {
  display: grid;
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.calendar-day,
.calendar-day-detail {
  min-width: 0;
  min-height: 260px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.82);
}

.calendar-day.today {
  border-color: rgba(212, 91, 56, 0.42);
  box-shadow: inset 0 0 0 1px rgba(212, 91, 56, 0.18);
}

.calendar-day h4,
.calendar-day-detail h4 {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 14px;
}

.calendar-day h4 span,
.calendar-day-detail h4 span {
  color: var(--coral);
}

.calendar-block {
  min-height: 74px;
  margin-bottom: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 8px;
  background: white;
}

.calendar-block strong,
.calendar-block span,
.calendar-block p {
  display: block;
  margin: 0;
}

.calendar-block strong {
  font-size: 13px;
}

.calendar-block span,
.calendar-block p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.visual-calendar.day-mode .calendar-day-detail {
  min-height: 520px;
}

.time-rail {
  position: relative;
  min-height: 620px;
  padding-left: 54px;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 59px, rgba(15,118,110,0.10) 60px);
}

.time-rail::before {
  content: "08:00\A09:00\A10:00\A11:00\A12:00\A13:00\A14:00\A15:00\A16:00\A17:00\A18:00\A19:00\A20:00";
  white-space: pre-line;
  position: absolute;
  left: 0;
  top: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 60px;
}

.time-rail .calendar-block {
  position: relative;
  top: var(--start-offset, 0px);
  min-height: var(--duration, 60px);
  max-width: 520px;
}

.day-agenda {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.agenda-header,
.agenda-row {
  display: grid;
  grid-template-columns: 86px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.agenda-header {
  grid-template-columns: 1fr;
  background: rgba(239,247,244,0.86);
}

.agenda-row:last-child {
  border-bottom: 0;
}

.agenda-row time {
  color: var(--coral);
  font-weight: 900;
}

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

.agenda-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.kid-next-card {
  margin-bottom: 14px;
  padding: 20px;
  border: 1px solid rgba(212,91,56,0.22);
  border-radius: 8px;
  background: linear-gradient(135deg, #fff7ed, #eef9f6);
}

.kid-next-card span {
  color: var(--coral);
  font-size: 13px;
  font-weight: 900;
}

.kid-next-card h3 {
  margin: 8px 0 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.16;
}

.kid-next-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.kid-next-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.child-friendly .kid-task {
  grid-template-columns: 76px 1fr auto;
  min-height: 96px;
  border-radius: 8px;
}

.child-friendly .task-time {
  font-size: 20px;
}

.child-friendly .task-kind {
  font-size: 12px;
}

.child-friendly h4 {
  font-size: 18px;
}

@media (max-width: 860px) {
  .calendar-toolbar,
  .agenda-row {
    grid-template-columns: 1fr;
  }

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

  .child-friendly .kid-task {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .calendar-summary {
    grid-template-columns: 1fr;
  }
}

/* Linked dashboard/navigation interactions */
.back-button[hidden] {
  display: none;
}

.linked-card {
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.linked-card:hover {
  transform: translateY(-2px);
  border-color: rgba(15,118,110,0.34);
  box-shadow: 0 14px 30px rgba(20, 57, 52, 0.10);
}

.linked-card:focus-within {
  outline: 2px solid rgba(15,118,110,0.28);
  outline-offset: 2px;
}

.command-card.linked-card::after,
.item.linked-card::after,
.calendar-block.linked-card::after,
.route-card.linked-card::after,
.agenda-row.linked-card::after {
  content: "보기";
  align-self: center;
  justify-self: end;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

.command-card.linked-card::after,
.calendar-block.linked-card::after {
  display: block;
  margin-top: 10px;
}

@media (max-width: 680px) {
  .command-card.linked-card::after,
  .item.linked-card::after,
  .calendar-block.linked-card::after,
  .route-card.linked-card::after,
  .agenda-row.linked-card::after {
    justify-self: start;
  }
}

.flow-jump-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.flow-jump-list button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(212,91,56,0.24);
  border-radius: 999px;
  color: var(--green-dark);
  background: rgba(255,255,255,0.76);
  font-weight: 900;
  cursor: pointer;
}

.flow-jump-list button:hover {
  color: white;
  background: var(--coral);
}

.metric.linked-card::after {
  content: "보기";
  display: inline-block;
  margin-top: 10px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

.overview-card.linked-card::after,
.roadmap-card.linked-card::after,
.risk-card.linked-card::after,
.portal-academy-card.linked-card::after,
.market-card.linked-card::after,
.point-card.linked-card::after,
.notice-card.linked-card::after,
.child-card.linked-card::after,
.academy-card.linked-card::after,
.cost-row.linked-card::after,
.billing-summary .linked-card::after,
.calendar-summary .linked-card::after {
  content: "보기";
  display: inline-block;
  margin-top: 8px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

.cost-row.linked-card::after {
  margin-top: 0;
  align-self: center;
}

.billing-summary .linked-card,
.calendar-summary .linked-card {
  cursor: pointer;
}


.calendar-day.drag-over,
.list.drag-over {
  border-color: rgba(15, 118, 110, 0.62);
  background: rgba(15, 118, 110, 0.08);
  box-shadow: inset 0 0 0 2px rgba(15, 118, 110, 0.12);
}

.calendar-block[draggable="true"],
.driver-stop[draggable="true"] {
  cursor: grab;
}

.calendar-block.dragging,
.driver-stop.dragging {
  opacity: 0.52;
  transform: scale(0.985);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
}

.drag-handle {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 7px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--green);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}


.nav-group {
  display: grid;
  gap: 7px;
}

.nav-group + .nav-group {
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.nav-group > span {
  padding: 0 4px 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.flow-nav .nav-tab {
  position: relative;
  min-height: 40px;
  padding-left: 42px;
  border-radius: 10px;
}

.flow-nav .nav-tab::before {
  content: attr(data-step);
  position: absolute;
  left: 12px;
  top: 50%;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  transform: translateY(-50%);
}

.flow-nav .nav-tab.active::before {
  color: white;
  background: var(--green);
}

.product-command-panel {
  overflow: hidden;
  border-color: rgba(15, 118, 110, 0.22);
  background: linear-gradient(135deg, rgba(255,255,255,0.94), rgba(238, 248, 244, 0.92));
}

.product-score-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(132px, 1fr));
  gap: 10px;
}

.product-score {
  min-height: 138px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.product-score span,
.commercial-lane span {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.product-score strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.product-score p {
  min-height: 34px;
  margin: 5px 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.score-meter {
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: rgba(24, 37, 36, 0.08);
}

.score-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--amber));
}

.commercial-lanes {
  display: grid;
  grid-template-columns: repeat(5, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.commercial-lane {
  min-height: 132px;
  padding: 15px;
  border: 1px solid rgba(24, 37, 36, 0.11);
  border-radius: 8px;
  background: rgba(255,255,255,0.78);
}

.commercial-lane strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
}

.commercial-lane div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.commercial-lane em {
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(53, 99, 168, 0.09);
  color: var(--blue);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.product-score.linked-card::after,
.commercial-lane.linked-card::after {
  content: "\ubcf4\uae30";
  position: absolute;
  top: 12px;
  right: 12px;
  margin: 0;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.09);
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 900;
}

@media (max-width: 1280px) {
  .product-score-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .commercial-lanes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .product-score-grid,
  .commercial-lanes { grid-template-columns: 1fr; }
}


.card-action {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.09);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

.flow-step-card .card-action {
  position: absolute;
  left: 18px;
  bottom: 16px;
}

.flow-step-card {
  padding-bottom: 52px;
}

/* v25 sidebar and action polish */
.sidebar { gap: 18px; padding: 22px 18px; }
.flow-nav { display: grid; gap: 14px; padding-left: 0; }
.flow-nav::before { display: none; }
.nav-group { display: grid; gap: 7px; padding: 12px; border: 1px solid rgba(24, 37, 36, 0.08); border-radius: 8px; background: rgba(255, 255, 255, 0.42); }
.nav-group + .nav-group { margin-top: 0; padding-top: 12px; border-top: 1px solid rgba(24, 37, 36, 0.08); }
.nav-group > span { padding: 0 2px 3px; color: var(--green-dark); font-size: 12px; font-weight: 900; }
.flow-nav .nav-tab { display: flex; align-items: center; gap: 9px; min-height: 40px; padding: 8px 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; line-height: 1.25; word-break: keep-all; white-space: normal; }
.flow-nav .nav-tab::before { position: static; flex: 0 0 24px; display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid rgba(15, 118, 110, 0.18); border-radius: 999px; background: rgba(15, 118, 110, 0.08); color: var(--green-dark); font-size: 11px; font-weight: 900; transform: none; }
.flow-nav .nav-tab:hover, .flow-nav .nav-tab.active { border-color: rgba(15, 118, 110, 0.18); background: white; }
.flow-nav .nav-tab.active::before { color: white; background: var(--green); border-color: var(--green); }
.flow-step-card.linked-card::after { content: "\2192"; position: absolute; right: -14px; top: 50%; display: grid; width: 28px; height: 28px; place-items: center; border-radius: 999px; background: white; color: var(--green); box-shadow: 0 6px 18px rgba(24, 37, 36, 0.12); transform: translateY(-50%); z-index: 2; }
.flow-step-card.linked-card:last-child::after { display: none; }
.card-action { display: inline-flex; align-items: center; width: fit-content; margin-top: 14px; padding: 5px 9px; border-radius: 999px; background: rgba(15, 118, 110, 0.09); color: var(--green-dark); font-size: 12px; font-weight: 900; }
.flow-step-card .card-action { position: absolute; left: 18px; bottom: 16px; margin-top: 0; }
.flow-step-card { padding-bottom: 56px; }
.product-score, .commercial-lane { position: relative; }
.product-score.linked-card::after, .commercial-lane.linked-card::after { content: "\ubcf4\uae30"; position: absolute; top: 12px; right: 12px; margin: 0; padding: 3px 7px; border-radius: 999px; background: rgba(15, 118, 110, 0.09); color: var(--green-dark); font-size: 11px; font-weight: 900; }


.payment-method-field {
  display: grid;
  gap: 8px;
}

.payment-method-field > span {
  color: var(--muted);
  font-weight: 800;
}

.method-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.method-choice {
  min-height: 76px;
  padding: 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.method-choice strong,
.method-choice small {
  display: block;
}

.method-choice small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.method-choice.active {
  border-color: rgba(15, 118, 110, 0.58);
  background: rgba(15, 118, 110, 0.08);
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.2);
}

.security-panel { background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(238, 248, 244, 0.88)); }
.security-score-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.security-score-card, .security-matrix-row, .audit-log-row { border: 1px solid var(--line); border-radius: 8px; background: white; }
.security-score-card { min-height: 142px; padding: 16px; }
.security-score-card span { color: var(--green); font-size: 12px; font-weight: 900; }
.security-score-card strong { display: block; margin-top: 8px; font-size: 28px; }
.security-score-card h4, .security-score-card p { margin: 0; }
.security-score-card h4 { margin-top: 8px; }
.security-score-card p { margin-top: 6px; color: var(--muted); }
.security-matrix { display: grid; gap: 10px; }
.security-matrix-row { display: grid; grid-template-columns: 150px 1.2fr 1fr 0.8fr; gap: 12px; align-items: center; padding: 14px; }
.security-matrix-row p, .security-matrix-row em { margin: 0; color: var(--muted); font-style: normal; }
.security-matrix-row span { color: var(--green-dark); font-weight: 900; }
.audit-log-list { display: grid; gap: 10px; }
.audit-log-row { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.8fr); gap: 12px; align-items: center; padding: 14px; }
.audit-log-row span { display: inline-flex; width: fit-content; margin-bottom: 6px; padding: 3px 7px; border-radius: 999px; background: rgba(15,118,110,0.08); color: var(--green-dark); font-size: 11px; font-weight: 900; }
.audit-log-row.critical span, .audit-log-row.high span { background: rgba(212,91,56,0.1); color: var(--coral); }
.audit-log-row strong, .audit-log-row p { display: block; margin: 0; }
.audit-log-row p { margin-top: 4px; color: var(--muted); }
.audit-log-row code { overflow: hidden; padding: 8px; border-radius: 8px; background: rgba(24,37,36,0.05); color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }

.chat-panel { background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(232,240,255,0.78)); }
.chat-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 14px; min-height: 560px; }
.chat-thread-list { display: grid; align-content: start; gap: 8px; }
.chat-thread { min-height: 82px; padding: 12px; text-align: left; border: 1px solid var(--line); border-radius: 8px; background: white; }
.chat-thread.active { border-color: rgba(15,118,110,0.45); background: rgba(15,118,110,0.08); }
.chat-thread span, .chat-thread small { display: block; color: var(--muted); font-size: 12px; }
.chat-thread strong { display: block; margin: 5px 0; }
.chat-window { display: grid; grid-template-rows: auto 1fr auto; min-height: 560px; border: 1px solid var(--line); border-radius: 8px; background: white; overflow: hidden; }
.chat-window-header { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,0.88); }
.chat-window-header h4, .chat-window-header p { margin: 0; }
.chat-window-header span { color: var(--green); font-size: 12px; font-weight: 900; }
.chat-window-header p { margin-top: 4px; color: var(--muted); }
.chat-message-list { display: grid; align-content: start; gap: 10px; padding: 16px; overflow: auto; }
.chat-message { max-width: 72%; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(24,37,36,0.04); }
.chat-message.parent { justify-self: end; background: rgba(15,118,110,0.09); }
.chat-message span, .chat-message time { display: block; color: var(--muted); font-size: 11px; }
.chat-message p { margin: 5px 0; }
.chat-composer { padding: 14px; border-top: 1px solid var(--line); background: rgba(255,255,255,0.9); }
.chat-composer textarea { width: 100%; resize: vertical; }
.chat-composer-actions { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 10px; }
.chat-composer-actions span { color: var(--muted); font-size: 12px; }

.system-status-panel { border-color: rgba(15,118,110,0.2); background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(238,248,244,0.86)); }
.system-status-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.system-status-card { min-height: 118px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.system-status-card span { color: var(--muted); font-size: 12px; font-weight: 900; }
.system-status-card strong { display: block; margin-top: 8px; font-size: 24px; }
.system-status-card p { margin: 7px 0 0; color: var(--muted); line-height: 1.45; }
.system-status-card.warn { border-color: rgba(216,154,43,0.38); background: rgba(255,247,223,0.86); }
.system-status-card.danger { border-color: rgba(212,91,56,0.38); background: rgba(255,235,228,0.86); }
.system-status-timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.status-queue-item { min-height: 54px; padding: 10px 12px; text-align: left; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,0.72); }
.status-queue-item span, .status-queue-item em { display: block; color: var(--muted); font-size: 12px; font-style: normal; }
.status-queue-item strong { display: block; margin: 3px 0; }
/* v31 mobile-first navigation and readable content override */
@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
  }

  body {
    background: linear-gradient(180deg, #f8f3ea 0%, #eef6f3 48%, #fffaf0 100%);
  }

  .app-shell {
    display: block;
    min-height: auto;
  }

  .sidebar {
    position: static !important;
    display: grid;
    gap: 12px;
    width: 100%;
    padding: 14px 12px 8px;
    border-right: 0;
    border-bottom: 1px solid rgba(24, 37, 36, 0.08);
    background: rgba(255, 250, 240, 0.92);
    backdrop-filter: none;
  }

  .brand {
    gap: 10px;
    min-height: 44px;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    font-size: 20px;
  }

  .brand h1 {
    font-size: 24px;
    line-height: 1.05;
  }

  .brand p,
  .brand-story {
    display: none !important;
  }

  .role-nav-panel {
    padding: 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    overflow: hidden;
  }

  .role-nav-panel > span {
    margin-bottom: 8px;
    font-size: 12px;
  }

  .role-rail {
    display: flex !important;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .role-rail::-webkit-scrollbar,
  .flow-nav::-webkit-scrollbar {
    display: none;
  }

  .sidebar .role-chip {
    flex: 0 0 auto;
    min-width: 68px;
    min-height: 36px;
    padding: 0 14px;
    font-size: 15px;
  }

  .flow-nav {
    display: flex !important;
    gap: 8px;
    margin: 0 -12px;
    padding: 0 12px 8px !important;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .flow-nav::before {
    display: none !important;
  }

  .nav-group,
  .nav-group + .nav-group {
    display: flex !important;
    flex: 0 0 auto;
    gap: 8px;
    min-width: max-content;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .nav-group > span {
    display: none;
  }

  .nav-tab[hidden] {
    display: none !important;
  }

  .flow-nav .nav-tab,
  .nav-tab {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 88px;
    max-width: 148px;
    min-height: 36px;
    padding: 0 12px !important;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    scroll-snap-align: start;
  }

  .flow-nav .nav-tab::before {
    display: none !important;
  }

  .flow-nav .nav-tab.active,
  .nav-tab.active {
    color: white;
    border-color: var(--green);
    background: var(--green);
  }

  .main {
    display: block;
    width: 100%;
    padding: 10px 12px 24px;
  }

  .hero {
    display: grid;
    gap: 16px;
    margin: 0 0 14px;
    padding: 18px;
    border-radius: 16px;
  }

  .hero h2 {
    max-width: none;
    font-size: 26px;
    line-height: 1.18;
  }

  .hero p {
    font-size: 14px;
    line-height: 1.55;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .hero-actions button,
  .topbar-actions button,
  .dialog-actions button {
    min-width: 0;
    padding: 0 10px;
    font-size: 14px;
  }

  .panel,
  .metric {
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(24, 37, 36, 0.08);
  }

  .panel {
    padding: 16px;
  }

  .panel-header,
  .chat-window-header,
  .chat-composer-actions,
  .calendar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-header h3 {
    font-size: 19px;
  }

  .panel-header p {
    font-size: 13px;
    line-height: 1.45;
  }

  .topbar-actions,
  .calendar-actions,
  .dialog-actions {
    width: 100%;
  }

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

  .target-brief-panel,
  .target-action-stack,
  .metric-grid,
  .content-grid,
  .command-grid,
  .product-score-grid,
  .commercial-lanes,
  .overview-grid,
  .roadmap-list,
  .risk-list,
  .tenant-grid,
  .security-score-grid,
  .system-status-grid,
  .system-status-timeline,
  .billing-summary,
  .plan-grid,
  .feature-gate-list,
  .portal-form,
  .academy-policy-strip,
  .marketplace-grid,
  .partner-flow,
  .reward-settings,
  .location-settings,
  .export-controls,
  .calendar-summary,
  .service-flow-grid {
    grid-template-columns: 1fr !important;
  }

  .profile-strip,
  .child-grid,
  .academy-grid {
    grid-template-columns: 1fr !important;
  }

  .service-flow-panel,
  .demo-guide,
  .product-command-panel,
  .command-panel,
  .target-brief-panel,
  .system-status-panel {
    margin-bottom: 14px;
  }

  .flow-step-card,
  .product-score,
  .commercial-lane,
  .command-card,
  .system-status-card {
    min-height: auto;
  }

  .flow-step-card.linked-card::after,
  .flow-step-card:not(:last-child)::after,
  .product-score.linked-card::after,
  .commercial-lane.linked-card::after {
    position: static;
    display: inline-flex;
    width: fit-content;
    height: auto;
    margin-top: 10px;
    transform: none;
  }

  .kid-task,
  .route-card,
  .driver-stop,
  .agenda-row,
  .security-matrix-row,
  .audit-log-row {
    grid-template-columns: 1fr !important;
  }

  .task-time,
  .route-time {
    width: fit-content;
    min-width: 86px;
    min-height: 44px;
  }

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

  .task-actions button {
    flex: 1 1 120px;
  }

  .visual-calendar.week-mode,
  .visual-calendar.day-mode {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  .calendar-day,
  .calendar-day-detail,
  .visual-calendar.day-mode .calendar-day-detail {
    min-height: auto;
  }

  .time-rail {
    min-height: auto;
    padding-left: 0;
    border-left: 0;
  }

  .time-rail .calendar-block {
    top: auto;
    margin-bottom: 8px;
  }

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

  .chat-thread-list {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .chat-thread {
    flex: 0 0 78vw;
  }

  .chat-window,
  .chat-message-list {
    min-height: 420px;
  }

  .chat-message {
    max-width: 92%;
  }

  .table-wrap {
    margin: 0 -16px;
    padding: 0 16px;
    overflow-x: auto;
  }

  table {
    min-width: 720px;
  }

  dialog {
    width: min(94vw, 560px);
    max-height: 88dvh;
  }

  .dialog-card {
    max-height: 88dvh;
    overflow: auto;
  }

  .form-grid,
  .method-choice-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 420px) {
  .hero h2 {
    font-size: 23px;
  }

  .hero-actions,
  .topbar-actions {
    grid-template-columns: 1fr;
  }

  .flow-nav .nav-tab,
  .nav-tab {
    min-width: 78px;
    max-width: 132px;
    font-size: 12px;
  }

  .sidebar .role-chip {
    min-width: 62px;
    font-size: 14px;
  }
}
/* v32 app-like mobile shell: page tabs instead of long anchor scrolling */
.mobile-shell-ui { display: none; }

@media (max-width: 760px) {
  body {
    padding-top: 58px;
    padding-bottom: calc(74px + env(safe-area-inset-bottom));
  }

  .mobile-shell-ui {
    display: block;
  }

  .sidebar {
    display: none !important;
  }

  .mobile-app-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 80;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    height: 58px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(24, 37, 36, 0.1);
    background: rgba(255, 250, 240, 0.96);
    box-shadow: 0 8px 24px rgba(24, 37, 36, 0.08);
  }

  .mobile-app-bar strong {
    overflow: hidden;
    font-size: 18px;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .mobile-role-button,
  .mobile-more-button,
  .mobile-sheet-header button,
  .mobile-role-item,
  .mobile-more-item,
  .mobile-tab {
    border: 1px solid var(--line);
    background: white;
    color: var(--ink);
    font: inherit;
  }

  .mobile-role-button,
  .mobile-more-button {
    min-height: 38px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
  }

  .mobile-role-button {
    color: white;
    border-color: var(--green);
    background: var(--green);
  }

  .mobile-more-button {
    color: var(--green-dark);
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    min-height: calc(64px + env(safe-area-inset-bottom));
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(24, 37, 36, 0.1);
    background: rgba(255, 250, 240, 0.97);
    box-shadow: 0 -12px 30px rgba(24, 37, 36, 0.1);
  }

  .mobile-tab {
    display: grid;
    min-width: 0;
    min-height: 44px;
    place-items: center;
    padding: 0 4px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.15;
  }

  .mobile-tab span {
    overflow: hidden;
    max-width: 100%;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .mobile-tab.active {
    color: white;
    border-color: var(--green);
    background: var(--green);
  }

  .mobile-more-panel {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(74px + env(safe-area-inset-bottom));
    z-index: 90;
    max-height: min(70dvh, 620px);
    padding: 14px;
    overflow: auto;
    border: 1px solid rgba(24, 37, 36, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 70px rgba(24, 37, 36, 0.22);
  }

  .mobile-sheet-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
  }

  .mobile-sheet-header strong {
    font-size: 18px;
  }

  .mobile-sheet-header button {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
  }

  .mobile-role-list,
  .mobile-more-list {
    display: grid;
    gap: 8px;
  }

  .mobile-role-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
  }

  .mobile-role-item {
    min-height: 36px;
    padding: 0 4px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
  }

  .mobile-role-item.active,
  .mobile-more-item.active {
    color: white;
    border-color: var(--green);
    background: var(--green);
  }

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

  .mobile-more-item {
    min-height: 44px;
    padding: 0 10px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 900;
    text-align: center;
  }

  .main {
    padding-top: 8px !important;
  }

  body:not([data-active-view="dashboard"]) .hero,
  body:not([data-active-view="dashboard"]) #targetBriefPanel,
  body:not([data-active-view="dashboard"]) #systemStatusPanel,
  body:not([data-active-view="dashboard"]) #serviceFlowMap,
  body:not([data-active-view="dashboard"]) #demoGuide,
  body:not([data-active-view="dashboard"]) #commercialCommandPanel,
  body:not([data-active-view="dashboard"]) #todayCommandCenter {
    display: none !important;
  }

  body[data-active-view="dashboard"] .hero {
    margin-top: 0;
  }

  .view.active {
    gap: 14px;
  }

  .panel + .panel,
  .view.active + .view,
  .metric-grid,
  .content-grid {
    margin-top: 0;
  }
}

@media (max-width: 420px) {
  .mobile-bottom-nav {
    gap: 4px;
    padding-left: 6px;
    padding-right: 6px;
  }

  .mobile-tab {
    font-size: 11px;
  }

  .mobile-role-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* v33 Siksu mobile benchmark pass: compact app shell and tile menu */
@media (max-width: 760px) {
  :root {
    --mobile-ink: #101615;
    --mobile-ink2: #17211f;
    --mobile-accent: #d7a83a;
    --mobile-accent2: #0f766e;
    --mobile-card: #ffffff;
    --mobile-soft: #f5f2ea;
  }

  body {
    padding-top: 94px;
    background: var(--mobile-soft);
  }

  .mobile-app-bar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    height: 52px;
    padding: 8px 12px;
    color: white;
    border-bottom: 2px solid var(--mobile-accent);
    background: var(--mobile-ink);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  }

  .mobile-app-bar::before {
    content: "\D558";
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    margin-right: 2px;
    color: var(--mobile-ink);
    border-radius: 9px;
    background: linear-gradient(135deg, var(--mobile-accent), #b88a22);
    font-size: 15px;
    font-weight: 900;
  }

  .mobile-app-bar strong {
    color: white;
    font-size: 15px;
    font-weight: 900;
  }

  .mobile-role-button,
  .mobile-more-button {
    min-height: 32px;
    padding: 0 10px;
    border-radius: 9px;
    font-size: 12px;
  }

  .mobile-role-button {
    color: var(--mobile-ink);
    border-color: var(--mobile-accent);
    background: var(--mobile-accent);
  }

  .mobile-more-button {
    color: var(--mobile-accent);
    border-color: rgba(215, 168, 58, 0.55);
    background: transparent;
  }

  .main::before {
    content: attr(data-mobile-title);
    display: none;
  }

  .hero {
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  }

  body[data-active-view="dashboard"] .hero {
    background: linear-gradient(135deg, #1f4d49, #102f2c);
    border: 1px solid rgba(15, 118, 110, 0.45);
  }

  .panel,
  .metric,
  .target-brief-panel,
  .demo-guide {
    border-color: #e5e0d8;
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(60, 50, 30, 0.09);
  }

  .panel-header {
    position: sticky;
    top: 52px;
    z-index: 20;
    margin: -16px -16px 14px;
    padding: 11px 16px 10px;
    border-bottom: 1px solid #e5e0d8;
    background: rgba(255, 255, 255, 0.96);
  }

  .panel-header h3 {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 16px;
  }

  .panel-header h3::before {
    content: "";
    width: 4px;
    height: 16px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--mobile-accent), #b88a22);
  }

  .panel-header p {
    font-size: 11px;
  }

  .metric {
    min-height: 112px;
    padding: 14px;
    border-left: 4px solid var(--mobile-accent2);
    background: white;
  }

  .metric strong,
  .system-status-card strong,
  .product-score strong,
  .command-card strong {
    font-feature-settings: "tnum";
  }

  .linked-card:active,
  .mobile-tab:active,
  .mobile-more-item:active,
  .mobile-role-item:active,
  .primary-button:active,
  .secondary-button:active,
  .ghost-button:active {
    transform: scale(0.98);
  }

  .mobile-bottom-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0;
    min-height: calc(68px + env(safe-area-inset-bottom));
    padding: 0 0 env(safe-area-inset-bottom);
    border-top: 2px solid var(--mobile-accent);
    background: var(--mobile-ink);
    box-shadow: 0 -2px 14px rgba(0, 0, 0, 0.22);
  }

  .mobile-tab {
    min-height: 66px;
    padding: 7px 2px 6px;
    color: #7f8a87;
    border: 0;
    border-top: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    gap: 2px;
  }

  .mobile-tab em,
  .mobile-more-item em {
    display: block;
    font-style: normal;
    line-height: 1;
  }

  .mobile-tab em {
    font-size: 19px;
  }

  .mobile-tab span {
    font-size: 10px;
    font-weight: 800;
  }

  .mobile-tab.active {
    color: var(--mobile-accent);
    border-top-color: var(--mobile-accent);
    background: transparent;
  }

  .mobile-tab.more {
    color: #aab4b0;
  }

  .mobile-more-panel {
    left: 0;
    right: 0;
    bottom: calc(68px + env(safe-area-inset-bottom));
    max-height: min(74dvh, 680px);
    padding: 14px 12px 18px;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 18px 18px 0 0;
    background: #f8f5ee;
  }

  .mobile-sheet-header {
    margin-bottom: 12px;
    padding: 0 2px;
  }

  .mobile-sheet-header strong {
    font-size: 17px;
  }

  .mobile-role-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 14px;
    padding: 10px;
    border: 1px solid #e5e0d8;
    border-radius: 14px;
    background: white;
  }

  .mobile-role-item {
    min-height: 34px;
    border-radius: 999px;
    font-size: 12px;
  }

  .mobile-role-item.active {
    color: var(--mobile-ink);
    border-color: var(--mobile-accent);
    background: var(--mobile-accent);
  }

  .mobile-more-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .mobile-more-item {
    display: grid;
    min-height: 86px;
    align-content: center;
    justify-items: center;
    gap: 7px;
    padding: 10px 6px;
    border: 1px solid #e5e0d8;
    border-radius: 14px;
    background: white;
    box-shadow: 0 6px 20px rgba(60, 50, 30, 0.11);
  }

  .mobile-more-item em {
    color: var(--mobile-accent2);
    font-size: 24px;
    font-weight: 900;
  }

  .mobile-more-item span {
    color: var(--ink);
    font-size: 12px;
    font-weight: 900;
    line-height: 1.2;
    text-align: center;
  }

  .mobile-more-item.active {
    border-color: rgba(15, 118, 110, 0.32);
    background: #ecf7f3;
  }

  .mobile-more-item.active span,
  .mobile-more-item.active em {
    color: var(--mobile-accent2);
  }

  .kid-next-card,
  .entry-hero,
  .command-card.warn,
  .billing-card.requested {
    border-left: 4px solid var(--mobile-accent);
  }

  .primary-button {
    border-radius: 10px;
  }
}

@media (max-width: 420px) {
  .mobile-more-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .mobile-more-item {
    min-height: 78px;
  }

  .mobile-role-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
  }

  .mobile-role-item {
    font-size: 11px;
  }
}


/* v34 flowchart mobile home: app first, report second */
.mobile-flow-home { display: none; }

@media (max-width: 760px) {
  body[data-active-view="dashboard"] .hero,
  body[data-active-view="dashboard"] #targetBriefPanel,
  body[data-active-view="dashboard"] #systemStatusPanel,
  body[data-active-view="dashboard"] #dashboard > :not(.mobile-flow-home) {
    display: none !important;
  }

  body[data-active-view="dashboard"] .main {
    min-height: calc(100dvh - 162px);
  }

  .mobile-flow-home {
    display: grid;
    gap: 12px;
    min-height: calc(100dvh - 178px);
    padding-bottom: 8px;
  }

  .mobile-flow-hero-card,
  .mobile-flow-progress,
  .mobile-flow-node,
  .mobile-flow-shortcuts button {
    border: 1px solid #e5e0d8;
    background: #fffdf8;
    box-shadow: 0 8px 22px rgba(31, 42, 40, 0.08);
  }

  .mobile-flow-hero-card {
    display: grid;
    gap: 10px;
    padding: 16px;
    border-radius: 18px;
    color: white;
    background: radial-gradient(circle at 86% 12%, rgba(215,168,58,0.34), transparent 28%), linear-gradient(135deg, #122a27, #28766c);
  }

  .mobile-flow-role {
    width: fit-content;
    padding: 5px 9px;
    color: #15201e;
    border-radius: 999px;
    background: #d7a83a;
    font-size: 12px;
    font-weight: 900;
  }

  .mobile-flow-hero-card h2,
  .mobile-flow-hero-card p,
  .mobile-flow-now strong,
  .mobile-flow-now span {
    margin: 0;
  }

  .mobile-flow-hero-card h2 {
    font-size: 24px;
    line-height: 1.12;
    letter-spacing: 0;
  }

  .mobile-flow-hero-card p,
  .mobile-flow-now span {
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    line-height: 1.45;
  }

  .mobile-flow-now {
    display: grid;
    gap: 4px;
    padding: 11px;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 13px;
    background: rgba(255,255,255,0.1);
  }

  .mobile-flow-now strong {
    font-size: 16px;
  }

  .mobile-flow-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .mobile-flow-actions button {
    min-height: 42px;
    border-radius: 12px;
  }

  .mobile-flow-progress {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
    align-items: center;
    padding: 12px;
    border-radius: 14px;
  }

  .mobile-flow-progress span,
  .mobile-flow-progress strong {
    font-size: 13px;
    font-weight: 900;
  }

  .mobile-flow-progress i {
    grid-column: 1 / -1;
    display: block;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8e4dc;
  }

  .mobile-flow-progress i::before {
    content: "";
    display: block;
    width: var(--value);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0f766e, #d7a83a);
  }

  .mobile-flow-map {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .mobile-flow-map::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 18px;
    bottom: 18px;
    width: 2px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, rgba(15,118,110,0.15), rgba(215,168,58,0.4), rgba(15,118,110,0.15));
  }

  .mobile-flow-node {
    position: relative;
    display: grid;
    min-height: 112px;
    align-content: start;
    gap: 5px;
    padding: 12px;
    border-radius: 16px;
    text-align: left;
    font: inherit;
  }

  .mobile-flow-node:active,
  .mobile-flow-shortcuts button:active {
    transform: scale(0.98);
  }

  .mobile-flow-node em {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    color: white;
    border-radius: 999px;
    background: #0f766e;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
  }

  .mobile-flow-node span {
    color: #101615;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.15;
  }

  .mobile-flow-node small {
    color: #66726f;
    font-size: 11px;
    line-height: 1.35;
  }

  .mobile-flow-node b {
    width: fit-content;
    margin-top: auto;
    padding: 4px 7px;
    color: #0f766e;
    border-radius: 999px;
    background: #e6f4ef;
    font-size: 10px;
  }

  .mobile-flow-shortcuts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .mobile-flow-shortcuts button {
    display: grid;
    min-height: 68px;
    align-content: center;
    gap: 3px;
    padding: 8px 4px;
    border-radius: 14px;
    font: inherit;
  }

  .mobile-flow-shortcuts strong {
    color: #d45b38;
    font-size: 18px;
    line-height: 1;
  }

  .mobile-flow-shortcuts span {
    color: #34403d;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.15;
  }
}

@media (max-width: 380px) {
  .mobile-flow-hero-card h2 { font-size: 21px; }
  .mobile-flow-node { min-height: 104px; padding: 10px; }
  .mobile-flow-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


﻿/* v35 native mobile app layer */
.mobile-native-app { display: none; }
@media (max-width: 760px) {
  body.mobile-native-ready { min-height: 100dvh; padding: 0 !important; background: #f4f1ea; overflow: hidden; }
  body.mobile-native-ready .mobile-shell-ui, body.mobile-native-ready .app-shell { display: none !important; }
  body.mobile-native-ready .mobile-native-app { position: fixed; inset: 0; z-index: 120; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; color: #101615; background: #f4f1ea; font-family: Arial, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }
  .native-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(12px + env(safe-area-inset-top)) 16px 10px; color: #fff; background: #101615; border-bottom: 2px solid #d7a83a; }
  .native-brand { display: flex; min-width: 0; align-items: center; gap: 10px; }
  .native-brand em { display: grid; width: 38px; height: 38px; place-items: center; color: #101615; border-radius: 12px; background: #d7a83a; font-style: normal; font-weight: 900; }
  .native-brand div { display: grid; gap: 2px; }
  .native-brand strong, .native-brand span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .native-brand strong { font-size: 18px; line-height: 1; }
  .native-brand span { color: rgba(255,255,255,0.68); font-size: 12px; font-weight: 800; }
  .native-role-button, .native-role-strip button, .native-bottom-tabs button, .native-content button { border: 0; font: inherit; cursor: pointer; }
  .native-role-button { min-width: 58px; min-height: 34px; padding: 0 12px; color: #101615; border-radius: 999px; background: #d7a83a; font-size: 13px; font-weight: 900; }
  .native-role-strip { display: flex; gap: 8px; padding: 10px 14px; overflow-x: auto; background: #fffaf0; border-bottom: 1px solid #e5e0d8; scrollbar-width: none; }
  .native-role-strip::-webkit-scrollbar { display: none; }
  .native-role-strip button { flex: 0 0 auto; min-height: 34px; padding: 0 14px; color: #62706c; border: 1px solid #e5e0d8; border-radius: 999px; background: #fff; font-size: 13px; font-weight: 900; }
  .native-role-strip button.active { color: #fff; border-color: #0f766e; background: #0f766e; }
  .native-content { display: grid; align-content: start; gap: 12px; overflow-y: auto; padding: 14px 14px 18px; -webkit-overflow-scrolling: touch; }
  .native-hero-card, .native-section, .native-map-card, .native-stat-grid article, .native-flow-card, .native-list-row, .native-stop, .native-empty, .native-action-bar { border: 1px solid #e3ded6; border-radius: 16px; background: #fffdf8; box-shadow: 0 8px 22px rgba(35, 43, 40, 0.08); }
  .native-hero-card { display: grid; gap: 10px; padding: 16px; color: #fff; background: radial-gradient(circle at 82% 12%, rgba(215,168,58,.35), transparent 28%), linear-gradient(135deg, #10211f, #246e64); }
  .native-hero-top, .native-section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .native-hero-top span, .native-hero-top b { font-size: 12px; font-weight: 900; }
  .native-hero-top span { padding: 5px 9px; color: #101615; border-radius: 999px; background: #d7a83a; }
  .native-hero-card h2, .native-hero-card p { margin: 0; }
  .native-hero-card h2 { font-size: 23px; line-height: 1.16; letter-spacing: 0; }
  .native-hero-card p { color: rgba(255,255,255,0.72); font-size: 13px; line-height: 1.45; }
  .native-hero-actions, .native-action-bar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .native-hero-actions button, .native-action-bar button, .native-content .native-primary { min-height: 42px; color: #101615; border-radius: 12px; background: #d7a83a; font-weight: 900; }
  .native-hero-actions button:not(.native-primary), .native-action-bar button:not(.native-primary) { color: #fff; border: 1px solid rgba(255,255,255,0.22); background: rgba(255,255,255,0.12); }
  .native-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .native-stat-grid article { display: grid; gap: 4px; min-height: 74px; align-content: center; padding: 12px; }
  .native-stat-grid strong { color: #101615; font-size: 22px; line-height: 1; }
  .native-stat-grid span { color: #68736f; font-size: 11px; font-weight: 900; line-height: 1.2; }
  .native-section { display: grid; gap: 10px; padding: 13px; }
  .native-section-title strong { font-size: 16px; }
  .native-section-title span, .native-section-title button { color: #66726f; background: transparent; font-size: 12px; font-weight: 900; }
  .native-flow-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .native-flow-card { display: grid; min-height: 96px; align-content: start; gap: 5px; padding: 12px; text-align: left; }
  .native-flow-card em { display: grid; width: 26px; height: 26px; place-items: center; color: #fff; border-radius: 999px; background: #0f766e; font-style: normal; font-weight: 900; }
  .native-flow-card strong, .native-list-row strong, .native-stop strong, .native-map-card strong { color: #101615; font-size: 15px; line-height: 1.2; }
  .native-flow-card span, .native-list-row span, .native-stop span, .native-empty strong { color: #66726f; font-size: 12px; line-height: 1.35; }
  .native-list-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px; }
  .native-list-row time { display: grid; min-width: 48px; min-height: 42px; place-items: center; color: #0f766e; border-radius: 12px; background: #e6f4ef; font-size: 12px; font-weight: 900; }
  .native-list-row div, .native-stop div:first-child { display: grid; min-width: 0; gap: 3px; }
  .native-list-row button, .native-empty button, .native-stop-actions button { min-height: 34px; padding: 0 10px; color: #0f766e; border-radius: 10px; background: #e6f4ef; font-size: 12px; font-weight: 900; }
  .native-week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
  .native-day { display: grid; min-height: 54px; place-items: center; border: 1px solid #e5e0d8; border-radius: 12px; background: #fff; }
  .native-day b { font-size: 12px; } .native-day span { color: #d45b38; font-size: 12px; font-weight: 900; } .native-day.active { border-color: #0f766e; background: #e6f4ef; }
  .native-map-card { display: grid; gap: 10px; padding: 14px; } .native-map-card span { color: #66726f; font-size: 12px; font-weight: 900; }
  .native-map-line { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; min-height: 54px; align-items: center; }
  .native-map-line::before { content: ""; position: absolute; left: 10px; right: 10px; top: 50%; height: 4px; transform: translateY(-50%); border-radius: 999px; background: linear-gradient(90deg, #0f766e, #d7a83a); }
  .native-map-line i { z-index: 1; display: block; width: 18px; height: 18px; margin: auto; border: 3px solid #fff; border-radius: 999px; background: #0f766e; box-shadow: 0 0 0 1px #0f766e; }
  .native-stop { display: grid; gap: 10px; padding: 12px; } .native-stop-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .native-stop.boarded { border-color: rgba(15,118,110,.35); } .native-stop.dropped { opacity: .74; } .native-stop.late { border-color: rgba(212,91,56,.45); }
  .native-empty { display: grid; gap: 10px; justify-items: start; padding: 14px; } .native-action-bar { padding: 10px; }
  .native-more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .native-more-card { display: grid; min-height: 78px; place-items: center; gap: 4px; border: 1px solid #e5e0d8; border-radius: 14px; background: #fff; }
  .native-more-card em { color: #0f766e; font-style: normal; font-weight: 900; } .native-more-card span { font-size: 11px; font-weight: 900; } .native-more-card.active { background: #e6f4ef; }
  .native-bottom-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 0 0 env(safe-area-inset-bottom); background: #101615; border-top: 2px solid #d7a83a; }
  .native-bottom-tabs button { display: grid; min-height: 68px; place-items: center; align-content: center; gap: 3px; color: #8c9692; background: transparent; }
  .native-bottom-tabs button em { font-style: normal; font-size: 18px; line-height: 1; } .native-bottom-tabs button span { max-width: 100%; overflow: hidden; font-size: 10px; font-weight: 900; white-space: nowrap; text-overflow: ellipsis; }
  .native-bottom-tabs button.active { color: #d7a83a; }
  .native-flow-card:active, .native-list-row button:active, .native-bottom-tabs button:active, .native-role-strip button:active, .native-more-card:active { transform: scale(.98); }
  body.mobile-native-ready dialog { z-index: 200; }
}
@media (max-width: 380px) { .native-content { padding: 10px; } .native-hero-card h2 { font-size: 20px; } .native-flow-list { grid-template-columns: 1fr; } .native-stat-grid article { padding: 10px 8px; } .native-stat-grid strong { font-size: 19px; } }



/* v37 hard fallback mobile menu */
@media (max-width: 900px) {
  body { padding: 0 !important; }
  body .mobile-native-app {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    color: #101615;
    background: #f4f1ea;
    font-family: Arial, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  }
  body .app-shell,
  body .mobile-shell-ui {
    display: none !important;
  }
}
