:root {
  --bg: #f6f7f4;
  --surface: #ffffff;
  --surface-soft: #f0f4ef;
  --text: #20231f;
  --muted: #7b8179;
  --faint: #a7ada4;
  --line: #e1e5de;
  --sage: #668975;
  --sage-dark: #496a59;
  --sage-soft: #e6f0e9;
  --rose: #cf8c80;
  --rose-soft: #f8e9e5;
  --gold: #c9a45f;
  --gold-soft: #f7eedb;
  --blue: #729bb0;
  --blue-soft: #e7f0f4;
  --mint: #4d8b83;
  --mint-soft: #e3f2ef;
  --shadow: 0 14px 36px rgba(45, 64, 50, .10);
  --radius: 18px;
  --radius-sm: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-y: auto;
}

button, input { font: inherit; }
button { cursor: pointer; }
input, select, textarea { max-width: 100%; }

body.auth-locked {
  overflow: hidden;
}

body.auth-locked .phone-shell {
  visibility: hidden;
  pointer-events: none;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 10%, rgba(205, 224, 211, .75), transparent 34%),
    linear-gradient(180deg, #f3f6f1 0%, #e8efe9 100%);
}

body:not(.auth-locked) .auth-gate {
  display: none;
}

.auth-card {
  width: min(100%, 360px);
  padding: 28px;
  border: 1px solid rgba(102, 137, 117, .18);
  border-radius: 22px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 28px 70px rgba(54, 76, 67, .16);
}

.auth-card p {
  margin: 0 0 10px;
  color: var(--sage-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
}

.auth-card h1 {
  margin-bottom: 22px;
  color: var(--ink);
}

.auth-card label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.auth-card input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.auth-card input:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 4px rgba(102, 137, 117, .12);
}

.auth-card button {
  width: 100%;
  height: 48px;
  margin-top: 14px;
  border: 0;
  border-radius: 12px;
  background: var(--sage-dark);
  color: #fff;
  font-weight: 900;
}

.auth-card span {
  display: block;
  min-height: 20px;
  margin-top: 10px;
  color: #a24747;
  font-size: 12px;
  font-weight: 800;
}

.phone-shell {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  background:
    linear-gradient(180deg, rgba(230, 240, 233, .92), rgba(246, 247, 244, 0) 220px),
    var(--bg);
  position: relative;
  padding-bottom: 88px;
  overflow: visible;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 12px;
  background: rgba(246, 247, 244, .88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(225, 229, 222, .7);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--sage-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: 0;
}

.avatar-btn {
  min-width: 58px;
  height: 34px;
  border: 1px solid rgba(102, 137, 117, .24);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--sage-dark);
  background: rgba(255, 255, 255, .74);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(102, 137, 117, .10);
}

.page {
  display: none;
  padding: 14px 16px 22px;
}

.page.active {
  display: block;
  animation: enter .22s ease both;
}

@keyframes enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-card {
  border-radius: 24px;
  padding: 20px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 8%, rgba(247, 238, 219, .36), transparent 34%),
    linear-gradient(145deg, #789a84 0%, #587963 54%, #365442 100%);
  box-shadow: var(--shadow);
}

.hero-top, .goal-row, .hero-stats, .section-head, .record-row, .claim-row, .settle-row, .follow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-label {
  margin: 0 0 8px;
  opacity: .78;
  font-size: 12px;
  font-weight: 700;
}

.hero-card strong {
  display: block;
  font-size: 38px;
  line-height: 1;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.hero-date {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  font-size: 12px;
  font-weight: 800;
}

.goal-row {
  margin-top: 18px;
  font-size: 13px;
  opacity: .9;
}

.progress-track {
  height: 8px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #f2d9a7;
}

.home-view-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(102, 126, 118, .14);
}

.home-view-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #53616c;
  font-size: 13px;
  font-weight: 950;
}

.home-view-tabs button.active {
  background: #244d43;
  color: #fff;
  box-shadow: 0 8px 18px rgba(35, 79, 69, .14);
}

.home-view-panel {
  display: none;
  margin-top: 14px;
}

.home-view-panel.active {
  display: grid;
  gap: 14px;
}

#homeDecisionPanel .decision-workbench {
  gap: 12px;
}

#homeDecisionPanel .decision-hero {
  display: none;
}

#homeDecisionPanel .finance-tab-wrap {
  margin-top: 0;
}

.hero-stats {
  gap: 8px;
  margin-top: 18px;
}

.hero-stats div {
  flex: 1;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .12);
}

.hero-stats span, .metric-card span, .metric-card small, .muted {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.hero-stats span {
  display: block;
  color: rgba(255, 255, 255, .68);
}

.hero-stats b {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.metric-card, .panel, .input-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(45, 64, 50, .05);
}

.metric-card {
  min-height: 104px;
  border-radius: var(--radius);
  padding: 14px;
}

.metric-card strong {
  display: block;
  margin: 10px 0 6px;
  font-size: 23px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.metric-card.warn { background: var(--rose-soft); border-color: #efd0c9; }
.metric-card.blue { background: var(--blue-soft); border-color: #cfe0e7; }

.panel, .input-card {
  margin-top: 14px;
  border-radius: var(--radius);
  padding: 16px;
}

.gas-list-empty {
  padding: 16px;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.section-head { margin-bottom: 12px; }
.section-head h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}

.text-btn {
  border: 0;
  background: var(--sage-soft);
  color: var(--sage-dark);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.task-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.task-row:first-of-type { border-top: 0; }
.task-row input { width: 19px; height: 19px; accent-color: var(--sage); }
.task-row b {
  color: var(--rose);
  font-size: 11px;
}
.task-row.done { color: var(--faint); text-decoration: line-through; }

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.quick-actions.three {
  grid-template-columns: repeat(3, 1fr);
}

.quick-actions button {
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.quick-actions span {
  display: block;
  color: var(--sage);
  font-size: 20px;
  line-height: 1;
  margin-bottom: 3px;
}

.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 3px;
  padding: 3px;
  background: #e9ede6;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.segmented button {
  height: 36px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.segmented .active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(45, 64, 50, .08);
}

.form-title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 900;
}

.field-label {
  margin: 14px 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.chip-grid {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.chip-grid.c2 { grid-template-columns: repeat(2, 1fr); }
.chip-grid.c4 { grid-template-columns: repeat(4, 1fr); }

.chip, .pay-row button {
  min-height: 42px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chip.active, .pay-row .active {
  color: var(--sage-dark);
  border-color: var(--sage);
  background: var(--sage-soft);
}

.amount-field {
  display: flex;
  align-items: center;
  height: 58px;
  margin: 10px 0 12px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.field-stack > .field,
.customer-form-grid > .field,
.member-search-card > .field {
  width: 100%;
  display: block;
}

.amount-field.compact {
  height: 50px;
  margin: 0;
  border-radius: 14px;
}

.amount-field.compact input {
  font-size: 23px;
}

.amount-field span {
  padding-left: 16px;
  color: var(--faint);
  font-size: 24px;
  font-weight: 900;
}

.amount-field input {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  padding: 0 16px 0 8px;
  color: var(--text);
  font-size: 30px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.field {
  width: 100%;
  height: 48px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  outline: 0;
  padding: 0 13px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
}

.field:focus, .amount-field:focus-within { border-color: var(--sage); }

.primary-btn, .ghost-btn {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 900;
}

.primary-btn {
  margin-top: 12px;
  border: 0;
  color: #fff;
  background: var(--sage);
  box-shadow: 0 10px 20px rgba(102, 137, 117, .22);
}

.ghost-btn {
  margin-top: 12px;
  border: 1.5px dashed var(--sage);
  color: var(--sage-dark);
  background: var(--sage-soft);
}

.record-row, .claim-row {
  min-height: 42px;
  border-top: 1px solid var(--line);
  gap: 10px;
  font-size: 14px;
}

.record-row:first-of-type, .claim-row:first-of-type { border-top: 0; }
.record-row span, .claim-row span { flex: 1; }
.record-row b, .claim-row b { font-variant-numeric: tabular-nums; }

.insight-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 56px;
  border-top: 1px solid var(--line);
}

.insight-row:first-of-type { border-top: 0; }
.insight-row strong, .channel-row strong {
  display: block;
  font-size: 14px;
}
.insight-row span, .channel-row span, .goal-card span, .idea-card span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}
.insight-row b {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.mini-icon, .module-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 900;
}

.mini-icon {
  width: 34px;
  height: 34px;
}

.mini-icon.rose, .module-icon.rose { color: var(--rose); background: var(--rose-soft); }
.mini-icon.gold, .module-icon.gold { color: var(--gold); background: var(--gold-soft); }
.module-icon.sage { color: var(--sage-dark); background: var(--sage-soft); }
.module-icon.blue { color: var(--blue); background: var(--blue-soft); }
.module-icon.mint { color: var(--mint); background: var(--mint-soft); }

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 8px;
}

.dot.sage { background: var(--sage); }
.dot.rose { background: var(--rose); }
.dot.gold { background: var(--gold); }

.channel-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.channel-row:first-of-type { border-top: 0; }
.channel-row em, .mini-progress {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0eb;
}

.channel-row i, .mini-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--sage);
}

.pay-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-top: 12px;
}

.sales-mode {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #e9ede6;
}

.sales-view {
  display: none;
}

.sales-view.active {
  display: block;
  animation: enter .22s ease both;
}

.sales-mode button {
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.sales-mode .active {
  color: var(--text);
  background: #fff;
  box-shadow: 0 2px 8px rgba(45, 64, 50, .08);
}

.tabline-nav {
  position: sticky;
  top: 70px;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: -2px -16px 14px;
  padding: 8px 16px;
  background: rgba(246, 247, 244, .94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(225, 229, 222, .72);
}

.sales-period-nav,
.work-tab-glass,
.finance-period-nav {
  position: sticky;
  top: 68px;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  width: min(100%, 430px);
  margin: 0 auto 14px;
  padding: 5px;
  border-radius: 16px;
  background: rgba(238, 247, 238, .94);
  border: 1px solid rgba(111, 143, 113, .2);
  border-bottom: 1px solid rgba(111, 143, 113, .2);
  box-shadow: 0 10px 24px rgba(45, 64, 50, .08);
  backdrop-filter: blur(14px);
}

.tabline-nav button {
  height: 38px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.sales-period-nav button,
.work-tab-glass button,
.finance-period-nav button {
  min-width: 0;
  width: 100%;
  height: 36px;
  padding: 0 6px;
  border-radius: 12px;
  font-size: 12px;
  white-space: nowrap;
}

.tabline-nav .active {
  color: var(--text);
  background: #fff;
  border-color: var(--line);
  box-shadow: 0 6px 18px rgba(45, 64, 50, .06);
}

.sales-period-nav .active,
.work-tab-glass button.active,
.finance-period-nav button.active {
  background: #244d43;
  border-color: #244d43;
  color: #fff;
  box-shadow: 0 7px 16px rgba(35, 79, 69, .18);
}

.work-view {
  display: none;
}

.work-period-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: visible;
  scrollbar-width: none;
}

.work-period-nav::-webkit-scrollbar {
  display: none;
}

.work-period-nav button {
  min-width: 0;
  width: 100%;
  padding: 0 6px;
  white-space: nowrap;
}

.work-view.active {
  display: block;
  animation: enter .22s ease both;
}

.sales-command-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  padding: 13px 14px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(248,250,247,.94)),
    radial-gradient(circle at 100% 0, rgba(107,145,126,.18), transparent 42%);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(45, 64, 50, .05);
}

.sales-command-bar span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .12em;
}

.sales-command-bar strong {
  display: block;
  margin-top: 3px;
  font-size: 18px;
}

.sales-command-actions {
  display: flex;
  gap: 7px;
}

.sales-command-actions button {
  height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.work-filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  gap: 7px;
  margin-bottom: 12px;
}

.work-filter-row button {
  min-height: 36px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.work-filter-row .active {
  color: var(--sage-dark);
  border-color: var(--sage);
  background: var(--sage-soft);
}

.work-edit-list {
  display: grid;
  gap: 9px;
}

.work-edit-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 15px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.work-color-goals {
  background:
    linear-gradient(150deg, rgba(255, 255, 255, .96), rgba(255, 250, 240, .9)),
    radial-gradient(circle at 100% 0, rgba(219, 163, 83, .22), transparent 42%);
}

.work-color-tasks {
  background:
    linear-gradient(150deg, rgba(255, 255, 255, .96), rgba(242, 248, 246, .92)),
    radial-gradient(circle at 100% 0, rgba(107, 145, 126, .2), transparent 42%);
}

.work-color-orders {
  background:
    linear-gradient(150deg, rgba(255, 255, 255, .96), rgba(241, 246, 252, .92)),
    radial-gradient(circle at 100% 0, rgba(95, 133, 175, .22), transparent 42%);
}

.work-color-planning {
  background:
    linear-gradient(150deg, rgba(255, 255, 255, .96), rgba(251, 244, 242, .94)),
    radial-gradient(circle at 100% 0, rgba(188, 112, 97, .18), transparent 42%);
}

.work-edit-card.is-draft {
  border-style: dashed;
  background: #fff;
}

.work-edit-card.is-editing {
  border-color: var(--sage);
  background: #fff;
}

.work-edit-card [contenteditable="true"] {
  outline: 1.5px solid var(--sage);
  border-radius: 8px;
  padding: 3px 5px;
  background: var(--sage-soft);
}

.work-edit-card strong,
.work-edit-card span {
  display: block;
}

.work-edit-card strong {
  font-size: 14px;
}

.work-edit-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.work-action-hint {
  margin: -4px 0 12px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--sage-soft);
  color: var(--sage-dark);
  font-size: 12px;
  font-weight: 850;
}

.assignee-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
}

.assignee-row label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.assignee-row select {
  min-width: 0;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

.assignee-picker {
  display: grid;
  grid-template-columns: 56px repeat(4, minmax(0, 1fr));
  gap: 6px;
  align-items: center;
  padding: 8px;
  border-radius: 13px;
  background: #fff;
  border: 1px solid var(--line);
}

.assignee-picker span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.assignee-picker button {
  min-width: 0;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.assignee-picker button.active {
  color: #fff;
  border-color: var(--sage);
  background: var(--sage);
}

.work-owner-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
}

.work-owner-line span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.work-owner-line b {
  color: var(--text);
  font-size: 13px;
}

.work-draft-grid {
  display: grid;
  gap: 8px;
}

.work-draft-grid input,
.work-draft-grid select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 850;
}

.work-status-title {
  margin: 4px 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .06em;
}

.work-edit-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.work-edit-actions button {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.work-edit-actions button:last-child {
  color: #a65f50;
}

.hidden-work-sync {
  display: none;
}

.goal-split-grid,
.goal-track-list {
  display: grid;
  gap: 12px;
}

.goal-hero-pair {
  display: grid;
  gap: 11px;
  margin-bottom: 12px;
}

.goal-hero-card {
  display: grid;
  gap: 9px;
  padding: 15px;
  border-radius: 18px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .42);
  box-shadow: 0 14px 28px rgba(55, 65, 54, .12);
}

.goal-hero-card.month {
  background: linear-gradient(135deg, #8e9f75, #c89d5d);
}

.goal-hero-card.year {
  background: linear-gradient(135deg, #5f85af, #7b917c);
}

.goal-hero-card div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.goal-hero-card span,
.goal-hero-card p {
  margin: 0;
  color: rgba(255, 255, 255, .86);
  font-size: 12px;
  font-weight: 850;
}

.goal-hero-card strong {
  font-size: 17px;
}

.goal-hero-card b {
  font-size: 25px;
  line-height: 1;
}

.goal-hero-card .mini-progress {
  background: rgba(255, 255, 255, .28);
}

.goal-hero-card .mini-progress i {
  background: #fff;
}

.goal-focus-card {
  background: linear-gradient(180deg, #fff 0%, #f8f7f1 100%);
}

.work-status-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 9px;
  margin: 0 0 13px;
}

.work-status-cards button {
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 74px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 8px 20px rgba(45, 64, 50, .05);
}

.work-status-cards b {
  font-size: 24px;
  line-height: 1;
}

.work-status-cards span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.work-status-cards button.active {
  border-color: rgba(95, 133, 175, .42);
  background: linear-gradient(135deg, #fff, #eef4fb);
}

.work-order-stats button:nth-child(1).active,
.work-order-stats button:nth-child(1):hover {
  border-color: rgba(198, 157, 88, .45);
  background: #fff7e8;
}

.work-order-stats button:nth-child(2).active,
.work-order-stats button:nth-child(2):hover {
  border-color: rgba(95, 133, 175, .45);
  background: #eef4fb;
}

.work-order-stats button:nth-child(3).active,
.work-order-stats button:nth-child(3):hover {
  border-color: rgba(107, 145, 126, .45);
  background: var(--sage-soft);
}

.goal-focus-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.goal-focus-head span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.goal-focus-head b {
  color: var(--sage-dark);
  font-size: 22px;
  line-height: 1;
}

.goal-focus-card p {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.planning-board {
  overflow: hidden;
}

.planning-hero {
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 17px;
  background: #fff7f2;
  border: 1px solid rgba(188, 112, 97, .22);
}

.planning-hero strong {
  font-size: 15px;
}

.planning-hero span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.planning-lanes {
  display: grid;
  gap: 12px;
}

.planning-lane {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
}

.planning-lane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.planning-lane-head span {
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
}

.planning-lane-head b {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--sage-soft);
  color: var(--sage-dark);
  font-size: 11px;
}

.planning-lane .work-edit-card {
  background: var(--surface-soft);
}

.idea-card {
  border-style: dashed;
}

@media (min-width: 760px) {
  .goal-hero-pair,
  .goal-split-grid,
  .planning-lanes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-draft-grid {
    grid-template-columns: 1.4fr .8fr .8fr 1.2fr;
  }
}

.work-tab-glass {
  /* Shared with .sales-period-nav near the base tab styles. */
}

.work-canvas {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 14px;
  margin-top: 12px;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(108, 136, 113, .18);
  background: linear-gradient(145deg, #fbf4e8 0%, #eef8ed 56%, #dcefe6 100%);
  box-shadow: 0 18px 40px rgba(55, 80, 60, .12);
}

.work-task-canvas {
  background: linear-gradient(145deg, #f8efe2 0%, #eaf7ef 52%, #d9eee8 100%);
}

.work-order-canvas {
  background: linear-gradient(145deg, #f8f0df 0%, #e5f3ee 48%, #d7eee5 100%);
}

.work-plan-canvas {
  background: linear-gradient(145deg, #f9efd9 0%, #eff7e7 50%, #d6ece4 100%);
}

.work-scene-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.work-scene-head span {
  display: block;
  color: #477064;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .14em;
}

.work-scene-head h2 {
  margin: 4px 0 5px;
  color: #1f3f38;
  font-size: 22px;
}

.work-scene-head p {
  margin: 0;
  color: rgba(38, 64, 55, .68);
  font-size: 12px;
  line-height: 1.5;
}

.work-scene-head .text-btn {
  background: #1f4c43;
  color: #fff;
  border-color: transparent;
}

.goal-dashboard {
  display: grid;
  gap: 12px;
}

.work-summary-grid {
  gap: 8px;
  align-items: stretch;
}

.work-task-canvas .work-summary-grid,
.work-plan-canvas .work-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.work-order-canvas .work-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.goal-dashboard-card {
  display: grid;
  gap: 9px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .76);
  border: 1px solid rgba(255, 255, 255, .72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 14px 26px rgba(48, 79, 60, .1);
}

.work-summary-grid .goal-dashboard-card {
  min-width: 0;
  min-height: 104px;
  align-content: start;
  gap: 7px;
  padding: 12px 10px;
  border-radius: 16px;
}

.goal-dashboard-card[data-work-jump] {
  cursor: pointer;
  text-align: left;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.goal-dashboard-card[data-work-jump]:hover,
.goal-dashboard-card[data-work-jump].active {
  transform: translateY(-1px);
  border-color: rgba(35, 79, 69, .34);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 18px 32px rgba(48, 79, 60, .14);
}

.goal-dashboard-card.month {
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(255, 244, 216, .88)),
    radial-gradient(circle at 100% 0, rgba(211, 160, 74, .28), transparent 44%);
  border-color: rgba(211, 160, 74, .22);
}

.goal-dashboard-card.year {
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(218, 241, 235, .9)),
    radial-gradient(circle at 100% 0, rgba(67, 126, 112, .24), transparent 44%);
  border-color: rgba(67, 126, 112, .22);
}

.goal-dashboard-card.task {
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(230, 245, 233, .88)),
    radial-gradient(circle at 100% 0, rgba(103, 157, 112, .24), transparent 44%);
  border-color: rgba(103, 157, 112, .22);
}

.goal-dashboard-card.task-done {
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(232, 241, 249, .88)),
    radial-gradient(circle at 100% 0, rgba(95, 133, 175, .24), transparent 44%);
  border-color: rgba(95, 133, 175, .22);
}

.goal-dashboard-card.order {
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(255, 244, 224, .88)),
    radial-gradient(circle at 100% 0, rgba(198, 157, 88, .26), transparent 44%);
  border-color: rgba(198, 157, 88, .24);
}

.goal-dashboard-card.order-flow {
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(239, 239, 250, .88)),
    radial-gradient(circle at 100% 0, rgba(130, 111, 166, .2), transparent 44%);
  border-color: rgba(130, 111, 166, .2);
}

.goal-dashboard-card.order-done {
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(225, 244, 237, .88)),
    radial-gradient(circle at 100% 0, rgba(67, 126, 112, .2), transparent 44%);
  border-color: rgba(67, 126, 112, .2);
}

.goal-dashboard-card.plan {
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(255, 238, 232, .88)),
    radial-gradient(circle at 100% 0, rgba(188, 112, 97, .22), transparent 44%);
  border-color: rgba(188, 112, 97, .2);
}

.goal-dashboard-card.idea {
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(246, 238, 255, .86)),
    radial-gradient(circle at 100% 0, rgba(149, 118, 177, .2), transparent 44%);
  border-color: rgba(149, 118, 177, .2);
}

.goal-dashboard-card.month .goal-card-top b {
  background: rgba(177, 124, 45, .14);
  color: #8a6122;
}

.goal-dashboard-card.year .goal-card-top b {
  background: rgba(35, 79, 69, .13);
  color: #234f45;
}

.goal-dashboard-card.month .soft-progress i {
  background: linear-gradient(90deg, #e3b75d, #9b6f29);
}

.goal-dashboard-card.year .soft-progress i {
  background: linear-gradient(90deg, #78b896, #234f45);
}

.goal-dashboard-card.task .goal-card-top b,
.goal-dashboard-card.task-done .goal-card-top b {
  background: rgba(35, 79, 69, .12);
  color: #234f45;
}

.goal-dashboard-card.order .goal-card-top b,
.goal-dashboard-card.order-flow .goal-card-top b,
.goal-dashboard-card.order-done .goal-card-top b {
  background: rgba(154, 111, 41, .13);
  color: #7d5d23;
}

.goal-dashboard-card.plan .goal-card-top b,
.goal-dashboard-card.idea .goal-card-top b {
  background: rgba(139, 82, 104, .12);
  color: #7b4c58;
}

.goal-dashboard-card.task .soft-progress i {
  background: linear-gradient(90deg, #8fc784, #2f6b55);
}

.goal-dashboard-card.task-done .soft-progress i {
  background: linear-gradient(90deg, #98b9dd, #4d6d9e);
}

.goal-dashboard-card.order .soft-progress i,
.goal-dashboard-card.order-flow .soft-progress i {
  background: linear-gradient(90deg, #e8bf67, #a8792f);
}

.goal-dashboard-card.order-done .soft-progress i {
  background: linear-gradient(90deg, #7fbf99, #2f6b55);
}

.goal-dashboard-card.plan .soft-progress i,
.goal-dashboard-card.idea .soft-progress i {
  background: linear-gradient(90deg, #d38d8a, #8f5f83);
}

.goal-dashboard-card span,
.goal-dashboard-card p {
  margin: 0;
  color: rgba(38, 64, 55, .7);
  font-size: 12px;
  font-weight: 850;
}

.goal-dashboard-card strong {
  color: #203c35;
  font-size: 27px;
  letter-spacing: 0;
}

.work-goal-canvas {
  gap: 14px;
  padding: 18px;
  border-radius: 28px;
}

.work-goal-canvas .work-scene-head {
  align-items: start;
}

.work-goal-canvas .work-scene-head span {
  letter-spacing: .18em;
}

.work-goal-canvas .work-scene-head h2 {
  margin-top: 6px;
}

.work-goal-canvas .work-scene-head p {
  max-width: 310px;
}

.work-goal-canvas .work-scene-head .text-btn {
  min-height: 30px;
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.work-goal-canvas .goal-dashboard {
  grid-template-columns: 1fr;
  gap: 14px;
}

.work-goal-canvas .goal-dashboard-card {
  min-height: 142px;
  align-content: start;
  gap: 9px;
  padding: 18px 16px 16px;
  border-radius: 24px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 16px 30px rgba(48, 79, 60, .1);
}

.work-goal-canvas .goal-card-top {
  align-items: center;
}

.work-goal-canvas .goal-dashboard-card p {
  max-width: 310px;
}

.work-goal-canvas .soft-progress {
  height: 9px;
  margin-top: 4px;
}

.work-summary-grid .goal-dashboard-card strong {
  font-size: 20px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.work-summary-grid .goal-dashboard-card p {
  display: none;
}

.work-summary-grid .goal-card-top {
  display: grid;
  gap: 6px;
}

.work-summary-grid .goal-card-top b {
  width: fit-content;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.work-order-canvas .work-summary-grid .goal-dashboard-card {
  min-height: 96px;
  padding-inline: 8px;
}

.work-order-canvas .work-summary-grid .goal-card-top span,
.work-order-canvas .work-summary-grid .goal-card-top b {
  font-size: 10px;
}

.work-order-canvas .work-summary-grid .goal-dashboard-card strong {
  font-size: 18px;
}

.goal-dashboard-card.order-flow strong {
  font-size: 20px;
  line-height: 1.25;
}

.soft-progress {
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: rgba(47, 74, 62, .12);
}

.soft-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #85b889, #234f45);
}

.work-line-list {
  display: grid;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.76);
  box-shadow: 0 12px 28px rgba(51, 73, 58, .08);
}

.work-line-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(74, 105, 82, .13);
}

.work-line-head span {
  color: #244c42;
  font-size: 14px;
  font-weight: 950;
}

.work-line-head b {
  color: rgba(42, 67, 58, .58);
  font-size: 11px;
}

.work-line-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 14px;
  background: rgba(255,255,255,.52);
  border-bottom: 1px solid rgba(74, 105, 82, .13);
}

.work-line-item:last-child {
  border-bottom: 0;
}

.work-line-item strong,
.work-line-item span {
  display: block;
}

.work-line-item strong {
  color: #1f3f38;
  font-size: 14px;
}

.work-line-item span {
  margin-top: 4px;
  color: rgba(37, 62, 54, .64);
  font-size: 12px;
  line-height: 1.5;
}

.work-line-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.work-line-meta b,
.work-line-meta em {
  padding: 6px 9px;
  border-radius: 999px;
  background: #e7f5e7;
  color: #245247;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.work-line-meta em {
  background: #fff4d9;
  color: #7d6130;
}

.work-inline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.work-inline-actions button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(74, 105, 82, .16);
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  color: #244c42;
  font-size: 12px;
  font-weight: 900;
}

.work-inline-actions button:last-child {
  color: #996150;
}

.work-dashboard-strip,
.work-ticket-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  overflow: visible;
  padding-bottom: 2px;
}

.work-dashboard-strip button:first-child {
  grid-column: 1 / -1;
}

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

.work-dashboard-strip button,
.work-ticket-stats button {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 84px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 22px;
  background: rgba(255,255,255,.72);
  color: #21463d;
  box-shadow: 0 12px 26px rgba(47, 74, 59, .1);
}

.work-dashboard-strip button.active,
.work-ticket-stats button.active {
  background: linear-gradient(150deg, #244d43, #6ca276);
  color: #fff;
  transform: translateY(-1px);
}

.work-dashboard-strip b,
.work-ticket-stats b {
  font-size: 28px;
  line-height: 1;
}

.work-dashboard-strip span,
.work-ticket-stats span {
  font-size: 12px;
  font-weight: 950;
}

.goal-card-top,
.work-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.goal-card-top b,
.work-item-top > b {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(35, 79, 69, .12);
  color: #21463d;
  font-size: 11px;
  line-height: 1;
}

.work-item-top > div {
  min-width: 0;
}

.work-draft-card {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 12px;
  border: 1.5px solid rgba(35, 79, 69, .25);
  background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(239, 249, 240, .84));
  box-shadow: 0 16px 34px rgba(42, 74, 58, .14);
}

.goal-draft-card {
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  background: rgba(255, 255, 255, .74);
  box-shadow: 0 18px 38px rgba(39, 70, 55, .14);
}

.work-draft-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.work-draft-title span {
  margin: 0;
  color: #1f3f38;
  font-size: 15px;
  font-weight: 950;
}

.work-draft-title b {
  padding: 6px 9px;
  border-radius: 999px;
  background: #234f45;
  color: #fff;
  font-size: 11px;
}

.goal-draft-title {
  align-items: flex-start;
  padding: 15px;
  background:
    linear-gradient(135deg, rgba(35, 79, 69, .96), rgba(103, 157, 112, .92)),
    radial-gradient(circle at 100% 0, rgba(255, 255, 255, .24), transparent 48%);
}

.goal-draft-title div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.goal-draft-title span,
.goal-draft-title strong {
  color: #fff;
}

.goal-draft-title strong {
  opacity: .78;
  font-size: 12px;
  line-height: 1.45;
}

.goal-draft-title b {
  flex: 0 0 auto;
  max-width: 76px;
  white-space: normal;
  text-align: center;
  line-height: 1.2;
  background: rgba(255, 255, 255, .18);
  color: #fff;
}

.goal-draft-layout {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.goal-draft-layout label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.goal-draft-layout label span {
  margin: 0;
  color: rgba(38, 64, 55, .72);
  font-size: 11px;
  font-weight: 950;
}

.goal-draft-layout input,
.goal-draft-layout select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(74, 105, 82, .18);
  border-radius: 14px;
  background: rgba(255, 255, 255, .86);
  color: #1f3f38;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}

.goal-draft-note {
  margin: 0 14px 14px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(35, 79, 69, .08);
  color: rgba(31, 63, 56, .78);
  font-size: 12px;
  line-height: 1.5;
  font-weight: 850;
}

.goal-draft-card .work-edit-actions {
  padding: 0 14px 14px;
}

.goal-track-board {
  display: grid;
  gap: 10px;
  padding: 10px;
  border-radius: 22px;
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(255,255,255,.72);
  box-shadow: 0 12px 28px rgba(51, 73, 58, .08);
}

.goal-track-board .work-line-head {
  padding: 4px 4px 8px;
  border-bottom: 0;
}

.goal-track-item {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.9), rgba(240, 249, 237, .74)),
    radial-gradient(circle at 100% 0, rgba(133, 184, 137, .18), transparent 42%);
  border: 1px solid rgba(255,255,255,.78);
}

.goal-track-item.month {
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(255, 246, 222, .84)),
    radial-gradient(circle at 100% 0, rgba(211, 160, 74, .24), transparent 42%);
  border-color: rgba(211, 160, 74, .2);
}

.goal-track-item.year {
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(223, 244, 238, .86)),
    radial-gradient(circle at 100% 0, rgba(67, 126, 112, .24), transparent 42%);
  border-color: rgba(67, 126, 112, .2);
}

.work-track-item.task {
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(235, 248, 233, .84)),
    radial-gradient(circle at 100% 0, rgba(103, 157, 112, .2), transparent 42%);
  border-color: rgba(103, 157, 112, .2);
}

.work-track-item.task.peer,
.work-track-item.task.done {
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(235, 244, 252, .84)),
    radial-gradient(circle at 100% 0, rgba(95, 133, 175, .2), transparent 42%);
  border-color: rgba(95, 133, 175, .2);
}

.work-track-item.order {
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(255, 246, 226, .84)),
    radial-gradient(circle at 100% 0, rgba(198, 157, 88, .24), transparent 42%);
  border-color: rgba(198, 157, 88, .22);
}

.work-track-item.order.progress {
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(238, 242, 253, .86)),
    radial-gradient(circle at 100% 0, rgba(95, 133, 175, .22), transparent 42%);
  border-color: rgba(95, 133, 175, .2);
}

.work-track-item.plan {
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(255, 238, 232, .84)),
    radial-gradient(circle at 100% 0, rgba(188, 112, 97, .22), transparent 42%);
  border-color: rgba(188, 112, 97, .2);
}

.work-track-item.idea {
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(246, 238, 255, .86)),
    radial-gradient(circle at 100% 0, rgba(149, 118, 177, .2), transparent 42%);
  border-color: rgba(149, 118, 177, .2);
}

.work-track-item.work-filter-hidden {
  display: none;
}

.work-track-item.task .goal-track-main b,
.work-track-item.task.pending .goal-track-main b {
  background: linear-gradient(135deg, #315f4f, #79ad78);
}

.work-track-item.task.peer .goal-track-main b,
.work-track-item.task.done .goal-track-main b,
.work-track-item.order.progress .goal-track-main b {
  background: linear-gradient(135deg, #4d6d9e, #87afd7);
}

.work-track-item.order .goal-track-main b {
  background: linear-gradient(135deg, #9b6f29, #dfb861);
}

.work-track-item.plan .goal-track-main b,
.work-track-item.idea .goal-track-main b {
  background: linear-gradient(135deg, #8b5268, #d38d8a);
}

.goal-track-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.goal-track-main div {
  min-width: 0;
}

.goal-track-main span {
  display: block;
  color: #679d70;
  font-size: 11px;
  font-weight: 950;
}

.goal-track-main strong {
  display: block;
  margin-top: 4px;
  color: #1f3f38;
  font-size: 15px;
}

.goal-track-main p {
  margin: 5px 0 0;
  color: rgba(38, 64, 55, .68);
  font-size: 12px;
  line-height: 1.45;
}

.goal-track-main b {
  flex: 0 0 auto;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 7px 11px 7px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #234f45, #6ca276);
  color: #fff;
  font-size: 11px;
  box-shadow: 0 8px 16px rgba(35, 79, 69, .18);
}

.goal-owner-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  flex: 0 0 auto;
  font-size: 0;
  font-style: normal;
  background:
    radial-gradient(circle at 50% 62%, #6d4438 0 1.5px, transparent 1.8px),
    radial-gradient(circle at 34% 45%, #31231f 0 1.8px, transparent 2.1px),
    radial-gradient(circle at 66% 45%, #31231f 0 1.8px, transparent 2.1px),
    radial-gradient(circle at 27% 60%, rgba(255, 130, 135, .48) 0 2.7px, transparent 3px),
    radial-gradient(circle at 73% 60%, rgba(255, 130, 135, .48) 0 2.7px, transparent 3px),
    linear-gradient(145deg, #fff8ed, #ffd0b7);
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.76),
    0 3px 8px rgba(47, 35, 26, .16);
}

.goal-owner-avatar::before,
.goal-owner-avatar::after {
  content: "";
  position: absolute;
  top: -2px;
  width: 7px;
  height: 9px;
  border-radius: 999px 999px 4px 4px;
  background: #f6a96d;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.45);
}

.goal-owner-avatar::before {
  left: 3px;
  transform: rotate(-24deg);
}

.goal-owner-avatar::after {
  right: 3px;
  transform: rotate(24deg);
}

.goal-owner-chip[data-owner-type="yu"] .goal-owner-avatar {
  background:
    radial-gradient(circle at 50% 62%, #456077 0 1.5px, transparent 1.8px),
    radial-gradient(circle at 34% 45%, #243849 0 1.8px, transparent 2.1px),
    radial-gradient(circle at 66% 45%, #243849 0 1.8px, transparent 2.1px),
    radial-gradient(circle at 27% 60%, rgba(255, 154, 190, .48) 0 2.7px, transparent 3px),
    radial-gradient(circle at 73% 60%, rgba(255, 154, 190, .48) 0 2.7px, transparent 3px),
    linear-gradient(145deg, #f5fbff, #badcf6);
}

.goal-owner-chip[data-owner-type="yu"] .goal-owner-avatar::before,
.goal-owner-chip[data-owner-type="yu"] .goal-owner-avatar::after {
  background: #8cbde0;
}

.goal-owner-chip[data-owner-type="team"] .goal-owner-avatar {
  background:
    radial-gradient(circle at 37% 52%, #2d4d42 0 1.7px, transparent 2px),
    radial-gradient(circle at 65% 52%, #2d4d42 0 1.7px, transparent 2px),
    radial-gradient(circle at 50% 67%, rgba(255, 137, 131, .42) 0 3px, transparent 3.4px),
    linear-gradient(145deg, #fff8dd, #aee7cf);
}

.goal-owner-chip[data-owner-type="team"] .goal-owner-avatar::before,
.goal-owner-chip[data-owner-type="team"] .goal-owner-avatar::after {
  top: 3px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.74);
  box-shadow: inset 0 -1px 0 rgba(67, 126, 112, .18);
}

.goal-owner-chip[data-owner-type="team"] .goal-owner-avatar::before {
  left: -1px;
  transform: rotate(0);
}

.goal-owner-chip[data-owner-type="team"] .goal-owner-avatar::after {
  right: -1px;
  transform: rotate(0);
}

.goal-owner-chip[data-owner-type="none"] .goal-owner-avatar {
  background:
    linear-gradient(#7b8890, #7b8890) center / 8px 2px no-repeat,
    linear-gradient(90deg, #7b8890, #7b8890) center / 2px 8px no-repeat,
    linear-gradient(145deg, #ffffff, #dde4e8);
}

.goal-owner-chip[data-owner-type="none"] .goal-owner-avatar::before,
.goal-owner-chip[data-owner-type="none"] .goal-owner-avatar::after {
  display: none;
}

.goal-track-main b span {
  color: #fff;
  line-height: 1;
}

.goal-track-item.month .goal-track-main b {
  background: linear-gradient(135deg, #9b6f29, #dfb861);
}

.goal-track-item.year .goal-track-main b {
  background: linear-gradient(135deg, #234f45, #6ca276);
}

.goal-track-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.goal-track-foot span {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(35, 79, 69, .08);
  color: rgba(31, 63, 56, .78);
  font-size: 11px;
  font-weight: 900;
}

.goal-draft-wide {
  grid-column: 1 / -1;
}

.work-line-item.is-editing {
  outline: 2px solid rgba(35, 79, 69, .45);
  outline-offset: -4px;
  background: rgba(255,255,255,.92);
}

.goal-track-item.is-editing {
  outline: 2px solid rgba(35, 79, 69, .45);
  outline-offset: -4px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(232, 247, 231, .9)),
    radial-gradient(circle at 100% 0, rgba(133, 184, 137, .24), transparent 42%);
}

.edit-mode-banner {
  grid-column: 1 / -1;
  padding: 8px 10px;
  border-radius: 12px;
  background: #234f45;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.scroll-focus {
  animation: workFocusPulse 1.2s ease;
}

@keyframes workFocusPulse {
  0% { box-shadow: 0 0 0 0 rgba(35, 79, 69, .32); }
  45% { box-shadow: 0 0 0 8px rgba(35, 79, 69, .12); }
  100% { box-shadow: 0 0 0 0 rgba(35, 79, 69, 0); }
}

.planning-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.planning-flow article {
  min-width: 0;
  padding: 12px 8px;
  border-radius: 18px;
  background: rgba(255,255,255,.68);
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}

.planning-flow span {
  display: block;
  color: #77a574;
  font-size: 12px;
  font-weight: 950;
}

.planning-flow strong {
  display: block;
  margin-top: 3px;
  color: #1f3f38;
  font-size: 13px;
}

.planning-flow p {
  margin: 4px 0 0;
  color: rgba(38, 64, 55, .62);
  font-size: 11px;
  line-height: 1.35;
}

.planning-lanes.refined {
  display: grid;
  gap: 12px;
}

.work-track-board.planning-lanes.refined {
  grid-template-columns: 1fr;
}

.planning-lanes.refined .planning-lane {
  background: rgba(255,255,255,.62);
  border-color: rgba(255,255,255,.75);
}

@media (min-width: 760px) {
  .goal-dashboard,
  .planning-lanes.refined {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-track-board.planning-lanes.refined {
    grid-template-columns: 1fr;
  }

  .work-line-item {
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
  }

  .work-dashboard-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .work-dashboard-strip button:first-child {
    grid-column: auto;
  }

  .work-order-canvas .work-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .work-ticket-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (min-width: 760px) {
  .work-goal-canvas .goal-dashboard {
    grid-template-columns: 1fr;
  }
}

.sales-overview-hero {
  position: relative;
  margin-top: 10px;
  padding: 18px;
  overflow: hidden;
  border-radius: 20px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(45, 64, 50, .07);
}

.sales-overview-hero.month {
  background: #fff;
}

.sales-overview-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--sage);
}

.sales-overview-hero.month::before {
  background: var(--blue);
}

.input-hero-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 86% 8%, rgba(255, 255, 255, .20), transparent 36%),
    linear-gradient(145deg, #729bb0, #557d91 55%, #3d6376);
  box-shadow: var(--shadow);
}

.input-hero-card p {
  margin: 0 0 8px;
  opacity: .72;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
}

.input-hero-card strong {
  display: block;
  font-size: 26px;
  line-height: 1.1;
}

.input-hero-card span {
  display: block;
  max-width: 260px;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
  opacity: .76;
}

.input-hero-card button {
  flex: 0 0 auto;
  height: 40px;
  border: 0;
  border-radius: 999px;
  padding: 0 13px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.sales-overview-top {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.sales-overview-top p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
}

.sales-overview-top strong {
  display: block;
  font-size: 33px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.sales-overview-top button {
  flex: 0 0 auto;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 11px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.sales-overview-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.sales-overview-meta span {
  min-width: 0;
  padding: 9px 8px;
  border-radius: 12px;
  background: var(--surface-soft);
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
}

.channel-summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}

.channel-summary-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 112px;
  padding: 16px;
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(45, 64, 50, .05);
  cursor: pointer;
}

.channel-summary-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  border-radius: 0;
}

.channel-summary-card.dept::before { background: var(--blue); }
.channel-summary-card.ec::before { background: var(--sage); }
.channel-summary-card.physical::before { background: #a98ac1; }

.channel-summary-card span,
.channel-summary-card small,
.channel-summary-card em {
  grid-column: 1;
}

.channel-summary-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.channel-summary-card strong {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  display: block;
  font-size: 22px;
  line-height: 1.1;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.channel-summary-card small {
  display: block;
  min-height: 0;
  margin-top: 5px;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.35;
}

.channel-summary-card em {
  display: block;
  height: 6px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0eb;
}

.channel-summary-card::after {
  content: "點開明細";
  position: absolute;
  right: 14px;
  bottom: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.channel-summary-card.active {
  border-color: var(--sage);
  background: linear-gradient(135deg, #fff, #f8fbf7);
  box-shadow: 0 12px 30px rgba(45, 64, 50, .08);
}

.channel-summary-card.active::after {
  color: var(--sage-dark);
  content: "已展開";
}

.channel-summary-card i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.channel-summary-card.dept i { background: var(--blue); }
.channel-summary-card.ec i { background: var(--sage); }
.channel-summary-card.physical i { background: #a98ac1; }

.sales-drill-card {
  margin-top: 12px;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(45, 64, 50, .04);
}

#sales-view-today > .sales-drill-card {
  display: none;
}

.sales-drill-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sales-drill-head h2 {
  margin: 0;
  font-size: 15px;
}

.sales-drill-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.sales-drill-head > span {
  align-self: flex-start;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.monthly-detail-head,
.detail-channel-head {
  cursor: pointer;
}

.monthly-detail-head:hover,
.detail-channel-head:hover {
  background: rgba(35, 79, 69, .035);
}

.sales-collapse-indicator {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
}

.sales-collapse-indicator::after {
  content: attr(data-state);
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(35, 79, 69, .08);
  color: #244c42;
  font-size: 10px;
  font-weight: 950;
}

.monthly-detail-card.is-collapsed .monthly-channel-bars,
.monthly-detail-card.is-collapsed .monthly-detail-summary,
.monthly-detail-card.is-collapsed .monthly-channel-kpi-list,
.monthly-detail-card.is-collapsed .monthly-channel-blocks,
.monthly-detail-card.is-collapsed .monthly-subdetails,
.detail-channel-card.is-collapsed > :not(.detail-channel-head) {
  display: none;
}

.monthly-detail-card.is-collapsed,
.detail-channel-card.is-collapsed {
  box-shadow: 0 8px 18px rgba(45, 64, 50, .05);
}

.sales-breakdown-list {
  display: grid;
  gap: 8px;
}

.sales-breakdown-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border-radius: 14px;
  background: var(--surface-soft);
}

.sales-breakdown-row strong {
  display: block;
  font-size: 13px;
}

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

.sales-breakdown-row b {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.sales-channel-detail-stack {
  display: none;
}

.sales-channel-kpi-panel {
  display: none;
  margin-top: 12px;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(45, 64, 50, .04);
}

.sales-channel-kpi-list {
  display: grid;
  gap: 10px;
}

.sales-channel-kpi-list article {
  display: grid;
  grid-template-columns: repeat(6, minmax(58px, 1fr));
  gap: 0;
  padding: 12px 10px;
  border-radius: 15px;
  background: #fff;
  border: 1px solid var(--line);
}

.sales-channel-kpi-list strong {
  display: block;
  grid-column: 1 / -1;
  margin-bottom: 2px;
  font-size: 14px;
}

.sales-channel-kpi-list article > div {
  min-width: 0;
  min-height: 44px;
  padding: 4px 7px;
  border-left: 1px solid var(--line);
}

.sales-channel-kpi-list article > div:nth-last-child(-n+2) {
  color: #a65f50;
}

.sales-channel-kpi-list article > div:nth-of-type(1) {
  border-left: 0;
}

.sales-channel-kpi-list span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.sales-channel-kpi-list b {
  display: block;
  margin-top: 6px;
  text-align: left;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.sales-channel-detail-card {
  position: relative;
  display: none;
  margin: -2px 0 10px;
  padding: 14px;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(45, 64, 50, .04);
}

.sales-channel-detail-card.active {
  display: block;
}

.sales-channel-detail-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(107,145,126,.045), transparent 88px);
}

.sales-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.sales-kpi-grid div {
  min-width: 0;
  padding: 10px 8px;
  border-radius: 12px;
  background: #fbfcfa;
  border: 1px solid rgba(225, 229, 222, .75);
}

.sales-kpi-grid div:nth-last-child(-n+2) {
  background: #fff8f5;
  border-color: #efd8cf;
}

.sales-kpi-grid span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.sales-kpi-grid b {
  display: block;
  margin-top: 5px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.ranking-filter-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-bottom: 10px;
}

.ranking-filter-row button {
  min-height: 36px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.ranking-filter-row .active {
  color: var(--sage-dark);
  border-color: var(--sage);
  background: var(--sage-soft);
}

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

.monthly-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 13px 12px;
  border-radius: 14px;
  background: var(--surface-soft);
}

.monthly-row strong {
  display: block;
  font-size: 14px;
}

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

.monthly-row b {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.monthly-detail-card {
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.monthly-detail-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.monthly-detail-head strong {
  display: block;
  font-size: 15px;
}

.monthly-detail-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.monthly-detail-head b {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.monthly-channel-bars {
  display: grid;
  gap: 8px;
}

.monthly-channel-bars div {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  gap: 8px;
  align-items: center;
}

.monthly-channel-bars span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.monthly-channel-bars em {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8df;
}

.monthly-channel-bars i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--sage);
}

.monthly-channel-bars b {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.monthly-detail-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.monthly-detail-summary div {
  min-width: 0;
  padding: 10px 8px;
  border-radius: 13px;
  border: 1px solid rgba(117, 138, 159, .22);
  background: #f7faf8;
}

.monthly-detail-summary div:nth-child(2) {
  border-color: rgba(200, 173, 120, .32);
  background: #fbf6e9;
}

.monthly-detail-summary div:nth-child(3) {
  border-color: rgba(155, 140, 169, .3);
  background: #f6f2f8;
}

.monthly-detail-summary span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.monthly-detail-summary b {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
}

.monthly-channel-kpi-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.monthly-channel-kpi-list article {
  display: block;
  padding: 12px 14px 8px;
  border-radius: 15px;
  background: #fff;
  border: 1px solid var(--line);
}

.monthly-channel-kpi-list-all {
  grid-template-columns: 1fr;
}

.monthly-channel-blocks {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.monthly-channel-block {
  display: grid;
  gap: 8px;
}

.monthly-channel-kpi-card {
  display: block;
  padding: 14px 16px 10px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--sage) !important;
  box-shadow: 0 8px 20px rgba(45, 64, 50, .05);
}

.monthly-channel-kpi-card.ec {
  border-left-color: #c8ad78 !important;
  background: linear-gradient(135deg, #fffdf8, #f7f0df);
}

.monthly-channel-kpi-card.physical {
  border-left-color: #9b8ca9 !important;
  background: linear-gradient(135deg, #fbfafc, #f0edf3);
}

.monthly-channel-kpi-card strong,
.monthly-channel-kpi-list strong {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

.monthly-channel-kpi-card > div,
.monthly-channel-kpi-list article > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  padding: 5px 0;
  border-top: 1px solid rgba(225, 229, 222, .78);
}

.monthly-channel-kpi-card > div:nth-last-child(-n+2),
.monthly-channel-kpi-list article > div:nth-last-child(-n+2) {
  color: #a65f50;
}

.monthly-channel-kpi-card > div:nth-of-type(1),
.monthly-channel-kpi-list article > div:nth-of-type(1) {
  border-top: 0;
}

.monthly-channel-kpi-card span,
.monthly-channel-kpi-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.monthly-channel-kpi-card b,
.monthly-channel-kpi-list b {
  display: block;
  margin-top: 0;
  text-align: right;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.monthly-subdetails {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 12px;
}

.monthly-subdetails div {
  min-width: 0;
  padding: 9px 8px;
  border-radius: 12px;
  background: #fff;
}

.monthly-subdetails span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.monthly-subdetails b {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.25;
}

.monthly-dept-store-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.monthly-channel-detail-groups {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.monthly-channel-detail-group {
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(225, 229, 222, .82);
  background: rgba(255,255,255,.7);
}

.monthly-channel-detail-group h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

.monthly-channel-detail-group .monthly-dept-store-list {
  margin-top: 0;
}

.monthly-dept-store-row {
  display: block;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(117, 138, 159, .22);
  background: linear-gradient(135deg, #f8fbfa, #eef5f1);
}

.monthly-store-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
}

.monthly-dept-store-row.ec {
  border-color: rgba(200, 173, 120, .35);
  background: linear-gradient(135deg, #fffdf7, #f7f0df);
}

.monthly-dept-store-row.physical {
  border-color: rgba(155, 140, 169, .35);
  background: linear-gradient(135deg, #fbfafc, #f0edf3);
}

.monthly-store-head strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
}

.monthly-store-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.monthly-store-head > b {
  color: var(--sage-dark);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.monthly-store-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  margin-top: 10px;
}

.monthly-store-metrics span {
  min-width: 0;
  padding: 8px 9px;
  border-radius: 11px;
  background: rgba(255,255,255,.72);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.monthly-store-metrics b {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.detail-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.detail-filter-grid button {
  min-height: 38px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.detail-filter-grid .active {
  color: var(--sage-dark);
  border-color: var(--sage);
  background: var(--sage-soft);
}

.detail-channel-card {
  margin-top: 12px;
  padding: 15px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(45, 64, 50, .05);
}

.detail-channel-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 10px;
}

.detail-channel-head strong {
  display: block;
  font-size: 15px;
}

.detail-channel-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.detail-channel-head b {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.detail-platform-list {
  display: grid;
}

.detail-platform-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.detail-platform-row:first-child {
  border-top: 0;
}

.detail-platform-row b {
  font-variant-numeric: tabular-nums;
}

.platform-kpi-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.platform-kpi-list article {
  display: block;
  padding: 14px 14px 10px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 5px 18px rgba(45, 64, 50, .035);
}

.platform-kpi-list strong {
  position: relative;
  display: block;
  margin-bottom: 4px;
  padding-left: 12px;
  font-size: 15px;
}

.platform-kpi-list article > small {
  display: block;
  margin: 0 0 10px 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.platform-kpi-list strong::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
  transform: translateY(-50%);
}

.platform-kpi-list article > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 6px 0;
  border-top: 1px solid rgba(225, 229, 222, .78);
}

.platform-kpi-list article > div:nth-last-child(-n+2) {
  color: #a65f50;
}

.platform-kpi-list article > div:nth-of-type(1) {
  border-top: 0;
}

.platform-kpi-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.platform-kpi-list b {
  display: block;
  margin-top: 0;
  text-align: right;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.dept-store-settings-card {
  border-color: rgba(117, 138, 159, .28);
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(245,248,246,.94));
}

.dept-store-setting-list {
  display: grid;
  gap: 8px;
}

.dept-store-setting-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.82);
}

.dept-store-setting-row span {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.dept-store-setting-row b {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.dept-store-setting-row button,
.dept-store-setting-form button {
  border: 1px solid rgba(166, 95, 80, .22);
  border-radius: 999px;
  background: #fff8f5;
  color: #9a594e;
  font-size: 12px;
  font-weight: 900;
}

.dept-store-setting-row button {
  min-height: 30px;
  padding: 0 10px;
}

.dept-store-setting-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 10px;
}

.dept-store-setting-form input {
  min-width: 0;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.dept-store-setting-form button {
  min-height: 42px;
  padding: 0 14px;
  background: var(--deep);
  border-color: var(--deep);
  color: #fff;
}

.order-detail-list {
  display: grid;
  gap: 8px;
}

.order-detail-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface-soft);
}

.order-detail-row strong {
  display: block;
  font-size: 13px;
}

.order-detail-row span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.order-detail-row b {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.pos-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.pos-summary div {
  padding: 13px 12px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.pos-summary span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.pos-summary strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.pos-card {
  margin-top: 12px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(45, 64, 50, .05);
  padding: 15px;
}

.pos-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.pos-card-head h2 {
  margin: 0;
  font-size: 16px;
}

.pos-card-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.pos-card-head > span {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--sage-soft);
  color: var(--sage-dark);
  font-size: 11px;
  font-weight: 900;
  flex-shrink: 0;
}

.field-stack {
  display: grid;
  gap: 9px;
}

.member-inline-search {
  display: grid;
  grid-template-columns: 1fr 74px;
  gap: 8px;
}

.member-inline-search button {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 14px;
  background: var(--sage);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.member-search-results {
  display: grid;
  gap: 8px;
}

.member-search-results[hidden],
.pos-member-picked[hidden] {
  display: none;
}

.member-search-result,
.pos-member-picked {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  padding: 11px 12px;
  text-align: left;
}

.member-search-result {
  display: grid;
  gap: 4px;
}

.pos-member-picked {
  display: grid;
  gap: 4px;
}

.member-search-result strong,
.pos-member-picked strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
}

.member-search-result span,
.pos-member-picked span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.member-search-result b,
.pos-member-picked b {
  justify-self: start;
  width: fit-content;
  margin-top: 3px;
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--sage-soft);
  color: var(--sage-dark);
  font-size: 11px;
  font-weight: 900;
}

.soft-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.soft-toggle input {
  width: 19px;
  height: 19px;
  accent-color: var(--sage);
}

.backdate-field {
  margin-top: 8px;
}

.backdate-field label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.product-pills, .voucher-grid, .pay-grid {
  display: grid;
  gap: 7px;
}

.input-option-group {
  margin-top: 13px;
}

.input-option-group:first-of-type {
  margin-top: 0;
}

.input-option-label {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 8px;
}

.input-option-label span {
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
}

.input-option-label small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.product-pills {
  grid-template-columns: repeat(4, 1fr);
}

.channel-picker-row {
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 8px;
  margin-bottom: 10px;
}

.channel-picker-row select {
  min-width: 0;
}

.add-master-btn {
  width: 100%;
  height: 42px;
  margin: 0 0 10px;
  border: 1.5px dashed var(--sage);
  border-radius: 13px;
  background: var(--sage-soft);
  color: var(--sage-dark);
  font-size: 13px;
  font-weight: 900;
}

.inline-add-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin: 0 0 10px;
  align-items: center;
}

.inline-add-label {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.inline-add-panel[hidden] {
  display: none;
}

.inline-add-panel.compact {
  margin-top: 8px;
}

.inline-add-panel button,
.full-gift-edit-grid button {
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--sage-dark);
  color: #fff;
  padding: 0 14px;
  font-weight: 950;
}

.type-picker-row {
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 8px;
}

.add-square-btn {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 14px;
  background: var(--sage);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.product-pills button, .voucher-grid button, .pay-grid button, .gift-strip button, .fulfillment-grid button {
  min-height: 40px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.product-pills .active, .voucher-grid .active, .pay-grid .active, .gift-strip .active, .fulfillment-grid .active {
  color: var(--sage-dark);
  border-color: var(--sage);
  background: var(--sage-soft);
}

.product-category-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 3px;
  margin-bottom: 8px;
}

.product-category-row button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.product-category-row .active {
  color: var(--sage-dark);
  border-color: var(--sage);
  background: var(--sage-soft);
}

.pos-category-select,
.pos-product-select {
  width: 100%;
  min-height: 56px;
  margin: 2px 0 10px;
  border-radius: 16px;
  border-color: rgba(29, 74, 64, 0.18);
  background: rgba(245, 249, 247, 0.92);
  color: var(--sage-dark);
  font-size: 14px;
  font-weight: 900;
}

.pos-category-select {
  margin-top: 4px;
}

.product-source-note {
  display: grid;
  grid-template-columns: 1fr 64px;
  gap: 8px;
  align-items: center;
  min-height: 40px;
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: 13px;
  background: var(--surface-soft);
}

.product-source-note span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.product-source-note button {
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: var(--sage-dark);
  font-size: 12px;
  font-weight: 900;
}

.product-pick-grid {
  grid-template-columns: repeat(2, 1fr);
}

.pos-product-name {
  margin: 11px 0 9px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--sage-dark);
  font-size: 13px;
  font-weight: 900;
}

.pos-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.qty-stepper {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  height: 50px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.qty-stepper button, .qty-stepper input {
  border: 0;
  background: #fff;
  text-align: center;
  color: var(--sage-dark);
  font-size: 18px;
  font-weight: 900;
  min-width: 0;
}

.qty-stepper input {
  color: var(--text);
  font-size: 16px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.gift-strip {
  margin-top: 10px;
  padding: 10px;
  border-radius: 14px;
  background: #eef6ef;
  border: 1px solid #d7e8da;
}

.gift-strip span {
  display: block;
  margin-bottom: 8px;
  color: var(--sage-dark);
  font-size: 11px;
  font-weight: 900;
}

.gift-strip div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.full-gift-strip {
  display: grid;
  grid-template-columns: 1fr 82px;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
  background: var(--gold-soft);
  border: 1px solid #ead7ad;
}

.full-gift-strip strong {
  display: block;
  color: var(--gold);
  font-size: 13px;
}

.full-gift-strip span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.full-gift-strip button {
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.full-gift-strip button.active {
  background: var(--gold);
  color: #fff;
}

.full-gift-picker {
  display: none;
  margin-top: 8px;
  padding: 12px;
  border-radius: 14px;
  background: #fffaf0;
  border: 1px solid #ead7ad;
}

.full-gift-picker.open {
  display: block;
}

.full-gift-rule {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.full-gift-rule span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.full-gift-rule strong {
  color: var(--gold);
  font-size: 13px;
}

.full-gift-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  margin: 10px 0;
}

.full-gift-products {
  display: grid;
  gap: 8px;
}

.full-gift-products button {
  width: 100%;
  min-height: 56px;
  border: 1.5px solid #ead7ad;
  border-radius: 13px;
  background: #fff;
  text-align: left;
  padding: 10px 12px;
}

.full-gift-products button.active {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.full-gift-products strong {
  display: block;
  color: var(--text);
  font-size: 13px;
}

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

.pos-cart {
  display: grid;
  gap: 8px;
}

.cart-empty {
  padding: 16px;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.pos-cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.pos-cart-item strong {
  display: block;
  font-size: 14px;
}

.pos-cart-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.pos-cart-item b {
  font-variant-numeric: tabular-nums;
}

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

.fulfillment-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.voucher-input {
  display: none;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  margin-top: 9px;
  padding: 10px;
  border-radius: 14px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.voucher-input.show {
  display: grid;
}

.voucher-input input {
  min-width: 0;
  height: 38px;
  border: 1.5px solid #c5dae5;
  border-radius: 11px;
  padding: 0 10px;
  outline: 0;
  text-align: right;
  font-weight: 900;
}

.pay-grid {
  grid-template-columns: repeat(3, 1fr);
}

.pos-note {
  width: 100%;
  height: 86px;
  min-height: 86px;
  margin-top: 10px;
  padding-top: 12px;
  resize: vertical;
}

.pos-submit-bar {
  position: sticky;
  bottom: 76px;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid rgba(225, 229, 222, .9);
  border-radius: 18px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgba(45, 64, 50, .12);
}

.pos-submit-bar span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.pos-submit-bar strong {
  display: block;
  margin-top: 3px;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.pos-submit-bar button {
  height: 48px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: var(--sage);
  font-size: 15px;
  font-weight: 900;
}

.pos-submit-bar button:disabled {
  opacity: .38;
}

.pill {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
}

.work-order {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.work-order:first-of-type { border-top: 0; }
.work-order strong {
  display: block;
  font-size: 14px;
}
.work-order span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}
.work-order button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--sage-soft);
  color: var(--sage-dark);
  font-size: 12px;
  font-weight: 900;
}

.goal-card {
  padding: 14px;
  border-radius: 16px;
  background: var(--sage-soft);
  border: 1px solid #d5e4da;
}

.goal-card strong, .idea-card strong {
  display: block;
  font-size: 14px;
}

.mini-progress {
  margin-top: 12px;
  background: rgba(102, 137, 117, .18);
}

.idea-card {
  margin-top: 10px;
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  border: 1.5px dashed #d8c2e5;
}

.more-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.more-list button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
}

.more-list button.active {
  border-color: rgba(35, 79, 69, .22);
  background: rgba(35, 79, 69, .08);
  color: #244d43;
}

.more-list span {
  color: var(--faint);
  font-size: 22px;
}

.ops-more-panel {
  display: none;
  gap: 9px;
  margin-top: 10px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(102, 126, 118, .14);
  box-shadow: 0 8px 20px rgba(45, 64, 50, .05);
}

.ops-more-panel.active {
  display: grid;
}

.ops-more-panel button {
  min-height: 40px;
  border: 1px solid rgba(102, 126, 118, .14);
  border-radius: 12px;
  background: rgba(246, 248, 244, .88);
  color: #244d43;
  font-size: 13px;
  font-weight: 950;
}

.ops-more-panel p,
.ops-settle-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

.more-hero {
  padding: 18px;
  border-radius: 22px;
  background:
    radial-gradient(circle at right top, rgba(201, 164, 95, .20), transparent 42%),
    var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(45, 64, 50, .05);
}

.more-hero p {
  margin: 0 0 6px;
  color: var(--sage-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
}

.more-hero strong {
  display: block;
  font-size: 20px;
  line-height: 1.3;
}

.module-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.ops-home-hero {
  display: grid;
  gap: 8px;
  padding: 20px;
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(253, 248, 235, .98), rgba(232, 243, 236, .95)),
    radial-gradient(circle at 92% 12%, rgba(103, 145, 126, .18), transparent 34%),
    radial-gradient(circle at 12% 88%, rgba(201, 164, 95, .16), transparent 36%);
  border: 1px solid rgba(102, 126, 118, .16);
  box-shadow: 0 16px 32px rgba(70, 88, 80, .08);
}

.ops-home-hero span {
  color: #557261;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .14em;
}

.ops-home-hero strong {
  color: #203f38;
  font-size: 30px;
  line-height: 1.08;
}

.ops-home-hero p {
  max-width: 310px;
  margin: 0;
  color: rgba(35, 79, 69, .64);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.55;
}

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

.module-card {
  display: block;
  width: 100%;
  min-height: 142px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(45, 64, 50, .05);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.ops-module-grid .module-card {
  position: relative;
  display: block;
  min-height: 148px;
  padding: 14px;
  overflow: hidden;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(242, 247, 241, .92)),
    radial-gradient(circle at 100% 0, rgba(196, 166, 94, .12), transparent 42%);
  border: 1px solid rgba(102, 126, 118, .16);
  box-shadow: 0 14px 28px rgba(70, 88, 80, .07);
}

.ops-module-grid .module-card::after {
  content: none;
}

.ops-module-grid .module-card::before {
  content: none;
}

.ops-module-grid .module-card:nth-child(2) {
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(248, 238, 232, .92)),
    radial-gradient(circle at 100% 0, rgba(207, 140, 128, .13), transparent 42%);
}

.ops-module-grid .module-card:nth-child(2)::before {
  width: 55%;
  background: linear-gradient(90deg, #b77b72, #cba592);
}

.ops-module-grid .module-card:nth-child(3) {
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(250, 242, 224, .94)),
    radial-gradient(circle at 100% 0, rgba(201, 164, 95, .15), transparent 42%);
}

.ops-module-grid .module-card:nth-child(3)::before {
  width: 64%;
  background: linear-gradient(90deg, #c9a45f, #8da86e);
}

.ops-module-grid .module-card:nth-child(4) {
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(231, 240, 244, .92)),
    radial-gradient(circle at 100% 0, rgba(114, 155, 176, .14), transparent 42%);
}

.ops-module-grid .module-card:nth-child(4)::before {
  width: 48%;
  background: linear-gradient(90deg, #729bb0, #6b917e);
}

.module-card.active {
  border-color: rgba(35, 79, 69, .26);
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(232, 244, 237, .95)),
    radial-gradient(circle at 100% 0, rgba(107, 145, 126, .18), transparent 42%);
}

.module-card:active {
  transform: translateY(1px);
}

.module-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
}

.ops-module-grid .module-icon {
  width: 38px;
  height: 38px;
  margin: 0 0 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}

.ops-module-grid .module-copy {
  min-width: 0;
}

.module-card strong {
  display: block;
  font-size: 15px;
}

.ops-module-grid .module-card strong {
  color: #203f38;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: 0;
}

.module-card small {
  display: block;
  min-height: 32px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.ops-module-grid .module-card small {
  min-height: 0;
  margin-top: 6px;
  padding-bottom: 0;
  color: rgba(35, 79, 69, .62);
  font-size: 11px;
  font-weight: 850;
}

.ops-module-grid .module-card em {
  display: inline-flex;
  width: fit-content;
  margin-top: 9px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: #6f815a;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.module-card b {
  display: block;
  margin-top: 10px;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.ops-module-grid .module-card b {
  display: inline-flex;
  margin-top: 10px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.62);
  color: #6e5a30;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.partner-manager {
  display: grid;
  gap: 12px;
}

.partner-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.partner-stat-grid article {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(102, 126, 118, .14);
}

.partner-stat-grid span,
.partner-search-box span,
.partner-form-grid span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.partner-stat-grid b {
  display: block;
  margin-top: 4px;
  color: #234f45;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.partner-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.partner-search-box,
.partner-form-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.partner-search-box input,
.partner-form-grid input,
.partner-form-grid select,
.partner-form-grid textarea {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid rgba(102, 126, 118, .16);
  border-radius: 12px;
  background: rgba(255,255,255,.9);
  color: #1f3f38;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
}

.partner-form-grid textarea {
  min-height: 78px;
  padding: 10px 11px;
  resize: vertical;
}

.partner-form-grid select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 30px;
  background:
    linear-gradient(45deg, transparent 50%, #7f9189 50%) calc(100% - 17px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, #7f9189 50%, transparent 50%) calc(100% - 12px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, rgba(255,255,255,.94), rgba(246, 248, 244, .9));
}

.partner-add-btn,
.partner-save-btn,
.partner-edit-head button,
.partner-card-actions button {
  min-height: 40px;
  border: 1px solid rgba(35, 79, 69, .18);
  border-radius: 12px;
  background: #244d43;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
}

.partner-add-btn {
  padding: 0 13px;
  white-space: nowrap;
}

.partner-type-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  overflow: visible;
}

.partner-type-row button {
  flex: 1 1 calc(33.333% - 7px);
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(102, 126, 118, .14);
  border-radius: 999px;
  background: rgba(255,255,255,.68);
  color: #53616c;
  font-size: 12px;
  font-weight: 900;
}

.partner-type-row button.add-type {
  border-style: dashed;
  background: rgba(255,255,255,.42);
  color: #7a8c86;
}

.partner-type-row button.active {
  background: #244d43;
  border-color: #244d43;
  color: #fff;
}

.partner-edit-card,
.partner-manage-card {
  padding: 16px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(247, 244, 239, .88)),
    radial-gradient(circle at 100% 0, rgba(207, 140, 128, .08), transparent 42%);
  border: 1px solid rgba(102, 126, 118, .13);
  box-shadow: 0 12px 24px rgba(60, 78, 70, .055);
}

.partner-edit-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.partner-edit-head strong {
  color: #1f3f38;
  font-size: 14px;
}

.partner-edit-head button,
.partner-card-actions button {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(35, 79, 69, .08);
  color: #244d43;
}

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

.partner-form-grid .wide {
  grid-column: 1 / -1;
}

.partner-cheque-days.is-hidden {
  display: none;
}

.partner-type-add-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255,255,255,.72);
  border: 1px dashed rgba(102, 126, 118, .22);
}

.partner-type-add-card input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid rgba(102, 126, 118, .16);
  border-radius: 11px;
  background: rgba(255,255,255,.9);
  color: #1f3f38;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
}

.partner-type-add-card button {
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid rgba(35, 79, 69, .18);
  border-radius: 11px;
  background: #244d43;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

.partner-type-add-card button:last-child {
  background: rgba(35, 79, 69, .08);
  color: #244d43;
}

.partner-save-btn {
  width: 100%;
  margin-top: 12px;
}

.partner-list {
  display: grid;
  gap: 10px;
}

.partner-card-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.partner-card-topline strong {
  display: block;
  color: #1f3f38;
  font-size: 19px;
  line-height: 1.2;
}

.partner-card-topline span {
  display: inline-flex;
  margin-top: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(116, 137, 134, .12);
  color: #637a76;
  font-size: 10px;
  font-weight: 900;
}

.partner-card-topline b {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(95, 158, 116, .14);
  color: #44794f;
  font-size: 11px;
  font-weight: 950;
}

.partner-manage-card.status-pause {
  opacity: .72;
}

.partner-manage-card.status-end {
  opacity: .58;
}

.partner-manage-card.status-pause .partner-card-topline b {
  background: rgba(168, 145, 111, .14);
  color: #806b4f;
}

.partner-manage-card.status-end .partner-card-topline b {
  background: rgba(120, 120, 120, .12);
  color: #727272;
}

.partner-meta-grid,
.partner-meta-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.partner-meta-grid span {
  min-width: 0;
  padding: 8px 9px;
  border-radius: 11px;
  background: rgba(248, 247, 243, .76);
  color: #53616c;
  font-size: 11px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

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

.partner-meta-list div {
  min-width: 0;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(102, 126, 118, .08);
}

.partner-meta-list span,
.partner-meta-list b,
.partner-meta-list small {
  display: block;
}

.partner-meta-list span {
  color: #7b877d;
  font-size: 10px;
  font-weight: 950;
}

.partner-meta-list b {
  margin-top: 4px;
  color: #203f38;
  font-size: 12px;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.partner-meta-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.partner-manage-card p {
  margin: 12px 0 0;
  padding: 10px 11px;
  border: 0;
  border-radius: 14px;
  background: rgba(246, 248, 244, .72);
  color: rgba(38, 64, 55, .68);
  font-size: 12px;
  line-height: 1.55;
}

.partner-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.partner-card-actions button {
  min-width: 72px;
  min-height: 32px;
  padding: 0 13px;
}

.partner-card-actions button:last-child {
  background: rgba(162, 116, 107, .1);
  border-color: rgba(162, 116, 107, .18);
  color: #9a5f57;
}

.partner-empty {
  padding: 18px;
  border-radius: 16px;
  background: rgba(255,255,255,.72);
  border: 1px dashed rgba(102, 126, 118, .24);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.ops-tool-panel {
  display: grid;
  gap: 12px;
}

.ops-tool-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ops-tool-tabs button {
  min-height: 38px;
  border: 1px solid rgba(102, 126, 118, .14);
  border-radius: 12px;
  background: rgba(255,255,255,.72);
  color: #53616c;
  font-size: 12px;
  font-weight: 950;
}

.ops-tool-tabs button.active {
  background: #244d43;
  border-color: #244d43;
  color: #fff;
}

.ops-card-list {
  display: grid;
  gap: 10px;
}

.ops-edit-card,
.ops-manage-card {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(102, 126, 118, .14);
  box-shadow: 0 10px 24px rgba(60, 78, 70, .06);
}

.ops-manage-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.ops-manage-head strong {
  display: block;
  color: #1f3f38;
  font-size: 15px;
}

.ops-manage-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.ops-manage-head b {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(95, 158, 116, .14);
  color: #44794f;
  font-size: 10px;
  font-weight: 950;
}

.ops-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.ops-mini-grid span {
  padding: 8px 9px;
  border-radius: 11px;
  background: rgba(248, 247, 243, .76);
  color: #53616c;
  font-size: 11px;
  font-weight: 850;
}

.ops-manage-card p {
  margin: 10px 0 0;
  color: rgba(38, 64, 55, .68);
  font-size: 12px;
  line-height: 1.55;
}

.ops-manage-card > button {
  width: 100%;
  min-height: 34px;
  margin-top: 11px;
  border: 1px solid rgba(162, 116, 107, .18);
  border-radius: 12px;
  background: rgba(162, 116, 107, .1);
  color: #9a5f57;
  font-size: 12px;
  font-weight: 950;
}

.ops-calc-result {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(102, 126, 118, .14);
  color: #53616c;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.55;
}

/* 營運內頁：保留柔和層次，但不硬塞大型標題卡 */
#opsPreview {
  background:
    linear-gradient(180deg, rgba(235, 244, 238, .84), rgba(248, 247, 242, .96)),
    radial-gradient(circle at 100% 0, rgba(201, 164, 95, .12), transparent 38%);
}

.finance-workbench,
.partner-manager,
.ops-tool-panel {
  position: relative;
  display: grid;
  gap: 14px;
}

.finance-workbench {
  padding: 0;
}

.finance-date-chip {
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,.88), rgba(232, 244, 237, .78));
  box-shadow: 0 8px 20px rgba(70, 88, 80, .045);
  color: #203f38;
  font-size: 15px;
}

.finance-date-chip::after {
  content: "財務";
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: #557261;
  font-size: 11px;
  font-weight: 950;
}

.ops-page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(102, 126, 118, .14);
  box-shadow: 0 8px 20px rgba(70, 88, 80, .045);
}

.ops-page-head.rose {
  background: linear-gradient(135deg, rgba(255,255,255,.88), rgba(248, 238, 232, .76));
}

.ops-page-head.gold {
  background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(249, 241, 220, .78));
}

.ops-page-head.blue {
  background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(231, 240, 244, .78));
}

.ops-page-head span {
  display: block;
  color: #557261;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .12em;
}

.ops-page-head strong {
  display: block;
  margin-top: 4px;
  color: #203f38;
  font-size: 20px;
  line-height: 1.18;
}

.ops-page-head p {
  margin: 5px 0 0;
  color: rgba(35, 79, 69, .64);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.5;
}

.ops-page-chips {
  display: grid;
  gap: 6px;
}

.ops-page-chips b {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: #6e5a30;
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

.partner-toolbar,
.campaign-switcher,
.product-view-tabs,
.finance-tab-wrap {
  padding: 8px;
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(102, 126, 118, .12);
  box-shadow: 0 8px 20px rgba(70, 88, 80, .045);
}

.partner-toolbar {
  grid-template-columns: 1fr;
}

.partner-add-btn,
.campaign-add,
.product-sheet-sync {
  border-radius: 999px;
}

.partner-edit-card,
.partner-manage-card,
.ops-edit-card,
.ops-manage-card,
.product-list-card,
.product-cost-card,
.campaign-main-card,
.discount-calc-card,
.combo-ai-panel,
.combo-ai-card,
.year-plan-overview,
.year-plan-card {
  border-radius: 20px;
  box-shadow: 0 14px 28px rgba(70, 88, 80, .065);
}

.partner-manage-card,
.ops-manage-card,
.product-list-card,
.product-cost-card {
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(247, 248, 244, .94)),
    radial-gradient(circle at 100% 0, rgba(107, 145, 126, .08), transparent 40%);
}

.partner-card-topline strong,
.ops-manage-head strong,
.product-list-main strong,
.product-cost-card-head strong,
.finance-section-head strong {
  font-size: 17px;
  line-height: 1.25;
}

.partner-meta-grid span,
.ops-mini-grid span,
.product-cost-summary div,
.product-cost-breakdown div,
.finance-quick-grid article,
.finance-account-grid article {
  border-radius: 16px;
  background: rgba(255,255,255,.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}

.partner-type-row button,
.campaign-status-pills button,
.product-view-tabs button,
.campaign-switcher button,
.finance-tab-line button {
  border-radius: 999px;
}

.finance-alert-list article,
.finance-task-pipeline article,
.finance-checklist label {
  border-radius: 18px;
  background: rgba(255,255,255,.78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}

.finance-alert-list button,
.finance-task-pipeline button,
.finance-action-grid button {
  border-radius: 999px;
}

.product-view-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.product-view-tabs button {
  min-height: 40px;
  border: 1px solid rgba(102, 126, 118, .14);
  border-radius: 13px;
  background: rgba(255,255,255,.72);
  color: #53616c;
  font-size: 13px;
  font-weight: 950;
}

.product-view-tabs button.active {
  background: #244d43;
  border-color: #244d43;
  color: #fff;
  box-shadow: 0 8px 18px rgba(35, 79, 69, .14);
}

.product-sheet-sync {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(102, 126, 118, .14);
  border-radius: 13px;
  background: rgba(255,255,255,.64);
  color: #66756a;
  font-size: 12px;
  font-weight: 900;
}

.product-sheet-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.product-sheet-sync.alt {
  color: #234f45;
  border-color: rgba(35, 79, 69, .2);
  background: rgba(221, 232, 223, .72);
}

.product-sheet-sync.danger {
  color: #8f594e;
  border-color: rgba(143, 89, 78, .2);
  background: rgba(248, 239, 235, .8);
}

.product-cost-editor {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(246, 248, 244, .82);
  border: 1px solid rgba(102, 126, 118, .1);
}

.product-cost-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.product-cost-editor-head strong {
  color: #234f45;
  font-size: 13px;
}

.product-cost-editor-head button {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(35, 79, 69, .1);
  color: #244d43;
  font-size: 11px;
  font-weight: 950;
}

.product-cost-editor-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(227, 240, 232, .72);
  border: 1px solid rgba(67, 129, 104, .16);
  color: rgba(35, 79, 69, .74);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.55;
}

.product-template-status {
  margin: -4px 0 2px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(235, 242, 237, .74);
  border: 1px solid rgba(67, 129, 104, .14);
  color: rgba(35, 79, 69, .72);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
}

.product-cost-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 96px 128px 128px;
  gap: 8px;
}

.product-list-stack,
.product-cost-list {
  display: grid;
  gap: 10px;
}

.product-list-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 15px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(244, 248, 241, .9)),
    radial-gradient(circle at 100% 0, rgba(196, 166, 94, .1), transparent 42%);
  border: 1px solid rgba(102, 126, 118, .15);
  box-shadow: 0 12px 24px rgba(70, 88, 80, .055);
}

.product-list-id {
  padding-top: 2px;
}

.product-list-id span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  min-width: 46px;
  padding: 0 8px;
  border-radius: 12px;
  background: rgba(111, 129, 90, .12);
  color: #6f815a;
  font-size: 11px;
  font-weight: 950;
}

.product-list-main {
  min-width: 0;
}

.product-list-main strong {
  display: block;
  color: #203f38;
  font-size: 16px;
  line-height: 1.3;
}

.product-list-main span {
  display: inline-flex;
  width: fit-content;
  margin-top: 7px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(35, 79, 69, .07);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.product-list-profit {
  text-align: right;
  white-space: nowrap;
  padding-top: 2px;
}

.product-list-profit b {
  display: block;
  color: #234f45;
  font-size: 15px;
}

.product-list-profit span {
  display: inline-flex;
  margin-top: 7px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(196, 166, 94, .16);
  color: #80662f;
  font-size: 11px;
  font-weight: 950;
}

.product-card-actions {
  grid-column: 3;
  display: flex;
  gap: 7px;
  justify-self: end;
}

.product-card-actions button {
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid rgba(95, 126, 107, .18);
  border-radius: 999px;
  background: rgba(255,255,255,.62);
  color: #496d58;
  font-size: 11px;
  font-weight: 950;
}

.product-card-actions button:last-child {
  border-color: rgba(162, 116, 107, .18);
  color: #9a5f57;
}

.product-margin-overview {
  display: grid;
  gap: 13px;
  padding: 16px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(241, 247, 241, .88)),
    radial-gradient(circle at 100% 0, rgba(91, 132, 112, .12), transparent 42%);
  border: 1px solid rgba(102, 126, 118, .15);
  box-shadow: 0 10px 22px rgba(70, 88, 80, .045);
}

.product-margin-title {
  display: grid;
  gap: 4px;
}

.product-margin-title span {
  color: #6f815a;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .08em;
}

.product-margin-title p {
  margin: 0;
  color: rgba(35, 79, 69, .66);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

.product-margin-overview > div:last-child {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.product-margin-overview b {
  padding: 11px;
  border-radius: 12px;
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(102, 126, 118, .1);
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
}

.product-margin-overview strong {
  display: block;
  margin-top: 4px;
  color: #234f45;
  font-size: 16px;
}

.product-cost-card {
  display: grid;
  gap: 12px;
  padding: 15px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(247, 248, 244, .94)),
    radial-gradient(circle at 100% 0, rgba(107, 145, 126, .1), transparent 40%);
  border: 1px solid rgba(102, 126, 118, .14);
  box-shadow: 0 12px 24px rgba(70, 88, 80, .055);
}

.product-cost-card.good {
  border-color: rgba(91, 141, 103, .2);
}

.product-cost-card.ok {
  border-color: rgba(189, 151, 77, .22);
}

.product-cost-card.risk {
  border-color: rgba(164, 107, 98, .23);
}

.product-cost-card-head div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.product-cost-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.product-cost-card-head strong {
  color: #203f38;
  font-size: 16px;
  line-height: 1.35;
}

.product-cost-card-head small {
  color: rgba(35, 79, 69, .58);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.35;
}

.product-cost-card-head span {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(35, 79, 69, .1);
  color: #244d43;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.product-cost-card.good .product-cost-card-head span {
  background: rgba(92, 143, 104, .14);
  color: #3f744c;
}

.product-cost-card.ok .product-cost-card-head span {
  background: rgba(188, 150, 76, .16);
  color: #80652e;
}

.product-cost-card.risk .product-cost-card-head span {
  background: rgba(164, 107, 98, .16);
  color: #89594f;
}

.product-cost-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.product-cost-metrics div {
  min-width: 0;
  padding: 10px 9px;
  border-radius: 12px;
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(102, 126, 118, .1);
}

.product-cost-metrics span {
  display: block;
  color: rgba(35, 79, 69, .58);
  font-size: 10px;
  font-weight: 950;
}

.product-cost-metrics b {
  display: block;
  margin-top: 5px;
  color: #203f38;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.1;
}

.product-cost-progress {
  height: 9px;
  border-radius: 999px;
  background: rgba(102, 126, 118, .12);
  overflow: hidden;
}

.product-cost-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c4a65e, #2f6659);
}

.product-cost-card.risk .product-cost-progress i {
  background: linear-gradient(90deg, #b98173, #c4a65e);
}

.product-cost-breakdown {
  display: grid;
  gap: 9px;
}

.product-cost-line {
  display: grid;
  grid-template-columns: minmax(72px, 1fr) minmax(72px, 1.15fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.product-cost-line span {
  color: rgba(35, 79, 69, .74);
  font-size: 12px;
  font-weight: 900;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-cost-line em {
  display: block;
  height: 7px;
  border-radius: 999px;
  background: rgba(102, 126, 118, .12);
  overflow: hidden;
}

.product-cost-line em i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #bfa05b;
}

.product-cost-line b {
  color: #234f45;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.product-cost-empty {
  padding: 11px;
  border-radius: 12px;
  background: rgba(255,255,255,.6);
  border: 1px dashed rgba(102, 126, 118, .24);
  color: rgba(35, 79, 69, .58);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.product-cost-versions {
  display: grid;
  gap: 7px;
  padding-top: 10px;
  border-top: 1px solid rgba(102, 126, 118, .14);
}

.product-cost-versions > strong {
  color: rgba(35, 79, 69, .72);
  font-size: 12px;
  font-weight: 950;
}

.product-cost-versions div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, auto) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(102, 126, 118, .12);
}

.product-cost-versions div.active {
  background: rgba(227, 240, 232, .78);
  border-color: rgba(67, 129, 104, .2);
}

.product-cost-versions span,
.product-cost-versions em,
.product-cost-versions b {
  min-width: 0;
  font-size: 11px;
  font-weight: 900;
}

.product-cost-versions span {
  color: #234f45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-cost-versions em {
  color: rgba(35, 79, 69, .58);
  font-style: normal;
  white-space: nowrap;
}

.product-cost-versions b {
  color: #203f38;
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .product-cost-row {
    grid-template-columns: minmax(0, 1fr) 92px;
  }

  .product-cost-versions div {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .product-cost-versions em {
    grid-column: 1 / -1;
  }
}

.ops-focus-bottom {
  margin-top: 42px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, #f8f5e9, #eef6ef);
  border: 1px solid rgba(138, 166, 139, .22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72), 0 10px 24px rgba(70, 88, 80, .06);
}

.ops-focus-bottom article {
  padding: 16px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(247, 242, 224, .9)),
    radial-gradient(circle at 100% 0, rgba(196, 166, 94, .14), transparent 44%);
  border-color: rgba(196, 166, 94, .18);
  box-shadow: 0 10px 20px rgba(90, 86, 66, .05);
}

.ops-focus-bottom article:nth-child(2) {
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(229, 243, 237, .9)),
    radial-gradient(circle at 100% 0, rgba(104, 151, 130, .14), transparent 44%);
  border-color: rgba(104, 151, 130, .18);
}

.ops-focus-bottom article:nth-child(3) {
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(232, 241, 243, .9)),
    radial-gradient(circle at 100% 0, rgba(107, 145, 156, .13), transparent 44%);
  border-color: rgba(107, 145, 156, .17);
}

.ops-focus-bottom span {
  color: #5f7f70;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .04em;
}

.ops-focus-bottom strong {
  color: #234f45;
  font-size: 19px;
  line-height: 1.25;
}

.ops-focus-bottom small {
  color: rgba(35, 79, 69, .68);
  font-size: 13px;
  font-weight: 800;
}

.campaign-main-card {
  padding: 16px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 8%, rgba(242, 232, 204, .5), transparent 34%),
    linear-gradient(135deg, #819b8b 0%, #6f8a7d 42%, #5d796e 100%);
  color: #fff;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 16px 30px rgba(84, 115, 96, .14);
}

.campaign-home-focus {
  padding: 15px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 94% 8%, rgba(255, 255, 255, .84), transparent 34%),
    linear-gradient(135deg, rgba(236, 246, 238, .96), rgba(221, 237, 227, .9));
  border: 1px solid rgba(103, 143, 119, .22);
  box-shadow: 0 10px 22px rgba(84, 115, 96, .07);
}

.campaign-home-focus span {
  display: block;
  color: #5d7c6b;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .04em;
}

.campaign-home-focus strong {
  display: block;
  margin-top: 6px;
  color: #234f45;
  font-size: 20px;
  line-height: 1.25;
}

.campaign-home-focus p {
  margin: 7px 0 0;
  color: rgba(35, 79, 69, .7);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.5;
}

.campaign-main-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.campaign-main-head span {
  display: block;
  margin-bottom: 4px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
  color: rgba(255, 253, 244, .76);
}

.campaign-main-head strong {
  display: block;
  font-size: 16px;
  line-height: 1.35;
}

.campaign-main-head div:last-child {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

.campaign-main-head button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 11px;
  background: rgba(255,255,255,.18);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}

.campaign-main-body {
  display: grid;
  gap: 6px;
  font-size: 12px;
}

.campaign-main-body div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
}

.campaign-main-body span {
  color: rgba(255, 253, 244, .78);
  font-weight: 800;
}

.campaign-main-body b {
  min-width: 0;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.campaign-main-form input {
  border-color: rgba(255,255,255,.25);
  background: rgba(255,255,255,.16);
  color: #fff;
}

.campaign-main-form span {
  color: rgba(255,255,255,.78);
}

.campaign-history-btn {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(102, 126, 118, .14);
  border-radius: 13px;
  background: rgba(255,255,255,.72);
  color: #53616c;
  font-size: 12px;
  font-weight: 950;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.campaign-history-btn span {
  color: var(--muted);
  font-size: 11px;
}

.campaign-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.campaign-switcher {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 2px 0 8px;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.campaign-switcher button {
  position: relative;
  grid-column: span 2;
  min-height: 38px;
  border: 1px solid rgba(111, 132, 121, .16);
  border-radius: 14px;
  background: rgba(255,255,255,.58);
  color: #596964;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.2;
  box-shadow: 0 5px 14px rgba(70, 88, 80, .035);
}

.campaign-switcher button.active {
  border-color: rgba(93, 137, 112, .3);
  background:
    linear-gradient(135deg, rgba(235, 246, 238, .96), rgba(246, 240, 224, .78));
  color: #244d43;
  box-shadow: 0 8px 18px rgba(70, 88, 80, .08);
}

.campaign-switcher button:nth-child(4) {
  grid-column: span 3;
}

.campaign-switcher button:nth-child(5) {
  grid-column: span 3;
}

.campaign-status-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 2px;
}

.campaign-status-pills button {
  flex: 1 1 0;
  min-height: 34px;
  border: 1px solid rgba(102, 126, 118, .14);
  border-radius: 999px;
  background: rgba(255,255,255,.68);
  color: #53616c;
  font-size: 12px;
  font-weight: 950;
}

.campaign-status-pills button.active {
  background: rgba(35, 79, 69, .1);
  border-color: rgba(35, 79, 69, .22);
  color: #244d43;
}

.campaign-status-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.campaign-status-row button {
  min-height: 36px;
  border: 1px solid rgba(102, 126, 118, .14);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: #53616c;
  font-size: 12px;
  font-weight: 950;
}

.campaign-status-row button.active {
  background: #244d43;
  border-color: #244d43;
  color: #fff;
}

.campaign-add {
  width: 100%;
}

.campaign-card.live {
  border-color: rgba(95, 158, 116, .28);
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(238, 248, 242, .9)),
    radial-gradient(circle at 100% 0, rgba(95, 158, 116, .1), transparent 42%);
}

.campaign-card.soon {
  border-color: rgba(168, 145, 111, .28);
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(249, 241, 220, .9)),
    radial-gradient(circle at 100% 0, rgba(201, 164, 95, .11), transparent 42%);
}

.campaign-card.done {
  opacity: .68;
}

.campaign-card {
  position: relative;
  display: grid;
  gap: 12px;
  overflow: hidden;
  padding: 17px;
  border-radius: 22px;
}

.campaign-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 5px;
  border-radius: 0 999px 999px 0;
  background: rgba(196, 166, 94, .55);
}

.campaign-card.live::before {
  background: rgba(95, 158, 116, .58);
}

.campaign-card.soon::before {
  background: rgba(196, 166, 94, .58);
}

.campaign-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.campaign-card-top strong,
.campaign-card-top span {
  display: block;
  min-width: 0;
}

.campaign-card-top strong {
  color: #203f38;
  font-size: 18px;
  line-height: 1.25;
}

.campaign-card-top span {
  margin-top: 6px;
  color: #64746d;
  font-size: 12px;
  font-weight: 900;
}

.campaign-card-top > b {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(95, 158, 116, .14);
  color: #4f7b5b;
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

.campaign-card.soon .campaign-card-top > b {
  background: rgba(196, 166, 94, .16);
  color: #80662f;
}

.campaign-card.done .campaign-card-top > b {
  background: rgba(126, 139, 129, .12);
  color: #6b746f;
}

.campaign-meta-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.campaign-date-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 14px;
  background: rgba(231, 240, 244, .72);
  border: 1px solid rgba(91, 116, 132, .1);
  color: #5b7484;
}

.campaign-meta-strip span {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 38px;
  padding: 0 11px;
  border-radius: 14px;
  border: 1px solid transparent;
}

.campaign-meta-strip .goal {
  background: rgba(247, 238, 219, .78);
  border-color: rgba(125, 102, 55, .11);
  color: #7d6637;
}

.campaign-meta-strip .type {
  background: rgba(248, 233, 229, .72);
  border-color: rgba(138, 98, 93, .1);
  color: #8a625d;
}

.campaign-meta-strip .owner {
  background: rgba(230, 240, 233, .78);
  border-color: rgba(77, 111, 93, .1);
  color: #4d6f5d;
}

.campaign-date-row em,
.campaign-date-row b,
.campaign-meta-strip em,
.campaign-meta-strip b {
  min-width: 0;
  white-space: nowrap;
  line-height: 1;
}

.campaign-date-row em,
.campaign-meta-strip em {
  font-style: normal;
  font-size: 11px;
  font-weight: 950;
  opacity: .76;
}

.campaign-date-row b,
.campaign-meta-strip b {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  font-weight: 950;
}

.campaign-date-row b {
  overflow: visible;
  text-overflow: clip;
}

.campaign-block-title {
  margin-top: 12px;
  color: #6f815a;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .08em;
}

.campaign-card .ops-mini-grid span {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  min-width: 0;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(102, 126, 118, .08);
  background: rgba(255,255,255,.78);
}

.campaign-card .ops-mini-grid em,
.campaign-card .ops-mini-grid b {
  display: block;
  min-width: 0;
  white-space: nowrap;
  line-height: 1;
}

.campaign-card .ops-mini-grid em {
  font-style: normal;
  opacity: .78;
}

.campaign-card .ops-mini-grid b {
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 950;
}

.campaign-card .ops-mini-grid .tone-blue {
  background: rgba(231, 240, 244, .72);
  color: #5b7484;
}

.campaign-card .ops-mini-grid .tone-gold {
  background: rgba(247, 238, 219, .78);
  color: #7d6637;
}

.campaign-card .ops-mini-grid .tone-rose {
  background: rgba(248, 233, 229, .72);
  color: #8a625d;
}

.campaign-card .ops-mini-grid .tone-sage {
  background: rgba(230, 240, 233, .78);
  color: #4d6f5d;
}

.campaign-detail-list {
  display: grid;
  gap: 8px;
  margin-top: 0;
}

.campaign-detail-list span {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding: 11px 12px;
  border-radius: 15px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(196, 166, 94, .14);
  color: #53616c;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
}

.campaign-detail-list em,
.campaign-detail-list b {
  min-width: 0;
}

.campaign-detail-list em {
  color: #8b7040;
  font-style: normal;
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

.campaign-detail-list b {
  color: #42514a;
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.campaign-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 0;
}

.campaign-card-actions button {
  min-height: 32px;
  padding: 0 13px;
  border: 1px solid rgba(95, 126, 107, .18);
  border-radius: 999px;
  background: rgba(255,255,255,.68);
  color: #496d58;
  font-size: 12px;
  font-weight: 950;
}

.campaign-card-actions button:last-child {
  border-color: rgba(162, 116, 107, .18);
  background: rgba(162, 116, 107, .08);
  color: #9a5f57;
}

.discount-calc-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.84);
  border: 1px solid rgba(102, 126, 118, .14);
}

.discount-calc-head,
.combo-ai-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.discount-calc-head strong,
.combo-ai-head strong {
  color: #1f3f38;
  font-size: 15px;
}

.discount-calc-head button,
.combo-ai-head button {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  background: rgba(35, 79, 69, .08);
  color: #244d43;
  font-weight: 950;
}

.discount-fee-summary,
.discount-floor {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: rgba(248, 247, 243, .8);
}

.discount-fee-summary span,
.discount-floor span,
.discount-fee-title,
.discount-preview-title,
.combo-ai-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
}

.discount-fee-summary b,
.discount-floor strong {
  color: #234f45;
  font-size: 20px;
  font-weight: 950;
}

.discount-floor {
  display: grid;
  gap: 4px;
}

.discount-floor p {
  margin: 0;
  color: rgba(35, 79, 69, .68);
  font-size: 12px;
  font-weight: 850;
}

.discount-labor-note {
  display: grid;
  gap: 9px;
  padding: 13px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(248, 239, 235, .78), rgba(255,255,255,.76));
  border: 1px solid rgba(162, 116, 107, .16);
}

.discount-labor-note > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.discount-labor-note span {
  color: #8a6158;
  font-size: 11px;
  font-weight: 950;
}

.discount-labor-note b {
  color: #234f45;
  font-size: 15px;
  font-weight: 950;
}

.discount-labor-note p {
  margin: 0;
  color: rgba(35, 79, 69, .68);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
}

.discount-labor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.discount-labor-grid span {
  display: grid;
  gap: 4px;
  padding: 9px 8px;
  border-radius: 11px;
  background: rgba(255,255,255,.68);
  border: 1px solid rgba(162, 116, 107, .12);
}

.discount-labor-grid em {
  color: rgba(35, 79, 69, .62);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.discount-labor-grid strong {
  color: #8a5b52;
  font-size: 12px;
  font-weight: 950;
}

.discount-fee-list,
.discount-preview {
  display: grid;
  gap: 8px;
}

.discount-fee-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px 72px 28px 28px;
  gap: 7px;
  align-items: center;
}

.discount-fee-row input,
.discount-fee-row select {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(102, 126, 118, .14);
  border-radius: 11px;
  padding: 0 10px;
  font: inherit;
  font-weight: 850;
  background: rgba(255,255,255,.86);
}

.discount-fee-row span,
.discount-fee-row button {
  display: grid;
  place-items: center;
  min-height: 38px;
  border-radius: 11px;
  background: rgba(35, 79, 69, .08);
  color: #244d43;
  border: 0;
  font-weight: 950;
}

.discount-preview-row {
  display: grid;
  grid-template-columns: 1fr auto 44px;
  gap: 10px;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 11px;
  background: rgba(248, 247, 243, .78);
}

.discount-preview-row span,
.discount-preview-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.discount-preview-row b {
  font-size: 13px;
  font-weight: 950;
}

.discount-preview-row b.pos {
  color: #44794f;
}

.discount-preview-row b.neg {
  color: #9a5f57;
}

.combo-ai-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, #f8f5e9, #eef6ef);
  border: 1px solid rgba(138, 166, 139, .22);
}

.combo-ai-panel p {
  margin: 0;
  color: rgba(35, 79, 69, .68);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.5;
}

.combo-source-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.combo-source-grid span {
  padding: 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.74);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.combo-source-grid b {
  display: block;
  margin-top: 3px;
  color: #234f45;
  font-size: 16px;
}

.combo-ai-list {
  display: grid;
  gap: 12px;
}

.combo-ai-card {
  padding: 14px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(229, 243, 237, .9)),
    radial-gradient(circle at 100% 0, rgba(104, 151, 130, .14), transparent 44%);
  border: 1px solid rgba(104, 151, 130, .18);
  box-shadow: 0 10px 20px rgba(70, 88, 80, .05);
}

.combo-ai-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 10px;
}

.combo-ai-card-head strong {
  flex: 1 1 auto;
  min-width: 0;
  color: #1f3f38;
  font-size: 15px;
  line-height: 1.35;
}

.combo-ai-card-head span {
  display: inline-flex;
  flex: 0 0 auto;
  margin-top: 0;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(35, 79, 69, .1);
  color: #244d43;
  font-size: 10px;
  font-weight: 950;
}

.combo-ai-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.combo-ai-detail div {
  padding: 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.72);
}

.combo-ai-detail .wide {
  grid-column: 1 / -1;
}

.combo-ai-detail span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
}

.combo-ai-detail b,
.combo-ai-detail p {
  display: block;
  margin: 4px 0 0;
  color: #234f45;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.45;
}

.year-plan-overview {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 18px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(252, 249, 239, .98), rgba(239, 247, 242, .95)),
    radial-gradient(circle at 100% 0, rgba(189, 158, 92, .13), transparent 42%);
  border: 1px solid rgba(138, 166, 139, .22);
  box-shadow: 0 12px 24px rgba(70, 88, 80, .06);
}

.year-plan-overview span {
  display: block;
  margin-bottom: 8px;
  color: #6f815a;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .12em;
  line-height: 1;
}

.year-plan-overview strong {
  display: block;
  color: #203f38;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
}

.year-plan-overview p {
  margin: 8px 0 0;
  color: rgba(35, 79, 69, .66);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.55;
}

.year-plan-total {
  flex: 0 0 auto;
  min-width: 92px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.72);
  text-align: right;
}

.year-plan-total span {
  margin: 0 0 5px;
  color: #8a7954;
  font-size: 10px;
  letter-spacing: 0;
}

.year-plan-total b {
  color: #234f45;
  font-size: 15px;
  white-space: nowrap;
}

.year-plan-list {
  display: grid;
  gap: 14px;
}

.year-plan-card {
  display: grid;
  gap: 13px;
  padding: 16px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(242, 247, 241, .9)),
    radial-gradient(circle at 100% 0, rgba(196, 166, 94, .12), transparent 42%);
  border: 1px solid rgba(102, 126, 118, .16);
  box-shadow: 0 12px 24px rgba(70, 88, 80, .06);
}

.year-plan-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.year-plan-head span {
  display: inline-flex;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(35, 79, 69, .09);
  color: #244d43;
  font-size: 10px;
  font-weight: 950;
}

.year-plan-head strong {
  display: block;
  margin-top: 8px;
  color: #203f38;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0;
}

.year-plan-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.year-plan-head b {
  padding: 8px 11px;
  border-radius: 999px;
  background: #f4ead4;
  color: #7b6130;
  font-size: 12px;
  white-space: nowrap;
}

.year-plan-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(35, 79, 69, .1);
}

.year-plan-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b7893f, #6b917e);
}

.year-plan-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.year-plan-split div,
.year-plan-main div,
.year-plan-detail div {
  min-width: 0;
  padding: 10px;
  border-radius: 13px;
  background: rgba(246, 248, 244, .88);
  border: 1px solid rgba(102, 126, 118, .08);
}

.year-plan-split span,
.year-plan-main span,
.year-plan-detail span {
  display: block;
  color: #718072;
  font-size: 10px;
  font-weight: 950;
}

.year-plan-split b,
.year-plan-main b,
.year-plan-detail b {
  display: block;
  margin-top: 4px;
  color: #234f45;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.year-plan-main,
.year-plan-detail {
  display: grid;
  gap: 8px;
}

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

.year-plan-detail {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.year-plan-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 13px;
  background: rgba(245, 237, 220, .72);
  color: #725f3f;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.5;
}

.year-plan-actions {
  display: flex;
  justify-content: flex-end;
}

.year-plan-actions button {
  min-height: 32px;
  padding: 0 13px;
  border: 1px solid rgba(154, 95, 87, .16);
  border-radius: 999px;
  background: rgba(154, 95, 87, .08);
  color: #9a5f57;
  font-size: 12px;
  font-weight: 950;
}

.year-plan-actions button:active {
  transform: translateY(1px);
}

.year-plan-card .partner-delete {
  justify-self: end;
}

@media (max-width: 390px) {
  .year-plan-overview {
    display: grid;
  }

  .year-plan-total {
    width: 100%;
    text-align: left;
  }

  .year-plan-main,
  .year-plan-detail {
    grid-template-columns: 1fr;
  }
}

.ops-preview-card {
  margin-top: 12px;
  padding: 16px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(45, 64, 50, .05);
}

.ops-detail-panel {
  display: none;
}

#page-ops.detail-open .ops-index-only {
  display: none;
}

#page-ops.detail-open .ops-detail-panel {
  display: block;
  margin-top: 0;
  min-height: calc(100vh - 130px);
}

.ops-detail-top {
  display: flex;
  align-items: center;
  margin: 0 0 10px;
  padding: 0 2px;
}

.ops-back-btn {
  flex: 0 0 auto;
  width: auto;
  height: 28px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #53616c;
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
  padding: 0;
}

.ops-preview-copy {
  margin: 6px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.ops-source-link {
  display: grid;
  gap: 4px;
  margin: 0 0 12px;
  padding: 12px;
  border-radius: 15px;
  background: var(--sage-soft);
  border: 1px solid rgba(123, 145, 124, .28);
  color: var(--text);
  text-decoration: none;
}

.ops-source-link span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.ops-source-link strong {
  color: var(--sage-dark);
  font-size: 14px;
}

.ops-focus-grid {
  display: grid;
  gap: 8px;
  margin: 10px 0 12px;
}

.ops-focus-grid article {
  padding: 12px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.ops-focus-grid span,
.ops-focus-grid small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.ops-focus-grid strong {
  display: block;
  margin: 4px 0;
  font-size: 17px;
}

.ops-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.ops-metric-grid article {
  min-width: 0;
  padding: 12px 8px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
}

.ops-metric-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.ops-metric-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.3;
}

.ops-inner-block {
  margin-top: 12px;
  padding: 12px;
  border-radius: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.section-head.compact h2 {
  font-size: 16px;
}

.ops-detail-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 14px -16px 0;
  padding: 0 16px 4px;
  scrollbar-width: none;
}

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

.ops-detail-tabs button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.ops-detail-tabs button.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.ops-tab-card {
  margin-top: 10px;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
}

.ops-field-grid {
  display: grid;
  gap: 8px;
}

.ops-field-grid article {
  padding: 12px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.ops-field-grid span {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.ops-field-grid p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.ops-preview-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 42px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.ops-preview-row:first-of-type {
  border-top: 0;
}

.ops-preview-row span {
  color: var(--muted);
}

.ops-preview-row b {
  max-width: 58%;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ops-action-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.ops-action-row button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.finance-workbench {
  display: grid;
  gap: 10px;
  margin-top: 0;
}

.finance-mini-back {
  justify-self: start;
  min-height: 28px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.finance-tab-wrap {
  position: sticky;
  top: 68px;
  z-index: 8;
  display: grid;
  gap: 6px;
  padding: 6px;
  border-radius: 16px;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(71, 85, 105, .12);
  box-shadow: 0 10px 24px rgba(45, 64, 50, .08);
  backdrop-filter: blur(14px);
}

.finance-tab-line {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.finance-tab-line.secondary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.finance-tab-line.tertiary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.finance-tab-line button,
.finance-subtabs button {
  min-width: 0;
  min-height: 34px;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--finance-tab-bg, rgba(71, 85, 105, .06));
  color: var(--finance-tab-ink, #475569);
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
  cursor: pointer;
}

.finance-tab-line button span {
  margin-left: 2px;
  color: inherit;
}

.finance-tab-line button.active,
.finance-subtabs button.active {
  background: var(--finance-tab-active, #244d43);
  border-color: var(--finance-tab-active, #244d43);
  color: #fff;
  box-shadow: 0 7px 16px var(--finance-tab-shadow, rgba(35, 79, 69, .18));
}

[data-finance-tone="cash"] {
  --finance-tab-bg: rgba(125, 148, 132, .14);
  --finance-tab-ink: #617764;
  --finance-tab-active: #7d9484;
  --finance-tab-shadow: rgba(125, 148, 132, .2);
}

[data-finance-tone="profit"] {
  --finance-tab-bg: rgba(117, 138, 159, .14);
  --finance-tab-ink: #65798c;
  --finance-tab-active: #758a9f;
  --finance-tab-shadow: rgba(117, 138, 159, .2);
}

[data-finance-tone="settle"],
[data-finance-tone="dept"] {
  --finance-tab-bg: rgba(139, 128, 150, .14);
  --finance-tab-ink: #756c7f;
  --finance-tab-active: #8b8096;
  --finance-tab-shadow: rgba(139, 128, 150, .2);
}

[data-finance-tone="comfort"] {
  --finance-tab-bg: rgba(168, 145, 111, .15);
  --finance-tab-ink: #88765d;
  --finance-tab-active: #a8916f;
  --finance-tab-shadow: rgba(168, 145, 111, .18);
}

[data-finance-tone="guide"] {
  --finance-tab-bg: rgba(120, 145, 139, .15);
  --finance-tab-ink: #667e79;
  --finance-tab-active: #78918b;
  --finance-tab-shadow: rgba(120, 145, 139, .18);
}

[data-finance-tone="ai"] {
  --finance-tab-bg: rgba(128, 130, 158, .14);
  --finance-tab-ink: #6f718c;
  --finance-tab-active: #80829e;
  --finance-tab-shadow: rgba(128, 130, 158, .18);
}

[data-finance-tone="deal"],
[data-finance-tone="platform"] {
  --finance-tab-bg: rgba(166, 126, 126, .14);
  --finance-tab-ink: #8b6969;
  --finance-tab-active: #a67e7e;
  --finance-tab-shadow: rgba(166, 126, 126, .18);
}

[data-finance-tone="alert"] {
  --finance-tab-bg: rgba(162, 116, 107, .14);
  --finance-tab-ink: #85645f;
  --finance-tab-active: #a2746b;
  --finance-tab-shadow: rgba(162, 116, 107, .18);
}

[data-finance-tone="channel"] {
  --finance-tab-bg: rgba(116, 137, 134, .14);
  --finance-tab-ink: #617875;
  --finance-tab-active: #748986;
  --finance-tab-shadow: rgba(116, 137, 134, .18);
}

.finance-hero-card,
.finance-section-card {
  padding: 15px;
  border-radius: 18px;
  border: 1px solid var(--finance-card-border, rgba(255,255,255,.76));
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,255,255,.78)),
    var(--finance-card-tint, rgba(255,255,255,.78));
  box-shadow: 0 12px 28px var(--finance-card-shadow, rgba(51, 73, 58, .08));
  overflow: hidden;
  position: relative;
}

.finance-section-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--finance-accent, #244d43);
}

.finance-hero-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.94), rgba(224, 244, 235, .9)),
    radial-gradient(circle at 100% 0, rgba(67, 126, 112, .2), transparent 42%);
}

.finance-hero-card span,
.finance-quick-grid span,
.finance-section-head p,
.finance-form-grid span,
.finance-list-row span,
.finance-account-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.finance-hero-card strong {
  display: block;
  margin-top: 4px;
  color: #1f3f38;
  font-size: 30px;
  line-height: 1;
}

.finance-hero-card p {
  margin: 8px 0 0;
  color: rgba(38, 64, 55, .68);
  font-size: 12px;
  line-height: 1.5;
}

.finance-hero-card > b {
  align-self: flex-start;
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: #244d43;
  color: #fff;
  font-size: 12px;
}

.finance-quick-grid,
.finance-account-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

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

.finance-quick-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.finance-date-chip,
.finance-info-note {
  padding: 10px 12px;
  border-radius: 13px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(74, 105, 82, .12);
  color: #244d43;
  font-size: 12px;
  font-weight: 900;
}

.finance-info-note {
  background: rgba(224, 244, 235, .72);
  color: rgba(38, 64, 55, .78);
  line-height: 1.7;
  font-weight: 750;
}

.finance-tab-panel {
  display: none;
}

.finance-tab-panel.active {
  display: grid;
  gap: 12px;
  animation: enter .22s ease both;
}

.finance-quick-grid article,
.finance-account-grid article {
  min-width: 0;
  padding: 12px 9px;
  border-radius: 16px;
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(71, 85, 105, .1);
}

.finance-quick-grid strong,
.finance-account-grid strong {
  display: block;
  margin-top: 5px;
  color: #1f3f38;
  font-size: 16px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.finance-quick-grid small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.finance-section-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.finance-section-head > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--finance-accent, #244d43);
  color: #fff;
  font-size: 11px;
  font-weight: 950;
}

.finance-card-income,
.finance-card-cash {
  --finance-accent: #7d9484;
  --finance-card-border: rgba(125, 148, 132, .2);
  --finance-card-tint: rgba(232, 238, 231, .86);
  --finance-card-shadow: rgba(125, 148, 132, .08);
}

.finance-card-fixed,
.finance-card-variable,
.finance-card-spend {
  --finance-accent: #a67e7e;
  --finance-card-border: rgba(166, 126, 126, .18);
  --finance-card-tint: rgba(241, 231, 229, .82);
  --finance-card-shadow: rgba(166, 126, 126, .08);
}

.finance-card-receivable,
.finance-card-runway,
.finance-card-safety {
  --finance-accent: #a8916f;
  --finance-card-border: rgba(168, 145, 111, .2);
  --finance-card-tint: rgba(241, 235, 225, .86);
  --finance-card-shadow: rgba(168, 145, 111, .08);
}

.finance-card-profit {
  --finance-accent: #758a9f;
  --finance-card-border: rgba(117, 138, 159, .18);
  --finance-card-tint: rgba(228, 234, 238, .86);
  --finance-card-shadow: rgba(117, 138, 159, .08);
}

.finance-card-settle,
.finance-card-comfort {
  --finance-accent: #8b8096;
  --finance-card-border: rgba(139, 128, 150, .18);
  --finance-card-tint: rgba(234, 230, 238, .84);
  --finance-card-shadow: rgba(139, 128, 150, .08);
}

.finance-card-guide {
  --finance-accent: #78918b;
  --finance-card-border: rgba(120, 145, 139, .18);
  --finance-card-tint: rgba(226, 235, 232, .82);
  --finance-card-shadow: rgba(120, 145, 139, .08);
}

/* 獲利指南：各區塊用統一間距，不再黏在一起 */
.finance-card-guide {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.finance-card-guide > .fin-guide-hero,
.finance-card-guide > .fin-guide-formula,
.finance-card-guide > .fin-guide-source,
.finance-card-guide > .finance-break-panel,
.finance-card-guide > .fin-guide-block,
.finance-card-guide > .finance-info-note {
  margin: 0;
}
/* 每個區塊內部也用一致的縱向間距 */
.finance-card-guide > .fin-guide-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}
.finance-card-guide > .fin-guide-block > .fin-guide-block-title { margin: 0; }
.finance-card-guide > .finance-break-panel { padding: 16px; }

.finance-card-department {
  --finance-accent: #8a9279;
  --finance-card-border: rgba(138, 146, 121, .18);
  --finance-card-tint: rgba(233, 236, 225, .82);
  --finance-card-shadow: rgba(138, 146, 121, .08);
}

.finance-card-ai {
  --finance-accent: #80829e;
  --finance-card-border: rgba(128, 130, 158, .18);
  --finance-card-tint: rgba(230, 231, 239, .84);
  --finance-card-shadow: rgba(128, 130, 158, .08);
}

.finance-card-deal {
  --finance-accent: #a67e7e;
  --finance-card-border: rgba(166, 126, 126, .18);
  --finance-card-tint: rgba(241, 231, 232, .82);
  --finance-card-shadow: rgba(166, 126, 126, .08);
}

.finance-card-alert,
.finance-card-actiontasks {
  --finance-accent: #a2746b;
  --finance-card-border: rgba(162, 116, 107, .18);
  --finance-card-tint: rgba(240, 229, 226, .82);
  --finance-card-shadow: rgba(162, 116, 107, .08);
}

.finance-card-channel,
.finance-card-cashflow {
  --finance-accent: #748986;
  --finance-card-border: rgba(116, 137, 134, .18);
  --finance-card-tint: rgba(226, 235, 233, .82);
  --finance-card-shadow: rgba(116, 137, 134, .08);
}

.finance-card-monthclose {
  --finance-accent: #8b8096;
  --finance-card-border: rgba(139, 128, 150, .18);
  --finance-card-tint: rgba(234, 230, 238, .84);
  --finance-card-shadow: rgba(139, 128, 150, .08);
}

.finance-section-head strong {
  display: block;
  color: #1f3f38;
  font-size: 15px;
}

.finance-section-head p {
  margin: 4px 0 0;
  line-height: 1.5;
}

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

.finance-form-grid label {
  display: grid;
  gap: 6px;
}

.finance-wide {
  grid-column: 1 / -1;
}

.finance-form-grid input,
.finance-form-grid select {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid rgba(74, 105, 82, .16);
  border-radius: 13px;
  background: rgba(255,255,255,.9);
  color: #1f3f38;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
}

.finance-workbench select,
.finance-pl-toolbar select,
.fin-comm-fee-row select,
.fin-fee-row select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 30px;
  background:
    linear-gradient(45deg, transparent 50%, #7f9189 50%) calc(100% - 17px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, #7f9189 50%, transparent 50%) calc(100% - 12px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, rgba(255,255,255,.94), rgba(246, 248, 244, .9));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}

.finance-workbench select:focus,
.finance-pl-toolbar select:focus,
.fin-comm-fee-row select:focus,
.fin-fee-row select:focus {
  outline: none;
  border-color: rgba(116, 137, 134, .44);
  box-shadow:
    0 0 0 3px rgba(116, 137, 134, .13),
    inset 0 1px 0 rgba(255,255,255,.72);
}

.finance-primary,
.finance-secondary {
  width: 100%;
  min-height: 40px;
  margin-top: 12px;
  border: 0;
  border-radius: 13px;
  background: #244d43;
  color: #fff;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
}

.finance-secondary {
  background: rgba(35, 79, 69, .1);
  color: #244d43;
  border: 1px solid rgba(35, 79, 69, .18);
}

.finance-primary.is-pressed,
.finance-secondary.is-pressed,
.finance-action-grid button.is-pressed {
  transform: translateY(1px);
  filter: saturate(1.15);
  box-shadow: inset 0 0 0 999px rgba(255,255,255,.12);
}

.finance-inline-panel {
  display: none;
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.72);
  border: 1px solid var(--finance-card-border, rgba(74, 105, 82, .14));
}

.finance-list-row.is-new {
  margin-top: 8px;
  padding: 0 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.74);
  border: 1px solid var(--finance-card-border, rgba(74, 105, 82, .14));
}

.finance-inline-panel.active {
  display: block;
}

.finance-inline-panel.compact {
  margin: 8px 0;
  padding: 8px 10px;
}

.finance-split-grid {
  display: grid;
  gap: 12px;
}

.finance-list-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  align-items: center;
  border-top: 1px solid rgba(74, 105, 82, .12);
}

.finance-list-row:first-of-type {
  border-top: 0;
}

.finance-list-row b {
  text-align: right;
  color: #1f3f38;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

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

.finance-decision-grid button {
  min-width: 0;
  min-height: 72px;
  padding: 11px 10px;
  border: 1px solid var(--finance-card-border, rgba(74, 105, 82, .14));
  border-radius: 14px;
  background: rgba(255,255,255,.76);
  color: var(--finance-tab-ink, #617764);
  text-align: left;
  cursor: pointer;
}

.finance-decision-grid b,
.finance-decision-grid span {
  display: block;
}

.finance-decision-grid b {
  font-size: 13px;
  color: var(--finance-tab-ink, #617764);
}

.finance-decision-grid span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.finance-alert-list,
.finance-task-pipeline {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.finance-alert-list article,
.finance-task-pipeline article {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.76);
  border: 1px solid var(--finance-card-border, rgba(74, 105, 82, .14));
}

.finance-alert-list article {
  grid-template-columns: 34px 1fr auto;
  align-items: center;
}

.finance-alert-list i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(162, 116, 107, .14);
  color: #85645f;
  font-style: normal;
  font-size: 12px;
  font-weight: 950;
}

.finance-alert-list article.high {
  border-color: rgba(162, 116, 107, .32);
}

.finance-alert-list article.medium {
  border-color: rgba(168, 145, 111, .32);
}

.finance-alert-list article.pending {
  border-color: rgba(126, 139, 129, .24);
  background: rgba(250, 250, 247, .86);
}

.finance-alert-list article.decision-action-done,
.finance-task-pipeline article.decision-action-done {
  border-color: rgba(95, 158, 116, .28);
  background: rgba(242, 248, 244, .86);
}

.finance-alert-list b,
.finance-task-pipeline b {
  color: #42514a;
  font-size: 13px;
}

.finance-alert-list span,
.finance-task-pipeline small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.finance-source-note {
  display: grid;
  gap: 5px;
  margin: 10px 0 12px;
  padding: 12px 14px;
  border: 1px solid rgba(116, 138, 123, .18);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(247, 250, 244, .92), rgba(255, 252, 244, .9));
  color: #617069;
  font-size: 12px;
  line-height: 1.55;
}

.finance-source-note strong {
  color: #355248;
  font-size: 13px;
}

.finance-source-note small {
  color: #7a867f;
  font-size: 11px;
  line-height: 1.45;
}

.finance-source-note.accounting-sync-note {
  border-color: rgba(93, 125, 105, .22);
  background: linear-gradient(135deg, rgba(246, 250, 247, .96), rgba(250, 248, 240, .94));
}

.finance-source-note.accounting-sync-note.ok {
  border-color: rgba(95, 158, 116, .28);
}

.finance-source-note.accounting-sync-note.warn,
.finance-source-note.warn {
  border-color: rgba(177, 119, 103, .26);
  background: linear-gradient(135deg, rgba(255, 249, 244, .96), rgba(251, 242, 235, .94));
}

.finance-source-note.accounting-sync-note.pending {
  border-color: rgba(126, 139, 129, .22);
  background: rgba(250, 250, 247, .92);
}

.finance-inline-sync {
  justify-self: start;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(36, 77, 67, .18);
  border-radius: 999px;
  background: #244d43;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.accounting-command-card {
  border-color: rgba(36, 77, 67, .2);
}

.accounting-kpi-grid article {
  background: rgba(255, 255, 255, .94);
}

.accounting-kpi-grid .positive {
  color: #25664f;
}

.accounting-kpi-grid .negative,
.finance-pl-net strong.negative {
  color: #a45c50;
}

.accounting-missing-list {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px dashed rgba(177, 119, 103, .36);
  border-radius: 16px;
  background: rgba(255, 249, 244, .86);
  color: #6f665f;
  font-size: 12px;
  line-height: 1.45;
}

.accounting-missing-list b {
  color: #244d43;
  font-size: 13px;
}

.accounting-missing-list span {
  display: block;
  padding-left: 11px;
  position: relative;
}

.accounting-missing-list span::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #b17767;
}

.accounting-account-list {
  display: grid;
  gap: 8px;
}

.accounting-account-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(74, 105, 82, .13);
  border-radius: 16px;
  background: rgba(255, 255, 255, .88);
}

.accounting-account-list strong,
.accounting-account-list b {
  color: #1f3f38;
  font-size: 14px;
  line-height: 1.25;
}

.accounting-account-list span,
.accounting-account-list small {
  color: #75827b;
  font-size: 11px;
  line-height: 1.4;
}

.accounting-account-list small {
  grid-column: 1 / -1;
}

.accounting-reference-card {
  background: linear-gradient(135deg, rgba(248, 251, 246, .92), rgba(255, 252, 244, .92));
}

.accounting-reference-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(74, 105, 82, .13);
  background: linear-gradient(135deg, rgba(248, 251, 246, .92), rgba(255, 252, 244, .92));
}

.finance-pl-title small,
.finance-pl-row small,
.finance-income-row small {
  display: block;
  margin-top: 3px;
  color: #77857d;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.finance-income-row {
  align-items: start;
}

.finance-income-row span {
  min-width: 0;
}

.finance-income-row b {
  white-space: nowrap;
}

.finance-income-card {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(74, 105, 82, .13);
  border-radius: 14px;
  background: rgba(255, 255, 255, .9);
}

.finance-income-card + .finance-income-card {
  margin-top: 8px;
}

.finance-income-card-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.finance-income-card-main strong {
  min-width: 0;
  color: #40534b;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.finance-income-card-main b {
  color: #244d43;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.finance-income-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.finance-income-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(232, 241, 235, .9);
  color: #4d665c;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
}

.finance-pl-source-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(74, 105, 82, .13);
  border-radius: 16px;
  background: rgba(244, 249, 245, .92);
}

.finance-pl-source-card.warn {
  background: rgba(255, 250, 238, .95);
  border-color: rgba(169, 124, 55, .22);
}

.finance-pl-source-card div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.finance-pl-source-card span,
.finance-pl-source-card small {
  color: #6f8077;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.finance-pl-source-card strong {
  color: #244d43;
  font-size: 13px;
  line-height: 1.35;
}

.finance-pl-source-card p {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid rgba(74, 105, 82, .12);
  color: #7b674a;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
}

.finance-break-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(36, 77, 67, .16);
  background: linear-gradient(135deg, rgba(241, 249, 245, .96), rgba(255, 252, 241, .94));
}

.finance-break-table {
  display: grid;
  gap: 8px;
}

.finance-break-table article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  align-items: center;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(74, 105, 82, .12);
  background: rgba(255, 255, 255, .84);
}

.finance-break-table span {
  color: #52645c;
  font-size: 12px;
  font-weight: 900;
}

.finance-break-table b {
  color: #1f3f38;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.finance-break-table small {
  grid-column: 1 / -1;
  color: #7b877f;
  font-size: 11px;
}

.finance-bonus-panel {
  background: linear-gradient(135deg, rgba(244, 250, 247, .96), rgba(255, 251, 239, .94));
}

.finance-bonus-grid article {
  border-radius: 16px;
}

.finance-bonus-rate-table {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.finance-bonus-rate-table div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 8px;
  border: 1px solid rgba(74, 105, 82, .13);
  border-radius: 14px;
  background: rgba(255, 255, 255, .88);
  text-align: center;
}

.finance-bonus-rate-table div.risk {
  border-color: rgba(154, 62, 55, .24);
  background: rgba(255, 242, 239, .88);
}

.finance-bonus-rate-table span {
  color: #52645c;
  font-size: 12px;
  font-weight: 950;
}

.finance-bonus-rate-table b {
  color: #244d43;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.finance-bonus-rate-table small {
  color: #7b877f;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
}

.accounting-subject-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
}

.accounting-subject-row small {
  grid-column: 1 / -1;
  color: #8a958f;
  font-size: 10px;
  line-height: 1.35;
}

@media (max-width: 720px) {
  .finance-pl-source-card {
    grid-template-columns: 1fr;
  }

  .finance-income-card-main {
    grid-template-columns: 1fr;
  }

  .finance-income-card-main b {
    font-size: 16px;
  }

  .finance-bonus-rate-table {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-income-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 8px;
  }
}

.finance-alert-source {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  font-style: normal;
  font-size: 10px;
  font-weight: 900;
}

.finance-alert-source.live {
  background: rgba(95, 145, 111, .14);
  color: #4f7b5b;
}

.finance-alert-source.pending {
  background: rgba(132, 127, 119, .12);
  color: #7c746b;
}

.finance-alert-list button {
  justify-self: start;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--finance-card-border, rgba(74, 105, 82, .14));
  border-radius: 10px;
  background: rgba(255,255,255,.76);
  color: var(--finance-accent, #7d9484);
  font-size: 11px;
  font-weight: 900;
}

.finance-alert-list button.is-done,
.finance-task-pipeline button.is-done,
.finance-action-grid button.is-done {
  border-color: rgba(95, 158, 116, .22);
  background: rgba(95, 158, 116, .12);
  color: #44794f;
}

.finance-channel-table {
  display: grid;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--finance-card-border, rgba(74, 105, 82, .14));
  background: rgba(255,255,255,.72);
}

.finance-channel-cards {
  display: grid;
  gap: 10px;
}

.finance-channel-cards article {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 15px;
  background: rgba(255,255,255,.78);
  border: 1px solid var(--finance-card-border, rgba(74, 105, 82, .14));
}

.finance-channel-cards article > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.finance-channel-cards b {
  color: #42514a;
  font-size: 14px;
}

.finance-channel-cards span,
.finance-channel-cards small {
  color: var(--muted);
  font-size: 12px;
}

.finance-channel-cards strong {
  justify-self: start;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(116, 137, 134, .12);
  color: #617875;
  font-size: 11px;
}

.finance-channel-cards i {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: #748986;
}

.finance-cashflow-line {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto;
  gap: 7px;
  align-items: center;
  margin: 12px 0;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.72);
  border: 1px solid var(--finance-card-border, rgba(74, 105, 82, .14));
}

.finance-cashflow-line span {
  color: #617875;
  font-size: 11px;
  font-weight: 950;
}

.finance-cashflow-line i {
  height: 3px;
  border-radius: 999px;
  background: rgba(116, 137, 134, .32);
}

.finance-progress {
  position: relative;
  height: 34px;
  margin-bottom: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,.72);
  border: 1px solid var(--finance-card-border, rgba(74, 105, 82, .14));
}

.finance-progress b {
  display: block;
  height: 100%;
  background: rgba(139, 128, 150, .32);
}

.finance-progress span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #756c7f;
  font-size: 12px;
  font-weight: 950;
}

.finance-channel-table > div {
  display: grid;
  grid-template-columns: .8fr .8fr 1.1fr 1.3fr;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-top: 1px solid rgba(74, 105, 82, .1);
  font-size: 12px;
}

.finance-channel-table > div:first-child {
  border-top: 0;
}

.finance-channel-table .head {
  background: rgba(116, 137, 134, .12);
  color: #617875;
  font-size: 11px;
  font-weight: 950;
}

.finance-channel-table b,
.finance-channel-table strong {
  color: #42514a;
  font-size: 12px;
}

.finance-checklist {
  display: grid;
  gap: 8px;
}

.finance-checklist label {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 10px 11px;
  border-radius: 13px;
  background: rgba(255,255,255,.74);
  border: 1px solid var(--finance-card-border, rgba(74, 105, 82, .14));
  color: #42514a;
  font-size: 13px;
  font-weight: 850;
}

.finance-checklist label small {
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(36, 77, 67, .08);
  color: #607269;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 900;
}

.finance-checklist input {
  accent-color: var(--finance-accent, #7d9484);
}

.finance-task-pipeline article {
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 13px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(249, 246, 241, .9));
}

.finance-task-pipeline span {
  display: grid;
  place-items: center;
  min-height: 50px;
  border-radius: 16px;
  background: rgba(162, 116, 107, .12);
  color: #85645f;
  font-size: 12px;
  font-weight: 950;
}

.finance-task-pipeline div {
  min-width: 0;
}

.finance-task-pipeline b,
.finance-task-pipeline small {
  display: block;
  min-width: 0;
}

.finance-task-pipeline b {
  color: #2d463f;
  font-size: 15px;
  line-height: 1.35;
}

.finance-task-pipeline small {
  margin-top: 5px;
  color: #718078;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.finance-task-pipeline button {
  grid-column: 2;
  justify-self: start;
  min-width: 128px;
  min-height: 34px;
  margin-top: 2px;
  padding: 0 14px;
  border: 1px solid rgba(162, 116, 107, .2);
  border-radius: 999px;
  background: rgba(255,255,255,.74);
  color: #85645f;
  font-size: 12px;
  font-weight: 950;
}

.decision-workbench {
  display: grid;
  gap: 12px;
}

.decision-hero {
  padding: 16px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.94), rgba(233, 236, 225, .82));
  border: 1px solid rgba(138, 146, 121, .18);
  box-shadow: 0 12px 28px rgba(138, 146, 121, .08);
}

.decision-hero span,
.decision-hero strong {
  display: block;
}

.decision-hero span {
  color: #8a9279;
  font-size: 12px;
  font-weight: 950;
}

.decision-hero strong {
  margin-top: 5px;
  color: #42514a;
  font-size: 16px;
  line-height: 1.45;
}

.decision-source-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 16px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255,255,255,.46);
  border: 1px solid rgba(102, 126, 118, .1);
}

.decision-source-strip button,
.decision-source-strip b {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
  font-family: inherit;
}

.decision-source-strip button.ready {
  background: rgba(86, 134, 104, .15);
  color: #4b765b;
}

.decision-source-strip button.pending {
  background: rgba(133, 122, 113, .12);
  color: #81766d;
}

.decision-source-strip button:active {
  transform: translateY(1px);
}

.decision-source-strip b {
  grid-column: span 3;
  background: rgba(36, 77, 67, .1);
  color: #244d43;
}

.decision-source-strip + .finance-progress,
.decision-source-strip + .finance-quick-grid,
.decision-source-strip + .finance-channel-cards,
.decision-source-strip + .finance-alert-list,
.decision-source-strip + .finance-task-pipeline {
  margin-top: 4px;
}

.decision-panel {
  display: none;
}

.decision-panel.active {
  display: block;
  animation: enter .22s ease both;
}

.decision-followups {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(102, 126, 118, .14);
}

.decision-followup-list {
  display: grid;
  gap: 8px;
}

.decision-followup-list article {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(246, 248, 244, .86);
  border: 1px solid rgba(102, 126, 118, .1);
}

.decision-followup-list article > span {
  display: grid;
  place-items: center;
  min-height: 38px;
  border-radius: 13px;
  background: rgba(35, 79, 69, .1);
  color: #244d43;
  font-size: 12px;
  font-weight: 950;
}

.decision-followup-list b,
.decision-followup-list small {
  display: block;
}

.decision-followup-list b {
  color: #203f38;
  font-size: 13px;
}

.decision-followup-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.decision-followup-list button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(35, 79, 69, .16);
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  color: #244d43;
  font-size: 11px;
  font-weight: 950;
}

.decision-tab-wrap {
  position: sticky;
  top: 68px;
  z-index: 8;
  gap: 0;
  padding: 5px;
  border-radius: 19px;
  border: 1px solid rgba(78, 115, 97, .14);
  background: rgba(245, 250, 246, .9);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82), 0 8px 20px rgba(45, 73, 60, .06);
}

.decision-tab-wrap .finance-tab-line,
.decision-tab-wrap .finance-tab-line.secondary,
.decision-tab-wrap .finance-tab-line.tertiary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.decision-tab-wrap .finance-tab-line button {
  min-height: 36px;
  padding: 0 4px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: rgba(45, 64, 57, .62);
  box-shadow: none;
  font-size: 12px;
  line-height: 1;
}

.decision-tab-wrap .finance-tab-line button.active {
  border-color: rgba(35, 79, 69, .12);
  background: #24584b;
  color: #fff;
  box-shadow: 0 8px 17px rgba(35, 79, 69, .16);
}

.decision-tab-wrap .finance-tab-line button:not(.active):active {
  background: rgba(35, 79, 69, .08);
  color: #244d43;
}

.source-workspace {
  display: grid;
  gap: 16px;
}

.source-hero {
  position: relative;
  border: 1px solid rgba(112, 135, 124, .25);
  border-radius: 24px;
  padding: 22px;
  background: linear-gradient(135deg, rgba(244, 241, 230, .94), rgba(229, 239, 232, .92));
  box-shadow: 0 16px 34px rgba(60, 78, 67, .08);
}

.source-hero span {
  display: block;
  margin-bottom: 8px;
  color: #6d806f;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
}

.source-hero strong {
  display: block;
  color: #183f35;
  font-size: 26px;
  line-height: 1.15;
}

.source-hero p {
  max-width: 88%;
  margin: 8px 0 0;
  color: #66756d;
  font-size: 14px;
  line-height: 1.65;
}

.source-hero b {
  position: absolute;
  top: 18px;
  right: 18px;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, .78);
  color: #245244;
  font-size: 13px;
}

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

.source-flow article,
.source-card {
  border: 1px solid rgba(108, 130, 118, .18);
  border-radius: 20px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 12px 24px rgba(58, 78, 67, .06);
}

.source-flow article,
.source-card {
  padding: 14px;
}

.source-flow span,
.source-card-head span,
.source-card label span {
  color: #728176;
  font-size: 12px;
  font-weight: 800;
}

.source-flow b,
.source-card-head strong {
  display: block;
  margin-top: 5px;
  color: #24483e;
  font-size: 16px;
}

.source-flow small {
  display: block;
  margin-top: 4px;
  color: #7b857e;
  line-height: 1.45;
}

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

.source-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.source-card-head strong {
  font-size: 18px;
}

.source-card-head b {
  flex: none;
  border-radius: 999px;
  padding: 7px 10px;
  background: #e4eee7;
  color: #2b624f;
  font-size: 12px;
}

.source-card label {
  display: grid;
  gap: 6px;
}

.source-card textarea {
  width: 100%;
  min-height: 58px;
  resize: vertical;
  border: 1px solid rgba(108, 130, 118, .25);
  border-radius: 15px;
  padding: 11px 12px;
  background: rgba(249, 250, 246, .96);
  color: #28463e;
  font-size: 12px;
  line-height: 1.45;
  outline: none;
}

.source-card textarea:focus {
  border-color: #739181;
  box-shadow: 0 0 0 3px rgba(115, 145, 129, .14);
}

.source-card p {
  margin: 10px 0 0;
  color: #748179;
  font-size: 13px;
  line-height: 1.55;
}

.source-actions {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 8px;
  margin-top: 12px;
}

.source-actions button,
.source-save-bar button {
  border: 1px solid rgba(36, 82, 68, .22);
  border-radius: 14px;
  padding: 11px 12px;
  background: #245244;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.source-actions button:last-child {
  background: #f4f0e7;
  color: #6e5b39;
}

.source-test-result {
  margin-top: 10px;
  border-radius: 13px;
  padding: 9px 10px;
  background: #f5f3ef;
  color: #7b7c76;
  font-size: 12px;
  line-height: 1.45;
}

.source-test-result.ok {
  background: #e3efe8;
  color: #2c624e;
}

.source-test-result.warn {
  background: #f8efd8;
  color: #7a6330;
}

.source-test-result.bad {
  background: #f5e6e2;
  color: #8a4b43;
}

.source-save-bar {
  position: sticky;
  bottom: 78px;
  display: grid;
  gap: 8px;
  border: 1px solid rgba(108, 130, 118, .18);
  border-radius: 20px;
  padding: 12px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 14px 30px rgba(58, 78, 67, .12);
}

.source-save-bar span {
  color: #7b857e;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

.finance-total-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(74, 105, 82, .12);
}

.finance-total-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.finance-total-row b {
  color: #1f3f38;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.finance-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.finance-action-grid button {
  min-height: 40px;
  border: 1px solid rgba(35, 79, 69, .18);
  border-radius: 12px;
  background: rgba(35, 79, 69, .08);
  color: #244d43;
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
}

.finance-pl-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  width: 100%;
  padding: 0 1px;
}

.finance-pl-toolbar strong {
  flex: 1 1 auto;
  min-width: 0;
  color: #53616c;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
}

.finance-pl-toolbar div {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
}

.finance-pl-toolbar button,
.finance-pl-toolbar select {
  min-height: 32px;
  border: 1px solid rgba(117, 138, 159, .22);
  border-radius: 10px;
  color: #65798c;
  font-size: 12px;
  font-weight: 850;
}

.finance-pl-toolbar select {
  min-width: 118px;
  text-align: center;
  text-align-last: center;
  padding-left: 24px;
}

.finance-pl-section {
  margin-top: 10px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(117, 138, 159, .14);
  background: rgba(255,255,255,.72);
}

.finance-pl-title {
  padding: 11px 16px;
  background: rgba(117, 138, 159, .12);
  color: #65798c;
  font-size: 12px;
  font-weight: 950;
}

.finance-pl-title.with-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.finance-pl-title button {
  border: 1px solid rgba(117, 138, 159, .2);
  border-radius: 9px;
  background: rgba(255,255,255,.75);
  color: #65798c;
  font-size: 11px;
  font-weight: 850;
}

.finance-pl-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 0 16px;
  align-items: center;
  border-top: 1px solid rgba(117, 138, 159, .12);
  color: #53616c;
  font-size: 13px;
}

.finance-pl-row.indent span {
  padding-left: 8px;
}

.accounting-pl-card .finance-pl-section {
  border-radius: 16px;
}

.accounting-pl-card .finance-list-row,
.accounting-pl-card .fin-exp-empty,
.accounting-pl-card .fin-pl-detail-label {
  margin-left: 10px;
  margin-right: 10px;
}

.accounting-pl-card .finance-list-row {
  padding-left: 14px;
  padding-right: 14px;
}

.finance-pl-row b {
  color: #53616c;
  font-variant-numeric: tabular-nums;
}

.finance-pl-row.total {
  background: rgba(245, 245, 242, .82);
  font-weight: 950;
}

.finance-pl-row.positive b {
  color: #6f856f;
}

.finance-pl-row.negative b {
  color: #9a7373;
}

.finance-pl-notice {
  display: grid;
  gap: 4px;
  margin: 12px 0 8px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(169, 124, 55, .24);
  background: linear-gradient(135deg, rgba(255, 250, 238, .96), rgba(244, 250, 247, .94));
}

.finance-pl-notice strong {
  color: #244d43;
  font-size: 13px;
  font-weight: 950;
}

.finance-pl-notice span {
  color: #6f6658;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.55;
}

.finance-pl-net {
  display: grid;
  grid-template-columns: 1.25fr .85fr .85fr;
  gap: 8px;
  margin: 12px 0;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(74, 105, 82, .14);
  background: linear-gradient(135deg, rgba(236, 246, 239, .95), rgba(255, 251, 239, .9));
}

.finance-pl-summary.negative {
  background: linear-gradient(135deg, rgba(255, 244, 241, .95), rgba(255, 251, 239, .9));
  border-color: rgba(154, 62, 55, .2);
}

.finance-pl-net div {
  padding: 13px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(117, 138, 159, .14);
}

.finance-pl-net span,
.finance-pl-net strong,
.finance-pl-net small {
  display: block;
}

.finance-pl-net span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.finance-pl-net strong {
  margin-top: 5px;
  color: #53616c;
  font-size: 16px;
}

.finance-pl-net .main {
  background: #244d43;
  border-color: rgba(36, 77, 67, .2);
  box-shadow: 0 14px 26px rgba(36, 77, 67, .16);
}

.finance-pl-net.negative .main {
  background: #8a5b55;
}

.finance-pl-net .main span,
.finance-pl-net .main strong,
.finance-pl-net .main small {
  color: #fff;
}

.finance-pl-net .main strong {
  font-size: 24px;
}

.finance-pl-net small {
  margin-top: 5px;
  color: #7b877f;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
}

.finance-runway {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
}

.finance-runway strong {
  color: #244d43;
  font-size: 34px;
  line-height: 1;
}

.finance-runway span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
}

.finance-runway p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.finance-subtabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 14px;
  padding: 5px;
  border-radius: 14px;
  background: rgba(238, 247, 238, .9);
}

.finance-subpanel {
  display: none;
}

.finance-subpanel.active {
  display: block;
}

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

/* ── 財務總覽：對齊 v2 補強 ── */
.fin-mini-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.5;
}

.fin-flow-note {
  margin-bottom: 10px;
  padding: 9px 11px;
  border-radius: 12px;
  background: rgba(117, 138, 159, .12);
  border: 1px solid rgba(117, 138, 159, .22);
  color: #4a5d6e;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.7;
}

.fin-flow-note b { color: #244d43; }

.finance-account-grid article[data-fin-acct] {
  cursor: pointer;
  transition: transform .08s ease;
}

.finance-account-grid article[data-fin-acct]:active {
  transform: translateY(1px);
}

.finance-account-grid small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.fin-exp-list {
  display: grid;
  margin-bottom: 2px;
}

.fin-exp-row {
  gap: 8px;
}

.fin-row-del {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 8px;
  background: rgba(166, 126, 126, .16);
  color: #a05c5c;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.fin-exp-empty {
  padding: 11px 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.fin-runway-body {
  flex: 1;
  min-width: 0;
}

.fin-runway-bar {
  margin-top: 5px;
  height: 7px;
  border-radius: 999px;
  background: rgba(74, 105, 82, .14);
  overflow: hidden;
}

.fin-runway-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #5f9e74;
  transition: width .3s ease;
}

.fin-runway-bar i.amber { background: #c79a4e; }
.fin-runway-bar i.red { background: #c2685f; }

.fin-runway-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: #4a5d52;
  font-size: 12px;
  font-weight: 850;
}

.fin-light {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #5f9e74;
}

.fin-light.amber { background: #c79a4e; }
.fin-light.red { background: #c2685f; }

.fin-safety-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px;
  border-radius: 13px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(74, 105, 82, .14);
}

.fin-safety-row.warn {
  background: rgba(194, 104, 95, .1);
  border-color: rgba(194, 104, 95, .3);
}

.fin-safety-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #5f9e74;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.fin-safety-row.warn .fin-safety-icon { background: #c2685f; }

.fin-safety-title {
  color: #1f3f38;
  font-size: 13px;
  font-weight: 900;
}

.fin-safety-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.65;
}

.fin-safety-sub b { color: #244d43; }

/* ── 損益分頁：對齊 v2 補強 ── */
.fin-pl-detail-label {
  margin: 8px 0 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .04em;
}

.fin-pl-detail-label:first-child { margin-top: 0; }

.fin-plh-panel {
  margin-top: 12px;
  padding: 13px;
  border-radius: 14px;
  background: rgba(245, 235, 218, .62);
  border: 1px solid rgba(168, 145, 111, .32);
}

.fin-plh-head {
  margin-bottom: 8px;
  color: #8a6f43;
  font-size: 12px;
  font-weight: 950;
}

.fin-plh-sub,
.fin-plh-exp-head {
  margin: 11px 0 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .04em;
}

.fin-plh-exp-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fin-plh-exp-head button {
  padding: 3px 9px;
  border: 1px dashed rgba(168, 145, 111, .55);
  border-radius: 8px;
  background: rgba(255,255,255,.72);
  color: #8a6f43;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

.fin-plh-exp-list {
  display: grid;
  gap: 6px;
}

.fin-plh-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.fin-plh-row input {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(74, 105, 82, .16);
  border-radius: 11px;
  background: rgba(255,255,255,.92);
  color: #1f3f38;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.fin-plh-row input[data-plh-name] {
  flex: 1;
  min-width: 0;
}

.fin-plh-row input[data-plh-amt] {
  flex: 0 0 auto;
  width: 92px;
}

/* ── 結算 / 舒適 / 獲利 / 策略 / 抽成：對齊 v2 補強 ── */
.finance-subtabs.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fin-stl-hero {
  margin-bottom: 12px;
  padding: 15px;
  border-radius: 16px;
  background: linear-gradient(135deg, #2f5d4f, #244d43);
  color: #fff;
}

.fin-stl-hero > span {
  font-size: 11px;
  font-weight: 850;
  opacity: .78;
}

.fin-stl-hero > strong {
  display: block;
  margin-top: 4px;
  font-size: 28px;
  line-height: 1.05;
}

.fin-stl-hero-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
  justify-items: stretch;
}

.fin-stl-hero-chips div {
  width: 100%;
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(255,255,255,.14);
  text-align: left;
}

.fin-stl-hero-chips span {
  display: block;
  font-size: 10px;
  font-weight: 850;
  opacity: .8;
  text-align: left;
}

.fin-stl-hero-chips b {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-align: left;
}

.fin-scn-card {
  margin-bottom: 10px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(74, 105, 82, .16);
  box-shadow: 0 10px 24px rgba(55, 65, 55, .06);
  overflow: hidden;
}

.fin-scn-card.ok { border-color: rgba(95, 158, 116, .5); }
.fin-scn-card.warn { border-color: rgba(194, 104, 95, .5); }

.fin-scn-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
}

.fin-scn-head > strong {
  flex: 1;
  display: flex;
  align-items: center;
  color: #1f3f38;
  font-size: 14px;
}

.fin-scn-name {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid rgba(74, 105, 82, .18);
  border-radius: 12px;
  background: rgba(255,255,255,.95);
  color: #1f3f38;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
}

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

.fin-comm-grid label {
  min-width: 0;
}

.fin-comm-fee-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px 28px 30px;
  gap: 7px;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 8px;
  border-radius: 13px;
  background: rgba(248, 247, 243, .72);
  border: 1px solid rgba(74, 105, 82, .08);
}

.fin-comm-fee-row.is-locked {
  grid-template-columns: minmax(0, 1fr) 96px 28px;
}

.fin-comm-fee-row input,
.fin-comm-fee-row select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(74, 105, 82, .16);
  border-radius: 11px;
  background: rgba(255,255,255,.92);
  color: #1f3f38;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
}

.fin-comm-fee-row > input:first-child {
  grid-column: 1 / -1;
}

.fin-fee-unit {
  display: grid;
  place-items: center;
  min-height: 38px;
  border-radius: 11px;
  background: rgba(166, 126, 126, .1);
  color: #8b6565;
  font-size: 12px;
  font-weight: 950;
}

.fin-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  margin-right: 6px;
  background: #5f9e74;
}

.fin-dot.dept { background: #758a9f; }

.fin-tag {
  flex: 0 0 auto;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(95, 158, 116, .16);
  color: #4a7a58;
  font-size: 10px;
  font-weight: 900;
}

.fin-tag.dept {
  background: rgba(117, 138, 159, .18);
  color: #5c6f82;
}

.fin-judge {
  flex: 0 0 auto;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
}

.fin-judge.ok { background: rgba(95, 158, 116, .18); color: #44794f; }
.fin-judge.warn { background: rgba(194, 104, 95, .16); color: #a8554c; }

.fin-scn-result {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 12px;
  padding: 4px 10px;
  border-radius: 14px;
  background: rgba(245, 245, 242, .8);
}

.fin-scn-result.ok { background: rgba(95, 158, 116, .12); }
.fin-scn-result.warn { background: rgba(194, 104, 95, .1); }

.fin-scn-result div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  min-height: 38px;
  padding: 8px 0;
  text-align: left;
  border-top: 1px solid rgba(74, 105, 82, .1);
}

.fin-scn-result div:first-child {
  border-top: 0;
}

.fin-scn-result span {
  display: block;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.fin-scn-result b {
  display: block;
  flex: 0 0 auto;
  margin-top: 0;
  color: #1f3f38;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  text-align: right;
}

.fin-scn-result b.neg { color: #9a7373; }

.fin-scn-advice {
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2f5d4f, #244d43);
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.7;
}

.fin-scn-advice b { color: #ffe7b8; }

.fin-partner-guide {
  display: grid;
  gap: 5px;
  margin: 10px 0 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(166, 126, 126, .1);
  border: 1px solid rgba(166, 126, 126, .16);
}

.fin-partner-guide strong {
  color: #5f4d4d;
  font-size: 13px;
  line-height: 1.45;
}

.fin-partner-guide span {
  color: rgba(62, 74, 70, .72);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
}

.fin-partner-explain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 10px;
  border-radius: 13px;
  background: rgba(248, 247, 243, .76);
  border: 1px dashed rgba(166, 126, 126, .26);
}

.fin-partner-explain span {
  flex: 0 0 100%;
  color: #9a7373;
  font-size: 10px;
  font-weight: 950;
}

.fin-partner-explain b {
  color: #38554e;
  font-size: 11px;
  font-weight: 900;
}

.fin-partner-explain i {
  color: #9a7373;
  font-style: normal;
  font-weight: 950;
}

.fin-guide-formula {
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(120, 145, 139, .14);
  border: 1px solid rgba(120, 145, 139, .26);
  text-align: center;
  color: #1f3f38;
  font-size: 16px;
  font-weight: 950;
}

.fin-guide-hero {
  margin-bottom: 12px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #78918b, #5f7771);
  color: #fff;
}

.fin-guide-hero span {
  display: block;
  margin-bottom: 5px;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .1em;
  opacity: .78;
}

.fin-guide-hero strong {
  display: block;
  font-size: 18px;
  line-height: 1.35;
}

.fin-guide-hero p {
  margin: 5px 0 0;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.55;
  opacity: .82;
}

.fin-guide-source {
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(168, 145, 111, .14);
  border: 1px solid rgba(168, 145, 111, .3);
  color: #7b684f;
  font-size: 11px;
  line-height: 1.75;
}

.fin-guide-source strong {
  display: block;
  margin-bottom: 4px;
  color: #806a4d;
  font-size: 13px;
}

.fin-guide-source p {
  margin: 0 0 5px;
}

.fin-guide-source ul {
  display: grid;
  gap: 4px;
  margin: 6px 0;
  padding-left: 16px;
}

.fin-guide-source b {
  color: #614f38;
}

.fin-guide-formula span,
.fin-guide-formula strong,
.fin-guide-formula p {
  display: block;
}

.fin-guide-formula span {
  margin-bottom: 8px;
  color: #667e79;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.fin-guide-formula strong {
  font-size: 17px;
  line-height: 1.55;
}

.fin-guide-formula p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.fin-guide-formula b {
  color: #a8702e;
  font-size: 18px;
}

.fin-guide-block {
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(74, 105, 82, .14);
}

.fin-guide-block-title {
  margin-bottom: 8px;
  color: #1f3f38;
  font-size: 13px;
  font-weight: 950;
}

.fin-guide-breakdown {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(245, 245, 242, .82);
}

.fin-guide-breakdown div {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  color: #53616c;
  font-size: 12px;
  font-weight: 750;
}

.fin-guide-breakdown b {
  font-variant-numeric: tabular-nums;
}

.fin-guide-breakdown b.pos { color: #5f9e74; }
.fin-guide-breakdown b.neg { color: #a8702e; }

.fin-guide-bd-total {
  margin-top: 4px;
  padding-top: 8px !important;
  border-top: 1px solid rgba(74, 105, 82, .18);
  font-weight: 950 !important;
}

.fin-guide-bd-total b { color: #a8702e; font-size: 14px; }

.fin-guide-note {
  margin: 9px 0 0;
  color: rgba(38, 64, 55, .72);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.7;
}

.fin-guide-note b { color: #a8702e; }

.fin-guide-subcopy {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.fin-guide-kpi {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(74, 105, 82, .16);
}

.fin-guide-kpi.green { background: rgba(95, 158, 116, .12); border-color: rgba(95, 158, 116, .32); }
.fin-guide-kpi.blue { background: rgba(117, 138, 159, .12); border-color: rgba(117, 138, 159, .32); }
.fin-guide-kpi.gold { background: rgba(168, 145, 111, .14); border-color: rgba(168, 145, 111, .34); }

.fin-guide-kpi b {
  display: block;
  color: #1f3f38;
  font-size: 12px;
  font-weight: 950;
}

.fin-guide-kpi span {
  display: block;
  margin-top: 3px;
  color: rgba(38, 64, 55, .72);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
}

.fin-guide-actions {
  display: grid;
  gap: 9px;
}

.fin-guide-actions article {
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(74, 105, 82, .16);
  background: rgba(255,255,255,.74);
}

.fin-guide-actions article.green { background: rgba(95, 158, 116, .11); border-color: rgba(95, 158, 116, .28); }
.fin-guide-actions article.blue { background: rgba(117, 138, 159, .11); border-color: rgba(117, 138, 159, .28); }
.fin-guide-actions article.gold { background: rgba(168, 145, 111, .13); border-color: rgba(168, 145, 111, .3); }
.fin-guide-actions article.red { background: rgba(194, 104, 95, .1); border-color: rgba(194, 104, 95, .28); }

.fin-guide-actions strong {
  display: block;
  color: #1f3f38;
  font-size: 12px;
}

.fin-guide-actions p {
  margin: 5px 0 0;
  color: rgba(38, 64, 55, .72);
  font-size: 11px;
  line-height: 1.65;
}

.fin-guide-actions article > span {
  display: inline-flex;
  width: fit-content;
  margin-top: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.58);
  color: #65746f;
  font-size: 10px;
  font-weight: 950;
}

.strategy-ai-hero {
  display: grid;
  gap: 5px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #80829e, #666982);
  color: #fff;
}

.strategy-ai-hero span {
  font-size: 11px;
  font-weight: 950;
  opacity: .82;
}

.strategy-ai-hero strong {
  font-size: 20px;
  line-height: 1.25;
}

.strategy-ai-hero p {
  margin: 0;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.6;
  opacity: .86;
}

.strategy-data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.strategy-data-grid article {
  min-width: 0;
  padding: 12px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(128, 130, 158, .16);
}

.strategy-data-grid span,
.strategy-data-grid small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.4;
}

.strategy-data-grid strong {
  display: block;
  margin: 5px 0 3px;
  color: #1f3f38;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.strategy-assumption-panel {
  background: rgba(255,255,255,.76);
}

.fin-strat-note-label {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.fin-strat-note-label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.fin-strat-note-label textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid rgba(74, 105, 82, .16);
  border-radius: 13px;
  background: rgba(255,255,255,.9);
  color: #1f3f38;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  resize: vertical;
}

.fin-strat-result {
  margin-top: 12px;
  padding: 13px;
  border-radius: 14px;
  background: rgba(230, 231, 239, .6);
  border: 1px solid rgba(128, 130, 158, .3);
}

.fin-strat-result-head {
  margin-bottom: 8px;
  color: #4c4d6b;
  font-size: 12px;
  font-weight: 950;
}

.fin-strat-result article {
  margin-top: 8px;
  padding: 10px;
  border-radius: 11px;
  background: rgba(255,255,255,.86);
}

.fin-strat-result article strong {
  display: block;
  color: #1f3f38;
  font-size: 13px;
  font-weight: 950;
}

.fin-strat-result article p {
  margin: 4px 0 0;
  color: rgba(38, 64, 55, .76);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.7;
}

.ops-section-stack {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.ops-section-stack article {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.ops-section-stack strong {
  display: block;
  font-size: 14px;
}

.ops-section-stack p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.settle-row {
  min-height: 42px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.settle-row:first-of-type { border-top: 0; }
.settle-row b { font-variant-numeric: tabular-nums; }

.order-page-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 20px;
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, .18), transparent 34%),
    linear-gradient(145deg, #6f8f7a, #365848);
  box-shadow: 0 16px 34px rgba(60, 86, 70, .16);
}

.order-page-hero p {
  margin: 0 0 7px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .18em;
}

.order-page-hero strong {
  display: block;
  font-size: 28px;
  line-height: 1.15;
}

.order-page-hero span {
  display: block;
  margin-top: 7px;
  color: rgba(255, 255, 255, .78);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.order-page-hero button {
  min-width: 72px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: var(--sage-dark);
  background: rgba(255, 255, 255, .84);
  font-weight: 900;
}

.order-page-panel {
  display: grid;
  gap: 12px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 12px 24px rgba(45, 64, 50, .06);
}

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

.order-date-filter label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.order-date-filter span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.order-date-filter select {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 12px;
  background: rgba(250, 251, 249, .92);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.order-page-search input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 14px;
  background: rgba(250, 251, 249, .92);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.order-channel-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.order-channel-tabs button {
  flex: 0 0 auto;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 13px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.order-channel-tabs button.active {
  border-color: rgba(102, 137, 117, .42);
  background: var(--sage-soft);
  color: var(--sage-dark);
}

.order-page-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.order-page-summary div {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(225, 229, 222, .8);
  border-radius: 16px;
  background: rgba(255, 255, 255, .76);
}

.order-page-summary span,
.order-page-summary b {
  display: block;
}

.order-page-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.order-page-summary b {
  margin-top: 5px;
  color: var(--ink);
  font-size: 18px;
  overflow-wrap: anywhere;
}

.order-page-list,
.order-page-card-list {
  display: grid;
  gap: 12px;
}

.order-channel-group {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(206, 216, 208, .92);
  border-radius: 20px;
  background: rgba(255, 255, 255, .78);
}

.order-channel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.order-channel-head strong,
.order-channel-head span {
  display: block;
}

.order-channel-head strong {
  color: var(--ink);
  font-size: 16px;
}

.order-channel-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.order-channel-head b {
  color: var(--sage-dark);
  font-size: 15px;
  white-space: nowrap;
}

.order-page-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(45, 64, 50, .06);
  overflow: hidden;
}

.order-page-card-main {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
  width: 100%;
  border: 0;
  padding: 14px;
  background: transparent;
  text-align: left;
}

.order-page-avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--sage-soft);
  color: var(--sage-dark);
  font-size: 17px;
  font-weight: 900;
}

.order-page-copy,
.order-page-copy strong,
.order-page-copy em,
.order-page-copy small {
  display: block;
  min-width: 0;
}

.order-page-copy strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.3;
}

.order-page-copy em,
.order-page-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.order-page-amount {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 4px;
  min-width: 72px;
}

.order-page-amount b {
  color: var(--sage-dark);
  font-size: 15px;
  white-space: nowrap;
}

.order-page-amount small {
  max-width: 90px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.25;
  text-align: right;
  overflow-wrap: anywhere;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  width: min(100%, 430px);
  transform: translateX(-50%);
  padding: 7px 8px calc(9px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(225, 229, 222, .86);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(18px);
}

.bottom-nav button {
  height: 54px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--faint);
  font-size: 10px;
  font-weight: 900;
}

.bottom-nav span {
  display: block;
  margin-bottom: 3px;
  font-size: 18px;
  line-height: 1;
}

.bottom-nav .active {
  color: var(--sage-dark);
  background: var(--sage-soft);
}

.member-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding: 20px;
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 86% 8%, rgba(255, 255, 255, .22), transparent 34%),
    linear-gradient(145deg, #6f8f7a, #425f4f);
  box-shadow: var(--shadow);
}

.member-hero p {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  opacity: .75;
}

.member-hero strong {
  display: block;
  font-size: 30px;
  line-height: 1.08;
  font-variant-numeric: tabular-nums;
}

.member-hero span {
  display: block;
  margin-top: 7px;
  font-size: 12px;
  opacity: .74;
}

.member-hero button {
  flex: 0 0 auto;
  height: 40px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.member-search-card {
  position: sticky;
  top: 74px;
  z-index: 8;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(54, 76, 67, .08);
}

.member-filter-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-top: 10px;
}

.member-filter-row button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
}

.member-filter-row .active {
  color: var(--sage-dark);
  border-color: var(--sage);
  background: var(--sage-soft);
}

.member-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 62px;
  border-top: 1px solid var(--line);
  min-width: 0;
}

.member-row:first-of-type { border-top: 0; }

.member-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--sage);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.member-avatar.rose { background: var(--rose); }
.member-avatar.blue { background: var(--blue); }

.member-row strong {
  display: block;
  font-size: 14px;
}

.member-row span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.member-row b {
  color: var(--sage-dark);
  background: var(--sage-soft);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 10px;
}

.member-field-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.member-field-grid span {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.member-sales-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.member-summary-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.member-summary-strip article {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.member-summary-strip span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.member-summary-strip strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.member-source-summary {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(111, 143, 122, .18);
  border-radius: 16px;
  background: rgba(111, 143, 122, .08);
}

.member-source-summary span {
  color: var(--sage-dark);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.45;
}

.member-source-summary div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.member-source-summary b {
  display: inline-flex;
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff;
  color: var(--sage-dark);
  font-size: 11px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.member-sales-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
}

.member-list-panel,
.member-detail-panel {
  min-width: 0;
}

.member-detail-panel {
  order: 1;
}

.member-list-panel {
  order: 1;
}

.member-sales-list {
  display: grid;
  gap: 14px;
  padding-top: 10px;
}

.member-sales-entry {
  padding: 14px;
  border: 1px solid rgba(111, 143, 122, .18);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(47, 68, 55, .08);
  scroll-margin-top: 158px;
}

.member-sales-entry:first-child {
  border-top: 1px solid rgba(111, 143, 122, .18);
}

.member-sales-entry.active {
  margin: 0;
  border-color: rgba(111, 143, 122, .28);
  background: linear-gradient(135deg, rgba(111, 143, 122, .10), rgba(111, 143, 122, .04));
  box-shadow: 0 12px 26px rgba(47, 68, 55, .10);
}

.member-sales-row {
  grid-template-columns: 44px minmax(0, 1fr);
  width: 100%;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.member-sales-row.active {
  background: transparent;
}

.member-row-copy {
  min-width: 0;
  display: block;
}

.member-row-copy em,
.member-row-copy small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.member-source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.member-row .member-source-row {
  display: flex;
}

.member-source-row.detail {
  margin: 0;
}

.member-source-row.order {
  margin-top: 6px;
}

.member-source-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(111, 143, 122, .12);
  color: var(--sage-dark);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.member-row .member-source-badge {
  display: inline-flex;
}

.member-source-badge.muted {
  background: var(--surface-soft);
  color: var(--muted);
}

.member-source-badge.cross {
  background: var(--sage-dark);
  color: #fff;
}

.member-channel-note {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border: 1px solid rgba(111, 143, 122, .22);
  border-radius: 14px;
  background: rgba(111, 143, 122, .08);
}

.member-channel-note b {
  color: var(--sage-dark);
  font-size: 12px;
  line-height: 1.25;
}

.member-channel-note span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.member-dept-supplement {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(111, 143, 122, .2);
  border-radius: 14px;
  background: #fff;
}

.member-subsection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.member-subsection-head b {
  color: var(--sage-dark);
  font-size: 13px;
}

.member-subsection-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.member-dept-grid,
.member-order-extra {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.member-dept-grid span,
.member-order-extra span {
  min-width: 0;
  padding: 8px 9px;
  border-radius: 10px;
  background: var(--surface-soft);
}

.member-dept-grid b,
.member-dept-grid em,
.member-order-extra b,
.member-order-extra em {
  display: block;
}

.member-dept-grid b,
.member-order-extra b {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.member-dept-grid em,
.member-order-extra em {
  margin-top: 3px;
  color: var(--ink);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.member-staff-remarks {
  display: grid;
  gap: 7px;
}

.member-staff-remarks p {
  margin: 0;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(111, 143, 122, .08);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
  white-space: pre-wrap;
}

.member-order-extra {
  margin-top: 9px;
}

.member-row-metrics {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  justify-self: start;
  max-width: 100%;
  margin-top: 7px;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--sage-soft);
  color: var(--sage-dark);
  font-size: 11px;
  font-weight: 900;
  min-width: 0;
}

.member-row-metrics b,
.member-row-metrics small {
  display: block;
}

.member-row-metrics b {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--sage-dark);
  font-size: 12px;
}

.member-row-metrics small {
  color: var(--sage-dark);
  font-size: 10px;
  font-weight: 900;
}

.member-card-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.member-card-actions button {
  min-height: 42px;
  border: 1px solid rgba(111, 143, 122, .24);
  border-radius: 12px;
  background: rgba(255, 255, 255, .75);
  color: var(--sage-dark);
  font-size: 12px;
  font-weight: 900;
}

.member-card-actions button:first-child {
  background: var(--sage-dark);
  color: #fff;
  border-color: var(--sage-dark);
}

.member-sales-detail {
  display: grid;
  gap: 10px;
}

.member-inline-detail {
  display: grid;
  gap: 10px;
  padding: 12px 0 0 54px;
  min-width: 0;
  scroll-margin-top: 158px;
}

.member-detail-panel {
  display: none;
}

.member-detail-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.member-detail-summary div {
  min-width: 0;
  padding: 10px;
  border-radius: 12px;
  background: var(--surface-soft);
}

.member-detail-summary span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.member-detail-summary b {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.member-order-list {
  display: grid;
  gap: 10px;
}

.member-order-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.member-order-card.clickable {
  cursor: pointer;
}

.member-order-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
}

.member-order-head strong,
.member-order-head span {
  display: block;
}

.member-order-head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.member-order-head b {
  color: var(--sage-dark);
  font-size: 13px;
  white-space: nowrap;
}

.member-order-seq {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 5px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(111, 143, 122, .12);
  color: var(--sage-dark);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.member-order-card p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.member-order-items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  margin-top: 10px;
}

.member-order-items span {
  min-width: 0;
  padding: 8px 9px;
  border-radius: 10px;
  background: var(--surface-soft);
}

.member-order-items b,
.member-order-items em {
  display: block;
}

.member-order-items b {
  color: var(--ink);
  font-size: 11px;
  line-height: 1.3;
}

.member-order-items em {
  margin-top: 3px;
  color: var(--muted);
  font-style: normal;
  font-size: 10px;
  font-weight: 900;
}

.member-order-open {
  width: 100%;
  min-height: 38px;
  margin-top: 10px;
  border: 1px solid rgba(111, 143, 122, .24);
  border-radius: 11px;
  background: #fff;
  color: var(--sage-dark);
  font-size: 12px;
  font-weight: 900;
}

.member-list-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 12px;
}

.member-list-actions[hidden],
.member-list-actions button[hidden] {
  display: none;
}

.member-list-actions button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--sage-dark);
  font-size: 12px;
  font-weight: 900;
}

.member-list-actions button:first-child {
  grid-column: 1 / -1;
  background: var(--sage-dark);
  color: #fff;
  border-color: var(--sage-dark);
}

.member-more-note {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.member-sheet[hidden] {
  display: none;
}

.member-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  align-items: end;
}

.member-sheet-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(25, 37, 31, .38);
  backdrop-filter: blur(6px);
}

.member-sheet-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 760px);
  height: min(88vh, 820px);
  max-height: calc(100dvh - 18px);
  margin: 0 auto;
  border-radius: 24px 24px 0 0;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 -20px 44px rgba(47, 68, 55, .18);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.order-sheet {
  z-index: 90;
}

.member-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.member-sheet-head span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .16em;
}

.member-sheet-head h2 {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
}

.member-sheet-head button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--sage-dark);
  font-size: 26px;
  line-height: 1;
}

.member-sheet-body {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 14px calc(34px + env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
}

.member-sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 14px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .92);
}

.member-sheet-actions button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--sage-dark);
  font-size: 14px;
  font-weight: 900;
}

.member-sheet-actions button:last-child {
  border-color: var(--sage-dark);
  background: var(--sage-dark);
  color: #fff;
}

.member-order-sheet-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: var(--sage-soft);
}

.member-order-sheet-summary span {
  color: var(--sage-dark);
  font-size: 12px;
  font-weight: 900;
}

.member-order-sheet-summary b {
  color: var(--sage-dark);
  font-size: 24px;
}

.member-order-detail-items {
  display: grid;
  gap: 0;
}

.member-order-detail-items div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.member-order-detail-items div:first-child {
  border-top: 0;
}

.member-order-detail-items b {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
}

.member-order-detail-items span {
  grid-column: 1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.member-order-detail-items em {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  color: var(--sage-dark);
  font-size: 16px;
  font-style: normal;
  font-weight: 900;
}

.member-staff-note-box {
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
  white-space: pre-wrap;
}

@media (max-width: 760px) {
  .order-page-card-main {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .order-page-avatar {
    width: 46px;
    height: 46px;
    font-size: 15px;
  }

  .order-page-amount {
    grid-column: 2;
    justify-items: start;
    min-width: 0;
  }

  .order-page-amount small {
    max-width: none;
    text-align: left;
  }

  .bottom-nav button {
    font-size: 9px;
  }

  .bottom-nav span {
    font-size: 16px;
  }

  .member-detail-summary,
  .member-field-grid,
  .member-order-items,
  .member-order-head {
    grid-template-columns: 1fr;
  }

  .member-inline-detail {
    padding-left: 0;
  }

  .member-sales-row {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .member-row-metrics {
    grid-column: 1 / -1;
    justify-self: stretch;
    border-radius: 12px;
  }

  .member-field-grid span,
  .member-dept-grid span,
  .member-order-extra span,
  .member-order-detail-items b,
  .member-order-detail-items span,
  .member-row-metrics b,
  .member-row-metrics small,
  .member-order-card,
  .member-order-items span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .member-order-head b {
    white-space: normal;
    justify-self: start;
  }

  .member-sales-entry.active {
    margin: 0;
  }

  .member-dept-grid,
  .member-order-extra {
    grid-template-columns: 1fr;
  }

  .member-card-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .member-card-actions button {
    min-width: 0;
    padding-inline: 4px;
  }

  .member-order-detail-items div {
    grid-template-columns: 1fr;
  }

  .member-order-detail-items em {
    grid-row: auto;
    grid-column: 1;
    justify-self: start;
  }

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

  .member-hero button {
    align-self: flex-start;
  }
}

@media (min-width: 1040px) {
  .member-sales-layout {
    grid-template-columns: minmax(360px, .85fr) minmax(0, 1.15fr);
  }

  .member-list-panel {
    order: 1;
  }

  .member-detail-panel {
    display: block;
    order: 2;
    position: sticky;
    top: 78px;
  }

  .member-search-card {
    top: 82px;
  }

  .member-inline-detail {
    display: none;
  }

  .member-summary-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .member-detail-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.customer-public-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding: 22px 20px;
  border-radius: 26px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 2%, rgba(242, 217, 167, .32), transparent 35%),
    linear-gradient(145deg, #789a84 0%, #4f705c 56%, #334c3c 100%);
  box-shadow: var(--shadow);
}

.customer-public-hero p {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .16em;
  opacity: .72;
}

.customer-public-hero strong {
  display: block;
  font-size: 28px;
  line-height: 1.15;
}

.customer-public-hero span {
  display: block;
  margin-top: 10px;
  max-width: 280px;
  font-size: 13px;
  line-height: 1.55;
  opacity: .76;
}

.customer-public-hero button {
  flex: 0 0 auto;
  height: 38px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.customer-form-card {
  margin-top: 12px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1.5px solid var(--sage);
  box-shadow: 0 8px 24px rgba(102, 137, 117, .10);
}

.customer-form-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.customer-form-head h2 {
  margin: 0;
  font-size: 16px;
}

.customer-form-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.customer-form-head span {
  align-self: flex-start;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--sage-soft);
  color: var(--sage-dark);
  font-size: 10px;
  font-weight: 900;
}

.customer-form-grid {
  display: grid;
  gap: 9px;
}

.customer-wide {
  grid-column: 1 / -1;
}

.customer-form-section-title {
  margin: 6px 0 2px;
  color: var(--sage-dark);
  font-size: 13px;
  font-weight: 950;
}

.customer-choice-row,
.customer-channel-row {
  display: grid;
  gap: 8px;
}

.customer-choice-row {
  grid-template-columns: repeat(3, 1fr);
}

.customer-channel-row {
  grid-template-columns: 1fr 48px;
}

.customer-choice-row button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--sage-dark);
  font-size: 13px;
  font-weight: 900;
}

.customer-choice-row button.active {
  border-color: var(--sage);
  background: var(--sage-soft);
  color: var(--sage-dark);
}

.birthday-group {
  display: grid;
  gap: 8px;
}

.birthday-group > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.birthday-group > div {
  display: grid;
  grid-template-columns: 1.2fr .8fr .8fr;
  gap: 8px;
}

.birthday-group label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.customer-date-field {
  display: grid;
  gap: 6px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.customer-date-field .field {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 0 10px;
  font-size: 13px;
  -webkit-appearance: none;
  appearance: none;
}

.scent-choice {
  margin-top: 12px;
  padding: 12px;
  border-radius: 15px;
  background: var(--surface-soft);
}

.scent-choice p {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.scent-choice div {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.scent-choice button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--sage-dark);
  font-size: 12px;
  font-weight: 900;
}

.scent-choice button.active {
  border-color: var(--sage);
  background: var(--sage-soft);
  color: var(--sage-dark);
}

.customer-note {
  width: 100%;
  height: 88px;
  min-height: 88px;
  padding-top: 12px;
  resize: vertical;
}

.muted-copy {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.outline-wide-btn {
  width: 100%;
  height: 44px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.consent-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  align-items: start;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.privacy-notice {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  margin-bottom: 4px;
  padding: 13px 14px;
  background: var(--surface-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.privacy-notice strong {
  color: var(--sage-dark);
  font-size: 12px;
}

.privacy-notice span,
.consent-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.consent-row input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--sage);
}

.public-note-row {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.public-note-row:first-of-type { border-top: 0; }

.public-note-row span {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--sage-soft);
  color: var(--sage-dark);
  font-size: 10px;
  font-weight: 900;
}

.public-note-row p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.follow-row {
  min-height: 42px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.follow-row:first-of-type { border-top: 0; }

.follow-row b {
  color: var(--rose);
  font-size: 12px;
}

.aftercare-list {
  display: grid;
  gap: 10px;
}

.aftercare-card {
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

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

.aftercare-top strong {
  font-size: 14px;
  line-height: 1.35;
}

.aftercare-top span {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--rose-soft);
  color: var(--rose);
  font-size: 11px;
  font-weight: 900;
}

.aftercare-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.aftercare-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.aftercare-meta b {
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff;
  color: var(--sage-dark);
  font-size: 10px;
}

@media (max-width: 360px) {
  .page { padding-left: 12px; padding-right: 12px; }
  .hero-card strong { font-size: 34px; }
  .chip-grid.c4, .pay-row { grid-template-columns: repeat(2, 1fr); }
  .quick-actions, .quick-actions.three { grid-template-columns: repeat(3, 1fr); }
  .product-pills { grid-template-columns: repeat(2, 1fr); }
}

/* Finance mobile layout guard */
.finance-workbench,
.finance-tab-panel,
.finance-section-card,
.finance-section-card * {
  box-sizing: border-box;
}

.finance-workbench {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.finance-section-card {
  width: 100%;
  min-width: 0;
}

.finance-tab-wrap {
  top: 8px;
  max-width: 100%;
}

.finance-tab-line,
.finance-tab-line.secondary,
.finance-tab-line.tertiary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.finance-tab-line button,
.finance-subtabs button {
  min-height: 38px;
  padding: 6px 7px;
  white-space: normal;
  line-height: 1.2;
}

.finance-tab-line.secondary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.finance-quick-grid,
.finance-quick-grid.three,
.finance-account-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.finance-quick-grid.two,
.finance-action-grid,
.finance-form-grid,
.finance-decision-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.finance-pl-summary {
  grid-template-columns: 1fr;
}

.finance-section-head {
  min-width: 0;
}

.finance-section-head > span {
  flex: 0 0 28px;
}

.finance-section-head > div {
  min-width: 0;
}

.finance-section-head strong,
.finance-section-head p,
.finance-info-note,
.finance-decision-grid b,
.finance-decision-grid span,
.finance-list-row span,
.finance-list-row b,
.finance-total-row span,
.finance-total-row b {
  overflow-wrap: anywhere;
}

.finance-list-row,
.finance-total-row,
.finance-pl-row {
  flex-wrap: wrap;
}

.finance-list-row b,
.finance-total-row b,
.finance-pl-row b {
  min-width: 0;
  max-width: 100%;
}

.finance-decision-grid button {
  min-height: 82px;
}

.finance-pl-toolbar {
  align-items: center;
  flex-direction: row;
}

.finance-pl-toolbar div {
  display: flex;
  justify-content: flex-end;
}

.finance-pl-net,
.fin-scn-result {
  grid-template-columns: 1fr;
}

.fin-stl-hero-chips {
  grid-template-columns: 1fr;
}

.fin-scn-head {
  flex-wrap: wrap;
}

.fin-scn-head .fin-scn-name {
  flex: 1 1 180px;
}

.fin-fee-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.fin-fee-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 76px 82px 28px;
  gap: 7px;
  align-items: center;
  width: 100%;
}

.fin-fee-row input,
.fin-fee-row select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0 9px;
  border: 1px solid rgba(74, 105, 82, .16);
  border-radius: 11px;
  background: rgba(255,255,255,.92);
  color: #1f3f38;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
}

.fin-fee-row select {
  padding-right: 30px;
  background:
    linear-gradient(45deg, transparent 50%, #7f9189 50%) calc(100% - 17px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, #7f9189 50%, transparent 50%) calc(100% - 12px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, rgba(255,255,255,.94), rgba(246, 248, 244, .9));
}

.finance-readonly-field {
  display: flex;
  align-items: center;
  min-height: 42px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid rgba(74, 105, 82, .14);
  border-radius: 13px;
  background: rgba(248, 251, 247, .86);
  color: #20352f;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.fin-platform-terms {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(74, 105, 82, .14);
  border-radius: 14px;
  background: rgba(248, 251, 247, .88);
}

.fin-platform-terms > strong {
  color: #1f3f38;
  font-size: 15px;
}

.fin-platform-term-row {
  display: grid;
  grid-template-columns: minmax(86px, .28fr) 1fr;
  gap: 10px;
  align-items: start;
  font-size: 13px;
  line-height: 1.55;
}

.fin-platform-term-row span {
  color: #74857d;
  font-weight: 850;
}

.fin-platform-term-row b {
  color: #20352f;
  font-weight: 750;
  word-break: break-word;
}

.fin-plh-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px 28px;
  width: 100%;
}

.fin-plh-row input,
.fin-plh-row input[data-plh-name],
.fin-plh-row input[data-plh-amt] {
  width: 100%;
  min-width: 0;
}

.finance-secondary.small {
  min-height: 34px;
  margin-top: 8px;
  font-size: 12px;
}

.fin-save-confirm {
  margin-top: 10px;
}

.fin-save-status {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(168, 145, 111, .12);
  color: #806b4f;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.fin-save-status.saved {
  background: rgba(95, 158, 116, .14);
  color: #44794f;
}

.fin-edit-bar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  padding: 10px 11px;
  border-radius: 13px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(74, 105, 82, .14);
}

.fin-edit-bar div {
  min-width: 0;
}

.fin-edit-bar strong,
.fin-edit-bar span {
  display: block;
}

.fin-edit-bar strong {
  color: #1f3f38;
  font-size: 13px;
}

.fin-edit-bar span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.45;
}

.fin-edit-bar button {
  flex: 0 0 auto;
  width: auto;
  min-width: 72px;
  min-height: 34px;
  margin-top: 0;
  padding: 0 14px;
  border: 1px solid rgba(35, 79, 69, .18);
  border-radius: 999px;
  background: #244d43;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

.finance-form-grid input:disabled,
.finance-form-grid select:disabled,
.fin-scn-name:disabled,
.fin-comm-fee-row input:disabled,
.fin-comm-fee-row select:disabled,
.fin-fee-row input:disabled,
.fin-fee-row select:disabled {
  border-color: rgba(71, 85, 105, .08);
  background: rgba(244, 246, 243, .78);
  color: rgba(31, 63, 56, .72);
  opacity: 1;
}

.fin-row-lock {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(71, 85, 105, .08);
  color: rgba(71, 85, 105, .62);
  font-size: 10px;
  font-weight: 950;
}

.comfort-ai-hero {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #7d9484, #607766);
  color: #fff;
}

.comfort-ai-hero.warn {
  background: linear-gradient(135deg, #a8916f, #8b7358);
}

.comfort-ai-hero span {
  font-size: 12px;
  font-weight: 950;
  opacity: .86;
}

.comfort-ai-hero strong {
  font-size: 30px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.comfort-ai-hero p {
  margin: 0;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.7;
  opacity: .9;
}

.comfort-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.comfort-source-grid article {
  min-width: 0;
  padding: 12px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(139, 128, 150, .16);
}

.comfort-source-grid span,
.comfort-source-grid small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.4;
}

.comfort-source-grid strong {
  display: block;
  margin: 5px 0 3px;
  color: #1f3f38;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.comfort-formula {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 13px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(139, 128, 150, .16);
}

.comfort-formula span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
}

.comfort-formula b {
  color: #1f3f38;
  font-size: 13px;
  line-height: 1.45;
}

.comfort-assumption-panel {
  background: rgba(255,255,255,.76);
}

.comfort-assumption-note {
  margin: 12px 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.5;
}

.finance-runway {
  align-items: flex-start;
}

@media (max-width: 390px) {
  .finance-tab-line.secondary,
  .finance-quick-grid,
  .finance-quick-grid.two,
  .finance-quick-grid.three,
  .finance-account-grid,
  .finance-action-grid,
  .finance-form-grid,
  .finance-decision-grid,
  .finance-subtabs {
    grid-template-columns: 1fr;
  }

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

  .finance-section-card {
    padding: 13px;
  }

  .finance-runway {
    display: grid;
    gap: 8px;
  }

  .fin-fee-row {
    grid-template-columns: 1fr 72px;
  }

  .fin-fee-row input:first-child {
    grid-column: 1 / -1;
  }

  .fin-platform-term-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .fin-comm-fee-row,
  .fin-comm-fee-row.is-locked {
    grid-template-columns: minmax(0, 1fr) 82px 24px;
  }

  .fin-comm-fee-row:not(.is-locked) {
    grid-template-columns: minmax(0, 1fr) 82px 24px 28px;
  }

  .fin-edit-bar {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .fin-edit-bar button {
    width: auto;
  }

  .comfort-source-grid {
    grid-template-columns: 1fr;
  }

  .strategy-data-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 560px) {
  .finance-tab-line {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .finance-tab-line.secondary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .finance-tab-line.tertiary {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .finance-quick-grid.three,
  .finance-pl-net,
  .fin-stl-hero-chips {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .fin-stl-hero-chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

/* ============================================================
   桌機寬版（≥1024px）：手機底部導覽 → 左側欄，內容用整個螢幕
   手機版完全不受影響（以下全部包在 min-width:1024px 內）
   ============================================================ */
@media (min-width: 1024px) {
  :root { --pf-sidebar: 216px; }

  .phone-shell {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 0 48px var(--pf-sidebar);
    overflow: visible;
    background:
      linear-gradient(180deg, rgba(230, 240, 233, .55), rgba(246, 247, 244, 0) 260px),
      var(--bg);
  }

  /* 底部導覽改成左側固定欄 */
  .bottom-nav {
    left: 0;
    top: 0;
    bottom: auto;
    transform: none;
    width: var(--pf-sidebar);
    height: 100vh;
    grid-template-columns: 1fr;
    grid-auto-rows: max-content;
    align-content: start;
    gap: 6px;
    padding: 86px 14px 18px;
    border-top: 0;
    border-right: 1px solid rgba(225, 229, 222, .9);
    background: rgba(255, 255, 255, .96);
  }
  .bottom-nav button {
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 0 14px;
    font-size: 14px;
    border-radius: 12px;
  }
  .bottom-nav span { margin: 0; font-size: 18px; }
  .bottom-nav .active { box-shadow: inset 0 0 0 1px rgba(102, 137, 117, .18); }

  /* 頂部標題列：避開左側欄、置中對齊內容 */
  .app-header {
    padding-left: calc(var(--pf-sidebar) + 28px);
    padding-right: 28px;
  }

  /* 每頁內容置中、用較寬的版面 */
  .page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 26px 32px 48px;
  }

  /* 營運詳情 / 工具面板撐滿可用寬度 */
  .ops-tool-panel,
  .ops-preview,
  #opsPreview { max-width: 100%; }

  /* 商品管理：清單與成本分析改雙欄，表單欄位三欄 */
  .products-workspace .product-list-stack,
  .products-workspace .product-cost-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .products-workspace .partner-form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  /* 編輯卡片在雙欄清單上方時，獨佔整行 */
  .products-workspace .ops-edit-card { grid-column: 1 / -1; }

  /* 首頁 / 各頁常見格狀區塊在大螢幕多排幾欄，不再被擠 */
  .ops-module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* 超寬螢幕：商品清單再多一欄 */
@media (min-width: 1440px) {
  .products-workspace .product-list-stack,
  .products-workspace .product-cost-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* 成本版本可點選切換（成本分析卡片） */
.product-cost-versions.selectable > div {
  cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease, transform .1s ease;
}
.product-cost-versions.selectable > div:hover {
  background: rgba(102, 137, 117, .12);
}
.product-cost-versions.selectable > div:active {
  transform: scale(.99);
}
.product-cost-versions.selectable > div.active {
  box-shadow: inset 0 0 0 2px rgba(102, 137, 117, .55);
}

/* 點選版本後，卡片上方顯示目前是哪一版成本（文字長會自動換行） */
.product-cost-shown {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 7px;
  margin: 2px 0 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(102, 137, 117, .1);
}
.product-cost-shown > span {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
}
.product-cost-shown > strong {
  font-size: 14px;
  font-weight: 950;
  color: #234f45;
  overflow-wrap: anywhere;
}
.product-cost-shown > em {
  font-size: 11px;
  font-weight: 850;
  font-style: normal;
  color: #6f815a;
}
.product-cost-shown.preview { background: rgba(196, 166, 94, .16); }
.product-cost-shown.preview > em { color: #80662f; }

/* 商品列表卡片裡的成本版本切換列（撐滿整行） */
.product-list-versions {
  grid-column: 1 / -1;
  margin-top: 4px;
}

/* ── 定價健檢 ── */
.product-pricing { display: grid; gap: 12px; }
.pricing-hero {
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(244,248,241,.9));
  border: 1px solid rgba(102,126,118,.16);
}
.pricing-hero-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; justify-content: space-between; }
.pricing-hero-head strong { font-size: 17px; color: #203f38; }
.pricing-hero-head span { font-size: 12px; font-weight: 800; color: var(--muted); }
.pricing-hero-head b { color: #80662f; }
.pricing-formula { margin: 8px 0 10px; font-size: 11px; font-weight: 700; color: rgba(35,79,69,.62); line-height: 1.5; }
.pricing-legend { display: flex; flex-wrap: wrap; gap: 6px; }
.pricing-legend span {
  padding: 5px 10px; border-radius: 999px; font-size: 11px; font-weight: 950;
}
.pricing-legend .good { background: rgba(74,140,108,.16); color: #2c6a4f; }
.pricing-legend .okgood { background: rgba(120,170,140,.18); color: #3c7a58; }
.pricing-legend .ok { background: rgba(196,166,94,.18); color: #80662f; }
.pricing-legend .risk { background: rgba(193,87,75,.16); color: #a23b30; }
.pricing-note { margin: 8px 0 0; font-size: 11px; font-weight: 800; color: #a23b30; }

.product-price-card {
  padding: 14px 15px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(102,126,118,.15);
  border-left: 5px solid rgba(102,126,118,.3);
  display: grid;
  gap: 10px;
}
.product-price-card.good { border-left-color: #4a8c6c; }
.product-price-card.okgood { border-left-color: #78aa8c; }
.product-price-card.ok { border-left-color: #c4a65e; }
.product-price-card.risk { border-left-color: #c1574b; }

.pricing-badge { padding: 5px 10px; border-radius: 999px; font-size: 11px; font-weight: 950; white-space: nowrap; }
.pricing-badge.good { background: rgba(74,140,108,.16); color: #2c6a4f; }
.pricing-badge.okgood { background: rgba(120,170,140,.18); color: #3c7a58; }
.pricing-badge.ok { background: rgba(196,166,94,.18); color: #80662f; }
.pricing-badge.risk { background: rgba(193,87,75,.16); color: #a23b30; }

.pricing-metrics { grid-template-columns: repeat(5, minmax(0,1fr)); }
@media (max-width: 560px) { .pricing-metrics { grid-template-columns: repeat(3, minmax(0,1fr)); } }

.pricing-suggest { display: grid; gap: 4px; padding: 9px 11px; border-radius: 12px; background: rgba(196,166,94,.1); }
.pricing-suggest.ok { background: rgba(74,140,108,.1); }
.pricing-suggest span { font-size: 12px; font-weight: 850; color: #5c4a2a; }
.pricing-suggest.ok span { color: #2c6a4f; }
.pricing-suggest b { color: #80662f; }

/* 定價健檢：營運成本輸入、說明、6 欄、聚焦高亮 */
.pricing-overhead {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 10px 0 4px; padding: 9px 12px; border-radius: 12px;
  background: rgba(102,137,117,.08);
}
.pricing-overhead > span { font-size: 12px; font-weight: 900; color: #234f45; }
.pricing-overhead input {
  width: 88px; padding: 7px 10px; border-radius: 10px;
  border: 1px solid rgba(102,126,118,.3); font-weight: 900; text-align: center;
}
.pricing-overhead em { font-size: 11px; font-style: normal; color: var(--muted); font-weight: 700; }
.pricing-note-soft { margin: 8px 0 0; font-size: 11px; font-weight: 700; color: rgba(35,79,69,.6); line-height: 1.5; }
.pricing-metrics { grid-template-columns: repeat(6, minmax(0,1fr)); }
@media (max-width: 560px) { .pricing-metrics { grid-template-columns: repeat(3, minmax(0,1fr)); } }

/* 商品列表「毛利」可點，跳成本分析 */
button.product-list-profit {
  border: 0; background: transparent; cursor: pointer; text-align: right;
  padding: 2px 4px; border-radius: 10px; transition: background .15s;
}
button.product-list-profit:hover { background: rgba(102,137,117,.1); }

/* 從列表跳過來時，該成本卡片高亮一下 */
.product-cost-card.focus {
  box-shadow: 0 0 0 2px rgba(102,137,117,.55), 0 12px 24px rgba(70,88,80,.08);
}
.pricing-suggest.warn { background: rgba(193,87,75,.1); }
.pricing-suggest.warn span { color: #a23b30; }

/* 回本試算區塊 */
.pricing-breakeven {
  padding: 14px 16px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(244,248,241,.92));
  border: 1px solid rgba(102,126,118,.16);
  display: grid; gap: 10px;
}
.be-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
@media (min-width: 760px) { .be-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.be-grid > div {
  padding: 9px 11px; border-radius: 12px; background: rgba(255,255,255,.62);
  border: 1px solid rgba(102,126,118,.12); display: grid; gap: 3px;
}
.be-grid span { font-size: 11px; font-weight: 800; color: var(--muted); }
.be-grid b { font-size: 15px; color: #203f38; }
.be-grid b.pos { color: #2c6a4f; }
.be-grid b.neg { color: #a23b30; }

/* 5 個指標自動排列 */
.pricing-metrics { grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); }

/* 定價健檢：頁面範圍備註 */
.pricing-scope-note {
  margin: 8px 0 2px; padding: 10px 12px; border-radius: 12px;
  background: rgba(196,166,94,.12); border: 1px solid rgba(196,166,94,.28);
  display: grid; gap: 3px;
}
.pricing-scope-note > strong { font-size: 12px; font-weight: 950; color: #80662f; }
.pricing-scope-note > span { font-size: 12px; font-weight: 700; color: #5c4a2a; line-height: 1.55; }
.pricing-scope-note b { color: #80662f; }

/* 行銷折扣：可調整每月人事費 */
.discount-labor-input {
  display: flex; align-items: center; gap: 8px; margin: 6px 0 8px;
}
.discount-labor-input > span { font-size: 12px; font-weight: 900; color: #5c4a2a; }
.discount-labor-input input {
  width: 120px; padding: 7px 10px; border-radius: 10px;
  border: 1px solid rgba(168,145,111,.4); font-weight: 900; text-align: right;
}
