/* Responsive application shell */
.detail-heading { padding: 0 42px 18px 0; }
.detail-heading h1 { margin: 0 0 10px; line-height: 1.18; overflow-wrap: anywhere; }
.detail-heading .tag { display: inline-flex; }
.detail-grid .detail-field { min-width: 0; padding: 14px 16px; border: 1px solid #e7edf3; border-radius: 12px; }
.detail-field small { margin-bottom: 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.detail-field span { display: block; font-size: 15px; overflow-wrap: anywhere; }
.detail-address { min-height: 92px; }
.detail-note:empty { display: none; }
.detail-note { margin: 12px 0 0; }
.detail-footer { display: grid; grid-template-columns: minmax(190px, 1fr) auto; gap: 12px; margin-top: 18px; padding-top: 18px; border-top: 1px solid #d9e2ec; }
.detail-status { display: grid; grid-template-columns: auto minmax(150px, 1fr); align-items: center; gap: 10px; margin: 0; font-weight: 700; }
.detail-status select { width: 100%; min-height: 44px; padding: 9px 38px 9px 12px; border: 1px solid #d9e2ec; border-radius: 9px; background: #fff; }
.detail-save { min-height: 44px; }
.detail-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 9px; }
.detail-actions .secondary, .detail-actions .wa-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; text-decoration: none; }
html { scroll-behavior: smooth; }
body { min-width: 320px; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, select { min-height: 44px; }
header { position: sticky; top: 0; z-index: 8; }
.app-header { height: 72px; background: rgba(255,255,255,.96); border-bottom: 1px solid #e5edf5; backdrop-filter: blur(14px); }
.app-header .logo { display: flex; align-items: center; gap: 11px; }
.app-header .logo img { display: block; width: 205px; height: 47px; object-fit: contain; object-position: left center; }
.app-header .logo > span:first-child { flex: 0 0 40px; width: 40px; height: 40px; margin: 0; border-radius: 12px; box-shadow: 0 8px 20px rgba(20,115,230,.22); }
.app-header .logo .brand-copy { display: grid; width: auto; height: auto; margin: 0; place-items: initial; background: transparent; color: #102a43; border-radius: 0; line-height: 1.15; }
.brand-copy b { font-size: 16px; }
.brand-copy small { margin-top: 3px; color: #829ab1; font-size: 10px; font-weight: 600; letter-spacing: .04em; }
.header-account { padding: 5px 7px 5px 5px; border: 1px solid #e5edf5; border-radius: 999px; background: #f8fafc; }
.user-avatar { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: #dcebfb; color: #1473e6; font-weight: 800; }
.header-account #userName { font-size: 13px; font-weight: 700; }
.header-account .ghost { min-height: 34px; padding: 6px 10px; border-left: 1px solid #d9e2ec; border-radius: 0 999px 999px 0; font-size: 12px; }
.container { width: min(100% - 32px, 1120px); padding-inline: 0; }
.main-nav { width: max-content; margin: 22px 0 30px; padding: 5px; gap: 4px; border: 1px solid #e2eaf2; border-radius: 13px; background: rgba(255,255,255,.8); box-shadow: 0 4px 16px rgba(16,42,67,.04); }
.main-nav button { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 9px 14px; }
.main-nav button svg { width: 17px; height: 17px; fill: currentColor; opacity: .82; }
.main-nav button.active { box-shadow: 0 4px 12px rgba(20,115,230,.12); }
.page { min-width: 0; }
.panel, .stat, .cards > article { min-width: 0; }
.title h1 { overflow-wrap: anywhere; }
.filters input, .filters select { min-width: 0; height: 48px; }
.cards > article > div:first-child { min-width: 0; }
.cards h3, .cards .muted { overflow-wrap: anywhere; }
.cards .muted { margin-top: 5px; }
.radar-visual { min-height: 430px; align-content: center; gap: 22px; }
.mini-stats { grid-template-columns: repeat(4, 1fr); }
.mini-stats > div { padding: 10px 5px; border-radius: 10px; background: #f4f7fa; }
.chips span { min-height: 42px; display: grid; place-items: center; }
.scan-profile-info { display: grid; gap: 2px; margin: -4px 0 16px; padding: 11px 13px; border-radius: 10px; background: #eef6ff; color: #1473e6; }
.scan-profile-info span { color: #627d98; font-size: 12px; }
.primary, .secondary, .danger { transition: transform .15s ease, filter .15s ease; }
.primary:active, .secondary:active, .danger:active { transform: scale(.985); }
dialog { max-height: min(88vh, 760px); overflow: auto; }
dialog .secondary { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

/* Professional login */
.auth { min-height: 100dvh; padding: 28px; background: radial-gradient(circle at 12% 15%,#dcecff 0,transparent 31%),linear-gradient(145deg,#f7faff,#edf4fb); }
.login-shell { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(390px,.72fr); width: min(1060px,100%); min-height: 650px; overflow: hidden; border: 1px solid rgba(185,206,228,.82); border-radius: 26px; background: #fff; box-shadow: 0 30px 90px rgba(16,42,67,.16); }
.login-showcase { position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 42px 48px; background: linear-gradient(145deg,#0c2d52,#0c4e98 62%,#1679e8); color: #fff; }
.login-showcase::before { content:''; position:absolute; inset:0; background:radial-gradient(circle at 78% 76%,rgba(111,194,255,.28),transparent 34%); }
.login-logo { position: relative; z-index: 2; width: 220px; padding: 8px 12px; border-radius: 13px; background: rgba(255,255,255,.96); }
.login-message { position: relative; z-index: 2; max-width: 570px; margin-top: 74px; }
.login-kicker { display: inline-flex; padding: 6px 10px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; color: #bdddff; font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.login-message h1 { margin: 16px 0 14px; font-size: clamp(35px,4vw,52px); line-height: 1.06; letter-spacing: -.045em; }
.login-message p { max-width: 525px; margin: 0; color: #d3e8fd; font-size: 16px; line-height: 1.65; }
.login-benefits { display: grid; gap: 10px; margin-top: 26px; color: #edf7ff; font-size: 13px; font-weight: 650; }
.login-visual { position: absolute; right: -35px; bottom: -80px; width: 360px; height: 360px; opacity: .72; }
.login-visual i { position: absolute; inset: 50%; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; transform: translate(-50%,-50%); }
.login-visual i:nth-child(1) { width: 110px; height: 110px; }.login-visual i:nth-child(2) { width: 220px; height: 220px; }.login-visual i:nth-child(3) { width: 340px; height: 340px; }
.login-visual b { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; border: 6px solid rgba(255,255,255,.2); border-radius: 50%; background: #fff; transform: translate(-50%,-50%); box-shadow: 0 0 0 12px rgba(255,255,255,.1); }
.login-form-panel { display: flex; flex-direction: column; justify-content: center; padding: 54px 50px; }
.login-logo-mobile { display: none; }
.login-form-heading h2 { margin: 5px 0 4px; font-size: 29px; letter-spacing: -.03em; }
.login-form-heading .muted { margin: 0 0 26px; }
.login-form-panel form { text-align: left; }
.login-form-panel form label { display: grid; gap: 8px; margin: 18px 0; color: #243b53; font-size: 13px; font-weight: 750; }
.login-form-panel form > label > input, .login-form-panel .password-field { margin: 0; }
.login-form-panel input { min-height: 51px; padding: 13px 14px; border: 1px solid #cbd9e7; border-radius: 11px; background: #fff; outline: none; transition: border-color .15s,box-shadow .15s; }
.login-form-panel input:focus { border-color: #2788f3; box-shadow: 0 0 0 4px rgba(39,136,243,.12); }
.login-form-panel .password-field { position: relative; display: block; }
.login-form-panel .password-field input { width: 100%; padding-right: 52px; }
.login-form-panel .password-field button { position: absolute; right: 6px; top: 50%; min-height: 39px; transform: translateY(-50%); }
.login-form-panel form .remember-login { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 0; cursor: pointer; }
.login-form-panel form .remember-login input { flex: 0 0 auto; width: 18px; min-height: 18px; margin: 2px 0 0; padding: 0; border-radius: 4px; accent-color: #1473e6; }
.login-form-panel form .remember-login span { display: grid; gap: 1px; }
.login-form-panel form .remember-login strong { color: #243b53; font-size: 13px; }
.login-form-panel form .remember-login small { color: #829ab1; font-size: 11px; font-weight: 500; }
.login-submit { display: flex; width: 100%; min-height: 52px; align-items: center; justify-content: center; gap: 10px; margin-top: 24px; border-radius: 11px; box-shadow: 0 10px 24px rgba(20,115,230,.2); }
.login-submit span { font-size: 18px; }
.login-security { margin: 22px 0 0; color: #829ab1; font-size: 11px; text-align: center; }

/* Professional dashboard */
.dashboard-page { padding-bottom: 36px; }
.dashboard-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 22px; }
.dashboard-heading h1 { margin-bottom: 5px; font-size: clamp(28px,3vw,38px); letter-spacing: -.035em; }
.dashboard-heading .muted { margin: 0; }
.dashboard-heading .refresh { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.dashboard-heading .refresh span { font-size: 20px; line-height: 1; }
.dashboard-stats { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; margin-bottom: 18px; }
.dashboard-stat { position: relative; padding: 18px; overflow: hidden; border-color: #e3ebf3; box-shadow: 0 7px 24px rgba(16,42,67,.045); }
.dashboard-stat::after { content: ''; position: absolute; right: -22px; bottom: -28px; width: 86px; height: 86px; border-radius: 50%; background: var(--stat-soft); }
.stat-top { display: flex; align-items: center; gap: 8px; color: #627d98; }
.stat-top small { font-size: 12px; font-weight: 750; }
.stat-icon { width: 9px; height: 9px; border-radius: 50%; background: var(--stat-color); box-shadow: 0 0 0 5px var(--stat-soft); }
.dashboard-stat b { display: block; margin-top: 16px; font-size: 30px; letter-spacing: -.04em; }
.dashboard-stat p { position: relative; z-index: 1; margin: 2px 0 0; color: #829ab1; font-size: 11px; }
.stat-blue { --stat-color:#1473e6; --stat-soft:#e8f1fc; }.stat-green { --stat-color:#0b9b6c; --stat-soft:#dff6ed; }.stat-emerald { --stat-color:#18a566; --stat-soft:#def8e9; }.stat-amber { --stat-color:#d97706; --stat-soft:#fff1d6; }.stat-violet { --stat-color:#7c3aed; --stat-soft:#eee7ff; }.stat-slate { --stat-color:#627d98; --stat-soft:#e9eef3; }
.dashboard-hero { position: relative; display: grid; grid-template-columns: minmax(0,1.15fr) minmax(300px,.85fr); min-height: 310px; overflow: hidden; border: 1px solid #1a63bd; border-radius: 22px; background: linear-gradient(135deg,#0d2f55 0%,#0d4f9a 58%,#1473e6 100%); box-shadow: 0 18px 46px rgba(13,79,154,.2); color: #fff; }
.dashboard-hero::before { content:''; position:absolute; inset:0; background:radial-gradient(circle at 78% 45%,rgba(104,180,255,.24),transparent 34%); }
.dashboard-hero-copy { position: relative; z-index: 2; padding: 38px 42px; }
.hero-kicker { display: inline-flex; padding: 5px 9px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; background: rgba(255,255,255,.08); color: #bdddff; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.dashboard-hero h2 { max-width: 590px; margin: 15px 0 10px; font-size: clamp(26px,3vw,38px); line-height: 1.12; letter-spacing: -.035em; }
.dashboard-hero p { max-width: 570px; margin: 0; color: #cfe5fb; line-height: 1.65; }
.hero-features { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 19px 0 23px; color: #e7f3ff; font-size: 12px; font-weight: 650; }
.dashboard-hero .primary { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; background: #fff; color: #1265c5; box-shadow: 0 8px 20px rgba(0,0,0,.15); }
.dashboard-hero .primary span { font-size: 19px; }
.dashboard-radar-art { position: relative; min-height: 310px; align-self: stretch; }
.dashboard-orbit { position: absolute; left: 50%; top: 50%; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; transform: translate(-50%,-50%); }
.orbit-one { width: 105px; height: 105px; }.orbit-two { width: 185px; height: 185px; }.orbit-three { width: 270px; height: 270px; }
.dashboard-sweep { position: absolute; left: 50%; top: 50%; width: 135px; height: 135px; transform-origin: 0 0; background: conic-gradient(from 270deg,rgba(91,178,255,.58),transparent 42%); animation: dashboardSweep 4s linear infinite; }
.dashboard-dot { position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; border: 5px solid rgba(255,255,255,.28); border-radius: 50%; background: #fff; transform: translate(-50%,-50%); box-shadow: 0 0 0 10px rgba(255,255,255,.12); }
@keyframes dashboardSweep { to { transform: rotate(360deg); } }

/* Professional radar */
.radar-page { padding-bottom: 40px; }
.radar-page-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 22px; }
.radar-page-heading h1 { margin-bottom: 4px; font-size: clamp(30px,3vw,39px); letter-spacing: -.04em; }
.radar-page-heading .muted { margin: 0; }
.radar-page-heading .badge { display: inline-flex; align-items: center; gap: 8px; min-width: 82px; justify-content: center; }
.radar-page-heading .badge i, .live-label i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.radar-page-heading .badge.on i, .live-label i { box-shadow: 0 0 0 5px rgba(11,155,108,.12); animation: statusPulse 1.8s ease-in-out infinite; }
@keyframes statusPulse { 50% { opacity:.45; transform:scale(.8); } }
.radar-grid { grid-template-columns: minmax(0,.95fr) minmax(380px,1.05fr); align-items: stretch; gap: 16px; }
.radar-control-panel, .radar-visual { border-color: #e1eaf3; border-radius: 20px; box-shadow: 0 10px 32px rgba(16,42,67,.055); }
.radar-control-panel { padding: 25px; }
.panel-heading, .category-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.panel-heading > div, .category-heading > div { display: flex; align-items: center; gap: 11px; }
.panel-heading h2, .category-heading h2 { margin: 0; font-size: 16px; }
.panel-heading p, .category-heading p { margin: 2px 0 0; color: #829ab1; font-size: 11px; }
.section-number { display: grid; flex: 0 0 32px; width: 32px; height: 32px; place-items: center; border-radius: 9px; background: #e8f1fc; color: #1473e6; font-size: 10px; font-weight: 850; }
.radar-select-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 17px 0 11px; }
.radar-control-panel .radar-select-grid label { margin: 0; color: #486581; font-size: 11px; }
.radar-control-panel select { min-height: 48px; margin-top: 7px; border-color: #d4e0ec; background-color: #fbfdff; font-weight: 700; }
.radar-control-panel select:disabled { cursor: not-allowed; opacity: .62; }
.radar-control-panel .scan-profile-info { margin: 0 0 21px; border: 1px solid #d9eafb; background: #f4f9ff; }
.category-heading { padding-top: 19px; border-top: 1px solid #e7edf3; }
#selectedCategoryCount { padding: 5px 8px; border-radius: 999px; background: #edf2f7; color: #627d98; font-size: 10px; font-weight: 800; white-space: nowrap; }
.radar-chips { margin-top: 15px; gap: 7px; }
.radar-chips label { margin: 0; }
.radar-chips span { min-height: 37px; padding: 7px 10px; border-color: #d7e2ed; background: #fff; font-size: 12px; }
.radar-actions { display: grid; grid-template-columns: 1fr auto; gap: 9px; margin-top: 22px; }
.radar-actions .big { width: auto; min-height: 50px; margin: 0; }
.radar-actions #startRadar { grid-column: 1/-1; }
.radar-actions #scanNow { min-width: 190px; }
.radar-actions #stopRadar { min-width: 125px; }
.button-icon { margin-right: 5px; font-size: 18px; }
.radar-status-panel { display: flex; align-items: center; gap: 11px; margin-top: 14px; padding: 12px 13px; border: 1px solid #e2eaf2; border-radius: 12px; background: #f8fafc; }
.status-indicator { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; background: #9fb3c8; box-shadow: 0 0 0 5px #edf2f7; }
.radar-status-panel.active .status-indicator { background: #0b9b6c; box-shadow: 0 0 0 5px #dff6ed; }
.radar-status-panel strong { display: block; color: #486581; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.radar-status-panel p { margin: 1px 0 0; color: #627d98; font-size: 12px; }
.provider-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 14px 0 0; color: #9fb3c8; font-size: 10px; }
.provider-note span { color: #1473e6; font-size: 8px; }
.radar-visual { display: flex; min-height: 590px; flex-direction: column; justify-content: flex-start; padding: 25px; text-align: left; background: linear-gradient(180deg,#fff,#f9fcff); }
.visual-heading { display: flex; align-items: start; justify-content: space-between; width: 100%; }
.visual-heading h2 { margin: 5px 0 0; font-size: 19px; }
.live-label { display: inline-flex; align-items: center; gap: 7px; color: #0b9b6c; font-size: 9px; font-weight: 850; letter-spacing: .1em; }
.gps-quality { padding: 5px 8px; border-radius: 999px; background: #e5f7ef; color: #087653; font-size: 9px; font-weight: 800; }
.radar-stage { display: grid; flex: 1; min-height: 285px; place-items: center; width: 100%; }
.radar-stage .pulse { width: 220px; height: 220px; background-color: #fafdff; background-size: auto; box-shadow: inset 0 0 45px rgba(20,115,230,.035); }
.coordinate-card { width: 100%; padding: 13px 15px; border: 1px solid #e2eaf2; border-radius: 12px; background: #fff; text-align: left; }
.coordinate-card small { display: block; margin-bottom: 3px; color: #9fb3c8; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.coordinate-card strong { display: block; overflow-wrap: anywhere; color: #243b53; font-size: 15px; }
.radar-visual .mini-stats { width: 100%; margin-top: 11px; gap: 7px; }
.radar-visual .mini-stats > div { padding: 12px 5px; border: 1px solid #e7edf3; background: #fff; text-align: center; }
.radar-visual .mini-stats b { font-size: 20px; }
.radar-visual .mini-stats span { font-size: 9px; }

/* Prospect CRM table */
.prospect-table-panel { background: #fff; border: 1px solid #d9e2ec; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 20px rgba(16,42,67,.03); }
.table-scroll { width: 100%; overflow-x: auto; }
.prospect-table { width: 100%; min-width: 900px; table-layout: fixed; border-collapse: collapse; text-align: left; }
.prospect-table th { padding: 14px 12px; background: #f4f7fa; color: #627d98; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; border-bottom: 1px solid #d9e2ec; }
.prospect-table td { padding: 15px 12px; border-bottom: 1px solid #e7edf3; vertical-align: middle; }
.prospect-table tbody tr:last-child td { border-bottom: 0; }
.prospect-table tbody tr:hover { background: #f8fbff; }
.prospect-table input[type="checkbox"] { width: 18px; height: 18px; accent-color: #1473e6; cursor: pointer; }
.check-column { width: 46px; text-align: center; }
.number-column { width: 72px; text-align: center; }
#prospects .prospect-table th:nth-child(2) { width: 22%; }
#prospects .prospect-table th:nth-child(3) { width: 11%; }
#prospects .prospect-table th:nth-child(4) { width: 12%; }
#prospects .prospect-table th:nth-child(5) { width: 9%; }
#prospects .prospect-table th:nth-child(6) { width: 14%; }
.action-column { width: 230px; text-align: right; }
.row-actions { display: flex; flex-wrap: nowrap; justify-content: flex-end; align-items: center; gap: 6px; }
.wa-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 14px; border: 0; border-radius: 10px; background: #18a566; color: #fff; font: inherit; font-weight: 800; cursor: pointer; text-decoration: none; }
.wa-button:hover { filter: brightness(.94); }
.map-button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid #b9d2ee; border-radius: 9px; background: #fff; color: #0d5fbd; font: inherit; font-weight: 800; cursor: pointer; }
.map-button:hover { background: #eef6ff; border-color: #8eb8e8; }
.sales-role #prospects .check-column, .sales-role #deleteSelectedProspects, .sales-role #selectedProspectCount, .sales-role #prospects .delete-row, .sales-role .detail-status, .sales-role .detail-save, .sales-role #enrichButton { display: none !important; }
.sales-layout { display: grid; grid-template-columns: minmax(260px,.65fr) minmax(0,1.35fr); gap: 16px; align-items: start; }
.sales-layout .panel h2 { margin-bottom: 16px; }
.sales-layout .panel input { width: 100%; margin-top: 6px; padding: 11px 12px; border: 1px solid #d9e2ec; border-radius: 9px; }
.sales-table { min-width: 620px; }
.contact-history-filters { grid-template-columns: minmax(240px,480px); }
.quota-button { margin-left: auto; white-space: nowrap; }
#googleLimits { width: min(92vw,620px); }
.quota-dialog h1 { margin-bottom: 5px; }
.quota-usage { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 20px 0; }
.quota-usage > div { padding: 16px; border: 1px solid #d9e2ec; border-radius: 12px; background: #f8fbff; }
.quota-usage small, .quota-usage span { display: block; color: #627d98; }
.quota-usage strong { display: block; margin: 3px 0; color: #102a43; font-size: 23px; }
#googleLimitsForm { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
#googleLimitsForm label { display: grid; gap: 6px; margin: 0; font-weight: 700; }
#googleLimitsForm input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #d9e2ec; border-radius: 9px; }
#googleLimitsForm label small { color: #829ab1; font-weight: 400; }
#googleLimitsForm .big { grid-column: 1/-1; }
.status-contacted { background: #dcfce7; color: #087653; }
.template-variables { display: flex; flex-wrap: wrap; gap: 7px; margin: 8px 0 14px; }
.template-variables button { min-height: 34px; padding: 5px 9px; border: 1px solid #b9d2ee; border-radius: 8px; background: #eef6ff; color: #1473e6; cursor: pointer; }
#waSettings { width: min(92vw, 650px); }
#waSettings label { display: grid; gap: 7px; margin-top: 14px; font-weight: 700; }
#waSettings input, #waSettings textarea { width: 100%; padding: 12px; border: 1px solid #d9e2ec; border-radius: 10px; font: inherit; resize: vertical; }
.wa-preview { padding: 14px; border-radius: 12px; background: #f4f7fa; }
.wa-preview small { display: block; margin-bottom: 7px; color: #627d98; font-weight: 700; }
#waPreview { white-space: pre-wrap; line-height: 1.5; }
.business-cell { display: grid; gap: 4px; min-width: 0; }
.business-cell strong { color: #102a43; font-size: 15px; line-height: 1.3; }
.business-cell small { max-width: 390px; color: #627d98; line-height: 1.35; overflow-wrap: anywhere; }
.prospect-table td { overflow-wrap: anywhere; }
.prospect-table .tag { display: inline-block; max-width: 100%; overflow-wrap: anywhere; white-space: normal; line-height: 1.25; }
.has-phone { color: #087653; font-weight: 700; white-space: nowrap; }
.no-phone { color: #829ab1; font-size: 13px; }
.status-tag { display: inline-flex; padding: 5px 8px; border-radius: 999px; background: #edf2f7; color: #627d98; font-size: 11px; font-weight: 800; white-space: nowrap; }
.status-contact_ready { background: #d9f5e9; color: #087653; }
.status-reviewed { background: #e8f1fc; color: #1473e6; }
.status-archived { background: #edf2f7; color: #829ab1; }
.compact { min-height: 38px; padding: 7px 12px; }
.row-actions .compact { flex: 0 0 auto; min-width: 0; min-height: 34px; padding: 6px 8px; font-size: 12px; }
.row-actions .delete-row { flex-basis: auto; }
.table-toolbar, .table-pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 10px 0; color: #627d98; }
.table-toolbar > div, .table-pagination > div { display: flex; align-items: center; gap: 10px; }
.table-toolbar label { display: flex; align-items: center; gap: 7px; }
.table-toolbar select { min-height: 38px; padding: 5px 28px 5px 9px; border: 1px solid #d9e2ec; border-radius: 8px; background: #fff; }
.table-pagination { margin-top: 14px; }
.compact:disabled { cursor: not-allowed; opacity: .48; }
.empty-table { padding: 42px 20px; text-align: center; color: #627d98; }
.session-table { min-width: 900px; }
.session-table td:first-child strong { color: #1473e6; }
.session-stopped { background: #edf2f7; color: #627d98; }
.session-active { background: #d9f5e9; color: #087653; }
.session-failed { background: #ffe3e3; color: #c53030; }
.metric-new { color: #087653; font-weight: 800; }

/* Tablet */
@media (max-width: 980px) {
    .container { width: min(100% - 28px, 860px); }
    .radar-grid { grid-template-columns: 1fr; }
    .radar-visual { min-height: 360px; }
    .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filters input { grid-column: 1 / -1; }
    .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .prospect-table { min-width: 860px; }
    #prospects .prospect-table th:nth-child(2) { width: 20%; }
    .action-column { width: 210px; }
    .dashboard-hero { grid-template-columns: minmax(0,1fr) 260px; }
    .dashboard-hero-copy { padding: 32px; }
    .login-shell { grid-template-columns: minmax(0,1fr) 390px; min-height: 610px; }
    .login-showcase { padding: 36px; }
    .login-message { margin-top: 62px; }
    .login-form-panel { padding: 44px 36px; }
    .sales-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .auth { align-items: start; padding: 22px 14px; }
    .login-shell { display: block; width: min(480px,100%); min-height: 0; border-radius: 20px; }
    .login-showcase { display: none; }
    .login-form-panel { padding: 34px 28px 30px; }
    .login-logo-mobile { display: block; width: 205px; margin-bottom: 38px; }
}

/* Phone */
@media (max-width: 640px) {
    body { font-size: 14px; padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
    header {
        height: 58px;
        padding: 0 16px;
        box-shadow: 0 2px 14px rgba(16,42,67,.06);
    }
    header .logo { font-size: 16px; }
    header .logo span { width: 32px; height: 32px; }
    .app-header .logo > span:first-child { flex-basis: 34px; width: 34px; height: 34px; }
    .brand-copy small { display: none; }
    .user-avatar { width: 30px; height: 30px; }
    .header-account { padding: 3px; border: 0; background: transparent; }
    .header-account .ghost { border-left: 0; padding-inline: 6px; }
    header .ghost { min-height: 40px; padding: 8px 4px; }
    .container { width: 100%; padding: 18px 14px 8px; }
    nav {
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 9;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
        margin: 0;
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
        overflow: visible;
        background: rgba(255,255,255,.96);
        border-top: 1px solid #d9e2ec;
        box-shadow: 0 -8px 24px rgba(16,42,67,.08);
        backdrop-filter: blur(12px);
    }
    .main-nav { width: auto; border: 0; border-radius: 0; }
    .sales-role .main-nav { grid-template-columns: repeat(2, 1fr); }
    nav button { min-width: 0; min-height: 46px; padding: 7px 3px; font-size: 12px; }
    .main-nav button { display: grid; place-items: center; align-content: center; gap: 2px; }
    .main-nav button svg { width: 18px; height: 18px; }
    .title { margin-bottom: 15px; align-items: flex-end; gap: 10px; }
    .title h1 { font-size: 25px; line-height: 1.15; }
    .title .secondary { padding-inline: 12px; }
    .eyebrow { font-size: 10px; }
    .panel, .stat, .cards > article { border-radius: 14px; padding: 16px; }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .stat b { font-size: 24px; }
    .stat span { font-size: 12px; }
    .dashboard-heading { align-items: flex-start; margin-bottom: 17px; }
    .dashboard-heading .muted { font-size: 12px; }
    .dashboard-heading .refresh { min-height: 40px; padding: 8px 10px; font-size: 0; }
    .dashboard-heading .refresh span { font-size: 20px; }
    .dashboard-stats { gap: 9px; }
    .dashboard-stat { padding: 15px; }
    .dashboard-stat b { margin-top: 12px; font-size: 25px; }
    .dashboard-stat p { min-height: 30px; }
    .dashboard-hero { grid-template-columns: 1fr; min-height: 0; border-radius: 17px; }
    .dashboard-hero-copy { padding: 26px 22px 22px; }
    .dashboard-hero h2 { font-size: 27px; }
    .dashboard-radar-art { min-height: 180px; order: -1; margin-bottom: -45px; opacity: .85; }
    .orbit-three { width: 210px; height: 210px; }.orbit-two { width: 145px; height: 145px; }.orbit-one { width: 82px; height: 82px; }
    .dashboard-sweep { width: 105px; height: 105px; }
    .dashboard-hero .primary { width: 100%; justify-content: center; }
    .radar-grid { gap: 12px; }
    .radar-grid > .panel:first-child { order: 2; }
    .radar-grid > .radar-visual { order: 1; }
    .radar-page-heading { align-items: flex-start; margin-bottom: 14px; }
    .radar-page-heading h1 { font-size: 28px; }
    .radar-page-heading .muted { max-width: 230px; font-size: 11px; }
    .radar-page-heading .badge { min-width: 72px; padding: 6px 9px; font-size: 11px; }
    .radar-page-heading { flex-wrap: wrap; }
    .quota-button { order: 3; width: 100%; margin: 8px 0 0; }
    .quota-usage, #googleLimitsForm { grid-template-columns: 1fr; }
    .radar-control-panel { padding: 17px; }
    .radar-select-grid { grid-template-columns: 1fr; margin-top: 15px; }
    .panel-heading p, .category-heading p { max-width: 220px; }
    .radar-chips label { flex: 1 1 calc(50% - 7px); }
    .radar-actions { grid-template-columns: 1fr 1fr; }
    .radar-actions #scanNow, .radar-actions #stopRadar { min-width: 0; }
    .radar-visual { min-height: 410px; padding: 18px; gap: 0; }
    .radar-stage { min-height: 205px; }
    .radar-stage .pulse { width: 165px; height: 165px; }
    .pulse { width: 150px; height: 150px; }
    .radar-visual h2 { font-size: 18px; overflow-wrap: anywhere; }
    .mini-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
    .mini-stats > div { padding: 8px 2px; }
    .mini-stats b { font-size: 18px; }
    .mini-stats span { font-size: 10px; }
    .chips { gap: 7px; }
    .chips label { flex: 1 1 calc(50% - 7px); }
    .chips span { width: 100%; padding: 7px 9px; text-align: center; }
    .big { margin-top: 12px; min-height: 50px; }
    .filters { grid-template-columns: 1fr; gap: 8px; }
    .filters input { grid-column: auto; }
    .prospect-table-panel { border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
    .table-scroll { overflow: visible; }
    .prospect-table { min-width: 0; table-layout: auto; border-collapse: separate; border-spacing: 0 10px; }
    .prospect-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .prospect-table tbody, .prospect-table tr, .prospect-table td { display: block; width: 100%; }
    .prospect-table tr { position: relative; padding: 16px; background: #fff; border: 1px solid #d9e2ec; border-radius: 14px; box-shadow: 0 4px 16px rgba(16,42,67,.04); }
    .prospect-table td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border: 0; text-align: right; }
    .prospect-table td::before { content: attr(data-label); color: #829ab1; font-size: 11px; font-weight: 700; text-transform: uppercase; text-align: left; }
    .prospect-table td:nth-child(2) { display: block; padding: 0 36px 10px 0; text-align: left; border-bottom: 1px solid #e7edf3; }
    .prospect-table td:nth-child(2)::before { display: none; }
    .prospect-table .business-cell { min-width: 0; }
    .prospect-table .business-cell small { max-width: none; }
    .prospect-table .check-column { position: absolute; right: 14px; top: 13px; width: auto; padding: 0; }
    .prospect-table .check-column::before { display: none; }
    .prospect-table .number-column, .prospect-table .action-column { width: 100%; text-align: right; }
    .prospect-table .action-column { padding-top: 12px; border-top: 1px solid #e7edf3; }
    .prospect-table .row-actions { flex-wrap: wrap; justify-content: flex-end; }
    .session-table .action-column { display: flex; }
    .prospect-table .compact { min-width: 96px; }
    .prospect-table .row-actions .delete-row { flex-basis: auto; }
    .table-toolbar, .table-pagination { align-items: stretch; flex-direction: column; }
    .table-toolbar > div, .table-pagination > div { justify-content: space-between; }
    .table-toolbar label { justify-content: space-between; }
    .session-table td:first-child { display: block; padding: 0 0 10px; text-align: left; border-bottom: 1px solid #e7edf3; }
    .session-table td:first-child::before { display: none; }
    .session-table td:nth-child(2) { display: flex; padding: 8px 0; text-align: right; border-bottom: 0; }
    .session-table td:nth-child(2)::before { display: block; }
    .empty-table { background: #fff; border: 1px solid #d9e2ec; border-radius: 14px; }
    .cards > article { gap: 14px; }
    .cards > article > div:last-child { width: 100%; display: flex; justify-content: space-between; align-items: center; }
    .cards .secondary { min-height: 42px; }
    dialog {
        width: calc(100% - 20px);
        max-height: calc(100dvh - 20px);
        padding: 20px 16px;
        border-radius: 16px;
    }
    dialog h1 { padding-right: 34px; font-size: 25px; }
    .dialog-close { position: absolute; right: 12px; top: 9px; min-height: 42px; }
    .detail-grid { grid-template-columns: 1fr; gap: 8px; }
    .detail-heading { padding-right: 34px; }
    .detail-footer { grid-template-columns: 1fr; gap: 10px; }
    .detail-status { grid-template-columns: 1fr; gap: 5px; }
    .detail-save, .detail-actions > * { width: 100%; }
    .detail-actions { grid-column: auto; display: grid; grid-template-columns: 1fr; }
    #detailContent > .primary, #detailContent > .secondary { width: 100%; margin: 5px 0; }
    #detailContent label { display: grid; gap: 5px; margin-top: 14px; }
    #detailStatus { width: 100%; }
    .auth { min-height: 100dvh; align-items: start; padding: max(18px, env(safe-area-inset-top)) 12px 20px; }
    .login-form-panel { padding: 28px 20px 25px; }
    .login-logo-mobile { width: 185px; margin-bottom: 30px; }
    .login-form-heading h2 { font-size: 26px; }
    .login-form-heading .muted { margin-bottom: 20px; }
}

/* Small phones */
@media (max-width: 380px) {
    .container { padding-inline: 10px; }
    .panel, .stat, .cards > article { padding: 14px; }
    .chips label { flex-basis: 100%; }
    .mini-stats { grid-template-columns: repeat(2, 1fr); }
}
/* Contact history stays a compact table on desktop and mobile. */
#contactHistory .prospect-table-panel {
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: 16px;
    overflow: hidden;
}
#contactHistory .table-scroll { overflow: auto; max-height: 65vh; }
#contactHistory .prospect-table {
    display: table;
    width: 100%;
    min-width: 1000px;
    table-layout: fixed;
    border-collapse: collapse;
    border-spacing: 0;
}
#contactHistory .prospect-table thead {
    display: table-header-group;
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
}
#contactHistory .prospect-table th { position: sticky; top: 0; z-index: 1; }
#contactHistory .prospect-table tbody { display: table-row-group; width: auto; }
#contactHistory .prospect-table tr {
    display: table-row;
    width: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
#contactHistory .prospect-table td {
    display: table-cell;
    width: auto;
    padding: 10px 12px;
    text-align: left;
    border: 0;
    border-bottom: 1px solid #e7edf3;
    vertical-align: middle;
}
#contactHistory .prospect-table td::before { display: none; content: none; }
#contactHistory .prospect-table th:first-child { width: 24%; }
#contactHistory .prospect-table .action-column { width: 215px; }
#contactHistory .prospect-table .row-actions { flex-wrap: nowrap; justify-content: flex-start; }
#contactHistory .prospect-table .compact { min-width: 0; }
.outreach-charts { display:grid; grid-template-columns:minmax(0,1.7fr) minmax(0,1fr); gap:20px; margin:22px 0; }
.outreach-charts .panel { min-width:0; }
.outreach-charts h2 { margin-bottom:8px; }
.chart-scroll { overflow-x:auto; padding:16px 0 4px; }
.outreach-bars { display:flex; gap:5px; align-items:flex-end; min-width:760px; height:245px; }
.chart-day { flex:1; min-width:19px; text-align:center; }
.bar-value { font-size:10px; color:#627d98; }
.bar-track { height:190px; display:flex; align-items:flex-end; border-bottom:1px solid #d9e2ec; background:repeating-linear-gradient(to top,transparent 0,transparent 46px,#edf2f7 47px,#edf2f7 48px); }
.day-bar { width:100%; background:#1473e6; border-radius:4px 4px 0 0; }
.chart-day small { display:block; margin-top:8px; color:#627d98; }
.chart-note { font-size:12px; margin-top:14px; }
.team-pie { width:170px; height:170px; border-radius:50%; margin:20px auto; }
.team-legend { max-height:190px; overflow:auto; }
.team-legend > div { display:flex; align-items:center; gap:8px; padding:6px 0; font-size:13px; }
.team-legend i { width:10px; height:10px; border-radius:50%; flex-shrink:0; }
.team-legend span { flex:1; overflow-wrap:anywhere; }
.team-legend strong { white-space:nowrap; }
.contact-coverage { margin-top:18px; padding-top:16px; border-top:1px solid #e7edf3; }
.contact-coverage span { display:block; font-size:12px; color:#627d98; margin-top:5px; }
.coverage-track { height:8px; background:#e7edf3; border-radius:5px; overflow:hidden; margin-top:10px; }
.coverage-track > div { height:100%; background:#0aa77b; }
@media(max-width:980px) { .outreach-charts { grid-template-columns:1fr; } }
