/* ============================================================
   BBS - Baby Blog System 粉色可爱主题
   ============================================================ */

/* ---- Google Fonts ---- */
@import url('https://gstatic.aby.pub/css2?family=Nunito:wght@400;600;700;800&display=swap');

/* ---- CSS Variables ---- */
:root {
    --pink-primary: #FF85A1;
    --pink-dark: #FF6B8A;
    --pink-light: #FFB6C1;
    --pink-bg: #FFF0F5;
    --pink-card: #FFFFFF;
    --pink-accent: #FFE4E1;
    --green: #90D5A8;
    --yellow: #FFE5A3;
    --purple: #C4A5DF;
    --text: #5D4E5F;
    --text-muted: #A08C9E;
    --text-dark: #3D2E3F;
    --shadow: 0 4px 20px rgba(255, 133, 161, 0.12);
    --shadow-hover: 0 8px 32px rgba(255, 133, 161, 0.2);
    --radius: 20px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --nav-height: 64px;
    --nav-height-mobile: 60px;
    --bottom-nav-height: 64px;
}

/* ---- Reset & Base ---- */
* { box-sizing: border-box; }

body {
    font-family: 'Nunito', system-ui, -apple-system, sans-serif;
    background: var(--pink-bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    background-image:
        radial-gradient(ellipse at 20% 10%, rgba(255,182,193,0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 90%, rgba(255,133,161,0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 60%, rgba(255,228,225,0.2) 0%, transparent 50%);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--pink-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--pink-primary); }

/* ---- Navbar (Desktop) ---- */
.navbar-desktop {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 2px solid var(--pink-accent);
    padding: 0 24px;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--pink-dark) !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.navbar-brand:hover { color: var(--pink-primary) !important; }

.nav-links {
    display: flex;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.92rem;
    transition: all 0.25s;
    position: relative;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    background: var(--pink-bg);
    color: var(--pink-dark);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--pink-dark);
    border-radius: 2px;
}

/* ---- Bottom Nav (Mobile) ---- */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 2px solid var(--pink-accent);
    height: var(--bottom-nav-height);
    padding: 4px 8px;
    padding-bottom: env(safe-area-inset-bottom, 4px);
}

.bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    transition: all 0.2s;
    min-width: 52px;
}

.bottom-nav-item i { font-size: 1.25rem; }

.bottom-nav-item.active,
.bottom-nav-item:hover {
    color: var(--pink-dark);
    background: var(--pink-bg);
}

/* ---- Layout ---- */
.page-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 24px 20px;
    padding-bottom: calc(24px + var(--bottom-nav-height)); /* 移动端给底部导航留空间 */
}

.page-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--pink-dark);
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---- Cards ---- */
.card {
    background: var(--pink-card);
    border-radius: var(--radius);
    padding: 10px;
    box-shadow: var(--shadow);
    border: 2px solid transparent;
    transition: all 0.3s;
    margin-bottom: 10px;
}

.card:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--pink-accent);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--pink-accent);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--pink-primary), var(--pink-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(255,107,138,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,107,138,0.4);
}

.btn-outline {
    background: white;
    color: var(--pink-dark);
    border: 2px solid var(--pink-primary);
}

.btn-outline:hover {
    background: var(--pink-bg);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.82rem;
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--green), #6bc48a);
    color: white;
}

.btn-icon {
    width: 24px;
    height: 24px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    background: var(--pink-bg);
    color: var(--pink-dark);
}

.btn-icon:hover {
    background: var(--pink-light);
    color: white;
}

.btn-icon.danger { color: #ff6b6b; }
.btn-icon.danger:hover { background: #ff6b6b; color: white; }

/* ---- Forms ---- */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-weight: 700;
    font-size: 0.88rem;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--pink-accent);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.25s;
    background: white;
    color: var(--text-dark);
    outline: none;
}

.form-control:focus {
    border-color: var(--pink-primary);
    box-shadow: 0 0 0 4px rgba(255,133,161,0.12);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a08c9e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

/* ---- Login Page ---- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #ffe4e1 0%, #ffb6c1 30%, #ff85a1 70%, #ff6b8a 100%);
}

.login-card {
    background: white;
    border-radius: 28px;
    padding: 48px 36px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(255,107,138,0.25);
    text-align: center;
}

.login-logo {
    font-size: 3.5rem;
    margin-bottom: 8px;
}

.login-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--pink-dark);
    margin: 0 0 4px;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 28px;
}

.login-card .form-control {
    text-align: center;
    font-size: 1rem;
    padding: 14px 16px;
}

.login-card .btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    margin-top: 8px;
}

/* ---- Dashboard ---- */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.dash-card {
    background: white;
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dash-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--pink-light);
    color: var(--text);
}

.dash-card-icon {
    font-size: 2.2rem;
}

.dash-card-title {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--text-dark);
}

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

.dash-alert {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 2px solid #ffc107;
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dash-alert i { font-size: 1.5rem; color: #e67e22; }
.dash-alert-text { font-weight: 700; color: #856404; flex: 1; }
.dash-alert a { color: #e67e22; font-weight: 800; }

.dash-card-badge {
    display: inline-block;
    background: var(--pink-primary);
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    margin-top: 6px;
    align-self: flex-start;
}

/* ---- Welcome Banner ---- */
.welcome-banner {
    position: relative;
    background: linear-gradient(135deg, #ffa4e1 0%, #ffb6c1 40%, #ff85a1 100%);
    border-radius: var(--radius);
    padding: 32px 28px;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(255, 107, 138, 0.2);
}

.welcome-banner-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.welcome-float {
    position: absolute;
    font-size: 1.8rem;
    opacity: 0.6;
    animation: floatAround 6s ease-in-out infinite;
}

@keyframes floatAround {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-12px) rotate(8deg); }
    50% { transform: translateY(-6px) rotate(-4deg); }
    75% { transform: translateY(-16px) rotate(5deg); }
}

.welcome-content {
    position: relative;
    z-index: 1;
}

.welcome-greeting {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 8px rgba(255, 107, 138, 0.3);
    margin-bottom: 8px;
}

.welcome-age {
    font-size: 1.6rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 10px rgba(255, 107, 138, 0.35);
    margin-bottom: 16px;
}

.welcome-age strong {
    font-size: 2rem;
    display: inline-block;
    background: rgba(255,255,255,0.25);
    padding: 4px 12px;
    border-radius: 20px;
    margin: 0 4px;
}

.welcome-stats-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.welcome-stat-mini {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.3);
    padding: 6px 8px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    backdrop-filter: blur(4px);
}

.ws-icon { font-size: 1.1rem; }

/* ---- Dashboard Two-Column ---- */
.dash-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

.dash-col-left,
.dash-col-right {
    min-width: 0;
}

/* ---- Growth Stat Row ---- */
.growth-stat-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.growth-stat-item {
    text-align: center;
    flex: 1;
    min-width: 80px;
}

.gs-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--pink-dark);
    line-height: 1.3;
}

.gs-unit {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.gs-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ---- Wishes ---- */
.wish-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: white;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.2s;
    border-left: 4px solid var(--pink-light);
}

.wish-item.fulfilled {
    opacity: 0.7;
    border-left-color: var(--green);
}

.wish-item.fulfilled .wish-content {
    text-decoration: line-through;
    color: var(--text-muted);
}

.wish-content { flex: 1; font-size: 0.95rem; }
.wish-actions { display: flex; gap: 4px; flex-shrink: 0; }

.wish-check {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 2px solid var(--pink-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: transparent;
    transition: all 0.2s;
    flex-shrink: 0;
}

.wish-check:hover { border-color: var(--green); }
.wish-item.fulfilled .wish-check {
    background: var(--green);
    border-color: var(--green);
    color: white;
}

/* ---- Albums ---- */
.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.album-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.album-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    color: inherit;
}

.album-cover {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    background: var(--pink-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--pink-light);
}

.album-info { padding: 14px 16px; }
.album-name { font-weight: 700; font-size: 0.95rem; color: var(--text-dark); }
.album-desc { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }
.album-meta { font-size: 0.78rem; color: var(--pink-primary); margin-top: 6px; }

/* ---- Gallery / Photo Grid ---- */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
}

.photo-thumb {
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.25s;
    background: var(--pink-bg);
    width: 100%;
}

.photo-thumb:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(255,107,138,0.25);
}

.photo-video-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.55);
    color: white;
    border-radius: 50%;
    width: 32px; height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    pointer-events: none;
}

.photo-thumb-wrap {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

/* ---- Carousel Overlay ("风箱"风格) ---- */
.carousel-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.92);
    display: flex;
    flex-direction: column;
    touch-action: pan-y;
}

.carousel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    color: white;
    z-index: 2;
}

.carousel-counter {
    font-weight: 700;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.15);
    padding: 6px 14px;
    border-radius: 20px;
}

.carousel-close {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.15);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.carousel-close:hover { background: rgba(255,255,255,0.3); }

.carousel-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-slide img,
.carousel-slide video {
    max-width: 95vw;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    user-select: none;
    -webkit-user-drag: none;
}

.carousel-slide video {
    max-height: 60vh;
    outline: none;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px; height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.15);
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.carousel-nav:hover { background: rgba(255,255,255,0.3); }
.carousel-nav.prev { left: 16px; }
.carousel-nav.next { right: 16px; }

/* 底部缩略图条（风箱风格） */
.carousel-thumb-strip {
    display: flex;
    gap: 4px;
    padding: 10px 16px;
    overflow-x: auto;
    justify-content: center;
    align-items: flex-end;
    z-index: 2;
    -webkit-overflow-scrolling: touch;
}

.carousel-thumb-strip::-webkit-scrollbar { display: none; }

.carousel-thumb-item {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s;
    border: 2px solid transparent;
    background: rgba(255,255,255,0.1);
}

.carousel-thumb-item.active {
    width: 64px;
    height: 64px;
    opacity: 1;
    border-color: var(--pink-primary);
}

.carousel-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---- Growth ---- */
.chart-container {
    position: relative;
    width: 100%;
    background: white;
    border-radius: var(--radius);
    padding: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 10px;
}

.chart-container canvas { width: 100% !important; }

.growth-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.growth-table th, .growth-table td { padding: 10px 12px; text-align: center; }
.growth-table th { background: var(--pink-bg); color: var(--pink-dark); font-weight: 700; border-radius: 0px 0px 0 0; }
.growth-table td { border-bottom: 1px solid var(--pink-accent); text-align: center;}
.growth-table tr:hover td { background: var(--pink-bg); }

/* ---- Diary ---- */
.diary-entry {
    background: white;
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 14px;
    box-shadow: var(--shadow);
    position: relative;
}

.diary-date {
    font-size: 0.82rem;
    color: var(--pink-primary);
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.diary-mood { font-size: 1.3rem; }

.diary-content {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-dark);
    white-space: pre-wrap;
}

.diary-actions {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.diary-entry:hover .diary-actions { opacity: 1; }

/* ---- Vaccine ---- */
.vax-timeline {
    position: relative;
    padding-left: 28px;
}

.vax-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--pink-light);
}

.vax-item {
    position: relative;
    padding: 14px 16px;
    background: white;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.vax-item::before {
    content: '';
    position: absolute;
    left: -22px;
    top: 18px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--pink-light);
    border: 2px solid white;
}

.vax-item.completed::before { background: var(--green); }
.vax-item.scheduled::before { background: var(--yellow); }
.vax-item.overdue::before { background: #ff6b6b; }

.vax-name { font-weight: 700; color: var(--text-dark); }
.vax-date { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; }
.vax-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 6px;
}

.vax-badge.completed { background: #d4edda; color: #155724; }
.vax-badge.scheduled { background: #fff3cd; color: #856404; }
.vax-badge.overdue { background: #f8d7da; color: #721c24; }

/* ---- Toast ---- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: white;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    font-weight: 600;
    font-size: 0.9rem;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.5s forwards;
    max-width: 360px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast.success { border-left: 4px solid var(--green); }
.toast.error { border-left: 4px solid #ff6b6b; }

@keyframes toastIn { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-20px); } }

/* ---- Modal ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-dialog {
    background: white;
    border-radius: var(--radius);
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--pink-accent);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--text-dark);
}

.modal-body { padding: 20px; }
.modal-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--pink-accent);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ---- Upload Zone ---- */
.upload-zone {
    border: 2px dashed var(--pink-light);
    border-radius: var(--radius);
    padding: 36px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s;
    background: var(--pink-bg);
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--pink-primary);
    background: white;
}

.upload-zone i { font-size: 2.5rem; color: var(--pink-light); margin-bottom: 8px; }
.upload-zone p { margin: 0; color: var(--text-muted); font-weight: 700; font-size: 0.9rem; }
.upload-zone small { color: var(--pink-primary); }

/* ---- Progress Bar ---- */
.progress-bar {
    height: 8px;
    background: var(--pink-accent);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 12px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--pink-primary), var(--pink-dark));
    border-radius: 4px;
    transition: width 0.3s;
    width: 0%;
}

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.empty-state i { font-size: 3.5rem; color: var(--pink-light); margin-bottom: 12px; }
.empty-state p { font-weight: 700; font-size: 0.95rem; margin: 0; }

/* ---- Tabs ---- */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: white;
    padding: 4px;
    border-radius: 25px;
    box-shadow: var(--shadow);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-btn {
    flex: 1;
    min-width: fit-content;
    padding: 10px 20px;
    border: none;
    border-radius: 22px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    background: transparent;
    color: var(--text-muted);
    transition: all 0.25s;
    font-family: inherit;
    white-space: nowrap;
}

.tab-btn.active {
    background: var(--pink-bg);
    color: var(--pink-dark);
}

/* ---- Mood Picker ---- */
.mood-picker {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.mood-btn {
    width: 48px; height: 48px;
    border-radius: 50%;
    border: 3px solid transparent;
    font-size: 1.6rem;
    cursor: pointer;
    background: var(--pink-bg);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mood-btn:hover { transform: scale(1.1); }
.mood-btn.selected { border-color: var(--pink-primary); background: white; transform: scale(1.1); }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .navbar-desktop { display: none; }
    .bottom-nav { display: block; }

    .page-wrapper {
        padding: 16px 12px;
        padding-bottom: calc(16px + var(--bottom-nav-height));
    }

    .page-title { font-size: 1.3rem; }

    .dash-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .album-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .photo-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }

    .carousel-nav { display: none; }
    .carousel-thumb-item { width: 36px; height: 36px; }
    .carousel-thumb-item.active { width: 48px; height: 48px; }

    .diary-actions { opacity: 1; }
    .diary-actions .btn-icon { width: 30px; height: 30px; font-size: 0.85rem; }

    .growth-table { font-size: 0.78rem; }
    .growth-table th, .growth-table td { padding: 6px 8px; text-align: center;}

    .dash-two-col {
        grid-template-columns: 1fr;
    }

    .welcome-banner {
        padding: 20px 18px;
    }

    .welcome-greeting { font-size: 1.1rem; }
    .welcome-age { font-size: 1.2rem; }
    .welcome-age strong { font-size: 1.5rem; }

    .growth-stat-row { gap: 12px; }
    .gs-value { font-size: 1.4rem; }
}

@media (max-width: 375px) {
    .dash-grid { grid-template-columns: 1fr; }
    .photo-grid { grid-template-columns: repeat(2, 1fr); }
}
