/* Shared visual system for Journal and Collection Manage. */
.journal-modern-page {
    --jm-ink: #24352d;
    --jm-muted: #66756c;
    --jm-green: #315f4b;
    --jm-green-deep: #244b3a;
    --jm-gold: #b58a45;
    --jm-paper: #fbfaf6;
    --jm-line: #dfe7e1;
    width: min(1180px, calc(100% - 2rem));
    max-width: none;
    margin: 0 auto !important;
    padding: 2rem 0 4rem;
    color: var(--jm-ink);
}

.journal-modern-page > .row {
    margin-right: 0;
    margin-left: 0;
}

.journal-modern-page > .row > [class*="col-"] {
    padding-right: 0;
    padding-left: 0;
}

.journal-modern-page .journal-page-toolbar {
    position: relative;
    min-height: 235px;
    margin: 0 0 2.5rem;
    padding: clamp(2rem, 5vw, 3.75rem);
    overflow: hidden;
    border: 1px solid rgba(49, 95, 75, 0.15);
    border-radius: 28px;
    background:
        radial-gradient(circle at 87% 10%, rgba(181, 138, 69, 0.2), transparent 31%),
        linear-gradient(135deg, #f5f2e8 0%, #edf4ee 100%);
    box-shadow: 0 20px 55px rgba(39, 63, 51, 0.09);
}

.journal-modern-page .journal-page-toolbar::after {
    content: "";
    position: absolute;
    right: -95px;
    bottom: -185px;
    width: 390px;
    height: 390px;
    border: 1px solid rgba(49, 95, 75, 0.12);
    border-radius: 50%;
    pointer-events: none;
}

.journal-modern-page .journal-page-toolbar__row {
    position: relative;
    z-index: 1;
    align-items: center;
    gap: 2rem;
}

.journal-modern-kicker,
.journal-modern-section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--jm-green);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.journal-modern-page .journal-page-toolbar__title {
    margin: 0.55rem 0 0.6rem;
    color: #203b30;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.5rem, 6vw, 4.25rem);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.035em;
}

.collections-library-page .journal-page-toolbar__title-line {
    display: block;
}

.collections-library-page .journal-page-toolbar__title-line .journal-page-toolbar__title {
    display: inline;
}

.collections-library-page .journal-page-toolbar__title-line .info-tooltip-btn {
    display: inline-flex;
    margin-left: 0.35rem;
    vertical-align: 0.15em;
}

.journal-modern-page .journal-page-toolbar__title i {
    display: inline-grid;
    width: 48px;
    height: 48px;
    margin-right: 0.65rem;
    place-items: center;
    border-radius: 14px;
    background: rgba(49, 95, 75, 0.1);
    color: var(--jm-green);
    font-size: 1.3rem;
    vertical-align: 0.18em;
}

.journal-modern-page .journal-page-toolbar__subtitle {
    max-width: 690px;
    color: #53675d;
    font-size: clamp(0.98rem, 1.8vw, 1.08rem);
    line-height: 1.7;
}

.journal-modern-page .journal-page-toolbar__actions {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    gap: 0.7rem;
}

.journal-modern-page .journal-page-toolbar .journal-toolbar-btn {
    min-height: 48px;
    padding: 0.75rem 1.05rem;
    border-radius: 12px;
    font-weight: 750;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.journal-modern-page .journal-page-toolbar .journal-toolbar-btn.btn-primary {
    border-color: var(--jm-green);
    background: var(--jm-green);
    box-shadow: 0 7px 18px rgba(49, 95, 75, 0.18);
}

.journal-modern-page .journal-page-toolbar .journal-toolbar-btn.btn-primary:hover,
.journal-modern-page .journal-page-toolbar .journal-toolbar-btn.btn-primary:focus-visible {
    border-color: var(--jm-green-deep);
    background: var(--jm-green-deep);
    transform: translateY(-1px);
}

.journal-modern-page .journal-page-toolbar .journal-toolbar-btn.btn-outline-primary {
    border-color: rgba(49, 95, 75, 0.35);
    background: rgba(255, 255, 255, 0.74);
    color: var(--jm-green);
}

.journal-modern-page .journal-page-toolbar .journal-toolbar-btn.btn-outline-primary:hover,
.journal-modern-page .journal-page-toolbar .journal-toolbar-btn.btn-outline-primary:focus-visible {
    border-color: var(--jm-green);
    background: #fff;
    color: var(--jm-green-deep);
    transform: translateY(-1px);
}

.journal-modern-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.journal-modern-section-heading h2 {
    margin: 0.28rem 0 0;
    color: var(--jm-ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.65rem, 3.5vw, 2.25rem);
    font-weight: 500;
}

.journal-modern-section-heading > p {
    max-width: 430px;
    margin: 0 0 0.25rem;
    color: var(--jm-muted);
    line-height: 1.55;
    text-align: right;
}

/* Journal search and selection controls */
.journal-library-page .journal-filters {
    margin-bottom: 1.5rem;
    padding: clamp(1.2rem, 3vw, 1.75rem);
    border: 1px solid var(--jm-line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(39, 63, 51, 0.06);
}

.journal-library-page .journal-filters-search-panel .row {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(190px, 0.85fr) auto auto;
    align-items: center;
    gap: 0.75rem;
}

.journal-library-page .journal-filters-search-panel .row > div {
    width: auto;
    max-width: none;
    padding: 0;
}

.journal-library-page .journal-filters .form-control {
    min-height: 48px;
    border-color: #d7e1da;
    border-radius: 12px;
    background: #fbfcfa;
}

.journal-library-page .journal-filters .btn {
    min-height: 46px;
    margin: 0 0.25rem 0 0;
    border-radius: 11px;
}

.journal-library-page .journal-filters .btn-primary {
    border-color: var(--jm-green);
    background: var(--jm-green);
}

.journal-library-page .journal-stats {
    justify-content: flex-end;
    margin: 0;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: #edf3ee;
    color: var(--jm-muted);
    white-space: nowrap;
}

.journal-library-page .journal-stats span {
    margin-right: 0.25rem;
    color: var(--jm-green);
    font-weight: 800;
}

.journal-library-page .selection-header {
    margin-bottom: 1.25rem;
    padding: 1rem 1.2rem;
    border: 1px solid #d5e2d9;
    border-radius: 16px;
    background: #edf4ee;
}

/* Responsive journal card library */
.journal-library-page .journal-entries {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    min-width: 0;
    margin-bottom: 2rem;
}

.journal-library-page .journal-entry {
    min-width: 0;
    height: fit-content;
    margin: 0;
    padding: 1.25rem;
    overflow: hidden;
    border: 1px solid var(--jm-line);
    border-radius: 18px;
    background: linear-gradient(155deg, #fff 55%, #f7f8f4 145%);
    box-shadow: 0 10px 28px rgba(39, 63, 51, 0.065);
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.journal-library-page .journal-entry:hover,
.journal-library-page .journal-entry:focus-within {
    transform: translateY(-2px);
    border-color: #a8bbae;
    box-shadow: 0 14px 34px rgba(39, 63, 51, 0.11);
}

.journal-library-page .journal-entry-top-row {
    margin-bottom: 1rem;
}

.journal-library-page .journal-entry-main-content {
    gap: 0.9rem;
}

.journal-library-page .journal-entry-speaker-section {
    min-width: 74px;
    padding: 0.25rem;
}

.journal-library-page .journal-speaker-coin-large {
    width: 68px;
    height: 68px;
    border-color: rgba(49, 95, 75, 0.25);
    box-shadow: 0 5px 15px rgba(39, 63, 51, 0.12);
}

.journal-library-page .journal-speaker-name {
    max-width: 76px;
    color: var(--jm-ink);
    font-size: 0.78rem;
}

.journal-library-page .journal-entry-title-section {
    min-width: 0;
}

.journal-library-page .journal-entry-title {
    color: var(--jm-ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.32rem;
    font-weight: 600;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.journal-library-page .journal-entry-meta {
    gap: 0.6rem;
    margin-bottom: 0.9rem;
    padding-left: 0;
    color: var(--jm-muted);
}

.journal-library-page .journal-entry-meta i {
    color: #789582;
}

.journal-library-page .journal-entry-collection-list {
    border-color: #d9e4dc;
    border-radius: 12px;
    background: #f4f7f3;
}

.journal-library-page .journal-entry-collection-heading {
    color: var(--jm-green);
}

.journal-library-page .journal-entry-notes {
    border-left-color: var(--jm-gold);
    background: #fcf8ee;
}

.journal-library-page .btn-journal-action {
    width: 38px;
    height: 38px;
    border-color: #d9e2dc;
    border-radius: 10px;
    background: #fff;
    color: var(--jm-muted);
}

.journal-library-page .btn-journal-action:hover,
.journal-library-page .btn-journal-action:focus-visible {
    border-color: var(--jm-green);
    background: #edf4ee;
    color: var(--jm-green);
}

.journal-library-page .journal-tag,
.journal-library-page .journal-entry-collection-link {
    border-color: #d7e1da;
    background: #f6f8f5;
    color: var(--jm-green-deep);
}

.journal-library-page .pagination .page-link {
    border-color: #d9e2dc;
    color: var(--jm-green);
}

.journal-library-page .pagination .page-item.active .page-link {
    border-color: var(--jm-green);
    background: var(--jm-green);
}

/* Collection library */
.collections-library-page .collections-section {
    margin-top: 0;
}

.collections-library-page .collections-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.collections-library-page .collection-card {
    min-width: 0;
    min-height: 285px;
    border: 1px solid var(--jm-line);
    border-radius: 18px;
    background: linear-gradient(155deg, #fff 50%, #f6f8f4 145%);
    box-shadow: 0 10px 28px rgba(39, 63, 51, 0.065);
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.collections-library-page .collection-card:hover,
.collections-library-page .collection-card:focus-within {
    transform: translateY(-3px);
    border-color: #9fb4a6;
    box-shadow: 0 15px 34px rgba(39, 63, 51, 0.11);
}

.collections-library-page .collection-top-row {
    padding: 1.2rem 1.25rem;
    border-bottom: 1px solid #e2e9e4;
    border-radius: 18px 18px 0 0;
    background:
        radial-gradient(circle at 90% 15%, rgba(181, 138, 69, 0.15), transparent 32%),
        linear-gradient(135deg, #f4f1e8 0%, #edf4ee 100%);
}

.collections-library-page .collection-title {
    color: var(--jm-ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.4rem;
    font-weight: 600;
}

.collections-library-page .collection-bottom-row {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
}

.collections-library-page .collection-description {
    color: var(--jm-muted);
    line-height: 1.6;
}

.collections-library-page .collection-meta {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
    margin-top: auto;
    color: var(--jm-muted);
}

.collections-library-page .collection-meta i {
    color: var(--jm-green);
}

.collections-library-page .collection-speakers {
    justify-content: flex-start;
}

.collections-library-page .speaker-avatar {
    width: 44px;
    height: 44px;
    margin-right: -0.42rem;
    border-color: #fff;
    box-shadow: 0 3px 10px rgba(39, 63, 51, 0.16);
}

.collections-library-page .collection-actions .btn {
    display: inline-grid;
    width: 36px;
    height: 36px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(49, 95, 75, 0.16);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--jm-green);
}

.collections-library-page .empty-collections,
.journal-library-page .journal-empty {
    padding: 4rem 2rem;
    border: 1px dashed #bdcdc2;
    border-radius: 20px;
    background: #f8faf7;
    box-shadow: none;
}

/* Shared dialogs */
.journal-modern-page ~ .modal .modal-content,
body:has(.journal-modern-page) .modal .modal-content {
    overflow: hidden;
    border: 1px solid var(--jm-line, #dfe7e1);
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(31, 51, 41, 0.22);
}

body:has(.journal-modern-page) .modal .modal-header {
    border-bottom-color: #e1e8e3;
    background: linear-gradient(135deg, #f5f2e8 0%, #edf4ee 100%);
}

body:has(.journal-modern-page) .modal .modal-title,
body:has(.journal-modern-page) .modal .modal-header h3 {
    color: #24352d;
    font-family: Georgia, "Times New Roman", serif;
}

body:has(.journal-modern-page) .modal .form-control {
    border-color: #d7e1da;
    border-radius: 11px;
    background: #fbfcfa;
}

@media (max-width: 980px) {
    .journal-library-page .journal-entries,
    .collections-library-page .collections-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .journal-library-page .journal-filters-search-panel .row {
        grid-template-columns: 1fr 1fr;
    }

    .journal-modern-page .journal-page-toolbar__actions {
        flex-basis: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 700px) {
    .journal-modern-page {
        width: min(100% - 1rem, 1180px);
        padding: 0.5rem 0 2.5rem;
    }

    .journal-modern-page .journal-page-toolbar {
        min-height: 0;
        margin-bottom: 2rem;
        padding: 1.55rem;
        border-radius: 20px;
    }

    .journal-modern-page .journal-page-toolbar__row {
        display: block;
    }

    .journal-modern-page .journal-page-toolbar__titles {
        text-align: left;
    }

    .journal-modern-page .journal-page-toolbar__title-line {
        flex-wrap: nowrap;
        justify-content: flex-start;
    }

    .journal-modern-page .journal-page-toolbar__title {
        font-size: clamp(2.15rem, 12vw, 3.25rem);
    }

    .journal-modern-page .journal-page-toolbar__title i {
        width: 40px;
        height: 40px;
        font-size: 1.05rem;
    }

    .collections-library-page .journal-page-toolbar__title {
        font-size: clamp(1.65rem, 7.4vw, 2rem);
    }

    .collections-library-page .journal-page-toolbar__title i {
        display: none;
    }

    .collections-library-page .info-tooltip-btn {
        flex: 0 0 32px;
        width: 32px;
        height: 32px;
        margin-left: 0.15rem;
    }

    .journal-modern-page .journal-page-toolbar__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        margin-top: 1.25rem;
    }

    .journal-modern-page .journal-page-toolbar .journal-toolbar-btn {
        width: 100% !important;
        white-space: normal;
    }

    .journal-modern-section-heading {
        display: block;
    }

    .journal-modern-section-heading > p {
        margin-top: 0.65rem;
        text-align: left;
    }

    .journal-library-page .journal-filters {
        padding: 1rem;
        border-radius: 16px;
    }

    .journal-library-page .journal-filters-search-panel .row {
        display: block;
    }

    .journal-library-page .journal-filters-search-panel .row > div {
        margin-bottom: 0.7rem;
    }

    .journal-library-page .journal-filters .btn {
        width: 100%;
        margin: 0 0 0.5rem;
    }

    .journal-library-page .journal-stats {
        justify-content: center;
    }

    .journal-library-page .journal-entries,
    .collections-library-page .collections-grid {
        grid-template-columns: 1fr;
    }

    .journal-library-page .journal-entry {
        padding: 1rem;
    }

    .collections-library-page .collection-card {
        min-height: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .journal-modern-page *,
    .journal-modern-page *::before,
    .journal-modern-page *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Journal library refresh — companion to Home, Study Groups, and Collections */
.journal-library-page .journal-page-toolbar {
    min-height: 270px;
}

.journal-library-page .journal-page-toolbar__subtitle {
    max-width: 640px;
}

.journal-library-page .journal-page-toolbar__actions {
    max-width: 390px;
}

.journal-library-page .journal-filters {
    position: relative;
    margin-bottom: 1.25rem;
    padding: clamp(1.25rem, 3vw, 2rem);
    overflow: hidden;
    border-radius: 24px;
    background:
        radial-gradient(circle at 96% 0%, rgba(181, 138, 69, 0.11), transparent 28%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(247, 246, 239, 0.96));
    box-shadow: 0 16px 44px rgba(39, 63, 51, 0.07);
}

.journal-library-page .journal-filters::after {
    content: "";
    position: absolute;
    right: -68px;
    bottom: -105px;
    width: 190px;
    height: 190px;
    border: 1px solid rgba(49, 95, 75, 0.09);
    border-radius: 50%;
    pointer-events: none;
}

.journal-library-page .journal-filters > * {
    position: relative;
    z-index: 1;
}

.journal-filter-label {
    display: block;
    margin: 0 0 0.38rem 0.15rem;
    color: var(--jm-green);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.journal-library-page .journal-filters-search-panel {
    padding: 1rem;
    border: 1px solid #e0e8e2;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
}

.journal-library-page .journal-filters .form-control {
    min-height: 50px;
    padding-right: 0.9rem;
    padding-left: 0.9rem;
    border-color: #cfdbd3;
    background: #fcfdfb;
    color: var(--jm-ink);
}

.journal-library-page .journal-filters .form-control:focus {
    border-color: var(--jm-green);
    box-shadow: 0 0 0 4px rgba(49, 95, 75, 0.09);
}

.journal-library-page .journal-filters .btn {
    min-height: 50px;
    padding-right: 1rem;
    padding-left: 1rem;
    border-radius: 12px;
    font-weight: 700;
}

.journal-library-page .journal-filters .btn-secondary {
    border-color: #d7e1da;
    background: #f3f5f2;
    color: #5b6c62;
}

.journal-library-page .journal-stats {
    min-height: 50px;
    justify-content: center;
    border: 1px solid rgba(49, 95, 75, 0.11);
    background: var(--jm-paper);
}

.journal-reflections-section {
    position: relative;
    padding: clamp(1.15rem, 3vw, 2rem);
    overflow: hidden;
    border: 1px solid var(--jm-line);
    border-radius: 24px;
    background:
        radial-gradient(circle at 98% 3%, rgba(181, 138, 69, 0.09), transparent 23%),
        linear-gradient(150deg, rgba(255, 255, 255, 0.98), rgba(248, 247, 242, 0.94));
    box-shadow: 0 16px 45px rgba(39, 63, 51, 0.07);
}

.journal-reflections-section::after {
    content: "";
    position: absolute;
    right: -110px;
    bottom: -190px;
    width: 320px;
    height: 320px;
    border: 1px solid rgba(49, 95, 75, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

.journal-reflections-section > * {
    position: relative;
    z-index: 1;
}

.journal-reflections-heading {
    margin-bottom: 1.4rem;
}

.journal-library-page .selection-header {
    position: sticky;
    z-index: 5;
    top: 0.75rem;
    padding: 0.9rem 1rem;
    border-color: rgba(49, 95, 75, 0.18);
    background: rgba(237, 244, 238, 0.96);
    box-shadow: 0 10px 26px rgba(39, 63, 51, 0.1);
    backdrop-filter: blur(10px);
}

.journal-library-page .selection-controls,
.journal-library-page .bulk-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.journal-library-page .bulk-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
}

.journal-library-page .selection-header .btn {
    min-height: 38px;
    border-radius: 10px;
}

.journal-library-page .journal-entries {
    gap: 0.9rem;
    margin-bottom: 0;
}

.journal-library-page .journal-entry {
    position: relative;
    min-height: 265px;
    padding: 1.1rem;
    border-radius: 19px;
    background:
        radial-gradient(circle at 100% 0%, rgba(181, 138, 69, 0.1), transparent 31%),
        linear-gradient(155deg, #fff 52%, #f5f8f4 145%);
}

.journal-library-page .journal-entry::before {
    content: "";
    position: absolute;
    top: 0;
    left: 1.1rem;
    width: 78px;
    height: 5px;
    border-radius: 0 0 7px 7px;
    background: linear-gradient(90deg, var(--jm-green), var(--jm-gold));
    opacity: 0.74;
}

.journal-library-page .journal-entry:hover,
.journal-library-page .journal-entry:focus-within {
    transform: translateY(-4px);
    border-color: rgba(49, 95, 75, 0.34);
    box-shadow: 0 18px 42px rgba(39, 63, 51, 0.13);
}

.journal-library-page .journal-entry-top-row {
    min-height: 40px;
    margin-bottom: 0.7rem;
}

.journal-library-page .journal-entry-actions {
    gap: 0.35rem;
}

.journal-library-page .btn-journal-action {
    width: 36px;
    height: 36px;
    border-color: rgba(49, 95, 75, 0.14);
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 3px 10px rgba(39, 63, 51, 0.05);
}

.journal-library-page .btn-journal-action.btn-chat-about {
    border-color: rgba(181, 138, 69, 0.3);
    color: #8b672d;
}

.journal-library-page .journal-entry-main-content {
    align-items: center;
}

.journal-library-page .journal-entry-speaker-section {
    min-width: 68px;
}

.journal-library-page .journal-speaker-coin-large {
    width: 62px;
    height: 62px;
    border-width: 3px;
    background: #fff;
}

.journal-library-page .journal-entry-title {
    font-size: 1.38rem;
    font-weight: 500;
}

.journal-library-page .journal-entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.9rem 0;
}

.journal-library-page .journal-entry-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    background: #edf3ee;
    color: #5d6f65;
    font-size: 0.76rem;
}

.journal-library-page .journal-entry-collection-list {
    margin-top: 0.75rem;
    padding: 0.75rem;
    border-radius: 13px;
    background: rgba(237, 244, 238, 0.68);
}

.journal-library-page .journal-entry-collection-heading {
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.journal-library-page .journal-entry-notes {
    margin-top: 0.8rem;
    border-radius: 0 11px 11px 0;
}

.journal-library-page .journal-entry-tags {
    margin-top: 0.75rem;
}

.journal-library-page .journal-tag,
.journal-library-page .journal-entry-collection-link {
    border-radius: 999px;
}

.journal-library-page .loading-spinner,
.journal-library-page .journal-error {
    grid-column: 1 / -1;
    min-height: 290px;
    padding: 4rem 2rem;
    border: 1px dashed rgba(49, 95, 75, 0.24);
    border-radius: 18px;
    background: rgba(237, 244, 238, 0.58);
    color: var(--jm-muted);
    text-align: center;
}

.journal-library-page .loading-spinner i {
    color: var(--jm-green);
}

.journal-library-page .journal-empty {
    min-height: 330px;
    margin: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at center, rgba(237, 244, 238, 0.9), rgba(250, 249, 245, 0.82));
}

.journal-library-page .journal-empty[style*="display: block"] {
    display: flex !important;
}

.journal-library-page .journal-empty .empty-icon {
    display: grid;
    width: 70px;
    height: 70px;
    margin: 0 auto 1rem;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    color: var(--jm-green);
    box-shadow: 0 10px 28px rgba(39, 63, 51, 0.1);
}

.journal-library-page .journal-empty h3 {
    color: var(--jm-ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.55rem;
    font-weight: 500;
}

.journal-library-page .journal-empty .btn-primary {
    border-color: var(--jm-green);
    border-radius: 12px;
    background: var(--jm-green);
}

body:has(.journal-library-page) .journal-modal-content {
    width: min(92vw, 650px);
}

body:has(.journal-library-page) .modal .modal-header {
    padding: 1.2rem 1.4rem;
}

body:has(.journal-library-page) .modal .modal-body {
    padding: 1.4rem;
}

body:has(.journal-library-page) .modal .modal-footer {
    padding: 1rem 1.4rem 1.3rem;
    border-top-color: #e1e8e3;
}

body:has(.journal-library-page) .modal .form-group + .form-group {
    margin-top: 1rem;
}

body:has(.journal-library-page) .modal .form-control {
    min-height: 47px;
}

@media (max-width: 980px) {
    .journal-library-page .journal-page-toolbar__actions {
        max-width: none;
    }

    .journal-library-page .selection-header .row {
        gap: 0.75rem;
    }

    .journal-library-page .selection-header .row > div {
        width: 100%;
    }

    .journal-library-page .bulk-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 700px) {
    .journal-library-page .journal-page-toolbar {
        min-height: 0;
    }

    .journal-library-page .journal-page-toolbar__actions {
        grid-template-columns: 1fr 1fr;
    }

    .journal-library-page .journal-page-toolbar__actions > :first-child {
        grid-column: 1 / -1;
    }

    .journal-library-page .journal-filters,
    .journal-reflections-section {
        padding: 1rem;
        border-radius: 18px;
    }

    .journal-library-page .journal-filters-search-panel {
        padding: 0.8rem;
    }

    .journal-filter-label[aria-hidden="true"] {
        display: none;
    }

    .journal-reflections-heading > p {
        max-width: none;
    }

    .journal-library-page .selection-header {
        position: static;
    }

    .journal-library-page .bulk-actions .btn {
        flex: 1 1 100%;
    }

    .journal-library-page .journal-entry {
        min-height: 0;
        padding: 1rem;
    }

    .journal-library-page .journal-entry-main-content {
        align-items: flex-start;
    }
}
