:root {
  color-scheme: light;
  --ink: #1d2925;
  --muted: #78827e;
  --soft: #9ba39f;
  --line: #e8ece9;
  --paper: #ffffff;
  --canvas: #f5f7f5;
  --green: #187653;
  --green-dark: #10583d;
  --green-tint: #e9f5ee;
  --green-tint-2: #f1f8f3;
  --mint: #bce7cd;
  --amber: #ab7624;
  --amber-bg: #fff7e6;
  --red: #b74a44;
  --red-bg: #fff0ef;
  --blue: #547a9c;
  --blue-bg: #eff5fb;
  --shadow: 0 7px 24px rgba(28, 48, 37, .045);
  --radius: 14px;
  font-family: 'DM Sans', Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 246px; flex: 0 0 246px; border-right: 1px solid var(--line); background: #fff; padding: 22px 14px 18px; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 24px; }
.brand-mark { width: 34px; height: 34px; border-radius: 11px; color: #fff; display: grid; place-items: center; background: var(--green); box-shadow: inset 0 -7px 14px rgba(0,0,0,.1); }
.brand-mark svg { width: 21px; height: 21px; }
.brand-name { font: 800 17px/1 'Manrope', sans-serif; letter-spacing: -.5px; }
.brand-caption { margin-top: 4px; color: var(--muted); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.sidebar-label { padding: 14px 11px 8px; color: #a0a9a4; font-size: 10px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.nav-list { display: grid; gap: 3px; }
.nav-link { display: flex; gap: 11px; align-items: center; min-height: 40px; padding: 0 11px; border: 0; color: #69736e; background: transparent; border-radius: 9px; text-align: left; font-size: 13px; font-weight: 500; transition: background .16s, color .16s; }
.nav-link svg { width: 17px; height: 17px; stroke-width: 1.8; flex: 0 0 17px; }
.nav-link:hover { color: var(--green-dark); background: #f6f8f6; }
.nav-link.active { color: var(--green-dark); background: var(--green-tint); font-weight: 700; }
.mobile-nav { display:none; }
.nav-count { margin-left: auto; min-width: 21px; text-align: center; border-radius: 8px; padding: 2px 6px; background: #eef2ef; font-size: 10px; color: #69736e; }
.sidebar-bottom { margin-top: auto; }
.storage-card { margin: 14px 6px 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfb; }
.storage-card-title { display: flex; gap: 7px; align-items: center; font-weight: 700; font-size: 11px; }
.storage-card-title svg { width: 14px; height: 14px; color: var(--green); }
.storage-card p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.user-card { padding: 12px 8px 0; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 9px; }
.avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #416950; background: #e5eee7; font-weight: 700; font-size: 11px; }
.user-name { font-weight: 700; font-size: 12px; }
.user-role { color: var(--muted); font-size: 10px; margin-top: 3px; }
.main-area { min-width: 0; flex: 1; }
.topbar { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 clamp(20px, 3vw, 42px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); }
.breadcrumbs { color: var(--muted); font-size: 12px; }
.breadcrumbs strong { color: var(--ink); font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 11px; }
.global-search { position: relative; }
.global-search svg { position: absolute; width: 15px; height: 15px; top: 10px; left: 11px; color: #929b96; pointer-events: none; }
.global-search input { width: clamp(180px, 21vw, 260px); height: 36px; border: 1px solid var(--line); background: #fbfcfb; border-radius: 9px; padding: 0 12px 0 34px; outline: none; color: var(--ink); font-size: 12px; }
.global-search input:focus { border-color: #9ac8aa; box-shadow: 0 0 0 3px rgba(24,118,83,.08); }
.connection { display: flex; align-items: center; gap: 7px; color: #69766f; font-size: 11px; white-space: nowrap; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #55a275; box-shadow: 0 0 0 3px #e9f6ec; }
.content { max-width: 1520px; margin: 0 auto; padding: 30px clamp(20px, 3vw, 42px) 48px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 24px; }
.eyebrow { color: var(--green); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 7px 0 7px; font: 700 clamp(23px, 2.4vw, 30px)/1.2 'Manrope', sans-serif; letter-spacing: -.8px; }
.page-description { color: var(--muted); margin: 0; line-height: 1.55; max-width: 760px; font-size: 13px; }
.page-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 37px; border: 1px solid var(--line); background: #fff; color: #47544c; border-radius: 9px; padding: 0 13px; font-size: 12px; font-weight: 700; text-decoration: none; transition: .15s ease; }
.btn:hover { border-color: #b9c9bf; background: #fbfdfb; }
.btn svg { width: 15px; height: 15px; }
.btn-primary { color: #fff; background: var(--green); border-color: var(--green); }
.btn-primary:hover { color: #fff; background: var(--green-dark); border-color: var(--green-dark); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-danger { color: var(--red); border-color: #f2d5d3; background: #fffafa; }
.btn-sm { min-height: 30px; padding: 0 9px; font-size: 11px; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 1px solid var(--line); color: #6a756e; background: #fff; border-radius: 9px; }
.icon-btn svg { width: 16px; height: 16px; }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.card { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.metric-card { min-height: 131px; padding: 17px 18px 15px; }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; font-weight: 600; }
.metric-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: var(--green); background: var(--green-tint); }
.metric-icon svg { width: 16px; height: 16px; }
.metric-value { margin-top: 13px; font: 700 27px/1 'Manrope', sans-serif; letter-spacing: -.7px; }
.metric-sub { margin-top: 7px; color: #9aa39e; font-size: 10px; }
.section { margin-top: 18px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 0 0 14px; }
.section-title { margin: 0; font: 700 15px 'Manrope', sans-serif; letter-spacing: -.3px; }
.section-subtitle { color: var(--muted); margin: 5px 0 0; font-size: 11px; line-height: 1.45; }
.section-link { color: var(--green); border: 0; background: transparent; font-size: 11px; font-weight: 700; }
.split-card { padding: 19px; }
.bar-list { display: grid; gap: 13px; }
.bar-row { display: grid; grid-template-columns: minmax(85px, 1fr) 2fr 28px; align-items: center; gap: 10px; font-size: 11px; }
.bar-label { color: #55615a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 7px; border-radius: 10px; overflow: hidden; background: #eef1ef; }
.bar-fill { height: 100%; background: #6bb38b; border-radius: inherit; }
.bar-count { text-align: right; color: var(--muted); font-size: 10px; }
.activity-empty { display: grid; place-items: center; min-height: 180px; padding: 18px; text-align: center; color: var(--muted); }
.empty-icon { width: 42px; height: 42px; display: grid; place-items: center; margin: 0 auto 10px; color: var(--green); background: var(--green-tint); border-radius: 13px; }
.empty-icon svg { width: 20px; height: 20px; }
.empty-title { color: var(--ink); font-weight: 700; font-size: 12px; margin-bottom: 5px; }
.empty-copy { max-width: 310px; margin: auto; font-size: 11px; line-height: 1.55; }
.table-card { overflow: hidden; }
.table-toolbar { padding: 13px 15px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 9px; }
.field-search { position: relative; }
.field-search svg { position: absolute; left: 10px; top: 10px; width: 14px; height: 14px; color: #8d9991; }
.field-search input { min-width: 200px; height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px 0 30px; outline: 0; font-size: 11px; }
.select, .input, .textarea { width: 100%; min-height: 38px; border: 1px solid #dfe6e1; border-radius: 8px; background: #fff; color: var(--ink); padding: 9px 11px; outline: none; font-size: 12px; }
.select:focus, .input:focus, .textarea:focus { border-color: #97c5a6; box-shadow: 0 0 0 3px rgba(24,118,83,.08); }
.textarea { min-height: 88px; resize: vertical; line-height: 1.5; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 11px 15px; border-bottom: 1px solid var(--line); color: #97a09b; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; white-space: nowrap; }
td { padding: 13px 15px; border-bottom: 1px solid #f0f2f0; color: #637069; font-size: 11px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
.company-cell { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.company-mark { flex: 0 0 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: #4a7758; background: #eaf3ec; font-size: 10px; font-weight: 700; }
.company-name { color: #27342d; font-weight: 700; font-size: 11px; }
.company-detail { margin-top: 3px; color: #9aa39e; font-size: 9px; }
.badge { display: inline-flex; align-items: center; gap: 5px; min-height: 22px; padding: 2px 8px; border-radius: 20px; color: #5d7464; background: #edf5ef; white-space: nowrap; font-size: 9px; font-weight: 700; }
.badge-neutral { color: #6e7c74; background: #f0f3f1; }
.badge-blue { color: #577493; background: var(--blue-bg); }
.badge-amber { color: #97712c; background: var(--amber-bg); }
.badge-red { color: #a64e47; background: var(--red-bg); }
.muted { color: var(--muted); }
.small { font-size: 10px; }
.table-empty { padding: 45px 20px; text-align: center; color: var(--muted); font-size: 12px; }
.table-empty strong { display: block; color: var(--ink); margin-bottom: 6px; }
.search-card { padding: 19px; }
.search-criteria { display: grid; grid-template-columns: 1.35fr 1fr 1.05fr .7fr; gap: 12px; align-items: end; }
.field { display: grid; gap: 6px; }
.field label { color: #56625b; font-weight: 700; font-size: 10px; }
.field-hint { color: #9aa39e; font-size: 9px; line-height: 1.4; }
.search-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #f0f2f0; }
.search-note { max-width: 700px; color: #78847c; font-size: 10px; line-height: 1.5; }
.provider-toggle { display: flex; padding: 3px; gap: 3px; border: 1px solid var(--line); border-radius: 9px; background: #f8faf8; }
.provider-option { min-height: 28px; border: 0; border-radius: 7px; padding: 0 9px; color: #7b8680; background: transparent; font-size: 10px; font-weight: 700; }
.provider-option.active { color: var(--green-dark); background: #fff; box-shadow: 0 1px 5px rgba(25,49,35,.1); }
.search-state { display: none; margin-top: 13px; border-radius: 9px; padding: 11px 13px; color: #627068; background: #f6f8f6; font-size: 11px; line-height: 1.5; }
.search-state.show { display: flex; align-items: flex-start; gap: 8px; }
.search-state.error { color: #9b413c; background: var(--red-bg); }
.search-state.success { color: #40674f; background: var(--green-tint-2); }
.search-state svg { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 1px; }
.result-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: 15px; align-items: stretch; }
.results-panel { min-width: 0; }
.result-list { display: grid; gap: 8px; }
.result-item { display: flex; gap: 12px; justify-content: space-between; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.result-main { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.result-main > div:last-child { min-width: 0; }
.result-title { color: var(--ink); font-weight: 700; font-size: 11px; line-height: 1.4; }
.result-meta { margin-top: 4px; color: #818d85; font-size: 10px; line-height: 1.45; }
.result-actions { display: flex; gap: 6px; flex-shrink: 0; }
.result-map { width: 100%; height: 350px; border: 1px solid var(--line); border-radius: 12px; background: #edf2ee; overflow: hidden; z-index: 0; }
.map-placeholder { height: 100%; display: grid; place-items: center; text-align: center; padding: 20px; color: var(--muted); font-size: 11px; }
.provider-attribution { color: #849087; font-size: 9px; text-align: right; margin: 6px 4px 0; }
.map-google-note { padding: 14px; border: 1px solid #e8edf0; border-radius: 10px; background: #f6f9fb; color: #64737b; font-size: 10px; line-height: 1.5; }
.pipeline-scroll { overflow-x: auto; padding-bottom: 10px; }
.pipeline { display: grid; grid-auto-columns: minmax(205px, 1fr); grid-auto-flow: column; gap: 11px; min-width: max-content; }
.pipeline-col { width: 205px; min-height: 260px; border: 1px solid var(--line); border-radius: 12px; background: #eff3f0; padding: 10px; }
.pipeline-col-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; font-size: 10px; font-weight: 700; }
.pipeline-col-head .nav-count { background: #fff; }
.pipeline-cards { display: grid; gap: 7px; min-height: 180px; }
.pipeline-card { padding: 10px; border: 1px solid #e4e9e5; border-radius: 9px; background: #fff; box-shadow: 0 2px 8px rgba(27,45,34,.04); cursor: grab; }
.pipeline-card strong { display: block; color: #35433a; font-size: 10px; }
.pipeline-card span { display: block; margin-top: 5px; color: #98a19b; font-size: 9px; }
.pipeline-card.is-dragging { opacity: .45; }
.drop-highlight { outline: 2px dashed #7eb893; outline-offset: -3px; background: #e7f4eb; }
.kanban-empty { padding: 10px; color: #9aa39e; text-align: center; font-size: 10px; }
.board-tip { color: #929b95; font-size: 10px; margin-top: 9px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.form-grid .span-2 { grid-column: span 2; }
.form-row { display: flex; gap: 10px; }
.form-row > * { flex: 1; }
.tabs { display: flex; gap: 5px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tab-button { border: 0; background: transparent; color: #87918a; border-bottom: 2px solid transparent; padding: 10px 12px; font-weight: 700; font-size: 11px; }
.tab-button.active { color: var(--green-dark); border-bottom-color: var(--green); }
.detail-grid { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(270px,.7fr); gap: 16px; }
.detail-meta { display: grid; grid-template-columns: repeat(2,1fr); gap: 11px; }
.detail-meta label { color: #929c95; display: block; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 5px; }
.detail-meta div { color: #435147; font-size: 11px; overflow-wrap: anywhere; }
.lead-title-row { display: flex; align-items: flex-start; gap: 12px; }
.lead-avatar { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 12px; color: #3e7753; background: #e9f4ed; font: 700 13px 'Manrope',sans-serif; }
.score-number { font: 700 30px 'Manrope',sans-serif; }
.score-bar { margin-top: 8px; height: 8px; border-radius: 8px; background: #edf1ee; overflow: hidden; }
.score-bar > span { display: block; height: 100%; background: #6fb58a; }
.score-criteria { display: grid; gap: 10px; }
.criteria-row { display: grid; grid-template-columns: minmax(140px,1fr) 80px 1.5fr; gap: 8px; align-items: center; padding-bottom: 8px; border-bottom: 1px solid #f0f2f0; }
.criteria-row:last-child { border-bottom: 0; }
.criteria-row > label { color: #58655d; font-weight: 600; font-size: 10px; }
.criteria-row .input { min-height: 32px; padding: 6px 8px; }
.criteria-row small { color: #99a29c; font-size: 9px; }
.source-list { display: grid; gap: 8px; }
.source-item { padding: 10px; background: #f8faf8; border: 1px solid #edf0ed; border-radius: 9px; }
.source-item strong { font-size: 10px; }
.source-item p { color: #66736b; margin: 5px 0 0; font-size: 10px; line-height: 1.5; }
.source-item a { color: var(--green); font-size: 9px; }
.task-row { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 12px 15px; border-bottom: 1px solid #f0f2f0; }
.task-row:last-child { border-bottom: 0; }
.task-check { width: 17px; height: 17px; accent-color: var(--green); cursor: pointer; }
.task-title { color: #334138; font-size: 11px; font-weight: 700; }
.task-sub { color: #909b93; font-size: 9px; margin-top: 4px; }
.task-done .task-title { text-decoration: line-through; color: #a4aca7; }
.template-preview { white-space: pre-wrap; min-height: 140px; padding: 15px; border: 1px solid var(--line); border-radius: 9px; color: #55645b; background: #fbfcfb; font-size: 11px; line-height: 1.65; }
.callout { padding: 12px 13px; border-radius: 9px; color: #6f684e; background: var(--amber-bg); font-size: 10px; line-height: 1.5; }
.callout.blue { color: #546a7a; background: var(--blue-bg); }
.callout.green { color: #44634d; background: var(--green-tint-2); }
.callout strong { font-weight: 700; }
.config-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 13px; }
.config-item { padding: 13px; border: 1px solid var(--line); border-radius: 10px; }
.config-item-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.config-item strong { font-size: 11px; }
.weight-list { display: grid; gap: 9px; }
.weight-row { display: grid; grid-template-columns: minmax(0,1fr) 72px 48px; gap: 8px; align-items: center; color: #69756e; font-size: 10px; }
.weight-total { display: flex; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--line); font-size: 10px; font-weight: 700; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(19,34,26,.42); backdrop-filter: blur(2px); }
.modal { width: min(660px,100%); max-height: min(90vh,850px); overflow: auto; background: #fff; border: 1px solid rgba(255,255,255,.6); border-radius: 15px; box-shadow: 0 20px 70px rgba(10,30,18,.24); }
.modal-wide { width: min(930px,100%); }
.modal-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 21px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.modal-head h2 { margin: 0; font: 700 17px 'Manrope', sans-serif; }
.modal-head p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.modal-body { padding: 19px 21px; }
.modal-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 13px 21px; border-top: 1px solid var(--line); background: #fbfcfb; }
.modal-foot-right { display: flex; gap: 8px; }
.toast-region { position: fixed; z-index: 200; right: 20px; bottom: 20px; display: grid; gap: 8px; }
.toast { max-width: min(360px, calc(100vw - 32px)); padding: 12px 14px; border: 1px solid #dbe8df; border-radius: 10px; color: #345b43; background: #f5fbf6; box-shadow: 0 8px 25px rgba(25,45,32,.12); font-size: 11px; line-height: 1.5; animation: toastIn .18s ease-out; }
.toast.error { color: #91433e; border-color: #f1d4d1; background: #fff6f5; }
@keyframes toastIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.loading-spinner { width: 14px; height: 14px; border: 2px solid #d6e8dc; border-top-color: var(--green); border-radius: 50%; display: inline-block; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.dark-theme { color-scheme: dark; --ink:#e7eee9; --muted:#a1ada5; --line:#2c3931; --paper:#202a24; --canvas:#171f1a; --green-tint:#293f32; --green-tint-2:#24372c; --shadow:none; }
.dark-theme .sidebar,.dark-theme .topbar,.dark-theme .card,.dark-theme .modal,.dark-theme .modal-head,.dark-theme .modal-foot,.dark-theme .btn,.dark-theme .icon-btn,.dark-theme .result-item,.dark-theme .pipeline-card { background:#202a24; }
.dark-theme .storage-card,.dark-theme .field-search input,.dark-theme .input,.dark-theme .select,.dark-theme .textarea,.dark-theme .template-preview { background:#1b241e; color:var(--ink); border-color:var(--line); }
.dark-theme td,.dark-theme .company-name,.dark-theme .section-title,.dark-theme h1,.dark-theme .result-title,.dark-theme .task-title,.dark-theme .modal-head h2 { color:var(--ink); }
.dark-theme .pipeline-col { background:#1b241e; border-color:var(--line); }
.dark-theme th,.dark-theme td { border-color:var(--line); }
.dark-theme .bar-track,.dark-theme .score-bar,.dark-theme .nav-count { background:#303c34; }
.dark-theme .table-empty,.dark-theme .activity-empty { color:var(--muted); }
.dark-theme .btn-primary { color:#fff; background:var(--green); border-color:var(--green); }

@media (max-width: 1180px) {
  .sidebar { width: 218px; flex-basis: 218px; }
  .grid-4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .search-criteria { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 860px) {
  .sidebar { width: 68px; flex-basis: 68px; padding: 17px 8px; }
  .brand { justify-content: center; padding: 0 0 23px; }
  .brand-text,.sidebar-label,.nav-link .nav-text,.nav-count,.storage-card,.user-details { display: none; }
  .nav-link { justify-content: center; padding: 0; }
  .nav-link svg { width: 19px; height: 19px; }
  .user-card { justify-content: center; padding: 12px 0 0; }
  .topbar { padding: 0 18px; }
  .connection { display: none; }
  .content { padding: 24px 18px 38px; }
  .grid-3 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .result-layout,.detail-grid { grid-template-columns: 1fr; }
  .result-map { height: 300px; }
}
@media (max-width: 600px) {
  .sidebar { display: none; }
  .topbar { height: 58px; padding: 0 13px; }
  .breadcrumbs { display:block; min-width:0; max-width:110px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:10px; }
  .topbar-actions { flex:1; min-width:0; justify-content:flex-end; }
  .global-search { display:none; }
  .mobile-nav { display:flex; gap:4px; overflow-x:auto; padding:7px 10px; border-bottom:1px solid var(--line); background:var(--paper); scrollbar-width:none; }
  .mobile-nav::-webkit-scrollbar { display:none; }
  .mobile-nav-link { flex:0 0 auto; display:grid; justify-items:center; gap:3px; min-width:48px; border:0; border-radius:8px; padding:5px 7px; color:var(--muted); background:transparent; font-size:8px; }
  .mobile-nav-link svg { width:16px; height:16px; }
  .mobile-nav-link.active { color:var(--green-dark); background:var(--green-tint); font-weight:700; }
  .content { padding: 21px 13px 32px; }
  .page-heading { display: block; margin-bottom: 18px; }
  .page-actions { margin-top: 13px; }
  .grid-4,.grid-3,.grid-2,.config-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 115px; }
  .search-criteria { grid-template-columns: 1fr; }
  .search-footer { display: grid; }
  .search-footer .btn { width: 100%; }
  .result-item { align-items: flex-start; }
  .result-actions { flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .criteria-row { grid-template-columns: 1fr 65px; }
  .criteria-row small { grid-column: 1 / -1; }
  .table-toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar-left,.toolbar-right { width: 100%; }
  .field-search,.field-search input { width: 100%; }
  .modal-backdrop { padding: 8px; align-items: end; }
  .modal { max-height: 94vh; border-radius: 15px 15px 0 0; }
}
