:root {
    --ink: #17211c;
    --muted: #68736d;
    --line: #dfe5e1;
    --line-strong: #cbd4ce;
    --paper: #ffffff;
    --canvas: #f2f5f2;
    --accent: #19744c;
    --accent-dark: #0e5a39;
    --accent-soft: #e9f5ee;
    --danger: #b42318;
    --shadow: 0 20px 60px rgba(21, 40, 29, .13);
    --radius: 14px;
    --row-height: 54px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--canvas);
    font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(25, 116, 76, .2); outline-offset: 2px; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 30; height: 72px; display: grid; grid-template-columns: 250px minmax(260px, 660px) 1fr; gap: 24px; align-items: center; padding: 0 28px; background: rgba(255, 255, 255, .94); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { display: block; width: 150px; height: 58px; object-fit: contain; object-position: left center; }
.brand > div:last-child { display: flex; flex-direction: column; line-height: 1.15; }
.brand strong { font-size: 16px; letter-spacing: -.02em; }
.brand span { color: var(--muted); font-size: 12px; margin-top: 3px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--ink); color: #fff; font: 800 18px/1 Georgia, serif; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.global-search { height: 42px; display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 6px; padding: 0 11px; border: 1px solid var(--line); border-radius: 11px; background: #f8faf8; transition: .2s ease; }
.global-search:focus-within { border-color: #81b89c; background: #fff; box-shadow: 0 0 0 3px rgba(25,116,76,.08); }
.global-search > span { color: var(--muted); font-size: 22px; transform: rotate(-20deg); }
.global-search input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 14px; }
kbd { min-width: 22px; padding: 2px 6px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-bottom-color: var(--line-strong); border-radius: 5px; font: 11px/1.4 ui-monospace, monospace; text-align: center; }
.top-actions, .page-actions, .control-group { display: flex; align-items: center; gap: 9px; }
.top-actions { justify-content: flex-end; position: relative; }
.button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 13px; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; font-size: 13px; font-weight: 700; transition: .15s ease; }
.button:hover { border-color: #abb8b0; background: #f8faf8; }
.button.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.button.primary:hover { background: var(--accent-dark); }
.button.danger-ghost { color: var(--danger); border-color: transparent; background: transparent; }
.button.wide { width: 100%; min-height: 44px; }
.avatar-button { width: 38px; height: 38px; border: 0; border-radius: 50%; background: #d9e9df; color: #155b3d; font-weight: 800; }
.sync-status { display: flex; align-items: center; gap: 7px; border: 0; background: transparent; color: var(--muted); font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #28a267; box-shadow: 0 0 0 4px rgba(40,162,103,.09); }
.sync-status.saving .status-dot { background: #d28b18; animation: pulse 1s infinite; }
.sync-status.error .status-dot { background: var(--danger); }
@keyframes pulse { 50% { opacity: .4; } }

.workspace { max-width: 1800px; margin: 0 auto; padding: 32px 28px 48px; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.eyebrow { margin: 0 0 5px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; letter-spacing: -.035em; }
h1 { margin-bottom: 5px; font-size: clamp(28px, 3vw, 42px); line-height: 1; }
h2 { margin-bottom: 6px; font-size: 25px; }
h3 { font-size: 16px; }
.muted { color: var(--muted); }
.small-copy { font-size: 13px; line-height: 1.5; }
.page-head p:last-child { margin: 0; }

.stat-strip { display: grid; grid-template-columns: repeat(3, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat-card { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.72); text-align: left; }
.stat-card span { color: var(--muted); font-size: 12px; font-weight: 700; }
.stat-card strong { font-size: 20px; }
.stat-card:hover, .stat-card.active { border-color: #99bda9; background: #fff; box-shadow: 0 6px 20px rgba(26,71,47,.05); }
.stat-card.active strong { color: var(--accent); }
.selection-stat { cursor: default; }

.control-bar { min-height: 58px; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 12px; margin-bottom: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.control-bar label:not(.edit-toggle) { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.control-bar select, .control-bar input { height: 34px; min-width: 150px; border: 1px solid var(--line); border-radius: 8px; background: #f9fbf9; padding: 0 9px; font-size: 13px; }
.text-button { border: 0; background: transparent; color: var(--accent); font-size: 12px; font-weight: 700; }
.edit-toggle { display: inline-flex; flex-direction: row; align-items: center; flex: 0 0 auto; gap: 9px; min-height: 34px; padding: 4px 10px 4px 7px; border: 1px solid var(--line); border-radius: 9px; background: #f8faf8; color: var(--ink); font-size: 12px; font-weight: 700; cursor: pointer; }
.edit-toggle input { appearance: none; flex: 0 0 36px; width: 36px; min-width: 36px; height: 20px; min-height: 20px; margin: 0; padding: 0; position: relative; border: 0; border-radius: 20px; background: #cfd7d1; cursor: pointer; transition: .2s; }
.edit-toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); transition: .2s; }
.edit-toggle input:checked { background: var(--accent); }
.edit-toggle input:checked::after { transform: translateX(16px); }
.edit-toggle:has(input:checked) { border-color: #9cc3ad; background: #edf7f1; }
.segmented { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: #f4f7f4; }
.segmented button { min-height: 28px; padding: 4px 9px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 800; }
.segmented button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(18,43,27,.1); }
.segmented.icon-only button { min-width: 31px; font-size: 16px; }

.selection-bar { position: sticky; top: 80px; z-index: 22; display: flex; flex-direction: column; align-items: stretch; gap: 8px; min-height: 52px; margin-bottom: 12px; padding: 7px 9px 7px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.96); box-shadow: 0 8px 24px rgba(18,43,27,.07); backdrop-filter: blur(10px); }
.selection-bar.has-selection { border-color: #9cc3ad; background: rgba(239,248,243,.97); }
.selection-toolbar { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.selection-summary, .selection-actions { display: flex; align-items: center; gap: 9px; }
.selection-summary strong { min-width: 88px; font-size: 13px; }
.selection-actions .button { min-height: 34px; padding: 6px 10px; font-size: 12px; }
.selection-bar button:disabled { cursor: not-allowed; opacity: .42; }
.selected-email-panel { display: grid; grid-template-columns: minmax(185px, auto) minmax(260px, 1fr); align-items: center; gap: 12px; padding: 8px 0 1px; border-top: 1px solid rgba(156,195,173,.55); }
.selected-email-head { display: flex; flex-direction: column; gap: 2px; }
.selected-email-head strong { font-size: 12px; }
.selected-email-head span { color: var(--muted); font-size: 11px; }
.selected-email-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: stretch; }
.selected-email-control textarea { width: 100%; min-height: 42px; max-height: 86px; resize: vertical; padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: #304039; font: 12px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; }
.selected-email-control textarea:focus { border-color: #81b89c; outline: 3px solid rgba(25,116,76,.12); }
.selected-email-control .button { min-width: 118px; }

.data-surface { min-height: 480px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 9px 30px rgba(18,43,27,.04); }
.tabulator { border: 0 !important; background: #fff !important; font-size: 13px; }
.tabulator .tabulator-header { border-bottom: 1px solid var(--line) !important; background: #f7f9f7 !important; color: #516059; font-size: 11px; font-weight: 800; letter-spacing: .025em; text-transform: uppercase; }
.tabulator .tabulator-header .tabulator-col { background: transparent !important; border-right: 1px solid #ebefec !important; }
.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { background: #edf2ee !important; }
.tabulator-row { height: var(--row-height) !important; min-height: var(--row-height) !important; box-sizing: border-box; border-bottom: 1px solid #edf1ee !important; background: #fff !important; }
.tabulator-row:nth-child(even) { background: #fafbfa !important; }
.tabulator-row:hover { background: #eef7f1 !important; }
.tabulator-row.is-selected { background: #e7f3eb !important; }
.tabulator-row .tabulator-cell { height: var(--row-height) !important; min-height: var(--row-height) !important; box-sizing: border-box; display: inline-flex; align-items: center; overflow: hidden; border-right: 1px solid #f0f3f1 !important; padding: 8px 10px; white-space: normal; }
.tabulator-row .tabulator-cell.tabulator-editing { background: #fffef0 !important; outline: 2px solid #e4bb4e; outline-offset: -2px; }
.row-selector, .selection-header-checkbox { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.tabulator .tabulator-footer { border-top: 1px solid var(--line) !important; background: #f7f9f7 !important; }
.tabulator .tabulator-footer .tabulator-page { border: 1px solid var(--line) !important; border-radius: 7px !important; background: #fff !important; }
.tabulator .tabulator-footer .tabulator-page.active { color: #fff !important; background: var(--accent) !important; }
.name-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; cursor: pointer; }
.name-cell strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.name-cell span { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.image-cell { width: 100%; height: 100%; display: grid; place-items: center; }
.image-cell img { width: min(calc(var(--row-height) - 14px), 72px); height: min(calc(var(--row-height) - 14px), 72px); object-fit: contain; border-radius: 7px; background: #fff; }
.image-cell.photo img { object-fit: cover; border-radius: 50%; }
.image-placeholder { width: min(calc(var(--row-height) - 14px), 50px); height: min(calc(var(--row-height) - 14px), 50px); display: grid; place-items: center; border-radius: 50%; background: #e8eeea; color: #69766e; font-size: 11px; font-weight: 800; }
.category-pill { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.category-pill::before { content: ""; width: 6px; height: 6px; flex: none; border-radius: 50%; background: currentColor; }
.email-link, .website-link { color: var(--accent-dark); text-decoration: none; }
.email-link:hover, .website-link:hover { text-decoration: underline; }
.source-chip { display: inline-block; max-width: 100%; overflow: hidden; color: #5d6962; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.density-small { --row-height: 20px; }
.density-small .tabulator { font-size: 11px; }
.density-small .tabulator-row .tabulator-cell { padding: 0 7px; line-height: 18px; white-space: nowrap; }
.density-small .image-cell img, .density-small .image-placeholder { width: 16px; height: 16px; border-radius: 4px; font-size: 7px; }
.density-small .name-cell { flex-direction: row; gap: 5px; }
.density-small .name-cell strong { font-size: 11px; }
.density-small .name-cell span { font-size: 10px; }
.density-small .category-pill { padding: 1px 6px; font-size: 9px; }
.density-large { --row-height: 130px; }
.density-large .tabulator-row .tabulator-cell { padding: 12px 14px; }
.density-large .image-cell img { width: 108px; height: 108px; border-radius: 12px; }
.density-large .image-cell.photo img { border-radius: 18px; }
.density-large .image-placeholder { width: 90px; height: 90px; border-radius: 18px; font-size: 22px; }
.density-large .name-cell strong { font-size: 15px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 13px; }
.contact-card { position: relative; min-height: 184px; display: flex; flex-direction: column; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 8px 28px rgba(22,52,33,.04); transition: .18s ease; }
.contact-card:hover { transform: translateY(-2px); border-color: #afc8b9; box-shadow: 0 14px 36px rgba(22,52,33,.08); }
.contact-card-head { display: flex; gap: 12px; align-items: center; }
.contact-card-photo { width: 56px; height: 56px; flex: none; object-fit: cover; border-radius: 15px; background: #e7ece9; }
.contact-card h3 { margin: 0 0 3px; font-size: 16px; }
.contact-card p { margin: 0; color: var(--muted); font-size: 12px; }
.contact-card-meta { display: grid; gap: 5px; font-size: 12px; }
.contact-card button { position: absolute; inset: 0; border: 0; border-radius: inherit; background: transparent; font-size: 0; }

.drawer { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.drawer.open { pointer-events: auto; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(14,27,19,.26); opacity: 0; transition: .2s; }
.drawer-panel { position: absolute; top: 0; right: 0; width: min(620px, 96vw); height: 100%; display: grid; grid-template-rows: auto 1fr auto; background: #fff; box-shadow: -24px 0 60px rgba(11,32,19,.16); transform: translateX(102%); transition: .28s cubic-bezier(.2,.8,.2,1); }
.drawer.open .drawer-backdrop { opacity: 1; }
.drawer.open .drawer-panel { transform: translateX(0); }
.drawer-head, .drawer-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.drawer-footer { border-top: 1px solid var(--line); border-bottom: 0; }
.drawer-head h2 { margin: 0; }
.drawer-content { overflow-y: auto; padding: 24px; }
.contact-hero { display: grid; grid-template-columns: 100px 1fr; gap: 18px; align-items: center; margin-bottom: 24px; }
.contact-hero-media { width: 100px; height: 100px; display: grid; place-items: center; border-radius: 22px; overflow: hidden; background: #edf2ee; }
.contact-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.contact-hero-media.logo img { object-fit: contain; padding: 10px; background: #fff; }
.contact-hero h3 { margin: 0 0 5px; font-size: 23px; }
.contact-hero p { margin: 0; color: var(--muted); }
.detail-section { margin: 0 0 25px; }
.detail-section h3 { padding-bottom: 9px; margin-bottom: 12px; border-bottom: 1px solid var(--line); color: #4b5951; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-grid .span-2 { grid-column: span 2; }
label { display: flex; flex-direction: column; gap: 6px; color: #58655e; font-size: 12px; font-weight: 700; }
label input, label select, label textarea { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfb; font-size: 14px; font-weight: 500; }
label textarea { resize: vertical; }
.check-row { display: flex; flex-direction: row; align-items: center; gap: 9px; min-height: 40px; }
.check-row input { width: 18px; min-height: 18px; }
.spacer { flex: 1; }
.icon-button { width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; font-size: 25px; line-height: 1; }
.icon-button:hover { background: #eef2ef; }

.modal { width: min(620px, calc(100vw - 28px)); max-height: calc(100vh - 40px); padding: 0; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.modal::backdrop { background: rgba(13,31,20,.35); backdrop-filter: blur(3px); }
.modal > form > header, .modal > form > footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 19px 22px; border-bottom: 1px solid var(--line); }
.modal > form > footer { justify-content: flex-end; border-top: 1px solid var(--line); border-bottom: 0; }
.modal header h2 { margin: 0; }
.modal-body { overflow-y: auto; max-height: calc(100vh - 190px); padding: 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .span-2 { grid-column: span 2; }
.wide-modal { width: min(900px, calc(100vw - 28px)); }
.compact-modal { width: min(500px, calc(100vw - 28px)); }
.columns-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; max-height: 430px; overflow-y: auto; padding-right: 5px; }
.checklist label { flex-direction: row; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfa; color: var(--ink); font-size: 12px; }
.checklist input { width: 16px; min-height: 16px; }
.add-field-card { padding: 18px; border-radius: 12px; background: #f3f7f4; }
.add-field-card label { margin-bottom: 12px; }
.drop-zone { min-height: 190px; align-items: center; justify-content: center; gap: 8px; border: 2px dashed #a9b9af; border-radius: 14px; background: #f7faf8; text-align: center; cursor: pointer; }
.drop-zone:hover, .drop-zone.dragging { border-color: var(--accent); background: var(--accent-soft); }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-zone strong { font-size: 17px; color: var(--ink); }
.drop-zone span { font-weight: 500; }
.inline-notice { padding: 11px 13px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-dark); font-size: 13px; }
.export-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.export-card { min-height: 120px; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 4px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #f9fbf9; text-align: left; }
.export-card strong { font-size: 22px; }
.export-card span { color: var(--muted); font-size: 12px; }
.export-card:hover { border-color: var(--accent); background: var(--accent-soft); }

.login-gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 25% 20%, #e8f2ec 0, transparent 32%), var(--canvas); }
.login-card { width: min(410px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.login-brand-logo { width: 220px; height: auto; margin: 0 auto 26px; object-position: center; }
.login-card h1 { margin-bottom: 9px; font-size: 31px; }
.login-card label { margin-top: 15px; }
.login-card .button { margin-top: 20px; }
.form-error { padding: 10px 12px; border-radius: 8px; background: #fff0ef; color: var(--danger); font-size: 13px; }
.popover { position: absolute; top: 47px; right: 0; z-index: 80; min-width: 180px; padding: 7px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 14px 40px rgba(15,37,22,.14); }
.menu { display: grid; gap: 4px; }
.menu-label { padding: 8px 9px; color: var(--muted); font-size: 12px; }
.menu button { padding: 9px; border: 0; border-radius: 7px; background: transparent; text-align: left; font-size: 13px; }
.menu button:hover { background: #f1f5f2; }
.image-preview { position: fixed; z-index: 100; width: 260px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 18px 55px rgba(12,31,19,.23); pointer-events: none; }
.image-preview img { display: block; width: 100%; max-height: 280px; object-fit: contain; border-radius: 9px; background: #eef2ef; }
.image-preview div { padding: 7px 4px 1px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: 120; display: grid; gap: 8px; }
.toast { min-width: 260px; max-width: 390px; padding: 12px 14px; border: 1px solid #bfd8c9; border-radius: 10px; background: #effaf3; color: #195c39; box-shadow: 0 10px 30px rgba(14,45,25,.13); font-size: 13px; animation: toast-in .2s ease; }
.toast.error { border-color: #edc4c0; background: #fff2f1; color: #8f231a; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }
.loading-screen { position: fixed; inset: 0; z-index: 200; display: grid; place-content: center; justify-items: center; gap: 13px; background: #f3f6f3; color: var(--muted); font-size: 13px; }
.spinner { width: 30px; height: 30px; border: 3px solid #dbe5de; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1050px) {
    .topbar { grid-template-columns: auto minmax(220px, 1fr) auto; padding: 0 18px; }
    .brand-logo { width: 112px; }
    .brand span, .sync-status span:last-child { display: none; }
    .control-bar { align-items: flex-start; flex-direction: column; }
    .view-controls { width: 100%; justify-content: flex-end; }
}

@media (max-width: 720px) {
    .topbar { height: auto; grid-template-columns: 1fr auto; gap: 10px; padding: 12px 14px; }
    .global-search { grid-column: 1 / -1; grid-row: 2; }
    .workspace { padding: 23px 14px 36px; }
    .page-head { align-items: flex-start; flex-direction: column; }
    .page-actions { width: 100%; overflow-x: auto; }
    .stat-strip { grid-template-columns: 1fr 1fr; }
    .filters, .view-controls { align-items: stretch; flex-wrap: wrap; }
    .selection-bar { top: 126px; }
    .selection-toolbar { align-items: stretch; flex-direction: column; }
    .selection-summary, .selection-actions { flex-wrap: wrap; }
    .selected-email-panel { grid-template-columns: 1fr; }
    .selected-email-control { grid-template-columns: 1fr; }
    .control-bar label:not(.edit-toggle) { flex: 1 1 160px; align-items: stretch; flex-direction: column; }
    .control-bar select, .control-bar input { width: 100%; }
    .control-bar .edit-toggle input { width: 36px; min-width: 36px; }
    .columns-layout, .form-grid, .detail-grid { grid-template-columns: 1fr; }
    .form-grid .span-2, .detail-grid .span-2 { grid-column: span 1; }
    .checklist { grid-template-columns: 1fr; }
    .contact-hero { grid-template-columns: 76px 1fr; }
    .contact-hero-media { width: 76px; height: 76px; border-radius: 16px; }
    .drawer-head, .drawer-content, .drawer-footer { padding-left: 17px; padding-right: 17px; }
    .export-options { grid-template-columns: 1fr; }
}
