/* ============================================================
   AHIRA — Complete Style System  v2.0
   Fonts: Poppins (display) + Inter (body)
   Architecture: Isolated screen navigation, full-screen mobile
============================================================ */

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

/* ── DESIGN TOKENS ──────────────────────────────────────── */
:root {
    --p1:  #6C3FCE;
    --p2:  #9B6EF3;
    --p3:  #C4A8FF;
    --a1:  #F472B6;
    --a2:  #FB923C;
    --g1:  #22C55E;
    --r1:  #F87171;
    --y1:  #FBBF24;

    --bg:      #F1EEFF;
    --glass:   rgba(255,255,255,0.60);
    --glass-b: rgba(255,255,255,0.85);

    --t1: #1A0A3C;
    --t2: #4B3A72;
    --t3: #8B7AAE;
    --t4: #B8AECE;

    --s1: 0 2px 8px  rgba(108,63,206,0.08);
    --s2: 0 6px 20px rgba(108,63,206,0.13);
    --s3: 0 16px 40px rgba(108,63,206,0.18);
    --s4: 0 24px 60px rgba(108,63,206,0.22);

    --r-xs:  8px;
    --r-sm:  12px;
    --r-md:  16px;
    --r-lg:  20px;
    --r-xl:  24px;
    --r-2xl: 32px;

    --nav-h: 68px;

    --grad-main: linear-gradient(135deg, var(--p1) 0%, var(--a1) 100%);
    --grad-soft: linear-gradient(135deg, rgba(108,63,206,0.12), rgba(244,114,182,0.10));
}

/* ── RESET ──────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}
html, body {
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ── BODY ───────────────────────────────────────────────── */
body {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--t1);
    background:
        radial-gradient(ellipse at 20% 0%,   #e8d5ff 0%, transparent 55%),
        radial-gradient(ellipse at 80% 100%, #ffd6f0 0%, transparent 55%),
        linear-gradient(160deg, #ede8ff 0%, #f9eef8 50%, #fff4ee 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0 32px;
}

/* ── PHONE SHELL (desktop mockup) ───────────────────────── */
.phone {
    width: 390px;
    height: 844px;
    border-radius: 44px;
    background: var(--bg);
    box-shadow: var(--s4),
        inset 0 1px 0 rgba(255,255,255,0.9),
        inset 0 -1px 0 rgba(108,63,206,0.06);
    border: 1px solid rgba(255,255,255,0.7);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    isolation: isolate;
}

.phone::before {
    content: "";
    position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(ellipse 180px 180px at 15% 8%,  rgba(155,110,243,0.14) 0%, transparent 70%),
        radial-gradient(ellipse 140px 140px at 85% 92%, rgba(244,114,182,0.12) 0%, transparent 70%),
        radial-gradient(ellipse 100px 100px at 70% 15%, rgba(251,146,60,0.08)  0%, transparent 70%);
}
.phone > * { position: relative; z-index: 1; }

/* ── AUTH LOGO ──────────────────────────────────────────── */
.logoContainer {
    text-align: center;
    padding: 32px 24px 18px;
    flex-shrink: 0;
}
.appLogo {
    width: 68px;
    filter: drop-shadow(0 6px 16px rgba(108,63,206,0.30));
}
.brandName {
    font-family: 'Poppins', sans-serif;
    font-size: 28px; font-weight: 700; letter-spacing: 6px;
    background: var(--grad-main);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: 8px;
}
.tagline {
    font-size: 11px; color: var(--t3);
    letter-spacing: 2px; margin-top: 4px;
}

/* ── AUTH WRAPPER ───────────────────────────────────────── */
#authWrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 20px 24px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
#authWrapper::-webkit-scrollbar { display: none; }

/* ── APP WRAPPER ────────────────────────────────────────── */
#appWrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

/* ── APP HEADER ─────────────────────────────────────────── */
.appHeader {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px 12px;
    background: rgba(241,238,255,0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(196,168,255,0.2);
    box-shadow: 0 1px 0 rgba(255,255,255,0.9), 0 4px 16px rgba(108,63,206,0.07);
    z-index: 50;
}
.appHeaderLeft { display: flex; align-items: center; gap: 10px; }
.appHeaderLogo {
    width: 32px; height: 32px; object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(108,63,206,0.32));
    flex-shrink: 0; display: block;
}
.appHeaderBrand {
    font-family: 'Poppins', sans-serif;
    font-size: 20px; font-weight: 700; letter-spacing: 4px;
    background: var(--grad-main);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; line-height: 1;
}
.profileBtn {
    width: 40px; height: 40px; border-radius: 50%;
    border: 2px solid rgba(108,63,206,0.25);
    background: linear-gradient(135deg, #c4a8ff, #f9a8d4);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Poppins', sans-serif;
    font-size: 15px; font-weight: 700; color: white;
    box-shadow: 0 4px 14px rgba(108,63,206,0.28);
    transition: transform 0.15s, box-shadow 0.15s;
    flex-shrink: 0;
}
.profileBtn:active { transform: scale(0.92); box-shadow: 0 2px 8px rgba(108,63,206,0.18); }

/* ══════════════════════════════════════════════════════════
   SCREEN ARCHITECTURE
   .phoneContent = fixed viewport — NEVER scrolls
   .appScreen    = absolute layers, all hidden by default
   .appScreen.active = only one visible at a time, scrolls internally
══════════════════════════════════════════════════════════ */

.phoneContent {
    position: relative;
    flex: 1;
    overflow: hidden;      /* container MUST NOT scroll */
    min-height: 0;
    padding: 0;
}

/* All screens: hidden, stacked, same size */
.appScreen {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;

    /* Hidden by default */
    display: none;
    visibility: hidden;
    pointer-events: none;
    z-index: 0;

    /* Each screen owns its scroll */
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-width: none;

    padding: 16px 16px 24px;
    box-sizing: border-box;
}
.appScreen::-webkit-scrollbar { display: none; }

/* Active screen: visible, interactive, animated */
.appScreen.active {
    display: block;
    visibility: visible;
    pointer-events: auto;
    z-index: 10;
    animation: screenEnter 0.22s cubic-bezier(0.4,0,0.2,1) forwards;
}

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

/* Chat: special flex layout — container doesn't scroll */
#chatScreen.active {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}
#chatScreen .chatHeader  { flex-shrink: 0; z-index: 1; }
#chatScreen .chatBox,
#chatScreen #chatMessages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    min-height: 0;
    scrollbar-width: none;
    padding: 14px 16px 8px;
}
#chatScreen .chatBox::-webkit-scrollbar,
#chatScreen #chatMessages::-webkit-scrollbar { display: none; }
#chatScreen .chatInputWrap { flex-shrink: 0; }

/* ── BOTTOM NAV ─────────────────────────────────────────── */
.nav {
    flex-shrink: 0;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 6px 12px 16px;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-top: 1px solid rgba(196,168,255,0.2);
    box-shadow: 0 -1px 0 rgba(255,255,255,0.95), 0 -8px 24px rgba(108,63,206,0.08);
    border-radius: 0 0 44px 44px;
    z-index: 50;
}
.navItem {
    flex: 1;
    display: flex; flex-direction: column;
    align-items: center; gap: 3px;
    padding: 7px 6px;
    border: none; background: transparent;
    border-radius: var(--r-sm);
    transition: all 0.2s cubic-bezier(.4,0,.2,1);
    opacity: 0.42;
}
.navItem.active { opacity: 1; background: rgba(108,63,206,0.1); }
.navItem:active { transform: scale(0.88); }
.navIcon { font-size: 22px; line-height: 1; transition: transform 0.2s; }
.navItem.active .navIcon { transform: scale(1.12); }
.navLabel {
    font-family: 'Inter', sans-serif;
    font-size: 10px; font-weight: 600; color: var(--t2); letter-spacing: 0.3px;
}
.navItem.active .navLabel { color: var(--p1); }

/* ── PROFILE DRAWER ─────────────────────────────────────── */
.drawerOverlay {
    position: absolute; inset: 0; z-index: 500;
    background: rgba(26,10,60,0.45);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s;
}
.drawerOverlay.open { opacity: 1; pointer-events: all; }

.profileDrawer {
    position: absolute; top: 0; right: 0; bottom: 0;
    width: 87%;
    background: rgba(248,246,255,0.97);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border-radius: 0 44px 44px 0;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(.4,0,.2,1);
    z-index: 501;
    display: flex; flex-direction: column;
    overflow-y: auto; scrollbar-width: none;
    box-shadow: -8px 0 40px rgba(108,63,206,0.16);
}
.profileDrawer::-webkit-scrollbar { display: none; }
.profileDrawer.open { transform: translateX(0); }

.drawerHeader {
    background: linear-gradient(135deg, var(--p1) 0%, #9B6EF3 60%, var(--a1) 100%);
    padding: 44px 22px 26px;
    position: relative; overflow: hidden; flex-shrink: 0;
}
.drawerHeader::before {
    content: ""; position: absolute;
    width: 140px; height: 140px; border-radius: 50%;
    background: rgba(255,255,255,0.1); top: -40px; right: -40px;
}
.drawerHeader::after {
    content: ""; position: absolute;
    width: 80px; height: 80px; border-radius: 50%;
    background: rgba(255,255,255,0.07); bottom: -20px; left: 20px;
}
.drawerCloseBtn {
    position: absolute; top: 14px; right: 14px;
    width: 30px; height: 30px; border-radius: 50%;
    border: none; background: rgba(255,255,255,0.2);
    color: white; font-size: 14px; cursor: pointer; z-index: 1;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.drawerCloseBtn:hover { background: rgba(255,255,255,0.32); }
.drawerAvatar {
    width: 64px; height: 64px; border-radius: 50%;
    background: rgba(255,255,255,0.25);
    border: 2px solid rgba(255,255,255,0.55);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Poppins', sans-serif;
    font-size: 24px; font-weight: 700; color: white;
    margin-bottom: 12px; position: relative; z-index: 1;
}
.drawerName  { font-family: 'Poppins', sans-serif; font-size: 18px; font-weight: 700; color: white; position: relative; z-index: 1; }
.drawerEmail { font-size: 12px; color: rgba(255,255,255,0.72); margin-top: 3px; position: relative; z-index: 1; }
.drawerBody  { padding: 14px 18px 32px; flex: 1; }

.drawerSectionTitle {
    font-family: 'Poppins', sans-serif;
    font-size: 10px; font-weight: 600; color: var(--t4);
    letter-spacing: 1.2px; text-transform: uppercase;
    padding: 16px 2px 6px;
}
.drawerItem {
    display: flex; align-items: center; gap: 14px;
    padding: 13px 12px; border-radius: var(--r-md);
    cursor: pointer; transition: background 0.15s; margin-bottom: 2px;
}
.drawerItem:hover  { background: rgba(108,63,206,0.06); }
.drawerItem:active { background: rgba(108,63,206,0.10); transform: scale(0.98); }
.drawerItemIcon {
    width: 40px; height: 40px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}
.drawerItemLabel { font-size: 14px; font-weight: 600; color: var(--t1); }
.drawerItemSub   { font-size: 12px; color: var(--t3); margin-top: 1px; }
.drawerItemArrow { font-size: 18px; color: var(--t4); margin-left: auto; }

.drawerToggle {
    width: 44px; height: 26px; border-radius: 13px;
    background: rgba(196,168,255,0.3);
    border: none; position: relative; cursor: pointer;
    transition: background 0.22s; flex-shrink: 0; margin-left: auto;
}
.drawerToggle.on { background: var(--p1); }
.drawerToggle::after {
    content: ""; position: absolute;
    width: 20px; height: 20px; border-radius: 50%; background: white;
    top: 3px; left: 3px; transition: transform 0.22s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
.drawerToggle.on::after { transform: translateX(18px); }
.drawerDivider { height: 1px; background: rgba(196,168,255,0.18); margin: 6px 0; }
.drawerLogoutBtn {
    width: 100%; padding: 14px; border-radius: var(--r-lg);
    border: 1.5px solid rgba(248,113,113,0.3);
    background: rgba(248,113,113,0.06); color: #dc2626;
    font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 600;
    cursor: pointer; margin-top: 18px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: background 0.2s;
}
.drawerLogoutBtn:hover { background: rgba(248,113,113,0.12); }

/* ── CARDS ──────────────────────────────────────────────── */
.cardSoft {
    background: var(--glass);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-radius: var(--r-xl);
    border: 1px solid var(--glass-b);
    padding: 18px; margin-top: 12px;
    box-shadow: var(--s2);
}
.cardHeader {
    display: flex; justify-content: space-between; align-items: center;
    font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 600; color: var(--t1);
}
.cardSubText { margin-top: 8px; font-size: 13px; color: var(--t2); line-height: 1.65; }
.actionText  { font-size: 12px; color: var(--p1); cursor: pointer; font-weight: 600; }
.sectionTitle {
    font-family: 'Poppins', sans-serif;
    font-size: 18px; font-weight: 700; color: var(--t1); margin-bottom: 4px;
}
.sectionLabel {
    font-family: 'Poppins', sans-serif;
    font-size: 12px; font-weight: 600; color: var(--t3);
    margin-top: 18px; margin-bottom: 6px; letter-spacing: 0.4px;
}
.plannerSectionLabel {
    font-family: 'Poppins', sans-serif;
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.8px; text-transform: uppercase;
    color: var(--t4); margin-top: 16px; margin-bottom: 4px; padding: 0 2px;
    display: flex; align-items: center; gap: 6px;
}
.plannerSectionLabel::after {
    content: ""; flex: 1; height: 1px; background: rgba(196,168,255,0.2);
}

/* ── SUMMARY CARD (Home) ────────────────────────────────── */
.summary-card {
    background: linear-gradient(135deg, var(--p1) 0%, #8B5CF6 55%, var(--a1) 100%);
    border-radius: var(--r-2xl); padding: 20px; margin-top: 4px;
    box-shadow: 0 12px 32px rgba(108,63,206,0.35);
    position: relative; overflow: hidden;
}
.summary-card::before {
    content: ""; position: absolute; width: 160px; height: 160px; border-radius: 50%;
    background: rgba(255,255,255,0.09); top: -60px; right: -40px; pointer-events: none;
}
.summary-card::after {
    content: ""; position: absolute; width: 100px; height: 100px; border-radius: 50%;
    background: rgba(255,255,255,0.06); bottom: -30px; left: -20px; pointer-events: none;
}
.summary-card h3 {
    font-family: 'Poppins', sans-serif; font-size: 13px; font-weight: 600;
    color: rgba(255,255,255,0.80); letter-spacing: 0.4px; margin-bottom: 2px;
    position: relative; z-index: 1;
}
.summary-card #homeGreeting {
    font-family: 'Poppins', sans-serif; font-size: 20px; font-weight: 700;
    color: white; margin-bottom: 2px;
}
.dateTimeRow { font-size: 12px; color: rgba(255,255,255,0.70); margin: 6px 0 14px; position: relative; z-index: 1; }
.summary-status { display: flex; gap: 10px; position: relative; z-index: 1; }
.statusBox {
    flex: 1; text-align: center; padding: 11px 4px;
    border-radius: var(--r-md);
    background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.25);
    backdrop-filter: blur(8px); transition: transform 0.15s;
}
.statusBox:active { transform: scale(0.95); }
.statusDot   { font-size: 14px; }
.statusNum   { font-family: 'Poppins', sans-serif; font-size: 22px; font-weight: 700; color: white; margin: 2px 0; }
.statusLabel { font-size: 10px; color: rgba(255,255,255,0.72); font-weight: 500; letter-spacing: 0.3px; }

/* ── QUOTE CARD ─────────────────────────────────────────── */
.thoughtCard {
    background: linear-gradient(135deg, rgba(255,246,230,0.82), rgba(255,224,204,0.65));
    border-radius: var(--r-xl); border: 1px solid rgba(255,200,170,0.5);
    padding: 18px 20px; margin-top: 12px; text-align: center; box-shadow: var(--s1);
}
.quoteText { font-family: 'Poppins', sans-serif; font-size: 13px; font-style: italic; color: #92400E; line-height: 1.7; }

/* ── PERIOD HOME CARD ───────────────────────────────────── */
.periodHomeCard {
    background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-radius: var(--r-xl); border: 1px solid var(--glass-b);
    padding: 16px; margin-top: 12px; cursor: pointer;
    display: flex; align-items: center; gap: 14px; box-shadow: var(--s2);
    transition: transform 0.15s, box-shadow 0.15s;
}
.periodHomeCard:active { transform: scale(0.97); box-shadow: var(--s1); }
.periodCalIcon {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, #F87171, #FB923C);
    border-radius: 15px; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 20px; flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(248,113,113,0.32);
}
.periodCalIcon span { font-size: 10px; font-weight: 500; opacity: 0.85; }
.periodDots { display: flex; gap: 5px; margin-top: 7px; flex-wrap: wrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(155,110,243,0.22); }
.dot.filled { background: var(--p1); }
.dot.today  { background: var(--y1); width: 10px; height: 10px; }

/* ── WATER HOME CARD ────────────────────────────────────── */
.waterHomeCard {
    background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-radius: var(--r-xl); border: 1px solid var(--glass-b);
    padding: 16px; margin-top: 12px; box-shadow: var(--s2);
}
.waterDropRow { display: flex; gap: 3px; margin-top: 12px; flex-wrap: wrap; }
.waterDrop { font-size: 21px; transition: filter 0.25s, transform 0.2s; }
.waterDrop.empty  { filter: grayscale(1) opacity(0.28); }
.waterDrop.filled { animation: dropBounce 0.35s cubic-bezier(.4,0,.2,1); }
@keyframes dropBounce {
    0%   { transform: scale(0.65); }
    60%  { transform: scale(1.22); }
    100% { transform: scale(1); }
}
.waterAddRow {
    display: flex; align-items: center; gap: 14px; margin-top: 12px;
    background: rgba(108,63,206,0.07); border-radius: var(--r-lg); padding: 10px 14px;
}
.waterAddBtn {
    width: 36px; height: 36px; border-radius: 50%; border: none;
    background: var(--grad-main); color: white; font-size: 22px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(108,63,206,0.38); flex-shrink: 0;
    transition: transform 0.15s, box-shadow 0.15s;
}
.waterAddBtn:active { transform: scale(0.88); box-shadow: 0 2px 8px rgba(108,63,206,0.2); }
.waterAddLabel { font-family: 'Poppins', sans-serif; font-size: 16px; font-weight: 600; color: var(--p1); }

/* ── PROGRESS BAR ───────────────────────────────────────── */
.progressBar {
    width: 100%; height: 8px;
    background: rgba(155,110,243,0.15);
    border-radius: 20px; margin-top: 12px; overflow: hidden;
}
#periodFill, #periodFillWell, #periodFillDetail, .progressFill {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, var(--p1), var(--a1));
    border-radius: 20px; transition: width 0.6s cubic-bezier(.4,0,.2,1);
}

/* ── ALERT BANNERS ──────────────────────────────────────── */
.alertBanner {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; border-radius: var(--r-lg); margin-top: 10px;
    font-size: 13px; font-weight: 500; cursor: pointer;
    border: 1px solid transparent; transition: transform 0.15s;
}
.alertBanner:active { transform: scale(0.98); }
.alertBanner.warning { background: rgba(251,191,36,0.12); border-color: rgba(251,191,36,0.3);  color: #92400E; }
.alertBanner.danger  { background: rgba(248,113,113,0.10); border-color: rgba(248,113,113,0.28); color: #991B1B; }
.alertBanner.ok      { background: rgba(34,197,94,0.10);   border-color: rgba(34,197,94,0.25);   color: #166534; }
.alertBannerIcon  { font-size: 20px; flex-shrink: 0; }
.alertBannerText  { flex: 1; }
.alertBannerArrow { font-size: 16px; opacity: 0.6; }

/* ── WELLNESS CARDS ─────────────────────────────────────── */
.wellnessCard {
    background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-radius: var(--r-xl); border: 1px solid var(--glass-b);
    padding: 16px 18px; margin-top: 12px; cursor: pointer;
    display: flex; align-items: center; gap: 16px; box-shadow: var(--s2);
    transition: transform 0.15s, box-shadow 0.15s;
}
.wellnessCard:active { transform: scale(0.97); box-shadow: var(--s1); }
.wellnessIconBox { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.wellnessCardInfo { flex: 1; }
.wellnessCardTitle { font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 600; color: var(--t1); }
.wellnessCardSub   { font-size: 12px; color: var(--t3); margin-top: 3px; }
.wellnessArrow     { font-size: 20px; color: var(--t4); }

/* ── SCREEN HEADER ──────────────────────────────────────── */
.screenHeader { display: flex; align-items: center; gap: 10px; padding: 4px 0 12px; }
.backBtn {
    width: 38px; height: 38px; border-radius: 50%;
    border: 1px solid rgba(108,63,206,0.18); background: var(--glass);
    color: var(--p1); font-size: 20px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s; flex-shrink: 0;
}
.backBtn:active { background: rgba(108,63,206,0.12); transform: scale(0.9); }
.screenTitle { font-family: 'Poppins', sans-serif; font-size: 18px; font-weight: 700; color: var(--t1); }
.addPillBtn {
    padding: 8px 18px; border: none; border-radius: 24px;
    background: var(--grad-main); color: white;
    font-family: 'Poppins', sans-serif; font-size: 13px; font-weight: 600;
    box-shadow: 0 4px 14px rgba(108,63,206,0.32);
    transition: transform 0.15s, box-shadow 0.15s;
}
.addPillBtn:active { transform: scale(0.93); box-shadow: 0 2px 8px rgba(108,63,206,0.18); }

/* ── MODAL ──────────────────────────────────────────────── */
.modalOverlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(26,10,60,0.42);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    display: flex; align-items: flex-end; justify-content: center;
}
.modalCard {
    background: rgba(255,255,255,0.98);
    border-radius: 28px 28px 0 0; padding: 26px 22px 100px;
    width: 100%; max-width: 390px; max-height: 92vh;
    overflow-y: auto; box-shadow: 0 -12px 40px rgba(108,63,206,0.2);
    scrollbar-width: none; animation: slideUp 0.3s cubic-bezier(.4,0,.2,1);
}
.modalCard::-webkit-scrollbar { display: none; }
@keyframes slideUp {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}
.modalTitle { font-family: 'Poppins', sans-serif; font-size: 18px; font-weight: 700; color: var(--t1); margin-bottom: 18px; }

/* ── FORMS ──────────────────────────────────────────────── */
.formGroup { margin-top: 14px; }
.formLabel {
    font-size: 11px; font-weight: 600; color: var(--t3);
    margin-bottom: 6px; letter-spacing: 0.5px; text-transform: uppercase; display: block;
}
.formInput {
    width: 100%; padding: 12px 16px; border-radius: var(--r-sm);
    border: 1.5px solid rgba(155,110,243,0.2);
    background: rgba(248,246,255,0.9);
    font-size: 14px; color: var(--t1); outline: none;
    transition: border-color 0.2s, background 0.2s; display: block;
}
.formInput:focus {
    border-color: var(--p2); background: white;
    box-shadow: 0 0 0 3px rgba(108,63,206,0.1);
}
.formRow { display: flex; gap: 12px; margin-top: 14px; }
.formRow .formGroup { flex: 1; margin-top: 0; }
.typeChips { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.typeChip {
    padding: 8px 14px; border-radius: 24px; font-size: 12px; font-weight: 600;
    cursor: pointer; border: 1.5px solid rgba(155,110,243,0.25);
    background: rgba(255,255,255,0.8); color: var(--t2); transition: all 0.15s;
}
.typeChip.active { background: var(--p1); color: white; border-color: var(--p1); box-shadow: 0 4px 12px rgba(108,63,206,0.28); }
.typeChip:active { transform: scale(0.93); }
.cardSoft input, .cardSoft select {
    width: 100%; padding: 11px 14px; margin-top: 8px;
    border-radius: var(--r-sm); border: 1.5px solid rgba(155,110,243,0.18);
    background: rgba(255,255,255,0.75); font-size: 13px; color: var(--t1); outline: none;
    transition: border-color 0.2s;
}
.cardSoft input:focus, .cardSoft select:focus { border-color: var(--p2); background: rgba(255,255,255,0.95); }
.inputRow { display: flex; gap: 8px; }
.inputRow input, .inputRow select { flex: 1; }

/* ── BUTTONS ────────────────────────────────────────────── */
.actionBtn {
    width: 100%; padding: 14px; border: none; border-radius: var(--r-lg);
    background: var(--grad-main); color: white;
    font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 600;
    margin-top: 12px; cursor: pointer;
    box-shadow: 0 6px 20px rgba(108,63,206,0.32);
    transition: transform 0.15s, box-shadow 0.15s;
}
.actionBtn:hover  { box-shadow: 0 8px 24px rgba(108,63,206,0.42); }
.actionBtn:active { transform: scale(0.97); box-shadow: 0 3px 10px rgba(108,63,206,0.2); }
.actionBtn:disabled { opacity: 0.55; transform: none; cursor: not-allowed; }

.secondaryBtn {
    width: 100%; padding: 13px;
    border: 1.5px solid rgba(155,110,243,0.28); border-radius: var(--r-lg);
    background: rgba(255,255,255,0.72); color: var(--t2);
    font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 500;
    margin-top: 10px; cursor: pointer; transition: all 0.15s;
}
.secondaryBtn:active { background: rgba(108,63,206,0.08); transform: scale(0.97); }

.btnGroup { display: flex; gap: 10px; margin-top: 12px; }
.btnGroup button { flex: 1; margin-top: 0; }

.iconBtn {
    border: none; border-radius: var(--r-xs);
    padding: 7px 11px; font-size: 14px; cursor: pointer; color: white;
    transition: transform 0.12s, opacity 0.12s;
}
.iconBtn:active { transform: scale(0.88); opacity: 0.85; }
.btnPrimary { background: var(--p1); }
.btnDanger  { background: var(--r1); }
.btnDone    { background: #CBD5E1; }

/* ── MOOD CHECKER ───────────────────────────────────────── */
.moodCard {
    background: linear-gradient(145deg, rgba(237,224,255,0.75), rgba(252,228,240,0.65));
    border: 1px solid rgba(196,168,255,0.45);
    border-radius: var(--r-xl); padding: 18px; margin-top: 8px;
    box-shadow: var(--s2); position: relative; overflow: hidden;
}
.moodCardBlob {
    position: absolute; width: 110px; height: 110px; border-radius: 50%;
    background: linear-gradient(135deg, #c4a8ff, #f9a8d4);
    opacity: 0.22; top: -35px; right: -35px; pointer-events: none;
}
.moodCardTitle { font-family: 'Poppins', sans-serif; font-size: 15px; font-weight: 700; color: var(--t1); margin-bottom: 2px; }
.moodCardSub   { font-size: 12px; color: var(--t3); margin-bottom: 14px; }
.moodGrid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.moodBtn {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 5px; padding: 12px 4px; border-radius: 14px;
    border: 1.5px solid rgba(255,255,255,0.92); background: rgba(255,255,255,0.72);
    cursor: pointer; box-shadow: var(--s1); transition: all 0.18s;
}
.moodBtn:active   { transform: scale(0.90); }
.moodBtn.selected { border-color: var(--p1); background: rgba(108,63,206,0.1); box-shadow: 0 6px 18px rgba(108,63,206,0.2); transform: translateY(-2px); }
.moodEmoji  { font-size: 26px; line-height: 1; }
.moodLabel  { font-size: 10px; font-weight: 600; color: var(--t3); letter-spacing: 0.2px; }
.moodBtn.selected .moodLabel { color: var(--p1); }
.moodResponse {
    margin-top: 14px; padding: 14px; border-radius: var(--r-md);
    background: rgba(255,255,255,0.78); border: 1px solid rgba(196,168,255,0.3);
    font-size: 13px; color: var(--t1); line-height: 1.65;
    display: none; box-shadow: var(--s1); animation: fadeIn 0.28s ease;
}
.moodResponse.visible { display: block; }

/* ── PERIOD SCREEN ──────────────────────────────────────── */
.periodBigCard {
    background: var(--glass); border: 1px solid var(--glass-b);
    border-radius: var(--r-xl); padding: 22px; margin-top: 8px;
    text-align: center; box-shadow: var(--s2);
}
.periodBigLabel  { font-family: 'Poppins', sans-serif; font-size: 18px; font-weight: 700; color: var(--t1); }
.periodDateLabel { font-size: 13px; color: var(--t3); margin-top: 12px; }
.infoRow {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 0; border-bottom: 1px solid rgba(155,110,243,0.12);
    font-size: 14px; color: var(--t2);
}
.infoRow:last-child { border-bottom: none; }
.infoRow b { color: var(--t1); font-weight: 600; }
.insightItem { display: flex; align-items: center; font-size: 13px; color: var(--t2); padding: 7px 0; gap: 10px; }
.insightDot  { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.cycleTimeline { display: flex; gap: 4px; margin-top: 10px; }
.cyclePhase    { height: 10px; border-radius: 6px; }
.cycleLabels   { display: flex; justify-content: space-between; font-size: 10px; color: var(--t4); margin-top: 6px; }

/* ── PLANNER ────────────────────────────────────────────── */
.plannerHeader { display: flex; align-items: center; justify-content: space-between; padding: 4px 0 10px; }

.calStrip {
    display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 10px; margin-top: 4px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.calStrip::-webkit-scrollbar { display: none; }
.calCell {
    display: flex; flex-direction: column; align-items: center;
    gap: 2px; min-width: 46px; padding: 10px 4px 8px;
    border-radius: var(--r-md); background: var(--glass); border: 1px solid var(--glass-b);
    cursor: pointer; transition: all 0.18s;
}
.calCell:active { transform: scale(0.93); }
.calToday    { background: var(--p1); border-color: var(--p1); box-shadow: 0 4px 14px rgba(108,63,206,0.35); }
.calSelected { background: rgba(108,63,206,0.15); border-color: var(--p1); box-shadow: 0 0 0 2px rgba(108,63,206,0.3); }
.calDay  { font-size: 10px; font-weight: 500; color: var(--t3); }
.calNum  { font-family: 'Poppins', sans-serif; font-size: 16px; font-weight: 700; color: var(--t1); }
.calToday .calDay, .calToday .calNum { color: white; }
.calSelected .calDay, .calSelected .calNum { color: var(--p1); }
.calEvents { display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; min-height: 14px; margin-top: 1px; }
.calEventDot { font-size: 9px; line-height: 1; }
.calMore { font-size: 8px; color: var(--t4); opacity: 0.7; }

/* Day detail panel */
#dayDetailPanel {
    background: var(--glass); border: 1px solid var(--glass-b);
    border-radius: var(--r-xl); padding: 14px 16px; margin-top: 8px; margin-bottom: 4px;
    box-shadow: var(--s2); animation: fadeIn 0.22s ease; display: none;
}
.dayDetailHeader {
    font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 700; color: var(--p1);
    margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid rgba(196,168,255,0.2);
}
.dayDetailEmpty { text-align: center; font-size: 13px; color: var(--t3); padding: 10px 0 4px; line-height: 1.8; }
.dayDetailTask {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 0; border-bottom: 1px solid rgba(196,168,255,0.1);
}
.dayDetailTask:last-of-type { border-bottom: none; }
.dayDetailDone  { opacity: 0.45; }
.dayDetailEmoji { font-size: 20px; flex-shrink: 0; }
.dayDetailInfo  { flex: 1; min-width: 0; }
.dayDetailName  { font-size: 13px; font-weight: 600; color: var(--t1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dayDetailTime  { font-size: 11px; color: var(--t3); margin-top: 2px; }

.plannerCard {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; margin-top: 8px; border-radius: var(--r-lg);
    background: var(--glass); border: 1px solid var(--glass-b);
    box-shadow: var(--s1); gap: 12px; transition: transform 0.15s;
}
.plannerCard:active { transform: scale(0.98); }
.plannerCardLeft { display: flex; align-items: center; gap: 12px; flex: 1; }
.plannerTypeIcon { font-size: 22px; flex-shrink: 0; }
.taskText { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 14px; color: var(--t1); }
.taskMeta { font-size: 12px; color: var(--t3); margin-top: 2px; }
.taskDone { opacity: 0.48; }
.taskDone .taskText { text-decoration: line-through; color: var(--t3); }

/* ── CHAT ───────────────────────────────────────────────── */
.chatHeader {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 20px 12px;
    background: rgba(241,238,255,0.92);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(196,168,255,0.2);
}
.chatAvatarWrap { position: relative; }
.chatAvatar {
    width: 42px; height: 42px; border-radius: 50%;
    background: var(--grad-main); color: white; font-size: 17px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(108,63,206,0.38); font-family: 'Poppins', sans-serif;
}
.chatOnlineDot {
    width: 11px; height: 11px; background: var(--g1);
    border-radius: 50%; border: 2.5px solid white;
    position: absolute; bottom: 1px; right: 1px;
}
.chatHeaderName   { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 16px; color: var(--t1); }
.chatHeaderStatus { font-size: 12px; color: var(--t3); margin-top: 1px; }

.chatBox {
    flex: 1; overflow-y: auto; padding: 14px 16px 8px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-behavior: smooth;
}
.chatBox::-webkit-scrollbar { display: none; }

.chatDateDivider {
    text-align: center; font-size: 11px; color: var(--t4);
    background: rgba(196,168,255,0.14); border-radius: 20px;
    padding: 3px 14px; width: fit-content; margin: 0 auto 14px;
}

/* Chat bubbles — bot LEFT, user RIGHT */
.msgRow { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 10px; animation: bubbleIn 0.22s ease forwards; }
.msgRow--bot  { flex-direction: row; justify-content: flex-start; }
.msgRow--user { flex-direction: row-reverse; }

@keyframes bubbleIn {
    from { opacity: 0; transform: translateY(8px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.bubble { max-width: 76%; padding: 11px 15px; font-size: 14px; line-height: 1.55; word-break: break-word; }
.bubble--bot  {
    background: rgba(255,255,255,0.96); border: 1px solid rgba(196,168,255,0.22);
    border-radius: 18px 18px 18px 4px; color: var(--t1); box-shadow: 0 2px 10px rgba(108,63,206,0.08);
}
.bubble--user {
    background: var(--grad-main);
    border-radius: 18px 18px 4px 18px; color: white;
    box-shadow: 0 4px 14px rgba(108,63,206,0.30);
}
.bubble.typing { display: flex; align-items: center; gap: 5px; padding: 14px 16px; min-width: 60px; }

.chatAvatarSmall {
    width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; align-self: flex-end;
    background: var(--grad-main); color: white; font-size: 13px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; font-family: 'Poppins', sans-serif;
}

/* Kept for backward compatibility */
.userMsgWrap { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.userMsg {
    background: var(--grad-main); color: white; padding: 11px 16px;
    border-radius: 18px 18px 4px 18px; font-size: 14px; max-width: 78%; line-height: 1.5;
    box-shadow: 0 4px 14px rgba(108,63,206,0.30);
}
.botMsgWrap { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 10px; }
.botAvatar {
    width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
    background: var(--grad-main); color: white; font-size: 13px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; font-family: 'Poppins', sans-serif;
}
.botMsg {
    background: rgba(255,255,255,0.95); border: 1px solid rgba(196,168,255,0.22);
    color: var(--t1); padding: 11px 16px;
    border-radius: 18px 18px 18px 4px; font-size: 14px; max-width: 78%;
    white-space: pre-line; line-height: 1.55; box-shadow: var(--s1);
}
.botMsg.typing { display: flex; align-items: center; gap: 5px; padding: 14px 16px; min-width: 64px; }

.chatSuggestions { display: flex; gap: 7px; flex-wrap: wrap; margin: 8px 0 4px; justify-content: flex-start; }
.suggBtn {
    padding: 7px 13px; border-radius: 20px; border: 1px solid rgba(155,110,243,0.28);
    background: rgba(255,255,255,0.8); color: var(--t2);
    font-size: 12px; font-weight: 500; cursor: pointer; transition: all 0.15s;
}
.suggBtn:active { background: rgba(108,63,206,0.12); color: var(--p1); transform: scale(0.95); }

.chatInputWrap {
    padding: 10px 16px 14px;
    background: rgba(241,238,255,0.92);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(196,168,255,0.2); flex-shrink: 0;
}
.chatInputRow { display: flex; gap: 10px; align-items: center; }
.chatInputField {
    flex: 1; padding: 12px 18px; border-radius: 28px;
    border: 1.5px solid rgba(155,110,243,0.22);
    background: rgba(255,255,255,0.9); font-size: 14px; color: var(--t1); outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.chatInputField:focus { border-color: var(--p2); box-shadow: 0 0 0 3px rgba(108,63,206,0.1); background: white; }
.chatSendBtn {
    width: 44px; height: 44px; border-radius: 50%; border: none;
    background: var(--grad-main); color: white;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(108,63,206,0.35); transition: transform 0.15s, box-shadow 0.15s; flex-shrink: 0;
}
.chatSendBtn:active { transform: scale(0.90); box-shadow: 0 2px 8px rgba(108,63,206,0.2); }

/* Typing indicator dots */
.typingDot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--p3); display: inline-block;
    animation: typingBounce 1.2s infinite ease-in-out;
}
.typingDot:nth-child(1) { animation-delay: 0s; }
.typingDot:nth-child(2) { animation-delay: 0.18s; }
.typingDot:nth-child(3) { animation-delay: 0.36s; }
@keyframes typingBounce {
    0%,60%,100% { transform: translateY(0);   opacity: 0.45; }
    30%          { transform: translateY(-7px); opacity: 1; }
}

/* ── MEDICINE ───────────────────────────────────────────── */
.medSummaryStrip { display: flex; gap: 10px; margin-top: 12px; }
.medSummaryBox {
    flex: 1; text-align: center; padding: 13px 6px;
    background: var(--glass); border: 1px solid var(--glass-b);
    border-radius: var(--r-lg); box-shadow: var(--s1);
}
.medSummaryNum   { font-family: 'Poppins', sans-serif; font-size: 22px; font-weight: 700; color: var(--p1); }
.medSummaryLabel { font-size: 11px; color: var(--t3); margin-top: 2px; }

.filterTabs { display: flex; gap: 6px; margin-top: 12px; }
.filterTab {
    flex: 1; padding: 9px 3px;
    border: 1px solid rgba(255,255,255,0.9); border-radius: var(--r-xs);
    background: rgba(255,255,255,0.65); color: var(--t2);
    font-size: 11px; font-weight: 500; cursor: pointer; transition: all 0.15s;
}
.filterTab.active { background: var(--p1); color: white; border-color: var(--p1); box-shadow: 0 4px 10px rgba(108,63,206,0.28); }
.filterTab:active { transform: scale(0.95); }

.medCard {
    background: var(--glass); border: 1px solid var(--glass-b);
    border-radius: var(--r-xl); padding: 14px 16px; margin-top: 10px;
    display: flex; align-items: flex-start; gap: 12px; box-shadow: var(--s1);
}
.medIconBox {
    width: 46px; height: 46px; border-radius: 14px;
    background: linear-gradient(135deg, rgba(196,168,255,0.4), rgba(249,168,212,0.28));
    display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0;
}
.medName     { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 14px; color: var(--t1); }
.medMeta     { font-size: 12px; color: var(--t3); margin-top: 2px; }
.medNoteText { font-size: 11px; color: var(--t3); margin-top: 3px; font-style: italic; }
.medStockBar { width: 100%; height: 5px; background: rgba(155,110,243,0.15); border-radius: 10px; margin-top: 8px; overflow: hidden; }
.medStockFill { height: 100%; border-radius: 10px; transition: width 0.45s; }
.medCheck {
    width: 26px; height: 26px; border-radius: 8px;
    border: 1.5px solid rgba(108,63,206,0.25);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--p1); font-size: 14px;
    background: rgba(255,255,255,0.8); transition: all 0.18s;
}
.medCheck.checked { background: var(--p1); border-color: var(--p1); color: white; }
.medCheck:active  { transform: scale(0.88); }
.medFormCard {
    background: rgba(255,255,255,0.92); border-radius: var(--r-xl);
    border: 1px solid rgba(255,255,255,0.95); padding: 18px; margin-top: 12px; box-shadow: var(--s2);
}

/* ── WATER SCREEN ───────────────────────────────────────── */
.waterRingCard {
    display: flex; flex-direction: column; align-items: center;
    background: var(--glass); border: 1px solid var(--glass-b);
    border-radius: var(--r-xl); padding: 22px; margin-top: 8px; box-shadow: var(--s2);
}
.waterRingOuter { position: relative; width: 136px; height: 136px; }
.waterRingSvg   { width: 136px; height: 136px; transform: rotate(-90deg); }
.ringTrack { fill: none; stroke: rgba(155,110,243,0.18); stroke-width: 11; }
.ringFill  { fill: none; stroke: url(#ringGrad); stroke-width: 11; stroke-linecap: round; transition: stroke-dashoffset 0.65s cubic-bezier(.4,0,.2,1); }
.waterRingInner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.waterRingCount { font-family: 'Poppins', sans-serif; font-size: 34px; font-weight: 700; color: var(--t1); line-height: 1; }
.waterRingLabel { font-size: 12px; color: var(--t3); }

.waterGlassGrid { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 14px 0 4px; }
.glassItem { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.glassTube {
    width: 28px; height: 44px; border-radius: 8px;
    background: rgba(155,110,243,0.15); border: 1.5px solid rgba(155,110,243,0.28);
    position: relative; overflow: hidden;
}
.glassFill {
    position: absolute; bottom: 0; width: 100%; height: 0%;
    background: linear-gradient(180deg, #93C5FD, #3B82F6);
    transition: height 0.5s cubic-bezier(.4,0,.2,1); border-radius: 0 0 6px 6px;
}
.glassTube.active .glassFill { height: 100%; }
.glassNum { font-size: 10px; color: var(--t4); font-weight: 500; }

.waterLogList { margin-top: 4px; }
.waterLogEntry {
    display: flex; align-items: center; gap: 12px; padding: 10px 14px;
    background: var(--glass); border-radius: var(--r-md);
    border: 1px solid var(--glass-b); margin-top: 7px;
}
.waterLogTime  { font-size: 12px; color: var(--t4); min-width: 54px; }
.waterLogGlass { font-size: 13px; font-weight: 600; color: var(--t2); flex: 1; }

.waterChartWrap {
    background: var(--glass); border: 1px solid var(--glass-b);
    border-radius: var(--r-xl); padding: 16px; margin-top: 8px; box-shadow: var(--s1);
}
.waterBars  { display: flex; align-items: flex-end; gap: 6px; height: 84px; }
.waterBar   { flex: 1; display: flex; align-items: flex-end; height: 100%; }
.waterBarFill {
    width: 100%; border-radius: 6px 6px 0 0;
    background: rgba(155,110,243,0.35);
    display: flex; align-items: flex-start; justify-content: center;
    transition: height 0.55s cubic-bezier(.4,0,.2,1);
}
.barToday { background: var(--grad-main); }
.barVal   { font-size: 9px; font-weight: 700; color: white; margin-top: 3px; }
.waterBarLabels { display: flex; gap: 6px; margin-top: 6px; }
.barLabel { flex: 1; text-align: center; font-size: 10px; color: var(--t4); }
.tipItem { font-size: 13px; color: var(--t2); padding: 7px 0; border-bottom: 1px solid rgba(155,110,243,0.1); }
.tipItem:last-child { border-bottom: none; }

/* ── GROCERY ────────────────────────────────────────────── */
.groceryItemCard {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 15px; margin-top: 8px; border-radius: var(--r-lg);
    background: var(--glass); border: 1px solid var(--glass-b);
    box-shadow: var(--s1); transition: opacity 0.2s;
}
.groceryDone   { opacity: 0.45; }
.groceryName   { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 14px; color: var(--t1); }
.groceryMeta   { font-size: 11px; color: var(--t4); margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; }
.strikethrough { text-decoration: line-through; color: var(--t4); }
.groceryCheck {
    width: 24px; height: 24px; border-radius: 7px; flex-shrink: 0;
    border: 1.5px solid rgba(108,63,206,0.22); background: rgba(255,255,255,0.8);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--p1); font-size: 13px; transition: all 0.18s;
}
.groceryCheck.checked { background: var(--p1); border-color: var(--p1); color: white; }
.groceryCheck:active  { transform: scale(0.88); }
.urgencyBadge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 10px; font-weight: 600; margin-left: 4px; }
.urgencyBadge.urgent { background: rgba(248,113,113,0.12); color: #DC2626; }
.urgencyBadge.low    { background: rgba(168,156,200,0.12); color: var(--t4); }

/* ── REMINDER TOAST ─────────────────────────────────────── */
.reminderToast {
    position: absolute; bottom: calc(var(--nav-h) + 12px);
    left: 16px; right: 16px; z-index: 300;
    background: linear-gradient(135deg, #EDE9FE, #DDD6FE);
    border: 1px solid rgba(196,168,255,0.5); border-radius: var(--r-lg);
    padding: 13px 17px; display: flex; align-items: center; gap: 13px;
    box-shadow: 0 10px 30px rgba(108,63,206,0.24);
    opacity: 0; transform: translateY(18px);
    transition: opacity 0.3s ease, transform 0.3s ease; pointer-events: none;
}
.reminderToast.toastVisible { opacity: 1; transform: translateY(0); }

/* ── AUTH CARDS ─────────────────────────────────────────── */
.authCard {
    width: 100%; background: rgba(255,255,255,0.86);
    backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
    border: 1px solid rgba(255,255,255,0.95); border-radius: 28px;
    padding: 28px 24px 32px; box-shadow: 0 14px 44px rgba(108,63,206,0.14); margin-bottom: 10px;
}
.authTitle { font-family: 'Poppins', sans-serif; font-size: 24px; font-weight: 700; color: var(--t1); margin-bottom: 4px; }
.authSub   { font-size: 13px; color: var(--t3); margin-bottom: 20px; }
.authError {
    background: rgba(248,113,113,0.09); border: 1px solid rgba(248,113,113,0.28);
    border-radius: var(--r-xs); padding: 10px 14px; font-size: 13px; color: #991B1B; margin-top: 10px;
}
.authSwitch { text-align: center; font-size: 13px; color: var(--t3); margin-top: 18px; }
.authSwitch span { color: var(--p1); font-weight: 600; cursor: pointer; }
.authSwitch span:hover { text-decoration: underline; }

/* ── ANIMATIONS ─────────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
    0%,100% { opacity: 1; }
    50%      { opacity: 0.65; }
}

/* ══════════════════════════════════════════════════════════
   MOBILE FULL-SCREEN (real device — ≤ 480px)
══════════════════════════════════════════════════════════ */
@media screen and (max-width: 480px) {

    html, body {
        overflow: hidden;
        height: 100%;
        width: 100%;
    }

    body {
        display: block;
        padding: 0;
        margin: 0;
        min-height: 100dvh;
    }

    .phone {
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100dvh;
        border-radius: 0;
        border: none;
        box-shadow: none;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .appHeader {
        padding-top: max(14px, env(safe-area-inset-top));
    }

    .nav {
        border-radius: 0;
        padding-bottom: max(14px, env(safe-area-inset-bottom));
    }

    .appScreen.active {
        padding: 14px 16px max(24px, env(safe-area-inset-bottom));
    }

    #chatScreen.active { padding: 0; }

    #chatScreen .chatInputWrap {
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }

    .modalOverlay {
        position: fixed;
        inset: 0;
    }

    .modalCard {
        padding-bottom: max(80px, calc(env(safe-area-inset-bottom) + 60px));
    }

    .reminderToast {
        left: 12px;
        right: 12px;
        bottom: calc(var(--nav-h) + max(8px, env(safe-area-inset-bottom)));
    }

    .profileDrawer {
        border-radius: 0;
        width: 88%;
    }

    .logoContainer {
        padding-top: max(32px, env(safe-area-inset-top));
    }

    #authWrapper {
        padding-bottom: max(24px, env(safe-area-inset-bottom));
    }
}
