:root {
  --ink: #17201c;
  --muted: #6d776f;
  --line: #e5e7e1;
  --paper: #f6f5f0;
  --white: #ffffff;
  --forest: #153f31;
  --forest-2: #245943;
  --forest-soft: #e9f1ec;
  --gold: #ba8738;
  --gold-soft: #f7eedc;
  --red: #b9473e;
  --red-soft: #faecea;
  --blue: #3c6f91;
  --blue-soft: #e9f1f7;
  --shadow: 0 18px 50px rgba(28, 38, 32, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: var(--paper); color: var(--ink); }

body {
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, a, select, input { -webkit-tap-highlight-color: transparent; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  color: #f4f5ef;
  padding: 28px 18px 22px;
  background:
    radial-gradient(circle at 12% 5%, rgba(201, 160, 88, .16), transparent 24%),
    linear-gradient(155deg, #173d31 0%, #10271f 70%);
  overflow: hidden;
  z-index: 60;
}

.sidebar::after {
  content: "";
  position: absolute;
  width: 250px;
  height: 250px;
  left: -120px;
  bottom: -100px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 50%;
  box-shadow: 0 0 0 45px rgba(255,255,255,.025), 0 0 0 90px rgba(255,255,255,.018);
}

.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 30px; position: relative; z-index: 1; }
.brand-mark {
  width: 43px; height: 43px; display: grid; place-items: center;
  border-radius: 13px; color: #18372c; background: linear-gradient(145deg, #ead4a1, #bd8b3d);
  font: 700 22px/1 "STKaiti", serif; box-shadow: 0 8px 20px rgba(0,0,0,.15);
}
.brand strong { display: block; font-size: 17px; letter-spacing: .06em; }
.brand span { display: block; margin-top: 2px; color: rgba(255,255,255,.55); font-size: 11px; }

.nav { display: grid; gap: 7px; position: relative; z-index: 1; }
.nav-item {
  border: 0; color: rgba(255,255,255,.65); background: transparent; border-radius: 12px;
  min-height: 46px; padding: 0 14px; display: flex; align-items: center; gap: 12px; text-align: left;
  transition: .18s ease;
}
.nav-item:hover { color: white; background: rgba(255,255,255,.06); }
.nav-item.active { color: white; background: rgba(255,255,255,.11); box-shadow: inset 3px 0 0 var(--gold); }
.nav-icon { width: 20px; color: #d5bc87; font-size: 18px; text-align: center; }
.nav-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; border-radius: 11px; color: white; background: var(--red); font-size: 11px; font-style: normal; }
.sidebar-foot { margin-top: auto; padding: 18px 9px 0; position: relative; z-index: 1; color: rgba(255,255,255,.45); font-size: 11px; }
.secure-note { display: flex; gap: 8px; align-items: center; color: rgba(255,255,255,.7); }
.secure-note i, .system-live i { width: 7px; height: 7px; border-radius: 50%; background: #66d094; box-shadow: 0 0 0 4px rgba(102,208,148,.12); }
.sidebar-foot p { margin: 8px 0 0 15px; }

.main-area { min-width: 0; }
.topbar {
  height: 88px; position: sticky; top: 0; z-index: 15; padding: 0 34px;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  background: rgba(246,245,240,.88); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(212,215,207,.7);
}
.topbar h1 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.eyebrow { margin: 0 0 2px; color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.system-live { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.role-switch { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.role-switch select {
  min-width: 150px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 30px 8px 10px;
  color: var(--ink); background: var(--white);
}
.user-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--forest); font-weight: 700; }

.content { padding: 26px 34px 54px; max-width: 1560px; margin: 0 auto; }
.mobile-brand { width: 36px; height: 36px; border-radius: 11px; color: #18372c; background: linear-gradient(145deg, #ead4a1, #bd8b3d); font: 700 19px/1 "STKaiti", serif; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin-bottom: 22px; }
.page-head h2 { margin: 0 0 4px; font-size: 22px; }
.page-head p { margin: 0; color: var(--muted); }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.hero {
  min-height: 158px; padding: 26px 30px; margin-bottom: 20px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  color: white; border-radius: 22px;
  background:
    radial-gradient(circle at 90% 20%, rgba(226, 192, 123, .25), transparent 25%),
    linear-gradient(125deg, #183e31, #265a45);
  box-shadow: var(--shadow);
}
.hero::after { content: "客资·执行·转化"; position: absolute; right: 30px; bottom: -8px; color: rgba(255,255,255,.06); font-size: 56px; font-weight: 800; letter-spacing: .12em; white-space: nowrap; }
.hero-copy { position: relative; z-index: 1; }
.hero-kicker { color: #e2c583; font-size: 12px; letter-spacing: .16em; }
.hero h2 { margin: 7px 0 6px; font-size: 28px; }
.hero p { margin: 0; max-width: 690px; color: rgba(255,255,255,.67); }
.hero-score { min-width: 190px; position: relative; z-index: 1; text-align: right; }
.hero-score strong { display: block; font: 700 42px/1.1 Georgia, serif; color: #f0d395; }
.hero-score span { color: rgba(255,255,255,.64); font-size: 12px; }

.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 13px; margin-bottom: 20px; }
.metric-card { padding: 18px; min-height: 116px; border: 1px solid rgba(225,226,220,.8); border-radius: var(--radius); background: var(--white); box-shadow: 0 8px 26px rgba(26,35,30,.035); }
.metric-top { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.metric-dot { width: 9px; height: 9px; margin-top: 3px; border-radius: 3px; background: var(--forest-2); box-shadow: 0 0 0 5px var(--forest-soft); }
.metric-dot.gold { background: var(--gold); box-shadow: 0 0 0 5px var(--gold-soft); }
.metric-dot.red { background: var(--red); box-shadow: 0 0 0 5px var(--red-soft); }
.metric-card strong { display: block; margin-top: 12px; font: 700 27px/1.1 Georgia, "Microsoft YaHei", sans-serif; }
.metric-card small { display: block; margin-top: 6px; color: #929a94; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(310px, .6fr); gap: 20px; }
.dashboard-grid > * { min-width: 0; }
.panel { border: 1px solid rgba(225,226,220,.9); border-radius: var(--radius); background: var(--white); box-shadow: 0 8px 28px rgba(26,35,30,.035); overflow: hidden; }
.panel + .panel { margin-top: 20px; }
.panel-head { min-height: 64px; padding: 17px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0; font-size: 16px; }
.panel-head p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.panel-body { padding: 20px; }

.funnel { display: grid; grid-template-columns: repeat(5, 1fr); gap: 11px; align-items: end; min-height: 210px; }
.funnel-step { text-align: center; }
.funnel-bar-wrap { height: 138px; display: flex; align-items: end; justify-content: center; }
.funnel-bar { width: 72%; min-height: 12px; border-radius: 11px 11px 4px 4px; background: linear-gradient(180deg, #2b664e, #173c30); position: relative; box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }
.funnel-step:nth-child(2) .funnel-bar { background: linear-gradient(180deg, #468062, #24513f); }
.funnel-step:nth-child(3) .funnel-bar { background: linear-gradient(180deg, #b9893f, #8f6428); }
.funnel-step:nth-child(4) .funnel-bar { background: linear-gradient(180deg, #d0a65c, #a47532); }
.funnel-step:nth-child(5) .funnel-bar { background: linear-gradient(180deg, #bb694e, #8f3d34); }
.funnel-bar span { position: absolute; top: -26px; left: 50%; transform: translateX(-50%); font-weight: 700; }
.funnel-step label { display: block; margin-top: 9px; color: var(--muted); font-size: 12px; }

.event-list { display: grid; gap: 0; }
.event-item { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 12px; position: relative; padding-bottom: 17px; }
.event-item:not(:last-child)::before { content: ""; position: absolute; left: 5px; top: 12px; bottom: 0; width: 1px; background: var(--line); }
.event-dot { width: 11px; height: 11px; margin-top: 4px; border-radius: 50%; background: var(--gold); border: 3px solid var(--gold-soft); box-sizing: content-box; transform: translateX(-3px); z-index: 1; }
.event-copy strong { display: block; font-size: 13px; }
.event-copy p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 11px 14px; color: var(--muted); background: #fafaf7; text-align: left; font-size: 11px; font-weight: 600; white-space: nowrap; }
td { padding: 14px; border-top: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: #fafbf8; }
.customer-cell { display: flex; align-items: center; gap: 10px; }
.customer-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--forest-soft); color: var(--forest); font-weight: 700; }
.customer-cell strong, .stack strong { display: block; }
.customer-cell span, .stack span { display: block; color: var(--muted); font-size: 11px; }
.money { font-family: Georgia, serif; font-weight: 700; }

.status { display: inline-flex; align-items: center; gap: 6px; min-height: 25px; padding: 3px 9px; border-radius: 12px; color: var(--forest); background: var(--forest-soft); font-size: 11px; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status.warning { color: #93641c; background: var(--gold-soft); }
.status.danger { color: var(--red); background: var(--red-soft); }
.status.info { color: var(--blue); background: var(--blue-soft); }
.status.neutral { color: #6d746f; background: #eef0ed; }

.btn { min-height: 38px; border: 1px solid transparent; border-radius: 10px; padding: 8px 14px; color: white; background: var(--forest); font-weight: 600; transition: .16s ease; }
.btn:hover { transform: translateY(-1px); background: var(--forest-2); }
.btn.secondary { color: var(--ink); background: white; border-color: var(--line); }
.btn.secondary:hover { color: var(--forest); border-color: #bdc9c2; }
.btn.gold { color: #342713; background: #dfbd7a; }
.btn.danger { background: var(--red); }
.btn.sm { min-height: 31px; padding: 5px 10px; border-radius: 8px; font-size: 12px; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.text-button { border: 0; padding: 0; color: var(--forest-2); background: transparent; font-weight: 600; }
.action-row { display: flex; align-items: center; gap: 7px; }

.toolbar { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-bottom: 14px; }
.filters { display: flex; align-items: center; gap: 8px; flex: 1; }
.search { position: relative; min-width: 260px; max-width: 380px; flex: 1; }
.search input { width: 100%; padding: 10px 12px 10px 36px; border: 1px solid var(--line); border-radius: 10px; background: white; outline: none; }
.search::before { content: "⌕"; position: absolute; left: 13px; top: 7px; color: var(--muted); font-size: 18px; }
.filters select { padding: 10px 32px 10px 11px; border: 1px solid var(--line); border-radius: 10px; background: white; }

.empty-state { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty-symbol { width: 60px; height: 60px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 18px; background: var(--forest-soft); color: var(--forest); font-size: 28px; }

.backdrop { position: fixed; inset: 0; z-index: 49; background: rgba(10,18,14,.38); backdrop-filter: blur(3px); }
.drawer { position: fixed; z-index: 50; top: 0; right: 0; width: min(580px, 100%); height: 100vh; background: white; box-shadow: -20px 0 60px rgba(12,20,16,.18); overflow-y: auto; animation: slide-in .2s ease; }
@keyframes slide-in { from { transform: translateX(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-head { position: sticky; top: 0; z-index: 2; padding: 22px 24px; display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; background: rgba(255,255,255,.95); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 20px; }
.drawer-head p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.drawer-body { padding: 22px 24px 40px; }
.lead-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; margin-bottom: 20px; }
.summary-item { min-height: 67px; padding: 12px 14px; border-radius: 12px; background: #f7f8f5; }
.summary-item label { display: block; color: var(--muted); font-size: 11px; }
.summary-item strong { display: block; margin-top: 3px; word-break: break-all; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 15px; margin-bottom: 20px; border-radius: 14px; background: var(--forest-soft); }
.section-title { margin: 22px 0 12px; display: flex; justify-content: space-between; align-items: center; }
.section-title h3 { margin: 0; font-size: 15px; }
.screenshot { width: 100%; max-height: 340px; object-fit: contain; border: 1px solid var(--line); border-radius: 13px; background: #f3f3ef; }
.timeline { position: relative; padding-left: 25px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.timeline-item { position: relative; padding-bottom: 18px; }
.timeline-item::before { content: ""; position: absolute; left: -24px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--forest-2); border: 3px solid var(--forest-soft); }
.timeline-item strong { display: block; font-size: 13px; }
.timeline-item p { margin: 3px 0; color: var(--muted); font-size: 12px; white-space: pre-wrap; }
.timeline-item time { color: #9ba19c; font-size: 10px; }

.modal { position: fixed; z-index: 51; top: 50%; left: 50%; width: min(620px, calc(100% - 28px)); max-height: calc(100vh - 40px); overflow-y: auto; transform: translate(-50%, -50%); border-radius: 20px; background: white; box-shadow: 0 25px 80px rgba(9,18,13,.3); }
.modal-head { padding: 20px 22px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 19px; }
.modal-body { padding: 22px; }
.modal-foot { position: sticky; bottom: 0; padding: 14px 22px; display: flex; justify-content: flex-end; gap: 9px; background: rgba(255,255,255,.95); border-top: 1px solid var(--line); }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { color: #525b55; font-size: 12px; font-weight: 600; }
.required::after { content: " *"; color: var(--red); }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #dfe2dc; border-radius: 10px; padding: 10px 11px; outline: none; background: white; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #7da28f; box-shadow: 0 0 0 3px rgba(34,89,66,.09); }
.field textarea { min-height: 84px; resize: vertical; }
.field-hint { color: #969d98; font-size: 10px; }
.upload-box { min-height: 140px; display: grid; place-items: center; text-align: center; border: 1px dashed #bdc8c0; border-radius: 13px; color: var(--muted); background: #fafbf8; cursor: pointer; overflow: hidden; }
.upload-box:hover { border-color: var(--forest-2); background: var(--forest-soft); }
.upload-box img { width: 100%; max-height: 250px; object-fit: contain; }
.upload-box strong { display: block; color: var(--forest); }

.integration-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.integration-card { padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.integration-card .state { display: inline-flex; margin-bottom: 12px; }
.integration-card h3 { margin: 0 0 5px; }
.integration-card p { margin: 0; color: var(--muted); font-size: 12px; }
.code-box { padding: 15px 17px; border-radius: 12px; color: #d8e8df; background: #15231d; font-family: Consolas, monospace; font-size: 12px; overflow-x: auto; white-space: pre-wrap; }
.checklist { margin: 0; padding-left: 20px; }
.checklist li { margin: 9px 0; }
.notice { padding: 13px 15px; border-left: 3px solid var(--gold); border-radius: 0 10px 10px 0; color: #71501f; background: var(--gold-soft); }

.account-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.account-summary article { padding: 14px; border-radius: 13px; background: #f7f8f5; }
.account-summary span { display: block; color: var(--muted); font-size: 11px; }
.account-summary strong { display: block; margin-top: 4px; font: 700 23px/1.2 Georgia, "Microsoft YaHei", sans-serif; }
.account-list { display: grid; gap: 10px; }
.account-card { display: grid; grid-template-columns: minmax(150px, 1.1fr) minmax(180px, 1fr) minmax(180px, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.account-identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
.account-identity .customer-avatar { flex: 0 0 auto; }
.account-meta { min-width: 0; }
.account-meta strong, .account-meta span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-meta span { color: var(--muted); font-size: 11px; }
.account-statuses { display: flex; flex-wrap: wrap; gap: 6px; }
.mobile-record-list { display: none; }
.record-card { padding: 15px; border-bottom: 1px solid var(--line); background: white; }
.record-card:last-child { border-bottom: 0; }
.record-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.record-card-head h3 { margin: 0; font-size: 15px; }
.record-card-head p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.record-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 13px 0; }
.record-card-grid div { min-width: 0; }
.record-card-grid label { display: block; color: var(--muted); font-size: 10px; }
.record-card-grid strong { display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.record-card-actions { display: flex; gap: 8px; }
.record-card-actions .btn { flex: 1; min-height: 42px; }

.mobile-nav { display: none; }

.toast { position: fixed; z-index: 80; left: 50%; bottom: 28px; transform: translateX(-50%); max-width: calc(100% - 30px); padding: 11px 16px; border-radius: 11px; color: white; background: #1d2a24; box-shadow: 0 12px 35px rgba(0,0,0,.22); animation: toast-in .18s ease; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

.loading-state { min-height: 55vh; display: grid; place-items: center; align-content: center; gap: 12px; color: var(--muted); }
.spinner { width: 28px; height: 28px; border: 3px solid #dfe5e0; border-top-color: var(--forest); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }
.mobile-only { display: none; }

@media (max-width: 1220px) {
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .mobile-only { display: grid; place-items: center; }
  .topbar { height: 64px; padding: env(safe-area-inset-top) 14px 0; justify-content: flex-start; gap: 10px; }
  .topbar > div:nth-child(2) { flex: 1; min-width: 0; }
  .topbar h1 { font-size: 19px; }
  .eyebrow { display: none; }
  .system-live, .role-switch > span { display: none; }
  .role-switch select { min-width: 112px; max-width: 140px; }
  .user-avatar { display: none; }
  .content { padding: 14px 12px calc(88px + env(safe-area-inset-bottom)); }
  .mobile-nav { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; min-height: 68px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); display: flex; justify-content: space-around; border-top: 1px solid rgba(211,215,208,.9); background: rgba(255,255,255,.96); backdrop-filter: blur(18px); box-shadow: 0 -10px 30px rgba(20,35,27,.08); }
  .mobile-nav-item { min-width: 64px; min-height: 52px; position: relative; display: grid; place-items: center; align-content: center; gap: 1px; border: 0; border-radius: 13px; color: #7a837d; background: transparent; }
  .mobile-nav-item > span { font-size: 19px; line-height: 1; }
  .mobile-nav-item small { font-size: 10px; }
  .mobile-nav-item.active { color: var(--forest); background: var(--forest-soft); }
  .mobile-nav-item.active > span { color: var(--gold); }
  .mobile-badge { position: absolute; top: 3px; right: 7px; min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; border-radius: 10px; color: white; background: var(--red); font-size: 9px; font-style: normal; }
  .hero { min-height: 170px; padding: 22px; align-items: flex-start; }
  .hero h2 { font-size: 23px; }
  .hero-score { min-width: auto; position: absolute; right: 22px; bottom: 18px; }
  .hero-score strong { font-size: 32px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .metric-card { min-height: 103px; padding: 15px; }
  .metric-card strong { font-size: 24px; }
  .integration-grid { grid-template-columns: 1fr; }
  .account-summary { grid-template-columns: repeat(2, 1fr); }
  .account-card { grid-template-columns: minmax(0, 1fr) auto; }
  .account-card > .account-meta { grid-column: 1 / -1; grid-row: 2; }
  .account-statuses { grid-column: 1 / -1; grid-row: 3; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .filters { align-items: stretch; }
  .search { min-width: 0; max-width: none; }
}

@media (max-width: 560px) {
  .topbar-actions { gap: 7px; }
  .role-switch select { max-width: 120px; min-width: 96px; padding-right: 20px; }
  .page-head { align-items: stretch; flex-direction: column; }
  .page-head .btn { width: 100%; }
  .hero { min-height: 168px; margin-bottom: 12px; padding: 18px; flex-direction: column; justify-content: flex-start; border-radius: 18px; }
  .hero::after { display: none; }
  .hero h2 { max-width: 290px; margin-top: 5px; font-size: 19px; line-height: 1.35; }
  .hero p { display: none; }
  .hero-score { position: static; display: flex; align-items: baseline; gap: 10px; text-align: left; }
  .hero-score strong { font-size: 30px; }
  .metric-grid { margin-bottom: 14px; }
  .metric-card { min-height: 94px; padding: 13px; border-radius: 14px; }
  .metric-card strong { margin-top: 9px; font-size: 21px; }
  .metric-card small { font-size: 10px; }
  .funnel { grid-template-columns: repeat(5, minmax(58px, 1fr)); min-width: 380px; }
  .panel-body.funnel-scroll { overflow-x: auto; }
  .filters { flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .lead-summary { grid-template-columns: 1fr; }
  .drawer-head, .drawer-body { padding-left: 17px; padding-right: 17px; }
  .modal-body { padding: 17px; }
  .modal-foot { padding: 12px 17px; }
  .action-row { flex-wrap: wrap; }
  .desktop-table { display: none; }
  .mobile-record-list { display: block; }
  .panel-head { min-height: 58px; padding: 14px 15px; }
  .panel-body { padding: 15px; }
  .account-card { padding: 13px; }
  .toast { bottom: calc(82px + env(safe-area-inset-bottom)); }
  .btn, .icon-button, .text-button { min-height: 44px; }
  .text-button { padding: 7px 0; }
}
