:root {
    --bg: #060b10;
    --bg-2: #091018;
    --panel: #101a23;
    --panel-2: #0c151d;
    --panel-3: #14212c;
    --line: #203443;
    --line-soft: rgba(74, 104, 124, 0.28);
    --text: #f3f8fb;
    --muted: #91a8b5;
    --muted-2: #6f8796;
    --green: #36db87;
    --cyan: #49c7f5;
    --yellow: #f6c84d;
    --orange: #ff923f;
    --red: #ff4d5d;
    --black-risk: #020304;
    --radius: 8px;
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
    --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: dark;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 70% -10%, rgba(35, 104, 77, 0.16), transparent 34rem),
        linear-gradient(180deg, #070d12 0%, var(--bg) 44%, #05090d 100%);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

code {
    background: #071018;
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 0.1rem 0.28rem;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1;
    margin-bottom: 0;
}

h2 {
    font-size: 1.05rem;
    margin-bottom: 14px;
}

h3 {
    color: var(--muted);
    font-size: 0.83rem;
    text-transform: uppercase;
    margin: 16px 0 8px;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 282px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 20px 18px;
    background: rgba(7, 14, 20, 0.98);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #04130b;
    background: linear-gradient(135deg, #3de28e, #4bcaf6);
    font-weight: 950;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 1.04rem;
}

.brand small {
    color: var(--muted);
    font-size: 0.84rem;
}

.nav {
    display: grid;
    gap: 5px;
}

.nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    padding: 10px 12px;
    border-radius: 8px;
    font-weight: 760;
}

.nav a:hover,
.nav a.active {
    color: var(--text);
    background: linear-gradient(90deg, rgba(54, 219, 135, 0.18), rgba(54, 219, 135, 0.06));
}

.nav a.active {
    box-shadow: inset 3px 0 0 var(--green);
}

.nav-icon {
    width: 22px;
    text-align: center;
    color: var(--text);
}

.nav b,
.button-badge,
.count-chip {
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    margin-left: auto;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #06120b;
    background: var(--green);
    font-size: 0.75rem;
    font-weight: 950;
}

.sidebar-user {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.sidebar-user span,
.sidebar-user small,
.sidebar-user a {
    display: block;
}

.sidebar-user small {
    color: var(--muted);
}

.sidebar-user a {
    margin-top: 12px;
    color: var(--green);
    font-weight: 900;
}

.main {
    min-width: 0;
    padding: 24px 30px 38px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 24px;
}

.tagline {
    margin: 0 0 8px;
    color: var(--green);
    font-weight: 900;
}

.top-actions,
.button-row,
.scout-actions,
.inline-filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.button,
button {
    appearance: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, #1a2732, #121d27);
    color: var(--text);
    min-height: 42px;
    padding: 10px 14px;
    font: 850 0.92rem/1 var(--font);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

.button:hover,
button:hover {
    border-color: rgba(54, 219, 135, 0.75);
}

.button.primary,
button.primary {
    color: #04140b;
    background: var(--green);
    border-color: var(--green);
}

.button.danger,
button.danger {
    color: #ffdbe0;
    background: #35151c;
    border-color: rgba(255, 77, 93, 0.55);
}

.button.full {
    width: 100%;
}

.link-button {
    min-height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--green);
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #071018;
    color: var(--text);
    padding: 10px 11px;
    font: 650 0.94rem/1.35 var(--font);
}

textarea {
    min-height: 96px;
    resize: vertical;
}

label span {
    display: block;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 900;
    margin-bottom: 6px;
}

.field-autofilled {
    border-color: var(--green) !important;
    box-shadow: 0 0 0 3px rgba(54, 219, 135, 0.18);
}

.is-hidden {
    display: none !important;
}

.panel,
.metric,
.dash-metric,
.login-card,
.property-hero,
.queue-card,
.source-card,
.blocked-card,
.lead-card,
.form-section,
.listing-scout-card {
    background: linear-gradient(180deg, rgba(18, 30, 40, 0.98), rgba(13, 22, 30, 0.98));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.panel,
.form-section {
    padding: 18px;
    margin-bottom: 18px;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.panel-head h2 {
    margin: 0;
}

.panel-head a,
.card-link {
    color: var(--green);
    font-weight: 900;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.dash-metric {
    min-height: 110px;
    padding: 18px;
    position: relative;
    overflow: hidden;
}

.dash-metric::after {
    content: "";
    position: absolute;
    inset: auto 14px 12px auto;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2px solid rgba(145, 168, 181, 0.14);
}

.dash-metric span,
.metric span,
.math-grid span {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 900;
}

.dash-metric strong,
.metric strong {
    display: block;
    margin: 4px 0;
    font-size: 2rem;
    line-height: 1;
}

.dash-metric small {
    color: var(--green);
    font-weight: 800;
}

.dash-metric.warning {
    border-color: rgba(246, 200, 77, 0.48);
}

.dash-metric.danger {
    border-color: rgba(255, 77, 93, 0.42);
}

.command-center {
    display: grid;
    grid-template-columns: minmax(300px, 0.8fr) minmax(480px, 1.3fr) 280px;
    gap: 16px;
    align-items: start;
}

.dashboard-card {
    background: linear-gradient(180deg, rgba(18, 29, 39, 0.96), rgba(9, 17, 24, 0.98));
}

.command-list {
    display: grid;
    gap: 10px;
}

.task-command,
.property-row,
.task-row,
.search-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    background: #09131b;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
}

.task-command small,
.property-row small,
.task-row small,
.search-row small,
td small,
.lead-card small {
    display: block;
    color: var(--muted);
}

.warning-icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #210307;
    background: var(--red);
    font-weight: 950;
}

.dashboard-table {
    display: grid;
    gap: 0;
}

.table-header,
.table-row {
    display: grid;
    grid-template-columns: minmax(170px, 1.6fr) minmax(120px, 1fr) 72px 100px 110px;
    gap: 12px;
    align-items: center;
}

.table-header {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 900;
    padding: 8px 10px;
}

.table-row {
    padding: 12px 10px;
    border-top: 1px solid var(--line-soft);
}

.table-row:hover {
    background: rgba(54, 219, 135, 0.05);
}

.table-row em {
    color: var(--green);
    font-style: normal;
    font-weight: 850;
}

.score-pill,
.score {
    min-width: 42px;
    min-height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 7px;
    font-weight: 950;
}

.deal-rail {
    display: grid;
    gap: 16px;
}

.max-offer-card {
    border-left: 3px solid var(--green);
}

.max-offer-card > strong {
    display: block;
    color: var(--green);
    font-size: 2rem;
}

.max-offer-card dl,
.math-list,
.details {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 7px 12px;
}

.max-offer-card dt,
.math-list dt,
.details dt {
    color: var(--muted);
    font-weight: 800;
}

.max-offer-card dd,
.math-list dd,
.details dd {
    margin: 0;
}

.kill-blocked,
.kill-pass {
    padding: 13px;
    border-radius: 8px;
    border: 1px solid rgba(255, 77, 93, 0.55);
    background: rgba(255, 77, 93, 0.08);
}

.kill-pass {
    border-color: rgba(54, 219, 135, 0.55);
    background: rgba(54, 219, 135, 0.08);
}

.target-icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--green);
    font-size: 3rem;
    margin-bottom: 12px;
    background: rgba(54, 219, 135, 0.08);
}

.lower-dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr 1.25fr 1.3fr;
    gap: 16px;
    margin-top: 16px;
}

.gauge {
    width: 132px;
    height: 132px;
    margin: 6px auto 14px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at center, var(--panel) 0 56%, transparent 57%),
        conic-gradient(var(--green) 0 var(--gauge), var(--orange) var(--gauge) 76%, #243440 76% 100%);
}

.gauge strong,
.gauge span {
    grid-area: 1 / 1;
}

.gauge strong {
    transform: translateY(-8px);
    font-size: 1.7rem;
}

.gauge span {
    transform: translateY(18px);
    color: var(--muted);
    font-weight: 800;
}

.progress {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #253541;
    margin-bottom: 14px;
}

.progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--green), #67e36f);
}

.mini-checks {
    display: grid;
    gap: 9px;
}

.mini-checks span {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    color: var(--muted);
}

.dot-ok,
.dot-wait {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--green);
}

.dot-wait {
    background: transparent;
    border: 2px solid var(--yellow);
}

.mini-checks em {
    color: var(--green);
    font-style: normal;
    font-size: 0.78rem;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.quick-grid a {
    min-height: 54px;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    background: #17232e;
    border: 1px solid var(--line);
    font-weight: 850;
}

.external-link-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(180px, 1fr));
    gap: 12px;
}

.external-link-card {
    min-height: 96px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(73, 199, 245, 0.12), transparent 45%),
        #071018;
}

.external-link-card:hover {
    border-color: rgba(54, 219, 135, 0.7);
    transform: translateY(-1px);
}

.external-link-card strong {
    color: var(--text);
}

.external-link-card small {
    color: var(--muted);
    font-weight: 750;
}

.map-links-panel .tiny {
    margin: 12px 0 0;
}

.profit-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.profit-strip span {
    color: var(--muted);
    font-weight: 850;
}

.profit-strip strong,
.positive {
    color: var(--green);
}

.negative {
    color: var(--red);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.metric-grid.compact {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.metric {
    padding: 16px;
}

.metric.wide {
    grid-column: span 2;
}

.metric.success {
    border-color: rgba(54, 219, 135, 0.55);
}

.metric.warning {
    border-color: rgba(246, 200, 77, 0.55);
}

.metric.danger {
    border-color: rgba(255, 77, 93, 0.55);
}

.two-col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
}

.potential-grid,
.source-grid,
.lead-grid,
.property-image-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.property-image-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.scoreline {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
}

.scoreline strong {
    font-size: 1.8rem;
}

.scoreline span {
    color: var(--green);
    font-weight: 900;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.compact-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.span-2 {
    grid-column: span 2;
}

.listing-scout-card {
    padding: 20px;
    border-color: rgba(54, 219, 135, 0.48);
    background:
        linear-gradient(135deg, rgba(54, 219, 135, 0.13), transparent 35%),
        linear-gradient(180deg, rgba(18, 31, 41, 0.98), rgba(9, 17, 24, 0.98));
}

.listing-scout-copy {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.scout-icon {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: var(--green);
    color: #04140b;
    font-size: 2rem;
    font-weight: 950;
}

.listing-scout-copy h2 {
    font-size: 1.45rem;
    margin-bottom: 4px;
}

.listing-scout-copy p {
    color: var(--muted);
    margin-bottom: 0;
}

.scout-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.scout-text {
    display: block;
    margin-top: 12px;
}

.fetch-status {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: rgba(7, 16, 24, 0.82);
    color: var(--muted);
}

.fetch-status.success {
    border-color: rgba(54, 219, 135, 0.62);
}

.fetch-status.warning,
.fetch-status.error {
    border-color: rgba(255, 77, 93, 0.62);
}

.confidence-chip {
    display: inline-flex;
    margin-left: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    color: #04140b;
    background: var(--green);
    font-weight: 950;
}

.checkline {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
}

.checkline input {
    width: auto;
    min-height: auto;
}

.checkline span {
    margin: 0;
    color: var(--text);
}

.sticky-actions,
.mobile-sticky {
    position: sticky;
    bottom: 0;
    z-index: 20;
    display: flex;
    gap: 10px;
    padding: 12px;
    margin: 12px -12px -12px;
    background: rgba(6, 11, 16, 0.92);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.mobile-sticky {
    display: none;
}

.flash,
.callout {
    border: 1px solid var(--line);
    background: var(--panel-3);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 14px;
}

.flash.success,
.callout.success {
    border-color: rgba(54, 219, 135, 0.55);
}

.flash.error,
.callout.error {
    border-color: rgba(255, 77, 93, 0.55);
}

.flash.warning,
.callout.warning {
    border-color: rgba(246, 200, 77, 0.6);
}

.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}

.login-card {
    width: min(460px, 100%);
    padding: 24px;
}

.login-brand {
    margin-bottom: 20px;
}

.muted,
.empty {
    color: var(--muted);
}

.tiny {
    font-size: 0.82rem;
}

.list {
    display: grid;
    gap: 10px;
}

.risk-dot {
    width: 10px;
    height: 34px;
    border-radius: 999px;
}

.risk-green {
    background: var(--green);
    color: #06120b;
}

.risk-yellow {
    background: var(--yellow);
    color: #151106;
}

.risk-orange {
    background: var(--orange);
    color: #170801;
}

.risk-red {
    background: var(--red);
    color: #190206;
}

.risk-black {
    background: var(--black-risk);
    color: #fff;
    border-color: #444;
}

.score.big {
    width: 66px;
    height: 66px;
    font-size: 1.6rem;
}

.badge,
.status,
.verified,
.flag {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.badge.high,
.badge.critical,
.badge.danger,
.badge.error {
    border-color: rgba(255, 77, 93, 0.6);
    color: #ffd7dc;
}

.badge.success {
    border-color: rgba(54, 219, 135, 0.55);
    color: #b8ffd8;
}

.flag {
    margin: 0 6px 6px 0;
    text-transform: none;
}

.flag.red {
    color: #ffd7dc;
    border-color: rgba(255, 77, 93, 0.55);
}

.flag.green {
    color: #b8ffd8;
    border-color: rgba(54, 219, 135, 0.55);
}

.property-hero {
    padding: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 14px;
    margin-bottom: 14px;
    border-left-width: 6px;
}

.hero-title-row {
    display: flex;
    gap: 14px;
    align-items: center;
}

.property-hero h2 {
    font-size: 1.5rem;
    margin: 0 0 4px;
}

.property-hero p {
    color: var(--muted);
    margin-bottom: 0;
}

.next-action {
    margin: 14px 0 0;
    color: var(--text) !important;
}

.status-form {
    align-self: center;
}

.section-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 0 14px;
    margin-bottom: 8px;
}

.section-nav a {
    white-space: nowrap;
    color: var(--muted);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 10px;
    font-weight: 850;
}

.details {
    grid-template-columns: 150px 1fr;
}

.flag-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.math-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.math-grid div {
    background: #09131b;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
}

.math-grid strong {
    font-size: 1.25rem;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 10px;
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.sortable th {
    cursor: pointer;
}

.actions {
    white-space: nowrap;
}

.actions a {
    color: var(--green);
    margin-right: 10px;
    font-weight: 850;
}

.check-category {
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.check-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 170px minmax(220px, 1.4fr);
    gap: 10px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--line-soft);
}

.contractor-row {
    grid-template-columns: minmax(180px, 1fr) 150px 120px minmax(220px, 1.4fr);
}

.queue-board {
    display: grid;
    grid-template-columns: repeat(5, minmax(260px, 1fr));
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.queue-column {
    min-width: 260px;
    background: #071018;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px;
}

.queue-column h2 {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.85rem;
}

.queue-card {
    padding: 12px;
    margin-bottom: 10px;
    border-left-width: 5px;
}

.queue-card small {
    color: var(--muted);
    display: block;
}

.queue-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
}

.blocked-card,
.source-card,
.lead-card,
.property-image-card,
.analysis-box,
.note {
    background: #09131b;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
}

.blocked-card small,
.source-card small {
    color: var(--muted);
    display: block;
}

.blocked-panel {
    border-color: rgba(255, 77, 93, 0.7);
}

.source-card a,
.property-image-card a {
    color: var(--green);
    display: inline-block;
    margin: 6px 8px 6px 0;
    font-weight: 850;
}

.lead-thumb,
.property-image-card img,
.image-preview-row img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #05090d;
}

.lead-thumb {
    margin-bottom: 10px;
}

.image-preview-row {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin-top: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #09131b;
}

.toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px auto auto;
    gap: 10px;
    margin-bottom: 14px;
}

.prose {
    max-width: 900px;
}

.report {
    max-width: 1100px;
    margin: 0 auto;
}

.report-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.photo-grid div {
    height: 150px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: #071018;
}

@media (max-width: 1380px) {
    .dashboard-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .command-center {
        grid-template-columns: 1fr 1fr;
    }

    .deal-rail {
        grid-column: 1 / -1;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .lower-dashboard {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .nav {
        display: flex;
        overflow-x: auto;
    }

    .nav a {
        white-space: nowrap;
    }

    .metric-grid,
    .metric-grid.compact,
    .dashboard-grid,
    .two-col,
    .potential-grid,
    .property-hero,
    .command-center,
    .deal-rail,
    .lower-dashboard {
        grid-template-columns: 1fr 1fr;
    }

    .source-grid,
    .lead-grid,
    .property-image-grid,
    .external-link-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 740px) {
    body {
        font-size: 14px;
    }

    .main {
        padding: 16px;
    }

    .topbar,
    .report-head {
        flex-direction: column;
        align-items: stretch;
    }

    .top-actions,
    .scout-actions {
        width: 100%;
    }

    .top-actions .button,
    .scout-actions .button {
        flex: 1;
    }

    .dashboard-grid,
    .command-center,
    .deal-rail,
    .lower-dashboard,
    .metric-grid,
    .metric-grid.compact,
    .form-grid,
    .compact-form,
    .math-grid,
    .flag-columns,
    .source-grid,
    .lead-grid,
    .property-image-grid,
    .external-link-grid,
    .toolbar,
    .scout-controls {
        grid-template-columns: 1fr;
    }

    .span-2,
    .metric.wide {
        grid-column: auto;
    }

    .table-header {
        display: none;
    }

    .table-row,
    .property-row,
    .task-row,
    .task-command,
    .search-row,
    .check-row,
    .contractor-row,
    .image-preview-row {
        grid-template-columns: 1fr;
    }

    .details {
        grid-template-columns: 1fr;
    }

    .mobile-sticky {
        display: flex;
    }

    .sticky-actions {
        flex-wrap: wrap;
    }
}

@media print {
    body {
        background: #fff;
        color: #000;
    }

    .sidebar,
    .topbar,
    .section-nav,
    .mobile-sticky,
    .sticky-actions,
    .print-button,
    .button,
    button {
        display: none !important;
    }

    .app-shell {
        display: block;
    }

    .main {
        padding: 0;
    }

    .panel,
    .metric,
    .report {
        box-shadow: none;
        background: #fff;
        color: #000;
        border-color: #bbb;
        break-inside: avoid;
    }

    a {
        color: #000;
    }
}

/* Tax Radar / Official County Tax Check */
.tax-check-panel {
    border-left: 3px solid var(--accent, #36db87);
}
.tax-status-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 12px 0 16px;
}
.tax-status-grid > div {
    padding: 14px;
    border: 1px solid rgba(116, 153, 174, .24);
    border-radius: 12px;
    background: rgba(4, 12, 18, .72);
}
.tax-status-grid span {
    display: block;
    color: var(--muted, #8facbf);
    font-weight: 800;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .035em;
}
.tax-status-grid strong {
    display: block;
    margin-top: 6px;
    color: var(--text, #f3f8fb);
    font-size: 1.4rem;
}
.compact-details {
    margin-top: 16px;
}
.parsed-tax-result {
    margin-top: 16px;
    border: 1px solid rgba(54, 219, 135, .3);
    border-radius: 14px;
    padding: 14px;
    background: rgba(54, 219, 135, .055);
}
@media (max-width: 900px) {
    .tax-status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 560px) {
    .tax-status-grid {
        grid-template-columns: 1fr;
    }
}

/* Settings key confirmation patch */
.settings-form .settings-divider {
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    color: var(--green);
    font-size: 0.78rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.secret-status {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 7px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid var(--line);
    font-size: 0.72rem;
    font-weight: 900;
    color: var(--muted);
    background: rgba(7, 16, 24, 0.62);
}

.secret-status.saved,
.secret-status.configured {
    color: #b8ffd8;
    border-color: rgba(54, 219, 135, 0.55);
    background: rgba(54, 219, 135, 0.08);
}

.secret-status.empty {
    color: var(--muted-2);
    border-color: rgba(145, 168, 181, 0.22);
}
