:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0b1220;
  color: #edf3f8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --bg: #0b1220;
  --panel: #111d2d;
  --panel-soft: #142235;
  --border: rgba(148, 170, 190, .13);
  --muted: #8192a7;
  --text: #edf3f8;
  --teal: #52cbbb;
  --blue: #69a9f7;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: var(--bg); }
button, select { font: inherit; }
button { cursor: pointer; }
.app-layout { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 5; display: flex; flex-direction: column; width: 248px; padding: 25px 16px 16px; border-right: 1px solid var(--border); background: #0d1726; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px; color: var(--text); text-decoration: none; }
.brand-mark { display: grid; width: 37px; height: 37px; place-items: center; border-radius: 11px; background: linear-gradient(145deg,#53d2c1,#248d91); color: #09202a; font-size: 13px; font-weight: 850; letter-spacing: -.06em; }
.brand-copy, .workspace-copy, .profile-copy { display: flex; flex-direction: column; gap: 3px; }
.brand-copy strong { font-size: 14px; letter-spacing: -.02em; }
.brand-copy small { color: #6f8297; font-size: 9px; font-weight: 800; letter-spacing: .19em; }
.workspace-switcher { display: flex; align-items: center; gap: 10px; margin: 35px 0 31px; padding: 11px 10px; border: 1px solid var(--border); border-radius: 10px; background: rgba(255,255,255,.025); }
.workspace-icon { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 8px; background: #253d54; color: #a9d9d3; font-weight: 750; }
.workspace-copy { flex: 1; min-width: 0; }
.workspace-copy strong, .profile-copy strong { font-size: 11px; font-weight: 650; }
.workspace-copy small, .profile-copy small { color: var(--muted); font-size: 10px; }
.chevron { color: var(--muted); }
.nav-label { margin: 0 10px 11px; color: #61758b; font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.main-nav { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 42px; padding: 0 11px; border: 0; border-radius: 8px; background: transparent; color: #9aabbd; text-align: left; text-decoration: none; font-size: 12px; transition: background .2s,color .2s; }
.nav-item:hover { background: rgba(255,255,255,.045); color: var(--text); }
.nav-item.active { background: rgba(71,190,177,.12); color: #75dfd0; font-weight: 650; }
.nav-icon { display: grid; width: 17px; place-items: center; color: currentColor; font-size: 16px; }
.soon { margin-left: auto; color: #65778b; font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.secondary-label { margin-top: 32px; }
.sidebar-bottom { margin-top: auto; }
.help-card { padding: 14px; border: 1px solid rgba(82,203,187,.16); border-radius: 10px; background: linear-gradient(145deg,rgba(50,130,133,.14),rgba(19,34,52,.5)); }
.help-icon { color: var(--teal); font-size: 17px; }
.help-card strong { display: block; margin-top: 7px; font-size: 11px; }
.help-card p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.profile { display: flex; align-items: center; gap: 9px; margin-top: 17px; padding: 14px 4px 2px; border-top: 1px solid var(--border); }
.avatar, .top-avatar { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid rgba(121,166,202,.25); border-radius: 50%; background: #24394e; color: #c5e1ed; font-size: 10px; font-weight: 750; }
.profile-copy { flex: 1; }
.more { color: var(--muted); }
.main-content { min-height: 100vh; margin-left: 248px; }
.topbar { position: sticky; top: 0; z-index: 3; display: flex; height: 67px; align-items: center; justify-content: space-between; padding: 0 38px; border-bottom: 1px solid var(--border); background: rgba(11,18,32,.88); backdrop-filter: blur(16px); }
.breadcrumbs { display: flex; align-items: center; gap: 11px; color: #73869a; font-size: 11px; }
.breadcrumbs strong { color: #dce6ee; font-weight: 600; }
.crumb-separator { color: #43556a; }
.topbar-actions { display: flex; align-items: center; gap: 20px; }
.demo-label { display: flex; align-items: center; gap: 7px; color: #8fa1b4; font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.demo-label span { width: 6px; height: 6px; border-radius: 50%; background: #e7b65d; box-shadow: 0 0 10px rgba(231,182,93,.45); }
.icon-button { position: relative; border: 0; background: transparent; color: #9aadc0; font-size: 17px; }
.icon-button i { position: absolute; top: 0; right: -1px; width: 5px; height: 5px; border-radius: 50%; background: #e7b65d; }
.top-avatar { width: 29px; height: 29px; }
.mobile-menu { display: none; border: 0; background: transparent; color: var(--text); font-size: 19px; }
.page-content { width: min(100%, 1500px); margin: 0 auto; padding: 35px 38px 22px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.eyebrow { margin: 0 0 9px; color: #65cfc1; font-size: 9px; font-weight: 800; letter-spacing: .15em; }
h1 { margin: 0; color: #f1f5f8; font-size: clamp(26px,3vw,34px); font-weight: 650; letter-spacing: -.045em; }
.wave { color: #e7bd71; font-size: 22px; }
.muted { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.heading-actions { display: flex; align-items: center; gap: 9px; }
.select-wrap select { min-width: 125px; height: 36px; padding: 0 28px 0 11px; border: 1px solid var(--border); border-radius: 7px; outline: none; background: #111d2d; color: #c2cfdb; font-size: 10px; }
.primary-button { height: 36px; padding: 0 14px; border: 0; border-radius: 7px; background: #4fc4b5; color: #09232b; font-size: 10px; font-weight: 800; box-shadow: 0 5px 16px rgba(50,184,168,.12); }
.primary-button:hover { background: #70d8ca; }
.primary-button span { margin-right: 5px; font-size: 15px; vertical-align: -1px; }
.summary-row { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.metric-card, .panel { border: 1px solid var(--border); border-radius: 11px; background: linear-gradient(145deg,rgba(21,36,55,.96),rgba(16,28,44,.96)); }
.metric-card { position: relative; min-height: 151px; overflow: hidden; padding: 17px 17px 15px; }
.metric-top { display: flex; align-items: center; justify-content: space-between; }
.metric-name { color: #9aaabc; font-size: 10px; font-weight: 550; }
.metric-icon { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 8px; font-size: 15px; }
.metric-icon.teal { background: rgba(82,203,187,.12); color: #65d9c9; }
.metric-icon.blue { background: rgba(105,169,247,.12); color: #7db8fb; }
.metric-icon.amber { background: rgba(231,182,93,.12); color: #e9bd70; }
.metric-icon.violet { background: rgba(171,145,239,.12); color: #b8a0f4; }
.metric-value { margin-top: 12px; color: #f0f5f8; font-size: 29px; font-weight: 680; letter-spacing: -.055em; }
.metric-unit { margin-left: 2px; color: #8ea1b4; font-size: 15px; font-weight: 500; letter-spacing: 0; }
.metric-foot { display: flex; align-items: center; gap: 7px; margin-top: 5px; color: #71849a; font-size: 9px; }
.trend { font-size: 9px; font-weight: 750; }
.positive { color: #5ed2b6; }
.warning { color: #e7b65d; }
.neutral { color: #9b9be0; }
.mini-bars { position: absolute; right: 15px; bottom: 0; display: flex; height: 39px; align-items: flex-end; gap: 4px; opacity: .7; }
.mini-bars i { width: 7px; border-radius: 3px 3px 0 0; background: #3ba99e; }
.progress-track { height: 4px; margin-top: 18px; overflow: hidden; border-radius: 5px; background: #26374a; }
.progress-fill { display: block; height: 100%; border-radius: inherit; }
.blue-fill { background: #68a8f3; }
.risk-dots { display: flex; gap: 4px; margin-top: 17px; }
.risk-dots i { width: 7px; height: 7px; border-radius: 50%; background: #33465a; }
.risk-dots i:nth-child(-n+3) { background: #dca957; }
.team-avatars { display: flex; align-items: center; margin-top: 12px; padding-left: 2px; }
.team-avatars i, .team-avatars b { display: grid; width: 23px; height: 23px; margin-left: -3px; place-items: center; border: 2px solid #142235; border-radius: 50%; background: #36566c; color: #d6e9ee; font-size: 8px; font-style: normal; }
.team-avatars i:nth-child(2) { background: #65527f; }.team-avatars i:nth-child(3) { background: #366b67; }.team-avatars i:nth-child(4) { background: #806044; }
.team-avatars b { width: auto; padding: 0 6px; border-radius: 20px; background: #293c50; color: #aebdca; font-weight: 600; }
.content-grid { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(280px,1fr); gap: 14px; margin-top: 15px; }
.panel { min-width: 0; padding: 19px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.panel-heading h2 { margin: 0; color: #e7eef4; font-size: 13px; font-weight: 650; letter-spacing: -.015em; }
.panel-heading .muted { margin-top: 5px; font-size: 10px; }
.legend { display: flex; gap: 13px; padding-top: 3px; color: #8b9daf; font-size: 9px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 6px; height: 6px; border-radius: 50%; }
.legend-dot.actual { background: #53cbbb; }.legend-dot.target { background: #d6a95e; }
.chart-summary { display: flex; align-items: baseline; gap: 10px; margin: 17px 0 0 35px; }
.chart-summary strong { font-size: 24px; letter-spacing: -.04em; }
.chart-summary small { color: #74879b; font-size: 9px; }
.chart-area { position: relative; height: 155px; margin-top: 6px; padding-left: 35px; }
.y-labels { position: absolute; inset: 0 auto 0 0; display: flex; flex-direction: column; justify-content: space-between; padding: 0 0 0; color: #718398; font-size: 8px; }
.trend-chart { width: 100%; height: 100%; overflow: visible; }
.grid-lines path { fill: none; stroke: rgba(139,160,181,.13); stroke-width: 1; stroke-dasharray: 3 5; }
.target-line { fill: none; stroke: #d4a85e; stroke-width: 1.4; stroke-dasharray: 5 5; opacity: .8; }
.area-path { fill: url(#areaFill); }
.actual-line { fill: none; stroke: #53cbbb; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-points circle { fill: #142235; stroke: #63d6c6; stroke-width: 2.5; }
.x-labels { display: flex; justify-content: space-between; padding: 8px 0 0 35px; color: #718398; font-size: 8px; }
.chart-note { margin: 13px 0 0 35px; color: #65798e; font-size: 8px; }
.insights-panel { display: flex; flex-direction: column; }
.sparkle { color: #64d4c4; font-size: 17px; }
.insight-item { display: flex; gap: 11px; margin-top: 19px; }
.insight-symbol { display: grid; flex: 0 0 27px; width: 27px; height: 27px; place-items: center; border-radius: 8px; font-size: 12px; font-weight: 800; }
.positive-bg { background: rgba(69,193,160,.12); color: #5bd1b0; }.warning-bg { background: rgba(225,174,83,.12); color: #e4b45e; }.info-bg { background: rgba(105,169,247,.12); color: #7bb5f7; }
.insight-item strong { color: #dce6ed; font-size: 10px; font-weight: 650; }
.insight-item p { margin: 5px 0 0; color: #8395a8; font-size: 9px; line-height: 1.55; }
.insight-footer { display: flex; align-items: center; gap: 7px; margin-top: auto; padding-top: 17px; color: #71869a; font-size: 8px; }
.ai-indicator { color: #65d6c5; }
.teams-panel { margin-top: 15px; padding-bottom: 12px; }
.teams-heading { align-items: center; margin-bottom: 16px; }
.text-button { border: 0; background: transparent; color: #63d1c2; font-size: 9px; font-weight: 700; }
.text-button span { margin-left: 4px; font-size: 13px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
th { padding: 10px 10px; border-bottom: 1px solid var(--border); color: #6f8297; font-size: 8px; font-weight: 800; letter-spacing: .09em; }
td { padding: 11px 10px; border-bottom: 1px solid rgba(148,170,190,.08); color: #9aabbd; font-size: 9px; }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { color: #dce6ee; }
td:first-child strong { margin-left: 8px; font-weight: 600; }
.team-avatar { display: inline-grid; width: 25px; height: 25px; place-items: center; border-radius: 7px; font-size: 8px; font-weight: 800; vertical-align: middle; }
.aqua { background: rgba(72,195,175,.14); color: #64d7c2; }.blue { background: rgba(94,158,232,.14); color: #83b9f4; }.violet { background: rgba(165,137,230,.14); color: #b49af0; }.orange { background: rgba(221,157,91,.14); color: #e5b174; }
.table-score { display: flex; align-items: center; gap: 10px; }
.table-score > span { width: 39px; color: #dce6ee; }
.table-progress { width: 70px; height: 4px; overflow: hidden; border-radius: 5px; background: #2a3a4c; }
.table-progress i { display: block; height: 100%; border-radius: inherit; background: #53cbbb; }
.positive-text { color: #5ed2b6; }.negative-text { color: #e3aa67; }
.status-pill { display: inline-flex; padding: 4px 8px; border-radius: 20px; font-size: 8px; font-weight: 700; }
.on-track { background: rgba(73,194,155,.12); color: #63d1ad; }.at-risk { background: rgba(223,177,91,.13); color: #e4b866; }.critical { background: rgba(220,111,111,.13); color: #e58c8c; }
.table-disclaimer { margin: 8px 10px 0; color: #64788d; font-size: 8px; }
.page-footer { display: flex; justify-content: space-between; padding: 19px 2px 0; color: #61758a; font-size: 8px; }
.page-footer b { padding: 0 5px; color: #40556b; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 10; max-width: min(360px,calc(100vw - 32px)); padding: 12px 16px; transform: translateY(15px); border: 1px solid rgba(82,203,187,.25); border-radius: 9px; background: #17283b; color: #dce9ef; font-size: 11px; opacity: 0; pointer-events: none; transition: .22s ease; box-shadow: 0 12px 35px rgba(0,0,0,.3); }
.toast.visible { transform: translateY(0); opacity: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
@media (max-width: 1120px) {
  .sidebar { width: 220px; }.main-content { margin-left: 220px; }
  .topbar { padding: 0 25px; }.page-content { padding: 29px 25px 20px; }
  .summary-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 820px) {
  .sidebar { width: 248px; transform: translateX(-100%); transition: transform .25s ease; box-shadow: 20px 0 50px rgba(0,0,0,.25); }
  .sidebar.open { transform: translateX(0); }.main-content { margin-left: 0; }
  .mobile-menu { display: block; }.topbar { justify-content: flex-start; gap: 15px; padding: 0 19px; }
  .topbar-actions { margin-left: auto; gap: 13px; }.page-content { padding: 25px 19px 18px; }
  .page-heading { align-items: flex-start; flex-direction: column; }.heading-actions { width: 100%; flex-wrap: wrap; }
  .content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .page-content { padding: 22px 13px 16px; }.topbar { height: 58px; padding: 0 13px; }
  .breadcrumbs { font-size: 10px; }.demo-label { font-size: 0; gap: 0; }.demo-label span { width: 7px; height: 7px; }
  .summary-row { gap: 9px; }.metric-card { min-height: 139px; padding: 13px; }.metric-name { font-size: 9px; }.metric-value { font-size: 25px; }
  .select-wrap { flex: 1; }.select-wrap select { width: 100%; min-width: 0; }.primary-button { flex: 1; }
  .panel { padding: 14px; }.legend { gap: 8px; font-size: 8px; }.chart-area { height: 130px; }
  .x-labels span:nth-child(even) { display: none; }.page-footer { gap: 10px; flex-wrap: wrap; }
}


/* Excel import modal */
.import-modal { position: fixed; inset: 0; z-index: 20; display: none; place-items: center; padding: 20px; background: rgba(3,9,17,.78); backdrop-filter: blur(8px); }
.import-modal.open { display: grid; }
.import-dialog { width: min(100%,760px); max-height: min(88vh,850px); overflow: auto; padding: 25px; border: 1px solid rgba(148,170,190,.2); border-radius: 15px; background: #111d2d; box-shadow: 0 25px 90px rgba(0,0,0,.45); }
.import-heading { display: flex; justify-content: space-between; gap: 20px; }
.import-heading h2 { margin: 0; font-size: 21px; letter-spacing: -.03em; }
.close-modal { width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 8px; background: #192a3d; color: #b8c6d3; font-size: 22px; }
.upload-dropzone { display: flex; flex-direction: column; align-items: center; gap: 9px; margin-top: 23px; padding: 28px 15px; border: 1px dashed rgba(91,197,184,.45); border-radius: 11px; background: rgba(71,190,177,.045); color: #dce7ef; text-align: center; }
.upload-dropzone.dragover { background: rgba(71,190,177,.12); border-color: #64d5c5; }
.upload-symbol { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; background: rgba(82,203,187,.13); color: #67d9c9; font-size: 23px; }
.upload-dropzone strong { font-size: 12px; }.upload-dropzone > span:last-of-type { color: var(--muted); font-size: 10px; }
.secondary-button { min-height: 34px; padding: 0 13px; border: 1px solid var(--border); border-radius: 7px; background: #1b2c40; color: #d2dee8; font-size: 10px; font-weight: 650; }
.secondary-button:hover { border-color: rgba(82,203,187,.4); }
.import-feedback { margin-top: 14px; color: #9fb0c0; font-size: 10px; line-height: 1.6; }
.import-feedback.error { color: #ef9a9a; }.import-feedback.success { color: #69d5b8; }
.preview-wrap { margin-top: 15px; }.preview-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 11px; }
.preview-stat { padding: 8px 11px; border: 1px solid var(--border); border-radius: 7px; color: #aebdca; font-size: 9px; }.preview-stat strong { color: #edf4f8; margin-right: 4px; }
.preview-table-wrap { max-height: 245px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.preview-table-wrap table { min-width: 650px; }.preview-table-wrap th { position: sticky; top: 0; background: #1a2a3e; }.preview-table-wrap td { font-size: 9px; }
.import-disclaimer { color: #74889c; font-size: 9px; line-height: 1.5; }
.import-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 19px; padding-top: 15px; border-top: 1px solid var(--border); }
.primary-button:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width:520px) { .import-dialog { padding: 17px; }.import-heading h2 { font-size: 18px; } }


/* KPI Analytics page */
.kpi-page[hidden] { display: none !important; }
.kpi-page { display: grid; gap: 18px; }
.kpi-page-heading { margin-bottom: 0; }
.data-period { display: inline-flex; align-items: center; min-height: 32px; padding: 0 11px; border: 1px solid var(--border); border-radius: 7px; color: #a8b9c9; font-size: 10px; }
.kpi-filter-bar { display: grid; grid-template-columns: repeat(4,minmax(130px,1fr)); gap: 12px; padding: 15px; }
.kpi-filter-bar label { display: grid; gap: 7px; min-width: 0; color: #91a4b8; font-size: 10px; }
.kpi-filter-bar select { width: 100%; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 7px; outline: 0; background: #0e1a2a; color: #e5edf4; font-size: 11px; }
.kpi-summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.kpi-summary-grid .metric-card { min-height: 132px; }
.kpi-analysis-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(260px,.9fr); gap: 16px; }
.kpi-trend-panel,.kpi-gap-panel,.kpi-table-panel { min-width: 0; }
.kpi-gap-list { display: grid; gap: 12px; margin-top: 17px; }
.kpi-gap-item { display: grid; gap: 6px; padding-bottom: 11px; border-bottom: 1px solid var(--border); }
.kpi-gap-head { display: flex; justify-content: space-between; gap: 10px; font-size: 10px; }
.kpi-gap-head strong { color: #dce7ef; font-weight: 650; }
.kpi-gap-head span { color: #efb65c; font-weight: 700; }
.kpi-gap-meta { color: var(--muted); font-size: 9px; }
.kpi-gap-track { height: 5px; overflow: hidden; border-radius: 9px; background: #26394d; }
.kpi-gap-track i { display: block; height: 100%; border-radius: inherit; background: #e4ad56; }
.empty-state { padding: 22px 12px !important; color: var(--muted) !important; text-align: center; font-size: 10px !important; }
.kpi-table-panel .table-wrap { overflow-x: auto; }
.kpi-table-panel table { min-width: 760px; }
.kpi-table-panel td { white-space: nowrap; }
.kpi-value-cell { color: #dce8f1; font-weight: 650; }
.kpi-gap-positive { color: #59d1b7 !important; }.kpi-gap-negative { color: #eab05c !important; }
.kpi-status { display: inline-flex; padding: 4px 8px; border-radius: 20px; font-size: 9px; font-weight: 700; }
.kpi-status.good { background: rgba(67,199,181,.13); color: #69d8c7; }
.kpi-status.warn { background: rgba(231,182,93,.13); color: #efbd69; }
.kpi-status.bad { background: rgba(222,111,126,.13); color: #ed8797; }
@media(max-width:1050px){.kpi-analysis-grid{grid-template-columns:1fr}.kpi-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.kpi-filter-bar{grid-template-columns:repeat(2,minmax(0,1fr))}.kpi-summary-grid{gap:9px}.kpi-summary-grid .metric-card{padding:13px;min-height:125px}.kpi-page-heading{align-items:flex-start}.kpi-page-heading .heading-actions{width:100%}.kpi-page-heading .data-period{display:none}}
