:root {
  --navy: #007f85;
  --ink: #183047;
  --muted: #687d91;
  --line: #e2e9ef;
  --bg: #ffffff;
  --sidebar: #f5f8fa;
  --teal-soft: #e5f4f4;
  --gold: #ff6310;
  --orange: #ff6310;
  --orange-soft: #fff0e6;
  --orange-ink: #9a3500;
  --green: #21684f;
  --red: #ac3c32;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { touch-action: manipulation; }
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  border-radius: 6px;
  padding: 8px 13px;
  font-weight: 600;
  transition: background .15s, border-color .15s;
}
button:hover { background: #f3f7f9; border-color: #cbd9e1; }
button.primary { background: var(--navy); color: white; border-color: var(--navy); }
button.primary:hover { background: #007379; border-color: #007379; }
button.danger { color: var(--red); }
button:disabled { opacity: .48; cursor: not-allowed; }
.ui-icon { display: inline-block; width: 18px; height: 18px; flex: 0 0 18px; vertical-align: middle; filter: brightness(0) saturate(100%) invert(17%) sepia(18%) saturate(1480%) hue-rotate(169deg) brightness(90%) contrast(93%); }
button.primary .ui-icon { filter: brightness(0) invert(1); }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }
input, select, textarea {
  width: 100%;
  border: 1px solid #d3dfe7;
  border-radius: 6px;
  background: white;
  padding: 9px 11px;
  color: var(--ink);
  min-height: 42px;
}
input::placeholder, textarea::placeholder { color: #8494a3; }
textarea { min-height: 95px; resize: vertical; }
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--navy);
  cursor: pointer;
}
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid #a9dadd;
  outline-offset: 2px;
}
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
label.check { flex-direction: row; align-items: center; gap: 8px; }
h1 { font-size: 28px; line-height: 1.3; letter-spacing: -.6px; margin: 0 0 8px; }
h2 { font-size: 20px; line-height: 1.4; margin: 0 0 16px; }
h3 { font-size: 16px; margin: 0 0 10px; }
p { margin: 0 0 14px; }
.muted, small { color: var(--muted); font-size: 14px; }
[hidden] { display: none !important; }

/* Shared navigation and workspace. The quotation iframe keeps its own styles. */
.layout { display: grid; grid-template-columns: 226px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  min-width: 0;
  max-width: 100%;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  color: var(--ink);
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 25px 13px 20px;
  display: flex;
  flex-direction: column;
}
.brand-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px; padding: 0 11px; }
.brand { color: #183047; font-size: 24px; line-height: 1.35; font-weight: 760; padding: 0 11px; letter-spacing: -.8px; }
.brand-title .brand { padding: 0; white-space: nowrap; }
.brand span { color: #b88d4a; }
.brand-style { font-size: 11px; color: #8491a0; font-weight: 500; letter-spacing: 0; }
.brand-note { font-size: 12px; color: var(--muted); padding: 4px 11px 27px; }
.sidebar nav { display: grid; gap: 7px; min-width: 0; max-width: 100%; }
.sidebar nav a {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 46px;
  color: #294057;
  padding: 10px 11px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}
.sidebar nav a:hover { background: #edf2f5; }
.sidebar nav a.active { background: #dff0f1; color: #006f77; font-weight: 650; }
.sidebar nav a.active .ui-icon { filter: brightness(0) saturate(100%) invert(29%) sepia(87%) saturate(1023%) hue-rotate(151deg) brightness(84%) contrast(104%); }
.nav-icon { display: flex; flex: 0 0 22px; width: 22px; height: 22px; align-items: center; justify-content: center; }
.nav-icon img { display: block; width: 22px; height: 22px; }
.nav-label { min-width: 0; }
.sidebar .user { margin-top: auto; padding: 17px 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.user-summary { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.user-avatar {
  display: flex;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  color: #526b7e;
  font-size: 13px;
  font-weight: 700;
}
.user-copy { min-width: 0; }
.user-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; }
.user-copy small { display: block; font-size: 11px; }
.sidebar .user button { border: none; background: transparent; color: var(--muted); padding: 4px 0; font-size: 12px; margin-right: 12px; }
.sidebar .user button:hover { color: var(--navy); }
.content { padding: 29px 30px; max-width: 1640px; width: 100%; min-width: 0; }
.page-head { display: flex; justify-content: space-between; gap: 22px; align-items: center; margin-bottom: 25px; }
.page-head .muted { margin: 0; }
.row, .actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.card { background: white; border: 1px solid var(--line); border-radius: 8px; padding: 23px; margin-bottom: 20px; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 24px; }
.metric { padding: 19px 20px; background: white; border: 1px solid var(--line); border-radius: 8px; }
a.metric:hover { text-decoration: none; border-color: #b6d9dc; background: #f8fcfc; }
.metric strong { display: block; font-size: 29px; line-height: 1.3; color: var(--ink); margin: 7px 0; }
.metric.attention strong, .metric .attention { color: var(--orange); }
.metric .label { font-size: 13px; color: var(--muted); }
.metric small { font-size: 12px; }
.cols { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; }
.cols > *, .cards > * { min-width: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.toolbar input { max-width: 310px; }
.toolbar select { width: auto; max-width: 230px; }
.toolbar input[type="checkbox"] { width: 18px; }
.table-wrap { overflow: auto; min-width: 0; max-width: 100%; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; color: #597187; background: #f5f8fa; white-space: nowrap; font-size: 12px; }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:hover { background: #fafcfd; }
td .muted { font-size: 12px; }
td button { font-size: 12px; padding: 5px 9px; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #d7e2e8;
  background: #f0f5f7;
  color: #4b677c;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.65;
  font-weight: 500;
  white-space: nowrap;
}
.tag.green { background: #eaf4ef; color: var(--green); border-color: #c6dfd0; }
.tag.red { background: #fff0ed; color: var(--red); border-color: #eccbc6; }
.tag.gold, .tag.orange { background: var(--orange-soft); color: var(--orange-ink); border-color: var(--orange); }
.tag.gold::before, .tag.orange::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--orange); flex: 0 0 4px; }
.tag-filter { border-radius: 20px; font-size: 13px; padding: 5px 12px; font-weight: 500; }
.tag-filter.selected { background: var(--navy); border-color: var(--navy); color: white; }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty strong { display: block; font-size: 18px; color: var(--ink); margin-bottom: 8px; }
.note { border-left: 3px solid var(--orange); padding: 12px 15px; background: #fff7f1; color: #735a49; font-size: 14px; margin-bottom: 18px; }
.timeline { border-left: 2px solid #dae8eb; margin-left: 8px; padding-left: 24px; }
.entry { position: relative; padding: 0 0 24px; }
.entry::before { content: ""; position: absolute; left: -31px; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--navy); border: 2px solid white; }
.entry p { white-space: pre-wrap; margin: 9px 0; font-size: 15px; }
.detail-pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; font-size: 14px; }
.detail-pairs dt { color: var(--muted); font-size: 12px; }
.detail-pairs dd { margin: 2px 0; white-space: pre-wrap; word-break: break-word; }
.section-tabs { margin: 15px 0 21px; display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.section-tabs button { border: 0; border-radius: 0; background: transparent; border-bottom: 3px solid transparent; color: var(--muted); padding: 10px 12px; }
.section-tabs button.selected { border-color: var(--navy); color: var(--navy); }
details > summary { cursor: pointer; font-weight: 600; color: var(--navy); padding: 10px 0; }
details[open] > summary { margin-bottom: 12px; }
dialog {
  border: 1px solid var(--line);
  border-radius: 10px;
  max-width: 760px;
  width: calc(100% - 30px);
  max-height: 90vh;
  padding: 25px;
  color: var(--ink);
  box-shadow: 0 18px 70px #1830472e;
}
dialog::backdrop { background: #18304755; }
dialog .row.between { margin-bottom: 19px; }
.form-error { color: var(--red); white-space: pre-wrap; margin: 10px 0; font-size: 14px; }
.auth { max-width: 450px; margin: 9vh auto 40px; padding: 33px; background: white; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 45px #18304708; }
.auth .brand { padding: 0; color: var(--ink); margin-bottom: 22px; }
.auth form { display: grid; gap: 16px; }
.loading { padding: 70px; text-align: center; }
.auth .note { font-size: 13px; }
#notice { position: fixed; bottom: 24px; right: 25px; z-index: 500; background: var(--navy); color: white; padding: 12px 19px; border-radius: 7px; box-shadow: 0 6px 25px #15395022; display: none; max-width: 480px; }
#notice.error { background: #993f36; }
.workbench-frame { border: 1px solid var(--line); width: 100%; height: calc(100vh - 160px); border-radius: 8px; background: white; }
.truncate { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.attachment { padding: 8px 0; border-bottom: 1px solid var(--line); }
.pre { white-space: pre-wrap; word-break: break-word; font-size: 13px; }
.status-bar { margin-top: 12px; font-size: 13px; color: var(--muted); }
.step { display: inline-flex; width: 27px; height: 27px; border-radius: 50%; align-items: center; justify-content: center; background: var(--teal-soft); color: var(--navy); margin-right: 6px; }
.warn-text { color: var(--orange-ink); }
.danger-text { color: var(--red); }
.evidence-image { display: block; max-width: 100%; max-height: 60vh; object-fit: contain; margin: 12px 0; }
.evidence-summary { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.evidence-summary .pre { max-width: 240px; }

/* Lead inbox: compact overview, working table, and a separate detail pane. */
.content.leads-content { padding: 27px 25px; }
.lead-page-head { margin-bottom: 0; }
.lead-page-head > .page-head { margin-bottom: 22px; }
.lead-page-head h1 { font-size: 28px; }
.lead-page-head .actions { flex-shrink: 0; }
.lead-page-head .primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.lead-page-head .primary img { width: 19px; height: 19px; }
.lead-counts { display: flex; gap: 0; flex-wrap: wrap; align-items: center; margin-bottom: 23px; }
.lead-count { display: inline-flex; gap: 7px; align-items: baseline; padding: 0 18px; border-right: 1px solid #d3dfe7; color: #526b80; line-height: 1.2; font-size: 13px; }
.lead-count:first-child { padding-left: 0; }
.lead-count:last-child { border-right: 0; }
.lead-count-value { font-size: 20px; font-weight: 700; color: var(--ink); }
.lead-count .attention, .lead-count.attention .lead-count-value { color: var(--orange); }
.lead-workspace { display: grid; grid-template-columns: minmax(0, 1fr); border: 1px solid var(--line); border-radius: 8px; overflow: clip; align-items: start; background: white; }
.lead-workspace.has-detail { grid-template-columns: minmax(0, 1fr) 340px; }
.lead-main { min-width: 0; }
.lead-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 73px; padding: 16px; margin: 0; border-bottom: 1px solid var(--line); }
.lead-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.lead-tools strong { font-size: 13px; margin-right: 3px; white-space: nowrap; }
.lead-tools button { font-size: 12px; min-height: 36px; padding: 6px 10px; white-space: nowrap; }
.lead-tools button.primary { display: inline-flex; gap: 6px; align-items: center; }
.lead-tools button img { width: 17px; height: 17px; }
.lead-search { position: relative; flex: 1 1 185px; max-width: 270px; min-width: 155px; }
.lead-search input { padding-left: 34px; min-height: 37px; height: 37px; font-size: 12px; }
.lead-search img { position: absolute; top: 10px; left: 11px; width: 17px; height: 17px; pointer-events: none; }
.lead-table { font-size: 12px; table-layout: auto; min-width: 650px; }
.lead-table th { padding: 12px 10px; font-size: 11px; }
.lead-table td { padding: 9px 10px; vertical-align: middle; height: 66px; }
.lead-table .lead-check { width: 37px; text-align: center; padding-left: 12px; padding-right: 6px; }
.lead-table th:last-child, .lead-table td:last-child { text-align: center; width: 80px; padding-right: 10px; }
.lead-table tbody tr { cursor: default; }
.lead-table tbody tr.is-selected { background: #e9f5f5; }
.lead-table tbody tr.is-current { background: #e1f1f2; box-shadow: inset 3px 0 var(--navy); }
.lead-table tbody tr:hover { background: #f0f8f8; }
.lead-table tbody tr.is-selected:hover { background: #e2f1f1; }
.lead-company { display: block; min-width: 120px; max-width: 220px; font-size: 14px; line-height: 1.4; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; margin-bottom: 4px; }
.lead-channel { display: flex; gap: 5px; align-items: flex-start; font-size: 11px; color: var(--muted); line-height: 1.45; }
.lead-channel img { width: 14px; height: 14px; flex: 0 0 14px; margin-top: 1px; }
.lead-channel span { overflow-wrap: anywhere; }
.lead-source { max-width: 170px; min-width: 90px; overflow-wrap: anywhere; color: #526b80; font-size: 11px; line-height: 1.5; }
.lead-source small { display: block; font-size: 10px; color: #7a8da0; margin-top: 2px; overflow-wrap: anywhere; }
.lead-time { min-width: 77px; font-size: 11px; color: #617a90; line-height: 1.45; }
.lead-time small { display: block; font-size: 11px; }
.lead-status { white-space: nowrap; }
.lead-owner { max-width: 80px; overflow-wrap: anywhere; font-size: 11px; color: #526b80; }
.lead-owner > small { display: block; font-size: 10px; line-height: 1.5; margin-top: 3px; }
.lead-owner .evidence-summary { margin-top: 5px; gap: 4px; }
.lead-owner .evidence-summary button, .lead-owner .evidence-summary a { font-size: 10px; padding: 2px 4px; }
.lead-owner .evidence-summary .pre { font-size: 10px; }
.lead-more { min-width: 42px; padding: 4px 7px; font-size: 11px; font-weight: 500; }
.lead-row-actions { display: flex; justify-content: flex-end; align-items: center; gap: 3px; }
.lead-row-actions > button { white-space: nowrap; padding: 4px 7px; font-size: 11px; }
.lead-row-menu { position: relative; }
.lead-row-menu > summary { display: flex; align-items: center; justify-content: center; width: 24px; height: 29px; padding: 0; list-style: none; border: 1px solid transparent; border-radius: 4px; }
.lead-row-menu > summary::-webkit-details-marker { display: none; }
.lead-row-menu > summary:hover, .lead-row-menu[open] > summary { border-color: var(--line); background: #f4f8fa; }
.lead-row-menu[open] > summary { margin: 0; }
.lead-menu-actions { position: absolute; right: 0; top: 33px; z-index: 6; display: grid; gap: 4px; width: 155px; padding: 6px; background: white; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 7px 25px #18304720; }
.lead-menu-actions button { text-align: left; border: 0; background: transparent; padding: 7px 9px; font-size: 12px; }
.lead-menu-actions button:hover { background: var(--teal-soft); }
.lead-menu-actions a { display: block; padding: 7px 9px; text-align: left; font-size: 12px; }
.lead-table tr:nth-last-child(-n+3) .lead-menu-actions { top: auto; bottom: 33px; }
.lead-pagination { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px 16px; color: var(--muted); font-size: 12px; }
.lead-pagination .actions { gap: 5px; }
.lead-pagination button { min-width: 30px; min-height: 30px; font-size: 12px; padding: 3px 8px; }
.lead-pagination button.selected { background: var(--teal-soft); color: var(--navy); border-color: var(--teal-soft); }
.lead-pagination select { width: auto; min-height: 32px; height: 32px; padding: 3px 8px; font-size: 12px; }
.lead-detail-pane { border-left: 1px solid var(--line); padding: 19px 20px; min-width: 0; position: sticky; top: 16px; max-height: calc(100vh - 215px); min-height: 420px; overflow-y: auto; scrollbar-width: thin; background: white; }
.lead-detail-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 17px; }
.lead-detail-header h2 { font-size: 19px; margin: 0; }
.lead-detail-header button { border: 0; min-width: 28px; padding: 0 5px; color: var(--muted); font-size: 24px; font-weight: 400; line-height: 1.2; }
.lead-detail-header button .ui-icon { width: 20px; height: 20px; }
.lead-pane-scroll { min-width: 0; }
.lead-detail-heading { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 9px; margin-bottom: 17px; }
.lead-detail-heading h3 { font-size: 20px; line-height: 1.35; margin: 0; overflow-wrap: anywhere; }
.lead-detail-heading .tag { margin-top: 2px; }
.lead-detail-title { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 9px; margin-bottom: 17px; }
.lead-detail-title h3 { font-size: 20px; line-height: 1.35; margin: 0; overflow-wrap: anywhere; }
.lead-detail-title .tag { margin-top: 2px; }
.lead-detail-meta { display: grid; gap: 10px; color: #617a90; font-size: 12px; margin-bottom: 21px; }
.lead-detail-meta > div { display: flex; align-items: flex-start; gap: 10px; }
.lead-detail-meta img { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 1px; }
.lead-detail-meta span { overflow-wrap: anywhere; }
.lead-detail-meta small { display: block; font-size: 11px; }
.lead-identity, .lead-questions, .lead-evidence-block { border-top: 1px solid var(--line); padding-top: 17px; margin-top: 18px; }
.lead-identity h3, .lead-questions h3, .lead-evidence-block h3 { font-size: 14px; margin-bottom: 12px; }
.lead-identity .detail-pairs { grid-template-columns: 1fr; gap: 10px; margin: 0; font-size: 12px; }
.lead-identity .detail-pairs dt { font-size: 11px; }
.lead-identity > summary { font-size: 13px; padding: 0; }
.lead-identity > .muted, .lead-evidence-block > .muted { font-size: 11px; margin: 9px 0 0; }
.lead-question { padding: 10px 11px; margin-bottom: 7px; background: #f5f8fa; border-radius: 4px; font-size: 12px; overflow-wrap: anywhere; }
.lead-question strong { display: block; color: #425d74; margin-bottom: 4px; font-weight: 600; }
.lead-question p { color: #647d90; margin: 0; white-space: pre-wrap; }
.lead-question .pre { font-size: 12px; color: #647d90; }
.lead-detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 19px; }
.lead-detail-actions button { padding: 7px 10px; font-size: 12px; }
.lead-detail-actions .primary { flex: 1 1 100%; }
.lead-evidence-block { font-size: 12px; }
.lead-evidence-block .evidence-summary { margin-top: 8px; }
.lead-evidence-block .evidence-summary button { font-size: 12px; padding: 4px 8px; }
.lead-evidence-block .evidence-summary .pre { max-width: none; width: 100%; font-size: 12px; }
.lead-evidence-block .row > h3 { margin-bottom: 0; }
.lead-evidence-block .row > button { display: inline-flex; align-items: center; gap: 5px; color: var(--navy); font-size: 11px; padding: 5px 7px; }
.lead-evidence-block .row > button .ui-icon { width: 13px; height: 13px; flex-basis: 13px; }
.lead-detail-secondary { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 13px; font-size: 12px; color: var(--muted); }
.lead-detail-secondary details > summary { font-size: 12px; }
.lead-detail-secondary .card { padding: 0; border: 0; margin-bottom: 10px; }
.lead-detail-secondary .detail-pairs { grid-template-columns: 1fr; gap: 10px; font-size: 12px; }
.lead-detail-secondary .row { gap: 5px; }
.lead-detail-secondary .pre { font-size: 11px; }

@media (min-width: 1700px) {
  .content { margin: auto; }
  .lead-workspace.has-detail { grid-template-columns: minmax(0, 1fr) 380px; }
  .lead-table { font-size: 13px; }
  .lead-company { font-size: 14px; }
  .lead-source, .lead-time, .lead-owner { font-size: 12px; }
}

@media (min-width: 1101px) and (max-width: 1350px) {
  .layout { grid-template-columns: 216px minmax(0, 1fr); }
  .content.leads-content { padding: 25px 18px; }
  .lead-workspace.has-detail { grid-template-columns: minmax(0, 1fr) 310px; }
  .lead-detail-pane { padding: 18px 16px; }
  .lead-toolbar { flex-wrap: wrap; gap: 10px; }
  .lead-search { max-width: none; flex-basis: 100%; }
}

@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content { padding: 25px; }
  .cols { grid-template-columns: 1fr; }
  .lead-workspace, .lead-workspace.has-detail { grid-template-columns: minmax(0, 1fr); }
  .lead-detail-pane {
    display: none;
    position: fixed;
    z-index: 80;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(390px, 90vw);
    max-height: 100vh;
    min-height: 0;
    box-shadow: -14px 0 45px #18304722;
    padding: 23px;
  }
  .lead-detail-pane.is-open { display: block; }
  .lead-toolbar { flex-wrap: wrap; }
  .lead-search { max-width: none; }
  .lead-detail-header { margin-bottom: 22px; }
}

@media (max-width: 760px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: relative; height: auto; padding: 15px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand-title, .brand { padding-left: 0; }
  .brand { font-size: 22px; }
  .brand-note, .brand-style { display: none; }
  .sidebar nav { display: flex; overflow-x: auto; margin-top: 12px; padding-bottom: 2px; gap: 5px; }
  .sidebar nav a { white-space: nowrap; font-size: 12px; padding: 7px 9px; min-height: 35px; gap: 6px; }
  .nav-icon, .nav-icon img { width: 17px; height: 17px; flex-basis: 17px; }
  .sidebar .user { margin-top: 10px; padding: 10px 0 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .user-summary { margin: 0; }
  .user-avatar { width: 26px; height: 26px; flex-basis: 26px; }
  .user-copy small { display: none; }
  .sidebar .user button { margin-right: 8px; }
  .content, .content.leads-content { padding: 21px 15px; }
  .page-head { align-items: flex-start; gap: 14px; margin-bottom: 21px; }
  .page-head h1, .lead-page-head h1 { font-size: 24px; }
  .page-head .actions { gap: 7px; }
  .page-head .actions button { font-size: 12px; padding: 7px 10px; }
  .page-head .muted { font-size: 12px; }
  .card { padding: 17px; }
  .cards { gap: 10px; }
  .metric { padding: 15px; }
  .metric strong { font-size: 26px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .detail-pairs { grid-template-columns: 1fr; }
  .toolbar input, .toolbar select { max-width: 100%; width: 100%; }
  .toolbar input[type="checkbox"] { width: 18px; }
  .auth { margin: 35px 15px; }
  dialog { padding: 20px; }
  #notice { bottom: 15px; left: 15px; right: 15px; max-width: none; }
  .lead-page-head { flex-wrap: wrap; }
  .lead-page-head > .page-head { flex-wrap: wrap; }
  .lead-page-head .actions { width: 100%; }
  .lead-page-head .primary { width: 100%; }
  .lead-counts { margin-bottom: 19px; row-gap: 12px; }
  .lead-count { padding: 0 10px; font-size: 12px; }
  .lead-count-value { font-size: 18px; }
  .lead-toolbar { padding: 12px; }
  .lead-tools { gap: 7px; }
  .lead-tools strong { width: 100%; }
  .lead-tools button { font-size: 11px; padding: 5px 8px; }
  .lead-search { flex-basis: 100%; }
  .lead-search input { padding-left: 34px; }
  .lead-pagination { padding: 12px; font-size: 11px; }
  .lead-detail-pane { width: min(390px, 95vw); padding: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  button { transition: none; }
}
