:root {
  --blue: #0b5bd3;
  --blue-dark: #073b89;
  --blue-soft: #eaf2ff;
  --green: #12a96f;
  --green-soft: #e8f8f2;
  --orange: #f38b2a;
  --orange-soft: #fff2e5;
  --purple: #7756dc;
  --purple-soft: #f0ecff;
  --ink: #182033;
  --muted: #7c879e;
  --line: #e8ecf3;
  --surface: #f5f7fb;
  --white: #fff;
  --shadow: 0 12px 32px rgba(28, 45, 82, .10);
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  color: var(--ink);
  background: #e9edf5;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }

#desktop-shell {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  gap: 88px;
  padding: 40px;
  background:
    radial-gradient(circle at 12% 18%, rgba(31, 112, 255, .22), transparent 27%),
    radial-gradient(circle at 88% 78%, rgba(18, 169, 111, .16), transparent 22%),
    linear-gradient(135deg, #061a43 0%, #0b3974 52%, #071a36 100%);
}

.desktop-intro {
  width: 390px;
  align-self: center;
  color: white;
}

.desktop-intro > .brand-mark { margin-bottom: 24px; }
.desktop-intro .eyebrow { margin: 0 0 8px; opacity: .62; letter-spacing: 3px; font-size: 12px; }
.desktop-intro h1 { margin: 0 0 12px; font-size: 38px; letter-spacing: -.5px; }
.desktop-intro > div:nth-child(2) > p:last-child { margin: 0 0 42px; opacity: .72; line-height: 1.8; }

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px 14px 14px 4px;
  color: white;
  background: var(--blue);
  font: 900 italic 25px Georgia, serif;
  box-shadow: 0 8px 22px rgba(12, 86, 201, .28);
}

.brand-mark.light {
  color: var(--blue);
  background: white;
  box-shadow: none;
}

.desktop-feature {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid rgba(255,255,255,.12);
}

.desktop-feature > span { font-weight: 800; color: #74aaff; }
.desktop-feature b, .desktop-feature small { display: block; }
.desktop-feature b { margin-bottom: 4px; }
.desktop-feature small { opacity: .58; }
.desktop-qr { width: fit-content; display: flex; align-items: center; gap: 13px; margin-top: 28px; padding: 10px 14px 10px 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 12px; background: rgba(255,255,255,.06); }
.desktop-qr img { width: 68px; height: 68px; padding: 4px; border-radius: 8px; background: white; }
.desktop-qr b, .desktop-qr small { display: block; }
.desktop-qr b { font-size: 13px; }
.desktop-qr small { margin-top: 5px; opacity: .55; font-size: 10px; }

#app {
  width: 390px;
  height: min(844px, calc(100vh - 48px));
  min-height: 680px;
  align-self: center;
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 8px solid #111827;
  border-radius: 42px;
  box-shadow: 0 35px 80px rgba(0,0,0,.42);
}

#app::before {
  content: "";
  position: absolute;
  z-index: 100;
  top: 8px;
  left: 50%;
  width: 92px;
  height: 25px;
  transform: translateX(-50%);
  border-radius: 20px;
  background: #111827;
  pointer-events: none;
}

.welcome {
  height: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: auto;
  color: white;
  background:
    radial-gradient(circle at 78% 20%, rgba(79, 150, 255, .45), transparent 27%),
    linear-gradient(155deg, #07337b 0%, #06255a 47%, #051b3c 100%);
  padding: 48px 24px 24px;
  position: relative;
}

.welcome-glow {
  position: absolute;
  top: 165px;
  right: -80px;
  width: 230px;
  height: 230px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
}

.welcome-glow::before, .welcome-glow::after {
  content: "";
  position: absolute;
  inset: 28px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
}

.welcome-glow::after { inset: 62px; }

.welcome-brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 12px;
  font-weight: 700;
}

.welcome-brand .brand-mark { width: 36px; height: 36px; border-radius: 11px 11px 11px 3px; font-size: 20px; }
.welcome-copy { position: relative; margin: 48px 0 28px; }
.mini-pill { display: inline-block; padding: 5px 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 20px; font-size: 10px; letter-spacing: 1.5px; color: #a8caff; }
.welcome-copy h2 { margin: 16px 0 12px; font-size: 30px; line-height: 1.3; letter-spacing: -.6px; }
.welcome-copy p { margin: 0; max-width: 315px; font-size: 12px; line-height: 1.75; color: rgba(255,255,255,.7); }
.welcome-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 17px; }
.welcome-tags span { padding: 5px 9px; border-radius: 7px; color: rgba(255,255,255,.78); background: rgba(255,255,255,.09); font-size: 9px; }

.role-entry {
  position: relative;
  padding: 20px;
  color: var(--ink);
  background: rgba(255,255,255,.97);
  border-radius: 18px;
  box-shadow: 0 16px 38px rgba(0,0,0,.2);
}

.role-entry > p { margin: 0 0 13px; color: var(--muted); font-size: 12px; }
.role-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin: 0 0 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  text-align: left;
}

.role-card.active { border-color: var(--blue); background: var(--blue-soft); box-shadow: inset 0 0 0 1px var(--blue); }
.role-card > span:nth-child(2) { flex: 1; }
.role-card b, .role-card small { display: block; }
.role-card b { font-size: 14px; }
.role-card small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.role-card i { font-size: 22px; color: var(--muted); font-style: normal; }

.role-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 12px;
  color: white;
  background: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.role-icon.green { background: var(--green); }

.primary-btn, .secondary-btn, .ghost-btn {
  border: 0;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

.primary-btn {
  width: 100%;
  padding: 14px 18px;
  color: white;
  background: linear-gradient(135deg, #126be5, #084baa);
  box-shadow: 0 8px 18px rgba(11, 91, 211, .24);
}

.secondary-btn { width: 100%; margin-top: 9px; padding: 12px; color: var(--muted); background: transparent; }
.role-entry .primary-btn { margin-top: 7px; }
.welcome-foot { margin-top: auto; padding-top: 24px; text-align: center; color: rgba(255,255,255,.42); font-size: 10px; }

.app-view {
  height: 100%;
  min-height: 100%;
  background: var(--surface);
}

.topbar {
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 29px 18px 10px;
  background: white;
  border-bottom: 1px solid var(--line);
}

.top-location { font-size: 14px; font-weight: 800; }
.top-location span { color: var(--muted); }
.top-date { margin-top: 3px; color: var(--muted); font-size: 10px; }
.avatar {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, #287de7, #0b4ba5);
  font-weight: 800;
  box-shadow: 0 5px 12px rgba(11,91,211,.22);
}

.pages {
  height: calc(100% - 153px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.pages::-webkit-scrollbar, .welcome::-webkit-scrollbar { display: none; }
.page { display: none; padding: 16px 16px 30px; animation: fade .24s ease; }
.page.active { display: block; }
@keyframes fade { from { opacity: .3; transform: translateY(5px); } }
.page[data-page="assistant"] { animation: assistantFade .18s ease; }
@keyframes assistantFade { from { opacity: .35; } }

.hero-panel {
  padding: 19px;
  border-radius: 18px;
  color: white;
  background:
    radial-gradient(circle at 92% 12%, rgba(101, 168, 255, .52), transparent 29%),
    linear-gradient(135deg, #0a5cc8, #073b89);
  box-shadow: 0 12px 24px rgba(7, 59, 137, .22);
}

.hero-panel-top { display: flex; justify-content: space-between; color: rgba(255,255,255,.76); font-size: 10px; }
.status-dot { width: 7px; height: 7px; display: inline-block; margin-right: 5px; border-radius: 50%; background: #62e4ae; box-shadow: 0 0 0 4px rgba(98,228,174,.15); }
.hero-panel h2 { margin: 17px 0 7px; font-size: 23px; }
.hero-panel p { margin: 0; max-width: 285px; color: rgba(255,255,255,.72); font-size: 11px; line-height: 1.7; }
.ghost-btn { margin-top: 17px; padding: 9px 12px; color: white; background: rgba(255,255,255,.14); font-size: 11px; }
.ghost-btn span { margin-left: 12px; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 24px 2px 12px;
}

.section-head.compact { margin-top: 19px; }
.section-head h3 { margin: 0; font-size: 15px; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.text-btn { padding: 4px; border: 0; color: var(--blue); background: none; font-size: 11px; }

.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.metric-card { min-height: 102px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.metric-card > span { display: block; color: var(--muted); font-size: 10px; }
.metric-card b { display: block; margin: 8px 0 3px; font-size: 24px; letter-spacing: -.5px; }
.metric-card b em { margin-left: 2px; font-size: 11px; font-style: normal; }
.metric-card small { color: var(--muted); font-size: 9px; }
.metric-card small.up { color: var(--green); }

.workforce-chart-card, .personnel-structure-card { margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.chart-card-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.chart-card-title b, .chart-card-title small { display: block; }
.chart-card-title b { font-size: 11px; }
.chart-card-title small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.bar-legend { display: flex; gap: 8px; padding-top: 2px; color: var(--muted); font-size: 6px; white-space: nowrap; }
.bar-legend span::before { content: ""; width: 7px; height: 7px; display: inline-block; margin-right: 3px; border-radius: 2px; vertical-align: -1px; }
.bar-legend .plan::before { background: #1768bd; }
.bar-legend .actual::before { background: #cf8a17; }
.cluster-bar-chart { height: 150px; position: relative; display: flex; align-items: flex-end; justify-content: space-around; gap: 5px; margin-top: 14px; padding: 0 3px 2px; border-bottom: 1px solid var(--line); }
.chart-grid-lines { position: absolute; inset: 0 0 27px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.chart-grid-lines i { display: block; border-top: 1px solid #edf0f5; }
.compare-bar-group { width: 52px; z-index: 1; text-align: center; }
.bar-pair { height: 112px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.bar-pair i { width: 13px; height: var(--bar); display: block; border-radius: 4px 4px 1px 1px; }
.bar-pair i.plan { background: #1768bd; }
.bar-pair i.actual { background: #cf8a17; }
.compare-bar-group > b { display: block; margin-top: 5px; font-size: 7px; white-space: nowrap; }
.compare-bar-group > small { display: block; margin-top: 1px; color: var(--muted); font-size: 6px; }
.structure-content { display: flex; align-items: center; justify-content: center; gap: 28px; padding: 15px 6px 5px; }
.structure-donut { width: 112px; height: 112px; position: relative; display: grid; place-items: center; flex: none; border-radius: 50%; background: conic-gradient(#1768bd 0 45%, #2e91df 45% 75%, #cf8a17 75% 100%); }
.structure-donut::before { content: ""; width: 67px; height: 67px; position: absolute; border-radius: 50%; background: white; }
.structure-donut > div { z-index: 1; text-align: center; }
.structure-donut b, .structure-donut span { display: block; }
.structure-donut b { font-size: 18px; }
.structure-donut span { margin-top: 2px; color: var(--muted); font-size: 6px; }
.structure-legend { display: grid; gap: 10px; min-width: 105px; }
.structure-legend > span { display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 6px; }
.structure-legend i { width: 8px; height: 8px; border-radius: 2px; }
.structure-legend .ft i { background: #1768bd; }
.structure-legend .plus i { background: #2e91df; }
.structure-legend .flex i { background: #cf8a17; }
.structure-legend b { font-size: 8px; }
.structure-legend em { color: var(--muted); font-size: 8px; font-style: normal; }

.ai-alert {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 12px;
  padding: 13px;
  border: 1px solid #d8ceff;
  border-radius: 14px;
  background: linear-gradient(120deg, #f4f0ff, #fff);
  cursor: pointer;
}

.ai-orb {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 11px;
  color: white;
  background: linear-gradient(145deg, #8868ed, #6040bd);
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 6px 12px rgba(119,86,220,.2);
}

.ai-orb.large { width: 44px; height: 44px; border-radius: 14px; font-size: 12px; }
.ai-alert > div:nth-child(2) { flex: 1; }
.ai-alert b { font-size: 12px; }
.ai-alert p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.ai-alert > span { color: var(--purple); font-size: 20px; }
.filter-chip { padding: 5px 8px; border: 1px solid var(--line); border-radius: 16px; color: var(--muted); background: white; font-size: 9px; }

.store-list { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: white; }
.store-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: white;
  text-align: left;
}
.store-row:last-child { border-bottom: 0; }

.store-logo {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 10px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 11px;
  font-weight: 800;
}

.store-logo.warn { color: var(--orange); background: var(--orange-soft); }
.store-logo.rich { color: var(--green); background: var(--green-soft); }
.store-main { flex: 1; }
.store-main b, .store-main small, .store-state b, .store-state small { display: block; }
.store-main b { font-size: 11px; }
.store-main small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.store-state { text-align: right; }
.store-state b { color: var(--green); font-size: 10px; }
.store-state small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.store-state.warn b { color: var(--orange); }
.store-state.rich b { color: var(--green); }

.attention-head { display: flex; align-items: flex-end; justify-content: space-between; margin: 22px 2px 10px; }
.attention-head h3 { margin: 0; font-size: 15px; }
.attention-head p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.attention-head > span { color: #d85a55; font-size: 8px; font-weight: 800; }
.attention-groups { display: grid; gap: 8px; }
.attention-row { width: 100%; display: flex; align-items: center; gap: 9px; padding: 12px; border: 0; border-radius: 12px; text-align: left; }
.attention-row.danger { background: #fff0ef; }
.attention-row.warning { background: #fffbe5; }
.attention-row > i { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #ef5550; }
.attention-row.warning > i { background: #e8c229; }
.attention-row > span { flex: 1; min-width: 0; }
.attention-row b, .attention-row small { display: block; }
.attention-row b { font-size: 10px; }
.attention-row small { margin-top: 3px; overflow: hidden; color: #6f7789; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.attention-row em { padding: 4px 6px; border-radius: 8px; color: #d85a55; background: rgba(255,255,255,.58); font-size: 6px; font-style: normal; font-weight: 800; white-space: nowrap; }
.attention-row.warning em { color: #bd9b18; }
.attention-row strong { color: #d85a55; font-size: 11px; }
.attention-row.warning strong { color: #bd9b18; }

.bottom-nav {
  height: 67px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 6px 9px max(7px, env(safe-area-inset-bottom));
  background: rgba(255,255,255,.97);
  border-top: 1px solid var(--line);
}

.bottom-nav button {
  position: relative;
  border: 0;
  color: #9aa3b4;
  background: transparent;
}

.bottom-nav span, .bottom-nav b { display: block; }
.bottom-nav span { height: 24px; font-size: 20px; line-height: 22px; }
.bottom-nav b { font-size: 9px; }
.bottom-nav button.active { color: var(--blue); }
.nav-dot { position: absolute; top: 4px; right: 22px; width: 6px; height: 6px; border: 1px solid white; border-radius: 50%; background: #f05252; }

.page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1px 1px 17px;
}

.page-title p { margin: 0 0 3px; color: var(--blue); font-size: 8px; font-weight: 800; letter-spacing: 1.5px; }
.page-title h2 { margin: 0; font-size: 21px; }
.round-icon { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; color: var(--blue); background: white; font-weight: 800; }
.success-tag { display: inline-block; padding: 4px 8px; border-radius: 14px; color: var(--green); background: var(--green-soft); font-size: 8px; font-weight: 800; }

.plan-status { padding: 15px; border: 1px solid #cee0ff; border-radius: 14px; background: linear-gradient(120deg, var(--blue-soft), white); }
.plan-status b, .plan-status small { display: block; }
.plan-status b { margin-top: 10px; font-size: 16px; }
.plan-status small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.model-chain { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-top: 9px; padding: 9px 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: white; }
.model-chain span { color: #56627a; font-size: 7px; font-weight: 700; white-space: nowrap; }
.model-chain i { color: #a7b0c1; font-size: 9px; font-style: normal; }

.chart-card { margin-top: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.chart-head { display: flex; justify-content: space-between; align-items: center; }
.chart-head b, .chart-head small { display: block; }
.chart-head b { font-size: 12px; }
.chart-head small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.chart-head > span { color: var(--green); font-size: 9px; font-weight: 800; }
.bar-chart { height: 150px; display: flex; margin-top: 13px; }
.y-labels { width: 28px; display: flex; flex-direction: column; justify-content: space-between; padding-bottom: 25px; color: #a9b1c0; font-size: 7px; }
.bars { flex: 1; display: flex; justify-content: space-around; align-items: flex-end; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to bottom, var(--line) 0, var(--line) 1px, transparent 1px, transparent 37px); }
.bar-item { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.bar-item b { margin-top: 5px; font-size: 8px; }
.bar-item small { color: var(--muted); font-size: 7px; }
.bar-stack { width: 38px; height: 106px; display: flex; flex-direction: column-reverse; justify-content: flex-start; overflow: hidden; border-radius: 7px 7px 2px 2px; }
.bar-stack i { display: block; }
.bar-stack i:nth-child(1) { height: var(--ft); background: var(--blue); }
.bar-stack i:nth-child(2) { height: var(--pt); background: var(--green); }
.bar-stack i:nth-child(3) { height: var(--flex); background: var(--purple); }
.single-month-chart { display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 18px; padding: 17px 6px 9px; }
.single-month-bar { display: flex; flex-direction: column; align-items: center; }
.single-month-bar .bar-stack { width: 64px; height: 116px; }
.single-month-bar > b { margin-top: 7px; font-size: 9px; }
.single-month-bar > small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.month-facts { display: grid; gap: 8px; }
.month-facts > div { display: flex; align-items: center; justify-content: space-between; padding: 10px 11px; border-radius: 10px; background: var(--surface); }
.month-facts span { color: var(--muted); font-size: 9px; }
.month-facts b { font-size: 11px; }
.month-facts .green-text { color: var(--green); }
.legend { display: flex; justify-content: center; gap: 16px; margin-top: 12px; color: var(--muted); font-size: 8px; }
.legend span::before { content: ""; width: 7px; height: 7px; display: inline-block; margin-right: 4px; border-radius: 2px; vertical-align: -1px; }
.legend .blue::before { background: var(--blue); }
.legend .green::before { background: var(--green); }
.legend .purple::before { background: var(--purple); }

.staffing-stack { display: grid; gap: 8px; }
.staffing-item { display: flex; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.staffing-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; font-size: 10px; font-weight: 800; }
.staffing-item.blue .staffing-icon { color: var(--blue); background: var(--blue-soft); }
.staffing-item.green .staffing-icon { color: var(--green); background: var(--green-soft); }
.staffing-item.purple .staffing-icon { color: var(--purple); background: var(--purple-soft); }
.staffing-item > div { flex: 1; }
.staffing-item b, .staffing-item small { display: block; }
.staffing-item b { font-size: 11px; }
.staffing-item small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.staffing-item strong { font-size: 22px; }
.staffing-item strong em { margin-left: 2px; font-size: 9px; font-style: normal; }

.range-card { margin-top: 12px; padding: 14px; border: 1px solid #d8ceff; border-radius: 14px; background: linear-gradient(125deg, #f5f2ff, white); }
.range-head { display: flex; align-items: flex-start; justify-content: space-between; }
.range-head b, .range-head small { display: block; }
.range-head b { font-size: 11px; }
.range-head small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.range-head strong { color: var(--purple); font-size: 11px; }
.range-track { height: 7px; position: relative; margin: 20px 5px 7px; border-radius: 7px; background: linear-gradient(90deg, #dbe6ff, #bcddcf, #e0d6ff); }
.range-track i { position: absolute; top: 50%; left: 50%; width: 15px; height: 15px; transform: translate(-50%, -50%); border: 3px solid white; border-radius: 50%; background: var(--purple); box-shadow: 0 3px 8px rgba(119,86,220,.28); }
.range-track em { position: absolute; top: -8px; left: 50%; height: 23px; border-left: 1px dashed var(--purple); }
.range-labels { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 8px; }
.range-labels b { color: var(--purple); font-size: 9px; }
.range-card p { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid #e7e1f8; color: var(--muted); font-size: 8px; line-height: 1.6; }

.sticky-action { margin-top: 14px; }

.cluster-map { height: 260px; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: #eef4f0; }
.map-grid { position: absolute; inset: 0; opacity: .6; background-image: linear-gradient(#dbe8e1 1px, transparent 1px), linear-gradient(90deg, #dbe8e1 1px, transparent 1px); background-size: 32px 32px; transform: rotate(4deg) scale(1.2); }
.cluster-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cluster-map path { fill: none; stroke: #b9c8c0; stroke-width: 3; stroke-dasharray: 6 5; }
.map-store { width: 42px; position: absolute; padding: 0; border: 0; background: transparent; text-align: center; }
.map-store b { width: 36px; height: 36px; display: grid; place-items: center; margin: auto; border: 3px solid white; border-radius: 50%; color: white; background: var(--blue); box-shadow: 0 5px 12px rgba(20,54,92,.2); font-size: 11px; }
.map-store span { display: block; margin-top: 3px; padding: 2px; border-radius: 4px; background: rgba(255,255,255,.8); font-size: 7px; font-weight: 700; }
.map-store i { position: absolute; top: -7px; right: -17px; padding: 3px 5px; border-radius: 8px; color: white; background: var(--orange); font-size: 7px; font-style: normal; font-weight: 800; white-space: nowrap; }
.map-store.danger b { background: var(--orange); animation: pulse 1.8s infinite; }
.map-store.surplus b { background: var(--green); }
.map-store.surplus i { background: var(--green); }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(243,139,42,.15); } }
.map-store.a { top: 35px; left: 34px; }
.map-store.b { top: 45px; right: 28px; }
.map-store.c { top: 106px; left: 142px; }
.map-store.d { bottom: 24px; left: 77px; }
.map-store.e { bottom: 22px; right: 33px; }
.map-note { position: absolute; left: 50%; bottom: 9px; transform: translateX(-50%); padding: 5px 10px; border-radius: 14px; color: #466154; background: rgba(255,255,255,.86); font-size: 7px; white-space: nowrap; }

.dispatch-card, .progress-card { margin-top: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.dispatch-top { display: flex; align-items: center; gap: 9px; }
.dispatch-top > div { flex: 1; }
.dispatch-top b, .dispatch-top small { display: block; }
.dispatch-top b { font-size: 12px; }
.dispatch-top small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.confidence { padding: 4px 6px; border-radius: 8px; color: var(--purple); background: var(--purple-soft); font-size: 7px; font-weight: 800; }
.route { display: grid; grid-template-columns: 1fr 80px 1fr; align-items: center; margin: 15px 0; padding: 13px 8px; border-radius: 12px; background: var(--surface); }
.route > div:not(.route-arrow) { text-align: center; }
.route .store-logo { margin: 0 auto 6px; }
.route b, .route small { display: block; }
.route b { font-size: 9px; }
.route small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.route-arrow { text-align: center; }
.route-arrow span { display: block; color: var(--blue); font-size: 24px; line-height: 18px; }
.route-arrow b { color: var(--blue); font-size: 8px; }
.worker-match { display: flex; align-items: center; gap: 9px; padding: 9px; border: 1px solid var(--line); border-radius: 11px; }
.person-avatar { width: 34px; height: 34px; display: grid; place-items: center; flex: none; border-radius: 50%; color: white; background: #df7f5e; font-size: 11px; font-weight: 800; }
.worker-match div { flex: 1; }
.worker-match b, .worker-match small { display: block; }
.worker-match b { font-size: 10px; }
.worker-match small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.score { color: var(--green); font-size: 12px; font-weight: 900; }
.dispatch-reason { display: flex; justify-content: space-between; padding: 10px 3px; color: var(--green); font-size: 7px; }

.progress-title { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.progress-title > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--green); font-weight: 800; }
.progress-title b, .progress-title small { display: block; }
.progress-title b { font-size: 12px; }
.progress-title small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.timeline-row { display: flex; gap: 12px; margin-left: 16px; min-height: 44px; position: relative; }
.timeline-row::before { content: ""; position: absolute; top: 11px; bottom: -4px; left: 4px; width: 1px; background: var(--line); }
.timeline-row:last-child::before { display: none; }
.timeline-row i { width: 9px; height: 9px; z-index: 1; margin-top: 4px; border: 2px solid white; border-radius: 50%; background: #ccd3df; box-shadow: 0 0 0 1px #ccd3df; }
.timeline-row.done i { background: var(--green); box-shadow: 0 0 0 1px var(--green); }
.timeline-row.current i { background: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.timeline-row b, .timeline-row small { display: block; }
.timeline-row b { font-size: 9px; }
.timeline-row small { margin-top: 3px; color: var(--muted); font-size: 7px; }

.assistant-head { display: flex; align-items: center; gap: 12px; margin: 5px 3px 21px; }
.assistant-head p { margin: 0 0 4px; color: var(--purple); font-size: 9px; font-weight: 800; }
.assistant-head h2 { margin: 0; font-size: 17px; }
.chat-list { padding-bottom: 65px; }
.chat { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 12px; }
.chat > div:last-child { max-width: 275px; padding: 11px 13px; border-radius: 4px 14px 14px 14px; color: #465069; background: white; border: 1px solid var(--line); font-size: 10px; line-height: 1.7; }
.chat.user { justify-content: flex-end; }
.chat.user > div:last-child { color: white; background: var(--blue); border: 0; border-radius: 14px 4px 14px 14px; }
.quick-questions { display: grid; gap: 7px; margin: 16px 0 0 43px; }
.quick-questions button { padding: 10px 12px; border: 1px solid #d9cdfb; border-radius: 10px; color: var(--purple); background: white; text-align: left; font-size: 9px; }
.chat-input { position: absolute; z-index: 4; right: 10px; bottom: 74px; left: 10px; display: flex; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: var(--shadow); }
.chat-input input { flex: 1; min-width: 0; padding: 5px; border: 0; outline: 0; font-size: 11px; }
.chat-input button { width: 32px; height: 32px; border: 0; border-radius: 10px; color: white; background: var(--blue); font-weight: 800; }

.manager-nav { grid-template-columns: repeat(4, 1fr); }
.floating-ai {
  position: absolute;
  z-index: 8;
  right: 14px;
  bottom: 78px;
  width: 42px;
  height: 42px;
  border: 3px solid white;
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, #8868ed, #6040bd);
  box-shadow: 0 8px 20px rgba(96,64,189,.34);
  font-size: 10px;
  font-weight: 900;
}

.recruit-entry {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 12px;
  padding: 13px;
  border: 1px solid #c9ddff;
  border-radius: 14px;
  background: linear-gradient(120deg, #edf4ff, white);
  text-align: left;
}
.recruit-entry-icon { width: 36px; height: 36px; display: grid; place-items: center; flex: none; border-radius: 11px; color: white; background: var(--blue); font-size: 11px; font-weight: 800; }
.recruit-entry > span:nth-child(2) { flex: 1; }
.recruit-entry b, .recruit-entry small { display: block; }
.recruit-entry b { font-size: 11px; }
.recruit-entry small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.recruit-entry strong { color: var(--blue); font-size: 10px; }

.latest-plan-record { overflow: hidden; border: 1px solid #c7dbff; border-radius: 16px; background: linear-gradient(130deg, #edf4ff, white); cursor: pointer; }
.latest-record-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 8px; }
.latest-record-top span { padding: 4px 7px; border-radius: 8px; color: var(--blue); background: white; font-size: 7px; font-weight: 800; }
.latest-record-top small { color: var(--muted); font-size: 7px; }
.latest-record-main { display: flex; align-items: center; gap: 10px; padding: 7px 14px 14px; }
.latest-record-main > div { flex: 1; }
.latest-record-main p { margin: 0 0 4px; color: var(--blue); font-size: 8px; font-weight: 800; }
.latest-record-main h3 { margin: 0; font-size: 14px; }
.latest-record-main small { display: block; margin-top: 5px; color: var(--muted); font-size: 7px; }
.latest-record-main strong { padding: 5px 7px; border-radius: 9px; color: var(--orange); background: var(--orange-soft); font-size: 7px; white-space: nowrap; }
.latest-plan-record > button { width: 100%; display: flex; justify-content: center; gap: 10px; padding: 11px; border: 0; color: white; background: var(--blue); font-size: 9px; font-weight: 800; }
.latest-plan-record.submitted .latest-record-main strong { color: var(--green); background: var(--green-soft); }
.latest-plan-record.submitted > button { background: var(--green); }
.history-record-list { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: white; }
.history-record-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px; border: 0; border-bottom: 1px solid var(--line); background: white; text-align: left; }
.history-record-row:last-child { border-bottom: 0; }
.record-month { width: 34px; height: 34px; display: grid; place-content: center; flex: none; border-radius: 10px; color: var(--blue); background: var(--blue-soft); text-align: center; }
.record-month b, .record-month small { display: block; }
.record-month b { font-size: 11px; line-height: 12px; }
.record-month small { margin-top: 2px; font-size: 5px; }
.history-record-row > span:nth-child(2) { flex: 1; }
.history-record-row > span:nth-child(2) b, .history-record-row > span:nth-child(2) small { display: block; }
.history-record-row > span:nth-child(2) b { font-size: 9px; }
.history-record-row > span:nth-child(2) small { margin-top: 4px; color: var(--muted); font-size: 7px; }
.history-record-row em { padding: 4px 6px; border-radius: 8px; color: var(--green); background: var(--green-soft); font-size: 6px; font-style: normal; font-weight: 800; }
.history-record-row > i { color: var(--muted); font-size: 12px; font-style: normal; }

.operation-compare { padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.operation-label { margin-bottom: 11px; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: 1px; }
.old-operation, .new-operation { padding: 11px; border-radius: 12px; }
.old-operation { background: #f7f8fa; }
.new-operation { background: var(--blue-soft); }
.operation-head { display: flex; justify-content: space-between; align-items: center; }
.operation-head span { font-size: 9px; font-weight: 800; }
.operation-head b { color: var(--muted); font-size: 8px; }
.old-operation p, .new-operation p { margin: 8px 0 0; color: var(--muted); font-size: 7px; line-height: 1.5; }
.mini-sheet { margin-top: 9px; overflow: hidden; border: 1px solid #dfe3ea; border-radius: 5px; background: white; }
.sheet-row { height: 13px; display: grid; grid-template-columns: 1.4fr repeat(5, 1fr); }
.sheet-row i { border-right: 1px solid #e5e8ee; border-bottom: 1px solid #e5e8ee; }
.sheet-row i:last-child { border-right: 0; }
.sheet-row:last-child i { border-bottom: 0; }
.sheet-title { background: #eaf0fa; }
.compare-arrow { height: 35px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--blue); }
.compare-arrow span { font-size: 7px; font-weight: 800; }
.compare-arrow b { line-height: 11px; }
.circle-mini-row { display: flex; justify-content: space-between; margin-top: 10px; }
.circle-mini-row i { width: 35px; height: 35px; display: grid; place-items: center; border: 2px solid white; border-radius: 50%; color: white; background: var(--blue); box-shadow: 0 4px 9px rgba(11,91,211,.18); font-size: 9px; font-style: normal; font-weight: 800; }
.circle-mini-row i:nth-child(2) { background: var(--green); }
.circle-mini-row i:nth-child(3) { background: var(--purple); }
.circle-mini-row i:nth-child(4) { background: var(--orange); }
.circle-mini-row i:nth-child(5) { background: #4b83b7; }
.circle-mini-row small { display: block; font-size: 5px; font-weight: 500; }
.efficiency-strip { display: flex; align-items: center; gap: 8px; margin-top: 11px; padding: 10px; border-radius: 10px; color: white; background: linear-gradient(130deg, #073b89, #0b5bd3); }
.efficiency-strip > div { text-align: center; }
.efficiency-strip b, .efficiency-strip span { display: block; }
.efficiency-strip b { font-size: 13px; }
.efficiency-strip span { opacity: .65; font-size: 6px; }
.efficiency-strip i { opacity: .5; font-style: normal; }
.efficiency-strip strong { margin-left: auto; color: #73efb8; font-size: 9px; }

.fill-steps { display: flex; align-items: center; justify-content: center; margin: 14px 4px; }
.fill-steps span { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 7px; }
.fill-steps span.active { color: var(--blue); font-weight: 800; }
.fill-steps span i { width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; color: white; background: #bdc4d0; font-size: 7px; font-style: normal; }
.fill-steps span.active i { background: var(--blue); }
.fill-steps > b { width: 24px; height: 1px; margin: 0 5px; background: #cfd5df; }
.recruit-summary { display: grid; grid-template-columns: repeat(3, 1fr); padding: 12px 4px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.recruit-summary > div { border-right: 1px solid var(--line); text-align: center; }
.recruit-summary > div:last-child { border-right: 0; }
.recruit-summary span, .recruit-summary b { display: block; }
.recruit-summary span { color: var(--muted); font-size: 7px; }
.recruit-summary b { margin-top: 4px; font-size: 12px; }
.recruit-groups { display: grid; gap: 8px; }
.recruit-group { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: white; }
.recruit-group.expanded { border-color: #bcd3fa; box-shadow: 0 6px 16px rgba(11,91,211,.07); }
.recruit-group-head { width: 100%; display: flex; align-items: center; gap: 9px; padding: 11px; border: 0; background: white; text-align: left; }
.circle-number { width: 28px; height: 28px; display: grid; place-items: center; flex: none; border-radius: 50%; color: white; background: var(--blue); font-size: 9px; font-weight: 800; }
.circle-number.c2 { background: var(--green); }
.circle-number.c3 { background: var(--purple); }
.circle-number.c4 { background: var(--orange); }
.circle-number.c5 { background: #4b83b7; }
.recruit-group-head > span:nth-child(2) { flex: 1; }
.recruit-group-head b, .recruit-group-head small { display: block; }
.recruit-group-head b { font-size: 10px; }
.recruit-group-head small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.recruit-group-head strong { color: var(--blue); font-size: 7px; white-space: nowrap; }
.recruit-group-head > i { color: var(--muted); font-size: 9px; font-style: normal; }
.recruit-edit { display: none; padding: 0 11px 8px; }
.recruit-group.expanded .recruit-edit { display: block; }
.recruit-table-head, .counter-row { display: grid; grid-template-columns: minmax(70px, 1fr) 52px 52px 82px; align-items: center; column-gap: 3px; }
.recruit-table-head { padding: 8px 0 6px; border-top: 1px solid var(--line); color: var(--muted); font-size: 6px; text-align: center; }
.recruit-table-head span:first-child { text-align: left; }
.counter-row { padding: 8px 0; border-top: 1px solid var(--line); }
.counter-row > span b, .counter-row > span small { display: block; }
.counter-row > span b { font-size: 9px; }
.counter-row > span small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.counter-row > strong, .counter-row > em { text-align: center; font-size: 10px; font-style: normal; }
.counter-row > strong { color: var(--blue); }
.counter-row > em { color: var(--ink); }
.counter-row > div { display: flex; align-items: center; justify-self: end; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; }
.counter-row button { width: 24px; height: 26px; border: 0; color: var(--blue); background: var(--surface); font-size: 12px; }
.counter-row div b { width: 24px; text-align: center; font-size: 10px; }

.plan-adjust-groups { display: grid; gap: 8px; }
.plan-group { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: white; }
.plan-group.expanded { border-color: #bcd3fa; box-shadow: 0 6px 16px rgba(11,91,211,.07); }
.plan-group-head { width: 100%; display: flex; align-items: center; gap: 9px; padding: 11px; border: 0; background: white; text-align: left; }
.plan-group-head > span:nth-child(2) { flex: 1; }
.plan-group-head b, .plan-group-head small { display: block; }
.plan-group-head b { font-size: 10px; }
.plan-group-head small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.plan-group-head strong { color: var(--blue); font-size: 7px; white-space: nowrap; }
.plan-group-head > i { color: var(--muted); font-size: 9px; font-style: normal; }
.plan-group-edit { display: none; padding: 0 11px 8px; }
.plan-group.expanded .plan-group-edit { display: block; }
.plan-table-head, .plan-counter-row { display: grid; grid-template-columns: minmax(85px, 1fr) 62px 82px; align-items: center; column-gap: 4px; }
.plan-table-head { padding: 8px 0 6px; border-top: 1px solid var(--line); color: var(--muted); font-size: 6px; text-align: center; }
.plan-table-head span:first-child { text-align: left; }
.plan-counter-row { padding: 8px 0; border-top: 1px solid var(--line); }
.plan-counter-row > span b, .plan-counter-row > span small { display: block; }
.plan-counter-row > span b { font-size: 9px; }
.plan-counter-row > span small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.plan-counter-row > strong { color: var(--blue); font-size: 10px; text-align: center; }
.plan-counter-row > div { display: flex; align-items: center; justify-self: end; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; }
.plan-counter-row button { width: 24px; height: 26px; border: 0; color: var(--blue); background: var(--surface); font-size: 12px; }
.plan-counter-row div b { width: 24px; text-align: center; font-size: 10px; }
.confirmed-group-list { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: white; }
.confirmed-group-list > div { display: flex; align-items: center; gap: 9px; padding: 11px; border-bottom: 1px solid var(--line); }
.confirmed-group-list > div:last-child { border-bottom: 0; }
.confirmed-group-list > div > span:nth-child(2) { flex: 1; }
.confirmed-group-list b, .confirmed-group-list small { display: block; }
.confirmed-group-list b { font-size: 9px; }
.confirmed-group-list small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.confirmed-group-list strong { color: var(--blue); font-size: 10px; }

.cluster-directory { display: grid; gap: 8px; }
.directory-group { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: white; }
.directory-group.expanded { border-color: #bcd3fa; }
.directory-group-head { width: 100%; display: flex; align-items: center; gap: 9px; padding: 11px; border: 0; background: white; text-align: left; }
.directory-group-head > span:nth-child(2) { flex: 1; }
.directory-group-head b, .directory-group-head small { display: block; }
.directory-group-head b { font-size: 10px; }
.directory-group-head small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.directory-group-head > i { color: var(--muted); font-size: 9px; font-style: normal; }
.directory-stores { display: none; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 11px 11px 48px; }
.directory-group.expanded .directory-stores { display: grid; }
.directory-stores span { overflow: hidden; padding: 7px 8px; border-radius: 8px; color: #59647a; background: var(--surface); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.attention-count { color: #d85a55; font-size: 8px; font-weight: 800; }
.dispatch-demand-list { display: grid; gap: 8px; }
.dispatch-demand-row { width: 100%; display: flex; align-items: center; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: white; text-align: left; }
.dispatch-demand-row.urgent { border-color: #ffd2cf; background: #fff7f6; }
.demand-state { width: 30px; height: 30px; display: grid; place-items: center; flex: none; border-radius: 10px; color: white; background: #e95b55; font-size: 8px; font-weight: 800; }
.demand-state.warning { background: var(--orange); }
.dispatch-demand-row > span:nth-child(2) { flex: 1; min-width: 0; }
.dispatch-demand-row b, .dispatch-demand-row small { display: block; }
.dispatch-demand-row b { font-size: 9px; }
.dispatch-demand-row small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.dispatch-demand-row em { padding: 4px 6px; border-radius: 8px; color: #d85a55; background: #ffe9e7; font-size: 6px; font-style: normal; font-weight: 800; white-space: nowrap; }
.dispatch-demand-row:not(.urgent) em { color: var(--orange); background: var(--orange-soft); }
.dispatch-demand-row > i { color: var(--muted); font-size: 14px; font-style: normal; }
.detail-page-head { display: flex; align-items: center; gap: 10px; margin: 1px 1px 14px; }
.detail-page-head > div { flex: 1; }
.detail-page-head p { margin: 0 0 3px; color: var(--blue); font-size: 8px; font-weight: 800; letter-spacing: 1px; }
.detail-page-head h2 { margin: 0; font-size: 16px; }

.cluster-transform { display: grid; grid-template-columns: 1fr 55px 1fr; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.scatter-side, .circles-side { text-align: center; }
.scatter-side > b, .scatter-side > span, .circles-side > b, .circles-side > span { display: block; }
.scatter-side > b, .circles-side > b { font-size: 10px; }
.scatter-side > span, .circles-side > span { margin-top: 2px; color: var(--muted); font-size: 7px; }
.scatter-dots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; width: 70px; margin: 12px auto 0; }
.scatter-dots i { width: 6px; height: 6px; border-radius: 50%; background: #aeb6c4; }
.transform-arrow { text-align: center; color: var(--purple); }
.transform-arrow span, .transform-arrow b, .transform-arrow small { display: block; }
.transform-arrow span { font-size: 7px; font-weight: 800; }
.transform-arrow b { font-size: 23px; line-height: 23px; }
.transform-arrow small { color: var(--muted); font-size: 6px; }
.five-circles { display: grid; grid-template-columns: repeat(3, 30px); justify-content: center; gap: 4px; margin-top: 8px; }
.five-circles i { width: 30px; height: 30px; display: grid; place-items: center; border: 1px dashed currentColor; border-radius: 50%; color: var(--blue); background: var(--blue-soft); font-size: 7px; font-style: normal; font-weight: 800; }
.five-circles .c2 { color: var(--green); background: var(--green-soft); }
.five-circles .c3 { color: var(--purple); background: var(--purple-soft); }
.five-circles .c4 { color: var(--orange); background: var(--orange-soft); }
.five-circles .c5 { color: #4b83b7; background: #eaf3fa; }
.cluster-benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 8px; }
.cluster-benefits > div { padding: 9px 5px; border: 1px solid var(--line); border-radius: 10px; background: white; text-align: center; }
.cluster-benefits b, .cluster-benefits span { display: block; }
.cluster-benefits b { font-size: 8px; }
.cluster-benefits span { margin-top: 3px; color: var(--muted); font-size: 6px; }

.dashboard-hero { padding: 16px; border-radius: 17px; color: white; background: linear-gradient(145deg, #073b89, #0b5bd3); box-shadow: 0 11px 24px rgba(7,59,137,.2); }
.dashboard-head { display: flex; justify-content: space-between; font-size: 9px; }
.dashboard-head small { opacity: .65; }
.dashboard-main { display: flex; align-items: center; justify-content: space-between; padding: 17px 4px; }
.dashboard-main span, .dashboard-main b, .dashboard-main small { display: block; }
.dashboard-main span { opacity: .68; font-size: 8px; }
.dashboard-main > div:first-child > b { margin: 5px 0 2px; font-size: 31px; }
.dashboard-main b em { margin-left: 3px; font-size: 10px; font-style: normal; }
.dashboard-main small { opacity: .55; font-size: 7px; }
.ring { width: 68px; height: 68px; display: grid; place-content: center; border: 7px solid rgba(255,255,255,.18); border-top-color: #66e7ae; border-right-color: #66e7ae; border-radius: 50%; text-align: center; transform: rotate(12deg); }
.ring > * { transform: rotate(-12deg); }
.ring b { font-size: 13px; }
.ring span { margin-top: 2px; font-size: 6px; }
.dashboard-kpis { display: grid; grid-template-columns: repeat(4, 1fr); padding-top: 12px; border-top: 1px solid rgba(255,255,255,.14); }
.dashboard-kpis > div { border-right: 1px solid rgba(255,255,255,.13); text-align: center; }
.dashboard-kpis > div:last-child { border-right: 0; }
.dashboard-kpis b, .dashboard-kpis span { display: block; }
.dashboard-kpis b { font-size: 12px; }
.dashboard-kpis span { margin-top: 3px; opacity: .58; font-size: 6px; }
.cluster-board-list { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: white; }
.cluster-board-row { display: flex; align-items: center; gap: 8px; padding: 11px; border-bottom: 1px solid var(--line); }
.cluster-board-row:last-child { border-bottom: 0; }
.cluster-board-row > div:nth-child(2) { width: 120px; }
.cluster-board-row b, .cluster-board-row small { display: block; }
.cluster-board-row b { font-size: 9px; }
.cluster-board-row small { margin-top: 3px; color: var(--muted); font-size: 6px; }
.mini-progress { height: 5px; flex: 1; overflow: hidden; border-radius: 5px; background: #e7ebf2; }
.mini-progress i { height: 100%; display: block; border-radius: inherit; background: var(--green); }
.mini-progress.warn i { background: var(--orange); }
.cluster-board-row > strong { width: 25px; text-align: right; font-size: 11px; }
.cluster-board-row > strong small { color: var(--orange); font-size: 6px; }
.national-impact { margin-top: 14px; overflow: hidden; border-radius: 17px; color: white; background: linear-gradient(145deg, #121b31, #22375f); }
.impact-title { padding: 17px 16px 13px; background: radial-gradient(circle at 90% 0, rgba(50,126,240,.35), transparent 45%); }
.impact-title > span { display: inline-block; padding: 3px 7px; border-radius: 8px; color: #72eab4; background: rgba(114,234,180,.12); font-size: 7px; font-weight: 800; }
.impact-title h3 { margin: 9px 0 4px; font-size: 14px; }
.impact-title p { margin: 0; opacity: .55; font-size: 7px; }
.impact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: rgba(255,255,255,.1); border-top: 1px solid rgba(255,255,255,.1); border-bottom: 1px solid rgba(255,255,255,.1); }
.impact-grid > div { padding: 13px; background: #192946; }
.impact-grid span, .impact-grid b, .impact-grid small { display: block; }
.impact-grid span { opacity: .55; font-size: 7px; }
.impact-grid b { margin-top: 5px; color: #75e8b5; font-size: 17px; }
.impact-grid b em { margin-left: 2px; font-size: 8px; font-style: normal; }
.impact-grid small { margin-top: 3px; opacity: .45; font-size: 6px; }
.impact-layers { display: flex; align-items: center; gap: 5px; padding: 13px 14px 8px; }
.impact-layers > div { flex: 1; padding: 8px 3px; border-radius: 8px; background: rgba(255,255,255,.06); text-align: center; }
.impact-layers b, .impact-layers span { display: block; }
.impact-layers b { font-size: 8px; }
.impact-layers span { margin-top: 2px; opacity: .45; font-size: 6px; }
.impact-layers .blue b { color: #77aaff; }
.impact-layers .green b { color: #72eab4; }
.impact-layers .purple b { color: #b8a3ff; }
.impact-layers > i { opacity: .35; font-style: normal; }
.impact-note { margin: 0; padding: 2px 14px 14px; opacity: .42; font-size: 6px; line-height: 1.5; }

.worker-app { height: 100%; overflow-y: auto; padding-bottom: 68px; scrollbar-width: none; }
.worker-header { padding: 37px 18px 22px; color: white; background: linear-gradient(150deg, #087653 0%, #0ca76f 65%, #36bd8c 100%); border-radius: 0 0 25px 25px; }
.worker-top { display: flex; justify-content: space-between; align-items: center; }
.worker-top p { margin: 0 0 4px; color: rgba(255,255,255,.65); font-size: 10px; }
.worker-top h2 { margin: 0; font-size: 20px; }
.worker-top .avatar { background: rgba(255,255,255,.2); box-shadow: none; }
.worker-hours { display: grid; grid-template-columns: .8fr 1.25fr 1fr; margin-top: 22px; }
.worker-hours > div { border-right: 1px solid rgba(255,255,255,.18); padding-right: 8px; }
.worker-hours > div + div { padding-left: 11px; }
.worker-hours > div:last-child { border: 0; }
.worker-hours span, .worker-hours b { display: block; }
.worker-hours span { color: rgba(255,255,255,.6); font-size: 8px; }
.worker-hours b { margin-top: 5px; font-size: 17px; }
.worker-hours b em { margin-left: 2px; font-size: 8px; font-style: normal; }
.hours-bar { height: 6px; margin-top: 16px; overflow: hidden; border-radius: 5px; background: rgba(255,255,255,.18); }
.hours-bar i { width: 70%; height: 100%; display: block; border-radius: 5px; background: white; }
.hours-tip { margin: 7px 0 0; color: rgba(255,255,255,.7); font-size: 8px; }
.worker-body { padding: 0 16px 26px; }
.worker-push-card { margin-top: 14px; padding: 13px; border: 1px solid #d9cdfb; border-radius: 15px; background: linear-gradient(135deg, #f7f4ff, white); }
.worker-push-head { display: flex; align-items: center; gap: 9px; }
.worker-push-head > div { flex: 1; }
.worker-push-head b, .worker-push-head small { display: block; }
.worker-push-head b { font-size: 10px; }
.worker-push-head small { margin-top: 3px; color: var(--green); font-size: 7px; }
.worker-push-head > i { padding: 4px 7px; border-radius: 8px; color: var(--purple); background: var(--purple-soft); font-size: 7px; font-style: normal; font-weight: 800; }
.worker-push-card > p { margin: 10px 0; color: #59637a; font-size: 8px; line-height: 1.6; }
.push-stats { display: grid; grid-template-columns: repeat(3, 1fr); padding-top: 10px; border-top: 1px solid #e9e4f7; }
.push-stats > span { border-right: 1px solid #e9e4f7; text-align: center; }
.push-stats > span:last-child { border-right: 0; }
.push-stats b, .push-stats small { display: block; }
.push-stats b { color: var(--purple); font-size: 11px; }
.push-stats small { margin-top: 2px; color: var(--muted); font-size: 6px; }
.shift-card { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: white; box-shadow: 0 10px 25px rgba(26,55,45,.08); }
.shift-card-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 15px; }
.shift-card-head span, .shift-card-head b { display: block; }
.hot-tag { width: fit-content; margin-bottom: 7px; padding: 3px 6px; border-radius: 7px; color: var(--orange); background: var(--orange-soft); font-size: 7px; }
.shift-card-head b { font-size: 13px; }
.shift-card-head strong { color: var(--green); font-size: 15px; }
.shift-date { display: flex; align-items: center; gap: 7px; padding: 12px 15px; background: var(--surface); }
.shift-date > div { width: 38px; padding: 7px 0; border-radius: 9px; background: white; text-align: center; }
.shift-date b, .shift-date small { display: block; }
.shift-date > div b { font-size: 13px; }
.shift-date > div small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.shift-date > span { margin-left: auto; text-align: right; }
.shift-date > span b { font-size: 10px; }
.shift-date > span small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.shift-info { display: flex; justify-content: space-between; padding: 11px 15px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 8px; }
.shift-reason { margin: 12px 15px; padding: 11px; border-radius: 10px; background: var(--green-soft); }
.shift-reason b { color: var(--green); font-size: 9px; }
.shift-reason p { margin: 5px 0 0; color: #526c63; font-size: 8px; line-height: 1.6; }
.shift-card > .primary-btn { width: calc(100% - 30px); margin: 2px 15px 0; background: linear-gradient(135deg, #12a96f, #087e55); box-shadow: 0 8px 18px rgba(18,169,111,.22); }

.accepted-card { padding: 23px 18px 16px; border: 1px solid #c8eadc; border-radius: 17px; background: linear-gradient(150deg, #ecfaf5, white); text-align: center; }
.accepted-icon { width: 44px; height: 44px; display: grid; place-items: center; margin: auto; border-radius: 50%; color: white; background: var(--green); font-size: 22px; }
.accepted-card h3 { margin: 11px 0 6px; font-size: 16px; }
.accepted-card > p { margin: 0 0 17px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.accepted-card > div:last-child { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid #dfeee8; font-size: 9px; }
.accepted-card button { padding: 6px 9px; border: 0; border-radius: 8px; color: var(--green); background: var(--green-soft); font-size: 8px; }
.group-sync-card { margin-top: 10px; overflow: hidden; border: 1px solid #d9cdfb; border-radius: 15px; background: white; }
.group-sync-head { display: flex; align-items: center; gap: 9px; padding: 12px; }
.group-avatar { width: 34px; height: 34px; display: grid; place-items: center; flex: none; border-radius: 50%; color: white; background: linear-gradient(145deg, #287de7, #0b4ba5); font-size: 10px; font-weight: 800; }
.group-sync-head > div { flex: 1; }
.group-sync-head b, .group-sync-head small { display: block; }
.group-sync-head b { font-size: 10px; }
.group-sync-head small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.group-sync-head > i { color: var(--green); font-size: 7px; font-style: normal; font-weight: 800; }
.sync-message { display: flex; align-items: flex-start; gap: 8px; margin: 0 12px 10px; padding: 9px; border-radius: 10px; background: var(--purple-soft); }
.sync-message .ai-orb { width: 26px; height: 26px; border-radius: 8px; font-size: 7px; }
.sync-message p { margin: 0; color: #5d5675; font-size: 8px; line-height: 1.6; }
.group-sync-card > button { width: 100%; display: flex; justify-content: space-between; padding: 10px 12px; border: 0; border-top: 1px solid var(--line); color: var(--blue); background: white; font-size: 8px; font-weight: 800; }
.mini-shift { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.mini-shift > div { flex: 1; }
.mini-shift b, .mini-shift small { display: block; }
.mini-shift b { font-size: 10px; }
.mini-shift small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.mini-shift strong { color: var(--muted); font-size: 8px; }
.worker-nav { position: absolute; right: 0; bottom: 0; left: 0; }
.worker-nav button.active { color: var(--green); }

.sheet-overlay {
  position: absolute;
  z-index: 50;
  inset: 0;
  display: flex;
  align-items: flex-end;
  background: rgba(9, 18, 38, .52);
  animation: overlay .2s ease;
}

@keyframes overlay { from { opacity: 0; } }
.bottom-sheet { width: 100%; padding: 10px 18px 22px; border-radius: 22px 22px 0 0; background: white; animation: rise .25s ease; }
@keyframes rise { from { transform: translateY(100%); } }
.sheet-handle { width: 38px; height: 4px; margin: 0 auto 17px; border-radius: 4px; background: #d7dce6; }
.bottom-sheet h3 { margin: 0 0 16px; font-size: 17px; }
.bottom-sheet > button:not(.sheet-close):not(.primary-btn) { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 0; border: 0; border-bottom: 1px solid var(--line); background: white; text-align: left; }
.bottom-sheet > button > div { flex: 1; }
.bottom-sheet > button b, .bottom-sheet > button small { display: block; }
.bottom-sheet > button b { font-size: 12px; }
.bottom-sheet > button small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.bottom-sheet > button i { color: var(--blue); font-style: normal; }
.bottom-sheet .reset-demo {
  justify-content: center;
  margin-top: 10px;
  color: var(--orange);
  font-size: 10px;
}
.bottom-sheet .sheet-close:not(.primary-btn) { width: 100%; margin-top: 11px; padding: 10px; border: 0; color: var(--muted); background: white; }
.explain-sheet { text-align: center; }
.explain-sheet .ai-orb { margin: 0 auto 11px; }
.explain-sheet h3 { margin-bottom: 8px; }
.explain-sheet > p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.explain-sheet ul { margin: 15px 0; padding: 0; list-style: none; text-align: left; }
.explain-sheet li { display: flex; gap: 11px; padding: 10px 0; border-top: 1px solid var(--line); }
.explain-sheet li b { width: 75px; flex: none; color: var(--blue); font-size: 10px; }
.explain-sheet li span { color: var(--muted); font-size: 9px; line-height: 1.5; }

.group-chat-sheet { max-height: 88%; padding-bottom: max(20px, env(safe-area-inset-bottom)); }
.group-chat-title { display: flex; align-items: center; gap: 10px; }
.group-chat-title > div { flex: 1; }
.group-chat-title h3 { margin: 0; font-size: 14px; }
.group-chat-title p { margin: 3px 0 0; color: var(--muted); font-size: 8px; }
.bottom-sheet .group-chat-title .sheet-close:not(.primary-btn) { width: 30px; height: 30px; margin: 0; padding: 0; border: 0; border-radius: 50%; color: var(--muted); background: var(--surface); font-size: 16px; }
.member-row { display: flex; gap: 7px; margin: 14px 0; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.member-row span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; color: white; background: #8d99ad; font-size: 8px; font-weight: 800; }
.member-row span:first-child { background: var(--purple); }
.member-row span:nth-child(2), .member-row span:nth-child(4) { background: var(--blue); }
.member-row span:nth-child(3), .member-row span:nth-child(5) { background: var(--green); }
.member-row span:nth-child(6) { background: var(--orange); }
.group-messages { max-height: 330px; overflow-y: auto; padding: 3px 0; }
.group-message { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 11px; }
.group-message > span { width: 28px; height: 28px; }
.group-message > div { max-width: 270px; padding: 9px 10px; border-radius: 5px 12px 12px 12px; background: var(--purple-soft); }
.user-message { flex-direction: row-reverse; }
.user-message > div { margin-left: auto; border-radius: 12px 5px 12px 12px; color: white; background: var(--blue); }
.other-message > div { background: var(--blue-soft); }
.group-message b { display: block; color: var(--purple); font-size: 8px; }
.user-message b { color: white; text-align: right; }
.other-message b { color: var(--blue); }
.group-message p { margin: 4px 0; color: #4e5870; font-size: 8px; line-height: 1.55; }
.user-message p { color: white; }
.group-message small { display: block; color: var(--muted); font-size: 6px; }
.user-message small { color: rgba(255,255,255,.65); text-align: right; }
.temp-chat-input { display: flex; gap: 7px; margin: 8px 0 12px; padding: 7px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.temp-chat-input input { flex: 1; min-width: 0; padding: 5px 7px; border: 0; outline: 0; background: transparent; font-size: 9px; }
.temp-chat-input button { padding: 7px 12px; border: 0; border-radius: 8px; color: white; background: var(--blue); font-size: 8px; font-weight: 800; }

.toast {
  position: absolute;
  z-index: 100;
  left: 50%;
  bottom: 88px;
  max-width: 80%;
  padding: 10px 16px;
  opacity: 0;
  transform: translate(-50%, 12px);
  border-radius: 12px;
  color: white;
  background: rgba(19,27,43,.9);
  font-size: 10px;
  text-align: center;
  pointer-events: none;
  transition: .24s;
}

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

@media (max-width: 850px) {
  #desktop-shell { min-height: 100dvh; display: block; padding: 0; background: var(--surface); }
  .desktop-intro { display: none; }
  #app { width: 100%; height: 100dvh; min-height: 600px; border: 0; border-radius: 0; box-shadow: none; }
  #app::before { display: none; }
  .topbar { padding-top: max(13px, env(safe-area-inset-top)); height: calc(70px + env(safe-area-inset-top)); }
  .pages { height: calc(100dvh - 137px - env(safe-area-inset-top)); }
  .worker-header { padding-top: max(22px, env(safe-area-inset-top)); }
  .welcome { padding-top: max(28px, env(safe-area-inset-top)); }
}

@media (max-height: 730px) and (min-width: 851px) {
  #app { min-height: 640px; }
  .welcome-copy { margin: 38px 0 25px; }
}
