
:root {
    --rose:    #f4a7b9;
    --rose-d:  #e8819a;
    --blush:   #fdf0f3;
    --cream:   #fdfaf7;
    --sage:    #a8c5a0;
    --lavender:#c5b8e8;
    --text:    #3d3347;
    --muted:   #8e849a;
    --card-sh: 0 4px 24px rgba(244,167,185,.18);
    --bs-card-border-color: var(--bs-root-card-border-color);

    --bs-text-primary: var(--rose);
    --app-font-family: "Segoe UI", "SF Pro Display", "Helvetica Neue", 'Nunito', Arial, sans-serif;

    --bg: #f7f6f3;
    --white: #ffffff;
    --border: #e8e4dd;
    --border2: #d4cfc6;
    --text: #1a1916;
    --muted: #8a8680;
    --accent: #1a6b4a;
    --accent-lt: #e8f4ef;
    --accent-hv: #155a3d;
    --danger: #c0392b;
    --shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 4px 16px rgba(0, 0, 0, .06);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, .10);
    --r: 12px;
    --serif: 'Instrument Serif', Georgia, serif;
    --sans: 'Outfit', sans-serif;
    --trans: .18s cubic-bezier(.4, 0, .2, 1);

    --card-padding: 15px;
    --border-radius: 18px;
    --app-border: 1px solid var(--bs-card-border-color);
}

* { box-sizing: border-box; }

body, html {
    font-family: var(--app-font-family) !important;
    background: var(--cream);
    color: var(--text);
    min-height: 100vh;

    background: var(--bg);
}

body, html{
    font-size: 14px!important;
}
@media (max-width: 767.98px) {
    body, html {
        font-size: 13px !important;
    }
}
@media (max-width: 860px) {
    .container {
        /* flex-direction: column; */
        align-items: stretch;
        padding: 20px 12px 48px;
    }
}
@media (max-width: 991.98px) {
    .container {
        /* flex-direction: column; */
        align-items: stretch;
        padding: 20px 12px 48px;
    }
}

/* ── NAVBAR ───────────────────────────────────── */
.navbar {
    background: #fff;
    border-bottom: 2px solid var(--rose);
    padding: 12px 0;
    box-shadow: 0 2px 12px rgba(244,167,185,.15);
}

.navbar-container {
        display: flex;
    flex-wrap: inherit;
    align-items: center;
    justify-content: space-between;
        flex-wrap: inherit;
    align-items: center;
    justify-content: space-between;
}   
.navbar-brand {
    font-family: var(--app-font-family);
    font-size: 1.4rem;
    color: var(--rose-d) !important;
}
.navbar-brand span { color: var(--text); }
.nav-link {
    color: var(--muted) !important;
    font-weight: 600;
    font-size: .9rem;
    transition: color .2s;
}
.nav-link:hover, .nav-link.active {
    color: var(--rose-d) !important;
}

/* ── HERO CARD ─────────────────────────────────── */
.hero-card {
    background: linear-gradient(135deg, #f9d5e0 0%, #fde8f0 50%, #f0e6fb 100%);
    border: none;
    border-radius: 24px;
    padding: 36px;
    box-shadow: var(--card-sh);
    position: relative;
    overflow: hidden;
}
.hero-card::before {
    content: '🌸';
    position: absolute;
    right: 30px;
    top: 20px;
    font-size: 80px;
    opacity: .2;
}
.hero-card .week-badge {
    display: inline-flex;
    align-items: center;
    background: var(--rose-d);
    color: #fff;
    border-radius: 50px;
    padding: 4px 16px;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .5px;
    margin-bottom: 12px;
}
.hero-card .week-num {
    font-family: var(--app-font-family);
    font-size: 4rem;
    line-height: 1;
    color: var(--rose-d);
    font-weight: 600;
}
.hero-card .week-label {
    font-size: 1rem;
    color: var(--muted);
    font-weight: 600;
}

/* ── PROGRESS BAR ──────────────────────────────── */
.pregnancy-progress .progress {
    height: 16px;
    border-radius: 50px;
    background: rgba(255,255,255,.6);
    overflow: hidden;
}
.pregnancy-progress .progress-bar {
    background: linear-gradient(90deg, var(--rose) 0%, var(--rose-d) 100%);
    border-radius: 50px;
    transition: width 1.2s cubic-bezier(.4,0,.2,1);
}
.progress-label {
    font-size: .8rem;
    color: var(--muted);
    font-weight: 600;
}

/* ── STAT CARDS ────────────────────────────────── */
.stat-card {
    background: #fff;
    border: none;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 2px 16px rgba(61,51,71,.07);
    transition: transform .2s, box-shadow .2s;
    border: 1px solid var(--bs-card-border-color);
    height: 100%;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(61,51,71,.12);
}
.stat-card .icon-wrap {
    width: 52px; height: 52px;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 12px;
}
.stat-card .stat-value {
    font-family: var(--app-font-family);
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.1;
}
.stat-card .stat-label {
    font-size: .8rem;
    color: var(--muted);
    font-weight: 600;
    margin-top: 4px;
}
.bg-rose-soft    { background: #fde8f0; color: var(--rose-d); }
.bg-sage-soft    { background: #e8f4e6; color: #5a9a50; }
.bg-lavender-soft{ background: #ede8fb; color: #7060c0; }
.bg-peach-soft   { background: #fef0e6; color: #d07040; }

/* ── SECTION TITLE ─────────────────────────────── */
.section-title {
    font-family: var(--app-font-family);
    font-size: 1.2rem;
    color: var(--text);
    margin-bottom: 16px;
    display: flex; align-items: center; gap: 8px;
}
.section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--rose) 0%, transparent 100%);
    border-radius: 2px;
}

/* ── APPOINTMENT ITEMS ─────────────────────────── */
.appt-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 12px;
    display: flex; align-items: center; gap: 16px;
    box-shadow: 0 2px 12px rgba(61,51,71,.06);
    
    border: 1px solid var(--bs-card-border-color);
    border-left: 4px solid var(--rose);
    transition: box-shadow .2s;
}
.appt-card.soon  { border-left-color: #f4a030; }
.appt-card.today { border-left-color: var(--rose-d); background: var(--blush); }
.appt-card .appt-date-box {
    text-align: center;
    min-width: 52px;
}
.appt-date-box .day   { font-family: var(--app-font-family); font-size: 1.6rem; line-height: 1; color: var(--rose-d); }
.appt-date-box .month { font-size: .7rem; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.appt-title { font-weight: 700; font-size: .95rem; }
.appt-meta  { font-size: .8rem; color: var(--muted); }
.badge-pending   { background: #fff3e0; color: #d07040; }
.badge-done      { background: #e8f4e6; color: #5a9a50; }
.badge-cancelled { background: #f0f0f0; color: var(--muted); }

/* ── KNOWLEDGE CARD ────────────────────────────── */
.knowledge-card {
    background: linear-gradient(135deg, #fff 0%, #fdf6ff 100%);
    border: 1px solid svar(--bs-card-border-color);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 2px 16px rgba(197,184,232,.2);
}
.knowledge-card .kw-header {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 16px;
}
.knowledge-card .kw-week {
    background: var(--lavender);
    color: #5040a0;
    border-radius: 12px;
    padding: 8px 14px;
    font-weight: 700;
    font-size: .85rem;
}
.knowledge-card h5 {
    font-family: var(--app-font-family);
    margin: 0; color: var(--text);
}
.knowledge-card p { color: var(--muted); line-height: 1.8; font-size: .92rem; }
.kw-meta span {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--blush); color: var(--rose-d);
    border-radius: 8px; padding: 4px 12px;
    font-size: .8rem; font-weight: 600; margin-right: 8px;
}

/* ── ALERT ─────────────────────────────────────── */
#ajax-alert {
    position: fixed; top: 80px; right: 20px;
    z-index: 9999; min-width: 280px;
    display: none;
}

/* ── RESPONSIVE ────────────────────────────────── */
@media (max-width: 576px) {
    .hero-card { padding: 24px; }
    .hero-card .week-num { font-size: 3rem; }
}
    
.page-header {
    background: linear-gradient(135deg, #f9d5e0 0%, #fde8f0 100%);
    border-radius: 24px; padding: 32px; margin-bottom: 24px;
}
.page-header h2 { font-family:'Playfair Display',serif; }

.card-custom {
    background: #fff; border: none; border-radius: 20px;
    box-shadow: 0 2px 16px rgba(61,51,71,.07); overflow: hidden;
}
.card-custom .card-header-custom {
    background: var(--blush); padding: 16px 24px;
    border-bottom: 1px solid rgba(244,167,185,.3);
    font-weight: 700; font-size: 1rem;
}
.card-custom .card-body-custom { padding: 24px; }

/* Form */
.form-label { font-weight: 700; font-size: .85rem; color: var(--muted); }
.form-control, .form-select {
    /* border: 2px solid #f0e8f0;  */
    border-radius: 12px;
    /* font-family: 'Nunito', sans-serif;  */
    font-size: .92rem;
    transition: border-color .2s;
}
.form-control:focus { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(244,167,185,.2); }
.btn-rose {
    background: var(--rose-d); color: #fff; border: none;
    border-radius: 50px; padding: 10px 28px; font-weight: 700;
    transition: all .2s;
}
.btn-rose:hover { background: #d4708a; color: #fff; transform: translateY(-1px); }

/* Table */
.table-custom { font-size: .88rem; }
.table-custom thead th {
    background: var(--blush); color: var(--text); font-weight: 700;
    border: none; padding: 12px 16px;
}
.table-custom tbody td { padding: 12px 16px; vertical-align: middle; border-color: #faf0f4; }
.table-custom tbody tr:hover { background: #fff8fa; }
.gain-positive { color: #5a9a50; font-weight: 700; }
.gain-negative { color: var(--rose-d); font-weight: 700; }

/* Alert */
#ajax-alert { position:fixed; top:80px; right:20px; z-index:9999; min-width:280px; display:none; }

/* Chart container */
.chart-wrap { position: relative; height: 300px; }


/* ICON */
i.bi, i[class^=fonticon-], i[class*=" fonticon-"], i[class^=la-], i[class*=" la-"] {
    --color-icon: var(--muted);
    line-height: 1;
    font-size: 1rem;
    color: var(--color-icon);
}

.active i.bi, 
.active i[class^=fonticon-], 
.active i[class*=" fonticon-"], 
.active i[class^=la-], i[class*=" la-"] {
    --color-icon: var(--blush);
    color: var(--color-icon);
}

/* Bottom Nav */
/* ── Bottom Nav ──────────────────────────────────────────── */
.bottom-nav-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px;
}

.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 64px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1000;
    box-shadow: 0 -1px 0 rgba(0,0,0,.06), 0 -8px 24px rgba(0,0,0,.08);
    padding: 0 4px;
    padding-bottom: env(safe-area-inset-bottom); /* iPhone notch */

    /* /// */
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 100px;
    padding: 8px 8px;
    gap: 2px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .06), 0 10px 28px -4px rgba(0, 0, 0, .10);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 3px;
    padding: 8px 4px;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    color: #aaa;
    transition: color .2s;
    -webkit-tap-highlight-color: transparent;
    min-width: 0;
    

    /*  */
            display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 18px;
    border-radius: 100px;
    cursor: pointer;
    transition: background .22s ease, transform .18s ease;
    position: relative;
    min-width: 60px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.bottom-nav-item:hover { color: #e8819a }

.bottom-nav-item.active { 
    color: #e8819a ;
    background: #fde8f0;
}

.bnav-icon {
    position: relative;
    font-size: 1.35rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bnav-dot {
    position: absolute;
    top: -2px; right: -4px;
    width: 7px; height: 7px;
    background: #e8819a;
    border-radius: 50%;
    border: 2px solid #fff;
}

.bnav-label {
    font-size: .62rem;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60px;
    text-align: center;
}

.bottom-nav-item.active .bi{
    transform: translateY(-2px);
}
.bottom-nav-item.active .bnav-label{
    font-weight: 600;
}

/* Active icon animation */
.bottom-nav-item.active .bnav-icon {
    animation: bnav-pop .25s cubic-bezier(.34,1.56,.64,1);
}
@keyframes bnav-pop {
    0%   { transform: scale(.8) }
    100% { transform: scale(1) }
}

/* ── Backdrop ────────────────────────────────────────────── */
.sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1100;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    backdrop-filter: blur(2px);
}
.sheet-backdrop.show {
    opacity: 1;
    pointer-events: all;
}

/* ── Bottom Sheet ────────────────────────────────────────── */
.more-sheet {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #fff;
    border-radius: 24px 24px 0 0;
    z-index: 1200;
    transform: translateY(100%);
    transition: transform .35s cubic-bezier(.32,.72,0,1);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -4px 32px rgba(0,0,0,.15);
    padding-bottom: env(safe-area-inset-bottom);
}
.more-sheet.open {
    transform: translateY(0);
}

.sheet-handle-wrap {
    padding: 12px 0 4px;
    display: flex;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.sheet-handle {
    width: 40px; height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
}

.sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 20px 12px;
    flex-shrink: 0;
}
.sheet-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #3d3347;
}
.sheet-close {
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    width: 32px; height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #888;
    font-size: .9rem;
    transition: background .15s;
}
.sheet-close:hover { background: #eee }

/* ── Sheet content ───────────────────────────────────────── */
.sheet-content {
    overflow-y: auto;
    padding: 0 16px 16px;
    flex: 1;
    overscroll-behavior: contain;
}

.sheet-section { margin-bottom: 20px }
.sheet-section-title {
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #bbb;
    margin-bottom: 10px;
    padding-left: 4px;
}

.sheet-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.sheet-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 6px;
    border-radius: 14px;
    text-decoration: none;
    color: #3d3347;
    background: #fafafa;
    transition: all .15s;
    -webkit-tap-highlight-color: transparent;
}
.sheet-item:hover, .sheet-item:active {
    background: #fde8f0;
    color: #e8819a;
}
.sheet-item.active {
    background: #fde8f0;
    color: #e8819a;
}

.sheet-item-icon {
    width: 44px; height: 44px;
    border-radius: 13px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    transition: transform .15s;
}
.sheet-item:active .sheet-item-icon { transform: scale(.93) }
.sheet-item.active .sheet-item-icon {
    background: #e8819a;
    color: #fff;
    box-shadow: 0 4px 12px rgba(232,129,154,.4);
}

.sheet-item-label {
    font-size: .65rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
}

/* ── Sheet footer ────────────────────────────────────────── */
.sheet-footer {
    border-top: 1px solid #f5f5f5;
    padding: 14px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.sheet-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.sheet-user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f4a7b9, #e8819a);
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sheet-user-name {
    font-weight: 700;
    font-size: .82rem;
    color: #3d3347;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sheet-user-email {
    font-size: .7rem;
    color: #aaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sheet-logout {
    flex-shrink: 0;
    background: #fff0f0;
    color: #e53935;
    border-radius: 50px;
    padding: 7px 14px;
    font-size: .76rem;
    font-weight: 700;
    text-decoration: none;
    transition: background .15s;
}
.sheet-logout:hover { background: #ffebee; color: #c62828 }
/* Bottom Nav */