:root {
  --ink: #181a17;
  --paper: #f2f1ea;
  --white: #ffffff;
  --line: #d8d8cf;
  --muted: #6e7169;
  --lime: #d8ff3e;
  --lime-deep: #bce512;
  --red: #d9382c;
  --blue: #315cf4;
  --radius: 2px;
  --shadow: 0 18px 50px rgba(22, 26, 18, 0.08);
}

* { box-sizing: border-box; }
html { min-height: 100%; color-scheme: light; }
body { margin: 0; min-height: 100%; background: var(--paper); color: var(--ink); font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
::selection { background: var(--lime); color: var(--ink); }

.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand img { width: 42px; height: 42px; object-fit: contain; border-radius: 6px; background: #ffffff; padding: 2px; }
.brand strong { display: flex; flex-direction: column; font-size: 19px; line-height: .85; letter-spacing: -.04em; }
.brand small { margin-top: 7px; font-size: 8px; letter-spacing: .18em; font-weight: 700; }
.brand-light { color: var(--white); }
.brand-light img { box-shadow: 0 0 0 1px rgba(255,255,255,.18); }
.eyebrow { margin: 0 0 12px; font-size: 10px; line-height: 1; font-weight: 800; letter-spacing: .2em; color: #555951; }
.eyebrow.light { color: var(--lime); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

.guest-body { background: var(--ink); }
.guest-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, .95fr) minmax(500px, 1.05fr); }
.brand-panel { position: relative; min-height: 100vh; padding: 46px 7vw 42px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; background: var(--ink); color: var(--white); }
.brand-panel::before { content: ""; position: absolute; width: 42vw; height: 42vw; right: -21vw; top: 16vh; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; box-shadow: 0 0 0 5vw rgba(255,255,255,.025), 0 0 0 10vw rgba(255,255,255,.02); }
.brand-panel::after { content: "DG"; position: absolute; right: -1.4vw; bottom: -8vh; font-size: 32vw; line-height: .8; font-weight: 900; letter-spacing: -.12em; color: rgba(216,255,62,.045); }
.brand-copy { position: relative; z-index: 1; max-width: 620px; }
.brand-copy h1 { max-width: 650px; margin: 0 0 24px; font-size: clamp(52px, 6vw, 98px); line-height: .85; letter-spacing: -.075em; font-weight: 800; }
.brand-copy > p:last-child { max-width: 500px; margin: 0; font-size: 17px; line-height: 1.55; color: #bfc1b9; }
.brand-meta { position: relative; z-index: 1; display: flex; justify-content: space-between; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.18); font-size: 9px; font-weight: 700; letter-spacing: .18em; color: #a7aaa1; }
.auth-panel { min-height: 100vh; padding: 50px 8vw; display: flex; align-items: center; justify-content: center; background: var(--paper); }
.auth-card { width: min(440px, 100%); }
.auth-card.compact { text-align: left; }
.auth-card h2 { margin: 0 0 12px; font-size: clamp(40px, 5vw, 67px); line-height: .92; letter-spacing: -.065em; }
.auth-card > p { margin: 0 0 34px; }

.stack-form { display: grid; gap: 20px; }
label { display: grid; gap: 8px; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
label .optional { color: var(--muted); font-size: 8px; }
label small, .form-note { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; font-weight: 400; letter-spacing: 0; text-transform: none; }
input, select, textarea { width: 100%; min-height: 46px; border: 1px solid #c7c8c0; border-radius: var(--radius); padding: 11px 13px; background: var(--white); color: var(--ink); outline: none; transition: border-color .18s, box-shadow .18s; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(24,26,23,.08); }
input:disabled { background: #e6e5dd; color: #555; }
input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; accent-color: var(--ink); }
.field-error { color: var(--red); }

.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 18px; border: 1px solid transparent; border-radius: var(--radius); padding: 11px 18px; font-size: 11px; font-weight: 800; line-height: 1; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; cursor: pointer; transition: transform .15s, background .15s, color .15s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .55; transform: none; }
.button.primary { background: var(--ink); color: var(--white); }
.button.primary:hover { background: #30332e; }
.button.secondary { border-color: #b8bab1; background: transparent; color: var(--ink); }
.button.secondary:hover { border-color: var(--ink); background: var(--white); }
.button.light { background: var(--white); color: var(--ink); }
.button.danger { border-color: var(--red); background: transparent; color: var(--red); }
.button.wide { width: 100%; justify-content: space-between; min-height: 54px; margin-top: 6px; }
.button.small { min-height: 38px; padding: 9px 13px; font-size: 9px; }
.button.tiny { min-height: 33px; padding: 8px 11px; font-size: 9px; background: var(--ink); color: var(--white); }
.text-button { padding: 0; border: 0; background: none; color: var(--ink); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-decoration: none; text-transform: uppercase; cursor: pointer; }
.danger-text { color: var(--red); }
.icon-button { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: transparent; cursor: pointer; }
.loading-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(18,20,17,.82); backdrop-filter: blur(8px); }
.loading-overlay[hidden] { display: none; }
.loading-dialog { width: min(420px, 100%); padding: 42px; background: var(--white); text-align: center; box-shadow: var(--shadow); }
.loading-dialog h3 { margin: 5px 0 10px; font-size: 32px; letter-spacing: -.04em; }
.loading-dialog p:last-child { color: var(--muted); }
.spinner { width: 42px; height: 42px; display: inline-block; margin: 0 0 24px; border: 3px solid #dfe0d8; border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 20px 22px; display: flex; flex-direction: column; background: var(--white); border-right: 1px solid var(--line); z-index: 40; }
.sidebar-head { display: flex; justify-content: space-between; align-items: center; padding: 0 4px 36px; }
.sidebar-label { margin: 0 12px 12px; color: #85887f; font-size: 9px; font-weight: 800; letter-spacing: .18em; }
.main-nav { display: grid; gap: 3px; }
.main-nav a { min-height: 43px; padding: 0 12px; display: grid; grid-template-columns: 27px 1fr auto; align-items: center; color: #5e615a; font-size: 12px; font-weight: 700; text-decoration: none; }
.main-nav a > span { font-size: 8px; letter-spacing: .1em; color: #9a9c94; }
.main-nav a b { min-width: 21px; height: 21px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--lime); color: var(--ink); font-size: 9px; }
.main-nav a:hover { background: #f4f4ee; color: var(--ink); }
.main-nav a.active { background: var(--ink); color: var(--white); }
.main-nav a.active > span { color: var(--lime); }
.sidebar-foot { margin-top: auto; padding: 20px 4px 0; border-top: 1px solid var(--line); }
.user-stamp { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.user-stamp > span { width: 36px; height: 36px; display: grid; place-items: center; background: var(--lime); font-size: 10px; font-weight: 900; }
.user-stamp div { min-width: 0; }
.user-stamp strong, .user-stamp small { display: block; overflow: hidden; text-overflow: ellipsis; }
.user-stamp strong { font-size: 12px; white-space: nowrap; }
.user-stamp small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.page-shell { min-width: 0; }
.topbar { min-height: 64px; padding: 0 4.5vw; display: flex; justify-content: flex-end; align-items: center; gap: 28px; border-bottom: 1px solid var(--line); color: #73766e; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.live-mark { display: inline-flex; align-items: center; gap: 8px; }
.live-mark i { width: 7px; height: 7px; border-radius: 50%; background: #61bd28; box-shadow: 0 0 0 3px rgba(97,189,40,.14); }
.menu-button, .close-menu { display: none; }
.page-content { width: min(1600px, 100%); margin: 0 auto; padding: 48px 4.5vw 80px; }
.screen-watermark { position: fixed; right: 18px; bottom: 12px; z-index: 90; display: block; padding: 5px 8px; border: 1px solid rgba(24,26,23,.12); background: rgba(242,241,234,.62); color: rgba(24,26,23,.34); font-size: 8px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; pointer-events: none; user-select: none; }

.page-header { margin-bottom: 34px; display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.page-header.narrow { max-width: 760px; }
.page-header h1 { margin: 0; font-size: clamp(45px, 5.2vw, 78px); line-height: .88; letter-spacing: -.07em; }
.page-header h1 + p, .page-header div > p:last-child { max-width: 620px; margin: 18px 0 0; color: var(--muted); }
.header-code { padding: 12px; border: 1px solid var(--ink); font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.card { margin-bottom: 22px; padding: clamp(20px, 2.7vw, 40px); background: var(--white); border: 1px solid #dedfd7; box-shadow: 0 6px 22px rgba(30,34,25,.025); }
.narrow-card { max-width: 720px; }
.dark-card { background: var(--ink); color: var(--white); border-color: var(--ink); }
.dark-card h2 { margin: 4px 0 20px; font-size: 44px; line-height: .92; letter-spacing: -.055em; }
.dark-card > p:not(.eyebrow) { color: #b7bab1; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.section-head h2 { margin: 0; font-size: clamp(25px, 2.5vw, 38px); line-height: 1; letter-spacing: -.045em; }
.section-head p:last-child { margin: 9px 0 0; color: var(--muted); }
.section-head a { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 22px; }
.metric-grid.five { grid-template-columns: repeat(5, minmax(0,1fr)); }
.metric-grid.six { grid-template-columns: repeat(6, minmax(0,1fr)); }
.metric { min-height: 168px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; background: var(--white); border: 1px solid var(--line); }
.metric.lime { background: var(--lime); border-color: var(--lime); }
.metric span { font-size: 9px; font-weight: 800; letter-spacing: .12em; color: var(--muted); }
.metric strong { margin-top: auto; font-size: clamp(38px, 4vw, 62px); line-height: 1; letter-spacing: -.065em; }
.metric p { margin: 7px 0 0; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.split-grid { display: grid; grid-template-columns: 1.5fr .8fr; gap: 22px; }
.timeline { display: grid; }
.timeline-row { min-height: 64px; display: grid; grid-template-columns: 18px 1fr; align-items: center; gap: 8px; border-top: 1px solid var(--line); }
.timeline-row i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }
.timeline-row strong { font-size: 12px; text-transform: uppercase; }
.timeline-row p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.rule-line { min-height: 50px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #3c3f39; font-size: 9px; letter-spacing: .12em; }
.rule-line b { color: var(--lime); }

.alert { margin-bottom: 20px; padding: 14px 17px; border-left: 4px solid; background: var(--white); font-size: 13px; box-shadow: 0 5px 22px rgba(0,0,0,.05); }
.alert.success { border-color: #68ad29; }
.alert.error { border-color: var(--red); }
.form-card { padding: 0; }
.form-section { display: grid; grid-template-columns: 80px 1fr; border-bottom: 1px solid var(--line); }
.form-section:last-child { border-bottom: 0; }
.form-section-index { padding: 40px 24px; border-right: 1px solid var(--line); color: #91948b; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.form-section-content { padding: clamp(26px, 3.2vw, 48px); }
.form-grid { display: grid; gap: 23px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.secure-chip, .privacy-label { padding: 8px 10px; background: #e7e8e0; color: #5f625a; font-size: 8px; font-weight: 900; letter-spacing: .13em; white-space: nowrap; }
.location-row { position: relative; display: grid; grid-template-columns: 1fr 2fr .7fr .7fr .8fr 36px; align-items: end; gap: 10px; margin-top: 13px; padding: 16px; background: #f6f6f1; border: 1px solid #e1e2da; }
.location-picker-bar { grid-column: 1 / -1; margin: -16px -16px 8px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 18px; background: #ebebe4; border-bottom: 1px solid #d5d6ce; }
.location-picker-bar strong, .location-picker-bar small, .location-status { display: block; }
.location-picker-bar strong { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.location-picker-bar small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.location-status { min-height: 15px; margin-top: 5px; color: var(--muted); font-size: 11px; }
.location-status.ok { color: #3a7a13; }
.location-status.bad { color: var(--red); }
.location-status.working { color: #655100; }
.remove-location { margin-bottom: 5px; color: var(--red); }
.map-dialog { width: min(1180px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); margin: auto; padding: 0; border: 0; background: var(--white); color: var(--ink); box-shadow: 0 28px 90px rgba(0,0,0,.35); overflow: auto; }
.map-dialog::backdrop { background: rgba(16,18,15,.78); backdrop-filter: blur(5px); }
.map-dialog-shell { padding: clamp(20px, 3vw, 38px); }
.map-dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 24px; }
.map-dialog-head h2 { margin: 0; font-size: clamp(30px, 4vw, 52px); line-height: .95; letter-spacing: -.055em; }
.map-dialog-head p:last-child { margin: 11px 0 0; color: var(--muted); }
.map-search { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; padding: 15px; background: var(--paper); border: 1px solid var(--line); }
.map-provider-note { margin: 9px 0 18px; color: var(--muted); font-size: 10px; }
.map-dialog-grid { min-height: 480px; display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); border: 1px solid var(--line); }
.map-search-results { max-height: 520px; overflow: auto; background: #f7f7f2; border-right: 1px solid var(--line); }
.map-result { width: 100%; padding: 16px; display: grid; grid-template-columns: 30px 1fr; gap: 10px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.map-result:hover, .map-result.selected { background: var(--white); }
.map-result.selected { box-shadow: inset 4px 0 0 var(--lime-deep); }
.map-result > span { padding-top: 2px; color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .1em; }
.map-result strong, .map-result small { display: block; }
.map-result strong { font-size: 12px; line-height: 1.45; }
.map-result small { margin-top: 5px; color: var(--muted); font-size: 9px; text-transform: capitalize; }
.map-empty { min-height: 150px; padding: 28px; display: flex; flex-direction: column; justify-content: center; color: var(--muted); text-align: center; }
.map-empty strong { color: var(--ink); }
.map-empty p { margin: 6px 0 0; font-size: 11px; }
.error-text { color: var(--red); }
.map-canvas-wrap { position: relative; min-width: 0; }
.location-map { width: 100%; height: 100%; min-height: 480px; background: #e8e8e0; }
.map-coordinate-strip { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 600; padding: 10px 13px; display: flex; justify-content: space-between; gap: 18px; background: rgba(24,26,23,.9); color: var(--white); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; pointer-events: none; }
.map-coordinate-strip strong { color: var(--lime); text-align: right; }
.map-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 20px; }
.small-spinner { width: 26px; height: 26px; margin-bottom: 12px; }
.bulk-selection-bar { margin-bottom: 10px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #f0f1e9; border: 1px solid var(--line); }
.bulk-selection-bar strong, .bulk-selection-bar span { display: block; }
.bulk-selection-bar strong { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.bulk-selection-bar span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.otp-row { max-width: 620px; display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 20px; margin: 24px 0 8px; }
.inline-status { min-height: 18px; color: var(--muted); font-size: 12px; }
.inline-status.ok { color: #3a7a13; }
.inline-status.bad { color: var(--red); }
.dev-note { display: inline-block; padding: 9px 11px; background: #fff2b7; font-size: 12px; }
.form-actions { padding: 24px 0 0; display: flex; align-items: center; justify-content: flex-end; gap: 20px; }
.credential-card { margin-bottom: 22px; padding: 28px 34px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 30px; background: var(--ink); color: var(--white); }
.credential-card h2 { margin: 0 0 6px; font-size: 34px; letter-spacing: -.045em; }
.credential-card p { margin: 0; color: #bfc1ba; }
.credential-values { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 12px; }
.credential-values label { color: #aeb1a8; }
.credential-values code { padding: 12px; background: #2c2f29; color: var(--lime); font-size: 15px; letter-spacing: 0; text-transform: none; user-select: all; }
.security-callout { margin-bottom: 22px; padding: 18px 22px; display: flex; gap: 22px; align-items: center; background: #e6e7df; border-left: 5px solid var(--ink); }
.security-callout.strong { background: #e4f4a5; border-left-color: #84a900; }
.security-callout p { margin: 0; color: var(--muted); }
.danger-zone { border-top: 4px solid var(--red); }
.action-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.search-bar { display: grid; grid-template-columns: minmax(220px, 1fr) auto; align-items: end; gap: 12px; margin-bottom: 24px; }
.search-results { display: grid; gap: 8px; }
.search-results article { padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 20px; background: #f5f5ef; border: 1px solid var(--line); }
.search-results p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.inline-upload { display: flex; align-items: center; gap: 8px; }
.file-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-picker span { min-height: 38px; padding: 9px 13px; display: grid; place-items: center; border: 1px dashed #9b9d95; background: var(--white); cursor: pointer; }
.workflow-step { display: flex; align-items: center; gap: 17px; margin-bottom: 22px; }
.workflow-step > span { width: 42px; height: 42px; display: grid; place-items: center; background: var(--lime); font-weight: 900; }
.workflow-step h2 { margin: 0; font-size: 28px; letter-spacing: -.04em; }
.sticky-actions { position: sticky; bottom: 0; z-index: 4; min-height: 72px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: rgba(255,255,255,.96); border-top: 1px solid var(--line); backdrop-filter: blur(8px); }
.identity-strip { margin-bottom: 12px; padding: 15px 18px; display: flex; justify-content: space-between; align-items: center; background: var(--ink); color: var(--white); }
.identity-strip > div { display: flex; align-items: center; gap: 12px; }
.identity-strip > div > span { width: 43px; height: 43px; display: grid; place-items: center; background: var(--lime); color: var(--ink); font-size: 10px; font-weight: 900; }
.identity-strip p { margin: 2px 0 0; color: #adb0a7; font-size: 11px; }

.table-wrap { width: 100%; overflow: auto; border: 1px solid var(--line); }
.table-wrap.tall { max-height: 66vh; }
table { width: 100%; border-collapse: collapse; background: var(--white); font-size: 12px; }
th { position: sticky; top: 0; z-index: 2; padding: 13px 14px; background: #ededE6; color: #62655d; border-bottom: 1px solid #cfd0c8; text-align: left; font-size: 8px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
td { max-width: 280px; padding: 14px; border-bottom: 1px solid #e6e6df; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafaf6; }
td strong, td small { display: block; }
td small { margin-top: 5px; color: var(--muted); font-size: 10px; }
td code { font-size: 10px; font-weight: 700; white-space: nowrap; }
.dense-table { min-width: 1600px; }
.dense-table td { max-width: 230px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty-cell { padding: 50px; color: var(--muted); text-align: center; }
.row-link { font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.notes-cell, .json-cell { min-width: 220px; white-space: normal; word-break: break-word; }
.url-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status, .lead-status { display: inline-flex; min-height: 25px; align-items: center; padding: 5px 8px; border-radius: 20px; font-size: 8px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.status.large { padding: 8px 13px; }
.status-active { background: #daf2c8; color: #2d6511; }
.status-revoked, .status-deleted { background: #f8d3cf; color: #9b1e16; }
.s-new { background: #d8e3ff; color: #2646a8; }
.s-contacted { background: #e4e4df; color: #565950; }
.s-followup { background: #fff1aa; color: #806500; }
.s-accepted { background: #d8f5c3; color: #326b11; }
.s-rejected { background: #f8d3cf; color: #9b1e16; }
.new-row td { background: #fbffe9; }
.new-badge { display: inline-block; margin-top: 7px; padding: 4px 6px; background: var(--lime); font-size: 7px; font-weight: 900; letter-spacing: .08em; }
.action-cell { min-width: 300px; }
.lead-update-form { display: grid; grid-template-columns: 120px minmax(160px,1fr) auto; gap: 7px; }
.lead-update-form.vertical { grid-template-columns: 1fr; min-width: 210px; }
.lead-update-form input, .lead-update-form select, .lead-update-form textarea { min-height: 34px; padding: 7px 9px; font-size: 11px; }
.lead-filter-bar { margin-bottom: 0; padding: 16px; display: grid; grid-template-columns: minmax(220px, 1.7fr) repeat(4, minmax(125px, .75fr)) auto; align-items: end; gap: 10px; background: #f3f3ed; border: 1px solid var(--line); }
.lead-filter-bar label { min-width: 0; }
.lead-filter-bar input, .lead-filter-bar select { min-height: 40px; padding: 8px 10px; font-size: 11px; }
.lead-filter-actions { min-height: 40px; display: flex; align-items: center; gap: 12px; }
.filter-summary { min-height: 43px; padding: 0 14px; display: flex; justify-content: space-between; align-items: center; gap: 14px; border: 1px solid var(--line); border-top: 0; color: var(--muted); font-size: 10px; letter-spacing: .04em; }
.filter-summary strong { color: var(--ink); }
.filter-active { padding: 5px 7px; background: var(--lime); color: var(--ink); font-size: 8px; font-weight: 900; letter-spacing: .1em; }
.pagination { min-height: 64px; padding-top: 18px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; }
.pagination > a:last-child, .pagination > span:last-child { justify-self: end; }
.pagination a, .pagination span { min-width: 34px; min-height: 34px; padding: 8px 10px; display: inline-grid; place-items: center; color: var(--ink); font-size: 10px; font-weight: 800; text-decoration: none; }
.pagination a { border: 1px solid var(--line); background: var(--white); }
.pagination a:hover, .pagination a.active { background: var(--ink); border-color: var(--ink); color: var(--white); }
.pagination .disabled { color: #a5a79f; }
.pagination > div { display: flex; align-items: center; gap: 4px; }
.privacy-label { align-self: flex-start; }
.reveal-button { background: var(--lime); color: var(--ink); border-color: var(--lime-deep); }
.revealed-row td { background: #f6ffcf !important; }
.revealed-row .secret-cell { color: #17220e; font-weight: 900; user-select: text; }
.secret-cell { min-width: 140px; color: #8e9188; letter-spacing: .08em; user-select: none; }
.phone-cell { min-width: 180px; }
.phone-number-mask { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 13px; font-weight: 700; letter-spacing: .05em; min-height: 18px; }
.lead-mobile-actions { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; }
.action-btn-call, .action-btn-copy { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 32px; padding: 5px 9px; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; border-radius: var(--radius); text-decoration: none; cursor: pointer; transition: all .15s ease; border: 1px solid transparent; }
.action-btn-call { background: var(--ink); color: var(--lime); border-color: var(--ink); }
.action-btn-call:hover, .action-btn-call:active { background: #30332e; color: var(--white); }
.action-btn-copy { background: var(--white); color: var(--ink); border-color: var(--line); }
.action-btn-copy:hover, .action-btn-copy:active { border-color: var(--ink); background: #f4f4ee; }
.action-btn-call[aria-disabled="true"], .action-btn-call:disabled,
.action-btn-copy[aria-disabled="true"], .action-btn-copy:disabled { opacity: .4; pointer-events: none !important; cursor: not-allowed !important; filter: grayscale(1); }
.action-icon { flex-shrink: 0; }
.btn-copied { background: #d8f5c3 !important; color: #1e5a09 !important; border-color: #6bbe3e !important; }
.locked-label { display: inline-block; padding: 7px 9px; background: #e7e7e1; color: #777a72; font-size: 8px; font-weight: 900; letter-spacing: .1em; }
.reveal-legend { display: flex; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--ink); font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.reveal-legend i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime-deep); }

.notification-list { display: grid; gap: 10px; }
.notification-card { padding: 24px 28px; display: grid; grid-template-columns: 44px 1fr; gap: 20px; background: var(--white); border: 1px solid var(--line); }
.notification-card.unread { border-left: 5px solid var(--lime-deep); }
.notice-icon { width: 44px; height: 44px; display: grid; place-items: center; background: var(--ink); color: var(--lime); font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.notice-meta { display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.notification-card h2 { margin: 7px 0 5px; font-size: 19px; letter-spacing: -.025em; }
.notification-card p { margin: 0; color: #575a53; }
.empty, .empty-state { color: var(--muted); }
.empty-state { padding-block: 50px; text-align: center; }
.empty-state strong { color: var(--ink); font-size: 24px; }
.support-rules { margin: 30px 0; padding: 0; list-style: none; border-top: 1px solid #3f423c; }
.support-rules li { min-height: 58px; display: flex; align-items: center; gap: 18px; border-bottom: 1px solid #3f423c; font-weight: 700; }
.support-rules span { color: var(--lime); font-size: 9px; letter-spacing: .1em; }

.legal-footer { display: flex; justify-content: center; gap: 18px; padding: 14px 20px 24px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.legal-footer a { color: inherit; }
.guest-body > .legal-footer { background: var(--paper); }
.legal-card { width: min(760px, 100%); padding: 40px; background: var(--white); border: 1px solid var(--line); box-shadow: 9px 9px 0 var(--ink); }
.legal-card h1 { margin: 5px 0; font-size: clamp(38px, 5vw, 64px); letter-spacing: -.055em; }
.legal-card h2 { margin: 30px 0 8px; font-size: 19px; }
.legal-card p { color: #4e514a; line-height: 1.7; }
.legal-card a { color: var(--blue); }
.legal-updated { margin-top: 0; color: var(--muted) !important; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.legal-caution { padding: 16px; background: #fff7d8; border-left: 4px solid #d29a00; color: var(--ink) !important; font-weight: 700; }

@media (max-width: 1180px) {
  .metric-grid.six { grid-template-columns: repeat(3, 1fr); }
  .location-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .location-row .remove-location { position: absolute; right: 10px; top: 10px; }
  .credential-card { grid-template-columns: 1fr; }
  .credential-values { grid-template-columns: 1fr 1fr; }
  .map-dialog-grid { grid-template-columns: 290px minmax(0, 1fr); }
  .lead-filter-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lead-search-field { grid-column: span 2; }
}

@media (max-width: 920px) {
  .guest-shell { grid-template-columns: 1fr; }
  .brand-panel { min-height: 44vh; padding: 30px; }
  .brand-copy h1 { font-size: 56px; }
  .auth-panel { min-height: 56vh; padding: 55px 28px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: min(310px, 88vw); transform: translateX(-105%); transition: transform .22s ease; box-shadow: 18px 0 50px rgba(0,0,0,.16); }
  .sidebar.open { transform: translateX(0); }
  .menu-button, .close-menu { display: inline-grid; }
  .topbar { justify-content: space-between; }
  .metric-grid, .metric-grid.five { grid-template-columns: repeat(2, 1fr); }
  .split-grid { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  .page-content { padding: 30px 16px 60px; }
  .topbar { padding: 0 16px; }
  .topbar > span:last-child { display: none; }
  .page-header { align-items: flex-start; flex-direction: column; }
  .page-header h1 { font-size: 47px; }
  .metric-grid, .metric-grid.five, .metric-grid.six { grid-template-columns: 1fr 1fr; }
  .metric { min-height: 135px; }
  .form-section { grid-template-columns: 1fr; }
  .form-section-index { padding: 17px 22px; border-right: 0; border-bottom: 1px solid var(--line); }
  .form-grid.two, .location-row, .otp-row { grid-template-columns: 1fr; }
  .location-picker-bar { align-items: stretch; flex-direction: column; }
  .map-search, .map-dialog-grid { grid-template-columns: 1fr; }
  .map-search-results { max-height: 260px; border-right: 0; border-bottom: 1px solid var(--line); }
  .location-map { min-height: 360px; }
  .bulk-selection-bar { align-items: stretch; flex-direction: column; }
  .lead-filter-bar { grid-template-columns: 1fr 1fr; }
  .lead-search-field, .lead-filter-actions { grid-column: 1 / -1; }
  .filter-summary { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 10px; }
  .pagination { grid-template-columns: 1fr 1fr; }
  .pagination > div { grid-column: 1 / -1; grid-row: 1; justify-content: center; flex-wrap: wrap; }
  .section-head, .search-results article, .security-callout { flex-direction: column; align-items: flex-start; }
  .search-bar { grid-template-columns: 1fr; }
  .inline-upload { width: 100%; align-items: stretch; flex-direction: column; }
  .credential-values { grid-template-columns: 1fr; }
  .sticky-actions { align-items: flex-start; flex-direction: column; }
  .action-cell { min-width: 250px; }
  .contact-support-grid { grid-template-columns: 1fr; }
  .notification-card { padding: 18px; grid-template-columns: 34px 1fr; }
  .notice-icon { width: 34px; height: 34px; }
  .notice-meta { flex-direction: column; gap: 3px; }
  .legal-card { padding: 25px 20px; box-shadow: 5px 5px 0 var(--ink); }
  .lead-mobile-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .action-btn-call, .action-btn-copy { min-height: 44px; padding: 10px; font-size: 11px; }
}

@media print {
  body * { visibility: hidden !important; }
  body::before { content: "Printing is disabled for this protected Dg Tech - Lead Manage workspace."; visibility: visible !important; position: fixed; inset: 0; display: grid; place-items: center; padding: 40px; background: white; color: black; font: 700 24px Arial, sans-serif; text-align: center; }
}
