/* ========================================
   Plot Finder — Design System
   Swiss-inspired dark theme
   ======================================== */

:root {
    /* Swiss palette */
    --swiss-red: #e94560;
    --swiss-red-dark: #c73550;
    --swiss-red-glow: rgba(233, 69, 96, 0.3);
    
    /* Dark theme */
    --bg-primary: #0a0a12;
    --bg-secondary: #12121e;
    --bg-tertiary: #1a1a2e;
    --bg-card: rgba(26, 26, 46, 0.8);
    --bg-card-hover: rgba(30, 30, 55, 0.9);
    --bg-glass: rgba(18, 18, 30, 0.85);
    --bg-glass-border: rgba(255, 255, 255, 0.06);
    
    /* Text */
    --text-primary: #f0f0f5;
    --text-secondary: #9595a8;
    --text-muted: #5a5a72;
    --text-accent: #e94560;
    
    /* Accents */
    --accent-blue: #4361ee;
    --accent-green: #2ec4b6;
    --accent-amber: #f0a500;
    --accent-purple: #7b2ff7;
    
    /* Scoring colors */
    --score-high: #e94560;
    --score-medium: #f0a500;
    --score-low: #2ec4b6;
    
    /* Borders & shadows */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-active: rgba(233, 69, 96, 0.4);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(233, 69, 96, 0.15);
    
    /* Layout */
    --header-height: 56px;
    --sidebar-width: 380px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
}

/* ========================================
   Reset & Base
   ======================================== */

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

html, body {
    height: 100%;
    overflow: hidden;
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
}

/* ========================================
   Scrollbar
   ======================================== */

::-webkit-scrollbar {
    width: 5px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ========================================
   Header
   ======================================== */

#app-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 100;
    position: relative;
}

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

.logo {
    color: var(--swiss-red);
    display: flex;
    align-items: center;
}

.header-title h1 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-primary), var(--swiss-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.02em;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-btn {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    position: relative;
}

.header-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-active);
}

.badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--swiss-red);
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ========================================
   Main Layout
   ======================================== */

#app-main {
    display: flex;
    height: calc(100vh - var(--header-height));
}

/* ========================================
   Sidebar
   ======================================== */

#sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    padding: 12px;
}

/* Panels */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(12px);
    overflow: hidden;
    margin-bottom: 8px;
    animation: panelIn 0.3s ease-out;
}

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

.panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
}

.panel-header svg {
    opacity: 0.6;
}

.panel-close {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition-fast);
}
.panel-close:hover {
    color: var(--swiss-red);
}

.panel-body {
    padding: 14px;
}

.panel-actions {
    padding: 10px 14px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    gap: 8px;
}

.panel-info .panel-body {
    padding: 12px 14px;
}

/* ========================================
   Search
   ======================================== */

.search-input-wrap {
    position: relative;
}

.search-input-wrap input,
.search-input-wrap select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 13px;
    outline: none;
    transition: border-color var(--transition-fast);
}

.search-input-wrap select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0aec0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}

.search-input-wrap input::placeholder {
    color: var(--text-muted);
}

.search-input-wrap input:focus,
.search-input-wrap select:focus {
    border-color: var(--swiss-red);
    box-shadow: 0 0 0 3px var(--swiss-red-glow);
}

.search-results {
    margin-top: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.search-result-item {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-result-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.search-result-item .result-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--swiss-red);
    font-weight: 600;
    flex-shrink: 0;
}

.search-result-item .result-name {
    font-weight: 500;
    color: var(--text-primary);
}

.search-result-item .result-detail {
    font-size: 11px;
    color: var(--text-muted);
}

/* ========================================
   Parcel Info
   ======================================== */

.parcel-detail {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.parcel-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.parcel-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 500;
}

.parcel-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.parcel-value.highlight {
    color: var(--swiss-red);
}

/* ========================================
   Analysis
   ======================================== */

.analysis-score {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.score-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
    position: relative;
}

.score-circle::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid currentColor;
    opacity: 0.3;
}

.score-high { background: var(--score-high); color: var(--score-high); }
.score-medium { background: var(--score-medium); color: var(--score-medium); }
.score-low { background: var(--score-low); color: var(--score-low); }

.score-circle span { color: white; position: relative; z-index: 1; }

.score-label {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.score-label strong {
    display: block;
    font-size: 14px;
    color: var(--text-primary);
}

.analysis-factors {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.factor-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-secondary);
}

.factor-icon {
    font-size: 14px;
}

.factor-item.positive { border-left: 3px solid var(--score-high); }
.factor-item.neutral { border-left: 3px solid var(--score-medium); }
.factor-item.negative { border-left: 3px solid var(--score-low); }

/* ========================================
   Legal Info
   ======================================== */

.legal-info p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 6px;
}

.legal-info strong {
    color: var(--swiss-red);
    font-family: var(--font-mono);
    font-size: 11px;
}

.legal-note {
    margin-top: 8px;
    padding: 8px 10px;
    background: rgba(233, 69, 96, 0.08);
    border: 1px solid rgba(233, 69, 96, 0.15);
    border-radius: var(--radius-sm);
    font-size: 11px !important;
    color: var(--swiss-red) !important;
}

/* ========================================
   Map
   ======================================== */

#map-container {
    flex: 1;
    position: relative;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
}

/* Override Leaflet styles for dark theme */
.leaflet-container {
    background: var(--bg-primary) !important;
    font-family: var(--font-sans) !important;
}

.leaflet-control-zoom {
    border: none !important;
    box-shadow: var(--shadow-md) !important;
}

.leaflet-control-zoom a {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-subtle) !important;
    width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    font-size: 16px !important;
}

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

.leaflet-control-attribution {
    background: rgba(10, 10, 18, 0.8) !important;
    color: var(--text-muted) !important;
    font-size: 10px !important;
    padding: 2px 8px !important;
}

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

/* Map controls */
#map-controls {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1000;
}

.map-control-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.map-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.map-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.map-btn.active {
    background: var(--swiss-red);
    color: white;
    border-color: var(--swiss-red);
}

/* Coords display */
#coords-display {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-lg);
    padding: 6px 16px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-md);
}

.coords-sep {
    color: var(--text-muted);
}

/* Loading overlay */
#map-loading {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 10, 18, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 13px;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--bg-tertiary);
    border-top-color: var(--swiss-red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-primary {
    background: var(--swiss-red);
    color: white;
    border-color: var(--swiss-red);
}
.btn-primary:hover {
    background: var(--swiss-red-dark);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-color: var(--border-subtle);
}
.btn-secondary:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.btn-accent {
    background: var(--accent-blue);
    color: white;
}
.btn-accent:hover {
    background: #3651de;
    box-shadow: 0 0 20px rgba(67, 97, 238, 0.2);
}

.btn-danger {
    background: transparent;
    color: var(--swiss-red);
    border-color: var(--swiss-red);
}
.btn-danger:hover {
    background: var(--swiss-red);
    color: white;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 11px;
}

/* ========================================
   Modals
   ======================================== */

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-wide {
    max-width: 640px;
}

.modal-letter {
    max-width: 720px;
    max-height: 85vh;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.modal-header h2 {
    font-size: 16px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition-fast);
}
.modal-close:hover {
    color: var(--swiss-red);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--border-subtle);
}

/* ========================================
   Forms
   ======================================== */

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 13px;
    outline: none;
    transition: border-color var(--transition-fast);
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--swiss-red);
    box-shadow: 0 0 0 3px var(--swiss-red-glow);
}

/* ========================================
   Letter
   ======================================== */

.letter-type-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: var(--bg-primary);
    padding: 4px;
    border-radius: var(--radius-sm);
}

.tab-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tab-btn.active {
    background: var(--swiss-red);
    color: white;
}

.tab-btn:hover:not(.active) {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.letter-content {
    background: white;
    color: #1a1a1a;
    padding: 40px;
    border-radius: var(--radius-sm);
    font-family: 'Times New Roman', serif;
    font-size: 13px;
    line-height: 1.7;
    min-height: 400px;
    max-height: 55vh;
    overflow-y: auto;
}

.letter-content .letter-sender {
    margin-bottom: 30px;
}

.letter-content .letter-recipient {
    text-align: right;
    margin-bottom: 30px;
}

.letter-content .letter-place-date {
    margin-bottom: 20px;
}

.letter-content .letter-subject {
    font-weight: bold;
    margin-bottom: 20px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 8px;
}

.letter-content .letter-body p {
    margin-bottom: 12px;
    text-align: justify;
}

.letter-content .letter-signature {
    margin-top: 40px;
}

/* ========================================
   Saved Parcels
   ======================================== */

.saved-parcel-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.saved-parcel-card:hover {
    border-color: var(--border-active);
    background: var(--bg-tertiary);
}

.saved-parcel-info {
    flex: 1;
}

.saved-parcel-info .parcel-id {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.saved-parcel-info .parcel-commune {
    font-size: 12px;
    color: var(--text-secondary);
}

.saved-parcel-actions {
    display: flex;
    gap: 6px;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    padding: 30px 20px;
}

/* ========================================
   Toast
   ======================================== */

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 3000;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    font-size: 13px;
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease-out;
    max-width: 320px;
}

.toast.success {
    border-color: var(--accent-green);
    background: rgba(46, 196, 182, 0.1);
}

.toast.error {
    border-color: var(--swiss-red);
    background: rgba(233, 69, 96, 0.1);
}

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

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

/* ========================================
   Print styles for letter
   ======================================== */

@media print {
    body * {
        visibility: hidden;
    }
    .letter-content, .letter-content * {
        visibility: visible;
    }
    .letter-content {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: white;
        color: black;
        padding: 2cm;
        font-size: 12pt;
    }
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
    #sidebar {
        position: absolute;
        z-index: 1500;
        left: 0;
        top: var(--header-height);
        height: calc(100vh - var(--header-height));
        width: 100%;
        max-width: 380px;
        transform: translateX(-100%);
        transition: transform var(--transition-smooth);
    }
    
    #sidebar.open {
        transform: translateX(0);
    }
}

/* ========================================
   Leaflet popup override
   ======================================== */

.leaflet-popup-content-wrapper {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
    border: 1px solid var(--border-subtle) !important;
}

.leaflet-popup-tip {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-subtle) !important;
}

.leaflet-popup-content {
    margin: 12px 16px !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
}

.popup-title {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 6px;
    color: var(--swiss-red);
}

.popup-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 3px;
}

.popup-label {
    color: var(--text-muted);
    font-size: 11px;
}

.popup-value {
    font-family: var(--font-mono);
    font-size: 11px;
}

/* ========================================
   Commune Plots List & Cards
   ======================================== */

.plots-filter-info {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.4;
}

.plots-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
}

.plot-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-md);
    padding: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.plot-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-active);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.plot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.plot-number {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13px;
}

.score-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    color: #fff;
    text-transform: uppercase;
}

.score-badge-high {
    background-color: var(--score-high);
}

.score-badge-medium {
    background-color: var(--score-medium);
}

.score-badge-low {
    background-color: var(--score-low);
}

.plot-details {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.plot-factors {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.plot-factor-tag {
    font-size: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-sm);
    padding: 1px 6px;
    color: var(--text-muted);
}

.loading-spinner-inline {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--swiss-red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

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

