:root {
    --bg: #f1f5f9;
    --text: #1e293b;
    --primary: #00a2ff;
    --glass: rgba(255, 255, 255, 0.7);
    --border: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
    --bg: #0f172a;
    --text: #f8fafc;
    --glass: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
}

body { font-family: 'Inter', sans-serif; background-color: var(--bg); color: var(--text); margin: 0; transition: 0.4s; overflow-x: hidden; }
.glass { background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }

/* Header & Nav */
.main-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 30px; margin: 15px; border-radius: 20px; }
.header-left { display: flex; align-items: center; gap: 40px; }
.header-right { display: flex; align-items: center; gap: 25px; }
.brand { display: flex; align-items: center; gap: 12px; }
.app-logo { height: 45px; }
.brand-text h1 { font-family: 'Exo 2'; font-size: 1.6rem; margin: 0; font-weight: 800; }
.tagline { font-size: 0.65rem; opacity: 0.5; letter-spacing: 1.5px; text-transform: uppercase; }

.social-links { display: flex; gap: 20px; }
.social-item { display: flex; align-items: center; gap: 6px; text-decoration: none; color: var(--text); font-size: 0.75rem; opacity: 0.8; transition: 0.2s; }
.social-item:hover { color: var(--primary); opacity: 1; }
.social-item img { width: 18px; }

/* Menu con Dropdown */
.nav-bar { display: flex; justify-content: center; gap: 30px; padding: 12px 20px; margin: 0 auto 25px; border-radius: 15px; position: relative; z-index: 100; width: fit-content; }
.nav-item { position: relative; display: inline-block; }
.nav-link { text-decoration: none; color: var(--text); font-weight: 600; font-size: 0.9rem; opacity: 0.5; transition: 0.3s; cursor: pointer; }
.nav-link.active, .nav-item:hover .nav-link { opacity: 1; color: var(--primary); }

.dropdown-content { display: none; position: absolute; top: 100%; left: 0; background: var(--bg); min-width: 160px; box-shadow: 0 8px 16px rgba(0,0,0,0.2); border-radius: 8px; z-index: 1; border: 1px solid var(--border); }
.dropdown-content a { color: var(--text); padding: 10px 15px; text-decoration: none; display: block; font-size: 0.85rem; transition: 0.2s; }
.dropdown-content a:hover { background: var(--primary); color: white; }
.nav-item:hover .dropdown-content { display: block; }
.nav-item.open .dropdown-content { display: block; }

/* Container & Grid */
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.main-grid { display: grid; grid-template-columns: 0.8fr 1fr 1fr; gap: 20px; margin-bottom: 25px; }
.card { padding: 25px; border-radius: 24px; position: relative; }

/* Weather Cards */
.status-badge { background: var(--primary); color: white; padding: 3px 12px; border-radius: 20px; font-size: 0.65rem; font-weight: 700; position: absolute; top: 20px; right: 20px; }
.altitude { display: block; font-size: 0.75rem; opacity: 0.5; margin-top: 5px; }
/* FIX 3: temperatura centrata come umidità */
.temp-val { font-family: 'Exo 2'; font-size: 3.5rem; font-weight: 800; margin: 10px 0 2px 0; color: var(--primary); text-align: center; }
.w-icon { width: 130px; margin: 0 auto; display: block; }


.input-group input { background: none; border: none; color: var(--text); padding: 12px; flex: 1; font-size: 1rem; outline: none; }

/* Bulletin Bar */
.bulletin-bar { padding: 12px 24px; border-radius: 18px; margin: 0 auto 25px; width: fit-content; }
.bar-content { display: flex; justify-content: center; align-items: center; gap: 20px; flex-wrap: wrap; }
.bar-inputs { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.field { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
.field input, .field select { background: rgba(0,0,0,0.1); border: 1px solid var(--border); color: var(--text); padding: 8px; border-radius: 8px; font-size: 0.9rem; }

/* Mappe — altezza auto per adattarsi all'immagine */
.maps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
/* FIX 6: seconda riga data nel titolo mappa */
.map-box { border-radius: 24px; padding: 20px; }
.map-box h4 { margin-top: 0; opacity: 0.7; text-align: center; font-size: 0.9rem; line-height: 1.4; }
.map-date-sub { font-size: 0.72rem; opacity: 0.75; font-weight: 400; display: block; }
.map-frame { min-height: 120px; border-radius: 15px; overflow: hidden; background: rgba(0,0,0,0.06); cursor: zoom-in; }
.map-frame img { width: 100%; height: auto; display: block; object-fit: contain; }

/* Utility */
.hidden { display: none !important; }
.zoom-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 40px; }
#zoomed-img { max-width: 100%; max-height: 100%; border-radius: 10px; }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 9999; display: flex; align-items: center; justify-content: center; }
.modal-card { width: 100%; max-width: 400px; padding: 30px; border-radius: 24px; color: white; }
.btn-action { background: var(--primary); color: white; border: none; padding: 12px 20px; border-radius: 12px; font-weight: 700; width: 100%; cursor: pointer; }
.theme-pill { background: var(--primary); color: white; border: none; padding: 8px 15px; border-radius: 20px; cursor: pointer; font-weight: 600; font-size: 0.8rem; }

/* Card header e meteo */
.card-header { display: flex; justify-content: space-between; align-items: flex-start; }
.city-edit-wrapper h2 { cursor: pointer; margin: 0; transition: opacity 0.2s; }
.city-edit-wrapper h2:hover { opacity: 0.7; }
.card-actions { display: flex; gap: 8px; }
.icon-btn { background: none; border: none; cursor: pointer; color: inherit; padding: 4px; opacity: 0.8; }
.icon-btn:hover { opacity: 1; }
.weather-layout { display: flex; justify-content: space-between; align-items: center; }
.city-search-input { width: 100%; padding: 5px; font-size: 1.2rem; font-family: inherit; font-weight: bold; background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.4); border-radius: 8px; color: inherit; }
.weather-data { display: flex; flex-direction: column; gap: 3px; }
.weather-icon-container { display: flex; justify-content: center; align-items: center; flex: 1; }

/* ---------------------------------------------------------------
   NUVOLETTE DI NOTIFICA — due speech bubble, una per città
--------------------------------------------------------------- */
.notif-summary-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.notif-bubble {
    background: rgba(0, 162, 255, 0.08);
    border: 1px solid rgba(0, 162, 255, 0.25);
    border-radius: 10px 10px 10px 3px;
    padding: 6px 10px;
    font-size: 0.72rem;
    line-height: 1.35;
    position: relative;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 5px;
}

/* Seconda nuvoletta: "coda" a destra */
.notif-bubble.notif-bubble-right {
    border-radius: 14px 14px 4px 14px;
    background: rgba(0, 162, 255, 0.05);
}

.notif-bubble-city {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--primary);
    margin-bottom: 5px;
}

/* FIX 1: riepilogo giornaliero nella notifica */
.notif-daily-line {
    font-weight: 600;
    font-size: 0.82rem;
    margin-bottom: 2px;
}

.notif-daily-sub {
    font-size: 0.76rem;
    opacity: 0.8;
    font-style: italic;
    margin-bottom: 2px;
}

.notif-alert-item {
    color: #e05555;
    font-weight: 600;
    font-size: 0.77rem;
    margin-top: 3px;
}

[data-theme="dark"] .notif-alert-item {
    color: #ff7a7a;
}

.notif-ok {
    opacity: 0.75;
    font-style: italic;
    font-size: 0.77rem;
    margin-top: 3px;
}

/* PUNTO 1 — Welcome card compatta + bottone Accedi piccolo */
.welcome-card { padding: 14px 18px !important; }
.welcome-card h3 { font-size: 0.95rem; margin: 0; }
.welcome-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.notif-summary-box { gap: 6px; margin-top: 6px; }
.notif-bubble-city { white-space: nowrap; font-weight: 700; font-size: 0.75rem; color: var(--primary); margin-bottom: 0; }
.notif-daily-line { font-size: 0.72rem; font-weight: 600; }
.notif-daily-sub  { font-size: 0.68rem; }
.btn-accedi {
    display: inline-block; text-decoration: none; text-align: center;
    background: var(--primary); color: white; border: none;
    padding: 4px 14px; border-radius: 20px; font-size: 0.72rem;
    font-weight: 700; cursor: pointer; margin-bottom: 8px;
}

/* PUNTO 2 — RESPONSIVE MOBILE COMPLETO */
@media (max-width: 768px) {
    /* Header su più righe */
    .main-header { justify-content: center; padding: 8px 15px; margin: 8px; }
    .header-right { flex-wrap: wrap; justify-content: center; gap: 8px; }
    .social-links { flex-wrap: wrap; justify-content: center; gap: 8px; }
    .brand-text h1 { font-size: 1.1rem; }

    /* Nav larga ma wrap */
    .nav-bar { flex-wrap: wrap; width: auto !important; margin: 0 8px 15px; gap: 8px; padding: 10px 15px; }

    /* Grid principale: colonna unica, ordine benvenuto → città1 → città2 */
    .main-grid { grid-template-columns: 1fr; gap: 12px; margin-bottom: 15px; }

    /* Bollettino */
    .bulletin-bar { padding: 12px 15px; margin-bottom: 15px; }
    .bar-content { flex-direction: column; align-items: flex-start; gap: 10px; }
    .bar-inputs { flex-wrap: wrap; gap: 12px; }

    /* Mappe: una sotto l'altra */
    .maps-grid { grid-template-columns: 1fr; gap: 12px; }

    /* Temperatura e icona più compatti */
    .temp-val { font-size: 2.8rem; }
    .w-icon { width: 75px; }
    .card { padding: 18px; }

    /* Zoom: frecce più piccole */
    .zoom-nav-btn { font-size: 2rem; padding: 10px 8px; }
    .zoom-overlay { gap: 10px; padding: 15px; }
}

@media (max-width: 400px) {
    .brand-text h1 { font-size: 0.92rem; }
    .nav-bar { gap: 5px; }
    .nav-link { font-size: 0.8rem; }
}

/* PUNTO 6 — zoom con navigazione frecce e tasto X */
.zoom-overlay { flex-direction: row; gap: 20px; }
.zoom-content {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    max-width: 90vw; max-height: 90vh;
}
.zoom-close-btn {
    position: absolute; top: -14px; right: -14px;
    background: rgba(255,255,255,0.25); border: none; color: white;
    width: 32px; height: 32px; border-radius: 50%;
    cursor: pointer; font-size: 1rem; z-index: 1;
    display: flex; align-items: center; justify-content: center;
}
.zoom-close-btn:hover { background: rgba(220,50,50,0.75); }
.zoom-nav-btn {
    background: rgba(255,255,255,0.12); border: none; color: white;
    font-size: 2.8rem; cursor: pointer; padding: 15px 12px;
    border-radius: 10px; flex-shrink: 0; transition: background 0.2s;
    user-select: none; line-height: 1;
}
.zoom-nav-btn:hover { background: rgba(255,255,255,0.28); }
#zoomed-img {
    max-width: 100%; max-height: 85vh;
    border-radius: 10px; object-fit: contain;
}


/* ═══════════════════════════════════════════════════════════════
   GIORNALIERE — barra controlli
═══════════════════════════════════════════════════════════════ */
.gior-controls {
    padding: 16px 22px;
    border-radius: 20px;
    margin-bottom: 20px;
}
.gior-search-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.gior-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.07);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px 14px;
    flex: 1;
    min-width: 180px;
}
.gior-search-box input {
    background: none; border: none; outline: none;
    color: var(--text); font-size: 1rem; width: 100%;
}
.gior-date-wrap  { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.gior-pill       { background: var(--primary); color: white; border: none; padding: 8px 16px;
                   border-radius: 20px; font-weight: 700; font-size: 0.82rem; cursor: pointer; opacity: 0.45; transition: 0.2s; }
.gior-pill.active{ opacity: 1; }
.gior-date-input { background: rgba(0,0,0,0.07); border: 1px solid var(--border); color: var(--text);
                   padding: 8px 10px; border-radius: 10px; font-size: 0.88rem; cursor: pointer; }
.gior-toggles-row{ display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.toggle-group    { display: flex; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.tbtn { background: none; border: none; color: var(--text); padding: 6px 14px;
        font-size: 0.8rem; font-weight: 600; cursor: pointer; opacity: 0.45; transition: 0.2s; }
.tbtn.active      { background: var(--primary); color: white; opacity: 1; }
.tbtn:not(.active):hover { opacity: 0.8; background: rgba(0,162,255,0.1); }

/* Loading */
.gior-loading .gior-loading-bar {
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #00e5ff, var(--primary));
    background-size: 200%;
    animation: shimmer 1.2s infinite;
    border-radius: 3px;
    margin-bottom: 12px;
}
@keyframes shimmer { 0%{background-position:200%} 100%{background-position:-200%} }

/* Day Strip */
.day-strip-wrap { border-radius: 20px; padding: 14px 16px; margin-bottom: 16px; overflow: hidden; }
.day-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px;
             scrollbar-width: thin; scrollbar-color: var(--primary) transparent; }
.day-strip-empty { opacity: 0.5; font-size: 0.9rem; padding: 10px 0; }

.day-card {
    flex-shrink: 0; min-width: 90px; padding: 12px 10px;
    border-radius: 16px; background: rgba(0,0,0,0.04);
    border: 2px solid transparent; cursor: pointer;
    text-align: center; transition: 0.2s; user-select: none;
}
.day-card:hover    { border-color: var(--primary); background: rgba(0,162,255,0.08); }
.day-card.selected { border-color: var(--primary); background: rgba(0,162,255,0.13); }
.dc-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; opacity: 0.6; margin-bottom: 2px; }
.dc-date  { font-size: 0.72rem; opacity: 0.7; margin-bottom: 6px; }
.dc-emoji { font-size: 1.6rem; margin-bottom: 6px; }
.dc-temps { font-size: 0.85rem; display: flex; justify-content: center; gap: 6px; margin-bottom: 4px; }
.dc-max   { color: #ff6b35; font-weight: 700; }
.dc-min   { color: #7ec8ff; font-weight: 700; }
.dc-rain  { font-size: 0.68rem; opacity: 0.8; }
.dc-src   { font-size: 0.58rem; font-weight: 800; padding: 1px 5px; border-radius: 4px; margin-top: 3px; display: inline-block; }
.src-icon  { background: rgba(0,200,100,0.2); color: #00a060; }
.src-ecmwf { background: rgba(100,100,255,0.2); color: #5555ff; }
[data-theme="dark"] .src-icon  { background: rgba(0,200,100,0.15); color: #00d080; }
[data-theme="dark"] .src-ecmwf { background: rgba(150,150,255,0.15); color: #8888ff; }

/* Info Row (Astro + AQI) */
.gior-info-row   { display: flex; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.gior-astro-card { flex: 2; min-width: 260px; padding: 12px 18px; border-radius: 16px;
                   display: flex; gap: 18px; align-items: center; flex-wrap: wrap; font-size: 0.85rem; }
.astro-item { display: flex; align-items: center; gap: 5px; }
.gior-aqi-card  { flex: 1; min-width: 200px; padding: 12px 18px; border-radius: 16px; font-size: 0.82rem; }
.aqi-title { font-weight: 700; margin-bottom: 6px; }
.aqi-index { font-size: 1.3rem; font-weight: 800; margin-bottom: 6px; }
.aqi-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.aqi-pill  { background: rgba(0,0,0,0.07); padding: 2px 9px; border-radius: 8px; font-size: 0.75rem; }

/* Detail Table */
.gior-table-card    { padding: 20px 22px; border-radius: 22px; margin-bottom: 30px; }
.gior-table-header  { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.gior-day-title     { font-family:'Exo 2'; font-size: 1.2rem; font-weight: 800; }
.src-tag            { font-size: 0.65rem; font-weight: 800; padding: 2px 8px; border-radius: 6px; }
.gior-day-summary   { font-size: 0.88rem; opacity: 0.8; }
.gior-table-scroll  { overflow-x: auto; }
.gior-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; min-width: 560px; }
.gior-table th { padding: 8px 10px; text-align: center; opacity: 0.55; font-size: 0.75rem;
                 font-weight: 700; border-bottom: 2px solid var(--border); white-space: nowrap; }
.gior-table td { padding: 8px 10px; text-align: center; border-bottom: 1px solid var(--border);
                 vertical-align: middle; white-space: nowrap; }
.gior-table td.td-desc { text-align: left; font-size: 0.8rem; opacity: 0.85; white-space: normal; min-width: 110px; }
.gior-table th.td-desc { text-align: left; }
.gior-table tr:last-child td { border-bottom: none; }
.gior-table tr.row-current   { background: rgba(0,162,255,0.1); }
.gior-table tr:hover          { background: rgba(0,0,0,0.03); }
.cell-rain       { color: #1a90d0; font-weight: 600; }
.cell-rain-heavy { color: #0050a0; font-weight: 700; }
[data-theme="dark"] .cell-rain-heavy { color: #5bc8ff; }
[data-theme="dark"] .cell-rain       { color: #80d4ff; }

/* ═══════════════════════════════════════════════════════════════
   COMING SOON — pagine placeholder
═══════════════════════════════════════════════════════════════ */
.coming-soon-wrap {
    display: flex; justify-content: center; align-items: center;
    min-height: 60vh; padding: 40px 20px;
}
.coming-soon-card  { max-width: 420px; width: 100%; padding: 50px 40px; border-radius: 28px; text-align: center; }
.coming-soon-emoji { font-size: 4rem; margin-bottom: 20px; }
.coming-soon-title { font-family:'Exo 2'; font-size: 1.6rem; font-weight: 800; margin: 0 0 12px; }
.coming-soon-msg   { font-size: 1rem; opacity: 0.7; line-height: 1.6; margin-bottom: 30px; }

/* Responsive */
@media (max-width: 768px) {
    .gior-controls { padding: 14px 15px; }
    .day-card { min-width: 75px; padding: 10px 7px; }
    .dc-emoji { font-size: 1.3rem; }
    .gior-table { font-size: 0.78rem; }
    .gior-table td, .gior-table th { padding: 6px 7px; }
    .gior-table-card { padding: 16px; }
    .gior-info-row { gap: 10px; }
    .coming-soon-card { padding: 36px 24px; }
}

/* ── zoom-content touch + counter (dalla precedente sessione) ── */
.zoom-content { touch-action: none; }
.zoom-counter {
    position: absolute; bottom: -32px; left: 50%; transform: translateX(-50%);
    background: rgba(0,0,0,0.55); color: white; font-size: 0.85rem; font-weight: 600;
    padding: 3px 14px; border-radius: 20px; pointer-events: none; white-space: nowrap;
}

/* ── Icone reali nelle day-card ── */
.dc-icon-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 44px;
    margin-bottom: 6px;
}
.dc-icon-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
    transition: transform 0.2s;
}
.day-card:hover .dc-icon-img  { transform: scale(1.12); }
.day-card.selected .dc-icon-img { transform: scale(1.08); }
.dc-icon-fallback { font-size: 1.6rem; line-height: 1; }

/* ═══════════════════════════════════════════════════════════════
   SETTIMANALI — controlli, griglia, chat
═══════════════════════════════════════════════════════════════ */

/* Barra controlli */
.sett-controls { padding: 16px 22px; border-radius: 20px; margin-bottom: 20px; }
.sett-controls-row {
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: space-between;
}

/* Navigazione settimana */
.sett-nav { display: flex; align-items: center; gap: 10px; }
.sett-nav-btn {
    background: var(--primary); color: white; border: none;
    width: 36px; height: 36px; border-radius: 50%;
    font-size: 1.4rem; cursor: pointer; display: flex;
    align-items: center; justify-content: center;
    transition: 0.2s; user-select: none; line-height: 1;
}
.sett-nav-btn:hover { filter: brightness(1.15); }
.sett-date-label {
    display: flex; flex-direction: column; align-items: center;
    cursor: pointer; transition: 0.2s; min-width: 130px; text-align: center;
}
.sett-date-label:hover { opacity: 0.75; }
.sett-date-title { font-size: 0.7rem; opacity: 0.55; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.sett-date-val { font-family: 'Exo 2'; font-size: 1.1rem; font-weight: 800; color: var(--primary); }

/* Toggle tipo mappa */
.sett-type-toggle { display: flex; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.sett-type-btn {
    background: none; border: none; color: var(--text);
    padding: 8px 16px; font-size: 0.85rem; font-weight: 600;
    cursor: pointer; opacity: 0.5; transition: 0.2s;
}
.sett-type-btn.active { background: var(--primary); color: white; opacity: 1; }
.sett-type-btn:not(.active):hover { opacity: 0.8; background: rgba(0,162,255,0.1); }

/* Select città */
.sett-city-select { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; }
.sett-select {
    background: rgba(0,0,0,0.07); border: 1px solid var(--border);
    color: var(--text); padding: 8px 10px; border-radius: 10px;
    font-size: 0.88rem; cursor: pointer; min-width: 180px;
    font-family: inherit;
}
[data-theme="dark"] .sett-select { background: rgba(255,255,255,0.07); }

/* Griglia mappa + boxplot */
.sett-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 20px; margin-bottom: 20px;
}
.sett-map-card { padding: 20px; border-radius: 24px; }
.sett-card-title { font-family: 'Exo 2'; font-size: 1rem; font-weight: 700; margin: 0 0 14px; }
.sett-img-wrap {
    position: relative; min-height: 200px;
    border-radius: 16px; overflow: hidden;
    background: rgba(0,0,0,0.05); display: flex;
    align-items: center; justify-content: center;
}
.sett-img {
    width: 100%; height: auto; display: block;
    object-fit: contain; border-radius: 12px; cursor: zoom-in;
    transition: transform 0.2s;
}
.sett-img:hover { transform: scale(1.01); }
.sett-img-hint { font-size: 0.68rem; opacity: 0.4; text-align: center; margin: 8px 0 0; }
.sett-img-empty {
    display: flex; flex-direction: column; align-items: center;
    gap: 8px; opacity: 0.4; padding: 30px;
}
.sett-img-empty span { font-size: 2.5rem; }
.sett-img-empty p { font-size: 0.85rem; text-align: center; margin: 0; }

/* Spinner */
.sett-loader { display: flex; align-items: center; justify-content: center; padding: 40px; }
.sett-spinner {
    width: 36px; height: 36px; border-radius: 50%;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Mini Chat */
.sett-chat-card { padding: 18px 20px; border-radius: 22px; margin-bottom: 30px; }
.sett-chat-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px; flex-wrap: wrap; gap: 8px;
}
.sett-chat-title {
    display: flex; align-items: center; gap: 8px;
    font-weight: 700; font-size: 0.9rem;
}
.sett-week-tag {
    background: rgba(0,162,255,0.12); color: var(--primary);
    font-size: 0.72rem; font-weight: 700; padding: 2px 8px;
    border-radius: 8px;
}
.sett-chat-actions { display: flex; align-items: center; gap: 8px; }
.sett-chat-open-btn {
    color: var(--primary); text-decoration: none; font-size: 0.78rem;
    font-weight: 600; opacity: 0.85; transition: 0.2s;
}
.sett-chat-open-btn:hover { opacity: 1; }
.sett-chat-close {
    background: none; border: none; color: var(--text); cursor: pointer;
    opacity: 0.4; font-size: 0.9rem; transition: 0.2s;
}
.sett-chat-close:hover { opacity: 1; color: #e05555; }
.sett-chat-messages {
    height: 220px; overflow-y: auto; display: flex; flex-direction: column;
    gap: 8px; padding: 4px 0; margin-bottom: 10px;
    scrollbar-width: thin; scrollbar-color: var(--primary) transparent;
}
.sett-msg { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.sett-msg-name { font-weight: 700; font-size: 0.78rem; color: var(--primary); white-space: nowrap; }
.sett-msg-text { font-size: 0.82rem; flex: 1; }
.sett-msg-time { font-size: 0.68rem; opacity: 0.45; white-space: nowrap; }
.sett-chat-empty { opacity: 0.5; font-size: 0.82rem; font-style: italic; text-align: center; margin: auto; }
.sett-chat-input-row { display: flex; align-items: center; gap: 8px; }
.sett-chat-tag-inline {
    color: var(--primary); font-size: 0.75rem; font-weight: 700;
    white-space: nowrap; opacity: 0.8;
}
.sett-chat-input {
    flex: 1; background: rgba(0,0,0,0.06); border: 1px solid var(--border);
    color: var(--text); padding: 8px 12px; border-radius: 20px;
    font-size: 0.88rem; font-family: inherit; outline: none; transition: 0.2s;
}
[data-theme="dark"] .sett-chat-input { background: rgba(255,255,255,0.06); }
.sett-chat-input:focus { border-color: var(--primary); }
.sett-chat-send {
    background: var(--primary); color: white; border: none;
    width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
    font-size: 0.9rem; flex-shrink: 0; transition: 0.2s;
}
.sett-chat-send:hover { filter: brightness(1.15); }

/* Responsive */
@media (max-width: 768px) {
    .sett-controls-row { flex-direction: column; align-items: flex-start; gap: 12px; }
    .sett-grid { grid-template-columns: 1fr; }
    .sett-map-card { padding: 14px; }
    .sett-select { min-width: 140px; }
    .sett-chat-messages { height: 160px; }
}

/* ═══ FOOTER ════════════════════════════════════════════════════════════════ */
.site-footer { margin: 30px 15px 15px; border-radius: 20px; padding: 22px 30px; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.footer-stats { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; justify-content: center; }
.footer-stat-item { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; }
.footer-stat-icon { font-size: 1.1rem; }
.footer-stat-val { font-family: 'Exo 2'; font-size: 1.3rem; font-weight: 800; color: var(--primary); }
.footer-stat-label { opacity: 0.6; font-size: 0.8rem; }
.footer-stat-sep { width: 1px; height: 28px; background: var(--border); opacity: 0.5; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: var(--primary); text-decoration: none; font-size: 0.78rem; font-weight: 600; opacity: 0.85; transition: 0.2s; }
.footer-links a:hover { opacity: 1; text-decoration: underline; }
.footer-legal-note { font-size: 0.72rem; opacity: 0.55; max-width: 700px; line-height: 1.6; }
.footer-legal-note a { color: var(--primary); }
.footer-copy { font-size: 0.68rem; opacity: 0.4; letter-spacing: 0.3px; }
@media (max-width: 768px) {
    .site-footer { margin: 20px 8px 10px; padding: 16px 15px; }
    .footer-stats { gap: 14px; }
    .footer-stat-sep { display: none; }
    .footer-links { gap: 10px; }
}