@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f5f6fa;
  --bg-soft: #f9fafc;
  --surface: #ffffff;
  --surface-2: #fbfcfe;
  --ink: #17233c;
  --ink-2: #2b3a3a;
  --muted: #7c8798;
  --muted-2: #9aa4b5;
  --line: #e9edf5;
  --line-strong: #dde3ee;
  --navy-900: #00246f;
  --navy-700: #0036b1;
  --navy-600: #0a46c4;
  --blue-500: #4a6ec6;
  --blue-400: #6b8cd8;
  --blue-300: #a9c0f0;
  --blue-100: #eaf0fe;
  --blue-50: #f3f7ff;
  --mint-600: #1e8a5b;
  --mint-500: #2fa96f;
  --mint-300: #7ad6a9;
  --mint-100: #e1f6ec;
  --amber-600: #a06a00;
  --amber-500: #d89400;
  --amber-100: #fcf1d2;
  --peach-600: #b0663a;
  --peach-500: #e39a6b;
  --peach-100: #fbe8dc;
  --coral-600: #b94a40;
  --coral-500: #de655b;
  --coral-100: #fce4e1;
  --lav-600: #6244b8;
  --lav-500: #7755d4;
  --lav-100: #ede8fb;
  --sky-600: #2c63be;
  --sky-500: #3577d8;
  --sky-100: #e3eefd;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --shadow-card: 0 18px 40px -26px rgba(23, 35, 60, 0.45);
  --shadow-soft: 0 2px 10px rgba(23, 35, 60, 0.05);
  --shadow-float: 0 12px 28px -18px rgba(0, 36, 111, 0.55);
  --gradient-hero: linear-gradient(128deg, #00246f 0%, #0036b1 42%, #4a6ec6 100%);
  --gradient-btn: linear-gradient(120deg, #0036b1 0%, #3f66c4 55%, #6b8cd8 100%);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 3px solid var(--blue-300);
  outline-offset: 2px;
  border-radius: 6px;
}

.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

.icon-lg {
  width: 24px;
  height: 24px;
}

.muted {
  color: var(--muted);
}

.tiny {
  font-size: 12px;
}

.small {
  font-size: 13px;
}

.strong {
  font-weight: 700;
  color: var(--ink);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-soft);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}

.chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.chip-sage { background: var(--mint-100); color: var(--mint-600); }
.chip-amber { background: var(--amber-100); color: var(--amber-600); }
.chip-peach { background: var(--peach-100); color: var(--peach-600); }
.chip-coral { background: var(--coral-100); color: var(--coral-600); }
.chip-sky { background: var(--sky-100); color: var(--sky-600); }
.chip-lav { background: var(--lav-100); color: var(--lav-600); }
.chip-neutral { background: #eef1f6; color: #5b6779; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--gradient-btn);
  color: #fff;
  box-shadow: var(--shadow-float);
}

.btn-primary:hover {
  box-shadow: 0 16px 32px -16px rgba(0, 54, 177, 0.65);
}

.btn-soft {
  background: var(--blue-100);
  color: var(--navy-700);
}

.btn-soft:hover {
  background: #dfe8fd;
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--blue-300);
  color: var(--navy-700);
}

.btn-white {
  background: #fff;
  color: var(--navy-700);
  box-shadow: 0 10px 24px -16px rgba(0, 0, 0, 0.45);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
  backdrop-filter: blur(6px);
}

.btn-sm {
  min-height: 36px;
  padding: 7px 14px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.icon-btn:hover {
  border-color: var(--blue-300);
  color: var(--navy-700);
}

.icon-btn .badge {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral-500);
  box-shadow: 0 0 0 2px #fff;
}

.tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  flex: 0 0 auto;
}

.tile-sage { background: var(--mint-100); color: var(--mint-600); }
.tile-amber { background: var(--amber-100); color: var(--amber-600); }
.tile-peach { background: var(--peach-100); color: var(--peach-600); }
.tile-coral { background: var(--coral-100); color: var(--coral-600); }
.tile-sky { background: var(--sky-100); color: var(--sky-600); }
.tile-lav { background: var(--lav-100); color: var(--lav-600); }
.tile-blue { background: var(--blue-100); color: var(--navy-700); }

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--blue-100);
  color: var(--navy-700);
  font-size: 14px;
  font-weight: 700;
  flex: 0 0 auto;
  overflow: hidden;
}

.avatar-lg {
  width: 52px;
  height: 52px;
  font-size: 16px;
}

.avatar-photo {
  background: linear-gradient(140deg, #cfe0fb, #eaf1ff);
  color: var(--navy-700);
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: #edf1f8;
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2fa96f, #7ad6a9);
}

.switch {
  position: relative;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: #dfe5ef;
  flex: 0 0 auto;
  transition: background 0.2s ease;
}

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

.switch[aria-checked='true'] {
  background: var(--mint-500);
}

.switch[aria-checked='true']::after {
  transform: translateX(20px);
}

.shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 22px 18px 18px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  z-index: 40;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 8px 22px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--gradient-hero);
  color: #fff;
  box-shadow: var(--shadow-float);
}

.brand-mark .icon {
  width: 22px;
  height: 22px;
}

.brand-name {
  display: block;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--ink);
  line-height: 1.15;
}

.brand-sub {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.nav-group-label {
  padding: 14px 12px 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #5c6879;
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav-item:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

.nav-item.is-active {
  background: var(--blue-100);
  color: var(--navy-700);
  font-weight: 700;
}

.nav-item .nav-count {
  margin-left: auto;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--coral-100);
  color: var(--coral-600);
  font-size: 11px;
  font-weight: 700;
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 18px;
}

.side-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.side-user .name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.side-user .role {
  font-size: 11.5px;
  color: var(--muted);
}

.support-card {
  margin-bottom: 12px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(150deg, #f2f6ff, #eaf0fe);
  border: 1px solid #e0e8fb;
}

.support-card .title {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy-700);
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 32px;
  background: rgba(245, 246, 250, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(233, 237, 245, 0.7);
}

.topbar-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.topbar-title strong {
  display: block;
  font-size: 17px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.topbar-spacer {
  flex: 1;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(320px, 30vw);
}

.search .icon {
  position: absolute;
  left: 14px;
  color: var(--muted-2);
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
}

.search input::placeholder {
  color: var(--muted-2);
}

.search input:focus {
  outline: none;
  border-color: var(--blue-300);
  box-shadow: 0 0 0 3px rgba(169, 192, 240, 0.35);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 6px;
}

.topbar-user .who {
  text-align: right;
  line-height: 1.3;
}

.topbar-user .who b {
  display: block;
  font-size: 13px;
  color: var(--ink);
}

.topbar-user .who span {
  font-size: 11.5px;
  color: var(--muted);
}

.menu-btn {
  display: none;
}

.page {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 26px 32px 48px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.page-head h1 {
  margin-top: 4px;
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 800;
}

.page-head .lead {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 28px;
  align-items: center;
  padding: 30px 34px;
  border-radius: 24px;
  background: var(--gradient-hero);
  color: #fff;
  box-shadow: 0 26px 50px -34px rgba(0, 54, 177, 0.75);
}

.hero::before {
  content: '';
  position: absolute;
  inset: -40% -10% auto auto;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.22), transparent 62%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  right: 16%;
  bottom: -55%;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 28px rgba(255, 255, 255, 0.05), 0 0 0 58px rgba(255, 255, 255, 0.035);
  pointer-events: none;
}

.hero h2 {
  position: relative;
  color: #fff;
  font-size: clamp(21px, 2.3vw, 27px);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.hero .hero-text {
  position: relative;
  margin-top: 10px;
  max-width: 46ch;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.hero .hero-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

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

.hero-stat {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(4px);
}

.hero-stat b {
  display: block;
  color: #fff;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero-stat span {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.76);
}

.hero-stat .spark {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #bdf0d6;
}

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

.kpi {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 16px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.kpi .kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.kpi .kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.3;
}

.kpi .kpi-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
}

.kpi .kpi-foot {
  font-size: 11.5px;
  color: var(--muted);
}

.kpi .kpi-foot b {
  color: var(--ink);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 18px 0 0;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: #5c6879;
  font-size: 12.5px;
  font-weight: 600;
}

.filter-chip:hover {
  border-color: var(--blue-300);
  color: var(--navy-700);
}

.filter-chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.filter-chip .icon {
  color: currentColor;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 14px;
}

.panel-head h3 {
  font-size: 16px;
  font-weight: 800;
}

.panel-head p {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--muted);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--navy-700);
  white-space: nowrap;
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  position: relative;
  padding: 10px 12px 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.tab::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2.5px;
  border-radius: 3px;
  background: transparent;
}

.tab.is-active {
  color: var(--navy-700);
}

.tab.is-active::after {
  background: var(--navy-700);
}

.tab .tab-count {
  display: inline-block;
  margin-left: 5px;
  padding: 0 6px;
  border-radius: 999px;
  background: #eef1f6;
  color: #5b6779;
  font-size: 10.5px;
  font-weight: 700;
}

.tab.is-active .tab-count {
  background: var(--blue-100);
  color: var(--navy-700);
}

.reminder-list {
  padding: 6px 10px 10px;
}

.reminder {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 12px;
  border-radius: 14px;
  transition: background 0.15s ease;
}

.reminder + .reminder {
  border-top: 1px solid #f1f4f9;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.reminder:hover {
  background: var(--surface-2);
}

.reminder .who {
  min-width: 0;
}

.reminder .who .name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.reminder .who .sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reminder .who .sub .sep {
  margin: 0 5px;
  color: #c7cfdb;
}

.reminder-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: #67748a;
  transition: all 0.15s ease;
}

.mini-btn:hover {
  border-color: var(--blue-300);
  color: var(--navy-700);
  background: var(--blue-50);
}

.mini-btn.mini-primary {
  background: var(--blue-100);
  border-color: transparent;
  color: var(--navy-700);
}

.mini-btn.mini-sage {
  background: var(--mint-100);
  border-color: transparent;
  color: var(--mint-600);
}

.side-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.side-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-soft);
  padding: 20px 20px 16px;
}

.side-panel .panel-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.side-panel h3 {
  font-size: 15px;
  font-weight: 800;
}

.side-panel .panel-top p {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.deadline-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.deadline {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 0;
}

.deadline + .deadline {
  border-top: 1px dashed #eef1f7;
}

.deadline .meta {
  min-width: 0;
  flex: 1;
}

.deadline .meta b {
  display: block;
  font-size: 12.5px;
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deadline .meta span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
}

.deadline .days {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.days-amber { background: var(--amber-100); color: var(--amber-600); }
.days-coral { background: var(--coral-100); color: var(--coral-600); }
.days-peach { background: var(--peach-100); color: var(--peach-600); }

.chart-wrap {
  padding: 4px 6px 0;
}

.chart-wrap svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 4px 2px;
  font-size: 11.5px;
  color: var(--muted);
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend i {
  width: 8px;
  height: 8px;
  border-radius: 3px;
  display: inline-block;
}

.map-panel {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #eef4fe;
  min-height: 210px;
  box-shadow: var(--shadow-soft);
}

.map-canvas {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 74% 28%, rgba(255, 255, 255, 0.85), transparent 34%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.55)),
    repeating-linear-gradient(0deg, #e6eefc 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, #e6eefc 0 1px, transparent 1px 34px),
    linear-gradient(150deg, #e8f0fd, #f4f8ff);
}

.map-canvas::before {
  content: '';
  position: absolute;
  left: 12%;
  top: 10%;
  width: 46%;
  height: 66%;
  border-radius: 38% 62% 48% 52% / 42% 40% 60% 58%;
  background: #dcebfb;
  transform: rotate(-8deg);
}

.map-canvas::after {
  content: '';
  position: absolute;
  right: 10%;
  top: 44%;
  width: 40%;
  height: 40%;
  border-radius: 50%;
  background: #e3f2e8;
  box-shadow: 0 0 0 14px rgba(227, 242, 232, 0.5);
}

.map-road {
  position: absolute;
  height: 7px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 1px #dbe4f4;
}

.map-road.r1 { left: -6%; top: 26%; width: 86%; transform: rotate(-9deg); }
.map-road.r2 { left: -4%; top: 62%; width: 74%; transform: rotate(6deg); }
.map-road.r3 { left: 40%; top: -8%; height: 70%; width: 7px; transform: rotate(8deg); }

.map-pin {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -100%);
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50% 50% 50% 4px;
  background: var(--navy-700);
  color: #fff;
  rotate: -45deg;
  box-shadow: 0 12px 22px -10px rgba(0, 54, 177, 0.8);
}

.map-pin .icon {
  rotate: 45deg;
  width: 19px;
  height: 19px;
}

.map-overlay {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 210px;
  padding: 14px;
}

.map-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: #46536a;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 6px 14px -10px rgba(23, 35, 60, 0.5);
}

.map-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 22px -16px rgba(23, 35, 60, 0.55);
}

.map-info .meta {
  min-width: 0;
  flex: 1;
}

.map-info .meta b {
  display: block;
  font-size: 12.5px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-info .meta span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.training-mini {
  display: flex;
  align-items: center;
  gap: 12px;
}

.training-mini .meta {
  flex: 1;
  min-width: 0;
}

.training-mini .meta b {
  display: block;
  font-size: 12.5px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.training-mini .meta span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
}

.training-mini .pct {
  font-size: 13px;
  font-weight: 800;
  color: var(--mint-600);
}

.training-mini .progress {
  margin-top: 8px;
}

.app-frame {
  display: flex;
  justify-content: center;
  padding: 34px 20px 56px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 12%, #e9effc, transparent 40%),
    radial-gradient(circle at 82% 84%, #e9f6f0, transparent 42%),
    var(--bg);
}

.phone {
  position: relative;
  width: min(430px, 100%);
  min-height: 880px;
  padding: 0 0 96px;
  border-radius: 34px;
  background: var(--bg-soft);
  border: 1px solid #e6ebf4;
  box-shadow: 0 40px 80px -40px rgba(23, 35, 60, 0.4);
  overflow: hidden;
}

.phone-head {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 14px;
  background: rgba(249, 250, 252, 0.9);
  backdrop-filter: blur(10px);
}

.phone-head .who {
  flex: 1;
  min-width: 0;
}

.phone-head .who span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
}

.phone-head .who b {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone-body {
  padding: 0 18px;
}

.user-hero {
  position: relative;
  overflow: hidden;
  padding: 24px 22px;
  border-radius: 24px;
  background: var(--gradient-hero);
  color: #fff;
  box-shadow: 0 24px 44px -28px rgba(0, 54, 177, 0.7);
}

.user-hero::before {
  content: '';
  position: absolute;
  right: -30px;
  top: -50px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.26), transparent 65%);
}

.user-hero::after {
  content: '';
  position: absolute;
  right: 24px;
  bottom: -46px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 20px rgba(255, 255, 255, 0.06);
}

.user-hero .greet {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
}

.user-hero h2 {
  position: relative;
  margin-top: 6px;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.025em;
}

.user-hero p {
  position: relative;
  margin-top: 7px;
  max-width: 30ch;
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
}

.user-hero .cta {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.user-hero .cta .btn {
  min-height: 42px;
  padding: 9px 16px;
  font-size: 13px;
}

.user-hero .pattern {
  position: absolute;
  right: 16px;
  bottom: 18px;
  display: grid;
  grid-template-columns: repeat(3, 10px);
  gap: 5px;
  opacity: 0.35;
}

.user-hero .pattern i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.75);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 2px 10px;
}

.section-head h3 {
  font-size: 14.5px;
  font-weight: 800;
}

.section-head a {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy-700);
}

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

.report-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 13px;
  min-height: 82px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.report-option:hover {
  border-color: var(--blue-300);
  transform: translateY(-1px);
  box-shadow: 0 12px 22px -18px rgba(23, 35, 60, 0.5);
}

.report-option .tile {
  width: 36px;
  height: 36px;
  border-radius: 11px;
}

.report-option .tile .icon {
  width: 18px;
  height: 18px;
}

.report-option b {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.report-option span {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.35;
}

.user-card {
  padding: 18px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.consent-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
}

.consent-row + .consent-row {
  border-top: 1px solid #f1f4f9;
}

.consent-row .meta {
  flex: 1;
  min-width: 0;
}

.consent-row .meta b {
  display: block;
  font-size: 13px;
  color: var(--ink);
  font-weight: 700;
}

.consent-row .meta span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
}

.notice {
  display: flex;
  gap: 9px;
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--blue-50);
  border: 1px solid #e3ebfb;
  color: #4a5a75;
  font-size: 11.5px;
  line-height: 1.5;
}

.notice .icon {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: var(--navy-700);
}

.training-card {
  position: relative;
  padding: 18px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.training-card .tag-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.training-card h4 {
  margin-top: 9px;
  font-size: 14px;
  font-weight: 800;
}

.training-card .due {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--muted);
}

.training-card .bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 13px;
}

.training-card .bar-row .progress {
  flex: 1;
}

.training-card .bar-row b {
  font-size: 12px;
  font-weight: 800;
  color: var(--mint-600);
}

.training-card .lock-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #eef1f7;
  font-size: 11.5px;
  color: var(--muted);
}

.notif-row {
  display: flex;
  gap: 11px;
  padding: 12px 0;
}

.notif-row + .notif-row {
  border-top: 1px solid #f1f4f9;
}

.notif-row .meta {
  flex: 1;
  min-width: 0;
}

.notif-row .meta b {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}

.notif-row .meta p {
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--muted);
}

.notif-row .meta time {
  display: block;
  margin-top: 5px;
  font-size: 10.5px;
  color: var(--muted-2);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: min(406px, calc(100% - 24px));
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  padding: 8px 8px 10px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  box-shadow: 0 20px 40px -24px rgba(23, 35, 60, 0.45);
  backdrop-filter: blur(12px);
}

.bn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 0 2px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
}

.bn-item .icon {
  width: 21px;
  height: 21px;
}

.bn-item.is-active {
  color: var(--navy-700);
}

.bn-fab {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: -26px auto 0;
  border-radius: 18px;
  background: var(--gradient-btn);
  color: #fff;
  box-shadow: 0 16px 26px -14px rgba(0, 54, 177, 0.8);
}

.bn-fab .icon {
  width: 23px;
  height: 23px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 18px;
  border-radius: 14px;
  background: #17233c;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 18px 34px -18px rgba(0, 0, 0, 0.6);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

.toast .icon {
  color: #8fe0b5;
}

.preview-hub {
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.hub-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.hub-head h1 {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hub-head p {
  margin-top: 8px;
  max-width: 62ch;
  color: var(--muted);
}

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

.hub-card {
  display: block;
  padding: 20px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.hub-card:hover {
  transform: translateY(-3px);
  border-color: var(--blue-300);
  box-shadow: 0 26px 44px -30px rgba(23, 35, 60, 0.55);
}

.hub-thumb {
  position: relative;
  height: 210px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.hub-thumb-admin {
  display: grid;
  grid-template-columns: 66px 1fr;
}

.hub-thumb-admin .side {
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 10px 8px;
}

.hub-thumb-admin .side i {
  display: block;
  height: 7px;
  margin-bottom: 7px;
  border-radius: 4px;
  background: #eef1f7;
}

.hub-thumb-admin .side i.on {
  background: var(--blue-100);
  height: 16px;
}

.hub-thumb-admin .body {
  padding: 10px;
}

.hub-thumb-admin .bar {
  height: 14px;
  border-radius: 5px;
  background: #eef1f7;
  margin-bottom: 8px;
}

.hub-thumb-admin .hero-mini {
  height: 62px;
  border-radius: 12px;
  background: var(--gradient-hero);
  margin-bottom: 8px;
}

.hub-thumb-admin .row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.hub-thumb-admin .row span {
  height: 34px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
}

.hub-thumb-admin .row span:nth-child(2) { background: var(--mint-100); }
.hub-thumb-admin .row span:nth-child(3) { background: var(--amber-100); }

.hub-thumb-user {
  display: flex;
  justify-content: center;
  padding: 16px 0;
}

.hub-thumb-user .mini-phone {
  width: 108px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 7px;
}

.hub-thumb-user .mini-hero {
  height: 54px;
  border-radius: 10px;
  background: var(--gradient-hero);
  margin-bottom: 6px;
}

.hub-thumb-user .mini-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.hub-thumb-user .mini-row span {
  height: 22px;
  border-radius: 6px;
  background: #f2f5fa;
}

.hub-thumb-user .mini-bar {
  height: 30px;
  border-radius: 8px;
  background: #f2f5fa;
  margin-top: 6px;
}

.hub-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.hub-meta h3 {
  font-size: 16px;
  font-weight: 800;
}

.hub-meta p {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--muted);
}

.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--navy-700);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.token-section {
  margin-top: 34px;
  padding: 24px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.token-section h2 {
  font-size: 17px;
  font-weight: 800;
}

.token-section > p {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.swatch {
  width: 132px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.swatch .color {
  height: 54px;
}

.swatch .label {
  padding: 8px 10px;
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--muted);
}

.swatch .label b {
  display: block;
  color: var(--ink);
  font-size: 11.5px;
}

.type-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 18px;
  margin-top: 18px;
}

.hub-note {
  margin-top: 22px;
  font-size: 12px;
  color: var(--muted-2);
}

@media (max-width: 1180px) {
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .content-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  }
}

@media (max-width: 1024px) {
  .shell {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .sidebar {
    padding: 18px 10px;
    align-items: center;
  }

  .brand {
    padding: 4px 0 18px;
  }

  .brand-text,
  .nav-label,
  .nav-item .nav-count,
  .nav-group-label,
  .support-card,
  .side-user .who {
    display: none;
  }

  .nav-item {
    justify-content: center;
    padding: 11px;
  }

  .side-user {
    justify-content: center;
    padding: 6px;
    background: transparent;
    border: 0;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

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

  .side-stack > .map-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 264px;
    height: 100vh;
    align-items: stretch;
    padding: 22px 18px 18px;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 0 24px 60px -20px rgba(23, 35, 60, 0.4);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar.is-open .brand-text,
  .sidebar.is-open .nav-label,
  .sidebar.is-open .nav-count,
  .sidebar.is-open .nav-group-label,
  .sidebar.is-open .support-card,
  .sidebar.is-open .side-user .who {
    display: block;
  }

  .sidebar.is-open .nav-item {
    justify-content: flex-start;
    padding: 10px 12px;
  }

  .sidebar.is-open .side-user {
    justify-content: flex-start;
    padding: 12px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
  }

  .sidebar.is-open .brand {
    padding: 4px 8px 22px;
  }

  .menu-btn {
    display: inline-flex;
  }

  .topbar {
    padding: 12px 18px;
  }

  .page {
    padding: 20px 18px 40px;
  }

  .search {
    display: none;
  }

  .topbar-user .who {
    display: none;
  }

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

  .side-stack {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .topbar-title strong {
    font-size: 15px;
  }

  .hero {
    padding: 24px 22px;
    border-radius: 20px;
  }

  .hero-stats {
    grid-template-columns: 1fr 1fr;
  }

  .kpi-grid {
    gap: 10px;
  }

  .kpi {
    padding: 14px;
  }

  .kpi .kpi-value {
    font-size: 22px;
  }

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

  .reminder-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .app-frame {
    padding: 0;
    background: var(--bg-soft);
  }

  .phone {
    width: 100%;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .bottom-nav {
    width: calc(100% - 24px);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
