/* =======================================
   Momentum Wellness 2.0 – Core Styles
   Handles global theming, dark mode, layout
   ======================================= */

/* -------------------------
   CSS Variables: Light Mode
   ------------------------- */
:root {
    --bg: #f7f8fa;
    --bg-secondary: #f3f4f6;
    --text: #444;
    --text-muted: #555;
    --border: #dddddd;
    
    --primary: #2196f3;
    --primary-dark: #0b7ad1;
    --accent: #0cc4ff;

    --progress-track-bg: rgba(33, 150, 243, 0.25); /* Darker for visibility in light mode */
    --primary-light-10: rgba(33,150,243,0.10);
    --primary-light-20: rgba(33,150,243,0.20);
    --primary-dark-20: rgba(11,122,209,0.20);
    --text-color: var(--text);

    --card-bg: #ffffff;
    --card-shadow: rgba(0,0,0,0.08);
    --radius: 12px;

    --transition-speed: 0.25s;
}

/* ------------------------------
   Auto Dark Mode (System Driven)
   ------------------------------ */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #181a1b;
        --bg-secondary: #1c1c1c;
        --text: #f5f5f5;
        --text-muted: #cccccc;
        --border: #333;

        --card-bg: #23272e;
        --card-shadow: rgba(0,0,0,0.4);
        --progress-track-bg: rgba(255, 255, 255, 0.10);
    }
}

/* -------------------------
   Optional Manual Override
   (Your app can toggle a class)
   ------------------------- */
html.dark-mode {
    --bg: #0f0f0f;
    --bg-secondary: #1c1c1c;
    --text: #f5f5f5;
    --text-muted: #cccccc;
    --border: #333;

    --card-bg: #181818;
    --card-shadow: rgba(0,0,0,0.4);
}

/* -------------------------
   BASIC GLOBAL RESET
   ------------------------- */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: background var(--transition-speed), color var(--transition-speed);
}

/* Scroll smoothing */
body {
    -webkit-font-smoothing: antialiased;
}

/* ===========================
   iOS Native Scroll Bounce
   =========================== */

/* Allow momentum + bounce scrolling */
body {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: auto;
}

/* Root app container must NOT block scrolling */
#appRoot {
    margin-top: 44px;
    height: calc(100vh - 44px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: auto;
}



/* -------------------------
   TYPOGRAPHY
   ------------------------- */
h1, h2, h3, h4 {
    margin: 0 0 12px 0;
    font-weight: 700;
}


/* ===================================================================
   CARD STYLE — EXACT MATCH to screenshot
   =================================================================== */
.card {
    background: var(--card-bg);
    padding: 14px; /* matches Momentum look */
    border-radius: var(--radius);
    box-shadow: 0 2px 6px var(--card-shadow);

    /* ✔ FIX: remove top/bottom spacing since grid handles spacing */
    margin: 0;
    text-align: center;

    transition: background var(--transition-speed), box-shadow var(--transition-speed);
    
}

/* ===================================================================
   CARD GRID — updated for iOS look
   =================================================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}


@media (hover: hover) {
    .card:hover {
        transform: translateY(-2px);
    }
}


.card h4 {
    margin: 0;
    font-size: 1.0rem;
    font-weight: 700;
    color: var(--text); /* Use the theme text color */
}

.card-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.emoji {
    font-size: 1.6rem;
    margin-top: 0.4em;
}

/* -------------------------
   BUTTONS
   ------------------------- */
button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 16px;
    cursor: pointer;
    transition: background var(--transition-speed);
}

button:hover {
    background: var(--primary-dark);
}

button.secondary {
    background: var(--bg-secondary);
    color: var(--text);
    border: 1px solid var(--border);
}

/* -------------------------
   INPUTS
   ------------------------- */
input, select {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text);
    margin-bottom: 12px;
}

/* -------------------------
   LINKS
   ------------------------- */
a {
    color: var(--primary);
    text-decoration: none;
}

/* -------------------------
   FLEX UTILITIES
   ------------------------- */
.flex {
    display: flex;
}

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

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ===========================
   iOS SAFE AREA TOP BAR (FIXED)
   =========================== */

.ios-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    /* 1. Use padding-top to push content down past the status bar */
    padding-top: env(safe-area-inset-top);
    padding-top: constant(safe-area-inset-top); /* Fallback */

    /* 2. Set the standard padding/height for the content area */
    padding-bottom: 8px; /* Example: Adds 8px below the content (optional) */

    /* 3. Set the fixed height/padding for the actual bar content */
    height: 44px; /* Standard iOS navigation bar height for the content area */
    /* If you prefer to use padding instead of a fixed height: */
    /* padding-top: 10px; padding-bottom: 10px; */ 

    /* Note: Remove your original conflicting height: calc(0px + env(safe-area-inset-top)); */

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding-left: 16px;
    padding-right: 16px;

    /* ... other styles (backdrop-filter, z-index) are correct ... */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    pointer-events: none;
    z-index: 9999;
    transition: background var(--transition-speed), color var(--transition-speed);

        /* 🔥 CRITICAL */

}
.ios-topbar * {
    pointer-events: auto;
}

/* --------------------------
   NAVBAR INTERNAL STRUCTURE
   -------------------------- */
.topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-back-btn {
    border: none;
    background: none;
    font-size: 24px;
    color: var(--primary);
    cursor: pointer;
    padding: 4px 6px;
    line-height: 1;
}

#pageTitle {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.topbar-right {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.5;
}

/* ===========================
   MAIN CONTENT SPACER
   =========================== */

/* You must add a top margin to your main content to sit below the fixed bar. */
#main-content {
    /* Total Bar Height = Content Height (44px) + Status Bar Height (env(safe-area-inset-top)) */
    margin-top: calc(44px + env(safe-area-inset-top));
    margin-top: calc(44px + constant(safe-area-inset-top));
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    .ios-topbar {
        background: rgba(15, 15, 15, 0.7);
        border-bottom: 1px solid rgba(255,255,255,0.1);
        color: var(--text);
    }
}

.ios-topbar .topbar-title {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.ios-topbar .topbar-right {
    font-size: 20px;
    opacity: 0.5;
}

/* -------------------------
   BOTTOM NAV BAR (CLEANED)
   ------------------------- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    
    /* Use MIN-HEIGHT for the content area, plus padding to define its height */
    min-height: 60px; 
    
    /* Padding to push the content up from the home indicator */
    padding-bottom: env(safe-area-inset-bottom);
    padding-bottom: constant(safe-area-inset-bottom);

    /* Padding for the content area */
    padding-top: 4px; 

    /* === iOS Glass Blur === */
    background: rgba(255, 255, 255, 0.65); /* Light mode: slightly more transparent for glass effect */
    backdrop-filter: blur(24px) saturate(180%);           /* Enhanced blur with saturation */
    -webkit-backdrop-filter: blur(24px) saturate(180%);   /* Safari/iOS */

    /* More visible top border for separation */
    border-top: 0.5px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 -1px 8px rgba(0, 0, 0, 0.08);

    display: flex;
    justify-content: space-around;
    align-items: center;

    z-index: 9000;
    transition: background 0.25s ease;
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .bottom-nav {
        background: rgba(28, 28, 30, 0.72); /* Dark mode glass */
        border-top: 0.5px solid rgba(255, 255, 255, 0.15);
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    }
}


/* Navigation items */
.nav-item {
    flex: 1;
    text-align: center;
    padding-top: 14px;
    padding-bottom: 4px;

    display: flex;
    flex-direction: column;
    justify-content: center;   /* ⭐ NEW — center icon & text vertically */
    align-items: center;
    gap: 4px;

    font-size: 12px;
    color: var(--text-muted);
}

.nav-icon {
    width: 26px;
    height: 26px;
    fill: var(--text-muted);
    opacity: 0.85;
}

.nav-item.active .nav-icon {
    fill: var(--primary);
    opacity: 1;
}

@media (prefers-color-scheme: dark) {
    .nav-icon {
        opacity: 0.9;
    }
}

/* ---- Chart container (required) ---- */
#stepsChart {
    position: relative;     /* ★ needed for absolute children */
    height: 140px;          /* ★ controls bar height */
    width: 100%;
    overflow: visible;
    margin-top: 12px;
}

#stepsChartLabels {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
    white-space: nowrap;
}


/* ---- Chart grid ---- */
.chart-grid {
    position: absolute;
    top: 0; bottom: 0; left: 0; right: 0;
    background-image:
        linear-gradient(
            to bottom,
            rgba(255,255,255,0.1) 1px,
            transparent 1px
        );
    background-size: 100% 33%;
    pointer-events: none;
}

/* ---- Bars wrapper ---- */
.chart-bars-wrapper {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 100%;
    width: 100%;
    position: absolute;
    bottom: 0;
    padding: 0 2px;
}

/* ---- Individual bar ---- */
.chart-bar {
    width: 20px;
    border-radius: 6px;
    background: var(--primary);
    transition: height .3s ease;
}

/* ---- Date labels ---- */
.chart-label {
    text-align: center;
    width: 20px;
    color: var(--text-muted);
    font-size: 0.7rem;
}

/* ============================= */
/* METRIC CARDS — GLOBAL STYLES  */
/* ============================= */

.metrics-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

/* Base card */
.card.metric {
    padding: 15px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Main (Today) card */
.card.metric.main {
    grid-column: span 2;
    padding: 20px 15px;
    background-color: var(--primary-light-10);
    border: 1px solid var(--primary-dark-20);
}

/* Labels */
.metric-label {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

/* Main label */
.card.metric.main .metric-label {
    color: var(--primary);
}

/* Values */
.metric-value {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--text-color);
}

/* Smaller values */
.card.metric:not(.main) .metric-value {
    font-size: 1.4rem;
}

/* Subtext */
.metric-subtext {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===============================
   PROFILE — Momentum 2.0
=============================== */

.profile-header {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 16px;
    align-items: center;
}

.avatar-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-light-20);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.profile-title h2 {
    margin: 0;
}

.profile-username {
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

.profile-row {
    display: grid;
    grid-template-columns: 95px 1fr;
    gap: 0.5rem;
}

.profile-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.profile-value {
    font-weight: 500;
}



/* ===================================================================
   Momentum Wellness 2.0 – Dashboard Styles (NEW)
   Includes:
   ✓ Greeting
   ✓ First Login Banner
   ✓ Shortcut Bar
   ✓ Snapshot Cards
   ✓ Progress Bars
   ✓ Articles Section
   =================================================================== */


/* ----------------------------------------
   GLOBAL SPACING + PAGE LAYOUT
   ✅ UNIVERSAL for iOS App + PWA
   ✅ env(safe-area-inset-top) = 0px on PWA, ~44px on iOS for notch
   ---------------------------------------- */
.dashboard-page {
    padding: 16px;
    padding-top: calc(16px + env(safe-area-inset-top, 0px));
    padding-bottom: 200px;
    color: var(--text);
}


/* ===================================================================
   GREETING SECTION
   =================================================================== */
.greeting {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

/* ===========================
   MOTIVATION ROW (FIX)
=========================== */

.motivation-row-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;          /* keep on one line */
}

.motivation-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
}

.motivation-divider {
    opacity: 0.5;
    margin: 0 2px;
}



/* ===================================================================
   FIRST LOGIN BANNER
   =================================================================== */
.first-login-banner {
    background: #222b2a;
    border: 2px solid #5affc6;
    color: #5affc6;
    padding: 1.2em 1em;
    border-radius: 1em;
    margin: 1.3em 0 1.1em 0;
    text-align: center;
    box-shadow: 0 0 16px #17887688;
    position: relative;
}

.first-login-banner a {
    color: #5affc6;
    font-weight: 600;
    text-decoration: underline;
}

.first-login-banner .close-btn {
    position: absolute;
    top: 4px;
    right: 10px;
    background: none;
    border: none;
    color: #5affc6;
    font-size: 1.6rem;
    cursor: pointer;
}



/* ===================================================================
   SHORTCUT BAR
   =================================================================== */
.shortcut-bar {
    position: relative;
    z-index: 20;
    pointer-events: auto;
    background: var(--card-bg);
    padding: 14px 18px;
    font-size: 1em;
    font-weight: 500;
    border-radius: var(--radius);
    margin-top: 12px;
    margin-bottom: 22px;
    box-shadow: 0 2px 6px var(--card-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.shortcut-actions button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 14px;
    font-size: 1.3em;
    font-weight: 500;
    border-radius: var(--radius);
    cursor: pointer;
    transition: opacity .2s ease;
}

.shortcut-actions button:hover {
    opacity: 0.85;
}

/* ================================
   SHORTCUT BAR SLIDES (FIX)
================================ */

.shortcut-slide {
    position: relative;
    flex: 1;
    overflow: hidden;
    height: 2.8em; /* controls bar height */
}

.shortcut-slide span {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;

    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.45s ease, transform 0.45s ease;

    /* ✅ Text wrapping */
    white-space: normal;
    line-height: 1.25em;

    /* ✅ Line clamp — STANDARD + WEBKIT */
    display: -webkit-box;
    display: box;                 /* future / fallback */
    -webkit-box-orient: vertical;
    box-orient: vertical;

    -webkit-line-clamp: 2;        /* Safari / iOS */
    line-clamp: 2;                /* Standard */

    overflow: hidden;
    text-overflow: ellipsis;

    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
}

/* Active slide */
.shortcut-slide span.active {
    opacity: 1;
    transform: translateY(0);
}



/* ===================================================================
   SNAPSHOT SECTION
   =================================================================== */
.snapshot h2 {
    margin: 18px 0 12px 0;
    font-size: 1.5rem;
    font-weight: 700;
}


/* ===================================================================
   CARD VALUE TEXT
   =================================================================== */
#stepsCardValue,
#waterCardValue,
#sleepCardValue,
#caloriesCardValue {
    font-size: 1.00rem;
    font-weight: 600;
    color: #1a1a1a; /* Dark in light mode for readability */
    margin: 1px 0 6px 0;
}

/* Dark mode: use theme text color */
@media (prefers-color-scheme: dark) {
    #stepsCardValue,
    #waterCardValue,
    #sleepCardValue,
    #caloriesCardValue {
        color: var(--text);
    }
}



/* ===================================================================
   PROGRESS BARS — Momentum V2 (Clean, Unified)
   =================================================================== */

.progress-wrapper {
    margin-top: 4px;
}

/* Track */
.progress-bar {
    width: 100%;
    background: var(--progress-track-bg);
    height: 10px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-bar.yesterday {
    height: 6px;
}

.progress-bar.burn {
    height: 6px;
    margin-top: 6px;
}

/* Fill */
.progress {
    height: 100%;
    width: 0%;
    border-radius: 8px;
    transition: width 0.35s cubic-bezier(.2,.8,.2,1);
}

/* =========================
   PER-METRIC COLORS
   ========================= */

#stepsProgressToday     { background: #4da3ff; }
#stepsProgressYesterday { background: rgba(197,204,211,0.9); }

#waterProgressToday     { background: #00c4ff; }
#waterProgressYesterday { background: rgba(197,204,211,0.9); }

#sleepProgressToday     { background: #4da3ff; }
#sleepProgressYesterday { background: rgba(197,204,211,0.9); }

#caloriesProgress       { background: #61ff82; }
#caloriesBurnProgress   { background: #ff5252; }



/* ===================================================================
   PROGRESS LABELS
   =================================================================== */
.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    margin-top: 4px;
    color: var(--text-muted);
}

.progress-labels.small {
    font-size: 0.76rem;
}



/* ===================================================================
   ARTICLE SECTION
   =================================================================== */
.articles {
    margin-top: 28px;
}

.articles h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.featured-swiper {
    border-radius: 12px;
    overflow: hidden;
}

.swiper-pagination-bullet {
    background: var(--primary);
}

/* ================================
   ACTIVITY ENTRY SHEET
================================ */

/* -------------------------------
   BACKDROP
-------------------------------- */
.activity-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 9970;
    pointer-events: none;
}

.activity-sheet-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
}

/* -------------------------------
   SHEET CONTAINER
-------------------------------- */
.activity-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;

    background: var(--card-bg);
    border-radius: 18px 18px 0 0;

    padding: 16px;
    padding-bottom: calc(90px + env(safe-area-inset-bottom));

    transform: translateY(100%);
    transition: transform 0.25s ease;
    z-index: 9990;

    /* ⭐ Prevent height jitter */
    max-height: 85vh;
    overflow: hidden;
}

.activity-sheet.visible {
    transform: translateY(0);
}

/* -------------------------------
   HANDLE
-------------------------------- */
.sheet-handle {
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 4px;
    margin: 0 auto 10px;
}

/* -------------------------------
   HEADER
-------------------------------- */
.sheet-header h3 {
    margin: 0 0 12px;
    text-align: center;
    font-size: 1.1rem;
}

/* -------------------------------
   DATE / TIME INPUTS
-------------------------------- */
.sheet-datetime {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.sheet-datetime label {
    display: flex;
    flex-direction: column;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.sheet-datetime input {
    margin-top: 4px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text);
}

/* -------------------------------
   ACTIVITY TABS (STABLE)
-------------------------------- */
.entry-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.entry-tabs button {
    flex: 1;
    padding: 10px 0;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
}

.entry-tabs button.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* -------------------------------
   BODY (HEIGHT LOCK ⭐ KEY FIX)
-------------------------------- */
.sheet-body {
    min-height: 220px; /* ⭐ THIS STOPS THE JUMP */
    display: flex;
    align-items: center;
    justify-content: center;
}

.sheet-body > * {
    width: 100%;
    text-align: center;
}

/* -------------------------------
   WATER ENTRY
-------------------------------- */
.entry-water {
    padding: 20px 0;
}

.water-count {
    font-size: 3rem;
    font-weight: 700;
}

.water-label {
    color: var(--text-muted);
    margin-bottom: 12px;
}

.water-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.circle-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

/* -------------------------------
   STEPS ENTRY
-------------------------------- */
.entry-steps input {
    width: 100%;
    max-width: 200px;
    padding: 12px;
    font-size: 1.2rem;
    text-align: center;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text);
}

/* -------------------------------
   SLEEP ENTRY
-------------------------------- */
.sleep-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.sleep-controls input {
    width: 70px;
    padding: 10px;
    text-align: center;
    font-size: 1.1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text);
}

/* -------------------------------
   ACTION BUTTONS (ALWAYS VISIBLE)
-------------------------------- */
.sheet-actions {
    position: sticky;
    bottom: 0;

    display: flex;
    gap: 12px;
    margin-top: 20px;

    background: var(--card-bg);
    padding-top: 12px;
}


.btn-secondary {
    flex: 1;
    background: var(--bg-secondary);
    color: var(--text);
}

.btn-primary {
    flex: 1;
}

/* ==================================================
   Toast System — Momentum Wellness (FINAL)
   Mobile-safe • No blink • Single animation system
================================================== */

#toast-container {
    position: fixed;
    top: calc(44px + env(safe-area-inset-top, 16px) + 16px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

/* BASE (HARD-HIDDEN ON INSERT) */
.toast {
    min-width: 300px;
    max-width: 90vw;

    background: linear-gradient(
        180deg,
        rgba(255,255,255,0.95),
        rgba(245,245,245,0.90)
    );

    backdrop-filter: blur(12px);
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);

    color: #111;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    opacity: 0;
    transform: translateY(24px);
    pointer-events: none;

    transition:
        opacity 0.25s ease,
        transform 0.25s cubic-bezier(.2,.9,.3,1);
}

/* SHOW STATE (ONLY animation trigger) */
.toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* CONTENT */
.toast-title {
    font-weight: 600;
    font-size: 1.05rem;
}

.toast-message {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 2px;
}

/* CLOSE */
.toast-close {
    background: none;
    border: none;
    color: rgba(0,0,0,0.5);
    font-size: 1rem;
    cursor: pointer;
}

/* TYPES */
.toast-success { border-left: 4px solid #4ade80; }
.toast-info    { border-left: 4px solid #38bdf8; }
.toast-warning { border-left: 4px solid #facc15; }
.toast-error   { border-left: 4px solid #f87171; }

/* DARK MODE */
@media (prefers-color-scheme: dark) {
    .toast {
        background: linear-gradient(
            180deg,
            rgba(30,30,30,0.92),
            rgba(20,20,20,0.85)
        );
        color: #fff;
    }

    .toast-close {
        color: rgba(255,255,255,0.6);
    }
}
