:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #121826;
  --text: #1f2937;
  --muted: #667085;
  --line: #d9e2ef;
  --line-strong: #aebbd0;
  --teal: #0f766e;
  --teal-dark: #0b5751;
  --mint: #dff3ed;
  --gold: #b7791f;
  --gold-soft: #fff7df;
  --amber: #c77700;
  --red: #b42318;
  --green: #16803d;
  --blue: #2563eb;
  --indigo: #3843a8;
  --shadow: 0 18px 45px rgba(18, 24, 38, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    "Segoe UI",
    Arial,
    sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), transparent 32%),
    linear-gradient(225deg, rgba(183, 121, 31, 0.1), transparent 34%),
    linear-gradient(180deg, #f8fbff 0%, #eef3f8 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.appbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(174, 187, 208, 0.55);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 245px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0f766e, #3843a8);
  color: #fff;
  font-weight: 800;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 21px;
  line-height: 1.25;
}

.top-tabs {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: max-content;
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(244, 248, 251, 0.94);
  box-shadow: inset 0 1px 0 #fff, 0 5px 16px rgba(30,57,78,.06);
}

.tab-button {
  flex: none;
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  padding: 7px 12px;
  cursor: pointer;
  white-space: nowrap;
  word-break: keep-all;
  writing-mode: horizontal-tb;
}

.tab-button.active {
  background: linear-gradient(135deg, #12263d, #0d766d);
  color: #fff;
  box-shadow: 0 6px 14px rgba(15,70,75,.2);
}

.admin-only {
  display: none !important;
}

body.admin-mode .admin-only {
  display: inline-flex !important;
}

h2 {
  font-size: 16px;
  line-height: 1.3;
}

.brand p,
.actionbar p,
.dialog-head p,
.hint,
#resultMeta {
  color: var(--muted);
  line-height: 1.5;
}

.operator {
  flex: 1 1 auto;
  justify-content: flex-end;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.operator label {
  color: var(--muted);
}

.operator input {
  width: 140px;
}

.save-state {
  min-width: 82px;
  max-width: min(320px, 25vw);
  padding: 6px 10px;
  border-radius: 999px;
  background: #edf7f3;
  color: var(--teal-dark);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.save-state.error {
  background: #fee4e2;
  color: var(--red);
}

.admin-toggle {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 5px 10px;
  cursor: pointer;
}

body.admin-mode .admin-toggle {
  border-color: var(--teal);
  background: #eef8f5;
  color: var(--teal-dark);
}

.notification-button {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(25, 54, 75, 0.08);
}

.notification-button.has-unread {
  border-color: #efb24c;
  background: #fff9e9;
  animation: notification-ring 1.8s ease-in-out 2;
}

.notification-button b {
  position: absolute;
  top: -6px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #c8372d;
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}

@keyframes notification-ring {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(9deg); }
  40% { transform: rotate(-8deg); }
  60% { transform: rotate(5deg); }
}

.notification-panel {
  position: fixed;
  z-index: 60;
  top: 76px;
  right: 18px;
  width: min(420px, calc(100vw - 24px));
  max-height: min(720px, calc(100vh - 92px));
  overflow: hidden;
  border: 1px solid #d7e3e6;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(14, 39, 56, 0.24);
}

.notification-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 14px;
  background: linear-gradient(135deg, #153449, #087568);
  color: #fff;
}

.notification-panel-head span { color: #8edfd0; font-size: 9px; font-weight: 900; letter-spacing: .15em; }
.notification-panel-head h2 { margin-top: 4px; font-size: 20px; }
.notification-panel-head p { margin-top: 4px; color: #c8e8e2; font-size: 11px; }
.notification-panel-head .icon-button { color: #fff; background: rgba(255,255,255,.1); }

.notification-actions {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #e5edef;
  background: #f6faf9;
}

.notification-actions button { min-height: 32px; font-size: 11px; }
.notification-actions button:disabled { opacity: .58; cursor: default; }
.notification-actions button[aria-pressed="true"] { border-color: #72b9ad; background: #e8f6f2; color: #087568; }

.notification-list {
  max-height: min(520px, calc(100vh - 250px));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.notification-item {
  position: relative;
  display: grid;
  grid-template-columns: 8px 1fr auto;
  gap: 10px;
  width: 100%;
  padding: 13px 14px;
  border: 0;
  border-bottom: 1px solid #edf1f2;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.notification-item:hover { background: #f4faf8; }
.notification-item.unread { background: linear-gradient(90deg, #effaf6, #fff 55%); }
.notification-item > i { width: 7px; height: 7px; margin-top: 7px; border-radius: 50%; background: #c5d0d4; }
.notification-item.unread > i { background: #e08a15; box-shadow: 0 0 0 4px #fff0d6; }
.notification-item-copy { display: grid; min-width: 0; gap: 3px; }
.notification-item-copy b { color: #087568; font-size: 10px; }
.notification-item-copy strong { overflow: hidden; color: #17384a; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.notification-item-copy small { color: #6e818a; font-size: 10px; }
.notification-item-copy em { overflow: hidden; color: #829198; font-size: 9px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.notification-item time { color: #94a2a8; font-size: 8px; white-space: nowrap; }
.notification-item.read { opacity: .72; }

.notification-empty { display: grid; justify-items: center; gap: 5px; padding: 44px 20px; color: #7a8c93; text-align: center; }
.notification-empty span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #e9f6f1; color: #087568; font-size: 20px; }
.notification-empty strong { color: #35525f; }
.notification-empty p { font-size: 11px; }
.notification-footnote { padding: 9px 12px; border-top: 1px solid #edf1f2; background: #fafcfc; color: #819198; font-size: 9px; text-align: center; }

.notification-toasts {
  position: fixed;
  z-index: 80;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 24px));
}

.notification-toast {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid #65b9aa;
  border-radius: 14px;
  background: linear-gradient(135deg, #153449, #086f65);
  color: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 20px 48px rgba(15, 55, 66, .32);
  animation: notification-toast-in .3s ease-out;
}

.notification-toast span { color: #8de1d1; font-size: 9px; font-weight: 900; letter-spacing: .13em; }
.notification-toast strong { font-size: 16px; }
.notification-toast p { color: #d5ebe7; font-size: 12px; }
.notification-toast small { margin-top: 4px; color: #a9d7cf; font-size: 9px; }

@keyframes notification-toast-in {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.lead-table tr.notification-highlight td {
  background: #fff4cf !important;
  animation: lead-highlight 1s ease-in-out 3;
}

@keyframes lead-highlight { 50% { background: #dff6ed; } }

.layout {
  display: block;
  padding: 18px;
}

.panel,
.actionbar,
.table-shell,
.summary-tile {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel,
.actionbar,
.table-shell,
.summary-tile,
.hero-strip,
.settings-hero,
.insight-item {
  border-color: rgba(217, 226, 239, 0.95);
}

.panel {
  padding: 16px;
}

.panel-title,
.actionbar,
.dialog-head,
.dialog-actions,
.button-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel label,
.form-grid label {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
  outline: none;
}

textarea {
  resize: vertical;
  line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.primary-button,
.ghost-button,
.ghost-link,
.icon-button {
  min-height: 36px;
  border-radius: 6px;
  border: 1px solid transparent;
  padding: 8px 12px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.primary-button {
  background: linear-gradient(135deg, var(--teal), var(--indigo));
  color: #fff;
}

.primary-button:hover {
  background: var(--teal-dark);
}

.ghost-button,
.ghost-link {
  border-color: var(--line);
  background: #fff;
  color: var(--text);
}

.ghost-button:hover,
.ghost-link:hover {
  border-color: var(--line-strong);
  background: #f9f8f5;
}

.icon-button {
  width: 36px;
  padding: 0;
  border-color: var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
}

.workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.view-panel {
  display: none;
}

.view-panel.active {
  display: flex;
}

.tools-panel.active {
  display: flex;
  max-width: none;
}

.sync-hero .button-row {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sync-hero .ghost-button {
  color: var(--text);
}

.sync-grid {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(360px, 1fr);
  gap: 14px;
  align-items: stretch;
}

.wide-tool-card {
  grid-column: 1 / -1;
}

.hero-strip,
.settings-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 126px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(18, 24, 38, 0.96), rgba(15, 118, 110, 0.9)),
    #121826;
  color: #fff;
  box-shadow: var(--shadow);
}

.hero-strip span,
.settings-hero span {
  display: inline-block;
  margin-bottom: 8px;
  color: #b7efe0;
  font-size: 12px;
  font-weight: 700;
}

.hero-strip h2,
.settings-hero h2 {
  font-size: 24px;
}

.hero-strip p,
.settings-hero p {
  max-width: 680px;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
}

.hero-meter {
  display: grid;
  place-items: center;
  width: 112px;
  height: 86px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.hero-meter span {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
}

.hero-meter strong {
  font-size: 34px;
  line-height: 1;
}

.summary {
  display: grid;
  grid-template-columns: repeat(8, minmax(112px, 1fr));
  gap: 10px;
}

.lead-account-panel {
  padding: 16px;
}

.lead-filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px auto;
  align-items: end;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.lead-filter-bar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.lead-account-table th,
.lead-account-table td {
  text-align: center;
}

.lead-account-table th:first-child,
.lead-account-table td:first-child {
  text-align: left;
}

.lead-account-table .total-row {
  background: #f1f6fb;
  font-weight: 800;
}

.lead-time {
  display: inline-block;
  min-width: 142px;
  color: #24415e;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.component-badge,
.duplicate-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.component-badge.consult {
  background: #eaf2ff;
  color: #2457b2;
}

.component-badge.phone {
  background: #eaf8f2;
  color: #08745d;
}

.duplicate-badge {
  background: #fff2df;
  color: #a45400;
}

.manager-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.manager-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.manager-tabs button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
}

.manager-tabs button.active {
  border-color: var(--teal);
  background: #eef8f5;
  color: var(--teal-dark);
  font-weight: 700;
}

.quick-search {
  display: grid;
  grid-template-columns: auto minmax(220px, 320px);
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.quick-search input {
  min-width: 240px;
}

.summary-tile {
  min-height: 88px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.94);
}

.summary-tile span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.summary-tile strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  line-height: 1.15;
}

.summary-tile.good strong {
  color: var(--green);
}

.summary-tile.warn strong {
  color: var(--amber);
}

.summary-tile.money strong {
  color: var(--blue);
}

.actionbar {
  padding: 14px 16px;
}

.table-shell {
  overflow: auto;
  max-height: calc(100vh - 260px);
}

table {
  width: 100%;
  min-width: 1680px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 8px;
  vertical-align: top;
  text-align: left;
}

th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #edf2f8;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
}

tbody tr:hover {
  background: #f6fbfa;
}

td input,
td select,
td textarea {
  min-width: 110px;
  min-height: 32px;
  padding: 6px 8px;
  border-color: transparent;
  background: transparent;
}

td input:focus,
td select:focus,
td textarea:focus {
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

td select {
  cursor: pointer;
}

td select:has(option[value=""]:checked) {
  color: #98a2b3;
}

.compact {
  width: 88px;
  min-width: 88px;
}

.money-input {
  width: 92px;
  min-width: 92px;
}

.long-input {
  width: 220px;
  min-width: 220px;
}

.note-input {
  width: 180px;
  min-width: 180px;
}

.case-input {
  width: 280px;
  min-width: 280px;
}

.ad-info {
  display: grid;
  gap: 4px;
  width: 260px;
}

.ad-info strong {
  color: var(--text);
  font-weight: 600;
}

.ad-info span,
.customer span {
  color: var(--muted);
  line-height: 1.35;
}

.customer {
  display: grid;
  gap: 4px;
  width: 150px;
}

.account-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef8f5;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 700;
}

.rating {
  font-weight: 800;
  text-align: center;
}

.sync-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.sync-row strong {
  color: var(--gold);
}

.sync-status-card {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.sync-status-card strong {
  color: var(--text);
}

.sync-status-card span {
  color: var(--muted);
  line-height: 1.5;
}

.sync-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.sync-overview-card {
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.sync-overview-card:first-child {
  grid-column: 1 / -1;
  min-height: auto;
}

.sync-overview-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.sync-overview-card strong {
  display: block;
  margin-top: 7px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
}

.sync-overview-card.warning {
  border-color: #f0c36a;
  background: #fff8e7;
}

.sync-overview-card.warning strong {
  color: #9a5b00;
}

.compact-table-shell {
  margin-top: 12px;
  overflow: auto;
  max-height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.lead-account-table {
  min-width: 760px;
}

.lead-account-table th,
.lead-account-table td {
  text-align: center;
  vertical-align: middle;
}

.lead-account-table th:first-child,
.lead-account-table td:first-child {
  text-align: left;
}

.lead-account-table .total-row td {
  background: #edf5f8;
  color: #173f53;
  font-weight: 800;
}

.spend-table {
  min-width: 720px;
  font-size: 13px;
}

.sync-account-table {
  min-width: 620px;
  font-size: 13px;
}

.spend-table th,
.sync-account-table th {
  background: #e8f0f7;
}

.spend-table td,
.sync-account-table td {
  background: rgba(255, 255, 255, 0.88);
  white-space: nowrap;
}

.sync-account-table td:first-child {
  min-width: 180px;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.config-card {
  min-height: 280px;
}

.wide-card {
  grid-column: 1 / -1;
}

.mini-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
}

.toggle-line {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px !important;
  color: var(--text) !important;
}

.toggle-line input {
  width: 18px;
  min-height: 18px;
}

.account-config-table {
  margin-top: 12px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.account-config-table table {
  min-width: 780px;
}

.account-config-table td input {
  border-color: var(--line);
  background: #fff;
}

.copy-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.copy-line input {
  font-family:
    "Segoe UI",
    Arial,
    sans-serif;
}

.crm-field-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.crm-field-grid span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--text);
  padding: 6px 12px;
  font-size: 13px;
}

.config-save-bar {
  position: sticky;
  bottom: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(174, 187, 208, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 45px rgba(18, 24, 38, 0.14);
  backdrop-filter: blur(14px);
}

.config-save-bar div {
  display: grid;
  gap: 4px;
}

.config-save-bar strong {
  color: var(--text);
}

.config-save-bar span {
  color: var(--muted);
  font-size: 13px;
}

.insight-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-controls {
  display: grid;
  grid-template-columns: 170px 170px 220px minmax(260px, 1fr);
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.dashboard-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.dashboard-note {
  min-height: 36px;
  display: flex;
  align-items: center;
  color: var(--muted);
  line-height: 1.5;
}

.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(15, minmax(86px, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid #0f5b7e;
  border-radius: 8px;
  background: #0f5b7e;
  box-shadow: var(--shadow);
}

.dashboard-kpi {
  min-height: 70px;
  padding: 11px 8px;
  background: #eef7fb;
  text-align: center;
}

.dashboard-kpi span {
  display: block;
  color: #17445d;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-kpi strong {
  display: block;
  margin-top: 8px;
  color: #123047;
  font-size: 18px;
  line-height: 1.15;
}

.dashboard-shell {
  max-height: calc(100vh - 330px);
}

.dashboard-table {
  min-width: 1580px;
  font-size: 13px;
}

.dashboard-table th {
  background: #0f4f6d;
  color: #fff;
  text-align: center;
}

.dashboard-table td {
  text-align: center;
  vertical-align: middle;
}

.dashboard-table tbody tr:nth-child(even) td,
.spend-table tbody tr:nth-child(even) td {
  background: #f4f9fc;
}

.good-cell {
  color: var(--green);
  font-weight: 800;
}

.risk-cell {
  background: #fde8e7 !important;
  color: var(--red);
  font-weight: 800;
}

.advice-cell {
  min-width: 190px;
  text-align: left !important;
  color: #1b4b63;
}

.manager-cost-shell {
  max-height: 420px;
}

.manager-cost-table {
  min-width: 980px;
  font-size: 13px;
}

.manager-cost-table th {
  background: #e8f0f7;
  color: #244154;
  text-align: center;
}

.manager-cost-table td {
  text-align: center;
  vertical-align: middle;
}

.manager-cost-table td:first-child {
  text-align: left;
  font-weight: 700;
}

.manager-cost-table tbody tr:nth-child(even) td {
  background: #f4f9fc;
}

.insight-item {
  display: grid;
  gap: 10px;
  min-height: 102px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.insight-item span {
  color: var(--muted);
  font-size: 12px;
}

.insight-item strong {
  color: var(--text);
  line-height: 1.55;
}

.optimization-hero {
  background:
    radial-gradient(circle at 78% 20%, rgba(255, 216, 125, 0.22), transparent 28%),
    linear-gradient(135deg, #11283d, #0f766e 70%, #199283);
}

.optimization-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 190px;
  text-decoration: none;
  white-space: nowrap;
}

.optimization-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.optimization-kpis article {
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(145deg, #fff, #f7fafc);
  box-shadow: var(--shadow);
}

.optimization-kpis article.target {
  border-color: rgba(15, 118, 110, 0.45);
  background: linear-gradient(145deg, #e7f7f1, #fffaf0);
}

.optimization-kpis span,
.optimization-kpis small {
  display: block;
  color: var(--muted);
}

.optimization-kpis strong {
  display: block;
  margin: 10px 0 7px;
  color: var(--blue);
  font-size: 27px;
}

.optimization-kpis .target strong {
  color: var(--teal-dark);
}

.roi-lab {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.75fr);
  gap: 14px;
}

.roi-input-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.roi-input-grid label {
  display: grid;
  gap: 7px;
  margin: 0;
  color: var(--muted);
}

.roi-input-grid input {
  border-color: #e4c56b;
  background: #fff9df;
  font-weight: 700;
}

.roi-result-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(15, 118, 110, 0.4);
  border-radius: 10px;
  background: linear-gradient(145deg, #102a40, #0f766e);
  color: #fff;
  box-shadow: var(--shadow);
}

.roi-result-card > span,
.roi-result-card > strong,
.roi-result-card > p {
  grid-column: 1 / -1;
}

.roi-result-card > span,
.roi-result-card small {
  color: rgba(255, 255, 255, 0.72);
}

.roi-result-card > strong {
  font-size: 38px;
}

.roi-result-card div {
  display: grid;
  gap: 5px;
}

.roi-result-card b {
  font-size: 16px;
}

.roi-result-card p {
  margin-top: 4px;
  color: #ffd98b;
  line-height: 1.55;
}

.roi-result-card p.good {
  color: #b7f3d8;
}

.optimization-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.optimization-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.strategy-card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}

.strategy-card::after {
  content: "";
  position: absolute;
  right: -46px;
  bottom: -64px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(15, 118, 110, 0.07);
}

.strategy-card.featured {
  border-color: rgba(183, 121, 31, 0.4);
  background: linear-gradient(145deg, #fffaf0, #fff);
}

.strategy-card > span,
.section-index {
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.strategy-card h2,
.creative-playbook h2 {
  margin-top: 9px;
  font-size: 19px;
}

.strategy-card p,
.strategy-card li,
.creative-playbook li,
.official-rule-panel p {
  color: var(--muted);
  line-height: 1.7;
}

.strategy-card ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 18px;
  margin-bottom: 0;
  padding-left: 18px;
}

.rule-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.rule-chip-row b {
  border-radius: 999px;
  background: #edf7f3;
  color: var(--teal-dark);
  padding: 6px 10px;
  font-size: 12px;
}

.optimization-table {
  min-width: 980px;
}

.optimization-table th {
  background: #163e54;
  color: #fff;
}

.optimization-table td {
  vertical-align: middle;
}

.optimization-table tbody tr:nth-child(even) td {
  background: #f1f8fa;
}

.creative-playbook {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.creative-demo {
  display: grid;
  gap: 7px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #b9cce0;
  border-radius: 9px;
  background: #f4f9fd;
}

.creative-demo strong {
  color: #174b72;
  font-size: 18px;
}

.creative-demo p,
.creative-demo small {
  color: #4b6274;
  line-height: 1.55;
}

.official-rule-panel {
  background: linear-gradient(145deg, #f5fafc, #fff);
}

.official-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.official-links a {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  padding: 7px 11px;
  text-decoration: none;
}

.hint {
  margin-top: 12px;
  font-size: 13px;
}

dialog {
  width: min(900px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(36, 35, 31, 0.26);
  padding: 0;
}

dialog::backdrop {
  background: rgba(36, 35, 31, 0.36);
}

#leadForm,
#adminForm {
  padding: 18px;
}

.admin-code-line {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  color: var(--muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px 12px;
  margin-top: 14px;
}

.form-grid .wide {
  grid-column: span 4;
}

.dialog-actions {
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.empty {
  padding: 36px;
  color: var(--muted);
  text-align: center;
}

.manager-profile-summary {
  margin: 0 0 16px;
  overflow: hidden;
  border: 1px solid #cfe4df;
  border-radius: 16px;
  background: linear-gradient(135deg, #0d3d46 0%, #0d7169 64%, #159681 100%);
  color: #fff;
  box-shadow: 0 16px 38px rgba(10, 74, 71, 0.16);
}

.manager-profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 14px;
}

.manager-profile-head span,
.manager-profile-head p,
.manager-profile-head small { color: #c9eee7; }
.manager-profile-head h2 { margin: 4px 0; font-size: 24px; }
.manager-profile-head p { margin: 0; }
.manager-profile-head > strong { font-size: 30px; text-align: right; }
.manager-profile-head small { display: block; font-size: 12px; font-weight: 500; }

.manager-profile-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  border-top: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.07);
}

.manager-profile-grid > div { padding: 14px 18px 17px; border-right: 1px solid rgba(255,255,255,.12); }
.manager-profile-grid span { display: block; color: #c9eee7; font-size: 12px; }
.manager-profile-grid strong { display: block; margin-top: 5px; font-size: 17px; }

.manager-hero { background: linear-gradient(120deg, #13253f, #165b66 58%, #0e8b78); }
.manager-controls { grid-template-columns: 180px 180px minmax(320px, 1fr); }
.manager-ranking-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.manager-ranking-cards article { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 8px 24px rgba(24,54,83,.07); }
.manager-ranking-cards span, .manager-ranking-cards small { display: block; color: var(--muted); }
.manager-ranking-cards strong { display: block; margin: 8px 0 5px; font-size: 25px; color: #12354d; }
.manager-ranking-shell { border-radius: 14px; box-shadow: 0 10px 28px rgba(24,54,83,.08); }
.manager-ranking-table th { white-space: nowrap; }
.manager-ranking-table td { vertical-align: middle; }
.manager-ranking-table td:nth-child(n+4) { text-align: right; }
.rank-badge { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: #eaf0f5; color: #496072; font-weight: 800; }
.rank-1 { background: #fff0bb; color: #a26a00; }
.rank-2 { background: #e8eff5; color: #53697b; }
.rank-3 { background: #f4dfd1; color: #995a32; }
.manager-link { padding: 0; border: 0; background: none; color: #087368; font: inherit; font-weight: 800; cursor: pointer; }
.manager-ranking-table td:nth-child(2) small { display: block; margin-top: 4px; color: var(--muted); }
.account-mix { max-width: 260px; color: #496072; font-size: 12px; line-height: 1.6; }
.crm-audit-panel { margin-top: 16px; }
.crm-audit-grid { display: grid; grid-template-columns: repeat(8, minmax(110px, 1fr)); gap: 8px; }
.crm-audit-grid > div { padding: 13px; border: 1px solid #dfe9ef; border-radius: 10px; background: #f7fafc; }
.crm-audit-grid span { display: block; min-height: 32px; color: var(--muted); font-size: 12px; }
.crm-audit-grid strong { display: block; margin-top: 5px; font-size: 20px; color: #153c52; }

.lead-reconciliation-banner {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 8px 18px;
  margin: 0 0 14px;
  padding: 14px 18px;
  border: 1px solid #cfe1ec;
  border-radius: 14px;
  background: linear-gradient(115deg, #f7fbff, #eef8f6);
  box-shadow: 0 8px 22px rgba(38, 76, 102, .06);
}
.reconcile-title span { display: block; color: #527083; font-size: 12px; }
.reconcile-title strong { display: block; margin-top: 4px; color: #153f58; }
.reconcile-flow { display: flex; align-items: center; gap: 8px; min-width: 0; }
.reconcile-flow > div { min-width: 82px; padding: 7px 10px; border-radius: 9px; background: #fff; }
.reconcile-flow span { display: block; color: var(--muted); font-size: 10px; }
.reconcile-flow strong { display: block; margin-top: 2px; color: #17465c; font-size: 15px; white-space: nowrap; }
.reconcile-flow i { color: #79909e; font-style: normal; font-weight: 800; }
.reconcile-flow .reconcile-diff { min-width: 160px; background: #fff8e8; }
.lead-reconciliation-banner p { grid-column: 2; margin: 0; color: #617484; font-size: 11px; }

.lead-table {
  min-width: 1300px;
  table-layout: fixed;
  font-size: 12px;
}
.lead-table th { padding: 8px 5px; background: linear-gradient(#edf4fa, #e6eff7); color: #25445b; }
.lead-table td { padding: 6px 5px; background: rgba(255,255,255,.96); }
.lead-table tbody tr:nth-child(even) td { background: #fbfdfd; }
.lead-table tbody tr:hover td { background: #f1faf7; }
.lead-table th:nth-child(1) { width: 74px; }
.lead-table th:nth-child(2) { width: 52px; }
.lead-table th:nth-child(3) { width: 44px; }
.lead-table th:nth-child(4) { width: 64px; }
.lead-table th:nth-child(5) { width: 140px; }
.lead-table th:nth-child(6) { width: 96px; }
.lead-table th:nth-child(7) { width: 172px; }
.lead-table th:nth-child(8) { width: 112px; }
.lead-table th:nth-child(9) { width: 64px; }
.lead-table th:nth-child(10) { width: 48px; }
.lead-table th:nth-child(11) { width: 112px; }
.lead-table th:nth-child(12), .lead-table th:nth-child(13) { width: 72px; }
.lead-table th:nth-child(14) { width: 158px; }
.lead-table th:nth-child(14), .lead-table td:nth-child(14) { position: sticky; right: 0; z-index: 4; box-shadow: -7px 0 14px rgba(28,62,82,.08); }
.lead-table th:nth-child(14) { z-index: 7; }
.lead-table td input, .lead-table td select, .lead-table td textarea { width: 100%; min-width: 0; padding: 5px 4px; font-size: 12px; }
.lead-table .compact, .lead-table .money-input, .lead-table .note-input, .lead-table .case-input { width: 100%; min-width: 0; }
.lead-table .case-input { height: 62px; line-height: 1.45; }
.lead-table .note-input { height: 52px; }
.lead-table .ad-info, .lead-table .customer { width: auto; min-width: 0; gap: 2px; overflow-wrap: anywhere; }
.lead-table .ad-info span { font-size: 11px; }
.lead-table .ad-info strong { font-size: 11px; line-height: 1.35; }
.lead-table .account-badge { min-width: 0; width: 100%; padding: 4px 3px; }
.lead-table .component-badge { padding: 3px 6px; }
.lead-time { min-width: 0; white-space: normal; line-height: 1.2; }
.lead-time b, .lead-time small { display: block; }
.lead-time b { font-size: 11px; }
.lead-time small { margin-top: 3px; color: #60788a; font-size: 11px; }
.region-select { font-size: 11px !important; }
.feedback-cell { display: grid; gap: 3px; padding: 6px; border-radius: 9px; line-height: 1.25; }
.feedback-cell span { font-weight: 800; }
.feedback-cell small { color: #657787; font-size: 10px; }
.feedback-cell button { border: 0; border-radius: 7px; background: #0d766d; color: #fff; padding: 5px; font-size: 11px; cursor: pointer; }
.feedback-cell.ready { background: #eaf8f2; color: #08715f; }
.feedback-cell.queued { background: #eaf2ff; color: #285b9b; }
.feedback-cell.blocked { background: #fff0ef; color: #a53b35; }
.feedback-cell.expired { background: #f4f1f0; color: #746a66; }
.feedback-cell.pending { background: #f4f6f8; color: #657787; }
.feedback-export { display: inline-flex; align-items: center; text-decoration: none; }

.refresh-today-button {
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 10px;
  background: rgba(255,255,255,.14);
  color: #fff;
  padding: 9px 14px;
  font-weight: 800;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.refresh-today-button:hover { background: rgba(255,255,255,.23); }
.refresh-today-button:disabled { opacity: .65; cursor: wait; }
.actionbar .refresh-today-button { border-color: #b9ddd6; background: #eaf8f4; color: #087368; }

.date-preset-group { display:inline-flex; padding:3px; border:1px solid rgba(255,255,255,.38); border-radius:999px; background:rgba(255,255,255,.12); }
.date-preset-group button { min-width:52px; border:0; border-radius:999px; padding:7px 12px; background:transparent; color:#dceeee; font-weight:800; cursor:pointer; }
.date-preset-group button.active { background:#fff; color:#0b655e; box-shadow:0 4px 12px rgba(3,42,49,.16); }
.date-preset-group.light { border-color:#c7dce2; background:#f0f6f8; }
.date-preset-group.light button { color:#5d7482; }.date-preset-group.light button.active{background:#0c7067;color:#fff}
.icon-refresh-button { display:grid;place-items:center;width:38px;height:38px;border:1px solid rgba(255,255,255,.4);border-radius:50%;background:rgba(255,255,255,.13);color:#fff;font-size:18px;cursor:pointer; }
.icon-refresh-button.light { border-color:#bcd8d4;background:#eaf7f3;color:#087166; }.icon-refresh-button:disabled{opacity:.55;cursor:wait}

.today-data-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
  margin: 12px 0 16px;
}
.today-data-strip article {
  padding: 13px 15px;
  border: 1px solid #d9e6ed;
  border-radius: 13px;
  background: linear-gradient(145deg, #fff, #f5fafb);
  box-shadow: 0 7px 20px rgba(29,65,88,.06);
}
.today-data-strip span, .today-data-strip small { display: block; color: #6e8291; font-size: 11px; }
.today-data-strip strong { display: block; margin: 5px 0 3px; color: #123d53; font-size: 20px; }
.leads-today-strip { margin-top: 0; }

.crm-field-guide {
  margin: 0 0 14px;
  border: 1px solid #d5e3eb;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}
.crm-field-guide summary { display: flex; justify-content: space-between; gap: 18px; padding: 13px 17px; cursor: pointer; background: linear-gradient(90deg,#f4f9fc,#f0f9f5); color: #173f55; font-weight: 800; }
.crm-field-guide summary small { color: #718492; font-weight: 500; }
.crm-field-guide-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; padding: 12px; }
.field-guide-card { padding: 13px; border: 1px solid #e0e9ee; border-radius: 11px; background: #fbfdfe; }
.field-guide-card > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.field-guide-card h3 { margin: 0; color: #1d4357; font-size: 14px; }
.field-guide-card small { color: #81919c; font-size: 10px; }
.field-guide-card p { margin: 9px 0 0; color: #536b79; font-size: 11px; line-height: 1.55; }
.field-guide-card.keep { border-left: 4px solid #16a085; }
.field-guide-card.drop { border-left: 4px solid #d36b62; }
.field-guide-card.merge { border-left: 4px solid #e2a53c; }
.option-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.option-chips span { padding: 4px 7px; border-radius: 999px; background: #eef3f6; color: #405b6b; font-size: 10px; }
.option-chips.keep span { background: #e8f7f2; color: #08705f; }
.option-chips.drop span { background: #fff0ee; color: #98463f; text-decoration: line-through; }
.option-chips.merge span { background: #fff6df; color: #8a650f; }

.crm-readonly { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.crm-readonly strong { color: #1c4055; font-size: 11px; line-height: 1.3; }
.crm-readonly span { color: #536f80; font-size: 10px; line-height: 1.3; }
.crm-readonly small { color: #87959e; font-size: 9px; line-height: 1.25; }
.stage-readonly { padding-left: 6px; border-left: 3px solid #2a8a80; }
.region-readonly strong, .region-readonly span { display: block; }
.rating-readonly { justify-items: center; padding: 7px 3px; border-radius: 8px; background: #f0f4f7; }
.rating-readonly strong { font-size: 15px; }
.rating-a { background:#dff7e8; color:#08784e; }.rating-b{background:#e6f1ff}.rating-c{background:#fff5d8}.rating-d{background:#fff0ee}
.valid-readonly { padding: 6px; border-radius: 8px; text-align: center; }
.valid-readonly.yes { background: #e5f8ef; }.valid-readonly.yes strong{color:#087552}
.valid-readonly.no { background: #fff0ee; }.valid-readonly.no strong{color:#a23e37}
.valid-readonly.pending { background: #f2f4f6; }
.next-readonly { padding: 6px; border-radius: 8px; background: #eef6ff; }
.lost-readonly { padding: 6px; border-radius: 8px; background: #fff2ef; }
.lost-readonly.empty, .empty-readonly { background: #f5f7f8; color: #82909a; }

.money-editor {
  display: grid;
  grid-template-columns: 22px minmax(0,1fr);
  align-items: center;
  min-height: 38px;
  border: 1px solid #b8d7ce;
  border-radius: 9px;
  background: #f3fbf8;
  box-shadow: inset 0 1px 2px rgba(20,70,60,.04);
  overflow: hidden;
}
.money-editor > span { display: grid; place-items: center; align-self: stretch; background: #dff2eb; color: #087364; font-weight: 900; }
.lead-table .money-editor input { min-height: 36px; background: transparent; color: #123e38; font-weight: 800; }
.money-editor:focus-within { border-color: #0b8c7c; box-shadow: 0 0 0 3px rgba(11,140,124,.13); background:#fff; }

.feedback-cell[role="button"] { cursor: pointer; }
.feedback-ready-label { display:flex; justify-content:space-between; gap:5px; align-items:center; }
.feedback-ready-label b { padding:2px 5px; border-radius:999px; background:#0a7769; color:#fff; font-size:9px; }
.rocket-feedback-button {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  border: 1px solid #6df0d5 !important;
  border-radius: 999px !important;
  background: radial-gradient(circle at 20% 50%,#1b977f,#083f4c 70%) !important;
  box-shadow: 0 0 0 2px rgba(36,221,185,.12), 0 6px 15px rgba(5,73,83,.25);
  overflow: hidden;
}
.rocket-feedback-button::after { content:""; position:absolute; inset:0; background:linear-gradient(110deg,transparent 25%,rgba(255,255,255,.32) 45%,transparent 65%); transform:translateX(-120%); transition:.45s; }
.rocket-feedback-button:hover::after { transform:translateX(120%); }
.rocket-feedback-button i { font-style:normal; font-size:18px; transform:rotate(-18deg); }
.rocket-feedback-button em { color:#fff; font-style:normal; font-weight:900; letter-spacing:2px; }

.feedback-dialog { width:min(760px,calc(100vw - 28px)); border:1px solid #236e72; background:#f7fbfb; }
.feedback-dialog { max-height:min(88vh,780px); overflow:hidden; }
.feedback-dialog form { display:flex;flex-direction:column;max-height:inherit;padding:0; }
.feedback-dialog-hero { position:relative; display:grid; grid-template-columns:76px 1fr 36px; align-items:center; gap:15px; padding:20px 22px; background:radial-gradient(circle at 10% 20%,#157c72,#102942 65%); color:#fff; }
.feedback-dialog-hero h2 { margin:3px 0 5px; font-size:22px; }.feedback-dialog-hero p{margin:0;color:#cce5e5}.feedback-dialog-hero small{color:#6ff0d4;letter-spacing:2px}
.feedback-dialog-hero .icon-button { align-self:start; color:#fff; background:rgba(255,255,255,.12); }
.feedback-rocket-orbit { display:grid;place-items:center;width:66px;height:66px;border:1px solid #56dac6;border-radius:50%;box-shadow:0 0 25px rgba(62,231,201,.35); }
.feedback-rocket-orbit span { font-size:34px; transform:rotate(-20deg); }
.feedback-confidence { display:grid;grid-template-columns:auto 58px 1fr;align-items:center;gap:10px;padding:14px 20px;background:#e9f5f3;color:#315562; }
.feedback-confidence > strong { color:#087565;font-size:18px }.feedback-confidence > div{height:8px;border-radius:999px;background:#cfdfdf;overflow:hidden}.feedback-confidence i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#1ba28e,#66e3c6);transition:.35s}
.feedback-evidence { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:16px 20px;overflow:auto; }
.feedback-evidence article { display:grid;grid-template-columns:25px 24px 1fr;align-items:center;gap:7px;padding:10px;border:1px solid #dfe9e9;border-radius:10px;background:#fff; }
.feedback-evidence article > b{color:#9aabb0;font-size:10px}.feedback-evidence article > i{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;font-style:normal;font-weight:900}.feedback-evidence .pass>i{background:#dff6ed;color:#07805d}.feedback-evidence .fail>i{background:#fff0ec;color:#b64d41}
.feedback-evidence strong,.feedback-evidence span{display:block}.feedback-evidence strong{color:#24495a;font-size:12px}.feedback-evidence span{margin-top:2px;color:#71848e;font-size:10px}
.feedback-boundary { margin:0 20px;padding:11px 13px;border-left:4px solid #e4a72e;background:#fff7e5;color:#725a25;font-size:11px;line-height:1.55; }
.rocket-confirm-button { border:0;border-radius:999px;padding:11px 18px;background:linear-gradient(120deg,#0a7b6c,#123c55);color:#fff;font-weight:900;box-shadow:0 8px 20px rgba(9,87,83,.22);cursor:pointer }.rocket-confirm-button:disabled{opacity:.45;cursor:not-allowed;box-shadow:none}
.feedback-dialog .dialog-actions { margin:16px 20px 20px; }

.weekly-compare-panel {
  position: relative;
  margin: 16px 0;
  padding: 20px;
  overflow: hidden;
  border: 1px solid #d6e4ec;
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 0, rgba(39, 161, 143, .12), transparent 28%),
    linear-gradient(145deg, #fff 0%, #f7fbfd 58%, #f2f9f7 100%);
  box-shadow: 0 14px 34px rgba(24, 54, 83, .08);
}

.weekly-compare-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.weekly-compare-head > div:first-child > span {
  display: block;
  margin-bottom: 5px;
  color: #15917f;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.8px;
}

.weekly-compare-head h2 { color: #173c52; font-size: 21px; }
.weekly-compare-head p { margin-top: 6px; color: #718694; font-size: 12px; line-height: 1.55; }

.week-legend {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid #dce8ed;
  border-radius: 999px;
  background: rgba(255, 255, 255, .84);
  color: #617887;
  font-size: 11px;
  white-space: nowrap;
}

.week-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #15917f;
  box-shadow: 0 0 0 3px rgba(21, 145, 127, .12);
}

.week-legend i:nth-of-type(2) {
  margin-left: 4px;
  background: #a8b7c2;
  box-shadow: 0 0 0 3px rgba(128, 147, 160, .12);
}

.weekly-compare-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.weekly-compare-cards article,
.weekly-metric-card {
  position: relative;
  min-width: 0;
  padding: 14px 15px;
  overflow: hidden;
  border: 1px solid #dfe9ee;
  border-radius: 13px;
  background: rgba(255, 255, 255, .93);
  box-shadow: 0 7px 18px rgba(31, 69, 91, .055);
}

.weekly-compare-cards article::before,
.weekly-metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(#1b9b88, #3d70b5);
}

.weekly-compare-cards article > span,
.weekly-metric-card > span { display: block; color: #718491; font-size: 11px; }

.weekly-compare-cards article > strong,
.weekly-metric-card > strong {
  display: block;
  margin: 7px 0 8px;
  overflow: hidden;
  color: #173b51;
  font-size: clamp(19px, 1.55vw, 25px);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-compare-cards article > small,
.weekly-metric-card > small {
  display: block;
  margin-top: 7px;
  color: #8798a3;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.week-change,
.week-delta {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  border-radius: 999px;
  background: #eff3f5;
  color: #647987;
  font-size: 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.week-change { padding: 3px 7px; }
.week-change.up, .week-delta.up { background: #fff3e8; color: #ad5e16; }
.week-change.down, .week-delta.down { background: #fff0ee; color: #ae4c43; }
.week-change.good { background: #e5f6ef; color: #08745e; }

.weekly-account-shell {
  margin-top: 14px;
  border: 1px solid #dce7ed;
  border-radius: 13px;
  background: rgba(255, 255, 255, .9);
  scrollbar-gutter: stable;
}

.weekly-account-table {
  min-width: 880px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.weekly-account-table th {
  padding: 10px 9px;
  background: #eaf2f7;
  color: #315166;
  white-space: nowrap;
}

.weekly-account-table td {
  padding: 9px;
  vertical-align: middle;
  color: #405c6d;
  white-space: nowrap;
}

.weekly-account-table th:not(:first-child),
.weekly-account-table td:not(:first-child) { text-align: right; }
.weekly-account-table tbody tr:nth-child(even) td { background: #f9fbfc; }
.weekly-account-table tbody tr:hover td { background: #eef8f5; }
.weekly-account-table .week-delta { justify-content: center; min-width: 52px; padding: 3px 6px; }

@media (max-width: 900px) {
  .weekly-compare-panel { padding: 16px; }
  .weekly-compare-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .weekly-compare-head { align-items: stretch; flex-direction: column; gap: 10px; }
  .week-legend { align-self: flex-start; }
  .weekly-compare-cards { grid-template-columns: 1fr; }
  .weekly-compare-cards article > strong,
  .weekly-metric-card > strong { font-size: 22px; }
}

@media (max-width: 1180px) {
  .appbar { flex-wrap:wrap; }
  .brand { flex-basis:220px; }
  .top-tabs { order:3; width:100%; justify-content:center; overflow-x:auto; }
  .today-data-strip { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .crm-field-guide-grid { grid-template-columns: 1fr; }
  .lead-reconciliation-banner { grid-template-columns: 1fr; }
  .reconcile-flow { overflow-x: auto; }
  .lead-reconciliation-banner p { grid-column: 1; }
  .manager-profile-grid { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
  .manager-ranking-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crm-audit-grid { grid-template-columns: repeat(4, minmax(110px, 1fr)); }
  .summary {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
  }

  .top-tabs {
    order: 3;
    width: 100%;
  }

  .settings-grid,
  .insight-list,
  .sync-grid {
    grid-template-columns: 1fr;
  }

  .wide-tool-card {
    grid-column: auto;
  }

  .dashboard-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-kpis {
    grid-template-columns: repeat(5, minmax(96px, 1fr));
  }

  .crm-field-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .optimization-kpis,
  .optimization-grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .roi-lab,
  .creative-playbook {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .today-data-strip, .feedback-evidence { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .manager-profile-grid, .manager-ranking-cards, .crm-audit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manager-controls { grid-template-columns: 1fr; }
  .appbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .operator {
    width: 100%;
  }

  .top-tabs {
    overflow-x: auto;
  }

  .hero-strip,
  .settings-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .operator input {
    flex: 1;
  }

  .layout {
    padding: 10px;
  }

  .summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-controls,
  .dashboard-kpis {
    grid-template-columns: 1fr;
  }

  .optimization-kpis,
  .optimization-grid,
  .optimization-grid.three,
  .roi-input-grid {
    grid-template-columns: 1fr;
  }

  .manager-bar,
  .quick-search {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .quick-search input {
    min-width: 0;
  }

  .actionbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .wide {
    grid-column: span 1;
  }
}

/* 2026-07 ZEDA premium brand system */
:root {
  --zeda-ink: #171717;
  --zeda-charcoal: #252525;
  --zeda-bronze: #b7905d;
  --zeda-bronze-dark: #83613b;
  --zeda-paper: #f7f4ee;
}

.appbar {
  border-bottom-color: rgba(183, 144, 93, .35);
  background: rgba(255,255,255,.94);
  box-shadow: 0 10px 32px rgba(40,31,20,.06);
}

.brand { flex-basis: 266px; gap: 9px; }
.brand-logo { display:block; width:188px; height:auto; object-fit:contain; }
.brand-product { display:flex; flex-direction:column; gap:1px; padding-left:9px; border-left:1px solid rgba(183,144,93,.45); white-space:nowrap; }
.brand-product strong { color:#2b2926; font-size:11px; letter-spacing:.08em; }
.brand-product small { color:#a07a4d; font-size:8px; font-weight:800; letter-spacing:.16em; }

.top-tabs { border-color:rgba(183,144,93,.25); background:#f7f5f1; }
.tab-button.active { background:linear-gradient(135deg,#1e1d1b,#6f5435); box-shadow:0 7px 18px rgba(94,70,41,.24); }
.primary-button { border-color:#977044; background:linear-gradient(135deg,#22201d,#9b764b); box-shadow:0 7px 18px rgba(85,62,35,.16); }
.primary-button:hover { filter:brightness(1.06); transform:translateY(-1px); }

.viewer-chip { display:flex; align-items:center; gap:8px; min-width:132px; }
.viewer-chip > span { display:grid; place-items:center; width:34px; height:34px; border-radius:50%; background:linear-gradient(145deg,#23211e,#b9905d); color:#fff; font-weight:900; box-shadow:0 5px 12px rgba(68,48,28,.18); }
.viewer-chip > div { display:flex; flex-direction:column; min-width:0; }
.viewer-chip strong { overflow:hidden; color:#282622; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.viewer-chip small { color:#9a7850; font-size:9px; white-space:nowrap; }

.login-gate[hidden] { display:none; }
.login-gate { position:fixed; inset:0; z-index:1000; display:grid; grid-template-columns:minmax(420px,1.2fr) minmax(360px,.8fr); min-height:100vh; background:#f5f1e9; }
.login-brand-panel { position:relative; display:flex; flex-direction:column; justify-content:center; min-height:100vh; padding:clamp(50px,8vw,120px); overflow:hidden; background:radial-gradient(circle at 15% 20%,rgba(183,144,93,.3),transparent 34%),linear-gradient(145deg,#121212,#29251f 70%,#4c3825); color:#fff; }
.login-brand-panel::after { content:"泽者润及万物\A大者容德广厚"; position:absolute; right:-35px; bottom:25px; color:rgba(255,255,255,.035); font-family:serif; font-size:72px; line-height:1.18; white-space:pre; transform:rotate(-5deg); }
.login-brand-panel img { width:min(320px,62%); max-height:210px; object-fit:contain; object-position:left center; }
.login-brand-panel > span { margin-top:42px; color:#d8b684; font-size:12px; font-weight:800; letter-spacing:.34em; }
.login-brand-panel h1 { max-width:720px; margin-top:18px; font-family:"STSong","SimSun",serif; font-size:clamp(32px,4vw,58px); font-weight:500; line-height:1.25; }
.login-brand-panel p { max-width:650px; margin-top:22px; color:#d5cec3; font-size:15px; line-height:1.9; }
.login-trust-row { display:flex; flex-wrap:wrap; gap:10px; margin-top:36px; }
.login-trust-row b { padding:8px 12px; border:1px solid rgba(216,182,132,.32); border-radius:999px; color:#dfc59d; font-size:11px; }
.login-card { align-self:center; width:min(430px,calc(100% - 48px)); margin:auto; padding:38px; border:1px solid rgba(183,144,93,.27); border-radius:22px; background:rgba(255,255,255,.95); box-shadow:0 30px 80px rgba(45,34,22,.16); }
.login-eyebrow { color:#a47b49; font-size:10px; font-weight:900; letter-spacing:.24em; }
.login-card h2 { margin-top:12px; color:#211f1c; font-family:"STSong","SimSun",serif; font-size:30px; }
.login-card > p { margin:10px 0 28px; color:#786f63; line-height:1.8; }
.login-card label { display:grid; gap:8px; margin-top:16px; color:#443f38; font-size:12px; font-weight:700; }
.login-card input { height:46px; border-color:#d9cec0; background:#fbfaf8; }
.login-submit { width:100%; min-height:46px; margin-top:24px; }
.login-card > small { display:block; margin-top:15px; color:#8d8172; line-height:1.6; text-align:center; }
.login-card > small.error { color:#b42318; }
body.auth-locked { overflow:hidden; }

.optimization-hero { position:relative; overflow:hidden; background:radial-gradient(circle at 88% 20%,rgba(203,169,119,.32),transparent 28%),linear-gradient(132deg,#111,#2d2923 64%,#775a37); }
.optimization-hero::after { content:""; position:absolute; right:90px; bottom:-130px; width:260px; height:260px; border:1px solid rgba(226,198,155,.16); border-radius:50%; box-shadow:0 0 0 28px rgba(226,198,155,.035),0 0 0 58px rgba(226,198,155,.025); pointer-events:none; }
.optimization-hero > * { position:relative; z-index:1; }
.optimization-subnav { position:sticky; top:78px; z-index:18; display:flex; gap:5px; margin:14px 0; padding:6px; overflow-x:auto; border:1px solid rgba(183,144,93,.27); border-radius:15px; background:rgba(250,248,244,.92); box-shadow:0 9px 25px rgba(68,51,32,.08); backdrop-filter:blur(15px); }
.optimization-subnav button { flex:none; min-height:35px; padding:7px 14px; border:0; border-radius:10px; background:transparent; color:#746a5e; cursor:pointer; white-space:nowrap; }
.optimization-subnav button.active { background:#24211d; color:#efd8b5; box-shadow:0 6px 15px rgba(48,36,23,.2); }
.account-optimization-section,.baidu-rules-section,.crm-spec-section,.access-flow-section { scroll-margin-top:142px; margin-top:16px; padding:22px; border:1px solid rgba(183,144,93,.22); border-radius:18px; background:linear-gradient(145deg,rgba(255,255,255,.98),rgba(249,246,240,.92)); box-shadow:0 14px 38px rgba(64,48,30,.07); }
.section-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:18px; }
.section-heading span { color:#9c7446; font-size:10px; font-weight:900; letter-spacing:.19em; }
.section-heading h2 { margin-top:6px; color:#26231f; font-family:"STSong","SimSun",serif; font-size:25px; }
.section-heading p { margin-top:7px; color:#756d63; line-height:1.7; }
.plan-updated { flex:none; padding:8px 11px; border-radius:999px; background:#eee8de; color:#836642; font-size:10px; }
.optimization-account-tabs { display:flex; gap:8px; padding-bottom:14px; overflow-x:auto; }
.optimization-account-tabs button { flex:1 0 145px; display:flex; flex-direction:column; align-items:flex-start; gap:4px; padding:12px 14px; border:1px solid #dfd8ce; border-radius:12px; background:#fff; color:#332f2a; cursor:pointer; }
.optimization-account-tabs button span { font-size:14px; font-weight:900; }
.optimization-account-tabs button small { color:#8d8173; font-size:10px; }
.optimization-account-tabs button.active { border-color:#a57d4e; background:linear-gradient(145deg,#26231f,#72563a); color:#fff; box-shadow:0 9px 20px rgba(72,52,31,.2); }
.optimization-account-tabs button.active small { color:#e8d4b6; }
.account-plan-hero { display:grid; grid-template-columns:1fr 190px; gap:20px; align-items:stretch; padding:20px; border-radius:16px; background:linear-gradient(135deg,#1f2020,#234642); color:#fff; }
.account-plan-hero > div:first-child > span { color:#d9ba88; font-size:11px; font-weight:900; letter-spacing:.1em; }
.account-plan-hero h3 { margin:9px 0 10px; font-size:19px; line-height:1.55; }
.account-plan-hero p { color:#cbd7d2; line-height:1.75; }
.plan-score { display:flex; flex-direction:column; justify-content:center; align-items:center; border:1px solid rgba(218,187,139,.24); border-radius:13px; background:rgba(255,255,255,.07); text-align:center; }
.plan-score small { color:#ccb58f; }.plan-score strong { margin:8px 0; color:#fff; font-size:31px; }.plan-score em{color:#d6dedb;font-size:10px;font-style:normal}
.account-plan-metrics { display:grid; grid-template-columns:repeat(9,minmax(84px,1fr)); gap:8px; margin-top:12px; }
.account-plan-metrics article { padding:11px 10px; border:1px solid #e4ddd4; border-radius:11px; background:#fff; }
.account-plan-metrics span { display:block; color:#8e8376; font-size:9px; }.account-plan-metrics strong{display:block;margin-top:6px;color:#2b302e;font-size:15px;font-variant-numeric:tabular-nums}
.account-evidence-strip { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:10px; }
.account-evidence-strip > div { padding:12px 14px; border-left:3px solid #b9905d; border-radius:9px; background:#f4f0e9; }
.account-evidence-strip b { color:#5d4932;font-size:10px }.account-evidence-strip p{margin-top:5px;color:#6f6860;font-size:11px;line-height:1.55}
.account-action-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:12px; }
.account-action-card { min-height:190px; padding:17px; border:1px solid #e0d8cd; border-radius:13px; background:#fff; }
.account-action-card > span { color:#967044; font-size:10px; font-weight:900; letter-spacing:.12em; }
.account-action-card ol { margin:12px 0 0; padding-left:19px; }.account-action-card li{margin:8px 0;color:#4f514e;line-height:1.55}
.account-action-card.feedback { background:linear-gradient(145deg,#f4fbf8,#edf4ef); }.account-action-card.feedback p{margin-top:12px;color:#3e5b54;line-height:1.75}
.kpi-chip-row { display:flex;flex-wrap:wrap;gap:6px;margin-top:14px}.kpi-chip-row b{padding:5px 8px;border:1px solid #bad8ce;border-radius:999px;background:#fff;color:#24695b;font-size:10px}
.next-week-calendar { display:grid; grid-template-columns:auto 1fr auto 1fr auto 1fr auto 1fr auto 1fr; gap:7px; align-items:center; margin-top:12px; padding:11px; border-radius:11px; background:#272522; color:#ece5d9; font-size:10px; }
.next-week-calendar b { color:#d5b27f; }.next-week-calendar span{padding-right:7px;border-right:1px solid rgba(255,255,255,.11)}.next-week-calendar span:last-child{border:0}
.optimization-data-warning,.security-notice { margin-top:11px; padding:11px 13px; border-radius:9px; background:#fff5e5; color:#795e37; font-size:10px; line-height:1.65; }
.baidu-signal-pyramid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.baidu-signal-pyramid article { position:relative; padding:18px; overflow:hidden; border:1px solid #dfd5c7; border-radius:14px; background:#fff; }
.baidu-signal-pyramid article b { position:absolute; right:12px; top:6px; color:#eee5da; font-size:32px; }.baidu-signal-pyramid article span{display:block;color:#9a7142;font-size:10px;font-weight:900}.baidu-signal-pyramid article strong{display:block;margin:9px 0;color:#29251f;font-size:17px}.baidu-signal-pyramid article p{color:#746d64;line-height:1.65}
.public-rule-strip { display:flex; flex-wrap:wrap; gap:7px; margin-top:12px; }.public-rule-strip b{padding:7px 10px;border-radius:999px;background:#25231f;color:#e4c99e;font-size:10px}
.crm-spec-grid { display:grid; grid-template-columns:1.2fr 1fr 1fr; gap:10px; }
.crm-spec-card { padding:18px; border:1px solid #e2dbd1; border-radius:14px; background:#fff; }.crm-spec-card>span{color:#9c7446;font-size:10px;font-weight:900;letter-spacing:.1em}.crm-spec-card h3{margin:7px 0 13px;color:#2d2924;font-size:18px}.crm-spec-card ol{margin:0;padding-left:20px}.crm-spec-card li{margin:10px 0;color:#484842}.crm-spec-card li b,.crm-spec-card li em{display:block}.crm-spec-card li em{margin-top:3px;color:#847a6f;font-size:10px;font-style:normal;line-height:1.5}.crm-spec-card.required{border-top:3px solid #a77944}.crm-spec-card.sales{border-top:3px solid #267b70}.crm-spec-card.simplify{border-top:3px solid #3f6497}.keep-remove{display:grid;gap:10px}.keep-remove>div{padding:11px;border-radius:9px;background:#f6f4f0}.keep-remove b{color:#665039;font-size:11px}.keep-remove p{margin-top:5px;color:#756d62;font-size:11px;line-height:1.6}
.spec-note{margin:12px 0 0;padding:9px;border-radius:8px;background:#f2f8f5;color:#39665d;font-size:10px;line-height:1.55}
.access-role-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.access-role-grid article{padding:18px;border:1px solid #dfd8ce;border-radius:14px;background:#fff}.access-role-grid span{color:#9b754a;font-size:10px;font-weight:900}.access-role-grid strong{display:block;margin:8px 0;color:#24211e;font-size:20px}.access-role-grid p{color:#756d63;line-height:1.65}.access-flow{display:flex;align-items:center;justify-content:center;gap:10px;margin-top:12px;padding:14px;border-radius:12px;background:#242321;color:#e8d5b6}.access-flow b{font-size:11px}.access-flow i{color:#b78e5b;font-style:normal}

.lead-quality-legend { display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-top:7px; }
.lead-quality-legend span { position:relative;padding:3px 8px 3px 18px;border:1px solid;border-radius:999px;font-size:9px;font-weight:900; }
.lead-quality-legend span::before { content:"";position:absolute;left:7px;top:50%;width:6px;height:6px;border-radius:50%;transform:translateY(-50%);background:currentColor;box-shadow:0 0 0 3px rgba(255,255,255,.7); }
.lead-quality-legend .valid{border-color:#b9dfd3;background:#effaf6;color:#08715f}.lead-quality-legend .pending{border-color:#ead5a7;background:#fff9eb;color:#91671d}.lead-quality-legend .invalid{border-color:#efc2bb;background:#fff3f0;color:#a1443a}.lead-quality-legend small{color:#82918e;font-size:9px}

.lead-table { min-width:1510px; }
.lead-table th:nth-child(1) { width:78px; }
.lead-table th:nth-child(2) { width:54px; }
.lead-table th:nth-child(3) { width:48px; }
.lead-table th:nth-child(4) { width:72px; }
.lead-table th:nth-child(5) { width:145px; }
.lead-table th:nth-child(6) { width:104px; }
.lead-table th:nth-child(7) { width:180px; }
.lead-table th:nth-child(8) { width:82px; }
.lead-table th:nth-child(9) { width:82px; }
.lead-table th:nth-child(10),.lead-table th:nth-child(11) { width:68px; }
.lead-table th:nth-child(12) { width:124px; }
.lead-table th:nth-child(13) { width:310px; }
.lead-table th:nth-child(13),.lead-table td:nth-child(13) { position:sticky;right:0;z-index:4;box-shadow:-10px 0 22px rgba(28,62,82,.11); }
.lead-table th:nth-child(13) { z-index:7; }
.lead-table tbody tr:hover td:nth-child(13){background:#f4faf8}
.quality-milestone-readonly { width:100%;display:grid;gap:5px;min-height:64px;padding:8px;border:1px solid #d9e2df;border-radius:11px;background:#f7faf9;align-content:center;text-align:left;cursor:pointer;transition:transform .18s ease,box-shadow .18s ease; }
.quality-milestone-readonly:hover { transform:translateY(-1px);box-shadow:0 7px 16px rgba(28,80,70,.11); }
.quality-milestone-readonly:focus-visible,.model-closure button:focus-visible { outline:2px solid #1c9b88;outline-offset:2px; }
.quality-node-head { display:flex;align-items:center;gap:6px; }.quality-node-head>i{width:8px;height:8px;flex:none;border-radius:50%;background:#7c8f89;box-shadow:0 0 0 4px rgba(124,143,137,.13)}
.quality-milestone-readonly strong { color:#526760;font-size:11px;line-height:1.25; }
.quality-milestone-readonly small { display:-webkit-box;overflow:hidden;color:#8b9a94;font-size:8px;line-height:1.35;-webkit-box-orient:vertical;-webkit-line-clamp:2; }
.quality-node-progress{display:block;height:4px;overflow:hidden;border-radius:999px;background:#dfe8e5}.quality-node-progress>i{display:block;width:var(--node-progress);height:100%;border-radius:inherit;background:linear-gradient(90deg,#37b59d,#087161);transition:width .35s ease}
.quality-milestone-readonly.confirmed { border-color:#9fd0c2;background:linear-gradient(145deg,#edf9f4,#f8fcfa); }.quality-milestone-readonly.confirmed strong{color:#08715f}
.quality-milestone-readonly.confirmed .quality-node-head>i{background:#0a8b76;box-shadow:0 0 0 4px rgba(10,139,118,.13)}
.quality-milestone-readonly.invalid { border-color:#efb7ae;background:#fff2ef; }.quality-milestone-readonly.invalid strong{color:#a33f34}
.quality-milestone-readonly.invalid .quality-node-head>i{background:#b74a40;box-shadow:0 0 0 4px rgba(183,74,64,.13)}.quality-milestone-readonly.invalid .quality-node-progress>i{background:#c65a4e}
.quality-milestone-readonly.warning { border-color:#e8cf9f;background:#fff9ec; }.quality-milestone-readonly.warning strong{color:#8a641c}
.quality-milestone-readonly.warning .quality-node-head>i{background:#bd8322;box-shadow:0 0 0 4px rgba(189,131,34,.13)}.quality-milestone-readonly.warning .quality-node-progress>i{background:#c79435}
.crm-manager-readonly { display:grid; gap:3px; min-width:0; padding:6px 5px; border:1px solid #d8e7e2; border-radius:9px; background:#f4faf8; text-align:center; }
.crm-manager-readonly strong { color:#174f46; font-size:11px; line-height:1.25; overflow-wrap:anywhere; }
.crm-manager-readonly small { color:#71847e; font-size:8px; line-height:1.25; }
.crm-manager-readonly.returned { border-color:#efd29f; background:#fff9ea; }
.crm-manager-readonly.returned strong { color:#8a641c; }

.model-closure { display:grid;grid-template-columns:78px minmax(136px,1fr) 78px;min-height:76px;border:1px solid #d7e3e4;border-radius:13px;overflow:hidden;background:#fff;box-shadow:0 6px 18px rgba(18,61,68,.08); }
.model-closure button { min-width:0;border:0;border-right:1px solid #dce7e7;border-radius:0;background:#f8fbfb;color:#274957;padding:7px 6px;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;line-height:1.15; }
.model-closure button:last-child { border-right:0; }
.model-closure button:hover { filter:brightness(.98);box-shadow:inset 0 0 0 2px rgba(18,143,127,.16); }
.model-closure button span { color:#6d828a;font-size:8px;font-weight:800;letter-spacing:.04em; }
.model-closure button strong { display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;color:#1f4855;font-size:11px;white-space:nowrap; }
.model-closure button small { display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;color:#87969b;font-size:7px;white-space:nowrap; }
.model-closure-crm.has-conflict { background:#fff0ed!important; }.model-closure-crm.has-conflict strong{color:#a33f34}.model-closure-crm.has-gap{background:#fff8e8!important}.model-closure-crm.has-gap strong{color:#966514}.model-closure-crm.complete{background:#edf9f4!important}.model-closure-crm.complete strong{color:#08715f}
.model-closure-core { position:relative;background:linear-gradient(145deg,#17364a,#0b746b)!important;color:#fff!important;box-shadow:inset 0 0 20px rgba(91,236,208,.08); }
.model-closure-core span,.model-closure-core strong,.model-closure-core small { color:#fff!important; }.model-closure-core span{opacity:.78}.model-closure-core small{display:-webkit-box;max-width:112px;opacity:.68;line-height:1.25;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2}.model-closure-core i{position:absolute;right:7px;top:5px;display:grid;place-items:center;width:16px;height:16px;border-radius:50%;background:rgba(255,255,255,.14);font-style:normal;font-size:10px}
.model-closure.ready .model-closure-core { background:radial-gradient(circle at 20% 35%,#17967f,#0a3e4b 74%)!important;box-shadow:inset 0 0 0 1px #5ce0c8,0 0 16px rgba(40,205,175,.22); }
.model-closure.blocked .model-closure-core { background:linear-gradient(145deg,#74413e,#442d32)!important; }
.model-closure.queued .model-closure-core { background:linear-gradient(145deg,#305f93,#263c63)!important; }
.model-closure.queued-stale { border-color:#df9b91;box-shadow:0 6px 20px rgba(160,62,53,.14)}.model-closure.queued-stale .model-closure-core{background:linear-gradient(145deg,#9b4b40,#55343a)!important}.model-closure.queued-stale .model-closure-rules{background:#fff0ed!important}.model-closure.queued-stale .model-closure-rules strong{color:#a33f34}
.model-closure-rules.has-block { background:#fff2ef!important; }.model-closure-rules.has-block strong{color:#aa4037}.model-closure-rules.complete{background:#eef9f5!important}.model-closure-rules.complete strong{color:#08715f}

.feedback-dialog { width:min(1120px,calc(100vw - 32px)); max-height:min(92vh,860px); }
.feedback-dialog-hero { grid-template-columns:76px 1fr 40px; background:radial-gradient(circle at 8% 12%,#1d8c7d,#18334a 54%,#28231d); }
.feedback-pane-tabs { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:8px 20px 0;background:#edf6f5;border-bottom:1px solid #d6e5e3; }
.feedback-pane-tabs button { position:relative;border:0;background:transparent;padding:11px 10px;color:#6c8085;font-weight:800;cursor:pointer; }
.feedback-pane-tabs button::after { content:"";position:absolute;left:18%;right:18%;bottom:-1px;height:3px;border-radius:3px 3px 0 0;background:transparent; }
.feedback-pane-tabs button.active { color:#087468; }.feedback-pane-tabs button.active::after{background:linear-gradient(90deg,#0b8b7b,#c59b61)}
.feedback-confidence > span { font-size:11px; font-weight:800; letter-spacing:.04em; }
.feedback-evidence { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; padding:16px 20px; }
.feedback-evidence article { display:grid; grid-template-columns:42px 1fr; align-items:start; gap:10px; padding:14px; border-radius:12px; }
.feedback-rule-index { display:flex; flex-direction:column; align-items:center; gap:7px; }
.feedback-rule-index b { color:#9aabb0;font-size:10px }.feedback-rule-index i{display:grid;place-items:center;width:25px;height:25px;border-radius:50%;font-style:normal;font-weight:900}
.feedback-evidence .pass .feedback-rule-index i{background:#dff6ed;color:#07805d}.feedback-evidence .fail .feedback-rule-index i{background:#fff0ec;color:#b64d41}.feedback-evidence .warn .feedback-rule-index i{background:#fff5dc;color:#a46a16}
.feedback-rule-content strong { color:#213f51;font-size:13px }.feedback-rule-content p{display:grid;grid-template-columns:58px 1fr;gap:6px;margin:7px 0 0;padding-top:6px;border-top:1px solid #edf1f1}.feedback-rule-content em{display:block;color:#9b7548;font-size:9px;font-style:normal;font-weight:900}.feedback-rule-content span{display:block;margin:0;color:#667b86;font-size:10px;line-height:1.5}
.rule-title-line { display:flex;align-items:flex-start;justify-content:space-between;gap:8px; }.rule-title-line small{flex:none;padding:3px 6px;border-radius:999px;background:#f1f4f4;color:#74858b;font-size:8px}.feedback-evidence .fail .rule-title-line small{background:#fff0ed;color:#a74a40}
.official-source-strip { grid-column:1/-1;display:flex;align-items:center;flex-wrap:wrap;gap:7px;padding:12px 14px;border:1px solid #dfd3c1;border-radius:11px;background:#fffaf1;color:#6d5d47;font-size:9px }.official-source-strip strong{color:#594633}.official-source-strip a{padding:5px 8px;border-radius:999px;background:#efe5d6;color:#76542d;text-decoration:none;font-weight:800}.official-source-strip a:hover{background:#dfcbaa}.official-source-strip span{margin-left:auto;color:#8b7657}

.feedback-evidence.pane-crm,.feedback-evidence.pane-overview { display:block;padding:14px 20px; }
.feedback-crm-pane,.feedback-overview-pane { display:grid;gap:12px; }
.crm-gap-board { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px; }
.crm-gap-board article { position:relative;display:block;padding:14px 16px;border:1px solid #e4d9d5;border-radius:12px;background:#fff; }.crm-gap-board article>span{color:#8a6d64;font-size:9px;font-weight:900;letter-spacing:.08em}.crm-gap-board article>strong{position:absolute;right:15px;top:12px;color:#a5453c;font-size:22px}.crm-gap-board ul{margin:9px 0 0;padding-left:18px;color:#6f5752;font-size:10px;line-height:1.65}.crm-gap-board .missing{border-color:#ead9b6;background:#fffbf1}.crm-gap-board .missing>strong{color:#a46c15}.crm-gap-board li.ok{color:#08715f}
.crm-full-case { display:block!important;padding:0!important;overflow:hidden;border:1px solid #d7e3e4!important;border-radius:12px!important;background:#fff!important; }.crm-full-case>div{display:flex;align-items:center;justify-content:space-between;padding:10px 13px;background:linear-gradient(90deg,#eaf5f3,#f6f3ed)}.crm-full-case>div span{color:#244a56;font-size:11px;font-weight:900}.crm-full-case>div small{color:#7b8e92;font-size:8px}.crm-full-case pre{max-height:210px;margin:0;padding:14px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;color:#2e4d59;font:11px/1.75 system-ui,-apple-system,"Microsoft YaHei",sans-serif}
.crm-audit-fields { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px; }.crm-audit-field{display:block!important;padding:10px!important}.crm-audit-field>div{display:flex;justify-content:space-between;gap:6px}.crm-audit-field>div strong{font-size:10px}.crm-audit-field>div span{font-size:8px}.crm-audit-field p{margin:7px 0 4px;color:#345664;font-size:9px;line-height:1.45}.crm-audit-field small{color:#87969b;font-size:8px}.crm-audit-field.fail{border-color:#efb7ae!important;background:#fff5f2!important}.crm-audit-field.pass{border-color:#c2e2d8!important;background:#f5fbf8!important}.crm-audit-field.optional{background:#fafbfb!important}
.crm-activity-timeline { padding:12px;border:1px solid #d9e4e5;border-radius:12px;background:#f8fbfb; }.section-mini-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:9px}.section-mini-title strong{color:#254955;font-size:11px}.section-mini-title span{padding:3px 7px;border-radius:999px;background:#dfeeea;color:#087065;font-size:8px}.crm-activity-timeline>article{position:relative;display:grid!important;grid-template-columns:120px 145px 1fr 80px!important;gap:8px!important;margin-top:6px;padding:9px 10px!important}.crm-activity-timeline time,.crm-activity-timeline small{color:#7f9096;font-size:8px}.crm-activity-timeline strong{font-size:9px}.crm-activity-timeline p{margin:0;color:#49636d;font-size:9px;line-height:1.45}.crm-activity-empty{padding:13px;border:1px dashed #d8c495;border-radius:9px;background:#fffaf0}.crm-activity-empty strong{color:#865f17;font-size:10px}.crm-activity-empty p{margin:5px 0 0;color:#806f4f;font-size:9px;line-height:1.55}

.decision-console { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow:hidden;border:1px solid #d7e3e3;border-radius:14px;background:#fff; }.decision-console>div{padding:15px;border-right:1px solid #e1e9e9}.decision-console>div:last-child{border:0}.decision-console span,.decision-console strong{display:block}.decision-console span{color:#788b91;font-size:9px}.decision-console strong{margin-top:7px;color:#244958;font-size:13px}.decision-console.ready{border-color:#7acbb8;box-shadow:0 10px 26px rgba(23,142,120,.12)}.decision-console.ready>div:last-child{background:#e7f8f1}.decision-console.blocked>div:last-child{background:#fff1ef}.decision-console.blocked>div:last-child strong{color:#a23f38}
.closure-flow { position:relative;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:4px 0; }.closure-flow::before{content:"";position:absolute;left:10%;right:10%;top:25px;height:1px;background:#d6e3e1}.closure-flow article{position:relative;z-index:1;display:flex!important;align-items:center!important;gap:9px!important;padding:10px 11px!important;border:1px solid #dce6e5!important;border-radius:11px!important;background:#fff!important}.closure-flow article>i{display:grid;place-items:center;width:24px;height:24px;flex:none;border-radius:50%;background:#eef2f2;color:#82918f;font-style:normal;font-weight:900}.closure-flow article div{min-width:0}.closure-flow article strong,.closure-flow article span{display:block}.closure-flow article strong{color:#37545d;font-size:9px}.closure-flow article span{margin-top:2px;overflow:hidden;color:#7d8e92;font-size:8px;text-overflow:ellipsis;white-space:nowrap}.closure-flow article.pass{border-color:#b7ddd3!important;background:#f4fbf8!important}.closure-flow article.pass>i{background:#d9f3ea;color:#08715f}.closure-flow article.fail{border-color:#edc5be!important;background:#fff7f5!important}.closure-flow article.fail>i{background:#f9dfda;color:#a33f34}.closure-flow article.active{border-color:#8ccfc0!important;background:#ecfaf5!important;box-shadow:0 6px 18px rgba(20,139,116,.12)}.closure-flow article.active>i{background:#138c78;color:#fff}
.decision-next-action { display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;padding:13px 15px;border:1px solid #e4d3b7;border-radius:12px;background:linear-gradient(90deg,#fff8eb,#fffdf8); }.decision-next-action>span{padding:5px 8px;border-radius:999px;background:#9a7140;color:#fff;font-size:9px;font-weight:900}.decision-next-action>strong{color:#5e4d39;font-size:12px}.decision-next-action>small{color:#8c7e6b;font-size:8px}.decision-next-action.ready{border-color:#acd9ce;background:linear-gradient(90deg,#effbf6,#f8fcfa)}.decision-next-action.ready>span{background:#0d806e}.decision-next-action.ready>strong{color:#17695b}.decision-next-action.urgent{border-color:#e4aaa1;background:linear-gradient(90deg,#fff0ed,#fff8f6)}.decision-next-action.urgent>span{background:#a7443b}.decision-next-action.urgent>strong{color:#8e3a33}
.decision-node-evidence,.decision-facts,.decision-blockers,.decision-explanation { padding:14px;border:1px solid #dce6e7;border-radius:12px;background:#fff; }.decision-node-evidence{display:grid;gap:8px;border-color:#b9ddd5;background:linear-gradient(135deg,#f4fcf9,#fffaf1)}.decision-node-evidence>div{display:flex;align-items:center;justify-content:space-between;gap:12px}.decision-node-evidence span{color:#6f8489;font-size:9px;letter-spacing:.6px}.decision-node-evidence strong{color:#0b7567;font-size:12px}.decision-node-evidence p{margin:0;color:#294e58;font-size:11px;line-height:1.65}.decision-node-evidence ul{display:grid;gap:4px;margin:0;padding-left:18px;color:#476670;font-size:10px;line-height:1.55}.decision-node-evidence small{padding-top:7px;border-top:1px dashed #d4e4df;color:#8b713c;font-size:9px;line-height:1.5}.decision-facts h3,.decision-blockers h3{margin:0 0 9px;color:#254956;font-size:12px}.decision-facts div{display:flex;flex-wrap:wrap;gap:6px}.decision-facts span{padding:5px 8px;border-radius:999px;background:#e7f7f1;color:#08715f;font-size:9px}.decision-facts span.empty{background:#f1f3f4;color:#7a898e}.decision-blockers ol{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:0;padding:0;list-style:none}.decision-blockers li{display:grid;gap:3px;padding:9px;border-radius:9px;background:#fff2ef}.decision-blockers li b{color:#9c4138;font-size:10px}.decision-blockers li span{color:#745d59;font-size:9px}.decision-blockers li.ok{background:#eaf8f2}.decision-blockers li.ok b{color:#08715f}.decision-explanation{margin:0!important;color:#516a74!important;font-size:10px!important;line-height:1.7}.decision-explanation b{color:#9b7141}

#view-leads>.actionbar { border-color:#c8ded9;background:linear-gradient(115deg,rgba(247,252,250,.98),rgba(250,247,241,.98));box-shadow:0 10px 28px rgba(35,75,69,.08); }
.valid-readonly { display:grid;align-content:center;gap:3px;min-height:64px;border:1px solid transparent;border-radius:10px; }
.valid-readonly strong{font-size:12px}.valid-readonly small{display:-webkit-box;overflow:hidden;font-size:8px;line-height:1.35;-webkit-box-orient:vertical;-webkit-line-clamp:2}.valid-readonly.yes{border-color:#b7ddd1;background:linear-gradient(145deg,#e8f9f2,#f6fcf9)}.valid-readonly.no{border-color:#efc2bb;background:linear-gradient(145deg,#fff0ed,#fff8f6)}.valid-readonly.pending{border-color:#e8d4aa;background:linear-gradient(145deg,#fff8e9,#fffdf5)}.valid-readonly.pending strong{color:#8b641b}
.feedback-withdraw { order:-1;margin-right:auto;border:1px solid #d4948b;border-radius:999px;padding:10px 16px;background:#fff2ef;color:#9b3f37;font-weight:900;cursor:pointer }.feedback-withdraw:hover{background:#ffe7e2}.feedback-withdraw[hidden],body.admin-mode .feedback-withdraw[hidden]{display:none!important}

@media (max-width:1180px) {
  .brand { flex-basis:245px; }.brand-logo{width:168px}.operator{flex-basis:auto}.optimization-subnav{top:132px}
  .account-plan-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.next-week-calendar{grid-template-columns:auto 1fr auto 1fr auto 1fr}.next-week-calendar span{border:0}
  .crm-spec-grid{grid-template-columns:1fr}.access-flow{justify-content:flex-start;overflow-x:auto}
}
@media (max-width:780px) {
  .login-gate{grid-template-columns:1fr}.login-brand-panel{display:none}.login-card{width:min(430px,calc(100% - 24px));padding:28px}.viewer-chip{order:-1}.save-state{display:none}
  .notification-panel{top:70px;right:8px;width:calc(100vw - 16px);max-height:calc(100vh - 78px)}.notification-actions{grid-template-columns:1fr 1fr}.notification-actions #notificationReadAll{grid-column:1 / -1}.notification-list{max-height:calc(100vh - 285px)}.notification-toasts{right:12px;bottom:12px}
  .account-optimization-section,.baidu-rules-section,.crm-spec-section,.access-flow-section{padding:15px}.account-plan-hero{grid-template-columns:1fr}.plan-score{padding:14px}.account-action-grid,.account-evidence-strip,.baidu-signal-pyramid,.access-role-grid{grid-template-columns:1fr}.section-heading{align-items:flex-start;flex-direction:column}.feedback-evidence{grid-template-columns:1fr}.feedback-dialog{width:calc(100vw - 12px)}.closure-flow,.decision-console{grid-template-columns:repeat(2,minmax(0,1fr))}.closure-flow::before{display:none}.decision-next-action{grid-template-columns:1fr}.crm-gap-board,.decision-blockers ol{grid-template-columns:1fr}.crm-audit-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.feedback-dialog-hero{grid-template-columns:54px 1fr 36px;padding:15px}.feedback-rocket-orbit{width:48px;height:48px}.feedback-rocket-orbit span{font-size:24px}
}
