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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a2e;
    color: #eee;
    height: 100vh;
    overflow: hidden;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 24px;
    padding: 10px 20px;
    background: #16213e;
    border-bottom: 1px solid #0f3460;
    z-index: 1000;
    position: relative;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: #e94560;
    letter-spacing: 1px;
}

.controls {
    display: flex;
    align-items: center;
    gap: 8px 16px;
    flex-wrap: wrap;
    flex: 1 1 auto;
    min-width: 0;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.control-group label {
    font-size: 0.8rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.control-group select,
.control-group input[type="date"] {
    background: #0f3460;
    color: #eee;
    border: 1px solid #1a1a4e;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 0.85rem;
}

.control-group select:focus,
.control-group input[type="date"]:focus {
    outline: none;
    border-color: #e94560;
}

/* Map */
#map {
    height: calc(100vh - 52px);
    width: 100%;
}

/* SVG shape markers */
.veyra-svg-marker {
    background: none !important;
    border: none !important;
}

/* Map legend */
.map-legend {
    position: absolute;
    bottom: 30px;
    right: 10px;
    z-index: 1000;
    background: rgba(30, 30, 40, 0.92);
    border-radius: 8px;
    padding: 10px 14px;
    color: #e0e0e0;
    font-size: 12px;
    max-height: 300px;
    overflow-y: auto;
}
.map-legend h4 {
    margin: 0 0 6px 0;
    font-size: 13px;
    color: #fff;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
}
.legend-item svg {
    flex-shrink: 0;
}

/* Detail panel */
.detail-panel {
    position: fixed;
    top: 50px;
    right: 0;
    width: 380px;
    max-width: 90vw;
    height: calc(100vh - 50px);
    background: #16213e;
    border-left: 1px solid #0f3460;
    padding: 20px;
    overflow-y: auto;
    z-index: 1001;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
}

.detail-panel h2 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: #fff;
    padding-right: 30px;
}

.detail-panel .meta {
    font-size: 0.8rem;
    color: #aaa;
    margin-bottom: 12px;
    display: flex;
    gap: 12px;
}

.detail-panel p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #ccc;
    margin-bottom: 12px;
}

.close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.close-btn:hover {
    color: #e94560;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.tag {
    background: #0f3460;
    color: #7ec8e3;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    text-transform: capitalize;
}

/* Links */
.link {
    color: #e94560;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}

.link:hover {
    text-decoration: underline;
}

/* Wiki extract */
/* Wiki image tooltip */
.wiki-image-tooltip .leaflet-tooltip-content {
    padding: 0;
}

.wiki-tooltip {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 200px;
}

.wiki-tooltip-img {
    width: 180px;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 4px;
}

.wiki-tooltip span {
    font-size: 0.85rem;
    text-align: center;
}

/* Wiki detail image */
.wiki-detail-image {
    margin-bottom: 12px;
    border-radius: 6px;
    overflow: hidden;
}

.wiki-detail-image img {
    width: 100%;
    max-height: 240px;
    object-fit: cover;
    display: block;
}

.wiki-extract {
    margin-top: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid #00b4d8;
    border-radius: 4px;
    max-height: 300px;
    overflow-y: auto;
}

.wiki-extract p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #ccc;
}

.wiki-attribution {
    margin-top: 8px;
    font-size: 0.75rem !important;
    color: #888 !important;
}

.wiki-attribution a {
    color: #7ec8e3;
    text-decoration: none;
}

.wiki-attribution a:hover {
    text-decoration: underline;
}

/* Wiki events timeline */
.wiki-events-section {
    margin-top: 16px;
    border-top: 1px solid #0f3460;
    padding-top: 12px;
}

.wiki-events-section h3 {
    font-size: 0.95rem;
    color: #e94560;
    margin-bottom: 10px;
}

.wiki-events-list {
    list-style: none;
    padding: 0;
}

.wiki-event-item {
    padding: 8px 0 8px 12px;
    border-left: 2px solid #0f3460;
    margin-bottom: 8px;
    position: relative;
}

.wiki-event-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 12px;
    width: 8px;
    height: 8px;
    background: #e94560;
    border-radius: 50%;
}

.wiki-event-year {
    font-weight: 700;
    color: #7ec8e3;
    margin-right: 8px;
    font-size: 0.85rem;
}

.wiki-event-title {
    font-size: 0.85rem;
    color: #eee;
}

.wiki-event-date {
    display: block;
    font-size: 0.75rem;
    color: #aaa;
    margin-top: 2px;
}

.wiki-event-desc {
    font-size: 0.8rem;
    color: #ccc;
    margin-top: 4px;
    line-height: 1.4;
}

.wiki-event-confidence {
    font-size: 0.7rem;
    display: block;
    margin-top: 2px;
}

/* Related section */
.related-section {
    margin-top: 20px;
    border-top: 1px solid #0f3460;
    padding-top: 12px;
}

.related-section h3 {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.related-section ul {
    list-style: none;
}

.related-section li {
    padding: 4px 0;
}

.related-section a {
    color: #7ec8e3;
    text-decoration: none;
    font-size: 0.85rem;
}

.related-section a:hover {
    text-decoration: underline;
}

.score {
    color: #666;
    font-size: 0.75rem;
    margin-left: 4px;
}

/* Leaflet overrides for dark theme */
.leaflet-container {
    background: #1a1a2e;
}

.leaflet-popup-content-wrapper {
    background: #16213e;
    color: #eee;
    border-radius: 8px;
}

.leaflet-popup-tip {
    background: #16213e;
}

/* Chips */
.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.chip {
    background: #0f3460;
    color: #aaa;
    border: 1px solid #1a1a4e;
    border-radius: 16px;
    padding: 4px 12px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.chip:hover {
    border-color: #e94560;
    color: #eee;
}

.chip-active {
    background: #e94560;
    color: #fff;
    border-color: #e94560;
}

.chip-profile {
    background: #0f3460;
    color: #7ec8e3;
    border-color: #7ec8e3;
}

.chip-profile:hover {
    background: #1a1a4e;
}

/* Profile dropdown */
.profile-section {
    position: relative;
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 8px;
    padding: 12px;
    min-width: 240px;
    z-index: 2000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.profile-save {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.profile-save input {
    flex: 1;
    background: #0f3460;
    color: #eee;
    border: 1px solid #1a1a4e;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 0.82rem;
}

.profile-save input:focus {
    outline: none;
    border-color: #e94560;
}

.profile-save button {
    background: #e94560;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 5px 12px;
    font-size: 0.82rem;
    cursor: pointer;
    white-space: nowrap;
}

.profile-save button:disabled {
    opacity: 0.4;
    cursor: default;
}

.profile-count {
    font-size: 0.72rem;
    color: #666;
    margin-bottom: 8px;
}

.profile-empty {
    font-size: 0.82rem;
    color: #666;
    text-align: center;
    padding: 8px 0;
}

.profile-item {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.profile-load {
    flex: 1;
    background: #0f3460;
    color: #eee;
    border: 1px solid #1a1a4e;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 0.82rem;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s;
}

.profile-load:hover {
    border-color: #e94560;
}

.profile-delete {
    background: none;
    border: none;
    color: #666;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 2px 6px;
    line-height: 1;
}

.profile-delete:hover {
    color: #e94560;
}

/* Auth nav in header */
.auth-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-user {
    color: #7ec8e3;
    font-size: 0.85rem;
    font-weight: 500;
}

.auth-link {
    color: #aaa;
    text-decoration: none;
    font-size: 0.85rem;
}

.auth-link:hover {
    color: #e94560;
}

/* Auth pages */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
}

.auth-card h2 {
    color: #eee;
    margin-bottom: 24px;
    font-size: 1.2rem;
}

.auth-alt {
    text-align: center;
    margin-top: 16px;
    font-size: 0.85rem;
    color: #aaa;
}

.auth-alt a {
    color: #e94560;
    text-decoration: none;
}

.auth-alt a:hover {
    text-decoration: underline;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.form-input {
    width: 100%;
    background: #0f3460;
    color: #eee;
    border: 1px solid #1a1a4e;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 0.9rem;
}

.form-input:focus {
    outline: none;
    border-color: #e94560;
}

.form-errors {
    background: rgba(233, 69, 96, 0.15);
    border: 1px solid #e94560;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 16px;
    color: #e94560;
    font-size: 0.85rem;
}

.field-error {
    color: #e94560;
    font-size: 0.8rem;
    display: block;
    margin-top: 2px;
}

.field-help {
    color: #666;
    font-size: 0.75rem;
    display: block;
    margin-top: 2px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #e94560;
    color: #fff;
}

.btn-primary:hover {
    background: #d63851;
}

.btn-secondary {
    background: #0f3460;
    color: #eee;
}

.btn-secondary:hover {
    background: #1a1a4e;
}

.btn-danger {
    background: #c0392b;
    color: #fff;
}

.btn-danger:hover {
    background: #a93226;
}

.btn-row {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

/* Page layout */
.page-container {
    min-height: 100vh;
    overflow-y: auto;
}

.page-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 10px 20px;
    background: #16213e;
    border-bottom: 1px solid #0f3460;
}

.page-nav {
    margin-left: auto;
    display: flex;
    gap: 16px;
}

.page-content {
    padding: 30px 20px;
    max-width: 900px;
    margin: 0 auto;
}

.page-content.narrow {
    max-width: 560px;
}

.page-content h2 {
    color: #eee;
    margin-bottom: 16px;
}

.page-content h3 {
    color: #ccc;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.page-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.page-title-row h2 {
    margin-bottom: 0;
}

/* Layer grid */
.layer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.layer-card {
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 8px;
    padding: 16px;
    text-decoration: none;
    color: #eee;
    transition: border-color 0.2s;
}

.layer-card:hover {
    border-color: #e94560;
}

.layer-card h3 {
    margin-bottom: 6px;
}

/* Detail meta */
.detail-meta {
    background: #0f3460;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.detail-meta p {
    font-size: 0.85rem;
    color: #ccc;
    margin-bottom: 4px;
}

.detail-meta strong {
    color: #eee;
}

/* Column preview */
.column-preview {
    background: #0f3460;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

/* Metadata section in detail panel */
.metadata-section {
    margin-top: 8px;
}

.meta-item {
    font-size: 0.85rem;
    color: #ccc;
    margin-bottom: 4px;
}

.meta-item strong {
    color: #aaa;
}

/* Empty state */
.empty-state {
    color: #666;
    text-align: center;
    padding: 40px;
    font-size: 0.95rem;
}

/* Risk layer styles */
.risk-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-right: 6px;
    flex-shrink: 0;
}

.risk-score-bar {
    background: #1a1a2e;
    border-radius: 6px;
    height: 12px;
    overflow: hidden;
    margin-bottom: 8px;
}

.risk-score-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.3s ease;
}

.risk-score-label {
    font-size: 0.95rem;
    color: #eee;
    margin-bottom: 8px;
}

.risk-factors {
    margin-top: 12px;
}

.risk-factors h3 {
    font-size: 0.95rem;
    color: #ccc;
    margin-bottom: 8px;
}

.risk-factors h4 {
    font-size: 0.85rem;
    color: #aaa;
    margin: 10px 0 6px;
}

.risk-factors ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.risk-factors li {
    font-size: 0.85rem;
    color: #ccc;
    padding: 3px 0;
}

.risk-factors li strong {
    color: #eee;
}

/* ===== Timeline Dock ===== */
.timeline-dock {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    background: #16213e;
    border-top: 2px solid #0f3460;
    transition: transform 0.3s ease;
    max-height: 340px;
    display: flex;
    flex-direction: column;
}

.timeline-collapsed {
    transform: translateY(calc(100% - 36px));
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 16px;
    flex-wrap: wrap;
    min-height: 36px;
}

.timeline-toggle {
    background: #0f3460;
    color: #e94560;
    border: 1px solid #e94560;
    border-radius: 4px;
    padding: 4px 12px;
    cursor: pointer;
    font-size: 0.8rem;
    white-space: nowrap;
}

.timeline-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1;
}

.timeline-layer-toggles {
    display: flex;
    gap: 4px;
}

.chip-sm {
    font-size: 0.7rem;
    padding: 2px 8px;
}

.timeline-date-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.timeline-date-input {
    background: #1a1a2e;
    color: #eee;
    border: 1px solid #0f3460;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.75rem;
    width: 120px;
}

.timeline-date-sep {
    color: #666;
    font-size: 0.8rem;
}

.timeline-playback {
    display: flex;
    gap: 4px;
}

.timeline-btn {
    background: #0f3460;
    color: #eee;
    border: 1px solid #0f3460;
    border-radius: 4px;
    padding: 2px 8px;
    cursor: pointer;
    font-size: 0.8rem;
}

.timeline-btn:hover {
    background: #e94560;
}

.timeline-body {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.timeline-chart-wrap {
    flex: 2;
    min-width: 0;
    height: 220px;
    padding: 8px 16px;
}

.timeline-markers {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
    border-left: 1px solid #0f3460;
    max-width: 300px;
}

.timeline-marker-item {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 4px 0;
    cursor: pointer;
    font-size: 0.75rem;
    color: #ccc;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.timeline-marker-item:hover {
    color: #fff;
}

.tl-marker-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 3px;
}

.tl-src-news .tl-marker-dot { background: #e94560; }
.tl-src-wiki .tl-marker-dot { background: #4fc3f7; }
.tl-src-risk .tl-marker-dot { background: #ffa726; }
.tl-src-custom .tl-marker-dot { background: #ab47bc; }

.tl-marker-date {
    color: #888;
    white-space: nowrap;
    min-width: 70px;
}

.tl-marker-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.timeline-detail {
    flex: 1;
    padding: 8px 12px;
    border-left: 1px solid #0f3460;
    max-width: 260px;
    overflow-y: auto;
}

.tl-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #eee;
    margin-bottom: 8px;
}

.tl-detail-score {
    font-size: 0.85rem;
    color: #ccc;
    margin-bottom: 8px;
}

.tl-detail-score strong {
    color: #e94560;
    font-size: 1.1rem;
}

.tl-detail-factors {
    font-size: 0.75rem;
    color: #aaa;
}

.tl-factor-row {
    padding: 2px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.tl-factor-row strong {
    color: #eee;
}

/* Adjust map height when timeline is open */
#map {
    transition: height 0.3s ease;
}

/* ===== Insurance Demo Panel ===== */
.insurance-panel {
    position: fixed;
    top: 60px;
    right: 0;
    width: 340px;
    max-height: calc(100vh - 80px);
    z-index: 1050;
    transform: translateX(calc(100% - 44px));
    transition: transform 0.3s ease;
}

.insurance-panel-open {
    transform: translateX(0);
}

.insurance-panel-toggle {
    position: absolute;
    left: -44px;
    top: 0;
    background: #16213e;
    color: #e94560;
    border: 1px solid #0f3460;
    border-right: none;
    border-radius: 6px 0 0 6px;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 0.85rem;
    white-space: nowrap;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.insurance-panel-body {
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 0 0 0 8px;
    padding: 16px;
    overflow-y: auto;
    max-height: calc(100vh - 100px);
}

.insurance-panel-body h3 {
    color: #e94560;
    font-size: 1rem;
    margin: 0 0 12px;
}

.ins-section {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.ins-section h4 {
    color: #ccc;
    font-size: 0.85rem;
    margin: 0 0 8px;
}

.ins-import-row {
    margin-bottom: 8px;
}

.btn-sm {
    background: #0f3460;
    color: #e94560;
    border: 1px solid #e94560;
    border-radius: 4px;
    padding: 4px 12px;
    cursor: pointer;
    font-size: 0.8rem;
}

.btn-sm:hover {
    background: #e94560;
    color: #fff;
}

.btn-primary {
    background: #e94560;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 0.9rem;
    width: 100%;
}

.btn-primary:hover {
    background: #d63851;
}

.btn-primary:disabled {
    background: #555;
    cursor: not-allowed;
}

.ins-empty {
    color: #666;
    font-size: 0.8rem;
    font-style: italic;
}

.ins-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #ccc;
    transition: background 0.15s;
}

.ins-item:hover {
    background: rgba(255,255,255,0.05);
}

.ins-item-selected {
    background: rgba(233, 69, 96, 0.15);
    border-left: 3px solid #e94560;
}

.ins-delete {
    margin-left: auto;
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 1rem;
}

.ins-delete:hover {
    color: #e94560;
}

.ins-count {
    color: #888;
    font-size: 0.8rem;
}

.ins-bands {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.ins-band {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    color: #fff;
}

.ins-band-count {
    font-size: 1.4rem;
    font-weight: bold;
}

.ins-band-severe { background: rgba(229, 57, 53, 0.3); border: 1px solid #e53935; }
.ins-band-high { background: rgba(255, 152, 0, 0.3); border: 1px solid #ff9800; }
.ins-band-moderate { background: rgba(253, 216, 53, 0.2); border: 1px solid #fdd835; }
.ins-band-low { background: rgba(102, 187, 106, 0.2); border: 1px solid #66bb6a; }

.ins-rollups {
    font-size: 0.8rem;
    color: #ccc;
}

.ins-rollups p {
    margin: 4px 0;
}

.ins-rollups strong {
    color: #eee;
}

.ins-top-risk {
    margin-top: 12px;
}

.ins-top-risk h4 {
    color: #e94560;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.ins-risk-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    cursor: pointer;
    font-size: 0.8rem;
    color: #ccc;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.ins-risk-item:hover {
    color: #fff;
}

.ins-risk-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 22px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    color: #fff;
    flex-shrink: 0;
}

.ins-risk-value {
    margin-left: auto;
    color: #888;
    font-size: 0.75rem;
}

/* ===== Weather Risk Tool ===== */
.weather-tool {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 380px;
    max-height: 80vh;
    overflow-y: auto;
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 8px;
    padding: 20px;
    z-index: 1200;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.weather-tool h3 {
    color: #e94560;
    margin: 0 0 12px;
    font-size: 1rem;
}

.weather-tool .control-group {
    margin-bottom: 10px;
}

.weather-tool label {
    display: block;
    color: #aaa;
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.weather-tool input,
.weather-select {
    width: 100%;
    padding: 6px 10px;
    background: #0a0a1a;
    border: 1px solid #333;
    border-radius: 4px;
    color: #eee;
    font-size: 0.85rem;
}

.weather-tool .btn-primary {
    margin-top: 12px;
}

.weather-result {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.weather-tool .close-btn {
    position: absolute;
    top: 8px;
    right: 12px;
}
