:root {
    --color-verde-profundo: #1f7a62;
    --color-verde-claro: #24a47a;
    --color-text: #162230;
    --color-muted: #5e6b7e;
    --color-border: rgba(26, 52, 68, 0.14);
    --color-surface: #ffffff;
    --color-surface-soft: #eef3f6;
    --color-pill-bg: rgba(32, 122, 98, 0.12);
    --color-pill-text: #1f7a62;
    --color-button: #1f7a62;
    --color-button-hover: #165845;
    --color-guinda: #601623;
    --color-guinda-light: #7a2432;
    --gradient-header: linear-gradient(120deg, #1f7a62 0%, #20785d 55%, #144935 100%);
    --shadow-elevated: 0 22px 60px -28px rgba(16, 60, 46, 0.65);
    --shadow-soft: 0 14px 45px -24px rgba(16, 60, 46, 0.5);
    --shadow-card: 0 24px 60px -30px rgba(17, 69, 51, 0.4);
    --transition-base: 0.25s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: var(--color-surface-soft);
    color: var(--color-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
}

button {
    font-family: inherit;
}

.container {
    width: min(1120px, 100% - 2.5rem);
    margin-inline: auto;
}

.site-header {
    background: var(--color-surface);
    color: var(--color-text);
    padding: 1.35rem 0;
    box-shadow: 0 1px 0 rgba(26, 52, 68, 0.08);
    position: relative;
    z-index: 10;
}

.site-header::after {
    content: "";
    position: absolute;
    inset: 100% 0 auto 0;
    height: 4px;
    background: linear-gradient(120deg, var(--color-verde-profundo) 0%, var(--color-guinda) 100%);
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
}

@media (min-width: 720px) {
    .header-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.brand-logos {
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 3vw, 1.6rem);
    flex-wrap: wrap;
}

.brand-logo {
    display: block;
    height: auto;
    width: auto;
    filter: none;
}

.brand-logo--sener {
    width: clamp(140px, 22vw, 210px);
}

.brand-logo--snien {
    width: clamp(100px, 16vw, 140px);
    filter: none;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.brand-eyebrow {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.8;
    color: var(--color-verde-profundo);
}

.brand-title {
    font-size: clamp(1.1rem, 2.5vw, 1.55rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--color-guinda);
}

.header-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(31, 122, 98, 0.1);
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    border: 1px solid rgba(31, 122, 98, 0.18);
}

.meta-label {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 600;
    color: var(--color-verde-profundo);
}

.meta-value {
    font-weight: 600;
    color: var(--color-guinda);
}

.page-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.map-section {
    padding: 2.2rem 0 2.8rem;
}

.map-card {
    background: var(--color-surface);
    border-radius: 22px;
    padding: clamp(1.5rem, 2.5vw, 2rem);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.map-title-banner {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(26, 52, 68, 0.08);
    border-radius: 14px;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 14px 28px -22px rgba(17, 69, 51, 0.4);
}

.map-title-text {
    margin: 0;
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 700;
    color: var(--color-guinda);
    letter-spacing: 0.04em;
    text-align: center;
}

.selected-region-banner {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(106, 28, 50, 0.3);
    border-radius: 12px;
    padding: 0.6rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
    max-width: 90%;
}

#selected-region-text {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-guinda);
    letter-spacing: 0.05em;
}

.map-view {
    position: relative;
}

.selection-details {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.selection-panel {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(26, 52, 68, 0.1);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 10px 26px -24px rgba(17, 69, 51, 0.55);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.selection-panel h4 {
    margin: 0;
    color: var(--color-guinda);
    font-size: 1rem;
}

.selection-panel p {
    margin: 0;
    color: var(--color-muted);
    line-height: 1.5;
}

.selection-panel ul {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--color-muted);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.selection-panel .tagline {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-verde-profundo);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.selection-panel .placeholder {
    margin: 0;
    font-style: italic;
    color: rgba(22, 34, 48, 0.6);
}

.card-toolbar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (min-width: 640px) {
    .card-toolbar {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 1.25rem;
    }
}

.toolbar-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.toolbar-group label {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--color-muted);
}

.sheet-info-group {
    max-width: 320px;
}

.sheet-info-label {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--color-muted);
}

.sheet-info-value {
    font-size: 0.9rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.sheet-info-value a {
    color: var(--color-verde-profundo);
    text-decoration: underline;
}

.leaflet-tooltip.node-label {
    background: #ffffff;
    color: var(--color-verde-profundo);
    border: 1px solid rgba(31, 122, 98, 0.25);
    border-radius: 4px;
    padding: 0.04rem 0.2rem;
    font-size: 0.38rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.leaflet-tooltip.node-label::before,
.leaflet-tooltip.node-label::after {
    display: none;
}

.control {
    appearance: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(237, 243, 244, 1) 100%);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 0.65rem 0.9rem;
    font-size: 0.95rem;
    color: var(--color-text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.control:focus-visible {
    outline: none;
    border-color: rgba(31, 122, 98, 0.7);
    box-shadow: 0 0 0 3px rgba(31, 122, 98, 0.22);
}

.btn-secondary {
    border: none;
    border-radius: 14px;
    padding: 0.65rem 1.35rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(140deg, var(--color-button) 0%, #1c6850 100%);
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 30px -18px rgba(22, 70, 54, 0.55);
}

.btn-secondary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(31, 122, 98, 0.28);
}

.map-view {
    width: 100%;
    min-height: 60vh;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
}

.map-description {
    padding: 1rem 0.5rem;
    font-size: 0.9rem;
    color: var(--color-muted);
    line-height: 1.6;
    border-top: 1px solid var(--color-border);
    margin-top: 1rem;
}

.map-description h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
}

.map-description p {
    margin: 0;
}

.map-inset {
    position: absolute;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(31, 122, 98, 0.18);
    border-radius: 12px;
    padding: 0.45rem;
    box-shadow: 0 16px 32px -22px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    z-index: 640;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    pointer-events: auto;
}

.map-inset__title {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-verde-profundo);
    margin: 0;
}

.map-inset__map {
    flex: 1;
    min-height: 110px;
    border-radius: 8px;
    overflow: hidden;
}

.map-inset .leaflet-control-attribution,
.map-inset .leaflet-control-container {
    display: none !important;
}

.leaflet-interactive.connections-line {
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (min-width: 1024px) {
    .map-view {
        min-height: 72vh;
    }
}

.card-footer {
    border-top: 1px solid rgba(26, 52, 68, 0.08);
    padding-top: 1rem;
}

.data-source {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-muted);
}

.info-section {
    background: var(--color-surface-soft);
    padding: 2.8rem 0;
}

.info-grid {
    display: grid;
    gap: 1.7rem;
}

@media (min-width: 960px) {
    .info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.info-panel {
    background: var(--color-surface);
    border-radius: 20px;
    padding: clamp(1.5rem, 2.5vw, 2rem);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.info-panel h2,
.info-panel h3 {
    margin: 0;
    color: var(--color-text);
}

.info-panel p {
    margin: 0;
    color: var(--color-muted);
    line-height: 1.6;
}

.info-panel ul {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--color-muted);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.info-panel li {
    line-height: 1.6;
}

.site-footer {
    background: #ffffff;
    color: var(--color-text);
    padding: 2.4rem 0;
    border-top: 1px solid rgba(26, 52, 68, 0.08);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    align-items: center;
    text-align: center;
}

.footer-logos {
    display: flex;
    gap: 1.8rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-logos img {
    max-height: 68px;
    filter: grayscale(100%);
}

.site-footer p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-muted);
}

#preloader {
    position: fixed;
    inset: 0;
    background: rgba(16, 56, 42, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    z-index: 999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-content {
    background: #ffffff;
    border-radius: 20px;
    padding: 2rem 2.5rem;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
    max-width: 320px;
}

.spinner {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 4px solid rgba(31, 122, 98, 0.2);
    border-top-color: var(--color-button);
    animation: spin 0.85s linear infinite;
}

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

.badge {
    display: inline-block;
    border-radius: 999px;
    background: var(--color-pill-bg);
    color: var(--color-pill-text);
    padding: 0.1rem 0.55rem;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 700;
}

.description {
    margin-top: 0.35rem;
    font-size: 0.9rem;
    color: var(--color-muted);
    line-height: 1.5;
}

.leaflet-container a {
    color: var(--color-button);
}

.leaflet-control-container .leaflet-control {
    border-radius: 12px;
    overflow: hidden;
}

.leaflet-control-layers {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(26, 52, 68, 0.12);
}

.leaflet-control-zoom {
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(26, 52, 68, 0.12);
}

.leaflet-control-scale {
    margin-bottom: 52px;
    margin-left: 12px;
}

.leaflet-control-scale-line {
    background-color: rgba(255, 255, 255, 0.95);
    border-color: rgba(26, 52, 68, 0.45);
    border-top-width: 3px;
    border-bottom-width: 1px;
    color: #1a3444;
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 600;
    box-shadow: var(--shadow-soft);
}

/* Export buttons styles */
.export-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-export {
    border: none;
    border-radius: 12px;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
    box-shadow: 0 8px 20px -12px rgba(22, 70, 54, 0.4);
    min-width: 80px;
    justify-content: center;
}

.btn-export:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px -10px rgba(22, 70, 54, 0.5);
}

.btn-export:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(31, 122, 98, 0.28);
}

.btn-export:active {
    transform: translateY(0);
}

.btn-export--pdf {
    background: linear-gradient(140deg, #d32f2f 0%, #b71c1c 100%);
}

.btn-export--pdf:hover {
    box-shadow: 0 12px 24px -10px rgba(183, 28, 28, 0.5);
}

.btn-export--png {
    background: linear-gradient(140deg, #1976d2 0%, #0d47a1 100%);
}

.btn-export--png:hover {
    box-shadow: 0 12px 24px -10px rgba(13, 71, 161, 0.5);
}

.btn-export__icon {
    font-size: 1rem;
    line-height: 1;
}

.btn-export__text {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* Responsive adjustments for export buttons */
@media (max-width: 640px) {
    .export-buttons {
        width: 100%;
    }

    .btn-export {
        flex: 1;
        min-width: 0;
    }
}

/* Loading state for export buttons */
.btn-export--loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-export--loading .btn-export__icon {
    animation: spin 1s linear infinite;
}

/* Mod
al styles */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(16, 56, 42, 0.25);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: var(--color-surface);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(26, 52, 68, 0.08);
}

.modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 8px;
    transition: color var(--transition-base), background-color var(--transition-base);
}

.modal-close:hover {
    color: var(--color-text);
    background: rgba(26, 52, 68, 0.08);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 2rem;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(26, 52, 68, 0.08);
}

/* Export form styles */
.export-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-section-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    border-bottom: 2px solid var(--color-verde-profundo);
    padding-bottom: 0.5rem;
}

.form-row {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-muted);
    letter-spacing: 0.02em;
}

.custom-size-section {
    background: rgba(31, 122, 98, 0.05);
    border: 1px solid rgba(31, 122, 98, 0.15);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 0.5rem;
}

/* Radio button styles */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 12px;
    transition: background-color var(--transition-base);
}

.radio-option:hover {
    background: rgba(31, 122, 98, 0.05);
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border);
    border-radius: 50%;
    position: relative;
    transition: border-color var(--transition-base);
}

.radio-option input[type="radio"]:checked+.radio-custom {
    border-color: var(--color-verde-profundo);
}

.radio-option input[type="radio"]:checked+.radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--color-verde-profundo);
    border-radius: 50%;
}

.radio-label {
    font-size: 0.9rem;
    color: var(--color-text);
    line-height: 1.4;
}

/* Checkbox styles */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color var(--transition-base);
}

.checkbox-option:hover {
    background: rgba(31, 122, 98, 0.05);
}

.checkbox-option input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--color-border);
    border-radius: 4px;
    position: relative;
    transition: border-color var(--transition-base), background-color var(--transition-base);
}

.checkbox-option input[type="checkbox"]:checked+.checkbox-custom {
    border-color: var(--color-verde-profundo);
    background: var(--color-verde-profundo);
}

.checkbox-option input[type="checkbox"]:checked+.checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-label {
    font-size: 0.9rem;
    color: var(--color-text);
    line-height: 1.4;
}

/* Button styles for modal */
.btn-cancel {
    background: linear-gradient(140deg, var(--color-muted) 0%, #4a5568 100%);
}

.btn-cancel:hover {
    box-shadow: 0 18px 30px -18px rgba(74, 85, 104, 0.55);
}

.btn-export-confirm {
    position: relative;
    overflow: hidden;
}

.btn-export-confirm.loading .btn-text {
    opacity: 0;
}

.btn-export-confirm.loading .btn-spinner {
    display: flex !important;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Responsive modal */
@media (max-width: 640px) {
    .modal-content {
        margin: 0.5rem;
        max-height: 95vh;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer button {
        width: 100%;
    }
}

/* 
Notification system */
.notification-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
    pointer-events: none;
}

.notification {
    background: var(--color-surface);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-card);
    border-left: 4px solid var(--color-verde-profundo);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    pointer-events: auto;
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    max-width: 100%;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.success {
    border-left-color: #22c55e;
}

.notification.error {
    border-left-color: #ef4444;
}

.notification.warning {
    border-left-color: #f59e0b;
}

.notification.info {
    border-left-color: #3b82f6;
}

.notification-icon {
    font-size: 1.25rem;
    line-height: 1;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.3;
}

.notification-message {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-muted);
    line-height: 1.4;
    word-wrap: break-word;
}

.notification-close {
    background: none;
    border: none;
    color: var(--color-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 6px;
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
    transition: color var(--transition-base), background-color var(--transition-base);
}

.notification-close:hover {
    color: var(--color-text);
    background: rgba(26, 52, 68, 0.08);
}

/* Progress overlay */
.progress-overlay {
    position: fixed;
    inset: 0;
    background: rgba(16, 56, 42, 0.3);
    backdrop-filter: blur(12px);
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.progress-content {
    background: var(--color-surface);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--shadow-card);
    text-align: center;
    max-width: 400px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.progress-spinner {
    width: 64px;
    height: 64px;
    border: 4px solid rgba(31, 122, 98, 0.2);
    border-top-color: var(--color-verde-profundo);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.progress-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
}

.progress-message {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-muted);
    line-height: 1.4;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(31, 122, 98, 0.15);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-verde-profundo) 0%, var(--color-verde-claro) 100%);
    border-radius: 999px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.progress-percentage {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-verde-profundo);
}

/* Responsive notifications */
@media (max-width: 640px) {
    .notification-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }

    .notification {
        padding: 0.875rem 1rem;
    }

    .progress-content {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
}

/* Loading states for export buttons */
.btn-export--loading {
    position: relative;
    overflow: hidden;
}

.btn-export--loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {

    .notification,
    .progress-fill,
    .progress-spinner,
    .btn-export--loading::after {
        animation: none;
        transition: none;
    }

    .progress-fill::after {
        display: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .notification {
        border: 2px solid currentColor;
    }

    .progress-bar {
        border: 1px solid currentColor;
    }
}

/* Graticule labels control - always visible on map edges */
.graticule-labels-control {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 600;
}

.graticule-labels-top,
.graticule-labels-bottom,
.graticule-labels-left,
.graticule-labels-right {
    position: absolute;
    pointer-events: none;
}

.graticule-labels-top {
    top: 5px;
    left: 0;
    right: 0;
    height: 25px;
}

.graticule-labels-bottom {
    bottom: 25px;
    left: 0;
    right: 0;
    height: 25px;
}

.graticule-labels-left {
    left: 5px;
    top: 0;
    bottom: 0;
    width: 80px;
}

.graticule-labels-right {
    right: 5px;
    top: 0;
    bottom: 0;
    width: 80px;
}

.graticule-label-item {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    padding: 3px 8px;
    border: 1px solid rgba(96, 22, 35, 0.5);
    /* Semi-transparent red wine border */
    border-radius: 4px;
    font-size: 8px;
    /* Smaller font size */
    font-weight: 600;
    color: #601623;
    /* Red wine text color */
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    opacity: 0.75;
    /* Make labels more subtle */
}

.graticule-labels-top .graticule-label-item {
    transform: translate(-50%, 0);
}

.graticule-labels-bottom .graticule-label-item {
    transform: translate(-50%, 0);
}

.graticule-labels-left .graticule-label-item {
    transform: translate(0, -50%);
}

.graticule-labels-right .graticule-label-item {
    transform: translate(0, -50%);
    right: 0;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    /* Override default button padding */
}

.btn-icon i.bi {
    /* Target bootstrap icons specifically */
    font-size: 1.25rem;
    /* ~20px */
    line-height: 1;
}


.logos-control-wrapper {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

.logos-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-sener,
.logo-snien {

    height: 48px;
    /* Increased size */
    width: auto;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.logo-sener:hover,
.logo-snien:hover {
    opacity: 1;
}

.logo-sener {
    max-width: 150px;
}

.logo-snien {
    max-width: 120px;
}

/* Responsive adjustments para los logos */

@media (max-width: 768px) {
    .logos-control-wrapper {
        bottom: 5px;
    }


    .logos-container {
        gap: 6px;
    }

    .logo-sener,
    .logo-snien {
        height: 36px;
        /* Increased size for smaller screens */
    }

    .logo-sener {
        max-width: 70px;
    }

    .logo-snien {

        max-width: 91px;
    }

}

/* Legend styles */
.legend {
    line-height: 18px;
    color: #555;
    background-color: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.legend i {
    width: 18px;
    height: 18px;
    float: left;
    margin-right: 8px;
    opacity: 0.7;
}

.leaflet-pane.leaflet-states-pane {
    filter: drop-shadow(3px 3px 5px rgba(0, 0, 0, 0.3));
}

.leaflet-pane.leaflet-gerencias-pane {
    filter: drop-shadow(5px 5px 5px rgba(0, 0, 0, 0.6));
}

.leaflet-pane.leaflet-gerencias-pane path.gerencia-focused {
    filter: drop-shadow(0 0 8px rgba(96, 22, 35, 0.8)) drop-shadow(0 0 15px rgba(96, 22, 35, 0.4));
}

.leaflet-pane.leaflet-marinas-pane {
    filter: blur(2px);
}

/* PIB Forecast Labels */
.pib-label {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.pib-label-content {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    padding: 3px 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(4px);
}

.pib-label-id {
    text-align: center;
    font-size: 7px;
    font-weight: 600;
    color: #1a1a1a;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    padding-bottom: 2px;
    margin-bottom: 1px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.pib-row {
    display: flex;
    justify-content: center;
    align-items: center;
}

.pib-row-2030 {
    border-bottom: 1px solid rgba(31, 122, 98, 0.3);
    padding-bottom: 1px;
}

.pib-row-2039 {
    padding-top: 1px;
}

.pib-value {
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.pib-row-2030 .pib-value {
    color: #1f7a62;
}

.pib-row-2039 .pib-value {
    color: #601623;
}

/* Welcome Screen Styles */
.welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(31, 122, 98, 0.97) 0%, rgba(20, 73, 53, 0.97) 100%);
    z-index: 10000;
    display: none;
    /* Hidden by default, shown by JavaScript */
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.5s ease;
}

.welcome-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(31, 122, 98, 0.97) 0%, rgba(20, 73, 53, 0.97) 100%);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.welcome-content {
    background: white;
    border-radius: 20px;
    padding: 30px 40px 40px 40px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.welcome-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 40px;
    padding: 0;
}

.welcome-logo-sener,
.welcome-logo-snien {
    height: 80px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.welcome-title-container {
    flex: 1;
    text-align: center;
}

.welcome-title {
    text-align: center;
    color: var(--color-verde-profundo);
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.welcome-subtitle {
    text-align: center;
    color: var(--color-muted);
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

.welcome-instructions {
    margin-bottom: 30px;
}

.instruction-item {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    align-items: flex-start;
}

.instruction-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-verde-profundo) 0%, var(--color-verde-claro) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(31, 122, 98, 0.3);
}

.instruction-content {
    flex: 1;
}

.instruction-content h3 {
    color: var(--color-text);
    font-size: 1.1rem;
    margin: 0 0 5px 0;
    font-weight: 600;
}

.instruction-content p {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.instruction-text {
    flex: 1;
}

.instruction-text strong {
    display: block;
    color: var(--color-text);
    font-size: 1.1rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.instruction-text p {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.welcome-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--color-verde-profundo) 0%, var(--color-verde-claro) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(31, 122, 98, 0.3);
}

.welcome-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(31, 122, 98, 0.4);
}

.welcome-btn:active {
    transform: translateY(0);
}

.welcome-footer {
    text-align: center;
    color: var(--color-muted);
    font-size: 0.85rem;
    margin: 30px 0 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

/* Responsive adjustments for welcome screen */
@media (max-width: 768px) {
    .welcome-content {
        padding: 30px 20px;
    }

    .welcome-header {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 30px;
    }

    .welcome-title {
        font-size: 1.6rem;
    }

    .welcome-subtitle {
        font-size: 1rem;
    }

    .welcome-logo-sener,
    .welcome-logo-snien {
        height: 50px;
    }

    .instruction-item {
        gap: 15px;
    }

    .instruction-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .instruction-content h3 {
        font-size: 1rem;
    }

    .instruction-content p {
        font-size: 0.9rem;
    }

    .instruction-text strong {
        font-size: 1rem;
    }

    .instruction-text p {
        font-size: 0.9rem;
    }
}

/* Node labels for map markers */
.leaflet-tooltip.node-label {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(31, 122, 98, 0.3);
    border-radius: 4px;
    padding: 3px 6px;
    font-size: 10px;
    font-weight: 700;
    color: #1f7a62;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(4px);
}

.leaflet-tooltip.node-label::before {
    border-top-color: rgba(31, 122, 98, 0.3);
}