/* =========================================================
   INFO CARDS
   ========================================================= */
.info-card {
    background: #ffffff;
    border: 1px solid rgba(30, 58, 138, 0.07);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 12px rgba(13, 27, 62, 0.06), 0 0 0 1px rgba(255,255,255,0.5) inset;
    animation: fadeInSlide 0.35s var(--ease) forwards;
    opacity: 0;
    transition: box-shadow 0.25s ease, transform 0.25s var(--ease);
}

.info-card:hover {
    box-shadow: 0 8px 28px rgba(13, 27, 62, 0.12);
    transform: translateY(-2px);
}

.info-card h3 {
    margin: 0 0 12px;
    font-family: 'Syne', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.01em;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(30, 58, 138, 0.05);
}

.info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-label {
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 500;
}

.info-value {
    font-weight: 600;
    font-size: 12.5px;
    text-align: right;
    color: var(--text);
}


/* =========================================================
   EMPTY STATES / STATUS
   ========================================================= */
.empty-state {
    background: linear-gradient(135deg, #f8faff 0%, #f0f5ff 100%);
    border: 1px dashed rgba(26, 86, 219, 0.18);
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
}

.empty-state h3 {
    margin: 0 0 8px;
    font-family: 'Syne', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.empty-state p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.status-banner {
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
}

.status-banner.loading {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.status-banner.error {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.status-banner.empty {
    background: #f8fafc;
    color: #475569;
    border-color: #e2e8f0;
}

.status-banner.success {
    background: #f0fdf4;
    color: #15803d;
    border-color: #bbf7d0;
}


/* =========================================================
   MAP OVERLAYS
   ========================================================= */
.map-loader {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.96);
    padding: 10px 16px;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(13, 27, 62, 0.14);
    border: 1px solid rgba(30, 58, 138, 0.07);
    backdrop-filter: blur(12px);
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    animation: slideDownFade 0.3s var(--ease);
}

.map-status {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 900;
    background: rgba(255, 255, 255, 0.96);
    padding: 10px 16px;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(13, 27, 62, 0.14);
    border: 1px solid rgba(30, 58, 138, 0.07);
    font-size: 13px;
    backdrop-filter: blur(12px);
    animation: slideDownFade 0.3s var(--ease);
}

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

.spinner {
    width: 17px;
    height: 17px;
    border: 2.5px solid rgba(26, 86, 219, 0.15);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

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


/* =========================================================
   CUSTOM SCROLLBARS
   ========================================================= */
.sidebar-left::-webkit-scrollbar,
.sidebar-right::-webkit-scrollbar,
.story-steps::-webkit-scrollbar,
.float-win__body::-webkit-scrollbar {
    width: 5px;
}

.sidebar-left::-webkit-scrollbar-track,
.sidebar-right::-webkit-scrollbar-track,
.story-steps::-webkit-scrollbar-track,
.float-win__body::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-left::-webkit-scrollbar-thumb,
.sidebar-right::-webkit-scrollbar-thumb,
.story-steps::-webkit-scrollbar-thumb,
.float-win__body::-webkit-scrollbar-thumb {
    background: rgba(26, 86, 219, 0.18);
    border-radius: 999px;
}

.sidebar-left::-webkit-scrollbar-thumb:hover,
.sidebar-right::-webkit-scrollbar-thumb:hover {
    background: rgba(26, 86, 219, 0.30);
}


/* =========================================================
   LAYER PANEL
   ========================================================= */
.mw-layers {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mw-layers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.mw-layers-title {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.mw-groups {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.group {
    background: #ffffff;
    border: 1px solid rgba(30, 58, 138, 0.07);
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(13, 27, 62, 0.05);
    overflow: hidden;
    animation: fadeInSlide 0.3s var(--ease) forwards;
    opacity: 0;
    transition: box-shadow 0.22s ease;
}

.group:hover {
    box-shadow: 0 4px 16px rgba(13, 27, 62, 0.09);
}

.group .title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    cursor: pointer;
    font-weight: 700;
    font-size: 12.5px;
    color: var(--text);
    letter-spacing: 0.01em;
    transition: background 0.18s ease;
    user-select: none;
}

.group .title:hover {
    background: rgba(26, 86, 219, 0.03);
}

.group .items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 14px 14px;
}

.group.collapsed .items {
    display: none;
}

.group.collapsed .group-caret {
    transform: rotate(-90deg);
}

.group-caret {
    transition: transform 0.22s var(--ease);
    color: var(--muted);
    font-size: 11px;
}

.item {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 10px;
    align-items: center;
}

.item .eye {
    border: 1px solid rgba(30, 58, 138, 0.10);
    background: #f5f8ff;
    border-radius: 10px;
    height: 36px;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item .eye:hover {
    background: rgba(26, 86, 219, 0.08);
    border-color: rgba(26, 86, 219, 0.20);
    transform: scale(1.08);
}

.item .eye.active {
    background: linear-gradient(135deg, var(--primary), #1448c7);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(26, 86, 219, 0.30);
}

.item .name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

.item .opacity {
    grid-column: 1 / -1;
    width: 100%;
}

.inline-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.inline-controls input[type="range"] {
    flex: 1;
}

.time-label {
    font-size: 11.5px;
    color: var(--muted);
    font-weight: 600;
    white-space: nowrap;
}

/* Styled range inputs */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(
        to right,
        var(--primary) 0%,
        var(--primary) var(--val, 50%),
        #dde4ef var(--val, 50%),
        #dde4ef 100%
    );
    border: none;
    height: 4px;
    border-radius: 999px;
    padding: 0;
    cursor: pointer;
    transition: height 0.15s ease;
}

input[type="range"]:hover {
    height: 5px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: white;
    border: 2px solid var(--primary);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(26, 86, 219, 0.25);
    transition: transform 0.15s var(--ease), box-shadow 0.15s ease;
}

input[type="range"]:hover::-webkit-slider-thumb {
    transform: scale(1.2);
    box-shadow: 0 4px 10px rgba(26, 86, 219, 0.35);
}


/* =========================================================
   CHARTS
   ========================================================= */
.chart-card {
    min-height: 0;
}

.chart-wrap {
    position: relative;
    width: 100%;
    height: 260px;
    min-height: 260px;
    max-height: 260px;
}

.chart-wrap canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

#sd-chart-card.hidden {
    display: none;
}

#sd-chart-card .chart-wrap {
    height: 280px;
    min-height: 280px;
    max-height: 280px;
}

#sd-chart-card .navigator {
    margin-top: 10px;
    height: 58px;
    border-top: 1px solid #eaeff8;
    padding-top: 8px;
}

#sd-chart-card .navigator canvas {
    width: 100%;
    height: 100%;
}

#sd-chart-reset.hidden {
    display: none !important;
}


/* =========================================================
   CHART CONTROLS / LEGEND / NAVIGATOR
   ========================================================= */
.chart-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.chart-card__head h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.chart-reset-btn {
    border: 1px solid #dde4ef;
    background: #f5f8ff;
    color: var(--muted);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.chart-reset-btn:hover {
    background: var(--primary-soft);
    border-color: rgba(26, 86, 219, 0.22);
    color: var(--primary);
}

.time-window-ui {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #eaeff8;
}

.time-window-ui__title {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 8px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.time-window-ui__labels {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 11.5px;
    color: var(--muted);
    margin-bottom: 8px;
}

.time-window-ui__sliders {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.time-window-ui input[type="range"] {
    width: 100%;
}

.mw-chart-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.mw-chart-legend {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.mw-legend-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f5f8ff;
    border: 1px solid #dde4ef;
    color: var(--text);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
}

.mw-legend-chip:hover,
.mw-legend-chip.active-focus {
    background: var(--primary-soft);
    border-color: rgba(26, 86, 219, 0.22);
    color: var(--primary);
}

.mw-legend-chip.inactive {
    opacity: 0.40;
}

.mw-legend-chip.inactive .mw-legend-dot {
    opacity: 0.35;
}

.mw-legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.mw-chart-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mw-chart-btn {
    border: 1px solid #dde4ef;
    background: #f5f8ff;
    color: var(--muted);
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    font-family: 'Inter', sans-serif;
}

.mw-chart-btn:hover {
    background: var(--primary-soft);
    border-color: rgba(26, 86, 219, 0.22);
    color: var(--primary);
}

.mw-chart-btn[disabled] {
    opacity: 0.40;
    cursor: default;
}

.navigator {
    margin-top: 10px;
    height: 58px;
    border-top: 1px solid #eaeff8;
    padding-top: 8px;
}

.navigator canvas {
    width: 100%;
    height: 100%;
    cursor: default;
}

.mw-layers-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}


/* =========================================================
   DOWNLOAD DROPDOWN
   ========================================================= */
.dl-dropdown {
    position: relative;
}

.dl-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 230px;
    background: rgba(255,255,255,0.98);
    border: 1px solid rgba(30, 58, 138, 0.08);
    border-radius: 18px;
    box-shadow: 0 20px 48px rgba(13, 27, 62, 0.18), 0 0 0 1px rgba(255,255,255,0.8) inset;
    padding: 8px;
    display: none;
    z-index: 1200;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform-origin: top right;
}

.dl-menu.open {
    display: flex;
    flex-direction: column;
    gap: 2px;
    animation: dropdownOpen 0.2s var(--ease);
}

@keyframes dropdownOpen {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-6px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.dl-menu button {
    border: none;
    background: transparent;
    text-align: left;
    padding: 10px 14px;
    border-radius: 11px;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dl-menu button:hover {
    background: rgba(26, 86, 219, 0.06);
    color: var(--primary);
    padding-left: 18px;
}

.dl-menu hr {
    border: none;
    border-top: 1px solid rgba(30, 58, 138, 0.07);
    margin: 4px 6px;
}


/* =========================================================
   FLOATING WINDOW
   ========================================================= */
.float-win {
    position: fixed;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(30, 58, 138, 0.08);
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(13, 27, 62, 0.22), 0 0 0 1px rgba(255,255,255,0.7) inset;
    overflow: hidden;
    min-width: min(360px, 90vw);
    max-width: min(540px, 95vw);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: floatWinIn 0.3s var(--ease);
}

@keyframes floatWinIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.float-win__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #f5f8ff 0%, #eef2fb 100%);
    border-bottom: 1px solid rgba(30, 58, 138, 0.07);
    cursor: grab;
    font-weight: 700;
    font-family: 'Syne', sans-serif;
    font-size: 14px;
    color: var(--text);
}

.float-win__header.dragging {
    cursor: grabbing;
}

.float-win__sub {
    margin-top: 4px;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    color: var(--muted);
}

.float-win__close {
    border: none;
    background: rgba(13, 27, 62, 0.06);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
    flex-shrink: 0;
}

.float-win__close:hover {
    background: rgba(220, 38, 38, 0.10);
    color: var(--danger);
}

.float-win__body {
    padding: 18px;
    max-height: 70vh;
    overflow: auto;
}


/* =========================================================
   MAP LEGEND
   ========================================================= */
.legend {
    background: rgba(255, 255, 255, 0.96);
    padding: 12px 14px;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(13, 27, 62, 0.14), 0 0 0 1px rgba(255,255,255,0.7) inset;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(30, 58, 138, 0.06);
}

.legend strong {
    font-size: 13px;
    font-weight: 700;
    font-family: 'Syne', sans-serif;
    display: block;
    margin-bottom: 6px;
    color: var(--text);
}

.legend small {
    color: var(--muted);
    font-size: 11px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}

.legend-item span {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.10);
    flex-shrink: 0;
}


/* =========================================================
   BASEMAP FLOATING PANEL
   ========================================================= */
.basemap-control {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-radius: 14px;
}

.basemap-toggle {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(30, 58, 138, 0.10);
    background: rgba(255,255,255,0.95);
    cursor: pointer;
    font-size: 18px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(13, 27, 62, 0.14);
    transition: all 0.22s var(--ease);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.basemap-toggle:hover {
    background: #fff;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 10px 24px rgba(13, 27, 62, 0.18);
}

.basemap-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 14px;
    box-shadow: 0 16px 36px rgba(13, 27, 62, 0.16);
    border: 1px solid rgba(30, 58, 138, 0.08);
    transform-origin: top right;
    animation: basemapDropdown 0.2s var(--ease);
}

.basemap-mini {
    width: 34px;
    height: 34px;
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    border: 2px solid transparent;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transition: all 0.2s var(--ease);
}

.basemap-mini:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(13, 27, 62, 0.15);
}

.basemap-mini.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.18);
}

.mini-map-small {
    width: 100%;
    height: 100%;
}

.mini-map-small .leaflet-control-container,
.mini-map-small .leaflet-bottom,
.mini-map-small .leaflet-top {
    display: none;
}

@keyframes basemapDropdown {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(-6px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}


/* =========================================================
   ADVANCED DOWNLOAD — SIDEBAR NATIVE
   ========================================================= */
.sd-side-shell {
    display: grid;
    gap: 12px;
}

.sd-side-topbar {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 2px;
}

.sd-shell {
    display: grid;
    gap: 14px;
}

.sd-hero {
    background: linear-gradient(135deg, #f0f5ff 0%, #e8f0fe 100%);
    border: 1px solid rgba(26, 86, 219, 0.10);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 16px rgba(26, 86, 219, 0.06);
    position: relative;
    overflow: hidden;
}

/* Decorative circle in hero */
.sd-hero::after {
    content: '';
    position: absolute;
    right: -20px;
    top: -20px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(26, 86, 219, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.sd-hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(26, 86, 219, 0.10);
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.sd-hero-title {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
}

.sd-hero-text {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--muted);
}

.sd-section {
    background: #ffffff;
    border: 1px solid rgba(30, 58, 138, 0.07);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 12px rgba(13, 27, 62, 0.05);
    transition: box-shadow 0.22s ease;
}

.sd-section:hover {
    box-shadow: 0 4px 20px rgba(13, 27, 62, 0.09);
}

.sd-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.sd-section-kicker {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 3px;
}

.sd-section-title {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--text);
    font-family: 'Inter', sans-serif;
}

.sd-grid {
    display: grid;
    gap: 12px;
}

.sd-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sd-row {
    display: grid;
    gap: 12px;
}

.sd-row.cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sd-field {
    display: grid;
    gap: 6px;
}

.sd-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.sd-select,
.sd-input {
    width: 100%;
    min-height: 42px;
    border: 1px solid #dde4ef;
    border-radius: 12px;
    background: #f8faff;
    color: var(--text);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.18s ease;
}

.sd-input {
    padding-top: 9px;
    padding-bottom: 9px;
}

.sd-select:hover,
.sd-input:hover {
    background: #fff;
    border-color: #c5d0e8;
}

.sd-select:focus,
.sd-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.09);
    background: #fff;
}

.sd-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.sd-hint {
    font-size: 11.5px;
    line-height: 1.45;
    color: var(--muted);
}

.sd-chipbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.sd-chip {
    border: 1px solid #dde4ef;
    background: #f5f8ff;
    color: var(--muted);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 11.5px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.18s ease;
}

.sd-chip:hover {
    background: var(--primary-soft);
    border-color: rgba(26, 86, 219, 0.22);
    color: var(--primary);
}

.sd-chip.active {
    background: rgba(26, 86, 219, 0.10);
    border-color: rgba(26, 86, 219, 0.30);
    color: var(--primary);
}

.sd-error {
    min-height: 17px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--danger);
    margin-top: 1px;
}

.sd-adv-card {
    border: 1px dashed rgba(30, 58, 138, 0.15);
    border-radius: 12px;
    padding: 12px;
    background: #f8faff;
}

.sd-adv-card summary {
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    font-family: 'Inter', sans-serif;
    user-select: none;
    transition: color 0.18s ease;
}

.sd-adv-card summary:hover {
    color: var(--primary);
}

.sd-adv-body {
    margin-top: 10px;
    display: grid;
    gap: 8px;
}

.sd-check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
}

.sd-check input {
    accent-color: var(--primary);
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.sd-summary {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f5f8ff;
    border: 1px solid #dde4ef;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.45;
    font-weight: 500;
}

.sd-summary.is-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #15803d;
}

.sd-summary.is-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: var(--danger);
}

.sd-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.sd-actions .btn {
    min-width: 120px;
    min-height: 42px;
    border-radius: 12px;
    font-weight: 600;
}

.sd-actions .btn.primary {
    background: linear-gradient(135deg, var(--primary) 0%, #1448c7 100%);
    box-shadow: 0 6px 18px rgba(26, 86, 219, 0.25);
    border-color: transparent;
    color: white;
}

.sd-actions .btn.primary:hover {
    box-shadow: 0 10px 24px rgba(26, 86, 219, 0.35);
}

.sd-chart-shell {
    display: grid;
    gap: 10px;
}

.sd-chart-msg {
    font-size: 12.5px;
    color: var(--muted);
    text-align: center;
    padding: 14px;
    border-radius: 12px;
    background: #f5f8ff;
    border: 1px solid #dde4ef;
    font-weight: 500;
}

@media (max-width: 760px) {
    .sd-grid.two,
    .sd-row.cols,
    .sd-inline {
        grid-template-columns: 1fr;
    }

    .sd-actions {
        flex-direction: column-reverse;
    }

    .sd-actions .btn {
        width: 100%;
    }
}