/* ============================================================
   JORNAL DE SERMÓN — ADMIN PRO / VISUAL JOURNAL
   ============================================================ */

:root {
    --black: #1C1E21;
    --navy: #1B263B;
    --linen: #F4F1EA;
    --paper: #FCFAF6;
    --white: #FFFFFF;
    --gold: #C5A059;
    --gold-dark: #9C7338;
    --soft: #6B655E;
    --line: rgba(28,30,33,.15);
    --danger: #8F3D35;
    --olive: #56614D;
    --terracotta: #B85B35;
    --stone: #707B7C;
    --shadow: 0 18px 55px rgba(33,28,21,.11);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--black);
    background: radial-gradient(circle at 50% 0%, #fff 0%, var(--linen) 78%);
    font-family: "Montserrat", Arial, sans-serif;
}

body.modal-open { overflow: hidden; }

button, input, select { font: inherit; }

/* ================= HEADER ================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(252,250,246,.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 4px 24px rgba(0,0,0,.035);
}

.brand {
    padding: 28px 20px 20px;
    text-align: center;
}

.brand h1 {
    margin: 0;
    color: var(--black);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(2.15rem, 4.7vw, 4.6rem);
    font-weight: 500;
    line-height: .95;
    letter-spacing: .055em;
}

.ornament {
    width: min(560px, 74vw);
    margin: 14px auto 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gold-dark);
}

.ornament span {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold));
}

.ornament span:last-child {
    background: linear-gradient(to left, transparent, var(--gold));
}

.ornament b { font-weight: 400; }

.brand p {
    margin: 0;
    color: #625D57;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(.73rem, 1.15vw, 1rem);
    letter-spacing: .35em;
}

.brand p i {
    padding: 0 .2em;
    color: var(--gold-dark);
    font-style: normal;
}

.main-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(5px, 1.35vw, 19px);
    padding: 0 12px;
    overflow-x: auto;
    border-top: 1px solid rgba(28,30,33,.05);
}

.main-nav a,
.logout-form button,
.admin-state {
    min-width: max-content;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: .93rem;
    font-weight: 600;
    letter-spacing: .065em;
}

.main-nav a {
    position: relative;
    padding: 17px 8px 15px;
    color: #625D57;
    text-decoration: none;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 6px;
    width: 0;
    height: 2px;
    background: var(--gold-dark);
    transform: translateX(-50%);
    transition: width .22s ease;
}

.main-nav a:hover,
.main-nav a.active { color: var(--gold-dark); }

.main-nav a.active::after { width: calc(100% - 16px); }

.admin-login-link,
.admin-panel-link { color: var(--navy) !important; }

.admin-state {
    padding: 7px 9px;
    border: 1px solid rgba(156,115,56,.35);
    color: var(--gold-dark);
    background: rgba(197,160,89,.08);
}

.logout-form { margin: 0; }

.logout-form button {
    padding: 8px 4px;
    border: 0;
    background: transparent;
    color: #776f66;
    cursor: pointer;
}

.logout-form button:hover { color: var(--danger); }

/* ================= SHARED ================= */

.hero,
.notes-shell,
.content-shell,
.bookstore-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    padding: 84px 20px 110px;
    text-align: center;
}

.hero-pro {
    min-height: 570px;
}

.eyebrow,
.section-heading > span,
.editor-heading > span,
.book-page-card > span,
.auth-kicker,
.dashboard-welcome span,
.dashboard-panel-heading span {
    color: var(--gold-dark);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 700;
    letter-spacing: .18em;
}

.hero h2,
.section-heading h2,
.editor-heading h2,
.book-page-card h3,
.note-card h3,
.auth-card h1,
.dashboard-welcome h2,
.dashboard-panel-heading h2,
.recent-table h3 {
    font-family: "Cormorant Garamond", Georgia, serif;
    color: var(--navy);
}

.hero h2 {
    margin: 18px 0;
    font-size: clamp(2.8rem, 6vw, 5.4rem);
    line-height: .98;
    font-weight: 500;
}

.hero-copy {
    max-width: 700px;
    margin: 0 auto;
    color: var(--soft);
    line-height: 1.8;
}

.hero-actions,
.center-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.primary-btn,
.secondary-btn,
.danger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    padding: 13px 23px;
    cursor: pointer;
    font-size: .77rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-decoration: none;
    transition: .2s ease;
}

.primary-btn {
    border: 1px solid var(--gold-dark);
    background: var(--gold-dark);
    color: white;
}

.primary-btn:hover { background: #87622f; }

.secondary-btn {
    border: 1px solid var(--gold-dark);
    background: transparent;
    color: var(--gold-dark);
}

.secondary-btn:hover { background: rgba(197,160,89,.09); }

.danger-btn {
    border: 1px solid rgba(143,61,53,.55);
    background: transparent;
    color: var(--danger);
}

.danger-btn:hover {
    background: var(--danger);
    color: #fff;
}

.notes-shell,
.content-shell,
.bookstore-shell {
    padding: 48px 0 80px;
}

.section-heading {
    max-width: 820px;
    margin: 0 auto 32px;
    text-align: center;
}

.section-heading > span { font-size: .76rem; }

.section-heading h2 {
    margin: 4px 0 7px;
    font-size: clamp(2.5rem, 5vw, 4.3rem);
    font-weight: 500;
}

.section-heading p {
    margin: 0;
    color: var(--soft);
    line-height: 1.65;
}

.admin-notice {
    display: inline-block;
    padding: 8px 13px;
    border: 1px solid rgba(156,115,56,.3);
    background: rgba(197,160,89,.08);
}

/* ================= BOOKSTORE / COVER ================= */

.cover-stage,
.journal-stage {
    display: flex;
    justify-content: center;
    padding: clamp(15px, 3vw, 40px);
    background: rgba(255,255,255,.68);
    border: 1px solid rgba(197,160,89,.45);
    box-shadow: var(--shadow);
}

.journal-cover {
    position: relative;
    width: min(100%, 650px);
    aspect-ratio: 4 / 5.5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 70px 55px;
    color: #f8f2e6;
    text-align: center;
    background:
        radial-gradient(circle at 40% 22%, rgba(197,160,89,.11), transparent 30%),
        linear-gradient(145deg, #182435, #0f1826 70%);
    border: 1px solid #d2b77d;
    box-shadow: 0 24px 55px rgba(0,0,0,.22);
}

.journal-cover::before {
    content: "";
    position: absolute;
    inset: 20px;
    border: 1px solid rgba(197,160,89,.7);
}

.journal-cover::after {
    content: "";
    position: absolute;
    inset: 27px;
    border: 1px solid rgba(197,160,89,.25);
}

.cover-rule {
    width: 95px;
    height: 1px;
    margin-bottom: 25px;
    background: var(--gold);
}

.cover-small {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1rem;
    letter-spacing: .36em;
}

.journal-cover h3 {
    margin: 9px 0 12px;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(4rem, 10vw, 7.8rem);
    font-weight: 500;
    line-height: .85;
    letter-spacing: .07em;
}

.cover-diamond {
    margin: 5px 0 18px;
    color: var(--gold);
    font-size: 1.3rem;
}

.journal-cover > p {
    margin: 0;
    color: #d8c49d;
    font-family: "Cormorant Garamond", Georgia, serif;
    letter-spacing: .25em;
    line-height: 2;
}

.cover-scripture {
    max-width: 390px;
    margin-top: 55px;
    color: #e4dccf;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.25rem;
    font-style: italic;
    line-height: 1.5;
}

.cover-bottom {
    position: absolute;
    bottom: 52px;
    z-index: 1;
    color: #bfa574;
    font-size: .7rem;
    letter-spacing: .25em;
}

.journal-image {
    display: block;
    width: min(100%, 760px);
    height: auto;
    object-fit: contain;
    background: #fff;
    box-shadow: 0 18px 42px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.08);
}

/* ================= SEARCH / FAVORITES ================= */

.notes-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 210px 145px;
    gap: 12px;
    align-items: end;
    max-width: 1060px;
    margin: 0 auto 17px;
}

.notes-toolbar.with-admin {
    grid-template-columns: minmax(260px, 1fr) 190px 145px auto;
}

.search-box label,
.filter-box label,
#sermonForm label > span,
.auth-card label > span {
    display: block;
    margin-bottom: 6px;
    color: #554f48;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.02rem;
    font-weight: 700;
}

.search-box input,
.filter-box select,
#sermonForm input,
#sermonForm select,
.auth-card input {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid rgba(28,30,33,.21);
    background: #fff;
    color: var(--black);
    outline: none;
}

.search-box input:focus,
.filter-box select:focus,
#sermonForm input:focus,
#sermonForm select:focus,
.auth-card input:focus,
.message-editor:focus {
    border-color: var(--gold-dark);
    box-shadow: 0 0 0 3px rgba(197,160,89,.12);
}

.favorite-filter-btn {
    min-height: 46px;
    padding: 0 13px;
    border: 1px solid rgba(156,115,56,.42);
    background: rgba(255,255,255,.72);
    color: var(--gold-dark);
    cursor: pointer;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .08em;
}

.favorite-filter-btn.active {
    background: var(--gold-dark);
    color: #fff;
}

.result-summary {
    max-width: 1060px;
    min-height: 22px;
    margin: 0 auto 12px;
    color: var(--soft);
    font-size: .82rem;
}

/* ================= NOTE CARDS / CATEGORIES ================= */

.notes-list {
    display: grid;
    gap: 16px;
    max-width: 1060px;
    margin: 0 auto;
}

.note-card,
.loading-card,
.empty-card {
    position: relative;
    padding: 25px;
    background: rgba(255,255,255,.79);
    border: 1px solid rgba(197,160,89,.32);
    box-shadow: 0 9px 28px rgba(0,0,0,.05);
}

.note-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gold-dark);
}

.note-card.category-devocional::before { background: var(--olive); }
.note-card.category-estudio::before { background: var(--stone); }
.note-card.category-reflexion::before { background: var(--terracotta); }
.note-card.category-otro::before { background: #86755d; }

.note-card-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.note-card h3 {
    margin: 2px 0 6px;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 600;
}

.note-category {
    color: var(--gold-dark);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.category-devocional .note-category { color: var(--olive); }
.category-estudio .note-category { color: var(--stone); }
.category-reflexion .note-category { color: var(--terracotta); }

.favorite-btn {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(156,115,56,.28);
    border-radius: 50%;
    background: transparent;
    color: var(--gold-dark);
    cursor: pointer;
    font-size: 1.45rem;
    line-height: 1;
}

.favorite-btn.active {
    background: rgba(197,160,89,.09);
    color: #9c6238;
}

.note-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 16px;
    margin: 9px 0 13px;
    color: #766e64;
    font-size: .78rem;
}

.note-excerpt {
    margin: 0;
    color: #514c46;
    line-height: 1.7;
}

.note-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 17px;
}

.note-actions .primary-btn,
.note-actions .secondary-btn,
.note-actions .danger-btn {
    padding: 8px 12px;
    font-size: .68rem;
}

.loading-card,
.empty-card {
    text-align: center;
    color: var(--soft);
}

/* ================= PAGINATION ================= */

.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 30px;
}

.pagination a,
.pagination button {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(156,115,56,.36);
    background: rgba(255,255,255,.7);
    color: var(--gold-dark);
    text-decoration: none;
    cursor: pointer;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.08rem;
}

.pagination a:hover,
.pagination a.active,
.pagination button:hover,
.pagination button.active {
    background: var(--gold-dark);
    color: #fff;
}

.pagination .disabled {
    pointer-events: none;
    opacity: .28;
}

/* ================= EDITOR ================= */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(20,19,17,.6);
    backdrop-filter: blur(5px);
}

.modal-overlay.open { display: flex; }

.editor-modal {
    position: relative;
    width: min(930px, 100%);
    max-height: calc(100vh - 44px);
    overflow-y: auto;
    padding: clamp(24px, 4vw, 44px);
    background: var(--paper);
    border: 1px solid rgba(197,160,89,.55);
    box-shadow: 0 25px 90px rgba(0,0,0,.29);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 15px;
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    color: #6d665d;
    cursor: pointer;
    font-size: 2rem;
    line-height: 1;
}

.editor-heading {
    padding-right: 40px;
    margin-bottom: 24px;
}

.editor-heading h2 {
    margin: 3px 0 5px;
    font-size: clamp(2.3rem, 5vw, 3.9rem);
    font-weight: 500;
}

.editor-heading p {
    margin: 0;
    color: var(--soft);
}

#sermonForm label {
    display: block;
    margin-bottom: 15px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 14px;
}

.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 9px;
    border: 1px solid rgba(28,30,33,.18);
    border-bottom: 0;
    background: #f2eee6;
}

.editor-toolbar button {
    min-width: 40px;
    padding: 7px 10px;
    border: 1px solid rgba(28,30,33,.12);
    background: #fff;
    color: #4f4a44;
    cursor: pointer;
}

.message-editor {
    min-height: 340px;
    padding: 20px;
    border: 1px solid rgba(28,30,33,.18);
    background:
        linear-gradient(to bottom, transparent 34px, rgba(28,30,33,.085) 35px);
    background-size: 100% 35px;
    line-height: 35px;
    outline: none;
}

.message-editor:empty::before {
    content: attr(data-placeholder);
    color: #a39b91;
}

.editor-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.status-text {
    margin-right: auto;
    color: var(--soft);
    font-size: .82rem;
}

/* ================= AUTH ================= */

.auth-body {
    display: grid;
    place-items: center;
    padding: 24px;
    background: radial-gradient(circle at top, #fff 0%, var(--linen) 72%);
}

.auth-shell { width: min(520px, 100%); }

.auth-card {
    padding: clamp(28px, 6vw, 48px);
    background: rgba(252,250,246,.97);
    border: 1px solid rgba(197,160,89,.5);
    box-shadow: var(--shadow);
}

.auth-kicker {
    display: block;
    margin-bottom: 7px;
    text-align: center;
    font-size: .75rem;
}

.auth-card h1 {
    margin: 0 0 8px;
    text-align: center;
    font-size: clamp(2.7rem, 7vw, 4.3rem);
    font-weight: 500;
}

.auth-card > p {
    margin: 0 auto 26px;
    text-align: center;
    color: var(--soft);
    line-height: 1.65;
}

.auth-card label {
    display: block;
    margin-bottom: 15px;
}

.auth-submit {
    width: 100%;
    margin-top: 5px;
}

.auth-error,
.auth-success {
    margin-bottom: 18px;
    padding: 11px 13px;
    font-size: .85rem;
}

.auth-error {
    border: 1px solid rgba(143,61,53,.3);
    background: rgba(143,61,53,.07);
    color: var(--danger);
}

.auth-success {
    border: 1px solid rgba(74,116,72,.3);
    background: rgba(74,116,72,.07);
    color: #436740;
}

.auth-back {
    display: block;
    margin-top: 22px;
    text-align: center;
    color: var(--gold-dark);
    text-decoration: none;
    font-size: .85rem;
}

/* ================= VISUAL JOURNAL READER ================= */

.sermon-reader-page {
    background:
        radial-gradient(circle at 50% 10%, #fff, #ece7dd 72%);
}

.reader-page-toolbar {
    width: min(940px, calc(100% - 30px));
    margin: 22px auto 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.reader-page-toolbar a,
.reader-page-toolbar button {
    border: 0;
    background: transparent;
    color: #665e55;
    cursor: pointer;
    text-decoration: none;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
}

.reader-toolbar-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.favorite-page-btn.active {
    color: #9c6238;
}

.print-shell {
    width: min(940px, calc(100% - 30px));
    margin: 0 auto 65px;
}

.visual-journal-page {
    --accent: var(--gold-dark);
    width: 100%;
    min-height: 1180px;
    padding: 14px;
    background: #fffdfa;
    border: 1px solid rgba(156,115,56,.65);
    box-shadow: 0 26px 70px rgba(37,31,23,.17);
}

.visual-journal-page.category-devocional { --accent: var(--olive); }
.visual-journal-page.category-estudio { --accent: var(--stone); }
.visual-journal-page.category-reflexion { --accent: var(--terracotta); }
.visual-journal-page.category-otro { --accent: #86755d; }

.journal-inner-border {
    min-height: 1150px;
    padding: clamp(35px, 7vw, 75px);
    border: 1px solid color-mix(in srgb, var(--accent) 75%, white);
}

.visual-journal-header {
    text-align: center;
}

.visual-category {
    color: var(--accent);
    font-size: .76rem;
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
}

.visual-journal-header h1 {
    max-width: 800px;
    margin: 11px auto 15px;
    color: var(--navy);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(3rem, 7vw, 5.6rem);
    font-weight: 500;
    line-height: .93;
}

.visual-ornament {
    width: min(440px, 74%);
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
}

.visual-ornament span {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--accent));
}

.visual-ornament span:last-child {
    background: linear-gradient(to left, transparent, var(--accent));
}

.visual-verse {
    margin: 0;
    color: #60594f;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.25rem;
    font-style: italic;
}

.visual-meta {
    display: grid;
    grid-template-columns: 1fr 260px;
    margin: 40px 0;
    border: 1px solid rgba(28,30,33,.34);
}

.visual-meta > div {
    min-height: 73px;
    padding: 12px 15px;
}

.visual-meta > div + div {
    border-left: 1px solid rgba(28,30,33,.34);
}

.visual-meta span,
.visual-meta strong {
    display: block;
}

.visual-meta span {
    margin-bottom: 4px;
    color: #766f65;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: .95rem;
}

.visual-meta strong {
    color: #252a31;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.35rem;
    font-weight: 600;
}

.visual-section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 38px 0 25px;
}

.visual-section-title span {
    width: 95px;
    height: 1px;
    background: var(--accent);
}

.visual-section-title h2 {
    margin: 0;
    color: var(--accent);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.65rem;
    font-weight: 600;
}

.visual-message {
    min-height: 560px;
    color: #3f3a34;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.05rem;
    line-height: 2;
}

.visual-message p {
    margin: 0 0 1.35em;
}

.visual-message blockquote {
    margin: 28px 0;
    padding: 11px 24px;
    border-left: 3px solid var(--accent);
    color: #655d53;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.3rem;
    font-style: italic;
}

.visual-journal-footer {
    margin-top: 55px;
    padding-top: 18px;
    border-top: 1px solid rgba(28,30,33,.17);
    text-align: center;
}

.visual-journal-footer > div {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 23px;
    color: var(--accent);
    font-size: .66rem;
    letter-spacing: .14em;
}

.visual-journal-footer p {
    margin: 13px 0 0;
    color: #8b8379;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: .9rem;
}

/* ================= ADMIN DASHBOARD ================= */

.admin-dashboard-body {
    background: #f3efe7;
}

.admin-dashboard-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
    padding: 28px max(24px, calc((100vw - 1180px) / 2));
    background: #172232;
    color: white;
}

.admin-dashboard-header > div:first-child > span {
    color: #c9ad76;
    font-size: .7rem;
    letter-spacing: .17em;
}

.admin-dashboard-header h1 {
    margin: 3px 0 0;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(2.2rem, 5vw, 3.7rem);
    font-weight: 500;
}

.admin-dashboard-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.admin-dashboard-nav a,
.admin-dashboard-nav button {
    border: 0;
    background: transparent;
    color: #e8dfd0;
    cursor: pointer;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .09em;
    text-decoration: none;
}

.admin-dashboard-nav form { margin: 0; }

.admin-dashboard {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0 75px;
}

.dashboard-welcome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    padding: 34px;
    background: #fffdfa;
    border: 1px solid rgba(197,160,89,.32);
    box-shadow: 0 10px 34px rgba(0,0,0,.05);
}

.dashboard-welcome span { font-size: .72rem; }

.dashboard-welcome h2 {
    margin: 4px 0 4px;
    font-size: clamp(2.3rem, 5vw, 3.6rem);
    font-weight: 500;
}

.dashboard-welcome p {
    max-width: 680px;
    margin: 0;
    color: var(--soft);
    line-height: 1.65;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-top: 22px;
}

.stat-card {
    min-height: 160px;
    padding: 20px;
    background: #fffdfa;
    border: 1px solid rgba(28,30,33,.11);
}

.stat-total {
    background: #1b263b;
    color: #fff;
    border-color: #1b263b;
}

.stat-card span {
    display: block;
    color: var(--gold-dark);
    font-size: .65rem;
    font-weight: 600;
    letter-spacing: .1em;
}

.stat-total span { color: #d1b477; }

.stat-card strong {
    display: block;
    margin: 10px 0 4px;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 3rem;
    font-weight: 500;
    line-height: 1;
}

.stat-card p {
    margin: 0;
    color: #7d756b;
    font-size: .75rem;
}

.stat-total p { color: #d8d0c3; }

.dashboard-panel {
    margin-top: 22px;
    padding: 30px;
    background: #fffdfa;
    border: 1px solid rgba(197,160,89,.32);
}

.dashboard-panel-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(28,30,33,.1);
}

.dashboard-panel-heading span { font-size: .68rem; }

.dashboard-panel-heading h2 {
    margin: 3px 0 0;
    font-size: 2.4rem;
    font-weight: 500;
}

.dashboard-panel-heading > a {
    color: var(--gold-dark);
    font-size: .72rem;
    font-weight: 600;
    text-decoration: none;
}

.recent-table article {
    display: grid;
    grid-template-columns: 1fr 150px 150px;
    align-items: center;
    gap: 20px;
    padding: 17px 0;
    border-bottom: 1px solid rgba(28,30,33,.08);
}

.recent-table article:last-child { border-bottom: 0; }

.recent-table article > div:first-child > span {
    color: var(--gold-dark);
    font-size: .65rem;
    font-weight: 600;
    letter-spacing: .08em;
}

.recent-table h3 {
    margin: 2px 0 0;
    font-size: 1.6rem;
    font-weight: 600;
}

.recent-meta {
    color: #7d756b;
    font-size: .76rem;
}

.recent-actions {
    display: flex;
    justify-content: flex-end;
    gap: 11px;
}

.recent-actions a {
    color: var(--gold-dark);
    font-size: .68rem;
    font-weight: 600;
    text-decoration: none;
}

.dashboard-empty {
    padding: 35px 0;
    color: var(--soft);
    text-align: center;
}

.dashboard-note {
    display: flex;
    gap: 8px;
    margin-top: 18px;
    color: #756e65;
    font-size: .78rem;
}

/* ================= MOBILE ================= */

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

@media (max-width: 760px) {
    .brand { padding-top: 23px; }
    .brand h1 { letter-spacing: .02em; }

    .brand p {
        line-height: 1.7;
        letter-spacing: .15em;
    }

    .main-nav { justify-content: flex-start; }

    .hero,
    .notes-shell,
    .content-shell,
    .bookstore-shell {
        width: min(100% - 18px, 1180px);
    }

    .notes-toolbar,
    .notes-toolbar.with-admin {
        grid-template-columns: 1fr;
    }

    .notes-toolbar .primary-btn,
    .favorite-filter-btn {
        width: 100%;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .modal-overlay { padding: 7px; }

    .editor-modal {
        max-height: calc(100vh - 14px);
        padding: 22px 15px;
    }

    .message-editor { min-height: 285px; }

    .journal-cover {
        min-height: 680px;
        aspect-ratio: auto;
        padding: 55px 28px;
    }

    .visual-meta {
        grid-template-columns: 1fr;
    }

    .visual-meta > div + div {
        border-left: 0;
        border-top: 1px solid rgba(28,30,33,.34);
    }

    .reader-page-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .journal-inner-border {
        padding: 30px 20px;
    }

    .visual-message {
        font-size: .98rem;
    }

    .admin-dashboard-header,
    .dashboard-welcome,
    .dashboard-panel-heading {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .recent-table article {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .recent-actions {
        justify-content: flex-start;
    }
}

/* ================= PRINT / PDF ================= */

@page {
    size: A4;
    margin: 10mm;
}

@media print {
    body.sermon-reader-page {
        background: white;
    }

    .no-print {
        display: none !important;
    }

    .print-shell {
        width: 100%;
        margin: 0;
    }

    .visual-journal-page {
        min-height: 0;
        padding: 8px;
        border: 1px solid #9d7b43;
        box-shadow: none;
        break-inside: avoid;
    }

    .journal-inner-border {
        min-height: 0;
        padding: 12mm;
        border: 1px solid #c3a670;
    }

    .visual-journal-header h1 {
        font-size: 34pt;
    }

    .visual-message {
        min-height: 0;
        font-size: 10.5pt;
        line-height: 1.65;
    }

    .visual-journal-footer {
        margin-top: 25mm;
    }
}
