/* ==========================================================================
   ZONED AIR — Art Deco Financial Terminal
   ========================================================================== */

:root {
    /* Core palette */
    --bg-deep: #070b14;
    --bg-primary: #0c1220;
    --bg-card: #111827;
    --bg-card-hover: #151d2e;
    --bg-input: #0a0f1a;

    /* Gold / Brass accent system */
    --gold: #c9a84c;
    --gold-dim: #8b7635;
    --gold-bright: #e4c76b;
    --gold-glow: rgba(201, 168, 76, 0.12);
    --gold-border: rgba(201, 168, 76, 0.2);

    /* Text */
    --text-primary: #e8e4dc;
    --text-secondary: #8b8577;
    --text-muted: #55514a;
    --text-gold: var(--gold);

    /* Semantic */
    --positive: #34d399;
    --negative: #f87171;
    --warning-bg: rgba(245, 158, 11, 0.08);
    --warning-border: rgba(245, 158, 11, 0.3);
    --warning-text: #fbbf24;

    /* Zoning colors */
    --zone-residential: #3b82f6;
    --zone-commercial: #ef4444;
    --zone-manufacturing: #a855f7;
    --zone-mixed: #f59e0b;
    --zone-other: #6b7280;

    /* Chart palette */
    --chart-gdv: #34d399;
    --chart-hard: #f87171;
    --chart-soft: #fb923c;
    --chart-profit: #c084fc;
    --chart-residual: var(--gold);

    /* Spacing & sizing */
    --header-h: 64px;
    --radius: 4px;
    --radius-lg: 8px;

    /* Fonts */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Outfit', -apple-system, sans-serif;
    --font-mono: 'DM Mono', 'SF Mono', monospace;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--bg-deep);
    min-height: 100vh;
    overflow: hidden;
}

/* Utility */
.mono { font-family: var(--font-mono); letter-spacing: -0.02em; }
.right { text-align: right; }

/* ==========================================================================
   Deco Corners — Art Deco frame elements
   ========================================================================== */
.deco-corner {
    position: fixed;
    width: 48px;
    height: 48px;
    z-index: 100;
    pointer-events: none;
    opacity: 0.25;
}
.deco-corner::before,
.deco-corner::after {
    content: '';
    position: absolute;
    background: var(--gold);
}
.deco-corner--tl { top: 8px; left: 8px; }
.deco-corner--tl::before { top: 0; left: 0; width: 48px; height: 1px; }
.deco-corner--tl::after { top: 0; left: 0; width: 1px; height: 48px; }
.deco-corner--tr { top: 8px; right: 8px; }
.deco-corner--tr::before { top: 0; right: 0; width: 48px; height: 1px; }
.deco-corner--tr::after { top: 0; right: 0; width: 1px; height: 48px; }
.deco-corner--bl { bottom: 8px; left: 8px; }
.deco-corner--bl::before { bottom: 0; left: 0; width: 48px; height: 1px; }
.deco-corner--bl::after { bottom: 0; left: 0; width: 1px; height: 48px; }
.deco-corner--br { bottom: 8px; right: 8px; }
.deco-corner--br::before { bottom: 0; right: 0; width: 48px; height: 1px; }
.deco-corner--br::after { bottom: 0; right: 0; width: 1px; height: 48px; }

/* ==========================================================================
   Header
   ========================================================================== */
.header {
    height: var(--header-h);
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--gold-border);
    background: linear-gradient(180deg, rgba(201,168,76,0.04) 0%, transparent 100%);
    gap: 24px;
    position: relative;
    z-index: 50;
}

.header__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.header__icon {
    width: 32px;
    height: 32px;
    color: var(--gold);
}

.header__title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.35rem;
    letter-spacing: 0.18em;
    color: var(--gold);
    line-height: 1;
}

.header__subtitle {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.header__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Search */
.header__search {
    flex: 1;
    max-width: 520px;
    position: relative;
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    height: 38px;
    padding: 0 40px 0 36px;
    background: var(--bg-input);
    border: 1px solid var(--gold-border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input::placeholder {
    color: var(--text-muted);
    font-family: var(--font-body);
}

.search-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-glow);
}

.search-spinner {
    position: absolute;
    right: 12px;
    width: 16px;
    height: 16px;
    border: 2px solid var(--gold-border);
    border-top-color: var(--gold);
    border-radius: 50%;
    display: none;
}

.search-spinner.active {
    display: block;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    list-style: none;
    background: var(--bg-card);
    border: 1px solid var(--gold-border);
    border-radius: var(--radius);
    max-height: 320px;
    overflow-y: auto;
    display: none;
    z-index: 60;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}

.search-results.active {
    display: block;
    animation: slideDown 0.15s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-results li {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.1s;
}

.search-results li:hover,
.search-results li.active {
    background: var(--gold-glow);
}

.search-results li:last-child {
    border-bottom: none;
}

.search-result__address {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.search-result__meta {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.header__meta {
    flex-shrink: 0;
}

.header__data-tag {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    border: 1px solid rgba(255,255,255,0.06);
    padding: 3px 8px;
    border-radius: 2px;
}

/* ==========================================================================
   Main Layout
   ========================================================================== */
.main {
    display: flex;
    height: calc(100vh - var(--header-h));
}

/* ==========================================================================
   Panel — Map
   ========================================================================== */
.panel {
    position: relative;
}

.panel--map {
    flex: 0 0 60%;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--gold-border);
}

.panel__chrome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: var(--bg-primary);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    flex-shrink: 0;
}

.panel__label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Toggle */
.toggle-control {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.toggle-control input { display: none; }

.toggle-control__track {
    width: 32px;
    height: 18px;
    background: var(--bg-input);
    border: 1px solid var(--gold-border);
    border-radius: 9px;
    position: relative;
    transition: background 0.2s, border-color 0.2s;
}

.toggle-control__track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: transform 0.2s, background 0.2s;
}

.toggle-control input:checked + .toggle-control__track {
    background: var(--gold-glow);
    border-color: var(--gold);
}

.toggle-control input:checked + .toggle-control__track::after {
    transform: translateX(14px);
    background: var(--gold);
}

.toggle-control__label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.map-container {
    flex: 1;
    background: var(--bg-deep);
    min-height: 0;
}

/* Leaflet overrides for dark theme */
.leaflet-container {
    background: var(--bg-deep);
    font-family: var(--font-body);
}

.leaflet-control-zoom a {
    background: var(--bg-card) !important;
    color: var(--text-secondary) !important;
    border-color: rgba(255,255,255,0.08) !important;
}

.leaflet-control-zoom a:hover {
    background: var(--bg-card-hover) !important;
    color: var(--gold) !important;
}

.leaflet-control-attribution {
    background: rgba(12, 18, 32, 0.8) !important;
    color: var(--text-muted) !important;
    font-size: 0.6rem !important;
}

.leaflet-control-attribution a {
    color: var(--text-secondary) !important;
}

.zone-tooltip {
    background: rgba(12, 18, 32, 0.92) !important;
    border: 1px solid var(--gold-border) !important;
    color: var(--gold) !important;
    font-family: var(--font-mono) !important;
    font-size: 0.75rem !important;
    padding: 3px 8px !important;
    border-radius: 3px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4) !important;
}

.zone-tooltip::before {
    border-top-color: var(--gold-border) !important;
}

/* Map legend */
.map-legend {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: rgba(12, 18, 32, 0.92);
    backdrop-filter: blur(8px);
    border: 1px solid var(--gold-border);
    border-radius: var(--radius);
    padding: 10px 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    z-index: 10;
}

.map-legend__title {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-right: 4px;
}

.map-legend__item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.map-legend__item i {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
}

/* ==========================================================================
   Panel — Detail
   ========================================================================== */
.panel--detail {
    flex: 0 0 40%;
    overflow-y: auto;
    background: var(--bg-primary);
    scroll-behavior: smooth;
}

.panel--detail::-webkit-scrollbar { width: 6px; }
.panel--detail::-webkit-scrollbar-track { background: transparent; }
.panel--detail::-webkit-scrollbar-thumb {
    background: var(--gold-border);
    border-radius: 3px;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px;
    text-align: center;
}

.empty-state__deco svg {
    width: 100px;
    height: 100px;
    color: var(--gold-dim);
    margin-bottom: 24px;
    opacity: 0.5;
}

.empty-state__title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 8px;
}

.empty-state__text {
    color: var(--text-muted);
    max-width: 280px;
    line-height: 1.6;
}

/* Loading */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 20px;
}

.loading-state__bars {
    display: flex;
    gap: 4px;
    align-items: flex-end;
    height: 40px;
}

.loading-bar {
    width: 6px;
    background: var(--gold);
    border-radius: 2px;
    animation: loadPulse 1.2s ease-in-out infinite;
}

.loading-bar:nth-child(1) { height: 12px; animation-delay: 0s; }
.loading-bar:nth-child(2) { height: 20px; animation-delay: 0.1s; }
.loading-bar:nth-child(3) { height: 32px; animation-delay: 0.2s; }
.loading-bar:nth-child(4) { height: 24px; animation-delay: 0.3s; }
.loading-bar:nth-child(5) { height: 16px; animation-delay: 0.4s; }

@keyframes loadPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
}

.loading-state__text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
    margin: 12px;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: var(--radius-lg);
    overflow: hidden;
    animation: cardIn 0.35s ease-out both;
}

.card:nth-child(2) { animation-delay: 0.05s; }
.card:nth-child(3) { animation-delay: 0.1s; }
.card:nth-child(4) { animation-delay: 0.15s; }
.card:nth-child(5) { animation-delay: 0.2s; }
.card:nth-child(6) { animation-delay: 0.25s; }
.card:nth-child(7) { animation-delay: 0.3s; }
.card:nth-child(8) { animation-delay: 0.35s; }

@keyframes cardIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 0;
}

.card__label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    color: var(--gold-dim);
    text-transform: uppercase;
}

/* ── Zoning Explained Card ── */
.card--zoning {
    border-color: rgba(255, 255, 255, 0.06);
}

.zoning-explained {
    padding: 4px 16px 16px;
}

.zone-entry {
    padding: 0;
}

.zone-entry + .zone-entry {
    padding-top: 4px;
}

.zone-entry__header {
    margin-bottom: 10px;
}

.zone-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-left: 3px solid var(--zone-accent, var(--gold));
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.zone-badge__code {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 0.04em;
}

.zone-badge__category {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    opacity: 0.8;
}

.zone-entry__name {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1.3;
    margin-bottom: 6px;
}

.zone-entry__desc {
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* Use pills */
.zone-uses {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.zone-use-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.03em;
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    background: transparent;
    opacity: 0.45;
    transition: all 0.2s ease;
}

.zone-use-pill--active {
    opacity: 1;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.zone-use-pill--active[data-use="residential"] {
    border-color: rgba(59, 130, 246, 0.4);
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.08);
}

.zone-use-pill--active[data-use="commercial"] {
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.08);
}

.zone-use-pill--active[data-use="manufacturing"] {
    border-color: rgba(168, 85, 247, 0.4);
    color: #d8b4fe;
    background: rgba(168, 85, 247, 0.08);
}

.zone-use-pill svg {
    flex-shrink: 0;
}

/* Building types */
.zone-building-types {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.zone-building-types__label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    flex-shrink: 0;
}

.zone-building-types__value {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

/* FAR grid */
.zone-far-grid {
    display: flex;
    gap: 1px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 8px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.zone-far-item {
    flex: 1;
    padding: 8px 10px;
    background: var(--bg-card);
    text-align: center;
}

.zone-far-item__value {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 3px;
}

.zone-far-item__label {
    display: block;
    font-size: 0.58rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

/* Split zone divider */
.zone-split-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0 10px;
}

.zone-split-divider__line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-border), transparent);
}

.zone-split-divider__label {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    letter-spacing: 0.2em;
    color: var(--gold-dim);
    flex-shrink: 0;
}

/* Air Rights Hero Card */
.card--air-rights {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.06) 0%, var(--bg-card) 60%);
    border-color: rgba(52, 211, 153, 0.2);
}

.card--air-rights.no-rights {
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.04) 0%, var(--bg-card) 60%);
    border-color: rgba(248, 113, 113, 0.15);
}

/* Not-feasible (negative residual) value card */
.card--value.not-feasible {
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.06) 0%, var(--bg-card) 60%);
    border-color: rgba(248, 113, 113, 0.25);
}

.card--value.not-feasible .value-hero__amount {
    color: var(--negative);
}

.card--value.not-feasible .value-hero__per em {
    color: var(--negative);
}

.air-rights-hero {
    padding: 16px;
}

.air-rights-hero__primary {
    text-align: center;
    margin-bottom: 14px;
}

.air-rights-hero__sf {
    font-family: var(--font-display);
    font-size: 2.6rem;
    font-weight: 900;
    color: var(--positive);
    line-height: 1;
    display: block;
}

.no-rights .air-rights-hero__sf {
    color: var(--text-muted);
}

.air-rights-hero__unit {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 0.06em;
    margin-top: 4px;
    display: block;
}

.air-rights-hero__context {
    display: flex;
    justify-content: center;
    gap: 24px;
    border-top: 1px solid rgba(255,255,255,0.04);
    padding-top: 12px;
}

.air-rights-stat {
    text-align: center;
}

.air-rights-stat__value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

.air-rights-stat__label {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 2px;
    display: block;
}

/* Property Card */
.property-address {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    padding: 8px 16px 12px;
    line-height: 1.2;
}

.property-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: rgba(255,255,255,0.03);
    border-top: 1px solid rgba(255,255,255,0.04);
}

.meta-item {
    padding: 10px 16px;
    background: var(--bg-card);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.meta-item__label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.meta-item__value {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* FAR Card */
.far-bars {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.far-bar-group {}

.far-bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.far-bar-track {
    height: 8px;
    background: rgba(255,255,255,0.04);
    border-radius: 4px;
    overflow: hidden;
}

.far-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    width: 0;
}

.far-bar-fill--built { background: var(--text-secondary); }
.far-bar-fill--max { background: var(--gold); }
.far-bar-fill--unused { background: var(--positive); }

.far-summary {
    display: flex;
    border-top: 1px solid rgba(255,255,255,0.04);
}

.far-summary__item {
    flex: 1;
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.far-summary__item + .far-summary__item {
    border-left: 1px solid rgba(255,255,255,0.04);
}

.far-summary__label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.far-summary__value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    text-transform: capitalize;
}

/* Value Card */
.card--value {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(201,168,76,0.06) 100%);
    border-color: var(--gold-border);
}

.value-hero {
    padding: 16px;
    text-align: center;
}

.value-hero__amount {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--gold-bright);
    line-height: 1;
    display: block;
    margin-bottom: 8px;
}

.value-hero__per {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.value-hero__per em {
    font-style: normal;
    font-family: var(--font-mono);
    color: var(--gold);
}

/* Chart Card */
.chart-container {
    padding: 12px 16px 16px;
    height: 220px;
}

/* Assumptions */
.assumptions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 14px 16px;
}

.assumption-field label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    letter-spacing: 0.02em;
}

.input-wrap {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius);
    transition: border-color 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.input-wrap:focus-within {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-glow);
}

.input-prefix,
.input-suffix {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0 6px;
    flex-shrink: 0;
}

.input-prefix { padding-left: 10px; }
.input-suffix { padding-right: 10px; }

.input-wrap input {
    flex: 1;
    min-width: 0;
    height: 34px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    outline: none;
    padding: 0 4px;
}

.input-wrap input::-webkit-inner-spin-button {
    opacity: 0;
}

.btn-reset {
    background: none;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius);
    color: var(--text-muted);
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, border-color 0.15s;
}

.btn-reset:hover {
    color: var(--gold);
    border-color: var(--gold-border);
}

/* Breakdown Table */
.breakdown-table {
    width: 100%;
    border-collapse: collapse;
}

.breakdown-table td {
    padding: 10px 16px;
    font-size: 0.82rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.breakdown-table tr:last-child td {
    border-bottom: none;
}

.breakdown-table tr.deduction td:first-child::before {
    content: '−';
    margin-right: 6px;
    color: var(--negative);
    font-family: var(--font-mono);
}

.breakdown-table tr.deduction td:last-child {
    color: var(--negative);
}

.breakdown-table tr.total {
    border-top: 2px solid var(--gold-border);
}

.breakdown-table tr.total td {
    font-weight: 600;
    color: var(--gold-bright);
    padding-top: 12px;
    font-size: 0.9rem;
}

/* Warnings */
.warnings {
    padding: 12px 12px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.warning-banner {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--radius);
    font-size: 0.78rem;
    line-height: 1.4;
    animation: cardIn 0.3s ease-out both;
}

.warning-banner--caution {
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    color: var(--warning-text);
}

.warning-banner--info {
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.warning-banner__icon {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    margin-top: 1px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
    .main {
        flex-direction: column;
        overflow-y: auto;
    }

    .panel--map {
        flex: none;
        height: 45vh;
        border-right: none;
        border-bottom: 1px solid var(--gold-border);
    }

    .panel--detail {
        flex: 1;
        overflow-y: visible;
    }

    .header {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 16px;
        gap: 12px;
    }

    .header__search {
        order: 3;
        max-width: none;
        width: 100%;
    }
}

/* ==========================================================================
   Map marker pulse
   ========================================================================== */
.marker-pulse {
    width: 18px;
    height: 18px;
    position: relative;
}

.marker-pulse::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--gold);
    animation: pulse 2s ease-out infinite;
}

.marker-pulse::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gold-bright);
    border: 2px solid var(--bg-deep);
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* Property dots on map */
.prop-dot {
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.5);
    transition: transform 0.15s ease;
    cursor: pointer;
}
.prop-dot:hover {
    transform: scale(1.6);
    z-index: 1000 !important;
}
.dot--high {
    background: var(--positive);
    box-shadow: 0 0 4px rgba(52, 211, 153, 0.5);
}
.dot--medium {
    background: var(--gold);
    box-shadow: 0 0 4px rgba(201, 168, 76, 0.4);
}
.dot--low {
    background: #fb923c;
    box-shadow: 0 0 3px rgba(251, 146, 60, 0.3);
}
.dot--full {
    background: #4b5563;
    opacity: 0.6;
}
.dot--nodata {
    background: #374151;
    opacity: 0.35;
}

.dot-tooltip {
    background: rgba(12, 18, 32, 0.92) !important;
    border: 1px solid var(--gold-border) !important;
    color: var(--text-primary) !important;
    font-family: 'DM Mono', monospace !important;
    font-size: 0.7rem !important;
    padding: 4px 8px !important;
    border-radius: var(--radius) !important;
    white-space: pre-line !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5) !important;
}
.dot-tooltip::before {
    border-top-color: var(--gold-border) !important;
}

/* Error toast */
.error-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #1c1011;
    border: 1px solid rgba(248,113,113,0.3);
    color: #fca5a5;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 0.8rem;
    z-index: 200;
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s;
    pointer-events: none;
}

.error-toast.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
