:root {
  --ink: #121212;
  --muted: #686d74;
  --line: #e5e5e3;
  --surface: #ffffff;
  --canvas: #f6f6f3;
  --orange: #f36c21;
  --orange-dark: #cb4d0a;
  --orange-soft: #fff1e7;
  --green: #15803d;
  --shadow: 0 10px 34px rgba(0, 0, 0, 0.045);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }

.topbar {
  min-height: 92px;
  padding: 0 4vw;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 32px;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
}
.brand {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 370px;
}
.brand img { width: 120px; height: 68px; object-fit: contain; filter: contrast(1.2); }
.brand-copy { display: flex; flex-direction: column; gap: 4px; }
.brand-copy strong { font-size: 24px; letter-spacing: -0.5px; }
.brand-copy small { color: var(--muted); font-size: 13px; }
nav { display: flex; align-items: stretch; gap: 8px; margin-left: auto; align-self: stretch; }
nav a {
  color: #444;
  text-decoration: none;
  padding: 0 16px;
  display: grid;
  place-items: center;
  position: relative;
  font-weight: 650;
  font-size: 14px;
}
nav a:hover, nav a:focus-visible, nav a.active { color: var(--orange-dark); }
nav a.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 3px;
  border-radius: 4px 4px 0 0;
  background: var(--orange);
}
.profile {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.content { max-width: 1500px; margin: auto; padding: 40px 4vw 70px; }
.welcome { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 18px; }
.eyebrow { font-size: 11px; font-weight: 850; letter-spacing: 1.45px; color: var(--orange-dark); }
.welcome h1 { margin: 7px 0; font-size: clamp(32px, 3vw, 48px); letter-spacing: -1.5px; }
.welcome p { margin: 0; color: var(--muted); font-size: 16px; }
.update-chip {
  display: grid;
  gap: 5px;
  min-width: 245px;
  padding: 13px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--orange);
  border-radius: 11px;
}
.update-chip span { color: var(--orange-dark); font-size: 10px; font-weight: 850; letter-spacing: 1px; }
.update-chip strong { font-size: 13px; }
.period-select, .code-selector { display: grid; gap: 7px; }
.period-select { min-width: 210px; }
.period-select span, .code-selector > span { color: var(--muted); font-size: 12px; font-weight: 750; }
select {
  width: 100%;
  border: 1px solid #d9d9d6;
  border-radius: 10px;
  background: #fff;
  padding: 11px 36px 11px 12px;
  color: var(--ink);
  outline: none;
}
select:focus { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }

.sync-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid #f3ccb4;
  border-left: 3px solid var(--orange);
  border-radius: 10px;
  background: var(--orange-soft);
  color: #703310;
  font-size: 12px;
}
.sync-notice > div { display: grid; gap: 2px; }
.sync-notice strong { font-size: 12px; }
.sync-notice span:not(.sync-dot) { color: #8b4b27; }
.sync-dot { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: var(--orange); }
.sync-notice.online { border-color: #b9dec6; border-left-color: var(--green); background: #eef9f1; color: #14532d; }
.sync-notice.online .sync-dot { background: var(--green); box-shadow: 0 0 0 4px rgba(21, 128, 61, 0.12); }
.sync-notice.online span:not(.sync-dot) { color: #3c7651; }
.sync-notice.warning { border-color: #f1d49a; border-left-color: #d99000; background: #fff8e8; color: #704900; }
.sync-notice.warning .sync-dot { background: #d99000; }
.sync-notice.warning span:not(.sync-dot) { color: #8a6212; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.metric-card, .panel { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.metric-card { border-radius: 15px; padding: 22px; display: grid; gap: 6px; border-top: 3px solid var(--ink); }
.metric-card span { color: #494d53; font-size: 13px; font-weight: 750; }
.metric-card strong { font-size: 34px; letter-spacing: -1px; }
.metric-card small { color: #8a8e94; }
.metric-card strong.metric-word { font-size: 27px; }
.metric-card strong.muted-value { color: #a0a0a0; }
.metric-card.positive { border-top-color: var(--green); }
.metric-card.positive strong { color: var(--green); }

.main-grid, .lower-grid { display: grid; grid-template-columns: 1.08fr 1fr; gap: 18px; margin-bottom: 18px; }
.lower-grid { grid-template-columns: 1.4fr 0.85fr; }
.panel { border-radius: 16px; padding: 25px; }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.panel h2 { margin: 5px 0 0; font-size: 21px; letter-spacing: -0.35px; }
.text-button { border: 0; background: transparent; color: var(--orange-dark); font-weight: 750; cursor: pointer; padding: 7px; }
.text-button:hover { text-decoration: underline; }
.spotlight-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.person {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 10px 2px;
  border-right: 1px solid var(--line);
}
.person:last-child { border-right: 0; }
.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #222;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}
.avatar.large { width: 72px; height: 72px; font-size: 18px; margin-bottom: 14px; }
.avatar.orange { background: var(--orange); }
.avatar.charcoal { background: #292929; }
.avatar.sand { background: #d4b08e; color: #342416; }
.avatar.gray { background: #737373; }
.avatar.ink { background: #111827; }
.person-label { color: var(--orange-dark); font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: 0.8px; }
.person strong { margin: 5px 0 3px; font-size: 16px; }
.person small { color: var(--muted); }
.ranking-list { display: grid; gap: 3px; max-height: 320px; overflow: auto; padding-right: 4px; }
.ranking-row {
  display: grid;
  grid-template-columns: 35px 42px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border-bottom: 1px solid var(--line);
}
.ranking-row:last-child { border-bottom: 0; }
.ranking-row > span:last-child { color: var(--muted); font-size: 13px; }
.position { color: #95999f; font-size: 12px; font-weight: 850; }

.result-panel { border-left: 3px solid var(--orange); }
.result-topline { display: flex; justify-content: space-between; align-items: center; }
.status { border: 1px solid var(--orange); color: var(--orange-dark); border-radius: 5px; padding: 5px 9px; font-size: 10px; font-weight: 850; letter-spacing: 0.5px; }
.result-number { color: var(--orange-dark); font-size: 64px; font-weight: 850; line-height: 1; margin: 15px 0 8px; letter-spacing: -3px; }
.result-number small { font-size: 32px; }
.result-number.result-word { font-size: 45px; letter-spacing: -1.5px; }
.result-panel p { color: var(--muted); line-height: 1.5; margin: 0 0 17px; font-size: 13px; max-width: 680px; }
.progress { height: 8px; background: #ededeb; border-radius: 10px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--orange); border-radius: inherit; transition: width 300ms ease; }
.result-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.result-details div { display: grid; gap: 3px; }
.result-details span { color: var(--muted); font-size: 11px; }
.result-details strong { font-size: 18px; }

.data-note { color: var(--muted); font-size: 11px; }
.bar-chart {
  height: 230px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 20px;
  border-bottom: 1px solid #d8d8d6;
  padding: 15px 25px 0;
  background: repeating-linear-gradient(to top, transparent 0, transparent 54px, #ededeb 55px);
}
.bar-column { height: 100%; display: grid; grid-template-rows: 20px 1fr 30px; text-align: center; align-items: end; }
.bar-value { font-size: 11px; color: var(--muted); }
.bar-track { width: 30px; height: 100%; margin: auto; display: flex; align-items: end; }
.bar-track span { display: block; width: 100%; min-height: 2px; background: var(--orange); border-radius: 5px 5px 0 0; transition: height 300ms ease; }
.bar-column strong { font-size: 12px; padding-top: 9px; }
.sla-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.sla-summary div { padding: 13px; border-radius: 10px; background: #f7f7f5; display: grid; gap: 5px; }
.sla-summary span { color: var(--muted); font-size: 10px; }
.sla-summary strong { font-size: 15px; }
.sla-warning { margin: 19px 0 0; border-left: 2px solid var(--orange); padding-left: 11px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.flow-steps { display: grid; grid-template-columns: 1fr 26px 1fr 26px 1fr 26px 1fr; align-items: center; gap: 8px; margin-top: 25px; }
.flow-steps > div { padding: 16px; background: #f8f8f6; border-radius: 12px; min-height: 112px; display: grid; align-content: start; gap: 5px; }
.flow-steps div > span { color: var(--orange-dark); font-size: 11px; font-weight: 850; }
.flow-steps div > strong { font-size: 14px; }
.flow-steps div > small { color: var(--muted); line-height: 1.4; }
.flow-steps i { height: 1px; background: var(--orange); position: relative; }
.flow-steps i::after { content: ""; position: absolute; right: -1px; top: -3px; width: 7px; height: 7px; border-top: 1px solid var(--orange); border-right: 1px solid var(--orange); transform: rotate(45deg); }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 24px 4px 0; color: var(--muted); font-size: 12px; }
footer strong { color: var(--ink); }

@media (max-width: 1050px) {
  .brand { min-width: auto; }
  .brand-copy small { display: none; }
  nav a { padding: 0 9px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .main-grid, .lower-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .topbar { height: auto; padding: 12px 18px; flex-wrap: wrap; gap: 12px; }
  .brand img { width: 78px; height: 42px; }
  .brand-copy strong { font-size: 17px; }
  nav { order: 3; width: 100%; height: 43px; overflow-x: auto; }
  nav a { white-space: nowrap; }
  .profile { margin-left: auto; }
  .content { padding: 28px 16px 50px; }
  .welcome { align-items: start; flex-direction: column; }
  .period-select { width: 100%; }
  .update-chip { width: 100%; }
  .sync-notice { align-items: flex-start; }
  .metrics { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric-card { padding: 16px; }
  .metric-card strong { font-size: 27px; }
  .metric-card strong.metric-word { font-size: 20px; }
  .metric-card small { font-size: 10px; }
  .panel { padding: 19px; }
  .panel-heading { flex-direction: column; margin-bottom: 18px; }
  .spotlight-grid { grid-template-columns: 1fr; }
  .person { border-right: 0; border-bottom: 1px solid var(--line); padding: 13px; display: grid; grid-template-columns: 58px 1fr; text-align: left; column-gap: 12px; }
  .person:last-child { border-bottom: 0; }
  .avatar.large { width: 54px; height: 54px; grid-row: span 3; margin: 0; }
  .result-details, .sla-summary { grid-template-columns: 1fr; }
  .bar-chart { gap: 7px; padding-inline: 5px; }
  .flow-steps { grid-template-columns: 1fr; }
  .flow-steps i { height: 24px; width: 1px; margin: auto; }
  .flow-steps i::after { right: -3px; top: auto; bottom: 0; transform: rotate(135deg); }
  footer { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
