/* ====================================
   CSS Variables & Foundation
   ==================================== */

:root {
    /* Colors — matched to Figma styleguide */
    --bg-cream: #F1F2EC;
    /* Figma bg-light / welcome bg */
    --bg-light-cream: #F1F2EC;
    --btn-sage: #8C8F7A;
    /* main-button-color */
    --btn-sage-hover: #7A7D6A;
    --text-dark: #11142D;
    /* lighttext-colortitle */
    --text-muted: #6B5E53;
    /* brown body text */
    --footer-bg: #6B5E53;
    /* footer brown */
    --border-color: #8C8F7A;
    /* strok-card */
    --card-stroke: rgba(229, 222, 212, 1);
    /* strok-card */
    --stroke: rgba(230, 234, 237, 1);
    /* stroke */
    --drop-shadow: 0px 8px 24px 0px rgba(0, 0, 0, 0.08);

    /* Typography */
    --font-serif: 'Playfair Display', 'Georgia', serif;
    --font-sans: 'Inter', 'Segoe UI', sans-serif;
    --font-lora: 'Playfair Display', serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* Transitions */
    --transition: all 0.3s ease-in-out;
}

/* ====================================
   Global Styles
   ==================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    background-color: var(--bg-cream);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-serif);
    font-weight: 700;
    color: var(--text-dark);
}

a {
    color: var(--text-dark);
    transition: var(--transition);
}

/* ====================================
   Hero Section — Figma Welcome Screen
   ==================================== */

.hero-section {
    background-color: var(--bg-cream);
    overflow: hidden;
    min-height: 100vh;
}

/* Left column: full-bleed image, no padding, no rounding */
.hero-image-col {
    padding: 0;
    overflow: hidden;
    min-height: 100vh;
    position: relative;
}

.hero-image-wrapper {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* The actual <img> fills the full left panel */
.hero-image {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Fallback gradient shown when hero image file is missing */
.hero-image-placeholder {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    background: linear-gradient(160deg, #D8DDCE 0%, #C9CEBD 40%, #B8BEA6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image-placeholder svg {
    opacity: 0.4;
    width: 120px;
    height: 120px;
}

/* Right column: content area — footer lives inside at the bottom */
.hero-content-col {
    background-color: var(--bg-cream);
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 100vh;
}

/* Scrollable inner content — fills all space above the footer */
.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl) var(--spacing-xl);
    max-width: 100%;
    width: 100%;
    text-align: center;
}

/* Footer anchored to the bottom of the right column */
.hero-content-col>.footer {
    flex-shrink: 0;
    width: 100%;
    margin: 0 !important;
}

/* Auth / register column — left-aligned form, matches onboarding layout */
.auth-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl) var(--spacing-xl);
    max-width: 100%;
    width: 100%;
    text-align: left;
}

.auth-content .logo-container {
    justify-content: flex-start;
}

.auth-content .hero-title {
    text-align: left;
}

.auth-content .hero-subtitle {
    text-align: left;
}

/* ====================================
   Logo
   ==================================== */

.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-xl);
}

/* Actual PNG logo */
.logo-img {
    width: 160px;
    height: 160px;
    object-fit: contain;
    /* If PNG has dark/black background, clip to circle */
    border-radius: 50%;
    display: block;
}

/* Text fallback (no image file) */
.logo-text-fallback {
    font-family: var(--font-serif);
    font-size: 26px;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: 1px;
}

/* Navbar brand text logo */
.logo-text {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: 1px;
}

/* ====================================
   Hero Text
   ==================================== */

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(22px, 2.2vw, 36px);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
    letter-spacing: -0.3px;
    white-space: nowrap;
}

.hero-subtitle {
    font-family: var(--font-sans);
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: var(--spacing-sm);
    line-height: 1.75;
    font-weight: 400;
    letter-spacing: 0.3px;
    max-width: 100%;
}

.hero-quote {
    margin: var(--spacing-md) 0 var(--spacing-lg);
    border: none;
    padding: 0;
}

.quote-text {
    font-family: var(--font-serif);
    font-size: clamp(14px, 1.6vw, 30px);
    font-style: italic;
    color: var(--text-muted);
    font-weight: 700;
    line-height: 1.65;
    letter-spacing: 0.2px;
    margin: 0 auto;
    max-width: 80%;
}

/* ====================================
   Buttons
   ==================================== */

.btn {
    font-family: var(--font-sans);
    font-weight: 400;
    border-radius: 8px;
    border: none;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--btn-sage);
    color: #FFFFFF;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--btn-sage-hover);
    color: #FFFFFF;
    box-shadow: 0 6px 20px rgba(140, 143, 122, 0.3);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 12px 36px;
    font-size: 18px;
}

/* ====================================
   Navigation
   ==================================== */

.navbar {
    background-color: #FFFFFF !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark) !important;
}

.nav-link {
    font-family: var(--font-sans);
    font-weight: 500;
    color: var(--text-dark) !important;
    margin-left: var(--spacing-md);
}

.nav-link:hover {
    color: var(--btn-sage) !important;
}

/* ====================================
   Footer — matches Figma test design
   ==================================== */

.footer {
    background-color: #6B5E53;
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.footer-inner {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.footer-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.footer p,
.footer-inner p {
    font-family: 'Inter', Helvetica, sans-serif;
    font-weight: 400;
    color: #FFFFFF;
    font-size: 14px;
    letter-spacing: 0;
    line-height: 24px;
    white-space: nowrap;
    margin: 0;
}


/* Legacy selector kept for backward compat */
.footer-content {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: 22%;
}

.footer-content p {
    font-family: 'Inter', Helvetica, sans-serif;
    font-weight: 400;
    color: #FFFFFF;
    font-size: 14px;
    letter-spacing: 0;
    line-height: 24px;
    white-space: nowrap;
    margin: 0;
}

.shield-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #FFFFFF;
}

/* ====================================
   Add-Photo Screen
   ==================================== */

/* Right column variant — inherits flex-column from hero-content-col */
.add-photo-col {
    background-color: var(--bg-cream);
    padding: 0;
}

.add-photo-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 10rem;
    max-width: 100%;
    width: 100%;
    text-align: center;
    animation: fadeIn 0.6s ease-in-out;
}

/* Upload drop zone */
.upload-zone {
    border: 1px dashed var(--btn-sage);
    border-radius: 4px;
    background-color: var(--bg-cream);
    padding: var(--spacing-lg) var(--spacing-md);
    cursor: pointer;
    transition: border-color 0.25s, background-color 0.25s;
}

.upload-zone:hover,
.upload-zone--active {
    border-color: var(--btn-sage);
    background-color: #F4F6F0;
}

.upload-zone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.upload-icon {
    color: var(--btn-sage);
    opacity: 0.75;
}

.upload-title {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.upload-hint {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.upload-format {
    font-family: var(--font-sans);
    font-size: 12px;
    color: #999;
}

/* Left-align form labels in add-photo form */
.add-photo-content .form-label {
    text-align: left;
    display: block;
}

form#addPhotoForm button.btn.btn-primary.btn-lg.px-5 {
    float: right;
}

.add-photo-content .form-control {
    text-align: left;
}

/* ====================================
   Capture-Voice Screen
   ==================================== */

.voice-col {
    background-color: var(--bg-cream);
    padding: 0;
}

.voice-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 10rem;
    max-width: 100%;
    width: 100%;
    text-align: center;
    animation: fadeIn 0.6s ease-in-out;
}

/* Dashed recording card */
.voice-card {
    width: 75%;
    background-color: var(--bg-cream);
    border: 2px dashed var(--btn-sage);
    border-radius: 4px;
    padding: 28px 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Smaller logo variant (capture-voice, etc.) */
.logo-img--sm {
    width: 100px;
    height: 100px;
}

.voice-prompt {
    font-family: var(--font-sans);
    font-size: 18px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.54px;
}

/* Outlined action buttons (Record / Upload) */
.btn-voice-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 34px;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 600;
    color: var(--btn-sage);
    background-color: transparent;
    border: 1px solid var(--btn-sage);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-voice-outline:hover {
    border-color: var(--btn-sage-hover);
    color: var(--btn-sage-hover);
    background-color: rgba(140, 143, 122, 0.08);
}

.btn-voice-outline:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Skip link */
.voice-skip {
    font-family: var(--font-sans);
    font-size: 15px;
    color: var(--text-muted);
    text-decoration: none;
}

.voice-skip:hover {
    color: var(--text-dark);
    text-decoration: underline;
}

/* Recording status bar */
.recording-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-size: 14px;
    color: #C0392B;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 8px;
    padding: 8px 16px;
}

.recording-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #C0392B;
    animation: blink 1s infinite;
    flex-shrink: 0;
}

.recording-label {
    font-weight: 600;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.2;
    }
}

/* ====================================
   Memory Preview / Reveal Screen
   ==================================== */

.preview-col {
    background-color: var(--bg-cream);
    padding: 0;
}

.preview-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 6rem;
    max-width: 100%;
    width: 100%;
    text-align: center;
    animation: fadeIn 0.6s ease-in-out;
}

/* ══════════════════════════════════════════
   Realistic Open Book
   ══════════════════════════════════════════ */

/* Outer book frame — the physical cover/binding */
.open-book {
    position: relative;
    border-radius: 6px 8px 8px 6px;
    background: linear-gradient(160deg, #8A8768 0%, #7A7659 40%, #6E6A4F 100%);
    padding: 10px 12px 14px 16px;
    box-shadow:
        -5px 2px 14px rgba(0, 0, 0, 0.28),
        3px 5px 18px rgba(0, 0, 0, 0.20),
        0 10px 36px rgba(0, 0, 0, 0.14);
}

/* Binding curve at the top centre */
.book-binding {
    position: absolute;
    top: -2px;
    left: 35%;
    right: 35%;
    height: 14px;
    background: linear-gradient(to bottom, #5A5740 0%, #4E4C37 60%, #6E6A4F 100%);
    border-radius: 0 0 60% 60%;
    z-index: 3;
}

/* Inner pages container */
.book-pages {
    display: flex;
    background: #F4F2EC;
    border-radius: 3px 5px 5px 3px;
    min-height: 210px;
    overflow: hidden;
    position: relative;
}

/* Individual page */
.book-page {
    flex: 1;
    padding: 16px 14px 14px;
}

.book-left {
    background: #FAFAF6;
    text-align: left;
}

.book-right {
    background: #F5F3EC;
}

/* Spine gutter between pages */
.book-gutter {
    width: 10px;
    flex-shrink: 0;
    background: linear-gradient(to right,
            rgba(0, 0, 0, 0.09) 0%,
            rgba(0, 0, 0, 0.03) 45%,
            rgba(0, 0, 0, 0.03) 55%,
            rgba(0, 0, 0, 0.09) 100%);
    position: relative;
}

.book-gutter::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 8%;
    bottom: 8%;
    width: 1px;
    background: rgba(0, 0, 0, 0.10);
    transform: translateX(-50%);
}

/* ── Left page typography ─── */
.bk-story-name {
    font-family: var(--font-serif);
    font-size: 14px;
    font-weight: 700;
    color: #1E1E1E;
    margin-bottom: 6px;
    line-height: 1.25;
}

.bk-entry-title {
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    color: #2C2C2C;
    margin-bottom: 4px;
}

.bk-meta {
    font-family: var(--font-sans);
    font-size: 11px;
    color: #777;
    margin-bottom: 3px;
    line-height: 1.4;
}

.bk-desc {
    font-family: var(--font-sans);
    font-size: 11px;
    color: #555;
    line-height: 1.55;
    margin-top: 8px;
    margin-bottom: 10px;
}

/* Media badges */
.bk-badges {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bk-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-sans);
    font-size: 10.5px;
    color: #5E6248;
    background: #EEEEE6;
    border: 1px solid #D8D9CC;
    border-radius: 20px;
    padding: 3px 10px;
    width: fit-content;
}

/* ── Right page photo collage ─── */
.bk-collage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 5px;
    height: 100%;
    min-height: 178px;
}

.bk-photo {
    border-radius: 4px;
    overflow: hidden;
    background: #DDD9CE;
}

.bk-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Main photo spans both rows (3-photo layout) */
.bk-photo-main {
    grid-row: 1 / 3;
}

.bk-photo-sm {
    /* natural second column slots */
}

/* ── Collage layout variants driven by data-count ─── */

/* 1 photo: single full-width cell */
.bk-collage[data-count="1"] {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

/* 2 photos: two equal columns, one row */
.bk-collage[data-count="2"] {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
}

.bk-collage[data-count="2"] .bk-photo-main {
    grid-row: 1;
}

/* 3 photos: left main spans 2 rows, right column has 2 stacked */
.bk-collage[data-count="3"] {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

/* 4+ photos: 2×2 grid, no main cell */
.bk-collage[data-count="4"] {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.bk-collage[data-count="4"] .bk-photo-main {
    grid-row: 1;
}

/* Overlay for "+N more" on last cell */
.bk-photo {
    position: relative;
}

.bk-photo-more {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    border-radius: 4px;
}

/* ── Drop zone hint area (onboarding add-photo) ─── */
.um-drop-zone {
    border: 2px dashed var(--btn-sage) !important;
    border-radius: 4px;
    min-height: 160px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    background: transparent !important;
}

.um-drop-zone.upload-zone--active {
    border-color: var(--btn-sage);
    background: rgba(140, 143, 122, 0.06);
}

.um-drop-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
    text-align: center;
}

.um-drop-hint .upload-icon {
    color: var(--btn-sage);
}

.um-drop-hint .upload-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #6B5E53;
}

.um-drop-hint .upload-hint {
    font-size: 1rem;
    color: #646B72;
}

.um-drop-hint .upload-format {
    font-size: 0.9rem;
    color: #646B72;
}

/* Right page placeholder (no photo uploaded) */
.bk-placeholder {
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
}

.bk-ph-line {
    height: 8px;
    background: #E0DDD5;
    border-radius: 4px;
}

.bk-ph-wide {
    width: 90%;
}

.bk-ph-med {
    width: 70%;
}

.bk-ph-short {
    width: 50%;
}

.bk-ph-box {
    flex: 1;
    background: #E8E5DC;
    border-radius: 6px;
    min-height: 80px;
}

/* ── Confirmation & Progress ──────────── */

/* ====================================
   Reveal / Memory Preview — book + stacked thumbnails
   Matches test 4-Reveal.html design
   ==================================== */

.reveal-wrap {
    position: relative;
    width: 100%;
}

.reveal-book-img {
    margin: 0;
    width: 100%;
    line-height: 0;
}

.reveal-book-img img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* Left page: real memory text, laid out over the blank book graphic
   (percentage-based, same pattern as .ft-new-book-container in yearbook/show.php) */
.reveal-left-page {
    position: absolute;
    top: 9%;
    left: 9%;
    width: 36%;
    height: 78%;
    box-sizing: border-box;
    overflow: hidden;
    text-align: left;
}

.reveal-left-overline {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 700;
    color: #161A30;
    margin: 0 0 10px;
    line-height: 1.25;
}

.reveal-left-title {
    font-family: var(--font-sans);
    font-size: 20px;
    font-weight: 600;
    color: #6C6656;
    margin: 0 0 10px;
    line-height: 1.3;
}

.reveal-left-subtitle {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0 0 6px;
}

.reveal-left-meta {
    font-family: var(--font-sans);
    font-size: 14px;
    color: #6C6656;
    margin: 0 0 14px;
}

.reveal-left-desc {
    font-family: var(--font-sans);
    font-size: 14px;
    color: #6C6656;
    line-height: 1.5;
    margin: 0 0 16px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.reveal-left-badges {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reveal-left-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-sans);
    font-size: 14px;
    color: #6C6656;
}

.reveal-left-badge-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #EFEEEA;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Three stacked photo thumbnails on the right page, vertically centered
   in the page area and cascading slightly left/right. Percentage-based
   (not fixed px) so they scale with the fluid book image instead of
   overflowing it at narrower widths. */
.reveal-photo-stack {
    position: absolute;
    right: 15%;
    top: 5%;
    bottom: 19%;
    width: 26%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 1%;

}

.reveal-photo {
    width: 85%;
    aspect-ratio: 19 / 14;
    object-fit: cover;
    border: 2.5px solid #ffffff;
    box-shadow: 0px 4px 14px rgba(0, 0, 0, 0.18);
    border-radius: 2px;
    display: block;
}

/* Second photo shifts right — matches original rectangle-2 offset */
.reveal-photo--2 {
    align-self: flex-end;
}

.preview-confirm {
    font-family: var(--font-sans);
    font-size: 15px;
    color: var(--text-muted);
    text-align: center;
    letter-spacing: 0.45px;
    line-height: 28px;
}

.yearbook-progress-wrap {
    text-align: left;
    width: 65%;
}

.yearbook-progress-label {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
}

.yearbook-progress-count {
    font-family: var(--font-sans);
    font-size: 15px;
    color: var(--text-muted);
}

.yearbook-progress-bar {
    height: 12px;
    background-color: #E4E6DC;
    border-radius: 99px;
    overflow: hidden;
}

.yearbook-bar-fill {
    background-color: var(--btn-sage);
    border-radius: 99px;
    transition: width 1s ease;
}

/* ====================================
   Account Setup Screen
   ==================================== */

.setup-col {
    background-color: var(--bg-cream);
    padding: var(--spacing-xl) var(--spacing-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.setup-content {
    max-width: 460px;
    width: 100%;
    text-align: center;
    animation: fadeIn 0.6s ease-in-out;
}

/* "You just captured a Memory from child, age x" */
.setup-captured {
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Dashed-border form card */
.setup-form-card {
    border: 1px dashed var(--btn-sage);
    border-radius: 4px;
    padding: 24px 22px 20px;
    background: var(--bg-cream);
}

.setup-form-intro {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
}

/* Reminders toggle row */
.setup-reminder-row {
    text-align: left;
}

.setup-toggle {
    width: 42px;
    height: 24px;
    cursor: pointer;
    flex-shrink: 0;
}

.setup-toggle:checked {
    background-color: var(--btn-sage);
    border-color: var(--btn-sage);
}

.setup-toggle-title {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
}

.setup-toggle-desc {
    font-family: var(--font-sans);
    font-size: 12px;
    color: var(--text-muted);
}

/* "Or Sign up with" */
.setup-or {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--text-muted);
    position: relative;
}

/* Social icon buttons */
.btn-social {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1.5px solid #D8DAD0;
    background: #FFFFFF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
    color: #333;
}

.btn-social:hover {
    border-color: var(--btn-sage);
    background-color: #F4F6F0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ====================================
   Forms
   ==================================== */

.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    font-family: var(--font-sans);
    font-size: 16px;
    color: #9A9AB0 !important;
    transition: var(--transition);
    background-color: transparent !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--btn-sage);
    box-shadow: 0 0 0 0.2rem rgba(140, 143, 122, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-family: var(--font-sans);
}

/* ====================================
   Flash / Alert Messages
   ==================================== */

.alert {
    border-radius: 8px;
    border: none;
    font-family: var(--font-sans);
}

.alert-success {
    background-color: #D4EDDA;
    color: #155724;
}

.alert-danger {
    background-color: #F8D7DA;
    color: #721C24;
}

.alert-warning {
    background-color: #FFF3CD;
    color: #856404;
}

.alert-info {
    background-color: #D1ECF1;
    color: #0C5460;
}

/* ====================================
   Auth Pages (login / register)
   ==================================== */

.auth-page {
    background-color: var(--bg-cream);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-page .container {
    flex: 1;
}

.auth-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: var(--spacing-2xl) var(--spacing-xl);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
}

/* ====================================
   Dashboard Cards
   ==================================== */

.card {
    border-radius: 12px !important;
    border: 1px solid var(--border-color) !important;
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-2px);
}

/* ====================================
   Responsive — Tablet (≤991px)
   ==================================== */

@media (max-width: 991.98px) {

    /* Both hero panels stack vertically */
    .hero-image-col {
        min-height: 42vh;
        order: 0;
    }

    .hero-image,
    .hero-image-wrapper,
    .hero-image-placeholder {
        min-height: 42vh;
    }

    .hero-content-col,
    .add-photo-col,
    .voice-col,
    .preview-col,
    .setup-col {
        padding: var(--spacing-xl) var(--spacing-lg);
        min-height: auto;
        order: 1;
    }

    .hero-title {
        font-size: 32px;
    }

    .quote-text {
        font-size: 18px;
    }

    /* Navbar compact */
    .navbar .container-fluid {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }

    /* Auth card full-width */
    .auth-card {
        max-width: 100% !important;
        padding: var(--spacing-xl) var(--spacing-lg);
    }

    /* Dashboard grid */
    .dashboard-grid .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* ====================================
   Responsive — Mobile (≤576px)
   ==================================== */

@media (max-width: 575.98px) {

    /* Panels */
    .hero-image-col {
        min-height: 240px;
    }

    .hero-image,
    .hero-image-wrapper,
    .hero-image-placeholder {
        min-height: 240px;
    }

    .hero-content-col,
    .add-photo-col,
    .voice-col,
    .preview-col,
    .setup-col {
        padding: var(--spacing-lg) var(--spacing-md);
        min-height: auto;
    }

    .hero-content,
    .add-photo-content,
    .voice-content,
    .preview-content,
    .setup-content {
        text-align: center;
        max-width: 100%;
    }

    /* Typography */
    .hero-title {
        font-size: 24px;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    .quote-text {
        font-size: 15px;
    }

    /* Logo */
    .logo-img {
        width: 90px;
        height: 90px;
    }

    .logo-container {
        margin-bottom: var(--spacing-md);
    }

    /* Buttons */
    .btn-lg {
        padding: 10px 20px;
        font-size: 15px;
    }

    .hero-content .btn-lg {
        width: 100%;
    }

    /* Upload zone */
    .upload-zone {
        padding: var(--spacing-md) var(--spacing-sm);
    }

    .upload-icon {
        width: 36px;
        height: 36px;
    }

    /* Auth card */
    .auth-card {
        padding: var(--spacing-lg) var(--spacing-md);
        border-radius: 12px;
    }

    /* Footer */
    .footer-content {
        font-size: 13px;
        flex-direction: column;
        text-align: center;
        gap: 0.4rem;
    }

    /* Dashboard: single column */
    .dashboard-grid .col-md-6,
    .dashboard-grid .col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Form elements */
    .form-control,
    .form-select {
        font-size: 15px;
    }

    /* Book stacks on mobile */
    .book-pages {
        flex-direction: column;
    }

    .book-gutter {
        width: 100%;
        height: 8px;
    }

    .book-gutter::after {
        display: none;
    }

    .bk-collage {
        min-height: 120px;
        grid-template-rows: 60px 60px;
    }

    .book-binding {
        left: 30%;
        right: 30%;
    }
}

/* ====================================
   Responsive — Small Mobile (≤375px)
   ==================================== */

@media (max-width: 375px) {
    .hero-title {
        font-size: 22px;
    }

    .logo-img {
        width: 78px;
        height: 78px;
    }
}

/* ====================================
   Animations
   ==================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    animation: fadeIn 0.6s ease-in-out;
}

/* ====================================
   Utilities
   ==================================== */

.text-muted {
    color: var(--text-muted) !important;
}

.fw-semibold {
    font-weight: 600;
}

.min-vh-100 {
    min-height: 100vh;
}

/* ====================================
   Print
   ==================================== */

@media print {

    .navbar,
    .footer {
        display: none;
    }
}

/* ====================================
   Memory Saved Screen
   ==================================== */

.saved-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl) var(--spacing-xl);
    max-width: 100%;
    width: 100%;
    text-align: center;
    animation: fadeIn 0.6s ease-in-out;
}

.saved-title {
    font-family: var(--font-serif);
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0;
    line-height: 1.15;
}

.saved-ornament {
    font-size: 14px;
    color: var(--btn-sage);
    margin: 6px 0 10px;
    letter-spacing: 4px;
}

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

.divider-bottom {
    border: 1px solid #8C8F7A;
    width: 53%;
    margin: 30px 0px 40px 0px;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 2px;
    background: #8C8F7A;
    border: 2px solid 8C8F7A;
    width: 200px;
}

.icon {
    width: 30px;
    height: 30px;
    background: #8a8f7a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 10px;
    font-size: 14px;
}

.saved-child-name {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.saved-date {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.saved-tagline {
    font-family: "Poppins";
    font-size: 18px;

    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Memory card — horizontal thumbnail + details */
.saved-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #FAFAF7;
    border: 1.5px solid #E2E4DA;
    border-radius: 12px;
    padding: 12px 16px;
    text-align: left;
    margin-bottom: 20px;
    width: 50%;
}

.saved-card-thumb {
    width: 91px;
    height: 91px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.saved-card-thumb-placeholder {
    width: 56px;
    height: 56px;
    background: #E8E5DC;
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #A6A192;
}

.saved-card-name {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 600;
    color: #8C8F7A;
    margin-bottom: 3px;
}

.saved-card-badge {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 500;
    color: var(--btn-sage);
    background: rgba(140, 143, 122, 0.1);
    border-radius: 20px;
    padding: 2px 10px;
    margin-bottom: 4px;
}

.saved-card-desc {
    font-family: var(--font-sans);
    font-size: 10px;
    color: var(--text-muted);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 260px;
}

.saved-add-label {
    font-family: var(--font-sans);
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

/* Two side-by-side outline buttons */
.saved-btn-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    width: 50%;
}

.btn-outline-sage {
    flex: 1;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 500;
    color: var(--btn-sage);
    background: transparent;
    border: 1px solid var(--btn-sage);
    border-radius: 6px;
    padding: 10px 14px;
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
    display: block;
    letter-spacing: 0.08px;
}

.btn-outline-sage:hover {
    border-color: var(--btn-sage-hover);
    color: var(--btn-sage-hover);
    background: rgba(140, 143, 122, 0.08);
}

.saved-content a.btn.btn-primary.btn-lg.w-100 {
    width: 50% !important;
    background: #6B5E53;
}

/* ====================================
   Dashboard Layout
   ==================================== */

.db-body {
    background: var(--bg-cream);
}

.db-wrapper {
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Sidebar ── */
.db-sidebar {
    width: 250px;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: #F8F3EB;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 200;
}

.db-sidebar-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px 10px 16px;
    border-bottom: 1px solid var(--border-color);
    gap: 6px;
}

.db-brand-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 50%;
}

.db-brand-text {
    font-family: var(--font-serif);
    font-size: 24.5px;
    font-weight: 700;
    color: #838571;
    text-align: center;
    line-height: 1.3;
    letter-spacing: 0.3px;
}

.db-nav {
    display: flex;
    flex-direction: column;
    padding: 12px 8px;
    gap: 2px;
    flex: 1;
}

.db-nav-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 6px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-muted);
    transition: all 0.2s ease;
    cursor: pointer;
}

.db-nav-item:hover {
    background: rgba(140, 143, 122, 0.1);
    color: var(--btn-sage);
}

.db-nav-item.active {
    background: rgba(140, 143, 122, 0.15);
    color: var(--btn-sage);
}

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

.db-nav-label {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 400;
    text-align: left;
    line-height: 1.3;
}

/* ── Main area ── */
.db-main {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    flex: 1;
    margin-left: 250px;
    min-width: 0;
    background-color: #F8F8F4; /* Changed to match admin-db-content to avoid weird cutoffs */
}

/* ── Top nav ── */
.db-topnav {
    background: #F8F3EB;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.db-search-wrap {
    position: relative;
    flex: 1;
    max-width: 280px;
}

.db-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

.db-search-input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1.5px solid #E4E6DC;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 13px;
    background: #FAFAF7;
    color: var(--text-dark);
    outline: none;
    transition: border-color 0.2s;
}

.db-search-input:focus {
    border-color: var(--btn-sage);
    background: #fff;
}

.db-topnav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.db-icon-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    cursor: pointer;
    transition: background 0.2s;
}

.db-icon-btn:hover {
    background: #F4F6F0;
    color: var(--btn-sage);
}

.db-user-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px 5px 5px;
    border: 1.5px solid #E4E6DC;
    border-radius: 999px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.db-user-pill:hover {
    border-color: var(--btn-sage);
}

.db-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--btn-sage);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.db-user-name {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    white-space: nowrap;
}

/* ── Content area ── */
.db-content {
    padding: 24px;
    flex: 1;
}

/* ====================================
   Dashboard — Welcome row
   ==================================== */

.db-welcome-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.db-welcome-heading {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.db-filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1.5px solid #D8DAD0;
    border-radius: 8px;
    background: #fff;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    transition: border-color 0.2s;
}

.db-filter-btn:hover {
    border-color: var(--btn-sage);
}

/* ====================================
   Dashboard — Hero Banner
   ==================================== */

.db-hero-banner {
    background: #B7BFAF;
    border-radius: 14px;
    padding: 28px 32px 20px;
    margin-bottom: 18px;
    position: relative;
    overflow: hidden;
}

.db-hero-quote {
    font-family: var(--font-lora);
    font-size: 36px;
    font-style: italic;
    font-weight: 500;
    color: #383838;
    line-height: 1.55;
    margin-bottom: 18px;
    position: relative;
    text-align: center;
}

.db-hero-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    background: #8A7C6A;
    gap: 10px;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 7px;
}

.db-hero-prompt {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #8A7C6A;
    border-radius: 8px;
    padding: 7px 14px;
}

.db-hero-date {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.db-hero-sep {
    color: rgba(255, 255, 255, 0.5);
}

.db-hero-q {
    font-family: var(--font-sans);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
}

.db-hero-arrows {
    display: flex;
    gap: 6px;
    padding: 7px 14px;
}

.db-arrow-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.db-arrow-btn:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* ====================================
   Dashboard — Cards base
   ==================================== */

.db-card {
    background: #FFFFFF;
    border-radius: 14px;
    box-shadow: var(--drop-shadow);
    padding: 20px;
    height: 100%;
}

/* ====================================
   Dashboard — Upload card
   ==================================== */

.db-upload-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 180px;
    gap: 8px;
}

.db-upload-icon {
    width: 60px;
    height: 60px;
    background: rgba(140, 143, 122, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.db-upload-title {
    font-family: var(--font-serif);
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.db-upload-sub {
    font-family: var(--font-sans);
    font-size: 18px;
    color: var(--text-muted);
    margin: 0 0 8px;
}

/* ====================================
   Dashboard — Yearbook card
   ==================================== */

.db-yearbook-card {
    min-height: 180px;
}

.db-yearbook-title {
    font-family: var(--font-serif);
    font-size: 30px;
    font-weight: 700;
    color: #6B5E53;
    margin-bottom: 14px;
}

.db-yearbook-body {
    display: flex;
    align-items: center;
    gap: 16px;
}

.db-donut-wrap {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.db-donut {
    width: 80px;
    height: 80px;
}

.db-donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.db-donut-pct {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
}

.db-donut-lbl {
    font-family: var(--font-sans);
    font-size: 9px;
    color: var(--text-muted);
    line-height: 1.2;
    text-align: center;
}

.db-yk-count {
    font-family: var(--font-sans);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.db-yk-sub {
    font-family: var(--font-sans);
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.db-yk-entry {
    font-family: var(--font-sans);
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* ====================================
   Dashboard — Stat cards
   ==================================== */

.db-stat-card {
    padding: 16px 18px;
}

.db-stat-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 4px;
    padding: 0px 0 15px 0;
}

.db-stat-num {
    font-family: var(--font-serif);
    font-size: 18px;
    width: 60%;
    font-weight: 700;
    color: #6B5E53;
    margin: 0;
    line-height: 30px;
}

.db-stat-title {
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--text-muted);
    margin: 2px 0 0;
}

.db-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.db-stat-icon--blue {
    background: #E8EEF5;
    color: #5B87C5;
}

.db-stat-icon--green {
    background: rgba(140, 143, 122, 0.1);
    color: var(--btn-sage);
}

.db-stat-icon--warm {
    background: #F5EDE8;
    color: #C5845B;
}

.db-stat-sub {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1px;
}

.db-stat-desc {
    font-family: var(--font-sans);
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.db-stat-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid #EAEBE4;
}

.db-stat-growth {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--btn-sage);
}

.db-stat-link {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
}

.db-stat-link:hover {
    color: var(--btn-sage);
}

/* ====================================
   Dashboard — Section title
   ==================================== */

.db-section-title {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

/* ====================================
   Dashboard — Quick Action cards
   ==================================== */

.db-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 0 20px;
    overflow: hidden;
}

.db-action-illustration {
    width: 100%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-bottom: 16px;
    border-radius: 14px 14px 0 0;
    min-height: 160px;
    overflow: hidden;
    border-bottom: 1px solid #E6EAED !important;
}

.db-action-img {
    width: 80%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    border-radius: 14px 14px 0 0;
}

.db-action-title {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 700;
    color: #6B5E53;
    margin-bottom: 12px;
    line-height: 1.4;
    padding: 0 12px;
}

/* ====================================
   Dashboard — Recently Added cards
   ==================================== */

.db-memory-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #EAEBE4;
    overflow: hidden;
}

.db-memory-thumb {
    position: relative;
    width: 100%;
    padding-top: 75%;
    background: #E8EBE2;
    overflow: hidden;
}

.db-memory-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.db-memory-thumb-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #E8EBE2;
}

.db-memory-more {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    background: rgba(255, 255, 255, 0.85);
    border: none;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5px;
    cursor: pointer;
    padding: 0;
}

.db-memory-more span {
    display: block;
    width: 3px;
    height: 3px;
    background: #666;
    border-radius: 50%;
}

.db-memory-info {
    padding: 10px 12px 12px;
}

.db-memory-title {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 600;
    color: #6B5E53;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.db-memory-meta {
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 1px;
}

.db-memory-date {
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.db-memory-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--btn-sage);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.db-empty-state {
    background: #fff;
    border-radius: 12px;
    border: 1.5px dashed #D0D4C8;
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
}

/* ====================================
   Dashboard — Responsive
   ==================================== */

/* Menu Toggle Button styling */
.db-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-dark);
    cursor: pointer;
    padding: 6px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s;
}
.db-menu-toggle:hover {
    background: rgba(140, 143, 122, 0.1);
}
.db-menu-toggle svg {
    width: 22px;
    height: 22px;
}

/* Sidebar Close Button */
.db-sidebar-close {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    padding: 0 5px;
}

/* Sidebar Overlay Scrim */
.db-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}
.db-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 991px) {
    .db-sidebar {
        width: 260px;
        left: -260px;
        transition: left 0.3s ease-in-out;
        z-index: 1050;
    }

    .db-sidebar.active {
        left: 0;
    }

    .db-sidebar-close {
        display: block;
    }

    .db-brand-text,
    .db-nav-label {
        display: block !important;
    }

    .db-sidebar-brand {
        padding-right: 40px; /* Space for close button */
    }

    .db-main {
        width: 100%;
        margin-left: 0;
    }

    .db-body .footer {
        margin-left: 0;
    }

    .db-menu-toggle {
        display: flex;
    }
}

@media (max-width: 576px) {
    .db-content {
        padding: 16px;
    }

    .db-user-name {
        display: none;
    }

    .db-topnav {
        padding: 12px 16px;
        gap: 8px;
    }

    .db-search-wrap {
        max-width: 160px;
    }
}

/* ====================================
   Upload Memory Modal
   ==================================== */

.um-overlay {
    position: fixed;
    inset: 0;
    background: rgba(30, 32, 28, 0.55);
    backdrop-filter: blur(2px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.um-overlay[hidden] {
    display: none;
}

.um-dialog {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    animation: umSlideIn 0.22s ease;
    overflow: hidden;
}

@keyframes umSlideIn {
    from {
        opacity: 0;
        transform: translateY(-16px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header */
.um-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px 16px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.um-title {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.um-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #F4F6F0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #555;
    transition: background 0.15s;
    flex-shrink: 0;
}

.um-close:hover {
    background: #E8EBE2;
    color: var(--text-dark);
}

/* Body */
.um-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Left column */
.um-left {
    width: 240px;
    flex-shrink: 0;
    padding: 20px 16px 20px 20px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.um-drop-zone {
    flex: 1;
    border: 1px dashed var(--btn-sage);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
    overflow: hidden;
    min-height: 240px;
    background: #FAFAF7;
}

.um-drop-zone:hover,
.um-drop-zone--over {
    border-color: var(--btn-sage);
    background: #F4F6F0;
}

.um-drop-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 16px;
    gap: 6px;
}

.um-drop-icon {
    width: 56px;
    height: 56px;
    background: rgba(140, 143, 122, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.um-drop-main {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.5;
}

.um-drop-or {
    font-family: var(--font-sans);
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

.um-browse-link {
    background: none;
    border: none;
    color: var(--btn-sage);
    font-size: 12px;
    font-family: var(--font-sans);
    font-weight: 500;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

.um-drop-meta {
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.um-drop-meta li {
    font-family: var(--font-sans);
    font-size: 10.5px;
    color: #999;
    line-height: 1.4;
}

/* ── Multi-photo grid (replaces single preview) ── */
.um-photo-grid {
    position: absolute;
    inset: 0;
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    align-content: start;
    overflow-y: auto;
}

.um-photo-thumb {
    position: relative;
    aspect-ratio: 1;
    border-radius: 7px;
    overflow: hidden;
    background: #E8EBE2;
}

.um-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.um-vid-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-family: var(--font-sans);
    font-size: 10px;
    color: #666;
    padding: 4px;
    text-align: center;
    word-break: break-all;
}

.um-thumb-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, .55);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background .15s;
}

.um-thumb-remove:hover {
    background: rgba(180, 0, 0, .75);
}

.um-photo-add {
    aspect-ratio: 1;
    border: 2px dashed var(--border-color);
    border-radius: 7px;
    background: #F7F9F5;
    color: #9BAD8C;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-family: var(--font-sans);
    font-size: 10px;
    transition: border-color .15s, background .15s;
}

.um-photo-add:hover {
    border-color: var(--btn-sage);
    background: rgba(140, 143, 122, 0.1);
}

/* Legacy single-preview (kept for any code that may still ref it) */
.um-drop-preview {
    display: none;
}

.um-remove-file {
    display: none;
}

/* Right column */
.um-right {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px 20px 20px;
}

/* Form fields */
.um-field {
    margin-bottom: 14px;
}

.um-label {
    display: block;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 5px;
    letter-spacing: 0.1px;
}

.um-input {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #E0E3D8;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--text-dark);
    background: #FAFAF7;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    resize: none;
}

.um-input:focus {
    border-color: var(--btn-sage);
    background: #fff;
}

.um-input::placeholder {
    color: #b0b0a8;
}

.um-input--error {
    border-color: #c0392b !important;
    background: #fff8f7 !important;
}

.um-textarea {
    min-height: 70px;
    line-height: 1.5;
}

.um-field-hint {
    font-family: var(--font-sans);
    font-size: 10.5px;
    color: #999;
    margin: 4px 0 0;
}

.um-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-sans);
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
    margin-top: 6px;
    user-select: none;
}

.um-checkbox-label input {
    accent-color: var(--btn-sage);
    width: 14px;
    height: 14px;
    cursor: pointer;
}

/* Two-col row */
.um-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

/* Children tags */
.um-children-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.um-child-tag {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    user-select: none;
}

.um-child-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #D4DBC8;
    color: #fff;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    transition: border-color 0.15s, background 0.15s;
}

.um-child-name {
    font-family: var(--font-sans);
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
}

.um-child-tag--selected .um-child-avatar {
    background: var(--btn-sage);
    border-color: var(--btn-sage);
}

.um-child-tag--selected .um-child-name {
    color: var(--btn-sage);
    font-weight: 600;
}

.um-no-children {
    font-family: var(--font-sans);
    font-size: 11.5px;
    color: #aaa;
    font-style: italic;
}

/* Actions */
.um-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 6px;
}

.um-btn-cancel {
    padding: 8px 20px;
    border: 1.5px solid #D0D4C8;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.um-btn-cancel:hover {
    border-color: #999;
    color: var(--text-dark);
}

.um-btn-save {
    padding: 8px 22px;
    background: var(--btn-sage);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.um-btn-save:hover {
    background: var(--btn-sage-hover);
}

/* Responsive */
@media (max-width: 640px) {
    .um-body {
        flex-direction: column;
    }

    .um-left {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #EAEBE4;
        padding: 16px;
    }

    .um-drop-zone {
        min-height: 160px;
    }

    .um-right {
        padding: 16px;
    }

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

/* ====================================
   Memory Library Page
   ==================================== */

.ml-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.ml-main {
    flex: 1;
    min-width: 0;
}

.ml-sidebar {
    width: 220px;
    flex-shrink: 0;
}

.ml-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.ml-heading {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 2px;
}

.ml-subheading {
    font-family: var(--font-sans);
    font-size: 12.5px;
    color: var(--text-muted);
    margin: 0;
}

.ml-upload-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
}

.ml-filter-bar {
    background: #fff;
    border: 1px solid #EAEBE4;
    border-radius: 12px;
    padding: 14px 16px 12px;
    margin-bottom: 20px;
}

.ml-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #F0F1EA;
}

.ml-filter-group {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.ml-filter-btn {
    background: none;
    border: 1.5px solid transparent;
    border-radius: 8px;
    padding: 5px 12px;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all .15s;
}

.ml-filter-btn:hover {
    background: #F4F6F0;
    color: var(--text-dark);
}

.ml-filter-btn.active {
    background: rgba(140, 143, 122, 0.1);
    border-color: var(--border-color);
    color: var(--btn-sage);
    font-weight: 600;
}

.ml-filter-dropdowns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ml-dropdown-wrap {
    position: relative;
}

.ml-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #FAFAF7;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    padding: 5px 10px;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .15s;
}

.ml-dropdown-btn:hover {
    border-color: var(--btn-sage);
}

.ml-dropdown-btn.active {
    border-color: var(--btn-sage);
    color: var(--btn-sage);
    background: rgba(140, 143, 122, 0.1);
}

.ml-dropdown-wrap:hover .ml-dropdown-menu,
.ml-dropdown-wrap:focus-within .ml-dropdown-menu {
    display: block;
}

.ml-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 160px;
    background: #fff;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .1);
    z-index: 300;
    padding: 6px 0;
    overflow: hidden;
}

.ml-dropdown-item {
    display: block;
    padding: 7px 14px;
    font-family: var(--font-sans);
    font-size: 12.5px;
    color: var(--text-dark);
    text-decoration: none;
    cursor: pointer;
    transition: background .12s;
}

.ml-dropdown-item:hover {
    background: #F4F6F0;
}

.ml-dropdown-item.selected {
    color: var(--btn-sage);
    font-weight: 600;
    background: rgba(140, 143, 122, 0.1);
}

.ml-dropdown-empty {
    display: block;
    padding: 7px 14px;
    font-family: var(--font-sans);
    font-size: 12px;
    color: #aaa;
    font-style: italic;
}

.ml-stats-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.ml-stats-count strong {
    color: var(--text-dark);
    font-weight: 600;
}

.ml-stats-sep {
    color: #C0C4B8;
}

.ml-clear-filters {
    margin-left: auto;
    font-size: 12px;
    color: var(--btn-sage);
    text-decoration: none;
    font-weight: 500;
}

.ml-clear-filters:hover {
    text-decoration: underline;
}

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

.ml-card {
    background: #fff;
    border: 1px solid var(--border-color);
    box-shadow: var(--drop-shadow);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow .18s, transform .18s;
}

.ml-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, .09);
    transform: translateY(-2px);
}

.ml-card-thumb {
    position: relative;
    width: 100%;
    padding-top: 78%;
    background: #E8EBE2;
    overflow: hidden;
}

.ml-card-thumb>img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ml-card-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #E8EBE2;
}

.ml-card-placeholder--video {
    background: #DDE3D8;
}

.ml-card-placeholder--audio {
    background: #E3DDD8;
}

/* ── Memory library collage grid ── */
.ml-collage {
    position: absolute;
    inset: 0;
    display: grid;
    gap: 2px;
}

.ml-collage[data-count="1"] {
    grid-template-columns: 1fr;
}

.ml-collage[data-count="2"] {
    grid-template-columns: 1fr 1fr;
}

.ml-collage[data-count="3"] {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.ml-collage[data-count="3"] .ml-cc-cell:first-child {
    grid-row: 1/3;
}

.ml-collage[data-count="4"] {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.ml-cc-cell {
    overflow: hidden;
    position: relative;
    min-height: 0;
}

.ml-cc-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ml-cc-more {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: var(--font-sans);
    font-size: 17px;
    font-weight: 700;
}

.ml-card-type-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    display: flex;
    align-items: center;
    gap: 3px;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 9.5px;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 5px;
}

.ml-card-type-badge--video {
    background: rgba(40, 40, 140, .6);
}

.ml-card-type-badge--audio {
    background: rgba(100, 60, 20, .55);
}

.ml-card-menu {
    position: absolute;
    top: 8px;
    right: 8px;
}

.ml-card-menu-btn {
    width: 26px;
    height: 26px;
    background: rgba(255, 255, 255, .88);
    border: none;
    border-radius: 7px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5px;
    cursor: pointer;
    padding: 0;
}

.ml-card-menu-btn:hover {
    background: #fff;
}

.ml-card-menu-btn span {
    display: block;
    width: 3px;
    height: 3px;
    background: #555;
    border-radius: 50%;
}

.ml-card-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 130px;
    background: #fff;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    z-index: 400;
    padding: 5px 0;
}

.ml-card-dropdown[hidden] {
    display: none;
}

.ml-card-dropdown-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    font-family: var(--font-sans);
    font-size: 12.5px;
    color: var(--text-dark);
    text-decoration: none;
    background: none;
    border: none;
    width: 100%;
    cursor: pointer;
    transition: background .12s;
    text-align: left;
}

.ml-card-dropdown-item:hover {
    background: #F4F6F0;
}

.ml-card-dropdown-item--delete {
    color: #b03030;
}

.ml-card-dropdown-item--delete:hover {
    background: #fff5f5;
}

.ml-card-info {
    padding: 10px 12px 12px;
}

.ml-card-title {
    font-family: var(--font-sans);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ml-card-child {
    font-family: var(--font-sans);
    font-size: 11px;
    color: var(--text-muted);
    margin: 0 0 1px;
}

.ml-card-date {
    font-family: var(--font-sans);
    font-size: 11px;
    color: #aaa;
    margin: 0 0 6px;
}

.ml-card-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-sans);
    font-size: 10px;
    color: var(--btn-sage);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ml-empty {
    background: #fff;
    border: 2px dashed #D8DBCF;
    border-radius: 14px;
    padding: 56px 24px;
    text-align: center;
}

.ml-empty-icon {
    width: 72px;
    height: 72px;
    background: rgba(140, 143, 122, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.ml-empty-title {
    font-family: var(--font-serif);
    font-size: 17px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 6px;
}

.ml-empty-sub {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.ml-empty-link {
    background: none;
    border: none;
    color: var(--btn-sage);
    font-size: 13px;
    font-family: var(--font-sans);
    font-weight: 500;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

.ml-child-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 8px;
    text-decoration: none;
    transition: background .15s;
    margin-bottom: 2px;
}

.ml-child-link:hover {
    background: #F4F6F0;
}

.ml-child-link.active {
    background: rgba(140, 143, 122, 0.1);
}

.ml-child-link-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--btn-sage);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ml-child-link-name {
    font-family: var(--font-sans);
    font-size: 12.5px;
    color: var(--text-dark);
    font-weight: 500;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ml-child-link-count {
    font-family: var(--font-sans);
    font-size: 11px;
    color: var(--text-muted);
    background: #F0F1EA;
    border-radius: 999px;
    padding: 1px 7px;
}

@media (max-width:1200px) {
    .ml-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width:900px) {
    .ml-layout {
        flex-direction: column;
    }

    .ml-sidebar {
        width: 100%;
    }

    .ml-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

/* ====================================
   Toast notification
   ==================================== */

.um-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    opacity: 0;
    background: #2d2d2d;
    color: #fff;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    padding: 12px 24px;
    border-radius: 10px;
    z-index: 2000;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
}

.um-toast--show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.um-toast--success {
    background: #3a6b2e;
}

.um-toast--error {
    background: #b03030;
}

/* ====================================
   Family Timeline Page
   ==================================== */

.tl-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.tl-main {
    flex: 1;
    min-width: 0;
}

.tl-sidebar {
    width: 220px;
    flex-shrink: 0;
}

.tl-heading-row {
    margin-bottom: 18px;
}

.tl-heading {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 2px;
}

.tl-subheading {
    font-family: var(--font-sans);
    font-size: 12.5px;
    color: var(--text-muted);
    margin: 0;
}

/* Filter bar (shared pattern with memory library) */
.tl-filter-bar {
    background: #fff;
    border: 1px solid #EAEBE4;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.tl-filter-group {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.tl-filter-btn {
    background: none;
    border: 1.5px solid transparent;
    border-radius: 8px;
    padding: 5px 12px;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all .15s;
}

.tl-filter-btn:hover {
    background: #F4F6F0;
    color: var(--text-dark);
}

.tl-filter-btn.active {
    background: rgba(140, 143, 122, 0.1);
    border-color: var(--border-color);
    color: var(--btn-sage);
    font-weight: 600;
}

.tl-filter-dropdowns {
    display: flex;
    gap: 8px;
}

.tl-dropdown-wrap {
    position: relative;
}

.tl-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #FAFAF7;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    padding: 5px 10px;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    white-space: nowrap;
}

.tl-dropdown-btn:hover,
.tl-dropdown-btn.active {
    border-color: var(--btn-sage);
    color: var(--btn-sage);
}

.tl-dropdown-wrap:hover .tl-dropdown-menu,
.tl-dropdown-wrap:focus-within .tl-dropdown-menu {
    display: block;
}

.tl-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 150px;
    background: #fff;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .1);
    z-index: 300;
    padding: 6px 0;
}

.tl-dropdown-item {
    display: block;
    padding: 7px 14px;
    font-family: var(--font-sans);
    font-size: 12.5px;
    color: var(--text-dark);
    text-decoration: none;
    transition: background .12s;
}

.tl-dropdown-item:hover {
    background: #F4F6F0;
}

.tl-dropdown-item.selected {
    color: var(--btn-sage);
    font-weight: 600;
    background: rgba(140, 143, 122, 0.1);
}

/* Year header */
.tl-year-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0 0 6px;
}

.tl-year-badge {
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 600;
    color: var(--btn-sage);
    background: rgba(140, 143, 122, 0.1);
    border-radius: 20px;
    padding: 2px 9px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.tl-year-label {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    line-height: 1;
}

/* Track */
.tl-track {
    position: relative;
    padding-left: 20px;
    margin-bottom: 32px;
}

.tl-track::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #E4E6DC;
    border-radius: 2px;
}

/* Month label */
.tl-month-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0 10px;
}

.tl-month-label {
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: #F4F6F0;
    border: 1px solid #E4E6DC;
    border-radius: 6px;
    padding: 2px 9px;
    flex-shrink: 0;
}

.tl-month-line {
    flex: 1;
    height: 1px;
    background: #E8EBE2;
}

/* Entry */
.tl-entry {
    display: flex;
    gap: 14px;
    margin-bottom: 14px;
}

.tl-dot-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 16px;
}

.tl-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--btn-sage);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--border-color);
    flex-shrink: 0;
    margin-top: 14px;
}

.tl-dot-line {
    flex: 1;
    width: 2px;
    background: #E4E6DC;
    margin-top: 4px;
}

.tl-card {
    flex: 1;
    background: #fff;
    border: 1px solid var(--border-color);
    box-shadow: var(--drop-shadow);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow .18s;
}

.tl-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .07);
}

.tl-card-top {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px 10px;
}

.tl-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--btn-sage);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tl-card-meta {
    flex: 1;
    min-width: 0;
}

.tl-card-title {
    font-family: var(--font-serif);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 3px;
}

.tl-card-info {
    font-family: var(--font-sans);
    font-size: 11.5px;
    color: var(--text-muted);
    margin: 0;
}

.tl-card-sep {
    margin: 0 4px;
    color: #C0C4B8;
}

/* Photo strip */
.tl-photo-strip {
    padding: 0 16px 10px;
    display: flex;
    gap: 6px;
    overflow-x: auto;
}

.tl-photo-thumb {
    width: 120px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #E8EBE2;
}

.tl-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tl-photo-more {
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tl-photo-more span {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.tl-card-desc {
    font-family: var(--font-sans);
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    padding: 0 16px 10px;
    line-height: 1.5;
}

.tl-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-sans);
    font-size: 11px;
    color: var(--btn-sage);
    font-weight: 500;
    padding: 8px 16px 12px;
    border-top: 1px solid #F0F1EA;
    margin-top: 4px;
}

/* Empty */
.tl-empty {
    background: #fff;
    border: 2px dashed #D8DBCF;
    border-radius: 14px;
    padding: 56px 24px;
    text-align: center;
}

.tl-empty-icon {
    width: 68px;
    height: 68px;
    background: rgba(140, 143, 122, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.tl-empty-title {
    font-family: var(--font-serif);
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 6px;
}

.tl-empty-sub {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

/* Sidebar widgets */
.tl-widget-title {
    font-family: var(--font-serif);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 4px;
}

.tl-progress-card {
    padding: 18px;
}

.tl-highlights-card {
    padding: 16px;
}

.tl-highlights-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.tl-highlights-sub {
    font-family: var(--font-sans);
    font-size: 11px;
    color: var(--text-muted);
    flex: 1;
}

.tl-view-all {
    font-family: var(--font-sans);
    font-size: 11px;
    color: var(--btn-sage);
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

.tl-view-all:hover {
    text-decoration: underline;
}

.tl-highlights-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.tl-highlight-thumb {
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    background: #E8EBE2;
}

.tl-highlight-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .2s;
}

.tl-highlight-thumb:hover img {
    transform: scale(1.04);
}

@media (max-width:900px) {
    .tl-layout {
        flex-direction: column;
    }

    .tl-sidebar {
        width: 100%;
    }
}

@media (max-width:576px) {
    .tl-filter-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ====================================
   View Yearbook Page
   ==================================== */

.yb-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.yb-main {
    flex: 1;
    min-width: 0;
}

.yb-sidebar {
    width: 220px;
    flex-shrink: 0;
}

.yb-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.yb-heading {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 2px;
}

.yb-subheading {
    font-family: var(--font-sans);
    font-size: 12.5px;
    color: var(--text-muted);
    margin: 0;
}

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

.yb-btn-outline {
    border: 1.5px solid #D0D4C8;
    background: transparent;
    color: var(--text-dark);
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 500;
    border-radius: 8px;
    padding: 7px 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: border-color .2s, color .2s;
}

.yb-btn-outline:hover:not(:disabled) {
    border-color: var(--btn-sage);
    color: var(--btn-sage);
}

.yb-btn-outline:disabled,
.yb-btn-print:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.yb-btn-print {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
}

/* Filter bar */
.yb-filter-bar {
    background: #fff;
    border: 1px solid #EAEBE4;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 24px;
}

.yb-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.yb-dropdown-wrap {
    position: relative;
}

.yb-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #FAFAF7;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    padding: 5px 11px;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .15s;
}

.yb-dropdown-btn:hover,
.yb-dropdown-btn.active {
    border-color: var(--btn-sage);
    color: var(--btn-sage);
}

.yb-dropdown-wrap:hover .yb-dropdown-menu,
.yb-dropdown-wrap:focus-within .yb-dropdown-menu {
    display: block;
}

.yb-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 160px;
    background: #fff;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .1);
    z-index: 300;
    padding: 6px 0;
}

.yb-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 14px;
    font-family: var(--font-sans);
    font-size: 12.5px;
    color: var(--text-dark);
    text-decoration: none;
    transition: background .12s;
}

.yb-dropdown-item:hover {
    background: #F4F6F0;
}

.yb-dropdown-item.selected {
    color: var(--btn-sage);
    font-weight: 600;
    background: rgba(140, 143, 122, 0.1);
}

.yb-dropdown-count {
    font-size: 11px;
    color: #aaa;
}

.yb-dropdown-empty {
    display: block;
    padding: 7px 14px;
    font-size: 12px;
    color: #aaa;
    font-style: italic;
    font-family: var(--font-sans);
}

.yb-year-pill {
    background: rgba(140, 143, 122, 0.1);
    color: var(--btn-sage);
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    padding: 4px 12px;
}

/* ── Book ── */
.yb-book-scene {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    perspective: 2200px;
}

.yb-book {
    display: flex;
    width: 100%;
    max-width: 780px;
    min-height: 460px;
    border-radius: 3px 14px 14px 3px;
    box-shadow: -6px 6px 20px rgba(0, 0, 0, .18), 6px 6px 20px rgba(0, 0, 0, .10), 0 2px 6px rgba(0, 0, 0, .12);
    /* overflow:hidden removed — clips CSS 3D transforms */
    position: relative;
    transform-style: preserve-3d;
}

.yb-page {
    flex: 1;
    padding: 36px 32px;
    min-height: 460px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.yb-page-left {
    background: #FDFAF5;
    box-shadow: inset -6px 0 12px rgba(0, 0, 0, .06);
    border-radius: 3px 0 0 3px;
}

.yb-page-right {
    background: #fff;
    box-shadow: inset 6px 0 12px rgba(0, 0, 0, .04);
    border-radius: 0 14px 14px 0;
}

.yb-spine {
    width: 18px;
    flex-shrink: 0;
    background: linear-gradient(to right, #8B7355 0%, #C4A882 40%, #D4B896 50%, #C4A882 60%, #8B7355 100%);
    box-shadow: 0 0 8px rgba(0, 0, 0, .2);
    position: relative;
    z-index: 2;
}

/* ── Page-fold element ── */
.yb-fold {
    display: none;
    position: absolute;
    top: 0;
    height: 100%;
    width: calc(50% - 9px);
    /* half book minus half spine */
    transform-style: preserve-3d;
    pointer-events: none;
    z-index: 10;
}

.yb-fold.is-active {
    display: block;
}

.yb-fold.is-forward {
    right: 0;
    transform-origin: left center;
}

.yb-fold.is-backward {
    left: 0;
    transform-origin: right center;
}

.yb-fold-front,
.yb-fold-back {
    position: absolute;
    inset: 0;
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform;
}

/* Forward: front = right page style, back = left page style */
.yb-fold.is-forward .yb-fold-front {
    background: #fff;
    box-shadow: inset 6px 0 12px rgba(0, 0, 0, .04), -10px 0 28px rgba(0, 0, 0, .18);
    border-radius: 0 14px 14px 0;
}

.yb-fold.is-forward .yb-fold-back {
    transform: rotateY(180deg);
    background: #FDFAF5;
    box-shadow: inset -6px 0 12px rgba(0, 0, 0, .06), 8px 0 24px rgba(0, 0, 0, .12);
    border-radius: 3px 0 0 3px;
}

/* Backward: front = left page style, back = right page style */
.yb-fold.is-backward .yb-fold-front {
    background: #FDFAF5;
    box-shadow: inset -6px 0 12px rgba(0, 0, 0, .06), 10px 0 28px rgba(0, 0, 0, .18);
    border-radius: 3px 0 0 3px;
}

.yb-fold.is-backward .yb-fold-back {
    transform: rotateY(-180deg);
    background: #fff;
    box-shadow: inset 6px 0 12px rgba(0, 0, 0, .04), -8px 0 24px rgba(0, 0, 0, .12);
    border-radius: 0 14px 14px 0;
}

/* Curl-shadow gradient on the turning face */
.yb-fold.is-forward .yb-fold-front::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, .12) 0%, transparent 35%);
    pointer-events: none;
    border-radius: inherit;
}

.yb-fold.is-backward .yb-fold-front::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to left, rgba(0, 0, 0, .12) 0%, transparent 35%);
    pointer-events: none;
    border-radius: inherit;
}

/* Page number watermark */
.yb-page-num {
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 600;
    color: #C0C4B8;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 auto;
}

/* Cover spread */
.yb-cover-left {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.yb-cover-badge {
    display: inline-block;
    background: rgba(140, 143, 122, 0.1);
    color: var(--btn-sage);
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 20px;
    padding: 4px 12px;
    margin-bottom: 20px;
    align-self: flex-start;
}

.yb-cover-name {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 8px;
    line-height: 1.25;
}

.yb-cover-count {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 28px;
}

.yb-cover-ornament {
    font-size: 18px;
    color: var(--border-color);
    margin-bottom: 16px;
}

.yb-cover-tagline {
    font-family: var(--font-lora);
    font-style: italic;
    font-size: 14px;
    color: #8C9180;
    line-height: 1.55;
    margin: 0;
}

.yb-cover-right {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.yb-cover-intro {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0 0 16px;
}

.yb-cover-divider {
    width: 40px;
    height: 2px;
    background: var(--border-color);
    border-radius: 2px;
    margin: 20px 0;
}

.yb-cover-quote {
    font-family: var(--font-lora);
    font-style: italic;
    font-size: 13px;
    color: #8C9180;
    line-height: 1.6;
    margin: 0;
}

/* Memory spread */
.yb-mem-left {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.yb-mem-title {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 12px 0 6px;
    line-height: 1.25;
}

.yb-mem-child {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--btn-sage);
    margin: 0 0 2px;
}

.yb-mem-date {
    font-family: var(--font-sans);
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 0 16px;
}

.yb-mem-desc {
    font-family: var(--font-lora);
    font-size: 13px;
    color: #555;
    line-height: 1.65;
    margin: 0 0 20px;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
}

.yb-qr-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-top: auto;
}

.yb-qr-placeholder {
    width: 72px;
    height: 72px;
    background: #F4F6F0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px dashed #D0D4C8;
}

.yb-qr-label {
    font-family: var(--font-sans);
    font-size: 10.5px;
    color: var(--text-muted);
    margin: 0;
}

.yb-media-icons {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 10px;
}

.yb-media-icon {
    font-family: var(--font-sans);
    font-size: 11px;
    color: var(--btn-sage);
    background: rgba(140, 143, 122, 0.1);
    border-radius: 6px;
    padding: 3px 8px;
    display: inline-block;
}

.yb-mem-right {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ── Collage grid (right page) ── */
.yb-collage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
    flex: 1;
    min-height: 0;
}

.yb-collage-cell {
    border-radius: 7px;
    overflow: hidden;
    position: relative;
    min-height: 0;
    background: #F7F5F0;
}

.yb-collage-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.yb-collage-cell:hover img {
    transform: scale(1.04);
}

/* Main cell spans full left column */
.yb-collage-cell--main {
    grid-column: 1;
    grid-row: 1 / 3;
}

/* Empty placeholder slot */
.yb-collage-cell--empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1.5px dashed #D8DBCF;
    background: #FAFAF7;
}

.yb-collage-cell--empty span {
    font-family: var(--font-sans);
    font-size: 9px;
    color: #C8CCB8;
    letter-spacing: .5px;
    text-transform: uppercase;
}

/* Photo frame effect on cells */
.yb-collage-cell--main::after,
.yb-collage-cell:not(.yb-collage-cell--main):not(.yb-collage-cell--empty)::after {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
    border-radius: inherit;
    pointer-events: none;
}

/* End spread */
.yb-end-left,
.yb-end-right {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: center;
    text-align: center;
}

.yb-end-title {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 16px;
}

/* Navigation */
.yb-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 10px 0 4px;
}

.yb-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid #D0D4C8;
    background: #fff;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.yb-nav-btn:hover:not(:disabled) {
    border-color: var(--btn-sage);
    background: rgba(140, 143, 122, 0.1);
    color: var(--btn-sage);
}

.yb-nav-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.yb-nav-label {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    min-width: 60px;
    text-align: center;
}

/* Empty */
.yb-empty {
    background: #fff;
    border: 2px dashed #D8DBCF;
    border-radius: 14px;
    padding: 56px 24px;
    text-align: center;
}

.yb-empty-icon {
    width: 72px;
    height: 72px;
    background: rgba(140, 143, 122, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.yb-empty-title {
    font-family: var(--font-serif);
    font-size: 17px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 6px;
}

.yb-empty-sub {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.yb-empty-link {
    color: var(--btn-sage);
    font-weight: 500;
}

/* Sidebar */
.yb-sidebar-hint {
    font-family: var(--font-serif);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 6px;
}

.yb-sidebar-sub {
    font-family: var(--font-sans);
    font-size: 11.5px;
    color: var(--text-muted);
    margin: 0 0 16px;
    line-height: 1.5;
}

.yb-sidebar-actions {
    display: flex;
    flex-direction: column;
}

/* ── Generate form card ── */
.yb-gen-card {
    padding: 20px;
}

.yb-gen-card-title {
    font-family: var(--font-serif);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 4px;
}

.yb-gen-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.yb-gen-label {
    font-family: var(--font-sans);
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin: 0;
}

.yb-gen-input {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--text-dark);
    background: #FAFAF8;
    border: 1.5px solid #E0E3D8;
    border-radius: 8px;
    padding: 8px 10px;
    width: 100%;
    outline: none;
    transition: border-color .15s;
    box-sizing: border-box;
}

.yb-gen-input:focus {
    border-color: var(--btn-sage);
}

.yb-gen-input[type="date"] {
    cursor: pointer;
}

.yb-error-msg {
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
    border-radius: 6px;
    padding: 7px 10px;
    font-family: var(--font-sans);
    font-size: 11.5px;
    color: #DC2626;
    margin: 0;
    display: none;
}

/* ── Saved indicator ── */
.yb-saved-info {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
    padding: 7px 10px;
    background: rgba(140, 143, 122, 0.1);
    border-radius: 7px;
    font-family: var(--font-sans);
    font-size: 11.5px;
    color: var(--btn-sage);
    font-weight: 500;
}

.yb-saved-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--btn-sage);
    flex-shrink: 0;
}

/* ── Empty book pages ── */
.yb-empty-pg {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 10px;
    opacity: .55;
    text-align: center;
    padding: 16px;
}

.yb-empty-lines {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 80%;
    align-items: center;
}

.yb-empty-line {
    height: 2.5px;
    background: #E4E6DC;
    border-radius: 2px;
}

.yb-empty-ornament {
    font-size: 14px;
    color: #D0D4C8;
    margin: 4px 0;
}

.yb-empty-pg-title {
    font-family: var(--font-serif);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 6px 0 2px;
}

.yb-empty-pg-sub {
    font-family: var(--font-sans);
    font-size: 11.5px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
}

@media (max-width:900px) {
    .yb-layout {
        flex-direction: column;
    }

    .yb-sidebar {
        width: 100%;
    }
}

@media (max-width:640px) {
    .yb-page {
        padding: 24px 18px;
    }

    .yb-heading-actions {
        display: none;
    }
}

@media (max-width:480px) {
    .yb-book {
        flex-direction: column;
        border-radius: 12px;
    }

    .yb-spine {
        width: 100%;
        height: 12px;
        background: linear-gradient(to bottom, #8B7355, #C4A882, #8B7355);
    }
}

/* ====================================
   Memory Library (New Design)
   ==================================== */
.ml-new-content {
    padding: 32px 40px;
    width: 100%;
}

.ml-new-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.ml-new-title {
    font-family: var(--font-serif);
    font-size: 32px;
    font-weight: 700;
    color: #5B5242;
    margin-bottom: 8px;
}

.ml-new-subtitle {
    font-family: var(--font-sans);
    font-size: 16px;
    color: #6C6656;
    margin: 0;
}

.ml-new-upload-btn {
    background-color: var(--btn-sage);
    color: white;
    padding: 10px 20px;
    font-weight: 500;
    font-size: 15px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
}

.ml-new-upload-btn:hover {
    background-color: var(--btn-sage-hover);
    color: white;
}

.ml-new-top-layout {
    display: flex;
    gap: 32px;
    margin-bottom: 24px;
}

.ml-new-filters {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.ml-new-filter-wrap {
    position: relative;
}

.ml-new-filter-select {
    appearance: none;
    background: transparent;
    border: 1px solid #A4A198;
    border-radius: 4px;
    padding: 8px 36px 8px 16px;
    color: #5B5242;
    font-size: 14px;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    font-family: var(--font-sans);
}

.ml-new-filter-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.ml-new-storage-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #A4A198;
    padding: 8px 8px 8px 16px;
    margin-bottom: 24px;
    border-radius: 4px;
}

.ml-new-storage-text {
    color: #6C6656;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-sans);
}

.ml-new-storage-btn {
    background-color: var(--btn-sage);
    color: white;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 4px;
    border: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.ml-new-storage-btn:hover {
    background-color: var(--btn-sage-hover);
    color: white;
}

.ml-new-tabs {
    display: flex;
    gap: 8px;
}

.ml-new-tab {
    background-color: transparent;
    color: #6C6656;
    border: none;
    padding: 8px 20px;
    font-weight: 500;
    font-size: 15px;
    font-family: var(--font-sans);
    cursor: pointer;
    border-radius: 4px;
}

.ml-new-tab.active {
    background-color: var(--btn-sage);
    color: white;
}

.ml-new-yearbook-widget {
    width: 320px;
    flex-shrink: 0;
    background: white;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.ml-new-yearbook-title {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 700;
    color: #5B5242;
    margin-bottom: 24px;
}

.ml-new-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.ml-new-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.ml-new-card-img-wrap {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}

.ml-new-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ml-new-card-more {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6C6656;
}

.ml-new-card-title {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 700;
    color: #5B5242;
    margin: 0 0 4px 0;
}

.ml-new-card-sub {
    font-size: 13px;
    color: #8F887A;
    margin: 0 0 4px 0;
}

.ml-new-card-date {
    font-size: 13px;
    color: #8F887A;
    margin: 0 0 16px 0;
}

.ml-new-card-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #8F887A;
}

.ml-new-card-badge-icon {
    width: 20px;
    height: 20px;
    background: var(--btn-sage);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ====================================
   Family Timeline (New Design)
   ==================================== */
.ft-new-content {
    padding: 32px 40px;
    width: 100%;
}

.ft-new-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.ft-new-title {
    font-family: var(--font-serif);
    font-size: 32px;
    font-weight: 700;
    color: #5B5242;
    margin-bottom: 8px;
}

.ft-new-subtitle {
    font-family: var(--font-sans);
    font-size: 16px;
    color: #6C6656;
    margin: 0;
}

.ft-new-btn-sage {
    background-color: var(--btn-sage);
    color: white;
    padding: 10px 20px;
    font-weight: 500;
    font-size: 15px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
}

.ft-new-btn-sage:hover {
    background-color: var(--btn-sage-hover);
    color: white;
}

.ft-new-main-split {
    display: flex;
    gap: 32px;
}

.ft-new-left-pane {
    flex: 1;
}

.ft-new-filters {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.ft-new-timeline-wrapper {
    position: relative;
    display: block;
}

.ft-new-feed-item {
    display: flex;
    gap: 24px;
    position: relative;
    z-index: 2;
    margin-bottom: 32px;
}

.ft-new-axis {
    width: 120px;
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: relative;
}

.ft-new-axis-year {
    text-align: right;
    margin-right: 16px;
}

.ft-new-axis-year span {
    font-family: var(--font-sans);
    font-size: 14px;
    color: #6C6656;
    display: block;
}

.ft-new-axis-year h2 {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 700;
    color: #5B5242;
    margin: 0;
}

.ft-new-axis-badge {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.ft-new-axis-badge img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.ft-new-axis-line {
    position: absolute;
    top: 48px;
    bottom: 0;
    left: 96px;
    transform: translateX(-50%);
    width: 2px;
    border-left: 2px dashed #A4A198;
    z-index: 1;
}

.ft-new-axis-month {
    display: flex;
    align-items: center;
    width: 120px;
    justify-content: flex-end;
    position: relative;
    z-index: 2;
    background: transparent;
    margin-top: 24px;
}

.ft-new-month-name {
    font-size: 12px;
    font-weight: 600;
    color: #6C6656;
    margin-right: 8px;
    letter-spacing: 0.5px;
}

.ft-new-month-line {
    flex: 1;
    height: 1px;
    border-top: 1px dashed #A4A198;
}

.ft-new-month-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #6C6656;
    border: 4px solid var(--bg-cream);
    margin-left: 4px;
    margin-right: 16px;
}

.ft-new-feed {
    flex: 1;
    margin-top: 24px;
}

.ft-new-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    border: 1px solid #E4E6DC;
    margin-bottom: 24px;
}

.ft-new-card-title {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 700;
    color: #5B5242;
    margin: 0 0 8px 0;
}

.ft-new-card-meta {
    font-family: var(--font-sans);
    font-size: 15px;
    color: #6C6656;
    margin-bottom: 20px;
    font-weight: 500;
}

.ft-new-photo-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
}

.ft-new-photo-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.ft-new-photo-1 {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}

.ft-new-photo-2 {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
}

.ft-new-photo-3 {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
}

.ft-new-photo-4 {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
}

.ft-new-card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #8F887A;
}

.ft-new-card-footer-icon {
    width: 20px;
    height: 20px;
    background: #8C8F7A;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ft-new-sidebar {
    width: 340px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ft-new-widget {
    background: transparent;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    border: 1px solid #A4A198;
}

.ft-new-widget-title {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 700;
    color: #5B5242;
    margin-bottom: 32px;
}

.ft-new-progress-stats {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.ft-new-progress-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid #A4A198;
    border-radius: 6px;
    font-size: 13px;
    color: #6C6656;
}

.ft-new-polaroids {
    position: relative;
    height: 140px;
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
    margin-top: 16px;
}

.ft-new-polaroid {
    position: absolute;
    width: 80px;
    height: 95px;
    background: white;
    padding: 6px 6px 18px 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform-origin: center bottom;
}

.ft-new-polaroid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ft-new-polaroid:nth-child(1) {
    transform: rotate(-15deg) translateX(-60px);
    z-index: 1;
}

.ft-new-polaroid:nth-child(2) {
    transform: rotate(-5deg) translateX(-20px);
    z-index: 2;
}

.ft-new-polaroid:nth-child(3) {
    transform: rotate(5deg) translateX(20px);
    z-index: 3;
}

.ft-new-polaroid:nth-child(4) {
    transform: rotate(15deg) translateX(60px);
    z-index: 4;
}

.ft-new-highlights-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 48px;
}

.ft-new-highlights-text {
    font-size: 14px;
    font-weight: 600;
    color: #6C6656;
}

.ft-new-highlights-btn {
    padding: 6px 16px;
    border: 1px solid #A4A198;
    border-radius: 6px;
    background: transparent;
    color: #5B5242;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.ft-new-btn-outline {
    background: transparent;
    color: #6C6656;
    border: 1px solid #A4A198;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
}
/* --- YOUR BOOKS PAGE --- */
.yb-books-header {
    align-items: center; margin-bottom: 32px; display: flex; justify-content: space-between;
}
.yb-header-btn {
    display: flex; align-items: center; gap: 8px; padding: 10px 20px; font-size: 14px;
}
.yb-filters-row {
    margin-bottom: 24px;
}
.yb-filter-wrap-inline {
    display: inline-flex;
}
.yb-filter-select {
    padding: 8px 32px 8px 16px; font-size: 14px;
}
.yb-tabs-container {
    display: flex; gap: 32px; border-bottom: 1px solid #E4E6DC; margin-bottom: 32px; padding-left: 8px;
}
.yb-tab-btn {
    background: transparent; border: none; padding: 12px 16px; font-size: 15px; font-family: var(--font-serif); color: #6C6656; cursor: pointer;
}
.yb-tab-btn.active-line {
    border-bottom: 2px solid #6C6656; color: #161A30; transform: translateY(1px);
}
.yb-tab-btn.active-solid {
    background: #8B8F80; padding: 12px 24px; color: white; border-radius: 4px 4px 0 0;
}
.yb-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 48px;
}
.yb-card {
    background: #FCFBF8; border: 1px solid #E4E6DC; border-radius: 8px; padding: 16px; box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}
.yb-card-title {
    font-family: var(--font-serif); font-size: 16px; font-weight: 500; color: #5B5242; margin: 0 0 6px 0;
}
.yb-card-subtitle {
    font-family: var(--font-sans); font-size: 13px; color: #8F887A; margin: 0 0 12px 0;
}
.yb-status-pill {
    display: inline-flex; align-items: center; gap: 6px; background: #F4EBE1; color: #8F887A; padding: 4px 10px; border-radius: 4px; border: 1px solid #EADDC9; margin-bottom: 16px;
}
.yb-status-text {
    font-size: 11px; font-family: var(--font-sans); color: #6C6656; font-weight: 500;
}
.yb-masonry {
    display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: 100px 100px; gap: 6px;
}
.yb-masonry-img-wide {
    grid-column: span 3; width: 100%; height: 100%; object-fit: cover; border-radius: 6px;
}
.yb-masonry-img-narrow {
    grid-column: span 2; width: 100%; height: 100%; object-fit: cover; border-radius: 6px;
}

/* --- INSPIRATION PAGE --- */
.insp-filters-row {
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
}
.insp-filter-select {
    padding: 8px 32px 8px 16px;
    font-size: 14px;
    border: 1px solid #A4A198;
    border-radius: 4px;
    background: transparent;
    color: #5B5242;
    appearance: none;
}
.insp-filter-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.insp-filter-wrap svg {
    position: absolute;
    right: 12px;
    pointer-events: none;
}
.insp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 48px;
}
.insp-card {
    background: #FCFBF8;
    border: 1px solid #E4E6DC;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
}
.insp-card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 16px;
}
.insp-date {
    font-family: var(--font-sans);
    font-size: 12px;
    color: #8F887A;
    margin: 0 0 4px 0;
}
.insp-title {
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 500;
    color: #5B5242;
    margin: 0 0 8px 0;
}
.insp-desc {
    font-family: var(--font-sans);
    font-size: 13px;
    color: #6C6656;
    margin: 0;
    line-height: 1.4;
}

/*Laptop Screen*/

@media all and (max-width: 1350px) {
 
.voice-card {
    width: 100% !important;
    padding: 20px 30px !important;
}

.voice-content{
    padding: 3rem 4rem !important;
}

.add-photo-content {
    padding: 3rem 4rem !important;
}

.saved-card-name {
    font-size: 21px !important;
}
  
}

/*Laptop Screen End*/


/*Mobile Screen*/

@media all and (max-width: 500px) {

.insp-grid {
    grid-template-columns: repeat(1, 1fr);
}

.saved-card {
    width: 100%;
}

.saved-btn-row {
    width: 100%;
}

.divider-bottom {
    width: 100%
}
.btn-outline-sage {
    font-size: 13px;
}

.db-upload-title {
  font-size: 25px;
}

.yb-tabs-container {
    flex-direction: column;
    gap: 20px;
}

.ml-new-tabs {
    flex-direction: column;
}

.ml-new-header {
    flex-direction: column;
    gap: 8px;
}

.ml-new-storage-bar {
    flex-direction: column;
    gap: 10px;
}

.ft-new-filters {
    flex-direction: column;
}

.ft-new-axis-month {
    width: 70px;
}

.ft-new-feed-item{
    gap: 0px;
 }

 .ft-new-axis-year span {
    font-size: 10px;
 }

 .ft-new-axis-year h2 {
    font-size: 20px;
}

.ft-new-axis-line {
    left: 50px;
}

.ft-new-card {
    padding: 15px;
}

.ft-new-card-title {
    font-size: 18px;
}

.ft-new-card-meta {
    font-size: 11px;
}

.ft-new-card-footer {
    font-size: 12px;
}

.ft-new-month-name {
    font-size: 10px;
    margin-right: 0px;
}

}

/*Mobile Screen End*/

@media (max-width: 768px) {
    .add-photo-content,
    .voice-content,
    .preview-content,
    .hero-content {
        padding: 2rem 1rem !important;
    }
    
    .voice-card {
        width: 100% !important;
        padding: 20px 15px !important;
    }

    .hero-title {
        font-size: 26px !important;
        white-space: normal !important;
    }

    .hero-subtitle {
        font-size: 14px !important;
    }

    .quote-text {
        font-size: 16px !important;
        max-width: 95% !important;
    }

    .logo-img {
        width: 100px !important;
        height: 100px !important;
    }
    
    /* Stacking open book simulation on mobile */
    .open-book {
        padding: 6px 8px 10px 10px !important;
    }
    
    .book-pages {
        flex-direction: column !important;
    }
    
    .book-gutter {
        width: 100% !important;
        height: 12px !important;
        background: linear-gradient(to bottom,
                rgba(0, 0, 0, 0.08) 0%,
                rgba(0, 0, 0, 0.02) 45%,
                rgba(0, 0, 0, 0.02) 55%,
                rgba(0, 0, 0, 0.08) 100%) !important;
    }
    
    .book-gutter::after {
        left: 10% !important;
        right: 10% !important;
        top: 50% !important;
        bottom: auto !important;
        width: auto !important;
        height: 1px !important;
    }

    /* Yearbook PDF/Print simulation responsiveness */
    .ft-new-book-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
        background: #F4F2EC !important;
        border: 1px solid #A4A198 !important;
        border-radius: 8px !important;
        padding: 16px !important;
        box-shadow: 0 10px 20px rgba(0,0,0,0.05) !important;
    }
    
    .ft-new-book-container img[alt="Open Book"] {
        display: none !important;
    }
    
    #left-page-container,
    #right-page-container {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        padding: 16px !important;
        box-sizing: border-box !important;
        opacity: 1 !important;
    }
    
    #right-page-container {
        min-height: 250px !important;
    }

    #left-page-container {
        border-bottom: 2px dashed #A4A198 !important;
        padding-bottom: 24px !important;
    }

    #left-page-container div[style*="position: absolute; bottom: 2%"] {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        margin-top: 24px !important;
    }
    
    #right-page-container div[style*="position: absolute"] {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        width: 100% !important;
        transform: none !important;
        margin-bottom: 16px !important;
        box-shadow: none !important;
    }

    /* Filters row layout for yearbook view */
    .ft-new-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 16px !important;
    }
    .ft-new-header div {
        width: 100% !important;
    }
    .ft-new-header div[style*="display: flex"] {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    .ft-new-header div[style*="display: flex"] button {
        flex: 1 1 calc(50% - 8px) !important;
        min-width: 120px !important;
        padding: 8px 12px !important;
    }
}

/* ====================================
   Layout Spacing & Refinements Overrides
   ==================================== */

@media (max-width: 991px) {
    /* Grids: convert 4 columns to 2 columns on tablets */
    .yb-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .ml-new-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    /* Dashboard Hero Banner refinements */
    .db-hero-quote {
        font-size: 20px !important;
        line-height: 1.45 !important;
        margin-bottom: 14px !important;
    }
    .db-hero-footer {
        width: 100% !important;
        max-width: 320px !important;
        margin: 10px auto 0 !important;
        padding: 6px !important;
    }
    .db-hero-banner {
        padding: 24px 20px !important;
    }

    /* Bottom footer wrapping to prevent truncation */
    .footer {
        height: auto !important;
        padding: 12px 16px !important;
    }
    .footer p,
    .footer-inner p {
        white-space: normal !important;
        text-align: center !important;
        font-size: 12px !important;
        line-height: 1.5 !important;
    }
    .footer-inner {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 6px !important;
    }

    /* Stack memory library top layout widget */
    .ml-new-top-layout {
        flex-direction: column !important;
        gap: 24px !important;
    }
    .ml-new-top-layout > div[style*="width: 320px"] {
        width: 100% !important;
    }
    .ml-new-yearbook-widget {
        width: 100% !important;
    }

    /* Stack timeline main split layout */
    .ft-new-main-split {
        flex-direction: column !important;
        gap: 24px !important;
    }
    .ft-new-sidebar {
        width: 100% !important;
    }

    /* Children table horizontal scroll wrapper */
    .children-table {
        display: block !important;
        overflow-x: auto !important;
        width: 100% !important;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 576px) {
    /* Grids: convert to 1 column on mobiles */
    .yb-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    .ml-new-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* Header nav cleanup (decluttering) */
    .db-icon-btn[title="Cart"],
    .db-icon-btn[title="Messages"] {
        display: none !important;
    }
    .db-search-wrap {
        max-width: 100% !important;
        flex: 1 !important;
    }

    /* Memory library filters wrapping */
    .ml-new-filters {
        flex-wrap: wrap !important;
        gap: 10px !important;
    }
    .ml-new-filter-wrap {
        flex: 1 1 calc(50% - 10px) !important;
        min-width: 120px !important;
    }
    .ml-new-filter-select {
        width: 100% !important;
    }

    /* Family timeline photo grid clean 2x2 grid */
    .ft-new-photo-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        grid-template-rows: repeat(2, 110px) !important;
        gap: 8px !important;
    }
    .ft-new-photo-1, 
    .ft-new-photo-2, 
    .ft-new-photo-3, 
    .ft-new-photo-4 {
        grid-column: auto !important;
        grid-row: auto !important;
        width: 100% !important;
        height: 100% !important;
    }
}

/* ====================================
   Global Footer: Always Full-Bleed
   ==================================== */
.footer {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
.footer .footer-inner {
    padding: 0 16px !important;
    box-sizing: border-box !important;
}

/* ====================================
   Full-Bleed Footer & Content Fixes
   ==================================== */

/* 1. Remove column padding on onboarding pages so footer is full-bleed */
@media (max-width: 991px) {
    .hero-content-col,
    .add-photo-col,
    .voice-col,
    .preview-col,
    .setup-col {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Shift padding to inner content so text stays spaced */
    .hero-content,
    .saved-content,
    .add-photo-content,
    .voice-content,
    .preview-content,
    .setup-content {
        padding: 2rem 1.2rem !important;
    }
}

/* 2. Fix top-cut content (flexbox center scroll bug) on mobile */
@media (max-width: 768px) {
    .hero-content,
    .saved-content,
    .add-photo-content,
    .voice-content,
    .preview-content {
        justify-content: flex-start !important;
        padding-top: 3rem !important;
    }
}

/* 3. Memory card badge text wrap fix on very small screens */
@media (max-width: 576px) {
    .db-memory-badge {
        white-space: normal !important;
        font-size: 11px !important;
        line-height: 1.2 !important;
        align-items: flex-start !important;
    }
    .db-memory-badge svg {
        flex-shrink: 0 !important;
        margin-top: 2px !important;
    }
    .db-memory-title {
        font-size: 14px !important;
    }
    .db-memory-meta,
    .db-memory-date {
        font-size: 12px !important;
    }
}

/* 4. Dashboard db-main: flex column so footer always sticks to bottom of main area */
.db-main {
    display: flex !important;
    flex-direction: column !important;
}
.db-main .db-content,
.db-main main {
    flex: 1 !important;
}
.db-main .footer {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
}

/* ====================================
   Account & Settings Page Styles
   ==================================== */

.ac-content {
    padding: var(--spacing-lg) var(--spacing-xl);
}

.ac-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.ac-title {
    font-family: var(--font-serif);
    font-size: 40px;
    font-weight: 700;
    color: #6B5E53;
    margin: 0;
}

.ac-subtitle {
    font-family: var(--font-sans);
    font-size: 17px;
    color: #6B5E53;
    margin: 6px 0 0 0;
}

.ac-export-btn {
    background-color: #8C8F7A;
    color: #FFFFFF !important;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    padding: 11px 24px;
    border-radius: 10px;
    border: none;
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(140, 143, 122, 0.2);
}

.ac-export-btn:hover {
    background-color: #7A7D6A;
    color: #FFFFFF !important;
    transform: translateY(-1px);
}

/* Account Cards Common */
.ac-card {
    background-color: #FFFFFF;
    border: 1px solid #E5DFD5;
    border-radius: 16px;
    padding: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    transition: var(--transition);
}

.ac-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}

.ac-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.ac-card-title {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 700;
    color: #6B5E53;
    margin: 0;
}

.ac-card-icon-badge {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background-color: #F1F2EC;
    border: 1px solid #E5DFD5;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Profile Card - Horizontal Row Layout */
.ac-profile-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ac-profile-flex {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    text-align: left;
}

.ac-avatar-wrap {
    position: relative;
    width: 165px;
    height: 165px;
    flex-shrink: 0;
}

.ac-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #FFFFFF;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.ac-camera-btn {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #F4F2EC;
    border: 1px solid #E5DFD5;
    color: #6B5E53;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.ac-camera-btn:hover {
    background-color: #E5DFD5;
}

.ac-profile-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ac-user-name {
    font-family: var(--font-serif);
    font-size: 30px;
    font-weight: 700;
    color: #6B5E53;
    margin-bottom: 4px;
    line-height: 1.2;
}

.ac-user-email {
    font-family: var(--font-sans);
    font-size: 15px;
    color: #6B5E53;
    margin-bottom: 8px;
    opacity: 0.9;
}

.ac-user-role {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    color: #6B5E53;
    margin-bottom: 10px;
}

.ac-user-bio {
    font-family: var(--font-sans);
    font-size: 14.5px;
    color: #6B5E53;
    line-height: 1.45;
    margin-bottom: 20px;
    opacity: 0.9;
}

.ac-edit-btn {
    background-color: #8C8F7A !important;
    color: #FFFFFF !important;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    padding: 10px 24px;
    border: none;
    align-self: flex-start;
    box-shadow: 0 4px 10px rgba(140, 143, 122, 0.3);
    transition: var(--transition);
}

.ac-edit-btn:hover {
    background-color: #7A7D6A !important;
    transform: translateY(-1px);
}

/* Family Information Card */
.ac-children-list {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ac-child-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #DCE1D3;
}

.ac-child-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.ac-child-name {
    font-family: var(--font-sans);
    font-size: 17px;
    font-weight: 600;
    color: #6B5E53;
    margin: 0;
}

.ac-child-age {
    font-family: var(--font-sans);
    font-size: 14.5px;
    color: #6B5E53;
    margin: 2px 0 0 0;
    opacity: 0.85;
}

.ac-btn-dashed {
    border: 1px solid #C8C5B8;
    color: #6B5E53 !important;
    background-color: #FFFFFF;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.ac-btn-dashed:hover {
    background-color: #F8F8F4;
    border-color: #8C8F7A;
}

/* Subscription Card */
.ac-plan-box {
    background-color: #F3F4EE;
    border: 1px solid #C8C5B8;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 20px;
}

.ac-plan-top {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #C8C5B8;
}

.ac-plan-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #8C8F7A;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ac-plan-name {
    font-family: var(--font-serif);
    font-size: 17px;
    font-weight: 700;
    color: #11142D;
    margin: 0;
}

.ac-plan-sub {
    font-family: var(--font-sans);
    font-size: 13.5px;
    color: #6B5E53;
    margin: 2px 0 0 0;
}

.ac-plan-active-tag {
    background-color: #DDE8D7;
    color: #4D6B3E;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 12px;
    margin-left: auto;
}

.ac-plan-details {
    display: flex;
    flex-direction: column;
}

.ac-plan-row {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-sans);
    font-size: 14.5px;
    padding: 12px 0;
    border-bottom: 1px solid #C8C5B8;
}

.ac-plan-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ac-plan-label {
    color: #6B5E53;
}

.ac-plan-val {
    font-weight: 500;
    color: #6B5E53;
}

.ac-btn-solid {
    background-color: #8C8F7A;
    color: #FFFFFF !important;
    font-family: var(--font-sans);
    font-size: 15.5px;
    font-weight: 600;
    border-radius: 8px;
    padding: 12px;
    border: none;
    transition: var(--transition);
    box-shadow: 0 2px 6px rgba(140, 143, 122, 0.2);
}

.ac-btn-solid:hover {
    background-color: #7A7D6A;
}

/* Preferences Card */
.ac-pref-list {
    display: flex;
    flex-direction: column;
}

.ac-pref-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #DCE1D3;
    position: relative;
    z-index: 1;
    cursor: pointer;
    transition: var(--transition);
}

.ac-pref-item.dropdown-open {
    z-index: 100 !important;
}

.ac-pref-item:last-child {
    border-bottom: none;
}

.ac-pref-item:hover {
    opacity: 0.9;
}

.ac-pref-icon-box {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background-color: #F1F2EC;
    border: 1px solid #E5DFD5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ac-pref-label {
    font-family: var(--font-sans);
    font-size: 15.5px;
    font-weight: 600;
    color: #6B5E53;
}

.ac-pref-val-wrap {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-size: 14.5px;
    color: #6B5E53;
    cursor: pointer;
}

.ac-chevron {
    transition: transform 0.2s ease;
}

.ac-pref-item.dropdown-open .ac-chevron {
    transform: rotate(180deg);
}

/* Custom Floating Dropdown Menu */
.ac-custom-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    width: 170px;
    background-color: #FFFFFF !important;
    border: 1px solid #E5DFD5;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 1000 !important;
    padding: 6px 0;
    animation: acDropdownFade 0.2s ease-out;
}

@keyframes acDropdownFade {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.ac-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 16px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    color: #6B5E53;
    background-color: #FFFFFF !important;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.ac-dropdown-item:hover {
    background-color: #F8F8F4 !important;
    color: #8C8F7A;
}

.ac-dropdown-item.active {
    background-color: #F1F2EC !important;
    color: #4D6B3E;
    font-weight: 600;
}

/* Notification Settings Card */
.ac-notif-list {
    display: flex;
    flex-direction: column;
}

.ac-notif-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #DCE1D3;
}

.ac-notif-item:last-child {
    border-bottom: none;
}

.ac-notif-icon-box {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background-color: #F1F2EC;
    border: 1px solid #E5DFD5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ac-notif-info {
    flex: 1;
}

.ac-notif-title {
    font-family: var(--font-sans);
    font-size: 15.5px;
    font-weight: 600;
    color: #6B5E53;
    margin: 0;
}

.ac-notif-sub {
    font-family: var(--font-sans);
    font-size: 13.5px;
    color: #6B5E53;
    margin: 2px 0 0 0;
    opacity: 0.85;
}

/* Custom iOS-style Switch */
.ac-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
    margin: 0;
}

.ac-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ac-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #DCE1D3;
    transition: .3s ease;
    border-radius: 24px;
}

.ac-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s ease;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.ac-switch input:checked + .ac-slider {
    background-color: #8C8F7A;
}

.ac-switch input:checked + .ac-slider:before {
    transform: translateX(22px);
}

/* User Dropdown Menu in Topnav */
.db-user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 280px;
    background-color: #FFFFFF;
    border: 1px solid #E5DED4;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    z-index: 1050;
    padding: 14px 0;
    animation: fadeInDown 0.2s ease-out;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.db-user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px 12px 16px;
}

.db-user-dropdown-avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.db-user-dropdown-name {
    font-family: var(--font-serif);
    font-size: 15px;
    font-weight: 700;
    color: #6B5E53;
    margin: 0;
}

.db-user-dropdown-email {
    font-family: var(--font-sans);
    font-size: 12px;
    color: #6B5E53;
    margin: 0;
}

.db-user-dropdown-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    background-color: #F1F2EC;
    color: #6B5E53;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 4px;
}

.db-user-dropdown-divider {
    height: 1px;
    background-color: #F1F2EC;
    margin: 6px 0;
}

.db-user-dropdown-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.db-user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-family: var(--font-sans);
    font-size: 13.5px;
    font-weight: 500;
    color: #6B5E53;
    text-decoration: none;
    transition: var(--transition);
}

.db-user-dropdown-item:hover {
    background-color: #F8F8F4;
    color: #8C8F7A;
}

.db-user-dropdown-footer {
    padding: 4px 0 0 0;
}

/* ====================================
   Edit Profile Modal Specific Styles
   ==================================== */
.ac-edit-profile-dialog {
    max-width: 900px !important;
    width: 93%;
    background-color: #FFFFFF;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
    border: none;
}

.ac-modal-header {
    background-color: #FAFAF7;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #EAE5DC;
}

.ac-modal-title {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 700;
    color: #6B5E53;
    margin: 0;
}

.ac-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #FFFFFF;
    border: 1.5px solid #DDD8CE;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.ac-modal-close:hover {
    background-color: #F5F3EE;
}

.ac-modal-body {
    padding: 0;
    max-height: 80vh;
    overflow: hidden;
}

/* Two-panel grid layout */
.ac-modal-grid {
    display: grid;
    grid-template-columns: 280px 1px 1fr;
    min-height: 480px;
    max-height: 78vh;
}

.ac-modal-left-panel {
    background-color: #F8F6F0;
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ac-modal-divider {
    width: 1px;
    background-color: #EAE5DC;
}

.ac-modal-right-panel {
    padding: 26px 28px;
    overflow-y: auto;
}

/* Drag & Drop Box */
.ac-drag-drop-box {
    background-color: #FFFFFF;
    border: 2px dashed #C8C5B8;
    border-radius: 14px;
    padding: 28px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    flex-shrink: 0;
}

.ac-drag-drop-box:hover {
    border-color: #8C8F7A;
    background-color: #F8F8F4;
}

.ac-drag-cloud-icon {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ac-drag-title {
    font-family: var(--font-sans);
    font-size: 14.5px;
    font-weight: 600;
    color: #6B5E53;
    margin: 0 0 3px 0;
}

.ac-drag-sub {
    font-family: var(--font-sans);
    font-size: 13px;
    color: #6B5E53;
    margin-bottom: 14px;
    opacity: 0.75;
}

.ac-browse-btn {
    display: inline-block;
    border: 1.5px solid #B8B5AB;
    background-color: #FFFFFF;
    color: #6B5E53;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.ac-browse-btn:hover {
    background-color: #F1F2EC;
    border-color: #8C8F7A;
    color: #6B5E53;
}

.ac-file-types {
    font-size: 12px;
    color: #6B5E53;
    margin: 10px 0 0 0;
    opacity: 0.7;
}

.ac-file-size {
    font-size: 12px;
    color: #6B5E53;
    margin: 2px 0 0 0;
    opacity: 0.6;
}

/* Photo Preview Card */
.ac-photo-preview-card {
    position: relative;
    width: 100%;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #E0DDD5;
    flex-shrink: 0;
}

.ac-photo-preview-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ac-remove-photo-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background-color: rgba(255, 255, 255, 0.92);
    border: 1px solid #DDD;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: var(--transition);
}

.ac-remove-photo-btn:hover {
    background-color: #FFFFFF;
}

/* Right Panel Form Grid */
.ac-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
}

.ac-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ac-form-full {
    grid-column: 1 / -1;
}

/* Form Labels */
.ac-form-label {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: #6B5E53;
    margin: 0;
    display: block;
}

/* Base Input Styles */
.ac-form-input {
    width: 100%;
    border: 1.5px solid #DDE0D8;
    border-radius: 10px;
    padding: 9px 14px;
    font-family: var(--font-sans);
    font-size: 13.5px;
    color: #6B5E53;
    background-color: #FFFFFF;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
}

.ac-form-input:focus {
    border-color: #8C8F7A;
    box-shadow: 0 0 0 3px rgba(140, 143, 122, 0.12);
}

.ac-form-input::placeholder {
    color: #B0ADA6;
}

.ac-form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Select Wrap */
.ac-select-wrap {
    position: relative;
}

.ac-form-select {
    cursor: pointer;
    padding-right: 36px;
}

.ac-select-chevron {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Date Input Wrap */
.ac-date-wrap {
    position: relative;
}

.ac-date-input {
    padding-right: 40px;
    cursor: pointer;
}

/* Style the native date picker button area */
.ac-date-input::-webkit-calendar-picker-indicator {
    opacity: 0;
    width: 36px;
    height: 100%;
    position: absolute;
    right: 0;
    top: 0;
    cursor: pointer;
}

.ac-cal-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Password Wrap */
.ac-password-wrap {
    position: relative;
}

.ac-password-wrap .ac-form-input {
    padding-right: 44px;
}

.ac-pw-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.65;
    transition: opacity 0.2s;
}

.ac-pw-toggle:hover {
    opacity: 1;
}

/* Modal Footer Buttons */
.ac-modal-footer {
    padding: 16px 30px;
    border-top: 1px solid #EAE5DC;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    background-color: #FFFFFF;
}

.ac-modal-cancel-btn {
    border: 1.5px solid #C8C5B8;
    color: #6B5E53;
    background-color: #FFFFFF;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    padding: 9px 26px;
    border-radius: 9px;
    cursor: pointer;
    transition: var(--transition);
}

.ac-modal-cancel-btn:hover {
    background-color: #F5F3EE;
}

.ac-modal-save-btn {
    background-color: #8C8F7A;
    color: #FFFFFF;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 700;
    padding: 9px 28px;
    border-radius: 9px;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(140, 143, 122, 0.28);
    transition: var(--transition);
}

.ac-modal-save-btn:hover {
    background-color: #797C6A;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ac-content {
        padding: 16px;
    }
    .ac-title {
        font-size: 28px;
    }
    .ac-export-btn {
        width: 100%;
        justify-content: center;
    }
    .ac-profile-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .ac-edit-btn {
        align-self: center;
    }
    .ac-modal-grid {
        grid-template-columns: 1fr;
    }
    .ac-modal-divider {
        width: 100%;
        height: 1px;
    }
    .ac-modal-left-panel {
        padding: 20px;
    }
    .ac-modal-right-panel {
        padding: 20px;
        max-height: 50vh;
        overflow-y: auto;
    }
}

/* ====================================
   Subscription & Plan Page Styles
   ==================================== */
.sp-content {
    padding: var(--spacing-lg) var(--spacing-xl);
}

.sp-title {
    font-family: var(--font-serif);
    font-size: 34px;
    font-weight: 700;
    color: #6B5E53;
    margin-bottom: 6px;
}

.sp-subtitle {
    font-family: var(--font-sans);
    font-size: 15px;
    color: #6B5E53;
    opacity: 0.85;
    margin: 0;
}

.sp-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 24px;
    padding: 42px 32px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.sp-card:hover {
    transform: translateY(-4px);
}

.sp-card-basic, .sp-card-standard {
    background-color: #FFFFFF;
    border: 1px solid #E5DFD5;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.sp-card-premium {
    background-color: #8C8F7A;
    border: 1px solid #8C8F7A;
    box-shadow: 0 8px 32px rgba(140, 143, 122, 0.3);
}

.sp-card-top {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.sp-card-icon-wrap {
    flex-shrink: 0;
    margin-top: 2px;
}

.sp-plan-title {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 700;
    color: #4A433D;
    margin: 0 0 10px 0;
}

.sp-plan-sub {
    font-family: var(--font-sans);
    font-size: 14.5px;
    color: #6B5E53;
    opacity: 0.85;
    margin: 0;
    line-height: 1.4;
}

.sp-price-box {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 16px;
    margin-bottom: 32px;
}

.sp-price-val {
    font-family: var(--font-sans);
    font-size: 46px;
    font-weight: 800;
    color: #4A433D;
    letter-spacing: -1px;
    line-height: 1;
}

.sp-price-period {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 500;
    color: #6B5E53;
    opacity: 0.8;
}

.sp-features-title {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 700;
    color: #222222;
    margin-bottom: 24px;
}

.sp-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sp-features-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 500;
    color: #6B5E53;
}

.sp-card-premium .sp-features-list li {
    color: #FFFFFF;
}

.sp-check-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sp-btn-solid {
    background-color: #8C8F7A;
    color: #FFFFFF !important;
    font-family: var(--font-sans);
    font-size: 14.5px;
    font-weight: 700;
    padding: 14px 24px;
    border-radius: 32px;
    border: none;
    box-shadow: 0 4px 12px rgba(140, 143, 122, 0.25);
    transition: all 0.2s ease;
}

.sp-btn-solid:hover {
    background-color: #797C6A;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(140, 143, 122, 0.35);
}

.sp-btn-white {
    background-color: #FFFFFF;
    color: #8C8F7A !important;
    font-family: var(--font-sans);
    font-size: 14.5px;
    font-weight: 700;
    padding: 14px 24px;
    border-radius: 32px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.sp-btn-white:hover {
    background-color: #F8F8F4;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.sp-trust-row {
    font-family: var(--font-sans);
    font-size: 14.5px;
    font-weight: 500;
    color: #6B5E53;
}

@media (max-width: 768px) {
    .sp-content {
        padding: 16px;
    }
    .sp-title {
        font-size: 28px;
    }
}

/* ====================================
   Admin Dashboard Styles
   ==================================== */
.admin-db-content {
    background-color: #F8F8F4;
    padding: var(--spacing-lg) var(--spacing-xl);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
}

.admin-title {
    font-family: var(--font-serif);
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 4px 0;
}

.admin-subtitle {
    font-family: var(--font-sans);
    font-size: 16px;
    color: var(--text-muted);
    margin: 0;
}

.admin-btn-export {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #FFFFFF;
    border: 1px solid #E5DFD5;
    color: var(--text-dark);
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.admin-card {
    background: #FFFFFF;
    border: 1px solid #D8DAD0;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.03);
    min-width: 0; /* Prevents grid items from overflowing */
}

.admin-metrics-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.metric-top {
    margin-bottom: 4px;
}

.metric-label {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 600;
    color: #303030;
}

.metric-middle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.metric-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.metric-val {
    font-family: var(--font-sans);
    font-size: 32px;
    font-weight: 700;
    color: #6B5E53;
}

.metric-bottom {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.metric-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 600;
    color: #8C8F7A;
}

.trend-up {
    color: #8C8F7A;
}

.trend-down {
    color: #D9534F;
}

.metric-desc {
    font-family: var(--font-sans);
    font-size: 15px;
    color: #5C5C5C;
}

.admin-grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.admin-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.admin-card-title {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 600;
    color: #11142D;
    margin: 0;
}

.admin-card-subtitle {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    color: #11142D;
    margin: 0 0 12px 0;
}

.admin-select {
    padding: 6px 12px;
    border: 1px solid #E5DFD5;
    border-radius: 6px;
    font-family: var(--font-sans);
    font-size: 13px;
    background: #fff;
    color: var(--text-dark);
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.btn-small {
    padding: 6px 14px;
    font-size: 13px;
    font-family: var(--font-sans);
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.btn-outline {
    background: #fff;
    border: 1px solid #D8DAD0;
    color: #6B5E53;
}

.btn-outline:hover {
    background: #F8F8F4;
    border-color: #C4CDBE;
}

/* Lists */
.admin-list {
    display: flex;
    flex-direction: column;
}

.admin-list-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid #F0ECE4;
}

.admin-list-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.admin-user-info, .admin-mem-info {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.admin-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.admin-user-name, .admin-mem-title {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    color: #6B5E53;
    margin-bottom: 2px;
}

.admin-user-email, .admin-mem-sub {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--text-muted);
}

.admin-time {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 2px;
}

.admin-mem-thumb {
    width: 72px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
}

/* Donut Chart */
.admin-chart-donut-wrap {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 24px auto;
}

.admin-donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.donut-label {
    font-family: var(--font-sans);
    font-size: 13px;
    color: #6B5E53;
    font-weight: 600;
}

.donut-val {
    font-family: var(--font-sans);
    font-size: 28px;
    font-weight: 700;
    color: #11142D;
    line-height: 1.2;
}

.admin-donut-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    font-family: var(--font-sans);
    font-size: 14px;
    padding: 4px 0;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 12px;
}

.legend-text {
    color: #6B5E53;
    font-weight: 500;
    flex: 1;
}

.legend-vals {
    color: #5C5C5C;
    font-weight: 600;
}

/* Storage */
.admin-storage-top {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.storage-text {
    font-family: var(--font-sans);
    font-size: 15px;
    color: #5C5C5C;
}

.storage-text strong {
    font-size: 16px;
    font-weight: 700;
    color: #11142D;
}

.storage-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.storage-bar {
    flex: 1;
    height: 12px;
    background: #D8DAD0;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.storage-bar::after {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 24.5%;
    background: #8C8F7A;
    border-radius: 10px;
}

.storage-pct {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    color: #11142D;
}

.storage-breakdown {
    display: flex;
    flex-direction: column;
}

.sb-item {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-sans);
    font-size: 14px;
    color: #5C5C5C;
    padding: 14px 0;
    border-bottom: 1px solid #F0ECE4;
}

.sb-item strong {
    font-weight: 600;
    color: #11142D;
}

.sb-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Table */
.admin-table-wrap {
    overflow-x: auto;
    width: 100%;
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 800px;
}

.admin-table thead th {
    text-align: left;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    color: #6B5E53;
    padding: 16px;
    background: #E5E0D5;
    border-top: 1px solid #6B5E53;
    border-bottom: 1px solid #6B5E53;
}

.admin-table thead th:first-child {
    border-left: 1px solid #6B5E53;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.admin-table thead th:last-child {
    border-right: 1px solid #6B5E53;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.admin-table td {
    padding: 16px;
    border-bottom: 1px solid #EAE6DF;
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--text-dark);
    vertical-align: middle;
}

.table-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.tu-name {
    font-weight: 600;
}

.tu-email {
    font-size: 12px;
    color: var(--text-muted);
}

.tm-date {
    font-weight: 600;
}

.tm-time {
    font-size: 12px;
    color: var(--text-muted);
}

.badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-progress {
    background: #E8F5E9;
    color: #4CAF50;
}

.badge-completed {
    background: #E0F2F1;
    color: #009688;
}

.badge-pending {
    background: #FFF3E0;
    color: #FF9800;
}

.badge-paid {
    background: #E8F5E9;
    color: #4CAF50;
}

/* Admin Top Actions */
.admin-top-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.admin-btn-filter {
    background-color: #FFF;
    border: 1px solid #D8DAD0;
    border-radius: 8px;
    padding: 8px 16px;
    color: #6B5E53;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}
.admin-btn-filter:hover {
    background-color: #F8F8F4;
    border-color: #D8DAD0;
    color: #6B5E53;
}
.admin-top-select-wrap {
    position: relative;
}
.admin-top-select {
    background-color: #FFF;
    border: 1px solid #D8DAD0;
    border-radius: 8px;
    padding: 8px 36px 8px 16px;
    color: #0056D2; /* Match blue text from screenshot */
    font-weight: 600;
    font-size: 14px;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236B5E53' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}
.admin-top-select:focus {
    outline: none;
    border-color: #8C8F7A;
}
.admin-btn-export {
    background-color: #FFF;
    border: 1px solid #D8DAD0;
    border-radius: 8px;
    padding: 8px 16px;
    color: #002244; /* Dark blue from screenshot */
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}
.admin-btn-export:hover {
    background-color: #F8F8F4;
    border-color: #D8DAD0;
    color: #002244;
}

/* --- Admin Users Page Styles --- */
.filter-label {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: #11142D;
    margin-bottom: 8px;
}
.filter-select {
    width: 100%;
    border: 1px solid #D8DAD0;
    border-radius: 8px;
    padding: 10px 16px;
    font-family: var(--font-sans);
    font-size: 14px;
    color: #6B5E53;
}
.badge-role {
    display: inline-block;
    padding: 4px 10px;
    background-color: #D3E0D1;
    color: #45553E;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
}
.badge-status {
    display: inline-block;
    padding: 4px 10px;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
}
.badge-active {
    background-color: #D3E0D1;
    color: #45553E;
}
.badge-pending {
    background-color: #FDEBE5;
    color: #E57351;
}

.badge-gender-girl {
    display: inline-block;
    padding: 4px 10px;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    background-color: #FDEBE5;
    color: #E57351;
}

.badge-gender-boy {
    display: inline-block;
    padding: 4px 10px;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    background-color: #EAF0F6;
    color: #4A90E2;
}
.children-avatars {
    display: flex;
    align-items: center;
}
.child-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #FFF;
    margin-left: -8px;
}
.child-avatar:first-child {
    margin-left: 0;
}
.child-more {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #D8DAD0;
    color: #6B5E53;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #FFF;
    margin-left: -8px;
    z-index: 10;
}

/* Pagination */
.admin-pagination-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-top: 1px solid #E2E1D8;
    background-color: #FFF;
}
.pagination-info {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: #11142D;
}
.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-page {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid #D8DAD0;
    border-radius: 6px;
    background-color: #FFF;
    color: #6B5E53;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}
.btn-page:hover {
    background-color: #F8F8F4;
    color: #11142D;
}
.btn-page.disabled {
    opacity: 0.5;
    pointer-events: none;
}
.page-numbers {
    display: flex;
    gap: 4px;
}
.btn-page.num {
    padding: 6px 10px;
}
.btn-page.num.active {
    background-color: #6B5E53;
    color: #FFF;
    border-color: #6B5E53;
}
.btn-page.num.active:hover {
    background-color: #6B5E53;
    color: #FFF;
}

/* Admin Responsive */
@media (max-width: 1200px) {
    .admin-metrics-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .admin-grid-2 {
        grid-template-columns: 1fr;
    }
    .admin-grid-3 {
        grid-template-columns: 1fr;
    }
    .admin-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .admin-metrics-grid {
        grid-template-columns: 1fr;
    }
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}
