:root {
  --page: #eaf5fb;
  --page-deep: #d9edf7;
  --ink: #173247;
  --muted: #6d8291;
  --line: rgba(65, 111, 139, 0.15);
  --glass: rgba(255, 255, 255, 0.68);
  --blue: #1677ff;
  --blue-soft: rgba(22, 119, 255, 0.12);
  --teal: #12a594;
  --teal-soft: rgba(18, 165, 148, 0.13);
  --gold: #dd931d;
  --gold-soft: rgba(221, 147, 29, 0.14);
  --green: #159461;
  --danger: #cf4a4a;
  --shadow: 0 18px 48px rgba(40, 83, 108, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --radius: 28px;
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: var(--page);
  font-synthesis: none;
}

@property --progress {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
  overflow-anchor: none;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-anchor: none;
  background: linear-gradient(180deg, #edf8fd 0%, #e5f2f8 52%, #dcecf4 100%);
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

button,
a,
input,
select {
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, opacity 180ms ease;
}

:where(button, a, input, select):focus-visible {
  outline: 3px solid rgba(22, 119, 255, .2);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.shell,
.admin-shell {
  width: min(1500px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 34px;
}

.system-switcher {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 10px;
}

.system-switcher a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .92);
  border-radius: 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, .68);
  box-shadow: 0 8px 22px rgba(52, 91, 128, .1);
  backdrop-filter: blur(18px) saturate(140%);
  text-decoration: none;
  font-size: 13px;
  font-weight: 680;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.system-switcher a:hover,
.system-switcher a:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(22, 119, 255, .38);
  box-shadow: 0 10px 24px rgba(52, 91, 128, .16);
  outline: none;
}

.system-switcher svg {
  width: 17px;
  height: 17px;
}

.glass {
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px) saturate(145%);
  -webkit-backdrop-filter: blur(28px) saturate(145%);
  transition: border-color 240ms ease, box-shadow 240ms ease, transform 240ms cubic-bezier(.2, .8, .2, 1);
}

.motion-enhanced .reveal-once {
  opacity: 0;
  transform: translateY(14px);
}

.motion-enhanced .reveal-once.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 560ms ease var(--reveal-delay, 0ms), transform 620ms cubic-bezier(.2, .8, .2, 1) var(--reveal-delay, 0ms);
}

.topbar {
  display: grid;
  place-items: center;
  min-height: 76px;
  padding: 18px 24px;
  border-radius: var(--radius);
}

.dashboard-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
}

.dashboard-logo {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, .94);
  border-radius: 12px;
  background: rgba(255, 255, 255, .64);
  box-shadow: 0 8px 22px rgba(44, 85, 118, .1);
  cursor: default;
}

.dashboard-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-capture-button {
  display: inline-grid;
  place-items: center;
  padding: 4px 12px;
  border: 0;
  border-radius: 12px;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: inherit;
}

.brand-capture-button:hover,
.brand-capture-button:focus-visible {
  color: var(--blue);
  background: rgba(22, 119, 255, .07);
  outline: none;
}

.brand-capture-button[aria-busy="true"] {
  cursor: wait;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 760;
}

.month-status {
  display: grid;
  grid-template-columns: minmax(280px, 2.055fr) repeat(3, minmax(150px, 1fr));
  align-items: center;
  margin-top: 22px;
  padding: 20px 24px;
  border-radius: var(--radius);
}

.countdown-main {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-width: 0;
  padding: 0 28px;
  text-align: center;
}

.small-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.countdown-value {
  display: block;
  margin-top: 6px;
  color: var(--blue);
  font-size: 34px;
  font-weight: 760;
  white-space: nowrap;
}

.month-stat {
  min-width: 0;
  padding: 3px 24px;
  border-left: 1px solid var(--line);
  text-align: center;
}

.month-stat strong {
  display: block;
  margin-top: 7px;
  font-size: 19px;
  font-weight: 740;
  white-space: nowrap;
}

.overview {
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(520px, 1.45fr);
  gap: 26px;
  margin-top: 22px;
  padding: 28px;
  border-radius: var(--radius);
}

.overview-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.team-ring {
  --progress: 0deg;
  position: relative;
  display: grid;
  place-items: center;
  width: 148px;
  flex: 0 0 148px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--blue) var(--progress), rgba(22, 119, 255, 0.1) 0);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75), 0 14px 30px rgba(22, 119, 255, 0.13);
  transition: --progress 760ms cubic-bezier(.2, .8, .2, 1), box-shadow 240ms ease;
}

.team-ring::before {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  background: rgba(250, 254, 255, 0.94);
}

.ring-copy {
  position: relative;
  z-index: 1;
  text-align: center;
}

.ring-copy strong {
  display: block;
  font-size: 30px;
  line-height: 1;
}

.ring-copy span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.overview-copy h2 {
  margin-bottom: 0;
  font-size: 17px;
}

.team-sales-value {
  display: block;
  margin-top: 9px;
  font-size: 54px;
  line-height: 1;
  font-weight: 760;
  white-space: nowrap;
}

.overview-copy p {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.overview-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-left: 1px solid var(--line);
}

.summary-metric {
  --metric-color: var(--blue);
  --metric-soft: var(--blue-soft);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 6px 28px;
  border-right: 1px solid var(--line);
  text-align: center;
}

.summary-metric:last-child {
  border-right: 0;
}

.metric-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.metric-kicker::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--metric-color);
  box-shadow: 0 0 0 5px var(--metric-soft);
}

.summary-value {
  margin-top: 16px;
  font-size: 28px;
  font-weight: 760;
}

.summary-detail,
.summary-remaining {
  margin-top: 5px;
  font-size: 12px;
}

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

.summary-remaining {
  font-weight: 700;
}

.mini-track,
.progress-track,
.ranking-track,
.operations-total-track {
  overflow: hidden;
  border-radius: 999px;
  background: var(--metric-soft, var(--blue-soft));
}

.mini-track {
  height: 6px;
  margin-top: 12px;
}

.mini-fill,
.progress-fill,
.ranking-fill,
.operations-total-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--metric-color, var(--blue));
  transition: width 680ms cubic-bezier(.2, .8, .2, 1);
}

.mini-fill,
.ranking-fill,
.operations-total-fill {
  position: relative;
  overflow: hidden;
}

.mini-fill::after,
.ranking-fill::after,
.operations-total-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,.72) 46%, transparent 74%);
  transform: translateX(-115%);
  animation: progress-flow 2.2s linear infinite;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 20px;
  margin: 30px 2px 14px;
  text-align: center;
}

.section-heading h2,
.panel-header h2 {
  margin-bottom: 0;
  font-size: 22px;
  font-weight: 740;
}

.section-heading p,
.panel-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.sales-grid,
.operations-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 20px;
}

.member-card,
.operation-card {
  position: relative;
  min-width: 0;
  height: 100%;
  padding: 22px;
  border-radius: var(--radius);
  isolation: isolate;
}

.interactive-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(360px circle at var(--pointer-x, 50%) var(--pointer-y, 25%), rgba(255, 255, 255, .62), transparent 48%);
  transition: opacity 240ms ease;
}

.member-layout,
.operation-layout {
  position: relative;
  z-index: 1;
}

@media (hover: hover) and (pointer: fine) {
  .interactive-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 1);
    box-shadow: 0 24px 58px rgba(40, 83, 108, .16), inset 0 1px 0 rgba(255, 255, 255, .96);
  }

  .interactive-card:hover::after {
    opacity: .72;
  }

  .ranking-row:hover {
    background: rgba(255, 255, 255, .24);
  }
}

@media (hover: none), (pointer: coarse) {
  .interactive-card:active {
    transform: scale(.995);
    border-color: rgba(22, 119, 255, .18);
  }
}

.member-layout,
.operation-layout {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 22px;
  height: 100%;
}

.portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 22px;
  background: var(--page-deep);
  box-shadow: 0 12px 28px rgba(24, 64, 88, 0.13), inset 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}

.person-name {
  margin: 14px 0 0;
  font-size: 23px;
  line-height: 1.1;
}

.person-role {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.goal-note {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.goal-note span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.goal-note strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.metric-list,
.operation-metric-list {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.member-card.sales-only .metric-list,
.operation-card.single-metric .operation-metric-list {
  align-self: center;
}

.metric {
  --metric-color: var(--blue);
  --metric-soft: var(--blue-soft);
  min-width: 0;
  border-radius: 12px;
}

.is-data-updated {
  animation: data-update-flash 920ms ease-out;
}

@keyframes data-update-flash {
  0% { box-shadow: 0 0 0 0 rgba(22, 119, 255, .24); background-color: rgba(22, 119, 255, .12); }
  48% { box-shadow: 0 0 0 7px rgba(22, 119, 255, 0); background-color: rgba(22, 119, 255, .06); }
  100% { box-shadow: 0 0 0 0 rgba(22, 119, 255, 0); background-color: transparent; }
}

.metric.teal {
  --metric-color: var(--teal);
  --metric-soft: var(--teal-soft);
}

.metric.gold {
  --metric-color: var(--gold);
  --metric-soft: var(--gold-soft);
}

.metric.green {
  --metric-color: var(--green);
  --metric-soft: rgba(21, 148, 97, 0.13);
}

.metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.metric-title strong {
  display: block;
  font-size: 13px;
}

.metric-title span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.auto-total {
  min-width: 128px;
  text-align: right;
}

.auto-total strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.08;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.progress-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 9px;
}

.progress-track {
  --marker-progress: 0%;
  position: relative;
  flex: 1;
  min-width: 0;
  height: 14px;
  overflow: visible;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.58);
}

.progress-fill {
  position: relative;
  overflow: hidden;
  box-shadow: 0 5px 12px rgba(22, 119, 255, .16);
}

.progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,.75) 45%, transparent 72%);
  transform: translateX(-115%);
  animation: progress-flow 2.05s linear infinite;
}

.week-marks {
  position: absolute;
  inset: -3px 0;
  pointer-events: none;
}

.week-marks span {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  border-radius: 999px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 0 0 1px rgba(96,132,158,.1);
}

.progress-runner {
  position: absolute;
  left: clamp(18px, var(--marker-progress), calc(100% - 18px));
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,.95);
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(222,246,255,.94));
  box-shadow: 0 10px 24px rgba(29,78,110,.22), 0 0 0 3px rgba(255,255,255,.42);
  line-height: 1;
  transform: translate(-50%, -50%);
  transition: left 680ms cubic-bezier(.2, .8, .2, 1), transform 220ms ease;
}

.progress-runner svg {
  display: block;
  width: 30px;
  height: 30px;
  overflow: visible;
}

.metric.is-incomplete .progress-runner {
  animation: runner-step 1.9s ease-in-out infinite;
}

.gsap-ready .metric.is-incomplete .progress-runner,
.gsap-ready .metric.is-complete .progress-runner {
  animation: none;
  will-change: transform, filter;
}

.metric.is-complete .progress-runner {
  color: #b67b00;
  background: linear-gradient(135deg, #fff5c4, #ffffff);
  box-shadow: 0 11px 26px rgba(199,136,14,.24), 0 0 0 3px rgba(255,243,177,.45);
}

.runner-turtle {
  background: linear-gradient(145deg, #f8fffb, #dff7ff);
  box-shadow: 0 11px 25px rgba(30,128,86,.2), 0 0 0 3px rgba(226,247,255,.62);
}

.runner-snail {
  background: linear-gradient(145deg, #fffaf4, #e9f8ff);
  box-shadow: 0 11px 25px rgba(146, 107, 51, .2), 0 0 0 3px rgba(255, 242, 218, .72);
}

.runner-caterpillar {
  background: linear-gradient(145deg, #f8fff1, #ddf9ff);
  box-shadow: 0 11px 25px rgba(71, 139, 44, .2), 0 0 0 3px rgba(232, 255, 220, .7);
}

.runner-sloth {
  background: linear-gradient(145deg, #fff7ee, #e7f7ff);
  box-shadow: 0 11px 25px rgba(119, 80, 45, .2), 0 0 0 3px rgba(255, 237, 214, .66);
}

.snail-shadow,
.caterpillar-shadow {
  fill: rgba(73, 91, 98, .13);
}

.snail-foot {
  fill: none;
  stroke: #9c7a45;
  stroke-width: 4;
  stroke-linecap: round;
}

.snail-shell {
  fill: #d79b4d;
  stroke: #8c5d24;
  stroke-width: 2.2;
}

.snail-spiral {
  fill: none;
  stroke: #fff0cf;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.snail-neck,
.snail-eye-stem {
  fill: none;
  stroke: #b78342;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.snail-head {
  fill: #d7ad6a;
  stroke: #8c5d24;
  stroke-width: 1.9;
}

.snail-eye {
  fill: #173642;
}

.caterpillar-segment {
  fill: #8bcf51;
  stroke: #3d852a;
  stroke-width: 1.7;
}

.caterpillar-segment.seg-2,
.caterpillar-segment.seg-4 {
  fill: #74bd43;
}

.caterpillar-eye {
  fill: #173642;
}

.caterpillar-smile,
.caterpillar-feelers {
  fill: none;
  stroke: #2f6f25;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.sloth-shadow {
  fill: rgba(92, 70, 56, .15);
}

.sloth-body {
  fill: #b28663;
  stroke: #704d34;
  stroke-width: 2.1;
}

.sloth-face {
  fill: #efd8bd;
  stroke: #704d34;
  stroke-width: 1.8;
}

.sloth-mask {
  fill: #8a6043;
  opacity: .9;
}

.sloth-eye {
  fill: #172e36;
}

.sloth-nose,
.sloth-arm {
  fill: none;
  stroke: #704d34;
  stroke-width: 2.3;
  stroke-linecap: round;
}

.sloth-arm {
  stroke: #8d6848;
  stroke-width: 3.3;
}

.turtle-shadow {
  fill: rgba(54, 84, 95, .14);
}

.turtle-shell {
  fill: #55bd82;
  stroke: #1f7f56;
  stroke-width: 2.2;
}

.turtle-shell-line {
  fill: none;
  stroke: rgba(14, 92, 61, .48);
  stroke-width: 1.4;
  stroke-linecap: round;
}

.turtle-head {
  fill: #78d39b;
  stroke: #1f7f56;
  stroke-width: 1.9;
}

.turtle-eye {
  fill: #12352b;
}

.turtle-leg {
  fill: none;
  stroke: #2f9a68;
  stroke-width: 3.4;
  stroke-linecap: round;
}

.runner-trophy svg {
  filter: drop-shadow(0 3px 5px rgba(151, 96, 10, .18));
}

.trophy-glow {
  fill: #fff4b8;
  opacity: .64;
}

.trophy-cup {
  fill: #f6bd28;
  stroke: #a86600;
  stroke-width: 2.3;
}

.trophy-side,
.trophy-stem,
.trophy-base {
  fill: none;
  stroke: #a86600;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.progress-percent {
  flex: 0 0 56px;
  color: var(--metric-color);
  text-align: right;
  font-size: 14px;
  font-weight: 760;
}

.remaining-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.remaining-line strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.metric.open-ended .remaining-line,
.metric.open-ended .progress-percent {
  display: none;
}

.metric.open-ended .progress-fill {
  width: 34%;
  background: linear-gradient(90deg, rgba(22, 119, 255, 0.16), var(--blue), rgba(22, 119, 255, 0.16));
  animation: open-progress 2.5s ease-in-out infinite;
  transition: none;
}

@keyframes progress-flow {
  0% { transform: translateX(-115%); }
  100% { transform: translateX(115%); }
}

@keyframes runner-step {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-3px); }
}

@keyframes open-progress {
  0% { transform: translateX(-115%); }
  50% { transform: translateX(115%); }
  100% { transform: translateX(300%); }
}

.ranking-panel {
  margin-top: 20px;
  padding: 26px 28px;
  border-radius: var(--radius);
}

.panel-header {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.ranking-panel .panel-header {
  text-align: center;
}

.ranking-list {
  display: grid;
}

.ranking-row {
  display: grid;
  grid-template-columns: 42px minmax(170px, .72fr) minmax(240px, 1.28fr) minmax(140px, .55fr);
  align-items: center;
  gap: 18px;
  min-height: 88px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--line);
  border-radius: 12px;
  transition: background-color 180ms ease, transform 220ms cubic-bezier(.2, .8, .2, 1);
}

.ranking-row.rank-shifted {
  animation: rank-settle 520ms cubic-bezier(.2, .8, .2, 1);
}

@keyframes rank-settle {
  from { opacity: .55; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.rank-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 14px;
  font-weight: 760;
}

.ranking-person {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ranking-avatar {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  object-fit: cover;
}

.ranking-person strong,
.ranking-person span {
  display: block;
}

.ranking-person span,
.ranking-progress-copy {
  color: var(--muted);
  font-size: 11px;
}

.ranking-progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.ranking-track {
  height: 10px;
}

.ranking-amount {
  text-align: right;
}

.ranking-amount strong {
  display: block;
  font-size: 17px;
}

.ranking-amount span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.daily-panel {
  margin-top: 20px;
  padding: 26px 28px 28px;
  border-radius: var(--radius);
}

.daily-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

[aria-labelledby="operationDailyTitle"] .daily-header {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.daily-header h2 {
  margin-bottom: 0;
  font-size: 22px;
}

.daily-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

[aria-labelledby="salesDailyTitle"] .daily-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
}

[aria-labelledby="salesDailyTitle"] .daily-header::before {
  content: "";
}

[aria-labelledby="salesDailyTitle"] .daily-header > div:first-child {
  grid-column: 2;
  text-align: center;
}

[aria-labelledby="salesDailyTitle"] .daily-tabs {
  grid-column: 3;
  justify-self: end;
}

.daily-tabs {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .54);
}

.daily-tab {
  min-height: 36px;
  padding: 0 13px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  transition: color 180ms ease, background-color 180ms ease, box-shadow 180ms ease, transform 160ms ease;
}

.daily-tab:active {
  transform: scale(.97);
}

.daily-tab[aria-pressed="true"] {
  color: white;
  background: var(--blue);
  box-shadow: 0 6px 16px rgba(22, 119, 255, .2);
}

.daily-table-wrap {
  width: 100%;
  margin-top: 18px;
  overflow-x: auto;
  border-radius: 16px;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
}

.daily-table {
  width: 100%;
  min-width: 780px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.operation-daily-table {
  min-width: 1080px;
}

.daily-table th,
.daily-table td {
  height: 42px;
  padding: 8px 7px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-size: 12px;
}

.daily-table th:first-child,
.daily-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  border-left: 1px solid var(--line);
}

.daily-table thead th {
  color: var(--ink);
  background: rgba(237, 248, 253, .96);
  font-weight: 720;
}

.daily-table thead th:first-child {
  z-index: 3;
}

.daily-table .group-header {
  color: var(--blue);
  background: rgba(226, 242, 252, .92);
}

.daily-table tbody td {
  background: rgba(255, 255, 255, .44);
  font-weight: 680;
}

.daily-date-cell {
  width: 104px;
  color: var(--muted);
  background: rgba(247, 252, 255, .98) !important;
  white-space: nowrap;
}

.daily-table tbody tr.is-today td {
  background: rgba(22, 119, 255, .07);
  box-shadow: inset 0 1px 0 rgba(22, 119, 255, .08), inset 0 -1px 0 rgba(22, 119, 255, .08);
}

.daily-table tbody tr.is-today .daily-date-cell {
  color: var(--blue);
  background: rgba(231, 244, 255, .98) !important;
  font-weight: 760;
  box-shadow: inset 3px 0 0 rgba(22, 119, 255, .72);
}

.daily-table tbody tr.is-future td {
  opacity: .48;
}

.daily-empty {
  color: #9eafb9;
  font-weight: 500;
}

.daily-table tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 2;
  color: var(--ink);
  background: rgba(231, 246, 252, .98);
  font-weight: 760;
}

.daily-table tfoot td:first-child {
  z-index: 3;
}

.rewards-panel {
  margin-top: 20px;
  padding: 26px 28px 28px;
  border-radius: var(--radius);
}

.rewards-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.rewards-header > div:first-child {
  grid-column: 2;
  text-align: center;
}

.rewards-header h2 {
  margin: 0;
  font-size: 22px;
}

.rewards-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.rewards-total {
  grid-column: 3;
  justify-self: end;
  text-align: right;
}

.rewards-total span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.rewards-total strong {
  display: block;
  margin-top: 4px;
  color: #0d8c76;
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}

.reward-member-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.reward-member-summary {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 18px 20px;
  border-right: 1px solid var(--line);
}

.reward-member-summary:last-child {
  border-right: 0;
}

.reward-member-avatar {
  width: 46px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 7px 18px rgba(39, 89, 119, .1);
}

.reward-member-copy {
  min-width: 0;
}

.reward-member-copy strong,
.reward-member-copy span {
  display: block;
}

.reward-member-copy strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reward-member-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.reward-member-total {
  color: #0d8c76;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.reward-member-breakdown {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 7px 13px;
  min-height: 18px;
  padding-top: 2px;
}

.reward-breakdown-item {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}

.reward-breakdown-item strong {
  color: var(--ink);
}

.reward-breakdown-item span {
  color: #0d8c76;
  font-weight: 750;
}

.reward-breakdown-empty {
  color: #9aabb5;
  font-size: 11px;
}

.reward-pending-band {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 20px;
  margin: 18px 0 0;
  padding: 15px 18px;
  border-top: 1px solid rgba(224, 143, 17, .2);
  border-bottom: 1px solid rgba(224, 143, 17, .2);
  background: rgba(255, 247, 228, .5);
}

.reward-pending-title strong,
.reward-pending-title span {
  display: block;
}

.reward-pending-title strong {
  color: #a56600;
  font-size: 13px;
}

.reward-pending-title span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.reward-pending-list {
  display: grid;
  gap: 8px;
}

.reward-pending-item {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  font-size: 11px;
}

.reward-pending-item > span {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reward-pending-item b {
  color: #a56600;
  font-size: 13px;
}

.reward-ledger {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.reward-ledger-row {
  display: grid;
  grid-template-columns: 90px 90px 130px minmax(200px, 1fr) 90px;
  align-items: center;
  min-height: 42px;
  border-bottom: 1px solid var(--line);
}

.reward-ledger-row:last-of-type {
  border-bottom: 0;
}

.reward-ledger-row > * {
  min-width: 0;
  padding: 8px 12px;
  font-size: 11px;
}

.reward-ledger-head {
  min-height: 36px;
  color: var(--muted);
  background: rgba(235, 247, 253, .76);
  font-weight: 720;
}

.reward-ledger-detail {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reward-ledger-amount {
  color: #0d8c76;
  text-align: right;
}

.reward-ledger-more {
  margin: 0;
  padding: 10px 12px;
  color: var(--muted);
  background: rgba(248, 252, 254, .7);
  font-size: 10px;
  text-align: center;
}

.reward-empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 26px 20px 10px;
  text-align: center;
}

.reward-empty strong {
  font-size: 14px;
}

.reward-empty span {
  max-width: 620px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.reward-rule-list {
  margin-top: 23px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.reward-rule-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.reward-rule-heading h3 {
  margin: 0;
  font-size: 16px;
}

.reward-rule-heading p,
.reward-rule-heading > span {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.reward-tier-scroll {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
}

.reward-tier-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  min-width: 760px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.reward-tier-item {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 14px 10px;
  border-right: 1px solid var(--line);
  text-align: center;
}

.reward-tier-item:last-child {
  border-right: 0;
}

.reward-tier-item span {
  color: var(--muted);
  font-size: 10px;
}

.reward-tier-item strong {
  font-size: 12px;
}

.reward-tier-item b {
  color: #0d8c76;
  font-size: 14px;
}

.reward-auto-rule-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.reward-auto-rule {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 5px 9px;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}

.reward-auto-rule:last-child {
  border-right: 0;
}

.reward-auto-rule > span {
  grid-row: 1 / span 2;
  color: var(--blue);
  font-size: 10px;
  font-weight: 750;
}

.reward-auto-rule strong {
  font-size: 12px;
}

.reward-auto-rule p {
  grid-column: 2 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.reward-auto-rule b {
  color: #0d8c76;
  font-size: 12px;
  text-align: right;
}

.reward-manual-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
  text-align: center;
}

.reward-manual-note strong {
  color: var(--ink);
}

.operations-summary {
  display: grid;
  grid-template-columns: minmax(220px, .75fr) minmax(300px, 1.35fr) auto;
  align-items: center;
  gap: 30px;
  margin-bottom: 20px;
  padding: 24px 28px;
  border-radius: var(--radius);
}

.operations-summary-value {
  display: block;
  margin-top: 7px;
  font-size: 28px;
}

.operations-summary-value small {
  color: var(--muted);
  font-size: 13px;
}

.progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.operations-total-track {
  height: 11px;
  background: var(--teal-soft);
}

.operations-total-fill {
  background: var(--teal);
}

.operations-summary-percent {
  min-width: 86px;
  color: var(--teal);
  text-align: right;
  font-size: 28px;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 4px 0;
  color: var(--muted);
  font-size: 12px;
}

.live-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.live-state i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(21, 148, 97, 0.12);
}

.page-error {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 420px;
  padding: 14px 16px;
  border: 1px solid rgba(207, 74, 74, .2);
  border-radius: 14px;
  color: #8d3030;
  background: rgba(255, 245, 245, .96);
  box-shadow: var(--shadow);
  font-size: 13px;
}

.report-status {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  max-width: min(420px, calc(100% - 40px));
  padding: 13px 16px;
  border: 1px solid rgba(21, 148, 97, .2);
  border-radius: 14px;
  color: #126442;
  background: rgba(242, 255, 249, .97);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 700;
  animation: status-enter 240ms cubic-bezier(.2, .8, .2, 1);
}

@keyframes status-enter {
  from { opacity: 0; transform: translateY(7px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.report-status[data-tone="working"] {
  color: #145ba8;
  border-color: rgba(22, 119, 255, .2);
  background: rgba(242, 248, 255, .97);
}

.report-status[data-tone="error"] {
  color: #8d3030;
  border-color: rgba(207, 74, 74, .2);
  background: rgba(255, 245, 245, .97);
}

.report-export .brand-capture-button {
  color: var(--ink) !important;
  background: transparent !important;
}

.report-export #salesBattleReport .glass {
  background: rgba(255, 255, 255, .9);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.capture-stable *,
.capture-stable *::before,
.capture-stable *::after,
.report-export *,
.report-export *::before,
.report-export *::after {
  animation-play-state: paused !important;
  transition: none !important;
}

.report-export .reveal-once,
.capture-stable .reveal-once {
  opacity: 1 !important;
  transform: none !important;
}

.report-export .metric.open-ended .progress-fill,
.capture-stable .metric.open-ended .progress-fill {
  transform: translateX(96%) !important;
}

.report-export .progress-fill::after,
.report-export .mini-fill::after,
.report-export .ranking-fill::after,
.report-export .operations-total-fill::after,
.report-export .progress-runner,
.capture-stable .progress-fill::after,
.capture-stable .mini-fill::after,
.capture-stable .ranking-fill::after,
.capture-stable .operations-total-fill::after,
.capture-stable .progress-runner {
  animation: none !important;
  transform: translate(-50%, -50%) !important;
}

@media (prefers-reduced-motion: reduce) {
  .progress-fill::after,
  .mini-fill::after,
  .ranking-fill::after,
  .operations-total-fill::after,
  .progress-runner {
    animation: none !important;
  }
}

/* Admin */
.admin-shell {
  width: min(1560px, calc(100% - 40px));
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  border-radius: 22px;
}

.admin-brand h1 {
  font-size: 24px;
}

.admin-brand p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, .92);
  border-radius: 15px;
  background: rgba(245, 251, 254, .72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .86), 0 7px 20px rgba(36, 76, 101, .055);
}

.admin-link,
.primary-btn,
.secondary-btn,
.nav-btn {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid rgba(66, 106, 131, .15);
  border-radius: 11px;
  color: var(--ink);
  background: rgba(255, 255, 255, .68);
  font-weight: 700;
  text-decoration: none;
}

.primary-btn {
  border-color: transparent;
  color: white;
  background: var(--blue);
}

@media (hover: hover) and (pointer: fine) {
  .admin-link:hover,
  .secondary-btn:hover {
    border-color: rgba(22, 119, 255, .22);
    background: rgba(255, 255, 255, .88);
    transform: translateY(-1px);
  }

  .primary-btn:hover {
    background: #0d6ff5;
    box-shadow: 0 9px 22px rgba(22, 119, 255, .24);
    transform: translateY(-1px);
  }
}

.primary-btn:active,
.secondary-btn:active,
.admin-link:active,
.nav-btn:active,
.segment-btn:active {
  transform: scale(.975);
}

.primary-btn:disabled {
  opacity: .55;
  cursor: default;
}

.primary-btn.is-loading {
  position: relative;
  color: rgba(255, 255, 255, .72);
}

.primary-btn.is-loading::after {
  content: "";
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-left: 8px;
  border: 2px solid rgba(255, 255, 255, .38);
  border-top-color: white;
  border-radius: 50%;
  vertical-align: -2px;
  animation: button-spin 720ms linear infinite;
}

@keyframes button-spin {
  to { transform: rotate(360deg); }
}

.primary-btn.save-error {
  animation: button-error 360ms ease;
}

@keyframes button-error {
  0%, 100% { transform: translateX(0); }
  35% { transform: translateX(-3px); }
  70% { transform: translateX(3px); }
}

.admin-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: auto;
  min-height: 36px;
  padding: 0 10px 0 8px;
  border-right: 1px solid rgba(66, 106, 131, .12);
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
  white-space: nowrap;
}

.admin-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(21, 148, 97, .09);
}

.admin-action-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 13px;
  letter-spacing: 0;
  white-space: nowrap;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease, transform 160ms ease;
}

.admin-action svg,
.admin-logout svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.admin-action--quotes {
  border-color: transparent;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 7px 17px rgba(22, 119, 255, .18);
}

.admin-action--display {
  border-color: rgba(66, 106, 131, .13);
  color: #24475d;
  background: rgba(255, 255, 255, .78);
}

.admin-action--report {
  color: #087e79;
  border-color: rgba(25, 151, 143, .24);
  background: rgba(226, 250, 247, .76);
}

.admin-logout {
  display: grid;
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  place-items: center;
  border-color: transparent;
  color: #718895;
  background: transparent;
}

.admin-action:focus-visible,
.admin-logout:focus-visible {
  outline: 3px solid rgba(22, 119, 255, .22);
  outline-offset: 2px;
}

.admin-status[data-tone="pending"] {
  color: var(--gold);
}

.admin-status[data-tone="pending"]::before {
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(224, 143, 17, .09);
}

.admin-status[data-tone="success"] {
  color: var(--green);
}

.admin-status[data-tone="error"] {
  color: var(--danger);
}

.admin-status[data-tone="error"]::before {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(207, 74, 74, .09);
}

@media (hover: hover) and (pointer: fine) {
  .admin-action--quotes:hover {
    border-color: transparent;
    color: #fff;
    background: #0d6ff5;
    box-shadow: 0 10px 24px rgba(22, 119, 255, .24);
  }

  .admin-action--display:hover {
    border-color: rgba(22, 119, 255, .22);
    color: #145ba8;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 8px 18px rgba(39, 89, 119, .08);
  }

  .admin-logout:hover {
    border-color: rgba(207, 74, 74, .11);
    color: var(--danger);
    background: rgba(255, 245, 245, .76);
  }
}

.admin-status.status-pulse {
  animation: status-pulse 360ms ease-out;
}

@keyframes status-pulse {
  from { opacity: .48; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}

.member-admin-header {
  margin-bottom: 0;
}

.member-admin-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: end;
  gap: 22px;
  margin: 20px 0 8px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.member-brand-field {
  display: grid;
  gap: 7px;
  max-width: 460px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.member-admin-stats {
  display: flex;
  align-items: center;
  min-height: 40px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.member-admin-stats span {
  min-width: 126px;
  padding: 0 18px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.member-admin-stats span + span {
  border-left: 1px solid var(--line);
}

.member-admin-stats strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.member-add-actions {
  display: flex;
  gap: 8px;
}

.member-add-btn,
.text-command {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
}

.member-add-btn svg,
.text-command svg,
.icon-btn svg,
.member-photo-editor button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.member-admin-group {
  margin-top: 30px;
}

.member-admin-group + .member-admin-group {
  margin-top: 36px;
}

.member-admin-group-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
}

.member-admin-group-header h3 {
  margin: 0;
  font-size: 17px;
}

.member-admin-group-header p,
.member-admin-group-header > span {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.member-admin-list {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.member-editor-row {
  position: relative;
  display: grid;
  grid-template-columns: 240px minmax(300px, 1fr) minmax(330px, 1.15fr) auto;
  align-items: center;
  gap: 18px;
  min-width: 0;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
  transition: opacity 180ms ease, background-color 180ms ease;
}

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

.member-editor-row.is-inactive {
  opacity: .58;
  background: rgba(232, 240, 244, .22);
}

.member-editor-row.is-uploading::after {
  content: "照片上传中";
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  color: #145ba8;
  background: rgba(241, 249, 253, .86);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 760;
}

.member-editor-identity {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.member-photo-editor {
  position: relative;
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
}

.member-photo-editor img {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, .94);
  border-radius: 14px;
  object-fit: cover;
  background: rgba(231, 245, 252, .9);
  box-shadow: 0 7px 17px rgba(39, 89, 119, .1);
}

.member-photo-editor button {
  position: absolute;
  right: -5px;
  bottom: -5px;
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 2px solid rgba(250, 253, 255, .96);
  border-radius: 9px;
  color: white;
  background: var(--blue);
  box-shadow: 0 5px 12px rgba(22, 119, 255, .2);
}

.member-editor-title {
  min-width: 0;
}

.member-editor-title strong,
.member-editor-title span,
.member-state {
  display: block;
}

.member-editor-title strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-editor-title span {
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-state {
  width: fit-content;
  margin-top: 6px;
  color: #137052;
  font-size: 10px;
  font-weight: 760;
}

.member-state.inactive {
  color: var(--muted);
}

.member-editor-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.member-editor-fields label,
.metric-editor-row > label:not(.switch) {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.member-editor-fields label > span,
.metric-editor-row label > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.member-editor-switches {
  display: flex;
  align-items: center;
  align-content: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  min-width: 0;
}

.member-editor-actions,
.metric-editor-actions {
  display: grid;
  grid-auto-flow: column;
  gap: 4px;
}

.icon-btn {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(66, 106, 131, .12);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, .6);
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, transform 150ms ease;
}

.icon-btn:disabled {
  opacity: .3;
  cursor: default;
}

.icon-btn.danger {
  color: #a54a4a;
}

@media (hover: hover) and (pointer: fine) {
  .icon-btn:not(:disabled):hover {
    border-color: rgba(22, 119, 255, .2);
    color: var(--blue);
    background: rgba(244, 250, 255, .96);
    transform: translateY(-1px);
  }

  .icon-btn.danger:not(:disabled):hover {
    border-color: rgba(207, 74, 74, .18);
    color: var(--danger);
    background: rgba(255, 245, 245, .9);
  }
}

.operation-member-editor {
  padding-bottom: 20px;
}

.operation-metric-editor {
  grid-column: 1 / -1;
  margin-top: 2px;
  padding: 16px 0 0 77px;
  border-top: 1px dashed rgba(66, 106, 131, .15);
}

.operation-metric-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.operation-metric-heading strong,
.operation-metric-heading span {
  display: block;
}

.operation-metric-heading strong {
  font-size: 12px;
}

.operation-metric-heading span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.text-command {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  color: var(--blue);
  background: rgba(22, 119, 255, .07);
  font-size: 11px;
  font-weight: 750;
}

.metric-editor-list {
  border-top: 1px solid var(--line);
}

.metric-editor-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) minmax(120px, .55fr) 130px auto auto;
  align-items: end;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.metric-editor-row.is-inactive {
  opacity: .5;
}

.metric-active-switch {
  min-height: 38px;
}

.member-empty-state,
.operation-empty-metrics {
  margin: 0;
  padding: 18px 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.operation-empty-metrics {
  align-self: center;
}

.admin-nav {
  display: flex;
  gap: 6px;
  margin: 18px 0;
  padding: 5px;
  border-radius: 15px;
  background: rgba(255, 255, 255, .58);
  border: 1px solid rgba(255, 255, 255, .9);
}

.nav-btn {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  transition: color 180ms ease, background-color 180ms ease, box-shadow 180ms ease, transform 160ms ease;
}

.nav-btn[aria-selected="true"] {
  color: white;
  background: var(--blue);
  box-shadow: 0 7px 18px rgba(22, 119, 255, .2);
}

.admin-panel {
  padding: 24px;
  border-radius: 22px;
}

.admin-panel + .admin-panel {
  margin-top: 18px;
}

.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.admin-section-header h2 {
  margin-bottom: 0;
  font-size: 20px;
}

.admin-section-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 14px;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
}

.settings-table,
.edit-table {
  width: 100%;
  min-width: 900px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.settings-table th,
.settings-table td,
.edit-table th,
.edit-table td {
  padding: 9px 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.settings-table th:first-child,
.settings-table td:first-child,
.edit-table th:first-child,
.edit-table td:first-child {
  border-left: 1px solid var(--line);
}

.settings-table thead th,
.edit-table thead th {
  border-top: 1px solid var(--line);
  color: var(--ink);
  background: rgba(231, 245, 252, .86);
  font-size: 12px;
}

.settings-table tbody td,
.edit-table tbody td,
.edit-table tfoot td {
  background: rgba(255, 255, 255, .44);
}

.edit-table tbody tr.today td {
  background: rgba(22, 119, 255, .065);
}

.edit-table tbody tr.today td:first-child {
  color: var(--blue);
  box-shadow: inset 3px 0 0 rgba(22, 119, 255, .72);
  font-weight: 760;
}

@media (hover: hover) and (pointer: fine) {
  .settings-table tbody tr:hover td,
  .edit-table tbody tr:not(.future):hover td {
    background: rgba(255, 255, 255, .68);
  }
}

.edit-table tbody tr.future td {
  opacity: .5;
}

.form-input,
.table-input,
.month-input,
.password-input {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(66, 106, 131, .16);
  border-radius: 9px;
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 255, .76);
}

.form-input:focus,
.table-input:focus,
.month-input:focus,
.password-input:focus {
  border-color: rgba(22, 119, 255, .5);
  box-shadow: 0 0 0 4px rgba(22, 119, 255, .1), 0 8px 18px rgba(40, 83, 108, .08);
  transform: translateY(-1px);
}

.form-input.is-dirty,
.table-input.is-dirty,
.month-input.is-dirty,
.password-input.is-dirty {
  border-color: rgba(221, 147, 29, .48);
  background: rgba(255, 251, 240, .88);
}

.form-input.is-saved,
.table-input.is-saved,
.month-input.is-saved,
.password-input.is-saved {
  animation: input-saved 760ms ease-out;
}

@keyframes input-saved {
  0% { border-color: rgba(21, 148, 97, .72); box-shadow: 0 0 0 4px rgba(21, 148, 97, .13); }
  100% { border-color: rgba(66, 106, 131, .16); box-shadow: none; }
}

.password-input.input-error {
  border-color: rgba(207, 74, 74, .58);
  box-shadow: 0 0 0 4px rgba(207, 74, 74, .1);
}

.table-input {
  min-width: 92px;
  text-align: right;
}

.table-input:disabled {
  color: var(--muted);
  background: rgba(220, 232, 238, .58);
}

.member-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.member-cell img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

.switch input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(82px, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .54);
}

.segment-btn {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  transition: color 180ms ease, background-color 180ms ease, box-shadow 180ms ease, transform 160ms ease;
}

.segment-btn[aria-pressed="true"] {
  color: white;
  background: var(--blue);
  box-shadow: 0 6px 15px rgba(22, 119, 255, .18);
}

.login-gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(229, 242, 248, .86);
  backdrop-filter: blur(20px);
}

.login-box {
  width: min(420px, 100%);
  padding: 28px;
  border-radius: 24px;
  animation: login-enter 520ms cubic-bezier(.2, .8, .2, 1);
}

.login-logo {
  display: block;
  width: 66px;
  height: 52px;
  margin: 0 auto 15px;
  object-fit: contain;
}

@keyframes login-enter {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-form.login-failed {
  animation: login-failed 360ms ease;
}

@keyframes login-failed {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-4px); }
  65% { transform: translateX(4px); }
}

.login-box h1 {
  font-size: 26px;
}

.login-box p {
  color: var(--muted);
  line-height: 1.6;
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-error {
  min-height: 18px;
  margin: 0;
  color: var(--danger) !important;
  font-size: 12px;
}

@media (max-width: 1080px) {
  .member-admin-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .member-admin-stats {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    justify-content: center;
    border: 0;
  }

  .member-editor-row {
    grid-template-columns: 220px minmax(0, 1fr) auto;
    align-items: start;
  }

  .member-editor-switches {
    grid-column: 2;
  }

  .member-editor-actions {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .operation-metric-editor {
    padding-left: 0;
  }

  .month-status {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 18px;
  }

  .countdown-main {
    grid-column: 1 / -1;
    padding: 0;
  }

  .month-stat:nth-of-type(2) {
    border-left: 0;
  }

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

  .overview-metrics {
    padding-top: 22px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .reward-member-strip,
  .reward-auto-rule-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reward-member-summary:nth-child(even),
  .reward-auto-rule:nth-child(even) {
    border-right: 0;
  }

  .reward-member-summary:nth-child(-n+2),
  .reward-auto-rule:not(:last-child) {
    border-bottom: 1px solid var(--line);
  }

  .reward-auto-rule:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .sales-grid,
  .operations-grid {
    grid-template-columns: 1fr;
  }

  .operation-card {
    min-height: 430px;
  }

  .reward-ledger {
    overflow-x: auto;
  }

  .reward-ledger-row {
    min-width: 720px;
  }

  .admin-topbar,
  .admin-section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .member-admin-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .member-brand-field {
    max-width: none;
  }

  .member-admin-stats,
  .member-add-actions {
    grid-column: 1;
    grid-row: auto;
  }

  .member-add-actions {
    justify-content: flex-end;
  }

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

  .member-editor-fields,
  .member-editor-switches {
    grid-column: 1 / -1;
  }

  .member-editor-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .metric-editor-row {
    grid-template-columns: minmax(200px, 1fr) minmax(120px, .55fr) 130px;
  }

  .metric-active-switch {
    grid-column: 1;
  }

  .metric-editor-actions {
    grid-column: 3;
    grid-row: 2;
    justify-self: end;
  }
}

@media (max-width: 660px) {
  .shell,
  .admin-shell {
    width: min(100% - 24px, 1500px);
    padding-top: 12px;
  }

  .system-switcher {
    justify-content: center;
  }

  .system-switcher a {
    flex: 1;
    justify-content: center;
    min-width: 0;
  }

  .topbar,
  .month-status,
  .overview,
  .member-card,
  .operation-card,
    .ranking-panel,
    .operations-summary,
    .daily-panel,
    .rewards-panel,
    .admin-panel {
    border-radius: 20px;
  }

  h1 {
    font-size: 28px;
  }

  .dashboard-brand {
    gap: 8px;
  }

  .dashboard-logo {
    width: 43px;
    height: 43px;
    border-radius: 10px;
  }

  .month-status {
    grid-template-columns: 1fr;
    padding: 19px;
  }

  .countdown-main {
    padding-bottom: 16px;
  }

  .month-stat,
  .month-stat:nth-of-type(2) {
    padding: 14px 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .overview {
    gap: 23px;
    padding: 21px 18px;
  }

  .overview-primary {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 17px;
  }

  .team-ring {
    width: 112px;
    flex-basis: 112px;
  }

  .team-ring::before {
    inset: 10px;
  }

  .team-sales-value {
    font-size: 30px;
  }

  .overview-metrics {
    grid-template-columns: 1fr;
    padding-top: 8px;
  }

  .summary-metric {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 14px 2px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
  }

  .metric-kicker {
    justify-content: flex-start;
  }

  .summary-metric:last-child {
    border-bottom: 0;
  }

  .summary-value {
    grid-column: 2;
    grid-row: 1 / span 3;
    margin: 0;
    font-size: 22px;
    text-align: right;
  }

  .mini-track {
    grid-column: 1 / -1;
  }

  .member-card,
  .operation-card {
    padding: 17px;
  }

  .operation-card {
    min-height: 588px;
  }

  .member-layout,
  .operation-layout {
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 16px;
  }

  .portrait {
    border-radius: 17px;
  }

  .metric-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .auto-total {
    min-width: 0;
    text-align: left;
  }

  .ranking-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .ranking-progress {
    grid-column: 2 / -1;
  }

  .operations-summary {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px 18px;
  }

  .operations-summary-percent {
    text-align: left;
  }

  .daily-panel {
    padding: 20px 18px;
  }

  .rewards-panel {
    padding: 20px 18px;
  }

  .rewards-header {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 14px;
  }

  .rewards-header > div:first-child,
  .rewards-total {
    grid-column: 1;
    justify-self: stretch;
    text-align: center;
  }

  .rewards-total {
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }

  .reward-member-strip,
  .reward-auto-rule-grid {
    grid-template-columns: 1fr;
  }

  .reward-member-summary,
  .reward-auto-rule,
  .reward-member-summary:nth-child(2),
  .reward-auto-rule:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .reward-member-summary:last-child,
  .reward-auto-rule:last-child {
    border-bottom: 0;
  }

  .reward-pending-band {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .reward-pending-item {
    grid-template-columns: 1fr auto;
  }

  .reward-pending-item > span {
    grid-column: 1 / -1;
    grid-row: 2;
    white-space: normal;
  }

  .reward-rule-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .daily-header {
    align-items: stretch;
    flex-direction: column;
  }

  .daily-tabs {
    width: 100%;
  }

  [aria-labelledby="salesDailyTitle"] .daily-header {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  [aria-labelledby="salesDailyTitle"] .daily-header::before {
    display: none;
  }

  [aria-labelledby="salesDailyTitle"] .daily-header > div:first-child,
  [aria-labelledby="salesDailyTitle"] .daily-tabs {
    grid-column: 1;
    justify-self: stretch;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px;
    align-items: center;
    gap: 6px;
    width: 100%;
  }

  .admin-status {
    grid-column: 1 / -1;
    justify-content: flex-start;
    min-height: 32px;
    padding: 0 8px 5px;
    border-right: 0;
    border-bottom: 1px solid rgba(66, 106, 131, .12);
  }

  .admin-action-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
  }

  .admin-action {
    min-width: 0;
    padding: 0 10px;
    font-size: 12px;
  }

  .admin-logout {
    grid-column: 2;
    grid-row: 2;
  }

  .admin-nav {
    overflow-x: auto;
  }

  .member-admin-toolbar {
    gap: 14px;
    margin-top: 16px;
  }

  .member-admin-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .member-admin-stats span {
    min-width: 0;
    padding: 0 10px;
  }

  .member-add-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .member-add-btn {
    min-width: 0;
    padding: 0 10px;
  }

  .member-admin-group-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .member-editor-row {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px 0;
  }

  .member-editor-actions {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }

  .member-editor-fields {
    grid-template-columns: 1fr;
  }

  .member-editor-switches {
    gap: 10px 15px;
  }

  .operation-metric-heading {
    align-items: flex-start;
  }

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

  .metric-active-switch {
    grid-column: 1;
  }

  .metric-editor-actions {
    grid-column: 2;
    grid-row: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }

  .motion-enhanced .reveal-once {
    opacity: 1 !important;
    transform: none !important;
  }

  .metric.open-ended .progress-fill {
    animation: none;
    transform: translateX(96%);
  }
}

/* Daily table stability patch: prevent table rows from being stretched or visually skipped. */
.daily-panel .daily-table-wrap {
  max-height: min(72vh, 760px);
  overflow: auto;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .38);
}

.daily-panel .daily-table {
  border-collapse: separate;
  border-spacing: 0;
}

.daily-panel .daily-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
}

.daily-panel .daily-table thead th:first-child {
  z-index: 7;
}

.daily-panel .daily-table tbody {
  display: table-row-group !important;
}

.daily-panel .daily-table tbody tr {
  display: table-row !important;
  height: auto !important;
  min-height: 0 !important;
  visibility: visible !important;
}

.daily-panel .daily-table tbody td {
  display: table-cell !important;
  height: 42px !important;
  min-height: 42px !important;
  line-height: 1.25;
  vertical-align: middle;
}

.daily-panel .daily-table tfoot td {
  position: static;
}

@media (max-width: 760px) {
  .daily-panel .daily-table-wrap {
    max-height: min(66vh, 620px);
  }
}

/* Render reliability patch: never keep dashboard sections invisible when observers are delayed inside the workspace. */
.motion-enhanced .reveal-once,
.motion-enhanced .reveal-once.is-visible {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* Horizontal daily timeline: compact date navigation instead of a tall monthly table. */
.daily-panel .daily-table-wrap {
  max-height: none;
  overflow: visible;
  border: 0;
  background: transparent;
}

.daily-timeline {
  overflow-anchor: none;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,.76), rgba(229,245,252,.76));
  box-shadow: 10px 10px 22px rgba(99,163,193,.1), -7px -7px 15px rgba(255,255,255,.76), inset 0 1px 0 rgba(255,255,255,.9);
}
.daily-timeline-nav { display: grid; grid-template-columns: 38px minmax(0, 1fr) 38px; align-items: center; gap: 10px; }
.timeline-arrow { width: 38px; height: 38px; display: grid; place-items: center; color: #2a91c5; border: 1px solid rgba(168,217,240,.72); border-radius: 13px; background: rgba(255,255,255,.72); box-shadow: 3px 3px 8px rgba(91,155,186,.12), inset 1px 1px 0 rgba(255,255,255,.94); font-size: 25px; line-height: 1; transition: .18s ease; }
.timeline-arrow:hover { color: #fff; border-color: transparent; background: linear-gradient(135deg, #5ac2ef, #258fc8); box-shadow: 0 8px 15px rgba(35,145,205,.24); }
.timeline-day-rail { display: flex; gap: 9px; min-width: 0; padding: 4px 2px 10px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-color: #a6d8ed transparent; scrollbar-width: thin; }
.timeline-day-rail::-webkit-scrollbar { height: 6px; }
.timeline-day-rail::-webkit-scrollbar-thumb { border-radius: 999px; background: #b5deef; }
.timeline-day { min-width: 58px; height: 64px; display: grid; flex: 0 0 58px; align-content: center; justify-items: center; gap: 1px; padding: 6px 5px; color: #7293a5; border: 1px solid rgba(181,222,239,.66); border-radius: 15px; background: rgba(248,253,255,.76); scroll-snap-align: center; transition: .18s ease; }
.timeline-day:hover { color: #258fc8; border-color: #a2d8ef; background: #fff; }
.timeline-day span, .timeline-day small { font-size: 10px; line-height: 1; }
.timeline-day strong { color: inherit; font-size: 16px; line-height: 1.15; }
.timeline-day.is-today { box-shadow: inset 0 -2px 0 #74c9ec; }
.timeline-day.is-selected { color: #fff; border-color: transparent; background: linear-gradient(145deg, #5cc4ef, #238dca); box-shadow: 0 7px 14px rgba(42,151,209,.27), inset 0 1px 0 rgba(255,255,255,.3); }
.timeline-selected-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 16px 2px 12px; padding: 0 2px 11px; border-bottom: 1px solid rgba(130,189,217,.22); }
.timeline-selected-label span { color: #7899aa; font-size: 11px; font-weight: 700; }
.timeline-selected-label strong { color: #1d759f; font-size: 15px; }
.timeline-member-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.timeline-member-card, .timeline-operation-card { min-width: 0; padding: 15px 16px; border: 1px solid rgba(255,255,255,.92); border-radius: 18px; background: rgba(255,255,255,.66); box-shadow: 6px 6px 14px rgba(103,164,191,.1), -4px -4px 10px rgba(255,255,255,.62), inset 0 1px 0 rgba(255,255,255,.92); }
.timeline-member-meta { display: grid; gap: 4px; }
.timeline-member-meta span { overflow: hidden; color: #89a1af; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.timeline-member-meta strong { overflow: hidden; color: #24485b; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.timeline-member-value { min-height: 32px; display: flex; align-items: flex-end; margin-top: 11px; }
.timeline-member-value strong { color: #208bc3; font-size: 19px; font-variant-numeric: tabular-nums; }
.timeline-empty { color: #a6bac5; font-size: 18px; }
.timeline-member-hint { display: block; margin-top: 5px; color: #8ca8b6; font-size: 10px; }
.timeline-operation-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.timeline-operation-list { display: grid; gap: 8px; margin-top: 12px; }
.timeline-operation-metric { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 8px; border-top: 1px solid rgba(131,190,217,.17); }
.timeline-operation-metric span { overflow: hidden; color: #6f93a5; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.timeline-operation-metric strong { color: #1c8bc2; font-size: 13px; white-space: nowrap; }
@media (max-width: 660px) {
  .daily-timeline { padding: 14px; border-radius: 18px; }
  .daily-timeline-nav { grid-template-columns: 34px minmax(0, 1fr) 34px; gap: 7px; }
  .timeline-arrow { width: 34px; height: 34px; border-radius: 11px; }
  .timeline-day { min-width: 53px; height: 58px; flex-basis: 53px; border-radius: 13px; }
  .timeline-member-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .timeline-member-card, .timeline-operation-card { padding: 13px; border-radius: 15px; }
  .timeline-member-value strong { font-size: 16px; }
}

/* Single-screen daily sharing board: show all members and all daily indicators at once. */
.daily-share-board {
  margin-top: 16px;
  padding: 16px 18px 18px;
  border: 1px solid rgba(255,255,255,.92);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,.78), rgba(229,245,252,.8));
  box-shadow: 10px 10px 22px rgba(99,163,193,.1), -7px -7px 15px rgba(255,255,255,.76), inset 0 1px 0 rgba(255,255,255,.9);
}
.share-board-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 14px; border-bottom: 1px solid rgba(130,189,217,.2); }
.share-date-control { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.share-date-arrow { width: 34px; height: 34px; display: grid; place-items: center; color: #2a91c5; border: 1px solid rgba(168,217,240,.72); border-radius: 11px; background: rgba(255,255,255,.78); font-size: 22px; line-height: 1; box-shadow: 3px 3px 8px rgba(91,155,186,.12); }
.share-date-arrow:hover { color: #fff; border-color: transparent; background: linear-gradient(135deg,#5ac2ef,#258fc8); }
.share-date-picker { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 4px 10px; color: #7293a5; border: 1px solid rgba(177,221,239,.78); border-radius: 11px; background: rgba(255,255,255,.64); font-size: 11px; font-weight: 700; }
.share-date-picker input { width: 116px; padding: 0; color: #276f98; border: 0; outline: 0; background: transparent; font-size: 12px; font-weight: 750; }
.share-total-strip { display: grid; grid-template-columns: repeat(3, minmax(100px,1fr)); gap: 8px; }
.share-total-strip .share-metric { padding: 4px 9px; border-radius: 10px; background: rgba(255,255,255,.5); }
.share-total-strip .share-metric span { font-size: 10px; }
.share-total-strip .share-metric strong { font-size: 14px; }
.share-member-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; margin-top: 14px; }
.share-member-card, .share-operation-card { min-width: 0; padding: 13px 14px; border: 1px solid rgba(255,255,255,.94); border-radius: 17px; background: rgba(255,255,255,.66); box-shadow: 5px 5px 13px rgba(103,164,191,.1), -4px -4px 9px rgba(255,255,255,.6); }
.share-member-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-bottom: 9px; border-bottom: 1px solid rgba(131,190,217,.18); }
.share-member-head span { overflow: hidden; color: #89a1af; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.share-member-head strong { overflow: hidden; color: #24485b; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.share-metric-list { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 7px; margin-top: 10px; }
.share-metric { display: grid; gap: 4px; min-width: 0; }
.share-metric span { overflow: hidden; color: #7e9cab; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.share-metric strong { overflow: hidden; color: #287ba5; font-size: 15px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.share-metric.share-teal strong { color: #189b89; }
.share-metric.share-gold strong { color: #c88921; }
.share-empty { color: #aabdc7 !important; }
.share-operation-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-top: 14px; }
.share-operation-card .share-metric-list { grid-template-columns: repeat(auto-fit, minmax(90px,1fr)); }
.daily-operation-share .share-board-top { justify-content: center; }
@media (max-width: 1080px) { .share-member-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } .share-board-top { align-items: flex-start; flex-direction: column; } .share-total-strip { width: 100%; } }
@media (max-width: 660px) { .daily-share-board { padding: 13px; border-radius: 18px; } .share-member-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; } .share-operation-grid { grid-template-columns: 1fr; } .share-metric-list { grid-template-columns: repeat(2,minmax(0,1fr)); } .share-total-strip { grid-template-columns: repeat(3,minmax(0,1fr)); } .share-total-strip .share-metric { padding: 4px 5px; } .share-total-strip .share-metric strong { font-size: 12px; } }

/* Monthly landscape matrix: all dates are visible together, without date filtering. */
.monthly-board { margin-top: 16px; padding: 15px 18px 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.94); border-radius: 22px; background: linear-gradient(145deg, rgba(255,255,255,.79), rgba(226,244,252,.81)); box-shadow: 10px 10px 22px rgba(99,163,193,.1), -7px -7px 15px rgba(255,255,255,.76), inset 0 1px 0 rgba(255,255,255,.92); }
.daily-panel,
.monthly-board {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.monthly-board-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 4px 12px; }
.monthly-board-copy { display: grid; gap: 3px; }
.monthly-board-copy strong { color: #24485b; font-size: 14px; letter-spacing: .02em; }
.monthly-board-copy span { color: #88a4b2; font-size: 10px; }
.monthly-summary-strip { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.monthly-summary-metric { display: grid; gap: 2px; min-width: 74px; padding: 5px 9px; border: 1px solid rgba(177,221,239,.58); border-radius: 10px; background: rgba(255,255,255,.56); }
.monthly-summary-metric span { color: #87a0ac; font-size: 9px; }
.monthly-summary-metric strong { font-size: 12px; font-variant-numeric: tabular-nums; }
.monthly-summary-blue strong, .month-cell-blue { color: #2182b6; }
.monthly-summary-teal strong, .month-cell-teal { color: #159887; }
.monthly-summary-gold strong, .month-cell-gold { color: #c78822; }
.monthly-operation-total .monthly-summary-metric { min-width: 95px; }
.monthly-matrix { display: grid; grid-template-columns: 104px 40px repeat(var(--month-days), minmax(22px,1fr)); grid-auto-flow: row; grid-auto-rows: 26px; align-content: start; border-top: 1px solid rgba(134,191,216,.24); border-left: 1px solid rgba(134,191,216,.18); border-radius: 13px; overflow: hidden; background: rgba(255,255,255,.38); }
.monthly-matrix > div { min-width: 0; min-height: 26px; border-right: 1px solid rgba(134,191,216,.17); border-bottom: 1px solid rgba(134,191,216,.17); }
.monthly-matrix-corner, .monthly-matrix-metric-head { display: grid; place-items: center; color: #7295a7; background: rgba(236,249,255,.78); font-size: 10px; font-weight: 750; }
.monthly-date-cell { display: grid; place-items: center; align-content: center; gap: 0; color: #7c9baa; background: rgba(246,252,255,.71); line-height: 1; }
.monthly-date-cell b { color: #558197; font-size: 10px; font-variant-numeric: tabular-nums; }
.monthly-date-cell span { color: #aac0ca; font-size: 7px; }
.monthly-date-cell.is-today { position: relative; background: rgba(222,245,253,.95); }
.monthly-date-cell.is-today::before { position: absolute; top: 4px; width: 4px; height: 4px; border-radius: 50%; background: #32aee2; box-shadow: 0 0 0 2px rgba(98,198,234,.16); content: ''; }
.monthly-member-cell { grid-row: span var(--row-span); display: grid; align-content: center; gap: 3px; padding: 4px 8px; background: rgba(249,253,255,.7); }
.monthly-member-cell strong { overflow: hidden; color: #294e61; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.monthly-member-cell span { overflow: hidden; color: #91a8b3; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.monthly-metric-cell { display: grid; place-items: center; color: #7699a9; background: rgba(250,254,255,.56); font-size: 9px; font-weight: 700; }
.monthly-metric-blue { color: #398cb6; }
.monthly-metric-teal { color: #259c8e; }
.monthly-metric-gold { color: #bd8a31; }
.monthly-data-cell { display: grid; place-items: center; padding: 1px; background: rgba(255,255,255,.48); }
.month-cell-value { display: block; max-width: 100%; overflow: hidden; font-size: 9px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.02em; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.month-cell-empty { color: #c2d3db; font-size: 9px; line-height: 1; }
.monthly-board-footnote { margin: 8px 3px 0; color: #91aab5; font-size: 9px; line-height: 1.35; }
.monthly-operation-board { margin-top: 14px; }
.monthly-operation-matrix .monthly-member-cell { background: rgba(246,253,255,.78); }
@media (max-width: 1080px) { .monthly-board { overflow-x: auto; } .monthly-matrix { min-width: 950px; } }
@media (max-width: 660px) { .monthly-board { padding: 13px; border-radius: 18px; } .monthly-board-top { align-items: flex-start; flex-direction: column; gap: 9px; } .monthly-summary-strip { width: 100%; justify-content: flex-start; } .monthly-matrix { min-width: 900px; } }

/* The dashboard is embedded in the workspace: use the full right-side canvas, not a centred desktop shell. */
.shell { width: 100%; max-width: none; margin: 0; }
