:root {
    --primary-gold: #d4af37;
    --deep-red: #b91c1c;
    --text-soft: #4B5563;
    --label-gray: #374151;
    --post-green: #15803d;
}

/* ── Reset box-sizing și overflow ───────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    /* Previne overflow orizontal pe mobile */
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    background-color: #fcfaf7;
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── Titlu editorial în pagină ─────────────────────────── */
.page-title-wrap {
    text-align: center;
    padding: 20px 0 16px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 14px;
}

.page-title {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #92400e;
    letter-spacing: 3px;
    text-transform: uppercase;
    line-height: 1.2;
}

.page-title-year {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: .75rem;
    font-weight: 700;
    color: #d4af37;
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-top: 4px;
}

/* ── NAV action buttons ────────────────────────────────── */
.nav-action-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 10px;
    border-radius: 10px;
    background: #f3f4f6;
    border: none;
    cursor: pointer;
    color: #6b7280;
    font-weight: 700;
    font-size: .78rem;
    transition: all .2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-action-btn:hover {
    background: #fef3c7;
    color: #92400e;
}

.nav-action-btn.post-toggle-active {
    background: linear-gradient(135deg, #15803d 0%, #16a34a 100%) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(21,128,61,.3);
}

.nav-action-btn.search-active {
    background: #fef3c7;
    color: #92400e;
}

/* Icoana din nav buttons */
.nav-icon {
    font-size: .85rem;
    flex-shrink: 0;
}

/* Text lângă icoană */
.nav-action-label {
    font-size: .75rem;
}

/* Buton auth */
.nav-auth-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 10px;
    background: #78350f;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: .8rem;
    transition: background .2s;
    white-space: nowrap;
}

.nav-auth-btn:hover {
    background: #92400e;
}

.nav-auth-label {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Nav responsive ────────────────────────────────────── */
#monthDisplay {
    min-width: 60px;
    text-align: center;
}

/* Mobile: butoane mai mari, spațiere mai generoasă pentru tap confortabil */
@media (max-width: 767px) {
    /* Nav gap mai mare între grupuri */
    nav .flex.items-center.gap-1 {
        gap: 8px;
    }
    /* Buton post (icoană + text scurt) */
    #postToggleBtn {
        padding: 8px 12px;
        gap: 5px;
    }
    /* Buton căutare (doar icoană) */
    #searchBtn {
        padding: 8px 14px;
    }
    /* Buton auth (doar icoană) */
    .nav-auth-btn {
        padding: 8px 14px;
        gap: 0;
    }
    #monthDisplay {
        min-width: 56px;
        font-size: .75rem;
    }
}

/* ── Calendar grid ─────────────────────────────────────── */
.weekday-header {
    font-family: 'Cinzel', serif;
    font-size: .9rem;
    font-weight: 700;
    color: #92400e;
    text-align: center;
    padding: 12px 0;
    letter-spacing: 1.5px;
}

.weekday-header.is-today-col {
    color: #92400e;
    background: #fef3c7;
    border-radius: 10px;
}

.weekday-header.is-today-col::after { display: none; }

.day-card {
    transition: all .3s ease;
    min-height: 140px;
    background: white;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.is-today-tile {
    background-color: #fef3c7 !important;
    border: 1px solid var(--primary-gold) !important;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: .5rem;
}

.day-number {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--text-soft);
    font-weight: 900;
    line-height: 1;
}

.saint-text {
    font-size: .78rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 500;
    color: #4b5563;
}

.post-tag {
    font-size: .75rem;
    font-weight: 800;
    color: var(--post-green);
    background: #f0fdf4;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    margin: auto auto 4px auto;
    width: fit-content;
}

.cruce-rosie  { border-top: 5px solid var(--deep-red); background: #fff5f5; }
.cruce-neagra { border-top: 5px solid #1f2937; background: #ffffff; }
.zi-simpla    { border-top: 5px solid #e5e7eb; background: #ffffff; }

.day-card.post-hidden {
    opacity: .25 !important;
    filter: grayscale(100%) !important;
    pointer-events: none !important;
    cursor: default !important;
}

.month-chip { padding: 10px; text-align: center; border-radius: 10px; background: #f3f4f6; font-weight: 700; cursor: pointer; font-size: .7rem; }
.month-chip.active { background: #1f2937; color: white; }

footer a { color: #92400e; font-size: .8rem; font-weight: 600; margin: 0 10px; cursor: pointer; }

/* ── Modal zi — SHEET sul mobile, centrat pe desktop ───── */
.modal-day-box {
    position: relative;
    background: white;
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    -webkit-overflow-scrolling: touch;
}

.modal-mobile-arrows {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: white;
    border-top: 1px solid #f3f4f6;
    z-index: 61;
}

.modal-arrow-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #92400e;
    font-size: 1rem;
    transition: background .2s;
}

.modal-arrow-btn:hover { background: #fef3c7; }

/* Spazio extra in fondo per le frecce mobile */
#modalContent { padding-bottom: 70px; }

/* Desktop: card centrat */
@media (min-width: 768px) {
    .modal-day-box {
        max-width: 512px;
        height: auto;
        max-height: 90vh;
        border-radius: 24px;
        padding: 24px;
        margin: 16px;
        display: block;
        overflow-y: auto;
    }

    #modalContent { display: block; padding-bottom: 0; }

    .modal-fixed-header {
        padding: 0;
        border-bottom: none;
        background: transparent;
    }
    .modal-fixed-header > div { margin-bottom: 1.5rem; }

    .modal-scroll-body { overflow: visible; padding: 0; }

    .wa-share-btn { display: block !important; }

    .modal-mobile-arrows { display: none !important; }
}

/* Săgeți desktop — poziționate față de viewport, nu de modal */
#arrowPrevDesktop,
#arrowNextDesktop {
    position: fixed !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 60;
}

#arrowPrevDesktop { left: calc(50% - 256px - 56px); }
#arrowNextDesktop { right: calc(50% - 256px - 56px); }

/* ── Modal sheet (profil + auth) ───────────────────────── */
/* Mobile: slide up dal basso */
.modal-sheet-box {
    position: relative;
    background: white;
    width: 100%;
    max-height: 92vh;
    border-radius: 24px;
    overflow-y: auto;
    padding: 24px 20px 32px;
    -webkit-overflow-scrolling: touch;
}

/* Desktop: centered card */
@media (min-width: 768px) {
    .modal-sheet-box {
        max-width: 400px;
        max-height: 90vh;
        border-radius: 24px;
        margin: 16px;
    }
}

/* ── Modal zi ──────────────────────────────────────────── */
.attr-card {
    padding: .9rem;
    border-radius: .85rem;
    border: 1px solid rgba(0,0,0,.05);
    margin-bottom: .7rem;
    transition: all .2s ease;
}
.attr-card:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,.06); }
.attr-card.highlight { background: linear-gradient(135deg, #d4af37 0%, #b48a04 100%); border: none; }
.attr-card.highlight .label-style { color: rgba(255,255,255,.9); }
.attr-card.highlight p { color: white; font-style: italic; font-weight: 500; }
.label-style { font-size: 12px; font-weight: 800; color: var(--label-gray); text-transform: uppercase; letter-spacing: .5px; margin-bottom: .2rem; display: block; }
.attr-text { font-size: .85rem; color: #1f2937; line-height: 1.4; }
.alt-1 { background: #ffffff; border: 1px solid #e5e7eb; }
.alt-2 { background: #f3f4f6; border: 1px solid #e5e7eb; }

/* ── Auth / inputs ─────────────────────────────────────── */
.auth-tab { padding: 8px 16px; border-radius: 8px; font-size: .8rem; font-weight: 700; cursor: pointer; transition: all .2s; color: #6b7280; }
.auth-tab.active { background: #78350f; color: white; }

/* CRITICA: font-size minimo 16px su tutti gli input
   previene il zoom automatico iOS */
.auth-input,
.profile-input,
.search-input-field {
    font-size: 16px !important;
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 14px;
    outline: none;
    transition: border .2s;
    font-family: 'Inter', sans-serif;
    background: #fafafa;
    /* Previne scalare il contenuto */
    -webkit-appearance: none;
    appearance: none;
}

.auth-input:focus,
.profile-input:focus {
    border-color: #d4af37;
    background: white;
}

.profile-input:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.auth-submit {
    width: 100%;
    background: linear-gradient(135deg, #78350f, #92400e);
    color: white;
    font-weight: 700;
    padding: 12px;
    border-radius: 10px;
    font-size: 1rem;
    transition: opacity .2s;
    cursor: pointer;
    border: none;
    -webkit-appearance: none;
}
.auth-submit:hover { opacity: .9; }

.auth-divider { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: #9ca3af; font-size: .75rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: #e5e7eb; }

.oauth-btn {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 11px;
    font-size: .9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .2s;
    margin-bottom: 8px;
    cursor: pointer;
    background: white;
    -webkit-appearance: none;
}
.oauth-btn:hover { background: #f9fafb; }
.auth-message { font-size: .85rem; text-align: center; margin-top: 10px; min-height: 20px; }

/* ── Profil ────────────────────────────────────────────── */
.profile-label { font-size: .75rem; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; display: block; }
.profile-save-btn {
    width: 100%;
    background: linear-gradient(135deg, #78350f, #92400e);
    color: white;
    font-weight: 700;
    padding: 12px;
    border-radius: 10px;
    font-size: 1rem;
    transition: opacity .2s;
    margin-top: 4px;
    cursor: pointer;
    border: none;
    -webkit-appearance: none;
}
.profile-save-btn:hover { opacity: .9; }
.profile-message { font-size: .85rem; text-align: center; margin-top: 10px; min-height: 20px; }
.profile-avatar { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, #78350f, #d4af37); display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }

/* spinners date ─────────────────────────────────────────── */
#profileBirthDay::-webkit-inner-spin-button,
#profileBirthDay::-webkit-outer-spin-button,
#profileBirthYear::-webkit-inner-spin-button,
#profileBirthYear::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
#profileBirthDay, #profileBirthYear { -moz-appearance: textfield; }
#profileBirthMonth { cursor: pointer; background-image: none; font-size: 16px !important; }

/* ── SEARCH PANEL ──────────────────────────────────────── */
/* Mobile: full screen */
.search-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    /* Full width su mobile, 400px su desktop */
    width: 100%;
    background: white;
    z-index: 45;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
}

.search-panel.open {
    transform: translateX(0);
}

/* Desktop: panel laterale */
@media (min-width: 768px) {
    .search-panel {
        width: 400px;
        border-radius: 24px 0 0 24px;
        box-shadow: -8px 0 40px rgba(0,0,0,.15);
    }
}

.search-panel-header {
    padding: 20px 16px 14px;
    border-bottom: 1px solid #f3f4f6;
    flex-shrink: 0;
}

.search-panel-title {
    font-family: 'Cinzel', serif;
    font-size: .95rem;
    font-weight: 700;
    color: #92400e;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.search-panel-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f3f4f6;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    font-size: 1rem;
    transition: all .2s;
    flex-shrink: 0;
    -webkit-appearance: none;
}
.search-panel-close:hover { background: #fef3c7; color: #92400e; }

.search-input-wrap { position: relative; }

.search-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: .9rem;
    pointer-events: none;
}

.search-input-field {
    width: 100%;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    /* CRITICA: 16px per prevenire zoom iOS */
    font-size: 16px !important;
    padding: 12px 14px 12px 40px;
    outline: none;
    font-family: 'Inter', sans-serif;
    background: #fafafa;
    transition: border .2s, background .2s;
    -webkit-appearance: none;
    appearance: none;
}
.search-input-field:focus { border-color: #d4af37; background: white; }

.search-count { font-size: .8rem; color: #9ca3af; margin-top: 8px; min-height: 18px; }

.search-results {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px;
}

.search-results::-webkit-scrollbar { width: 4px; }
.search-results::-webkit-scrollbar-track { background: #f9fafb; }
.search-results::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 4px; }
.search-results::-webkit-scrollbar-thumb:hover { background: #d4af37; }

.search-result-card {
    background: white;
    border-radius: 14px;
    padding: 14px 12px 14px 0;
    border: 1px solid #f3f4f6;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    transition: all .2s;
    margin-bottom: 10px;
    overflow: hidden;
    /* Evita che il tap attivi zoom */
    -webkit-tap-highlight-color: transparent;
}
.search-result-card:hover,
.search-result-card:active { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,.08); border-color: #d4af37; }
.search-result-card:last-child { margin-bottom: 0; }

.search-result-stripe { width: 5px; align-self: stretch; border-radius: 0 4px 4px 0; flex-shrink: 0; }
.search-result-date { min-width: 42px; text-align: center; flex-shrink: 0; }
.search-result-day { font-family: 'Playfair Display', serif; font-weight: 900; font-size: 1.6rem; color: #92400e; line-height: 1; }
.search-result-month { font-size: .65rem; font-weight: 700; color: #d4af37; text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }
.search-result-body { flex: 1; min-width: 0; }
.search-result-name { font-size: .85rem; font-weight: 600; color: #1f2937; line-height: 1.4; }
.search-result-post { font-size: .65rem; font-weight: 800; color: #15803d; background: #f0fdf4; padding: 2px 7px; border-radius: 4px; text-transform: uppercase; margin-top: 5px; display: inline-block; }
.search-result-arrow { color: #d4af37; font-size: .75rem; flex-shrink: 0; align-self: center; }

.search-empty { text-align: center; color: #9ca3af; font-size: .9rem; padding: 40px 20px; line-height: 1.7; }
.search-empty-icon { font-size: 2.2rem; color: #e5e7eb; display: block; margin-bottom: 12px; }

.search-loading { text-align: center; padding: 40px 20px; }
.search-loading-spinner { width: 28px; height: 28px; border: 3px solid #f3f4f6; border-top-color: #d4af37; border-radius: 50%; animation: spin .7s linear infinite; margin: 0 auto 12px; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive calendar ────────────────────────────────── */
@media (max-width: 640px) {
    .weekday-container { display: none !important; }
    #calendarGrid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
    .day-card { min-height: 130px !important; }
    .mobile-day-label { display: block; font-size: .6rem; font-weight: 800; color: var(--primary-gold); text-transform: uppercase; margin-bottom: 4px; }
    .page-title { font-size: 1.05rem; letter-spacing: 2px; }
    .page-title-year { font-size: .65rem; letter-spacing: 4px; }
    .day-number { font-size: 1.5rem; }
}

@media (min-width: 641px) {
    .mobile-day-label { display: none; }
}

/* ── Newsletter toggle ─────────────────────────────────── */
.newsletter-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.newsletter-desc {
    display: block;
    font-size: .72rem;
    color: #9ca3af;
    margin-top: 1px;
}

/* Toggle switch */
.toggle-btn {
    position: relative;
    width: 48px;
    height: 26px;
    border-radius: 999px;
    background: #d1d5db;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .25s;
    -webkit-appearance: none;
    padding: 0;
}

.toggle-btn.on {
    background: linear-gradient(135deg, #15803d, #16a34a);
}

.toggle-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
    transition: transform .25s;
    display: block;
}

.toggle-btn.on .toggle-knob {
    transform: translateX(22px);
}

/* ══════════════════════════════════════════════════════════
   FEED LAYOUT — Mobile full-width (< 768px)
══════════════════════════════════════════════════════════ */
.feed-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px 0 24px;
}

.feed-card {
    background: white;
    border-radius: 16px;
    padding: 0;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
    -webkit-tap-highlight-color: transparent;
}

.feed-card:active {
    transform: scale(.985);
    box-shadow: 0 3px 12px rgba(0,0,0,.1);
}

.feed-card.post-hidden {
    opacity: .25 !important;
    filter: grayscale(100%) !important;
    pointer-events: none !important;
}

.feed-card-today {
    box-shadow: 0 0 0 2px #d4af37, 0 4px 16px rgba(212,175,55,.2) !important;
    background: #fffef5 !important;
}

/* Bordura colorată stânga */
.feed-stripe {
    width: 5px;
    flex-shrink: 0;
    border-radius: 0;
}

/* Data: zi + prescurtare zi săptămână */
.feed-left {
    width: 56px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 4px;
    border-right: 1px solid #f3f4f6;
}

.feed-day {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 900;
    color: #92400e;
    line-height: 1;
}

.feed-dow {
    font-size: .58rem;
    font-weight: 800;
    color: #d4af37;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 3px;
}

/* Conținut: nume + meta + reflecție */
.feed-right {
    flex: 1;
    min-width: 0;
    padding: 12px 8px 12px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.feed-name {
    font-size: .83rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.feed-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
    flex-wrap: wrap;
}

.feed-post {
    font-size: .6rem;
    font-weight: 800;
    color: #15803d;
    background: #f0fdf4;
    padding: 2px 7px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.feed-cross {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1;
    vertical-align: middle;
}
.feed-cross-red   { color: #b91c1c; }
.feed-cross-black { color: #1f2937; }

.feed-reflect {
    font-size: .72rem;
    color: #9ca3af;
    font-style: italic;
    margin-top: 4px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Săgeată dreapta */
.feed-arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 0 12px;
    color: #e5e7eb;
    font-size: .7rem;
    transition: color .15s;
}

.feed-card:hover .feed-arrow,
.feed-card:active .feed-arrow {
    color: #d4af37;
}

/* Pe desktop ascunde feed layout dacă cumva apare */
@media (min-width: 768px) {
    .feed-list {
        display: none !important;
    }
}

/* ── Checkbox termeni și condiții ──────────────────────── */
.terms-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    padding: 10px 12px;
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.terms-checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 1px;
    accent-color: #78350f;
    cursor: pointer;
}

.terms-checkbox-row label {
    font-size: .82rem;
    color: #4b5563;
    line-height: 1.4;
    cursor: pointer;
}

.terms-link {
    color: #92400e;
    font-weight: 700;
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
    font-size: .82rem;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

.terms-link:hover {
    color: #78350f;
}

/* Buton dezactivat */
.auth-submit:disabled,
.oauth-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Modal statics (Termeni / Confidențialitate) ────────── */
.statics-modal-box {
    position: relative;
    background: white;
    width: 100%;
    max-height: 92vh;
    border-radius: 24px 24px 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (min-width: 768px) {
    .statics-modal-box {
        max-width: 640px;
        max-height: 85vh;
        border-radius: 24px;
        margin: 16px;
    }
}

.statics-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid #f3f4f6;
    flex-shrink: 0;
}

.statics-modal-title {
    font-family: 'Cinzel', serif;
    font-size: .95rem;
    font-weight: 700;
    color: #92400e;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.statics-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px 32px;
    -webkit-overflow-scrolling: touch;
    font-size: .88rem;
    color: #374151;
    line-height: 1.7;
}

/* Formatare HTML din DB */
.statics-modal-body h2 {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 700;
    color: #92400e;
    margin: 20px 0 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.statics-modal-body h3 {
    font-size: .9rem;
    font-weight: 700;
    color: #1f2937;
    margin: 16px 0 6px;
}

.statics-modal-body p {
    margin-bottom: 12px;
}

.statics-modal-body ul {
    margin: 6px 0 12px 20px;
    list-style: disc;
}

.statics-modal-body ul li {
    margin-bottom: 4px;
}

.statics-modal-body strong {
    font-weight: 700;
    color: #1f2937;
}

.statics-modal-body .last-updated {
    font-size: .78rem;
    color: #9ca3af;
    margin-bottom: 20px;
    font-style: italic;
}

/* ── Mesaj email duplicat ──────────────────────────────── */
.duplicate-email-box {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-left: 4px solid #f97316;
    border-radius: 10px;
    padding: 12px 14px;
    text-align: left;
    font-size: .82rem;
    color: #374151;
    line-height: 1.5;
}

.duplicate-email-box strong {
    color: #92400e;
    display: block;
    margin-bottom: 4px;
}

.duplicate-email-box p {
    margin: 0 0 10px;
}

.duplicate-email-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dup-btn-login {
    flex: 1;
    background: #78350f;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: .78rem;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background .2s;
}

.dup-btn-login:hover { background: #92400e; }

.dup-btn-reset {
    flex: 1;
    background: white;
    color: #78350f;
    border: 1.5px solid #d6b4a0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: .78rem;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all .2s;
}

.dup-btn-reset:hover { background: #fff7ed; border-color: #92400e; }

/* ── Reset parolă ──────────────────────────────────────── */
.reset-message {
    font-size: .82rem;
    text-align: center;
    margin-top: 10px;
    min-height: 20px;
    display: block;
}

/* ── Toast de succes ───────────────────────────────────── */
.toast-hidden {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: all .4s cubic-bezier(.4,0,.2,1);
    width: calc(100% - 32px);
    max-width: 420px;
}

.toast-visible {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    z-index: 100;
    opacity: 1;
    pointer-events: auto;
    transition: all .4s cubic-bezier(.4,0,.2,1);
    width: calc(100% - 32px);
    max-width: 420px;
}

.toast-content {
    background: white;
    border-radius: 16px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,.15), 0 0 0 1px rgba(0,0,0,.05);
    border-left: 4px solid #15803d;
}

.toast-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.toast-msg {
    flex: 1;
    font-size: .88rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
    margin: 0;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #9ca3af;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
    transition: color .2s;
}

.toast-close:hover { color: #374151; }

/* ── Cookie Banner ─────────────────────────────────────── */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 90;
    background: rgba(255,255,255,0.97);
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 24px rgba(0,0,0,.08);
    backdrop-filter: blur(8px);
    padding: 14px 20px;
    transform: translateY(100%);
    transition: transform .4s cubic-bezier(.4,0,.2,1);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner.hidden {
    display: block !important;
    transform: translateY(100%);
    pointer-events: none;
}

.cookie-banner-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.cookie-banner-text {
    flex: 1;
    font-size: .82rem;
    color: #4b5563;
    line-height: 1.5;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cookie-banner-icon {
    color: #d4af37;
    font-size: .9rem;
    flex-shrink: 0;
}

.cookie-banner-link {
    background: none;
    border: none;
    color: #92400e;
    font-weight: 700;
    font-size: .82rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.cookie-banner-link:hover { color: #78350f; }

.cookie-banner-btn {
    background: #78350f;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 9px 22px;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background .2s;
    white-space: nowrap;
    flex-shrink: 0;
    -webkit-appearance: none;
}

.cookie-banner-btn:hover { background: #92400e; }

@media (max-width: 640px) {
    .cookie-banner-content {
        gap: 10px;
    }
    .cookie-banner-btn {
        width: 100%;
        text-align: center;
        padding: 10px;
    }
}

/* ── Avatar navbar ─────────────────────────────────────── */
.nav-avatar-img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #d4af37;
    box-shadow: 0 0 0 1px rgba(212,175,55,0.3);
}

/* Buton auth când user e logat — fundal transparent, border subtil */
.nav-auth-btn-loggedin {
    background: transparent !important;
    border: 1.5px solid rgba(120,53,15,0.25) !important;
    color: #78350f !important;
    box-shadow: none !important;
}

.nav-auth-btn-loggedin:hover {
    background: #fef3c7 !important;
    border-color: #d4af37 !important;
}

/* Când e logat, labelul devine maro închis (vizibil pe fundal deschis) */
.nav-auth-btn-loggedin .nav-auth-label {
    color: #78350f;
}

/* ── Avatar profil ─────────────────────────────────────── */
.profile-avatar-wrap {
    position: relative;
    width: 64px;
    height: 64px;
    margin: 0 auto 4px;
    cursor: pointer;
    border-radius: 50%;
}

.profile-avatar-wrap:hover .avatar-edit-overlay {
    opacity: 1;
}

.avatar-edit-overlay {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .2s;
    color: white;
    font-size: .85rem;
}

/* ── Auth modal centrat pe mobile ─────────────────────── */
.modal-centered-box {
    border-radius: 24px !important;
    max-height: 90vh;
    overflow-y: auto;
}

/* Fix 1: Butoane dezabonare — Renunță mai mic, Dezabonează pe un rând */
#unsubscribeModal .w-full:first-child {
    flex: 0 0 auto;
    width: auto;
    padding-left: 20px;
    padding-right: 20px;
    white-space: nowrap;
}

#unsubscribeModal [onclick="confirmUnsubscribe()"] {
    white-space: nowrap;
    flex: 1;
}

/* ── Schimbă parola — trigger expandabil ──────────────── */
.change-password-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: .85rem;
    font-weight: 600;
    color: #92400e;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background .2s, border-color .2s;
    text-align: left;
}

.change-password-trigger:hover {
    background: #fef3c7;
    border-color: #d4af37;
}

.change-password-chevron {
    font-size: .75rem;
    color: #9ca3af;
}

/* ══════════════════════════════════════════════════════════
   MOBILE — Nav fix, pagina scrollează normal
══════════════════════════════════════════════════════════ */
@media (max-width: 767px) {

    html {
        overflow-y: auto;
    }

    body {
        overflow-y: visible;
        min-height: unset;
    }

    footer {
        display: none !important;
    }
}

/* ══════════════════════════════════════════════════════════
   MOBILE ONLY — Fix 3: nav fix + Fix 4: modal header fix + Fix 5: WA bar
══════════════════════════════════════════════════════════ */
@media (max-width: 767px) {

    /* ── Fix 3: pagina nu scrollează, main scrollează ── */
    html, body {
        height: 100%;
        overflow: hidden;
    }

    main {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        height: calc(100% - 52px); /* 100% minus nav */
        padding-bottom: 24px;
    }

    footer { display: none !important; }

    /* ── Fix 4: modal header fix + scroll body ── */
    #modalContent { display: contents; }

    .modal-fixed-header {
        flex-shrink: 0;
        background: white;
        border-bottom: 2px solid #f3f4f6;
        padding-top: 48px;
    }

    .modal-scroll-body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 16px 16px 88px;
    }

    /* ── Fix 5: WA în bara de jos, ascuns în scroll body ── */
    .wa-share-btn { display: none !important; }

    .modal-mobile-arrows {
        display: flex !important;
        align-items: center;
        gap: 8px;
        padding: 10px 12px;
    }

    .modal-wa-btn {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        height: 48px;
        border-radius: 12px;
        background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
        border: none;
        color: white;
        font-weight: 700;
        font-size: .82rem;
        cursor: pointer;
        font-family: 'Inter', sans-serif;
        -webkit-tap-highlight-color: transparent;
    }

    .modal-wa-btn i { font-size: 1.1rem; }
    .modal-wa-btn:active { opacity: .85; }
}

/* ══════════════════════════════════════════════════════════
   MOBILE — Footer fix jos în pagina lunii + footer în modal
══════════════════════════════════════════════════════════ */
@media (max-width: 767px) {

    /* Footer pagină — fix jos, mereu vizibil */
    .mobile-footer-bar {
        position: fixed !important;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 38;
        margin: 0 !important;
        padding: 10px 16px !important;
        background: white !important;
        border-top: 1px solid #e5e7eb !important;
        display: flex !important;
        justify-content: center;
        gap: 0;
    }

    .mobile-footer-bar a {
        color: #92400e;
        font-size: .72rem;
        font-weight: 600;
        cursor: pointer;
        padding: 0 10px;
        border-right: 1px solid #e5e7eb;
        line-height: 1;
    }

    .mobile-footer-bar a:last-child {
        border-right: none;
    }

    /* Compensare pentru footer fix jos — feed-ul să nu fie acoperit */
    #calendarGrid {
        padding-bottom: 48px;
    }

    /* Modal — bara de jos cu două rânduri */
    .modal-mobile-arrows {
        flex-direction: column !important;
        padding: 8px 12px 10px !important;
        gap: 6px !important;
    }

    .modal-bottom-nav-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        width: 100%;
    }

    .modal-bottom-footer-row {
        display: flex;
        justify-content: center;
        gap: 0;
        width: 100%;
        padding-top: 4px;
        border-top: 1px solid #f3f4f6;
    }

    .modal-bottom-footer-row a {
        color: #92400e;
        font-size: .68rem;
        font-weight: 600;
        cursor: pointer;
        padding: 0 10px;
        border-right: 1px solid #e5e7eb;
        line-height: 1;
    }

    .modal-bottom-footer-row a:last-child {
        border-right: none;
    }
}

/* ── Profile actions grid (Deconectare + Șterge cont) ───── */
.profile-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.profile-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 13px 10px;
    border-radius: 12px;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: opacity .15s, transform .15s;
    border: none;
    -webkit-tap-highlight-color: transparent;
}

.profile-action-btn:active {
    transform: scale(.97);
    opacity: .85;
}

.profile-action-sub {
    font-size: .65rem;
    font-weight: 400;
    opacity: .65;
    margin-top: 1px;
}

.profile-action-signout {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.profile-action-signout:hover {
    background: #e9ebee;
}

.profile-action-delete {
    background: #fff1f1;
    color: #A32D2D;
    border: 1px solid #fca5a5;
}

.profile-action-delete:hover {
    background: #ffe4e4;
}

/* Când admin: grid devine 1 coloană, butonul de ștergere ascuns */
.profile-actions-grid.admin-only {
    grid-template-columns: 1fr;
}
