/* ==========================================================================
   EcoJardín con Kantuta - Estilos Principales
   Paleta viva, moderna y amigable para niños con diseño responsive
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600;700&family=Quicksand:wght@500;700&display=swap');

:root {
    --primary-green: #2d6a4f;
    --light-green: #52b788;
    --soft-green: #d8f3dc;
    --sun-gold: #ffb703;
    --sun-amber: #fb8500;
    --flower-crimson: #d90429;
    --flower-pink: #ff758f;
    --petal-yellow: #ffe382;
    --earth-brown: #7f4f24;
    --soft-cream: #fbfbf2;
    --dark-text: #1b263b;
    --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.08);
    --shadow-card: 0 14px 30px rgba(45, 106, 79, 0.15);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --font-heading: 'Fredoka', cursive, sans-serif;
    --font-body: 'Quicksand', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(165deg, #dbeafe 0%, #e0f2fe 42%, #ede9fe 100%);
    color: var(--dark-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* ==========================================================================
   Cabecera y Barra de Navegación
   ========================================================================== */
.main-header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 2px solid rgba(82, 183, 136, 0.25);
    padding: 6px 18px;
    position: sticky;
    top: 0;
    z-index: 1100;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.04);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.header-bar,
.phone-nav-panel {
    display: contents;
}

.header-bar-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    order: 3;
    position: relative;
}

.settings-panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(260px, calc(100vw - 16px));
    padding: 12px;
    background: #ffffff;
    border: 2px solid rgba(82, 183, 136, 0.4);
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
    z-index: 30;
    flex-direction: column;
    gap: 8px;
}

.settings-panel.is-open {
    display: flex;
}

.settings-panel-title {
    margin: 0 2px 2px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: #166534;
}

.settings-panel .nav-tab-btn,
.settings-panel .sound-btn {
    width: 100%;
    justify-content: flex-start;
    box-sizing: border-box;
}

.logo-brand {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    cursor: pointer;
    order: 1;
    min-width: 0;
    direction: ltr;
}

.logo-utb {
    order: 1;
    height: 52px;
    width: auto;
    max-width: 210px;
    object-fit: contain;
    object-position: left center;
    flex-shrink: 0;
}

.logo-text {
    order: 2;
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    color: #14532d;
    background: none;
    -webkit-text-fill-color: #14532d;
    white-space: nowrap;
    padding-left: 12px;
    border-left: 3px solid #e8b423;
}

.logo-text em {
    font-style: normal;
    color: #c2410c;
    -webkit-text-fill-color: #c2410c;
}

.nav-tabs {
    order: 2;
}

.header-actions {
    order: 4;
}

.user-greeting-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    border-radius: 20px;
    font-weight: 600;
    color: #047857;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    order: 3;
}

.notif-bell-btn {
    order: 4;
}

.nav-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 6px 10px;
    border-radius: 14px;
    border: 2px solid #86efac;
    background: #f0fdf4;
    color: #166534;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}

.nav-menu-bars,
.nav-menu-bars::before,
.nav-menu-bars::after {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: #166534;
    position: relative;
}

.nav-menu-bars::before,
.nav-menu-bars::after {
    content: "";
    position: absolute;
    left: 0;
}

.nav-menu-bars::before { top: -5px; }
.nav-menu-bars::after { top: 5px; }

.header-container.is-menu-open .nav-menu-bars {
    background: transparent;
}

.header-container.is-menu-open .nav-menu-bars::before {
    top: 0;
    transform: rotate(45deg);
}

.header-container.is-menu-open .nav-menu-bars::after {
    top: 0;
    transform: rotate(-45deg);
}

.logo-mascot-icon {
    display: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0;
    order: 2;
}

.nav-tab-btn {
    background: #f1f5f9;
    border: 2px solid transparent;
    border-radius: 30px;
    padding: 8px 16px;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
    position: relative;
}

.nav-tab-btn:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.nav-tab-btn.active {
    background: var(--light-green);
    color: white;
    border-color: #2d6a4f;
    box-shadow: 0 4px 12px rgba(45, 106, 79, 0.3);
    transform: scale(1.04);
}

.tab-badge {
    background: var(--flower-crimson);
    color: white;
    font-size: 0.75rem;
    padding: 2px 7px;
    border-radius: 12px;
    font-weight: 700;
    animation: pulseBadge 1.5s infinite;
}

@keyframes pulseBadge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.sound-btn {
    background: white;
    border: 2px solid #cbd5e1;
    border-radius: 20px;
    padding: 8px 14px;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.sound-btn:hover {
    background: #f8fafc;
    border-color: var(--primary-green);
}

.sound-btn.is-muted {
    background: #fee2e2;
    border-color: #ef4444;
}

/* ==========================================================================
   Contenedor Principal de Vistas
   ========================================================================== */
.main-content {
    max-width: 1200px;
    width: 100%;
    margin: 8px auto;
    padding: 0 14px;
    flex: 1;
}

.game-view-section {
    animation: fadeInView 0.35s ease-out;
}

@keyframes fadeInView {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Vista: Selector de Plantas
   ========================================================================== */
.plant-select-banner {
    text-align: center;
    margin-bottom: 28px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(240,253,244,0.9));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 2px solid rgba(82, 183, 136, 0.3);
}

.plant-select-banner h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--primary-green);
    margin-bottom: 8px;
}

.plant-select-banner p {
    font-size: 1.15rem;
    color: #4b5563;
    max-width: 700px;
    margin: 0 auto;
}

.plant-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
    margin-bottom: 40px;
}

.plant-choice-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    box-shadow: var(--shadow-soft);
    border: 3px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.plant-choice-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--plant-theme, var(--light-green));
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
}

.plant-choice-emoji {
    font-size: 3.5rem;
    margin-bottom: 6px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70px;
}

.plant-choice-img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 6px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
    transition: transform 0.3s ease;
}

.plant-choice-card:hover .plant-choice-emoji,
.plant-choice-card:hover .plant-choice-img {
    transform: scale(1.15) rotate(5deg);
}

.plant-choice-badge {
    background: var(--plant-theme, var(--primary-green));
    color: white;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.plant-choice-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--dark-text);
    margin-bottom: 2px;
}

.plant-choice-sci {
    font-style: italic;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 12px;
}

.plant-choice-desc {
    font-size: 0.92rem;
    color: #475569;
    line-height: 1.4;
    margin-bottom: 16px;
    flex-grow: 1;
}

.plant-choice-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 16px;
    width: 100%;
}

.plant-choice-stats span {
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
}

.select-this-plant-btn {
    background: linear-gradient(135deg, var(--light-green), var(--primary-green));
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px 20px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(45, 106, 79, 0.3);
}

.select-this-plant-btn:hover {
    background: linear-gradient(135deg, #40916c, #1b4332);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(45, 106, 79, 0.4);
}

/* ==========================================================================
   Modales de Premios y Sobres
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
    animation: fadeInModal 0.25s ease-out;
    overflow-y: auto;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-card {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    text-align: center;
    position: relative;
    border: 4px solid var(--sun-gold);
    animation: popModal 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    scrollbar-width: thin;
}

.modal-card.pack-opening-modal-card {
    max-width: 760px;
    border-color: #fb8500;
}

/* Botón X de Cierre en la esquina superior */
.modal-corner-close-btn {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 2px solid #cbd5e1;
    color: #475569;
    font-size: 1.15rem;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 20;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.modal-corner-close-btn:hover {
    background: #fee2e2;
    border-color: #ef4444;
    color: #b91c1c;
    transform: scale(1.12) rotate(90deg);
}

@keyframes popModal {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header-badge {
    background: var(--sun-gold);
    color: #4a3300;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 6px 18px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 12px;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--primary-green);
    margin-bottom: 12px;
}

.modal-desc {
    font-size: 1.02rem;
    color: #4b5563;
    line-height: 1.45;
    margin-bottom: 18px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.modal-btn-primary {
    background: linear-gradient(135deg, var(--flower-crimson), #ff4d6d);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px 26px;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(217, 4, 41, 0.35);
    transition: transform 0.2s ease;
}

.modal-btn-primary:hover {
    transform: scale(1.05);
}

.modal-btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 2px solid #cbd5e1;
    border-radius: 30px;
    padding: 11px 22px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
    border-color: #94a3b8;
}

/* Partículas y confeti */
.confetti-particle {
    position: fixed;
    top: -20px;
    width: 10px;
    height: 14px;
    border-radius: 2px;
    pointer-events: none;
    z-index: 300;
    animation: confettiFall linear forwards;
}

@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}

.click-sparkle {
    position: fixed;
    pointer-events: none;
    z-index: 300;
    font-size: 1.2rem;
    animation: sparkleFly 0.8s ease-out forwards;
}

@keyframes sparkleFly {
    0% { transform: scale(0.5) translateY(0); opacity: 1; }
    100% { transform: scale(1.4) translateY(-35px); opacity: 0; }
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 768px) {
    .main-header {
        padding: 6px 8px;
    }
    .header-container {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .header-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        width: 100%;
        order: 1;
    }
    .header-bar-tools {
        order: 0;
        flex-shrink: 0;
        gap: 6px;
    }
    .header-bar-tools .notif-bell-btn {
        width: auto;
        flex-shrink: 0;
        padding: 6px 10px;
    }
    .logo-brand {
        gap: 8px;
        min-width: 0;
        order: 0;
        flex-direction: row;
    }
    .logo-utb {
        height: 34px;
        max-width: 118px;
    }
    .logo-text {
        font-size: 0.95rem;
        line-height: 1.1;
        padding-left: 8px;
        border-left-width: 2px;
    }
    .nav-menu-toggle {
        display: inline-flex;
    }
    .phone-nav-panel {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        width: 100%;
        order: 2;
        background: #ffffff;
        border: 2px solid rgba(82, 183, 136, 0.35);
        border-radius: 16px;
        padding: 10px;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    }
    .header-container.is-menu-open .phone-nav-panel {
        display: flex;
    }
    .user-greeting-badge,
    .notif-bell-btn {
        order: 0;
        align-self: flex-start;
    }
    .nav-tabs,
    .header-actions {
        width: 100%;
        max-width: 100%;
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
        overflow: visible;
        gap: 6px;
        order: 0;
    }
    .phone-nav-panel .nav-tab-btn,
    .phone-nav-panel .sound-btn:not(.notif-bell-btn) {
        width: 100%;
        justify-content: flex-start;
        padding: 10px 12px;
        font-size: 0.92rem;
    }
    .phone-nav-panel .notif-bell-btn {
        width: auto;
        align-self: flex-start;
    }
    .phone-nav-panel .nav-tab-btn.active {
        transform: none;
    }
    .main-content {
        padding: 0 8px 88px;
        margin: 4px auto;
    }
    .plant-select-banner {
        padding: 14px 12px;
        margin-bottom: 14px;
    }
    .plant-select-banner h2 {
        font-size: 1.35rem;
    }
    .plant-select-banner p {
        font-size: 0.95rem;
    }
    .plant-selector-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* ==========================================================================
   SISTEMA DE NOTIFICACIONES Y AVISOS DE LA PLANTA 🌱🔔
   ========================================================================== */

/* Botón Campana en el Header */
.notif-bell-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    background: #ffffff;
    border: 2px solid #cbd5e1;
    border-radius: 20px;
    font-size: 1.15rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notif-bell-btn:hover {
    transform: translateY(-2px) scale(1.06);
    border-color: #2d6a4f;
    box-shadow: 0 4px 12px rgba(45, 106, 79, 0.2);
}

.notif-bell-btn.has-needs {
    border-color: #f59e0b;
    background: #fffbeb;
    animation: bellGentleWobble 3s infinite ease-in-out;
}

@keyframes bellGentleWobble {
    0%, 80%, 100% { transform: rotate(0deg); }
    85% { transform: rotate(14deg); }
    90% { transform: rotate(-12deg); }
    95% { transform: rotate(8deg); }
}

/* Badge numérico en la campana */
.notif-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    min-width: 19px;
    height: 19px;
    border-radius: 10px;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.45);
    border: 2px solid white;
}

.notif-badge.badge-urgent {
    background: linear-gradient(135deg, #f97316, #ef4444);
    animation: pulseBadge 1.2s infinite;
}

/* Contenedor de Toasts Flotantes */
.plant-toast-container {
    position: fixed;
    top: 68px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 380px;
    width: calc(100vw - 32px);
    pointer-events: none;
}

/* Tarjeta individual de Toast */
.plant-toast-card {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    border-radius: 18px;
    padding: 14px 16px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16), 0 2px 6px rgba(0, 0, 0, 0.06);
    border-left: 6px solid #10b981;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    overflow: hidden;
    animation: toastSlideIn 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.plant-toast-card.urgency-urgent {
    border-left-color: #ef4444;
    background: linear-gradient(to right, #fff1f2, #ffffff);
}

.plant-toast-card.urgency-high {
    border-left-color: #f97316;
    background: linear-gradient(to right, #fff7ed, #ffffff);
}

.plant-toast-card.urgency-medium {
    border-left-color: #eab308;
    background: linear-gradient(to right, #fefce8, #ffffff);
}

.plant-toast-card.urgency-low {
    border-left-color: #06b6d4;
    background: linear-gradient(to right, #f0fdf4, #ffffff);
}

.plant-toast-card.is-hiding {
    animation: toastSlideOut 0.3s ease-in forwards;
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(60px) scale(0.92); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastSlideOut {
    from { opacity: 1; transform: translateX(0) scale(1); }
    to { opacity: 0; transform: translateX(70px) scale(0.85); }
}

.toast-icon-wrap {
    font-size: 2.1rem;
    line-height: 1;
    animation: bounceIcon 2s infinite ease-in-out;
    flex-shrink: 0;
    margin-top: 2px;
}

@keyframes bounceIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.toast-body {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 3px;
    line-height: 1.25;
}

.toast-message {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.35;
    margin-bottom: 10px;
}

.toast-actions-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.toast-action-btn {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 6px 14px;
    font-family: var(--font-heading);
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
    transition: all 0.2s ease;
}

.toast-action-btn:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #15803d, #166534);
}

.toast-dismiss-btn {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #64748b;
    border-radius: 16px;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.toast-dismiss-btn:hover {
    background: #f1f5f9;
    color: #334155;
}

.toast-close-x {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s, transform 0.2s;
}

.toast-close-x:hover {
    color: #ef4444;
    transform: scale(1.2);
}

.toast-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(16, 185, 129, 0.4);
    width: 100%;
    animation: toastProgress 9s linear forwards;
}

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* Panel Desplegable de Alertas y Salud */
.plant-notif-panel {
    position: fixed;
    top: 66px;
    right: 24px;
    width: 390px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 86px);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(18px);
    border-radius: 22px;
    border: 2px solid rgba(82, 183, 136, 0.35);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.22), 0 4px 12px rgba(0, 0, 0, 0.06);
    z-index: 9998;
    display: none;
    flex-direction: column;
    overflow-y: auto;
    animation: panelPop 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.plant-notif-panel.is-open {
    display: flex;
}

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

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 12px;
    border-bottom: 1px solid #f1f5f9;
}

.panel-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
}

.panel-header-title h3 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.18rem;
    color: var(--primary-green);
}

.panel-header-sub {
    margin: 2px 0 0;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}

.panel-close-btn {
    background: #f1f5f9;
    border: none;
    color: #64748b;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.panel-close-btn:hover {
    background: #fee2e2;
    color: #ef4444;
}

/* Medidor de Salud */
.panel-health-banner {
    padding: 12px 18px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.health-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
}

.health-track {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.health-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.4s ease, background-color 0.4s ease;
}

.panel-quick-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: #64748b;
}

/* Lista de Necesidades */
.panel-needs-list {
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.panel-section-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 2px;
}

.needs-count-tag {
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 12px;
    padding: 1px 8px;
    font-size: 0.78rem;
    font-weight: 700;
}

.panel-need-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    transition: all 0.2s ease;
}

.panel-need-card.urgency-urgent,
.panel-need-card.urgency-high {
    border-color: #fdba74;
    background: #fff7ed;
}

.panel-need-card.urgency-medium {
    border-color: #fde047;
    background: #fefce8;
}

.panel-need-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.need-card-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.need-icon {
    font-size: 1.6rem;
    line-height: 1;
    flex-shrink: 0;
}

.need-text strong {
    display: block;
    font-size: 0.92rem;
    color: #1e293b;
    line-height: 1.25;
}

.need-text p {
    margin: 2px 0 0;
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.3;
}

.panel-need-action-btn {
    background: linear-gradient(135deg, var(--light-green), var(--primary-green));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 6px 12px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 6px rgba(45, 106, 79, 0.25);
    flex-shrink: 0;
}

.panel-need-action-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 4px 10px rgba(45, 106, 79, 0.35);
}

/* Tarjeta Cuando Todo Está Feliz */
.panel-all-happy-card {
    text-align: center;
    padding: 24px 16px;
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
    border: 2px dashed #86efac;
    border-radius: 16px;
}

.all-happy-emoji {
    font-size: 2.4rem;
    display: block;
    margin-bottom: 6px;
    animation: happyBounce 2s infinite ease-in-out;
}

@keyframes happyBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

.panel-all-happy-card h4 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: #15803d;
    margin-bottom: 4px;
}

.panel-all-happy-card p {
    font-size: 0.85rem;
    color: #4b5563;
    line-height: 1.4;
    margin: 0;
}

/* Herramientas de Pie del Panel */
.panel-footer-tools {
    padding: 12px 18px 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-bottom-left-radius: 22px;
    border-bottom-right-radius: 22px;
}

.notif-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.toggle-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #334155;
}

.toggle-desc {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
}

.btn-toggle-browser-notif {
    background: #f1f5f9;
    border: 1.5px solid #cbd5e1;
    border-radius: 14px;
    padding: 5px 12px;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-toggle-browser-notif.is-active {
    background: #dcfce7;
    border-color: #86efac;
    color: #15803d;
}

.btn-toggle-browser-notif:hover {
    transform: scale(1.04);
}

.panel-test-actions {
    display: flex;
    justify-content: center;
    margin-top: 2px;
}

.btn-test-notif {
    background: #fff;
    border: 1.5px dashed #94a3b8;
    border-radius: 12px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.btn-test-notif:hover {
    background: #f1f5f9;
    border-color: #64748b;
    color: #1e293b;
}

/* Responsivo para móviles */
@media (max-width: 600px) {
    .plant-toast-container {
        top: 60px;
        right: 12px;
        left: 12px;
        width: auto;
    }
    .plant-notif-panel {
        top: 60px;
        right: 10px;
        left: 10px;
        width: auto;
    }
}

/* ==========================================================================
   WIDGET DEL CLIMA EN VIVO: LA PAZ, BOLIVIA 🇧🇴🌤️
   ========================================================================== */
.lapaz-weather-pill {
    position: absolute;
    top: 8px;
    right: 8px;
    left: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    max-width: 240px;
    gap: 5px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(82, 183, 136, 0.4);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    z-index: 25;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
}

.lapaz-weather-pill:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 6px 18px rgba(45, 106, 79, 0.22);
    border-color: #2d6a4f;
}

.weather-flag {
    font-size: 1.1rem;
}

.weather-icon {
    font-size: 1.15rem;
    animation: bounceIcon 2.5s infinite ease-in-out;
}

.weather-temp {
    color: #15803d;
    font-family: var(--font-heading);
    font-size: 0.95rem;
}

.weather-city {
    color: #475569;
    font-size: 0.8rem;
}

.weather-time {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.78rem;
    color: #334155;
}

.weather-advice-chip {
    background: #fef3c7;
    color: #92400e;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid #fde047;
    white-space: nowrap;
}

/* Atmósferas Dinámicas según el Horario y Clima Paceño */
.virtual-garden-stage.atmosphere-night {
    background: linear-gradient(180deg, #0f172a 0%, #1e1b4b 55%, #312e81 65%, #451a03 100%) !important;
}

.virtual-garden-stage.atmosphere-night .plant-banner-title {
    color: #f8fafc !important;
}

.virtual-garden-stage.atmosphere-night .stage-sun-element {
    filter: drop-shadow(0 0 16px rgba(254, 240, 138, 0.9));
}

.virtual-garden-stage.atmosphere-sunset {
    background: linear-gradient(180deg, #c2410c 0%, #ea580c 40%, #fb923c 65%, #78350f 100%) !important;
}

.virtual-garden-stage.atmosphere-day {
    background: linear-gradient(180deg, #cbf3f0 0%, #e2ece9 65%, #d8b48f 65%, #bc6c25 100%) !important;
}

/* Modal del Clima de La Paz */
.lapaz-weather-card {
    max-width: 500px;
    border-radius: 24px;
    padding: 24px 22px;
    border: 3px solid #86efac;
}

.weather-modal-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.weather-modal-flag {
    font-size: 2.8rem;
}

.weather-modal-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    color: var(--primary-green);
    margin: 0;
}

.weather-modal-subtitle {
    margin: 3px 0 0;
    font-size: 0.88rem;
    color: #64748b;
    font-weight: 600;
}

.weather-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.weather-stat-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.weather-main-box {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
    border-color: #a7f3d0;
    padding: 14px 16px;
}

.weather-big-icon {
    font-size: 2.8rem;
}

.weather-big-temp {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: #15803d;
    line-height: 1.1;
}

.weather-condition-desc {
    font-size: 0.9rem;
    font-weight: 600;
    color: #047857;
}

.stat-icon {
    font-size: 1.4rem;
}

.stat-info strong {
    display: block;
    font-size: 0.76rem;
    color: #64748b;
}

.stat-info span {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
}

.weather-botanical-alert {
    background: #ffffff;
    border-radius: 16px;
    padding: 14px 16px;
    border: 2px solid #cbd5e1;
    margin-top: 6px;
    text-align: left;
}

.weather-botanical-alert.high {
    border-color: #38bdf8;
    background: #f0f9ff;
}

.weather-botanical-alert.good {
    border-color: #86efac;
    background: #f0fdf4;
}

.weather-botanical-alert.medium {
    border-color: #fde047;
    background: #fefce8;
}

.alert-top-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.alert-icon {
    font-size: 2rem;
}

.alert-badge {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #0369a1;
}

.alert-title {
    margin: 2px 0 0;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: #0c4a6e;
}

.alert-desc {
    font-size: 0.88rem;
    color: #334155;
    line-height: 1.4;
    margin-bottom: 8px;
}

.alert-tip-box {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.82rem;
    color: #0f172a;
    border-left: 3px solid #0284c7;
}

/* ==========================================================================
   VISTA: MI GRAN JARDÍN BOTÁNICO ESCOLAR (PLANTAS ADOPTADAS) 🏡🪴
   ========================================================================== */
.multi-garden-container {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 40px;
}

.multi-garden-banner {
    background: linear-gradient(135deg, #15803d 0%, #166534 60%, #14532d 100%);
    color: white;
    border-radius: var(--radius-lg);
    padding: 26px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    box-shadow: 0 16px 36px rgba(22, 101, 52, 0.28);
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.garden-banner-content {
    max-width: 620px;
}

.garden-badge-pill {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.04em;
}

.garden-banner-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 8px;
    line-height: 1.2;
}

.garden-banner-desc {
    font-size: 0.98rem;
    opacity: 0.92;
    line-height: 1.45;
}

.garden-banner-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.garden-stat-card {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 18px;
    padding: 12px 18px;
    text-align: center;
    min-width: 100px;
}

.stat-num {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 700;
    display: block;
}

.stat-lbl {
    font-size: 0.78rem;
    opacity: 0.9;
    font-weight: 600;
}

.multi-garden-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 4px;
    flex-wrap: wrap;
    gap: 10px;
}

.toolbar-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--primary-green);
    font-weight: 700;
}

/* Cuadrícula de Tarjetas de Plantas Adoptadas */
.multi-garden-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 22px;
}

.adopted-plant-card {
    background: #ffffff;
    border-radius: 22px;
    border: 3px solid #e2e8f0;
    padding: 20px 18px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.adopted-plant-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: #52b788;
    box-shadow: 0 18px 36px rgba(45, 106, 79, 0.16);
}

.adopted-plant-card.is-current-active {
    border-color: #16a34a;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.2), 0 14px 28px rgba(22, 163, 74, 0.15);
}

.adopted-plant-card.is-golden-card {
    border-color: #eab308;
    background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
    box-shadow: 0 0 20px rgba(234, 179, 8, 0.3);
}

.adopted-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
    gap: 6px;
}

.adopted-plant-badge {
    background: #f1f5f9;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 14px;
}

.adopted-active-tag {
    background: #dcfce7;
    color: #15803d;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 14px;
    border: 1px solid #86efac;
}

.adopted-golden-tag {
    background: linear-gradient(135deg, #fde047, #eab308);
    color: #713f12;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 14px;
    box-shadow: 0 2px 6px rgba(234, 179, 8, 0.4);
}

.adopted-avatar-center {
    position: relative;
    container-type: inline-size;
    width: 110px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px 0;
}

.adopted-card-img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    border-radius: 16px;
}

.adopted-card-emoji {
    font-size: 4.5rem;
    line-height: 1;
}

.adopted-card-img.golden-glow,
.adopted-card-emoji.golden-glow {
    filter: drop-shadow(0 0 14px #eab308) saturate(1.3);
}

.adopted-crown-icon {
    position: absolute;
    top: -6px;
    right: 8px;
    font-size: 1.6rem;
    animation: bounceIcon 2s infinite ease-in-out;
}

.adopted-pvz-face {
    position: absolute;
    top: 36%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10;
}

.adopted-pvz-face.pvz-stage-seed {
    top: 54% !important;
}

.adopted-pvz-face.pvz-stage-sprout {
    top: 40% !important;
}

.adopted-pvz-face.pvz-stage-growing {
    top: 36% !important;
}

.adopted-pvz-face.pvz-stage-mature {
    top: 35% !important;
}

.adopted-stage-svg-wrap {
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.12));
    transition: transform 0.25s ease-out;
}

.adopted-plant-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: #166534;
    margin-bottom: 2px;
}

.adopted-plant-sci {
    font-size: 0.8rem;
    color: #64748b;
    font-style: italic;
    margin-bottom: 8px;
}

.adopted-name-row {
    display: flex;
    gap: 6px;
    width: 100%;
    margin: 4px 0 10px;
}

.adopted-name-input {
    flex: 1;
    min-width: 0;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 7px 10px;
    font-size: 0.85rem;
    color: #166534;
    background: #f0fdf4;
}

.adopted-name-btn {
    border: none;
    border-radius: 12px;
    background: #16a34a;
    color: #fff;
    font-weight: 700;
    padding: 7px 12px;
    cursor: pointer;
    font-size: 0.8rem;
}

.adopted-lvl-badge {
    background: #e0f2fe;
    color: #0369a1;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 14px;
    margin-bottom: 8px;
}

.adopted-progress-track {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.adopted-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 8px;
    transition: width 0.3s ease;
}

.adopted-stats-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 0.82rem;
    color: #475569;
    margin-bottom: 14px;
    padding: 0 4px;
}

.adopted-care-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--light-green), var(--primary-green));
    color: white;
    border: none;
    border-radius: 16px;
    padding: 10px 16px;
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(45, 106, 79, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.adopted-care-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 16px rgba(45, 106, 79, 0.35);
}

.adopted-care-btn.is-active-care-btn {
    background: #15803d;
}

@media (max-width: 768px) {
    .multi-garden-banner {
        flex-direction: column;
        align-items: stretch;
        padding: 20px 18px;
    }
    .garden-banner-stats {
        justify-content: space-between;
    }
}


