/* LA Parcel Dashboard - Styles */

/* ===== CSS Variables ===== */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    
    /* Opportunity Status Tokens */
    --opp-candidate: #16a34a;
    --opp-candidate-bg: #f0fdf4;
    --opp-candidate-border: #bbf7d0;
    --opp-monitor: #d97706;
    --opp-monitor-bg: #fffbeb;
    --opp-monitor-border: #fde68a;
    --opp-hold: #2563eb;
    --opp-hold-bg: #eff6ff;
    --opp-hold-border: #bfdbfe;
    --opp-risk: #dc2626;
    --opp-risk-bg: #fef2f2;
    --opp-risk-border: #fecaca;
    
    --bg-color: #f8fafc;
    --bg-secondary: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    --header-height: 70px;
    --sidebar-width: 280px;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Login Page ===== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-box {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.setup-info {
    margin-bottom: 24px;
    padding: 16px;
    background: #f1f5f9;
    border-radius: var(--radius-md);
}

.setup-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.setup-info p {
    font-size: 14px;
    color: var(--text-secondary);
}

.login-form {
    margin-bottom: 20px;
}

.login-footer {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-group input,
.filter-input,
.filter-select {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-input-half {
    width: calc(50% - 5px);
    display: inline-block;
}

.filter-input-half:first-child {
    margin-right: 10px;
}

/* ===== Alerts ===== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #475569;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #059669;
}

.btn-text {
    background: transparent;
    color: var(--primary-color);
    padding: 6px 12px;
}

.btn-text:hover {
    background: #f1f5f9;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-icon {
    margin-right: 6px;
}

.btn-pagination {
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-pagination:hover:not(:disabled) {
    background: #f8fafc;
    border-color: var(--primary-color);
}

/* ===== Dashboard Header ===== */
.dashboard-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-content {
    max-width: 100%;
    height: 100%;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.header-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-right: 8px;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: capitalize;
}

/* ===== Dashboard Layout ===== */
.dashboard-container {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--header-height) - 50px);
}
.dashboard-view-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}
.dashboard-main-area {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* ===== Sidebar ===== */
.sidebar {
    width: var(--sidebar-width);
    background: white;
    border-right: 1px solid var(--border-color);
    padding: 20px;
    overflow-y: auto;
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.filter-section {
    margin-bottom: 24px;
}

.filter-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.filter-select {
    padding: 8px;
}

.filter-select option {
    padding: 4px;
}

.range-inputs {
    display: flex;
    gap: 10px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.filter-checkbox input {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.filter-actions {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid var(--border-color);
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    padding: 24px;
    background: var(--bg-color);
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
}

.stat-icon {
    font-size: 32px;
    line-height: 1;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ===== Table Controls ===== */
.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.table-info {
    font-size: 14px;
    color: var(--text-secondary);
}

.table-actions {
    display: flex;
    gap: 10px;
}

/* ===== Data Table ===== */
.table-container {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #f8fafc;
    border-bottom: 2px solid var(--border-color);
}

.data-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.data-table th:hover {
    background: #f1f5f9;
}

.data-table th.sortable::after {
    content: ' ↕';
    opacity: 0.3;
}

.data-table th.sorted-asc::after {
    content: ' ▲';
    opacity: 1;
    color: var(--primary-color);
}

.data-table th.sorted-desc::after {
    content: ' ▼';
    opacity: 1;
    color: var(--primary-color);
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.data-table td {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-primary);
}

.loading-cell {
    text-align: center;
    padding: 40px !important;
    color: var(--text-muted);
}

.score-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.score-low {
    background: #f1f5f9;
    color: #64748b;
}

.score-moderate {
    background: #dbeafe;
    color: #1e40af;
}

.score-high {
    background: #fef3c7;
    color: #92400e;
}

.score-very-high {
    background: #fee2e2;
    color: #991b1b;
}

/* Subdivision Pills */
.subdiv-pill {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    background: #f1f5f9;
    color: #64748b;
    white-space: nowrap;
}

.subdiv-pill[title] {
    cursor: help;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 0;
}

.pagination-info {
    padding: 0 16px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===== Footer ===== */
.dashboard-footer {
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 16px 24px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== Responsive Design ===== */

/* Tablet (Portrait) */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 250px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .data-table {
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 12px;
    }
}

/* Tablet (Portrait) - Collapse Sidebar */
@media (max-width: 900px) {
    .dashboard-main-area {
        flex-direction: column;
    }
    
    .dashboard-view-bar {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    
    .sidebar {
        width: 100%;
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .filter-section {
        margin-bottom: 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .header-content {
        padding: 0 16px;
    }
    
    .header-left h1 {
        font-size: 16px;
    }
    
    .header-subtitle {
        font-size: 11px;
    }
    
    .user-info {
        display: none;
    }
}

/* Mobile (small screens) */
@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .table-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .pagination .btn-pagination {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* ===== Top 50 Panel ===== */
.top50-panel {
    padding: 1.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.top50-header {
    margin-bottom: 1.25rem;
}
.top50-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.35rem;
}
.top50-subtitle {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin: 0 0 0.5rem;
    line-height: 1.4;
}
.top50-meta {
    font-size: 0.78rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.top50-month {
    font-weight: 600;
    color: var(--text-primary);
}
.top50-meta-sep {
    color: var(--text-secondary);
}
.top50-meta-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 500;
}
.top50-meta-badge.meta-candidate {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.top50-meta-badge.meta-monitor {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}
.top50-row td {
    vertical-align: middle;
}
.top50-rank {
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.8rem;
    width: 40px;
}
.top50-address {
    max-width: 340px;
}
.top50-address a {
    display: block;
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.top50-address a:hover {
    text-decoration: underline;
}
.top50-city {
    display: block;
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 1px;
}
.top50-signal-badge {
    display: inline-block;
    min-width: 32px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}
.top50-signal-badge.signal-high {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.top50-signal-badge.signal-moderate {
    background: #fef9c3;
    color: #a16207;
    border: 1px solid #fde68a;
}
.top50-signal-badge.signal-low {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}
.top50-subdiv-yes {
    color: #15803d;
    font-weight: 500;
    font-size: 0.82rem;
}
.top50-subdiv-yes strong {
    font-weight: 700;
}
.top50-permits-count {
    display: inline-block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}
.top50-permits-val {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 1px;
}
.top50-empty {
    text-align: center;
    padding: 3rem 1rem;
}
.top50-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}
.top50-empty-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}
.top50-empty-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    max-width: 420px;
    margin: 0 auto;
    line-height: 1.45;
}

/* Trigger badges */
.top50-trigger-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 3px;
    font-size: 0.68rem;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    margin: 1px 2px;
}
.top50-trigger-badge.trigger-subdiv {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}
.top50-trigger-badge.trigger-permit {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}
.top50-trigger-badge.trigger-assemblage {
    background: #ede9fe;
    color: #5b21b6;
    border: 1px solid #ddd6fe;
}
.top50-trigger-badge.trigger-ownership {
    background: #fce7f3;
    color: #9d174d;
    border: 1px solid #fbcfe8;
}
.top50-trigger-badge.trigger-signal {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.top50-trigger-badge.trigger-structural {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}
.top50-trigger-badge.trigger-default {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

@media (max-width: 768px) {
    .top50-panel {
        padding: 1rem;
    }
    .top50-address {
        max-width: 200px;
    }
}

/* ===== Development Clusters Panel ===== */
.clusters-panel {
    padding: 1.5rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}
.clusters-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}
.clusters-table-wrap {
    flex: 1;
    min-width: 0;
}
.clusters-map-wrap {
    width: 420px;
    flex-shrink: 0;
    position: sticky;
    top: 1rem;
}
.cluster-map-container {
    width: 100%;
    height: 480px;
    border-radius: 8px;
    border: 1px solid var(--border-color, #e5e7eb);
    z-index: 1;
}
.clusters-meta-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 500;
    background: #ede9fe;
    color: #5b21b6;
    border: 1px solid #ddd6fe;
}
.clusters-meta-badge.meta-parcels {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}
.cluster-area-name {
    font-weight: 500;
    color: var(--primary-color);
    font-size: 0.85rem;
}
.cluster-area-name:hover {
    text-decoration: underline;
}

/* Cluster score badge */
.cluster-score-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 36px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    position: relative;
    z-index: 1;
}
.cluster-score-label {
    font-size: 0.62rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    opacity: 0.85;
}
/* Score cell with background bar */
.cluster-score-cell {
    position: relative;
    overflow: hidden;
}
.cluster-score-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    opacity: 0.1;
    border-radius: 2px;
    transition: width 0.4s ease;
}
.cluster-score-bar[data-cat="cluster-score-high"] { background: #dc2626; }
.cluster-score-bar[data-cat="cluster-score-mid"]  { background: #f97316; }
.cluster-score-bar[data-cat="cluster-score-low"]  { background: #22c55e; }

.cluster-score-badge.cluster-score-high,
.cdm-stat-value.cluster-score-high {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.cluster-score-badge.cluster-score-mid,
.cdm-stat-value.cluster-score-mid {
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #fed7aa;
}
.cluster-score-badge.cluster-score-low,
.cdm-stat-value.cluster-score-low {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* Cluster explanation text */
.cluster-explanation {
    padding: 0.5rem 0.85rem;
    margin-bottom: 0.75rem;
    font-size: 0.76rem;
    color: var(--text-secondary);
    line-height: 1.45;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 6px;
}

/* Cluster popup styles */
.cluster-popup { font-size: 0.82rem; line-height: 1.55; }
.cluster-popup-title { font-weight: 600; font-size: 0.88rem; margin-bottom: 2px; color: #111827; }
.cluster-popup-score { margin-bottom: 3px; color: #374151; }
.cluster-popup-cat { display: inline-block; padding: 1px 6px; border-radius: 8px; font-size: 0.65rem; font-weight: 600; }
.cluster-popup-cat.cluster-score-high { background: #fef2f2; color: #dc2626; }
.cluster-popup-cat.cluster-score-mid  { background: #fff7ed; color: #ea580c; }
.cluster-popup-cat.cluster-score-low  { background: #f0fdf4; color: #16a34a; }
.cluster-popup-row { color: #6b7280; font-size: 0.78rem; }

/* Detail modal extra badges */
.cdm-risk-badge {
    display: inline-block;
    min-width: 28px;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 600;
}
.cdm-risk-badge.risk-high  { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.cdm-risk-badge.risk-mid   { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.cdm-risk-badge.risk-low   { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.cdm-oppty-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 600;
}
.cdm-oppty-badge.oppty-high { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.cdm-oppty-badge.oppty-mid  { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; }
.cdm-oppty-badge.oppty-low  { background: #f9fafb; color: #6b7280; border: 1px solid #e5e7eb; }
.cdm-permit-val {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

/* Activity cell with time + type */
.cluster-activity-cell {
    line-height: 1.35;
}
.cluster-activity-time {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
}
.cluster-activity-type {
    display: block;
    font-size: 0.68rem;
    color: var(--text-secondary);
    margin-top: 1px;
}

.cluster-row:hover {
    background: var(--hover-bg, #f8fafc);
}
.cluster-row-active {
    background: #ede9fe !important;
}

/* ── Map Legend ── */
.cluster-map-legend {
    margin-top: 0.75rem;
    padding: 0.65rem 0.85rem;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 6px;
    font-size: 0.72rem;
}
.cluster-legend-title {
    font-weight: 600;
    font-size: 0.74rem;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}
.cluster-legend-section {
    margin-bottom: 0.35rem;
}
.cluster-legend-section:last-child {
    margin-bottom: 0;
}
.cluster-legend-label {
    color: var(--text-secondary);
    font-size: 0.68rem;
    margin-bottom: 0.2rem;
}
.cluster-legend-items {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}
.cluster-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-primary);
}
.cluster-legend-dot {
    display: inline-block;
    border-radius: 50%;
    background: #94a3b8;
    border: 1.5px solid #fff;
    box-shadow: 0 0 0 1px #cbd5e1;
}
.cluster-dot-sm { width: 8px; height: 8px; }
.cluster-dot-md { width: 13px; height: 13px; }
.cluster-dot-lg { width: 19px; height: 19px; }
.cluster-legend-swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    border: 1px solid rgba(0,0,0,0.1);
}

/* ── Expandable Cluster Row ── */
.cluster-expand-row {
    background: none;
}
.cluster-expand-cell {
    padding: 0 !important;
    border-top: none !important;
}
.cluster-expand-inner {
    background: var(--hover-bg, #f8fafc);
    border-top: 2px solid var(--primary-color, #4f46e5);
    padding: 0.85rem 1rem 1rem;
}
.cex-header {
    margin-bottom: 0.6rem;
}
.cex-title {
    font-size: 0.82rem;
    font-weight: 600;
    margin: 0 0 0.35rem;
    color: var(--text-primary);
}
.cex-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.74rem;
    color: var(--text-secondary);
}
.cex-stat strong {
    font-weight: 600;
    color: var(--text-primary);
}
.cex-stat strong.cluster-score-high { color: #dc2626; }
.cex-stat strong.cluster-score-mid  { color: #ea580c; }
.cex-stat strong.cluster-score-low  { color: #16a34a; }
.cex-table {
    font-size: 0.8rem;
}
.cex-table th {
    font-size: 0.68rem;
}
.cex-address {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 1px;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cex-permit-val {
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
}
.cex-yes {
    color: #16a34a;
    font-weight: 600;
    font-size: 0.75rem;
}
.cex-no {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

@media (max-width: 1024px) {
    .clusters-layout {
        flex-direction: column;
    }
    .clusters-map-wrap {
        width: 100%;
        position: static;
    }
    .cluster-map-container {
        height: 350px;
    }
}
@media (max-width: 768px) {
    .clusters-panel {
        padding: 1rem;
    }
    .cex-stats {
        gap: 0.35rem 0.7rem;
    }
}

/* ===== Map Overlay ===== */
.map-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.map-container {
    width: 90%;
    height: 90%;
    max-width: 1600px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.map-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.map-header h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.map-close-btn {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: background 0.2s, color 0.2s;
}

.map-close-btn:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

.map-content {
    flex: 1;
    position: relative;
    background: #f8f9fa;
}

.map-footer {
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-secondary);
}

/* Leaflet Popup Styling */
.leaflet-popup-content-wrapper {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.leaflet-popup-content {
    margin: 12px 16px;
    font-size: 13px;
    line-height: 1.5;
}

.map-popup-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.map-popup-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.map-popup-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.map-popup-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.map-popup-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* Map Loading Overlay */
.map-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.map-loading-content {
    text-align: center;
}

.map-loading-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.map-loading-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Custom Marker Icon Styling */
.custom-marker-icon {
    background: none !important;
    border: none !important;
}

/* Custom Layer Control */
.leaflet-control-layers-custom {
    background: white;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
    font-family: inherit;
}

.leaflet-control-layers-custom .layer-control-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.leaflet-control-layers-custom .layer-control-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.leaflet-control-layers-custom .layer-control-item input[type="checkbox"] {
    cursor: pointer;
}

.leaflet-control-layers-custom .layer-control-item label {
    cursor: pointer;
    user-select: none;
}

/* Signal Color Indicators */
.signal-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 4px;
}

.signal-direct-subdivision { background-color: #2563eb; } /* Blue */
.signal-nearby-subdivision { background-color: #10b981; } /* Green */
.signal-assemblage { background-color: #f59e0b; } /* Orange */
.signal-transfers { background-color: #ef4444; } /* Red */

/* Cluster Styling */
.marker-cluster-direct-subdivision {
    background-color: rgba(37, 99, 235, 0.6);
}

.marker-cluster-direct-subdivision div {
    background-color: rgba(37, 99, 235, 0.8);
}

.marker-cluster-nearby-subdivision {
    background-color: rgba(16, 185, 129, 0.6);
}

.marker-cluster-nearby-subdivision div {
    background-color: rgba(16, 185, 129, 0.8);
}

.marker-cluster-assemblage {
    background-color: rgba(245, 158, 11, 0.6);
}

.marker-cluster-assemblage div {
    background-color: rgba(245, 158, 11, 0.8);
}

.marker-cluster-transfers {
    background-color: rgba(239, 68, 68, 0.6);
}

.marker-cluster-transfers div {
    background-color: rgba(239, 68, 68, 0.8);
}

.marker-cluster-default {
    background-color: rgba(100, 116, 139, 0.6);
}

.marker-cluster-default div {
    background-color: rgba(100, 116, 139, 0.8);
}

/* Compact Popup Styling */
.map-popup-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.map-popup-section {
    margin-bottom: 6px;
    font-size: 12px;
    line-height: 1.6;
}

.map-popup-section-title {
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.map-popup-signals {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.map-popup-signal-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

/* Responsive Map */
@media (max-width: 768px) {
    .map-overlay {
        padding: 0;
    }
    
    .map-container {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}

/* ===== Parcel Detail Page ===== */
.detail-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.detail-section {
    background: #FFFFFF;
    border-radius: 0;
    padding: 32px;
    margin-top: 48px;
    margin-bottom: 0;
    box-shadow: none;
    border: 1px solid #E5E7EB;
}

.detail-section:first-child {
    margin-top: 0;
}

.detail-section h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

/* Development Signal Section */
/* Development Signal Section - Enhanced */
/* Signal Section - Investment Research Style */
.signal-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #1F2937;
}

/* Signal Header Inline - Score + Interpretation on one line */
.signal-header-inline {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.signal-header-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Signal Details - Key Signals + Breakdown */
.signal-details {
    margin-top: 0;
}

/* Section Footnote - Confidence + Data Freshness */
.section-footnote {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #E5E7EB;
    color: #9ca3af;
    font-size: 0.75rem;
}

.signal-score {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    margin: 0;
    white-space: nowrap;
}

.signal-score.signal-low {
    color: #6b7280;
}

.signal-score.signal-moderate {
    color: #92400E;
}

.signal-score.signal-high {
    color: #065F46;
}

.signal-badge {
    display: block;
    padding: 0;
    border-radius: 0;
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    margin-top: 0.5rem;
}

.signal-badge.badge-low {
    background: transparent;
    color: #6b7280;
}

.signal-badge.badge-moderate {
    background: transparent;
    color: #92400E;
}

.signal-badge.badge-high {
    background: transparent;
    color: #065F46;
}

.signal-tooltip-trigger {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: center;
    font-size: 0.875rem;
    color: var(--primary-color);
    transition: all 0.2s;
    border: 1px solid transparent;
}

.signal-tooltip-trigger:hover {
    background: #f3f4f6;
    border-color: var(--primary-color);
}

.tooltip-icon {
    font-size: 1rem;
    margin-right: 0.25rem;
}

.signal-breakdown {
    margin-top: 1rem;
    padding: 1rem;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 0;
    font-size: 0.875rem;
}

.breakdown-header {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #E5E7EB;
}

.breakdown-item:last-of-type {
    border-bottom: none;
}

.breakdown-label {
    color: var(--text-secondary);
}

.breakdown-points {
    font-weight: 600;
    color: var(--primary-color);
}

.breakdown-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    border-top: 1px solid #374151;
    font-weight: 700;
    font-size: 1rem;
}

.breakdown-total .breakdown-points {
    font-size: 1.25rem;
}

.signal-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Signal Interpretation - Secondary Emphasis */
.signal-interpretation {
    padding: 1rem;
    background: #F9FAFB;
    border-radius: 0;
    box-shadow: none;
    border-left: 3px solid #d1d5db;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-secondary);
    font-weight: 400;
}

.signal-reasons {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.signal-reasons h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.signal-reasons ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.signal-reasons li {
    padding: 0.625rem 0;
    padding-left: 0;
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 0.9375rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-item label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-value {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.metric-card {
    background: #F9FAFB;
    color: var(--text-primary);
    padding: 1.5rem;
    border-radius: 0;
    text-align: center;
    box-shadow: none;
    border: 1px solid #E5E7EB;
}

/* Event History - Horizontal Inline List */
.event-history-inline {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: baseline;
}

.event-item {
    display: flex;
    align-items: baseline;
    gap: 0.375rem;
}

.event-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1;
}

.event-label {
    font-size: 0.8125rem;
    color: #6b7280;
    font-weight: 400;
}

.metric-label {
    font-size: 0.75rem;
    opacity: 1;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Decision Snapshot Section */
.snapshot-section {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-left: 4px solid #1F2937;
}

.snapshot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.snapshot-card {
    background: #FFFFFF;
    border-radius: 0;
    padding: 1.5rem;
    box-shadow: none;
    border: 1px solid #E5E7EB;
    transition: none;
}

.snapshot-card:hover {
    box-shadow: none;
    transform: none;
}

.snapshot-card h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #E5E7EB;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.snapshot-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.snapshot-item {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.snapshot-item strong {
    color: var(--text-primary);
    font-weight: 600;
}

.snapshot-highlight {
    padding: 0;
    background: transparent;
    border-radius: 0;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.snapshot-interpretation {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-style: italic;
}

.snapshot-loading {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Subdivision Highlight Section */
.subdivision-highlight {
    position: relative;
}

.subdivision-highlight.highlight-critical {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-left: 4px solid #1F2937;
    box-shadow: none;
}

.subdivision-highlight.highlight-high {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-left: 4px solid #1F2937;
}

.subdivision-highlight.highlight-moderate {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-left: 4px solid #d1d5db;
}

.subdivision-badge {
    display: none;
}

.subdivision-alert {
    display: none;
}

.subdivision-highlight.highlight-critical .subdivision-alert {
    display: none;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
}

.subdivision-content {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

.subdivision-content p {
    margin-bottom: 1rem;
}

.subdivision-content p:last-child {
    margin-bottom: 0;
}

/* Confidence Badge */
.signal-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* Confidence Badge - Small Secondary Style */
.confidence-badge-small {
    padding: 0;
    border-radius: 0;
    font-size: 0.6875rem;
    font-weight: 400;
    opacity: 0.6;
    color: #6b7280;
}

.confidence-badge {
    padding: 0;
    border-radius: 0;
    font-size: 0.75rem;
    font-weight: 400;
    color: #6b7280;
}

.confidence-high {
    background: transparent;
    color: #6b7280;
    border: none;
}

.confidence-medium {
    background: transparent;
    color: #6b7280;
    border: none;
}

.confidence-low {
    background: transparent;
    color: #6b7280;
    border: none;
}

/* Market Context Summary */
/* Market Summary - Analyst Comment Style */
.market-summary-wrapper {
    margin: 1.75rem 0 1.25rem 0;
    padding: 1.25rem 1.5rem;
    background: white;
    border-radius: 0;
    border: none;
    border-left: 4px solid #1F2937;
}

.market-summary-text {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1F2937;
    margin: 0;
    text-align: left;
    line-height: 1.6;
}

/* Opportunity Matrix */
/* Opportunity Matrix (Compact) */
.opportunity-matrix {
    margin-top: 1.5rem;
}

.opportunity-matrix h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.matrix-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.matrix-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: var(--radius-sm);
    border: 1px solid #e5e7eb;
    box-shadow: var(--shadow-xs);
}

.matrix-factor {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.matrix-status {
    padding: 0;
    border-radius: 0;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}

.status-positive {
    background: transparent;
    color: var(--text-primary);
    border: none;
    padding: 0;
}

.status-neutral {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 0;
}

.status-negative {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 0;
}

/* Data Freshness Indicator */
/* Data Freshness Indicator (Small, Secondary) */
.data-freshness-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0;
    margin: 0.5rem 0 1rem 0;
    border-radius: 0;
    font-size: 0.75rem;
    font-weight: 400;
    color: #6b7280;
    background: transparent;
    border: none;
}

.data-freshness-indicator.status-recent {
    color: #6b7280;
    background: transparent;
    border-color: transparent;
}

.data-freshness-indicator.status-aging {
    color: #6b7280;
    background: transparent;
    border-color: transparent;
}

.data-freshness-indicator.status-stale {
    color: #6b7280;
    background: transparent;
    border-color: transparent;
}

.freshness-icon {
    font-size: 0.875rem;
}

.freshness-text {
    font-weight: 500;
}

/* Risk Factor Items Enhanced */
/* Risk Factor Items with Impact Labels */
.risk-factor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    font-size: 0.875rem;
    color: var(--text-primary);
    border-left: none;
    border-bottom: 1px solid #E5E7EB;
}

.risk-factor-item:last-child {
    border-bottom: none;
}

.risk-factor-item.impact-high {
    border-left-color: transparent;
    background: transparent;
}

.risk-factor-item.impact-moderate {
    border-left-color: transparent;
    background: transparent;
}

.risk-factor-item.impact-low {
    border-left-color: transparent;
    background: transparent;
}

.risk-factor-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.risk-icon {
    font-size: 1.125rem;
}

.risk-factor-impact {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    padding: 0;
    background: transparent;
    border-radius: 0;
}

/* CTA Section Enhanced */
.cta-section {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-left: 4px solid #1F2937;
}

.cta-container {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

.alert-config-wrapper {
    padding: 1.5rem;
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid #e5e7eb;
    margin-bottom: 1.5rem;
}

.alert-config-wrapper h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
}

.alert-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.alert-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.alert-option:hover {
    background: #f3f4f6;
}

.alert-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.alert-label {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.alert-radius-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.alert-radius-selector label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.alert-radius-selector select {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
}

.premium-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.premium-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: #F9FAFB;
    border-radius: 0;
    border: 1px solid #E5E7EB;
}

.premium-icon {
    font-size: 1rem;
    margin-right: 1rem;
    opacity: 0.5;
}

.premium-label {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.btn-outline {
    padding: 0.5rem 1.25rem;
    background: white;
    color: #1F2937;
    border: 1px solid #1F2937;
    border-radius: 0;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: #F9FAFB;
}

/* CTA Section */
.cta-section {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-left: 4px solid #1F2937;
}

.cta-container {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
}

.cta-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.cta-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-icon {
    margin-right: 0.5rem;
}

/* Permit Stats */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.permit-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.stat-item {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.stat-item strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 0;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}

.status-issued {
    background: transparent;
    color: var(--text-primary);
}

.status-finaled {
    background: transparent;
    color: var(--text-primary);
}

.status-cancelled {
    background: transparent;
    color: var(--text-secondary);
}

.status-expired {
    background: transparent;
    color: var(--text-secondary);
}

.status-default {
    background: transparent;
    color: var(--text-secondary);
}

/* Description Cell */
.description-cell {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Filter Group */
.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1rem;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.filter-group select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--primary-dark);
}

/* Loading States */
.loading-section,
.loading-text {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.error-section {
    text-align: center;
    padding: 3rem;
}

.error-message {
    color: var(--error-color);
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

/* Alert Box */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.alert-info {
    background: #dbeafe;
    border-left: 4px solid var(--primary-color);
    color: var(--text-primary);
}

.alert-warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    color: var(--text-primary);
    padding: 1rem;
    border-radius: var(--radius-sm);
}

.alert p {
    margin-bottom: 0.5rem;
}

.alert p:last-child {
    margin-bottom: 0;
}

/* Clickable AIN Links */
.ain-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
}

.ain-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Monitored parcel star */
.monitored-star {
    color: #f59e0b;
    font-size: 11px;
    margin-right: 2px;
    vertical-align: baseline;
}
td:has(.monitored-star) {
    white-space: nowrap;
}

/* ===== View Toggle ===== */
.view-toggle {
    display: inline-flex;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}
.view-toggle-btn {
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 500;
    border: none;
    background: #fff;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
    line-height: 1.4;
}
.view-toggle-btn + .view-toggle-btn {
    border-left: 1px solid var(--border-color);
}
.view-toggle-btn.active {
    background: var(--primary-color);
    color: #fff;
}
.view-toggle-btn:hover:not(.active) {
    background: var(--bg-color);
}
.view-toggle-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
    z-index: 1;
}

/* ===== Opportunity View Badges ===== */
.opp-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.opp-status-candidate {
    background: var(--opp-candidate-bg);
    color: var(--opp-candidate);
    border: 1px solid var(--opp-candidate-border);
}
.opp-status-monitor {
    background: var(--opp-monitor-bg);
    color: var(--opp-monitor);
    border: 1px solid var(--opp-monitor-border);
}
.opp-status-hold {
    background: var(--opp-hold-bg);
    color: var(--opp-hold);
    border: 1px solid var(--opp-hold-border);
}
.opp-status-risk {
    background: var(--opp-risk-bg);
    color: var(--opp-risk);
    border: 1px solid var(--opp-risk-border);
}

/* Risk Badges */
.risk-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 28px;
    text-align: center;
}
.risk-low {
    background: #f0fdf4;
    color: #166534;
}
.risk-moderate {
    background: #fffbeb;
    color: #92400e;
}
.risk-high {
    background: #fef2f2;
    color: #991b1b;
}

/* Opportunity Score Badge (0-100 composite) */
.opp-score-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    min-width: 32px;
    text-align: center;
    letter-spacing: 0.01em;
}
.opp-score-hot {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #14532d;
    border: 1px solid #86efac;
}
.opp-score-warm {
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
    color: #0c4a6e;
    border: 1px solid #7dd3fc;
}
.opp-score-mild {
    background: linear-gradient(135deg, #fef9c3, #fef08a);
    color: #713f12;
    border: 1px solid #fde047;
}
.opp-score-cold {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #cbd5e1;
}

/* Opportunity Table Utilities */
.data-table td.text-right,
.data-table th.text-right {
    text-align: right;
}
.data-table td.text-center,
.data-table th.text-center {
    text-align: center;
}
.text-muted { color: var(--text-muted); }
.text-negative { color: #dc2626; }
.text-positive { color: #16a34a; }

/* Change type mini badge (Opportunity View last change column) */
.change-type-mini {
    display: inline-block;
    padding: 1px 6px;
    font-size: 0.7rem;
    border-radius: 3px;
    background: #f1f5f9;
    color: #475569;
    font-weight: 500;
}

/* ===== Responsive: View Toggle ===== */
@media (max-width: 768px) {
    .view-toggle {
        order: -1;
        width: 100%;
    }
    .view-toggle-btn {
        flex: 1;
        text-align: center;
        padding: 8px 10px;
    }
    .table-actions {
        flex-wrap: wrap;
    }
}

/* Nearby Activity */
.nearby-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.nearby-card {
    padding: 1rem 1.5rem;
    background: #F9FAFB;
    border-radius: 0;
    border-left: 3px solid #d1d5db;
}

.nearby-info {
    flex: 1;
}

.nearby-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.nearby-values {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nearby-stat {
    font-size: 1rem;
    color: var(--text-primary);
}

.nearby-stat strong {
    font-size: 1.25rem;
    color: var(--primary-color);
    font-weight: 700;
}

/* Permit Summary - Inline Text Style */
.permit-summary-inline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.permit-summary-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    font-size: 0.9375rem;
    color: var(--text-primary);
    line-height: 1.5;
}

.permit-summary-stats strong {
    font-weight: 700;
}

.permit-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.permit-summary-main {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.permit-summary-count,
.permit-summary-value,
.permit-summary-recent {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 150px;
}

.big-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.big-number + .label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.permit-summary-categories {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.permit-summary-categories h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.category-item strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Comparative Context Section */
/* Comparative Section - Unified Neutral Style */
.comparative-section {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-left: 4px solid #1F2937;
}

/* Comparative Grid - Tighter Grouping */
.comparative-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.comparative-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e5e7eb;
    transition: none;
}

.comparative-card:hover {
    box-shadow: var(--shadow-sm);
    transform: none;
    border-color: #e5e7eb;
}

.comparative-card h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #E5E7EB;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Percentile Display */
.percentile-display {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.percentile-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.percentile-item label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.percentile-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.percentile-elite {
    color: #1F2937;
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
    font-weight: 600;
}

.percentile-high {
    color: #065f46;
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
    font-weight: 600;
}

.percentile-medium {
    color: #92400E;
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
    font-weight: 600;
}

.percentile-low {
    color: #6b7280;
    padding: 0;
    font-weight: 600;
}

/* Trend Display */
.trend-display {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.trend-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    border-radius: 0;
}

.trend-increasing {
    background: transparent;
    border: none;
}

.trend-stable {
    background: transparent;
    border: none;
}

.trend-declining {
    background: transparent;
    border: none;
}

.trend-icon {
    font-size: 1rem;
}

.trend-label {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.trend-detail {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.trend-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: var(--radius-sm);
}

.trend-item {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.trend-na {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-style: italic;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: var(--radius-sm);
}

/* Comparison Display */
.comparison-display {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.comparison-value {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    border-radius: 0;
    font-weight: 600;
    color: var(--text-primary);
}

.comparison-high {
    background: transparent;
    border: none;
    color: var(--text-primary);
}

.comparison-above {
    background: transparent;
    border: none;
    color: var(--text-primary);
}

.comparison-neutral {
    background: transparent;
    border: none;
    color: var(--text-secondary);
}

.comparison-below {
    background: transparent;
    border: none;
    color: var(--text-primary);
}

.comparison-low {
    background: transparent;
    border: none;
    color: var(--text-primary);
}

.comparison-icon {
    font-size: 1rem;
    opacity: 0.6;
}

.comparison-text {
    font-size: 1rem;
}

.comparison-detail {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    background: #f9fafb;
    border-radius: var(--radius-sm);
}

/* Risk Assessment Section - Minimal Warning Style */
.risk-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #7F1D1D;
}

/* Risk Header Inline - Score + Badge on one line */
.risk-header-inline {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.risk-header-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Risk Score - Larger for Authority */
.risk-score {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.risk-score.risk-low {
    color: #065F46;
}

.risk-score.risk-moderate {
    color: #92400E;
}

.risk-score.risk-elevated {
    color: #7F1D1D;
}

.risk-badge {
    display: inline-block;
    padding: 0;
    border-radius: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    background: transparent;
    border: none;
}

.risk-badge.risk-low {
    background: transparent;
    color: #065F46;
    border: none;
}

.risk-badge.risk-moderate {
    background: transparent;
    color: #92400E;
    border: none;
}

.risk-badge.risk-elevated {
    background: transparent;
    color: #7F1D1D;
    border: none;
}

/* Risk Outlook - Professional Tone */
.risk-outlook {
    padding: 1rem;
    background: transparent;
    border-radius: 0;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-secondary);
    border: none;
    border-left: 3px solid #d1d5db;
}

.risk-factors {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.risk-factors h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.risk-factors-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.risk-factor-item {
    padding: 0.75rem 0;
    background: transparent;
    border-radius: 0;
    border-left: none;
    box-shadow: none;
    font-size: 0.875rem;
    color: var(--text-primary);
    border-bottom: 1px solid #E5E7EB;
}

.risk-factor-item.success {
    border-left: none;
    color: var(--text-primary);
    background: transparent;
}

/* Map Section - Secondary Visual Hierarchy */
.map-section-secondary {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    opacity: 0.8;
    filter: grayscale(25%);
    box-shadow: none;
}

.map-section-secondary h2 {
    font-size: 0.875rem;
    font-weight: 500;
    color: #9ca3af;
}

/* Institutional CTA Block - Navy Professional Style */
.cta-section-institutional {
    background: #F9FAFB;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #1F2937;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
    padding: 2rem;
    border-radius: 0;
}

.cta-content-institutional h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1F2937;
    margin: 0 0 0.5rem 0;
}

.cta-content-institutional p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.cta-actions-institutional {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-primary-institutional {
    background: #1F2937;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: none;
}

.btn-primary-institutional:hover {
    background: #111827;
    box-shadow: none;
    transform: none;
}

.btn-secondary-institutional {
    background: white;
    color: #1F2937;
    border: 1px solid #1F2937;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary-institutional:hover {
    background: #F9FAFB;
    border-color: #111827;
    color: #111827;
}

.cta-note {
    grid-column: 1 / -1;
    text-align: left;
    font-size: 0.75rem;
    color: #9ca3af;
    font-style: normal;
    margin-top: 0.5rem;
}

/* Market Summary Text (Executive Emphasis) */
.market-summary-text strong {
    font-weight: 700;
    color: #0c4a6e;
}

/* Responsive Detail Page */
@media (max-width: 768px) {
    .detail-container {
        padding: 1rem;
    }
    
    .detail-section {
        padding: 1.25rem;
        margin-top: 32px;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-header {
        flex-direction: column;
    }
    
    .permit-stats {
        margin-top: 1rem;
    }
    
    .nearby-grid {
        grid-template-columns: 1fr;
    }
    
    .permit-summary-grid {
        grid-template-columns: 1fr;
    }
    
    .permit-summary-main {
        flex-direction: column;
        gap: 1rem;
    }
    
    .signal-header-inline {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .signal-score {
        font-size: 2.5rem;
    }
    
    .signal-interpretation {
        font-size: 0.875rem;
    }
    
    .event-history-inline {
        gap: 1rem;
    }
    
    .snapshot-grid {
        grid-template-columns: 1fr;
    }
    
    .comparative-grid {
        grid-template-columns: 1fr;
    }
    
    .matrix-grid {
        grid-template-columns: 1fr;
    }
    
    .risk-header-inline {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .risk-score {
        font-size: 2.5rem;
    }
    
    .cta-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .cta-actions {
        justify-content: center;
    }
}

/* ===== Opportunity Status Panel ===== */
.opp-status-panel {
    margin-bottom: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    align-items: stretch;
}

.opp-status-bar {
    display: flex;
    align-items: stretch;
    flex: 1;
    min-width: 0;
}

.opp-status-icon {
    width: 6px;
    flex-shrink: 0;
}

.opp-status-body {
    flex: 1;
    padding: 14px 20px;
    min-width: 0;
}

.opp-status-headline {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.opp-status-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.opp-status-value {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.opp-status-reasoning {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
    max-width: 720px;
}

/* Status color variants */
.opp-status-panel[data-status="candidate"] .opp-status-icon { background: var(--opp-candidate); }
.opp-status-panel[data-status="candidate"] .opp-status-value { color: var(--opp-candidate); }
.opp-status-panel[data-status="candidate"] { border-left: none; background: var(--opp-candidate-bg); }

.opp-status-panel[data-status="monitor"] .opp-status-icon { background: var(--opp-monitor); }
.opp-status-panel[data-status="monitor"] .opp-status-value { color: var(--opp-monitor); }
.opp-status-panel[data-status="monitor"] { border-left: none; background: var(--opp-monitor-bg); }

.opp-status-panel[data-status="hold"] .opp-status-icon { background: var(--opp-hold); }
.opp-status-panel[data-status="hold"] .opp-status-value { color: var(--opp-hold); }
.opp-status-panel[data-status="hold"] { border-left: none; background: var(--opp-hold-bg); }

.opp-status-panel[data-status="high_risk"] .opp-status-icon { background: var(--opp-risk); }
.opp-status-panel[data-status="high_risk"] .opp-status-value { color: var(--opp-risk); }
.opp-status-panel[data-status="high_risk"] { border-left: none; background: var(--opp-risk-bg); }

/* Insight bullets */
.opp-insights {
    flex: 1;
    min-width: 0;
    padding: 14px 20px 14px 0;
    display: flex;
    align-items: center;
    border-left: 1px solid rgba(0,0,0,0.06);
    padding-left: 20px;
}

.opp-insights ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.opp-insights li {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary);
    padding-left: 16px;
    position: relative;
}

.opp-insights li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
}

.opp-status-panel[data-status="candidate"] .opp-insights li::before { background: var(--opp-candidate); }
.opp-status-panel[data-status="monitor"] .opp-insights li::before { background: var(--opp-monitor); }
.opp-status-panel[data-status="hold"] .opp-insights li::before { background: var(--opp-hold); }
.opp-status-panel[data-status="high_risk"] .opp-insights li::before { background: var(--opp-risk); }

/* Responsive */
@media (max-width: 768px) {
    .opp-status-panel {
        flex-direction: column;
    }
    .opp-insights {
        border-left: none;
        border-top: 1px solid rgba(0,0,0,0.06);
        padding: 12px 20px 14px 26px;
    }
    .opp-status-body {
        padding: 12px 14px;
    }
    .opp-status-headline {
        flex-direction: column;
        gap: 2px;
    }
    .opp-status-value {
        font-size: 16px;
    }
}

/* ===== Monitor Button (Parcel Detail) ===== */
.monitor-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.monitor-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 600;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.monitor-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.monitor-btn-icon::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid currentColor;
    vertical-align: middle;
}

.monitor-btn--active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.monitor-btn--active .monitor-btn-icon::before {
    background: #fff;
    border-color: #fff;
}

.monitor-status-text {
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== Header Settings Link ===== */
.header-settings-link {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    margin-right: 16px;
    padding: 4px 0;
    border-bottom: 1px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}
.header-settings-link:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* ===== Settings Page ===== */
.settings-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px;
}

.settings-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 24px;
}

.settings-section-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 16px;
}

.settings-section-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.watchlist-count {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
}

.settings-toolbar {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.settings-filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.settings-filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.settings-filter-group select,
.settings-filter-group input {
    padding: 6px 10px;
    font-size: 13px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
}

.settings-filter-group input {
    width: 200px;
}

.settings-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.settings-empty p {
    margin-bottom: 16px;
}

/* Watchlist table */
.watchlist-table-wrap {
    overflow-x: auto;
}

.watchlist-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.watchlist-table th {
    text-align: left;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.watchlist-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.watchlist-table tbody tr:hover {
    background: var(--bg-primary);
}

.watchlist-table a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.watchlist-table a:hover {
    text-decoration: underline;
}

.wl-notes-cell {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Signal score badge */
.wl-signal {
    display: inline-block;
    min-width: 32px;
    text-align: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 12px;
}
.wl-signal.signal-high { background: #dcfce7; color: #15803d; }
.wl-signal.signal-med  { background: #fef3c7; color: #92400e; }
.wl-signal.signal-low  { background: #f1f5f9; color: #64748b; }

/* Status badge */
.wl-status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.wl-status-active { background: #dbeafe; color: #1d4ed8; }
.wl-status-paused { background: #f1f5f9; color: #64748b; }

/* Action buttons */
.wl-actions {
    white-space: nowrap;
    display: flex;
    gap: 4px;
}

.wl-action-btn {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.12s;
}

.wl-action-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.wl-action-remove:hover {
    border-color: var(--error-color);
    color: var(--error-color);
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-dialog {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg, 0 10px 30px rgba(0,0,0,0.15));
    width: 100%;
    max-width: 480px;
    margin: 20px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    font-size: 16px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
}

.modal-body {
    padding: 16px 20px;
}

.modal-body textarea {
    width: 100%;
    padding: 10px;
    font-size: 13px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    resize: vertical;
    font-family: inherit;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
}

/* Settings responsive */
@media (max-width: 768px) {
    .settings-container { padding: 12px; }
    .settings-section { padding: 16px; }
    .settings-toolbar { flex-direction: column; gap: 10px; }
    .settings-filter-group input { width: 100%; }
    .watchlist-table { font-size: 12px; }
    .watchlist-table th,
    .watchlist-table td { padding: 8px 6px; }
    .wl-actions { flex-direction: column; }
}

/* ===== Notification Bell & Dropdown ===== */
.notif-wrapper {
    position: relative;
    margin-right: 12px;
}

.notif-bell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: background 0.15s, color 0.15s;
}

.notif-bell:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.notif-bell svg {
    display: block;
}

.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    color: #fff;
    background: var(--error-color);
    border-radius: 8px;
}

.notif-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-height: 480px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 9000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.notif-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.notif-panel-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.notif-mark-read {
    font-size: 12px;
    color: var(--primary-color);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.notif-mark-read:hover {
    text-decoration: underline;
}

.notif-panel-body {
    flex: 1;
    overflow-y: auto;
    max-height: 360px;
}

.notif-empty,
.notif-loading {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin: 0;
}

.notif-item {
    border-bottom: 1px solid var(--border-color);
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-item-link {
    display: flex;
    gap: 10px;
    padding: 10px 16px;
    text-decoration: none;
    color: inherit;
    transition: background 0.1s;
}

.notif-item-link:hover {
    background: var(--bg-primary);
}

.notif-item-type {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 5px;
    background: var(--primary-color);
}

.notif-read .notif-item-type {
    background: var(--border-color);
}

.notif-type-ownership_transfer { background: var(--error-color); }
.notif-type-subdivision { background: var(--opp-candidate, #16a34a); }
.notif-type-assemblage { background: #8b5cf6; }
.notif-type-value_change { background: var(--opp-monitor, #d97706); }
.notif-type-permit { background: var(--opp-hold, #2563eb); }
.notif-type-unit_change { background: #ec4899; }
.notif-type-general_activity { background: var(--text-muted); }

.notif-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notif-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.notif-read .notif-item-title {
    font-weight: 400;
    color: var(--text-secondary);
}

.notif-item-msg {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-item-time {
    font-size: 11px;
    color: var(--text-muted);
}

.notif-panel-footer {
    padding: 8px 16px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.notif-panel-footer a {
    font-size: 12px;
    color: var(--primary-color);
    text-decoration: none;
}

.notif-panel-footer a:hover {
    text-decoration: underline;
}

/* ===== Notification History (Settings Page) ===== */
.notif-history-list {
    display: flex;
    flex-direction: column;
}

.nh-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    align-items: flex-start;
}

.nh-item:last-child {
    border-bottom: none;
}

.nh-read {
    opacity: 0.6;
}

.nh-item-left {
    flex-shrink: 0;
    padding-top: 4px;
}

.nh-type {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
}

.nh-type-ownership_transfer { background: var(--error-color); }
.nh-type-subdivision { background: var(--opp-candidate, #16a34a); }
.nh-type-assemblage { background: #8b5cf6; }
.nh-type-value_change { background: var(--opp-monitor, #d97706); }
.nh-type-permit { background: var(--opp-hold, #2563eb); }
.nh-type-unit_change { background: #ec4899; }
.nh-type-general_activity { background: var(--text-muted); }

.nh-item-body {
    flex: 1;
    min-width: 0;
}

.nh-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    margin-bottom: 2px;
}

.nh-title:hover {
    text-decoration: underline;
}

.nh-message {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0 0 4px 0;
}

.nh-time {
    font-size: 11px;
    color: var(--text-muted);
}

.nh-actions {
    flex-shrink: 0;
    display: flex;
    gap: 4px;
    align-items: flex-start;
}

.notif-history-more {
    text-align: center;
    padding: 16px 0;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
}

@media (max-width: 768px) {
    .notif-panel {
        width: calc(100vw - 20px);
        right: -60px;
    }
    .nh-item { flex-wrap: wrap; }
    .nh-actions { width: 100%; justify-content: flex-end; }
}


/* ═══════════════════════════════════════════════════════════════════
   DELTA-BASED INTELLIGENCE — Impact Badges, Delta Values, What Changed
   ═══════════════════════════════════════════════════════════════════ */

/* ── Impact Badges (shared across dropdown, settings, what-changed) ── */

.notif-impact-badge,
.nh-impact-badge,
.wc-impact-badge,
.wl-impact-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
    white-space: nowrap;
}

.notif-impact-high,
.nh-impact-high,
.wc-impact-high,
.wl-impact-high {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.notif-impact-moderate,
.nh-impact-moderate,
.wc-impact-moderate,
.wl-impact-moderate {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.notif-impact-low,
.nh-impact-low,
.wc-impact-low,
.wl-impact-low {
    background: rgba(100, 116, 139, 0.10);
    color: #64748b;
    border: 1px solid rgba(100, 116, 139, 0.20);
}

/* ── Change Type Badges (watchlist table) ── */

.wl-change-type {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.wl-ctype-ownership_transfer { background: rgba(239, 68, 68, 0.10); color: #dc2626; }
.wl-ctype-subdivision        { background: rgba(34, 197, 94, 0.10); color: #16a34a; }
.wl-ctype-assemblage         { background: rgba(168, 85, 247, 0.10); color: #9333ea; }
.wl-ctype-unit_change        { background: rgba(236, 72, 153, 0.10); color: #db2777; }
.wl-ctype-value_change       { background: rgba(245, 158, 11, 0.10); color: #d97706; }
.wl-ctype-permit             { background: rgba(59, 130, 246, 0.10); color: #2563eb; }
.wl-ctype-general_activity   { background: rgba(100, 116, 139, 0.10); color: #64748b; }

/* ── Delta Values (arrows/colors) ── */

.delta-up  { color: #16a34a; }
.delta-down { color: #dc2626; }

.notif-item-delta {
    font-size: 12px;
    line-height: 1.3;
    margin-bottom: 2px;
}

.notif-delta-val {
    font-weight: 600;
    font-size: 12px;
}

/* ── Upgraded Notification Dropdown Items ── */

.notif-item-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.notif-item-header .notif-item-title {
    flex: 1;
    min-width: 0;
}

.notif-item-header .notif-impact-badge {
    flex-shrink: 0;
}

/* ── Notification History — upgraded rows ── */

.nh-item-header-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.nh-item-header-row .nh-title {
    flex: 1;
    min-width: 0;
}

.nh-item-header-row .nh-impact-badge {
    flex-shrink: 0;
}

.nh-delta {
    font-size: 12px;
    margin-bottom: 4px;
    line-height: 1.3;
}

.nh-delta-val {
    color: var(--text-muted);
    font-weight: 500;
}

.nh-delta-num {
    font-weight: 600;
}

.nh-delta-num.delta-up { color: #16a34a; }
.nh-delta-num.delta-down { color: #dc2626; }


/* ═══════════════════════════════════════════════════════════════════
   WHAT CHANGED PAGE
   ═══════════════════════════════════════════════════════════════════ */

.wc-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
}

.wc-loading,
.wc-error {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.wc-error .btn {
    margin-top: 12px;
}

/* ── Summary header ── */

.wc-summary {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-primary);
}

.wc-summary-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.wc-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.wc-type-ownership_transfer { background: rgba(239, 68, 68, 0.10); color: #dc2626; }
.wc-type-subdivision        { background: rgba(34, 197, 94, 0.10); color: #16a34a; }
.wc-type-assemblage         { background: rgba(168, 85, 247, 0.10); color: #9333ea; }
.wc-type-unit_change        { background: rgba(236, 72, 153, 0.10); color: #db2777; }
.wc-type-value_change       { background: rgba(245, 158, 11, 0.10); color: #d97706; }
.wc-type-permit             { background: rgba(59, 130, 246, 0.10); color: #2563eb; }
.wc-type-general_activity   { background: rgba(100, 116, 139, 0.10); color: #64748b; }

.wc-date {
    font-size: 13px;
    color: var(--text-muted);
}

.wc-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px 0;
}

.wc-message {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* ── Comparison table ── */

.wc-section {
    margin-bottom: 28px;
}

.wc-section h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-primary);
}

.wc-table-wrap {
    overflow-x: auto;
}

.wc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.wc-table th {
    background: var(--bg-card);
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-primary);
}

.wc-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-primary);
    vertical-align: middle;
}

.wc-table tr:last-child td {
    border-bottom: none;
}

.wc-field-name {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.wc-val-prev {
    color: var(--text-muted);
}

.wc-val-curr {
    color: var(--text-primary);
    font-weight: 500;
}

.wc-val-delta {
    font-weight: 600;
    white-space: nowrap;
}

.wc-val-delta.wc-delta-positive { color: #16a34a; }
.wc-val-delta.wc-delta-negative { color: #dc2626; }

.wc-delta-pct {
    font-weight: 400;
    font-size: 12px;
    opacity: 0.8;
}

.wc-empty {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-style: italic;
}

/* ── Context section ── */

.wc-context {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid var(--border-primary);
}

.wc-context p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.wc-extra {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-primary);
}

.wc-extra-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wc-extra-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
}

.wc-extra-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

/* ── Actions bar ── */

.wc-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border-primary);
}

/* ── Responsive ── */

@media (max-width: 768px) {
    .wc-container {
        padding: 16px;
    }
    .wc-summary-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .wc-table {
        font-size: 13px;
    }
    .wc-table th,
    .wc-table td {
        padding: 8px 10px;
    }
    .wc-actions {
        flex-direction: column;
    }
    .wc-actions .btn {
        text-align: center;
    }
}
