/* Shared refinements for alumni pages requested across the member area. */

/* Image fallback: never leave a blank or broken-image tile in a catalog. */
.media-image {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #f8eaf3, #eeeaf5 58%, #e8edf6);
}
.media-image--fill { position: absolute; inset: 0; }
.media-image__img { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-image__placeholder {
    position: absolute;
    inset: 0;
    display: none;
    place-items: center;
    color: #a31672;
}
.media-image.is-placeholder .media-image__placeholder { display: grid; }
.media-image__placeholder i {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border: 1px solid rgba(163, 22, 114, .14);
    border-radius: 50%;
    background: rgba(255, 255, 255, .42);
    font-size: 25px;
}
html[data-theme="dark"] .media-image {
    background: radial-gradient(circle at 78% 20%, rgba(255,255,255,.08), transparent 28%), linear-gradient(135deg, #392b3d, #302b3a 55%, #282a39);
}
html[data-theme="dark"] .media-image__placeholder { color: #ff9fd5; }
html[data-theme="dark"] .media-image__placeholder i { border-color: rgba(255,159,213,.2); background: rgba(255,255,255,.05); }

/* Featured content and favorites. */
.featured-index-page,
.featured-subpage,
.favorites-page,
.my-books-page { min-width: 0; }
.featured-index-page .featured-sec-title-wrap {
    gap: 14px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--theme-border);
}
.featured-index-page :is(.course-card-premium, .book-card-premium, .partner-featured-card),
.favorites-page :is(.fav-course-card, .fav-book-card),
.featured-subpage .course-premium-card {
    min-width: 0;
    border-color: var(--theme-border);
    background: var(--theme-surface);
    color: var(--theme-text);
    box-shadow: 0 8px 24px rgba(42, 22, 38, .07);
}
.featured-subpage .course-premium-card { display: flex; height: 100%; flex-direction: column; overflow: hidden; border: 1px solid var(--theme-border); border-radius: 20px; }
.featured-index-page :is(.course-cover-wrap, .book-cover-wrap),
.favorites-page :is(.fav-cover-wrap, .fav-book-cover),
.my-books-page .my-book-cover,
.featured-subpage .featured-item-cover {
    position: relative;
    overflow: hidden;
    background: var(--theme-surface-raised);
}
.featured-index-page .course-cover-wrap { aspect-ratio: 16 / 9; padding: 0; }
.featured-index-page .book-cover-wrap { aspect-ratio: .77; padding: 0; }
.featured-index-page :is(.course-cover-wrap, .book-cover-wrap) > .media-image,
.favorites-page :is(.fav-cover-wrap, .fav-book-cover) > .media-image,
.my-books-page .my-book-cover > .media-image,
.featured-subpage .featured-item-cover > .media-image { position: absolute; inset: 0; }
.featured-index-page :is(.course-cover-wrap, .book-cover-wrap) { border-bottom: 1px solid var(--theme-border); }
.featured-index-page :is(.course-card-premium, .book-card-premium, .partner-featured-card):hover,
.favorites-page :is(.fav-course-card, .fav-book-card):hover,
.featured-subpage .course-premium-card:hover {
    border-color: rgba(195, 59, 145, .45);
    box-shadow: 0 16px 34px rgba(51, 25, 44, .12);
    transform: translateY(-4px);
}
.featured-index-page .course-body,
.featured-index-page .book-body,
.favorites-page :is(.fav-course-body, .fav-book-body),
.featured-subpage .featured-item-body,
.my-books-page .my-book-body { min-width: 0; }
.favorites-page .favorites-sec-title { color: var(--theme-text); }
.favorites-page .fav-cover-wrap { aspect-ratio: 16 / 9; padding: 0; }
.favorites-page .fav-book-cover { aspect-ratio: .77; padding: 0; }
.favorites-page .btn-remove-fav { z-index: 3; }
.featured-subpage .courses-grid,
.favorites-page .favorites-grid,
.favorites-page .favorites-books-grid,
.my-books-page .my-books-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 245px), 1fr));
    align-items: stretch;
    gap: 20px;
}
.featured-subpage .featured-item-cover { aspect-ratio: 16 / 9; }
.featured-subpage .featured-item-cover--book { aspect-ratio: .77; }
.featured-subpage .featured-item-body { display: flex; flex: 1; flex-direction: column; padding: 20px; }
.featured-subpage .featured-item-title { min-height: 2.8em; margin: 0 0 14px; color: var(--theme-text); font-size: 16px; line-height: 1.4; }
.featured-subpage .featured-item-meta { margin-bottom: 7px; color: var(--theme-muted); font-size: 12px; }
.featured-index-page .partner-avatar-wrap { position: relative; display: block; flex: 0 0 70px; width: 70px; height: 70px; margin-bottom: 15px; overflow: hidden; border: 3px solid #f8f9fa; border-radius: 50%; }
.featured-index-page .partner-avatar-wrap .media-image__placeholder i { width: 42px; height: 42px; font-size: 18px; }
.favorites-page .favorites-empty-state,
.my-books-page .no-books-panel { border-color: var(--theme-border); background: var(--theme-surface); color: var(--theme-text); }
.my-books-page .my-book-cover { aspect-ratio: .77; padding: 0; }
.my-books-page .my-book-cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.my-books-page .my-book-card { min-width: 0; }
.my-books-page .my-book-title { color: var(--theme-text); }

/* Member requests. */
.alumni-account-page {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    color: var(--theme-text);
}
.my-requests-page .requests-heading { margin-bottom: 22px; }
.my-requests-page .requests-heading h1,
.transactions-page .transactions-heading h1,
.settings-page .settings-heading h1 { margin: 0 0 6px; color: var(--theme-text); font-size: clamp(1.45rem, 2.4vw, 1.9rem); font-weight: 750; }
.my-requests-page .requests-heading p,
.transactions-page .transactions-heading p,
.settings-page .settings-heading p { margin: 0; color: var(--theme-muted); font-size: 14px; line-height: 1.6; }
.my-requests-page .requests-panel,
.transactions-page .transactions-panel,
.settings-page .settings-panel {
    border: 1px solid var(--theme-border);
    border-radius: 20px;
    background: var(--theme-surface);
    box-shadow: 0 8px 28px rgba(47, 21, 40, .06);
}
.my-requests-page .request-card {
    padding: 20px;
    border: 1px solid var(--theme-border);
    border-radius: 16px;
    background: var(--theme-surface);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.my-requests-page .request-card:hover { border-color: rgba(195, 59, 145, .4); box-shadow: 0 10px 24px rgba(47, 21, 40, .08); transform: translateY(-1px); }
.my-requests-page .request-supplier { color: var(--theme-text); font-size: 15px; font-weight: 700; }
.my-requests-page .request-meta { color: var(--theme-muted); font-size: 12px; line-height: 1.6; }
.my-requests-page .request-message { border: 1px solid var(--theme-border); border-left: 3px solid #c13b91; border-radius: 12px; background: var(--theme-surface-raised); color: var(--theme-text); line-height: 1.65; overflow-wrap: anywhere; }
.my-requests-page .request-chat-link { min-height: 40px; padding: 9px 15px; border-radius: 11px; background: #a31672; color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; }
.my-requests-page .request-chat-link:hover { background: #7d1057; color: #fff; }
.my-requests-page .requests-empty-state { padding: 56px 20px; text-align: center; }
.my-requests-page .requests-empty-state > i { display: grid; width: 64px; height: 64px; margin: 0 auto 16px; place-items: center; border-radius: 20px; background: rgba(195, 59, 145, .1); color: #a31672; font-size: 24px; }
.my-requests-page .requests-empty-state h2 { color: var(--theme-text); font-size: 18px; font-weight: 700; }
.my-requests-page .requests-empty-state p { color: var(--theme-muted); font-size: 14px; }

/* Transaction history table and DataTables controls. */
.transactions-page .transactions-panel { overflow: hidden; padding: 22px; }
.transactions-page .transactions-table-scroll { width: 100%; overflow-x: auto; border: 1px solid var(--theme-border); border-radius: 14px; }
.transactions-page #userTransactionDataTable { min-width: 840px; margin: 0; border-collapse: separate; border-spacing: 0; }
.transactions-page #userTransactionDataTable thead th { padding: 14px 13px; border-bottom: 1px solid var(--theme-border); background: var(--theme-surface-raised); color: var(--theme-muted); font-size: 11px; font-weight: 750; letter-spacing: .045em; text-transform: uppercase; white-space: nowrap; }
.transactions-page #userTransactionDataTable tbody td { padding: 14px 13px; border-bottom: 1px solid var(--theme-border); color: var(--theme-text); font-size: 13px; vertical-align: middle; }
.transactions-page #userTransactionDataTable tbody tr:last-child td { border-bottom: 0; }
.transactions-page #userTransactionDataTable tbody tr:hover td { background: rgba(195, 59, 145, .035); }
.transactions-page #userTransactionDataTable td:nth-child(3) { color: var(--theme-muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.transactions-page #userTransactionDataTable td:nth-child(6) { font-weight: 750; white-space: nowrap; }
.transactions-page #userTransactionDataTable td a { display: inline-flex !important; align-items: center; justify-content: center; min-height: 34px; padding: 7px 10px; border: 1px solid rgba(163, 22, 114, .2); border-radius: 9px; background: rgba(195, 59, 145, .08); color: #a31672 !important; font-size: 11px; line-height: 1.3; text-decoration: none !important; white-space: nowrap; }
.transactions-page #userTransactionDataTable td a:hover { border-color: #a31672; background: #a31672; color: #fff !important; }
.transactions-page .dataTables_wrapper .tableTop { margin-bottom: 14px; }
.transactions-page .dataTables_wrapper .tableBottom { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.transactions-page .dataTables_wrapper .tableBottom > .row { width: 100%; }
.transactions-page .dataTables_wrapper .tableSearch,
.transactions-page .dataTables_wrapper .tableLengthInput { float: none !important; }
.transactions-page .dataTables_wrapper .dataTables_filter,
.transactions-page .dataTables_wrapper .dataTables_length { color: var(--theme-muted); font-size: 12px; }
.transactions-page .dataTables_wrapper .dataTables_filter { display: flex; align-items: center; gap: 8px; }
.transactions-page .dataTables_wrapper .dataTables_filter label { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--theme-muted); }
.transactions-page .dataTables_wrapper .dataTables_filter input { min-height: 40px; width: min(260px, 55vw); margin-left: 0; padding: 8px 11px; border: 1px solid var(--theme-border); border-radius: 10px; background: var(--theme-control); color: var(--theme-text); outline: none; }
.transactions-page .dataTables_wrapper .dataTables_filter input:focus { border-color: #c13b91; box-shadow: 0 0 0 3px rgba(195, 59, 145, .12); }
.transactions-page .dataTables_wrapper .dataTables_length select { min-height: 36px; margin: 0 5px; padding: 4px 25px 4px 9px; border: 1px solid var(--theme-border); border-radius: 9px; background: var(--theme-control); color: var(--theme-text); }
.transactions-page .dataTables_wrapper .dataTables_info { padding-top: 9px; color: var(--theme-muted) !important; font-size: 12px; }
.transactions-page .dataTables_wrapper .dataTables_processing { border: 1px solid var(--theme-border); border-radius: 10px; background: var(--theme-surface-raised); color: var(--theme-text); }

/* Profile and settings tabs: remove the bright, disconnected tab tiles in dark mode. */
.profile-page .zTabHead,
.settings-page .zTabHead { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 0; border-bottom: 1px solid var(--theme-border); }
.profile-page .zTabHead .nav-link,
.settings-page .zTabHead .nav-link {
    min-height: 42px;
    padding: 10px 15px;
    border: 1px solid transparent;
    border-radius: 11px 11px 0 0;
    background: transparent;
    color: var(--theme-muted);
    font-size: 13px;
    font-weight: 650;
}
.profile-page .zTabHead .nav-link:hover,
.settings-page .zTabHead .nav-link:hover { color: #a31672; background: rgba(195, 59, 145, .06); }
.profile-page .zTabHead .nav-link.active,
.settings-page .zTabHead .nav-link.active { border-color: var(--theme-border); border-bottom-color: var(--theme-surface); background: var(--theme-surface); color: #a31672; }
.profile-page .zTabContent,
.settings-page .zTabContent { padding-top: 22px; }
.profile-page .bg-f9f9f9 { border: 1px solid var(--theme-border); border-radius: 16px; }
.settings-page .securityList > li { gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--theme-border); }
.settings-page .securityList > li:last-child { border-bottom: 0; }
.settings-page .settings-password-form { max-width: 760px; padding: 24px; border: 1px solid var(--theme-border); border-radius: 16px; background: var(--theme-surface-raised); }
.profile-page .profile-photo { border: 3px solid rgba(195, 59, 145, .18); box-shadow: 0 8px 24px rgba(47, 21, 40, .09); }
.profile-page .settings-heading { margin-bottom: 24px; }
.profile-page .profile-photo { position: relative; }
.profile-page .settings-heading h1 { margin: 0 0 6px; color: var(--theme-text); font-size: clamp(1.45rem, 2.4vw, 1.9rem); font-weight: 750; }
.profile-page .settings-heading p { margin: 0; color: var(--theme-muted); font-size: 14px; line-height: 1.6; }

html[data-theme="dark"] .featured-index-page :is(.course-card-premium, .book-card-premium, .partner-featured-card),
html[data-theme="dark"] .favorites-page :is(.fav-course-card, .fav-book-card),
html[data-theme="dark"] .featured-subpage .course-premium-card,
html[data-theme="dark"] .my-requests-page .request-card,
html[data-theme="dark"] :is(.my-requests-page .requests-panel, .transactions-page .transactions-panel, .settings-page .settings-panel) {
    border-color: var(--theme-border);
    background: var(--theme-surface);
    color: var(--theme-text);
    box-shadow: 0 9px 26px rgba(0, 0, 0, .22);
}
html[data-theme="dark"] .featured-index-page .featured-sec-title-wrap { border-color: var(--theme-border); }
html[data-theme="dark"] .featured-index-page .featured-sec-title { color: var(--theme-text); }
html[data-theme="dark"] .featured-index-page .featured-sec-link { color: #ff9fd5; }
html[data-theme="dark"] .featured-index-page .partner-avatar-wrap { border-color: var(--theme-border); }
html[data-theme="dark"] .featured-subpage .featured-item-title { color: var(--theme-text); }
html[data-theme="dark"] .featured-subpage .featured-item-meta { color: var(--theme-muted); }
html[data-theme="dark"] .favorites-page .favorites-sec-title { color: var(--theme-text) !important; }
html[data-theme="dark"] .favorites-page .favorites-empty-state,
html[data-theme="dark"] .my-books-page .no-books-panel { border-color: var(--theme-border); background: var(--theme-surface); color: var(--theme-text); }
html[data-theme="dark"] .my-requests-page .request-message { border-color: var(--theme-border); background: var(--theme-surface-raised); color: var(--theme-text); }
html[data-theme="dark"] .my-requests-page .requests-empty-state h2 { color: var(--theme-text); }
html[data-theme="dark"] .my-requests-page .requests-empty-state p { color: var(--theme-muted); }
html[data-theme="dark"] .transactions-page #userTransactionDataTable thead th { background: var(--theme-surface-raised); color: var(--theme-muted); }
html[data-theme="dark"] .transactions-page #userTransactionDataTable tbody tr:hover td { background: rgba(242, 138, 201, .06); }
html[data-theme="dark"] .transactions-page #userTransactionDataTable td a { border-color: rgba(255, 159, 213, .25); background: rgba(242, 138, 201, .1); color: #ff9fd5 !important; }
html[data-theme="dark"] .transactions-page #userTransactionDataTable td a:hover { border-color: #a31672; background: #a31672; color: #fff !important; }
html[data-theme="dark"] .profile-page .zTabHead .nav-link,
html[data-theme="dark"] .settings-page .zTabHead .nav-link { border-color: transparent; background: transparent !important; color: var(--theme-muted) !important; }
html[data-theme="dark"] .profile-page .zTabHead .nav-link:hover,
html[data-theme="dark"] .settings-page .zTabHead .nav-link:hover { background: var(--theme-surface-raised) !important; color: #ff9fd5 !important; }
html[data-theme="dark"] .profile-page .zTabHead .nav-link.active,
html[data-theme="dark"] .settings-page .zTabHead .nav-link.active { border-color: var(--theme-border); border-bottom-color: var(--theme-surface); background: var(--theme-surface) !important; color: #ff9fd5 !important; }
html[data-theme="dark"] .profile-page .bg-f9f9f9 { border-color: var(--theme-border); background: var(--theme-surface-raised) !important; }
html[data-theme="dark"] .settings-page .settings-password-form { border-color: var(--theme-border); background: var(--theme-surface-raised); }
html[data-theme="dark"] .settings-page .securityList > li { border-color: var(--theme-border); }
html[data-theme="dark"] .profile-page .profile-photo { border-color: rgba(255, 159, 213, .35); }
html[data-theme="dark"] .profile-page .primary-form-group .primary-form-group-wrap .form-label { background: var(--theme-surface) !important; color: var(--theme-muted) !important; }
html[data-theme="dark"] .settings-page .settings-password-form .primary-form-group .primary-form-group-wrap .form-label { background: var(--theme-surface-raised) !important; color: var(--theme-muted) !important; }

@media (max-width: 767.98px) {
    .featured-index-page,
    .featured-subpage,
    .favorites-page,
    .my-books-page { padding: 18px 12px 42px; }
    .featured-index-page .featured-header { padding: 27px 22px; border-radius: 20px; }
    .featured-index-page .featured-header h1 { font-size: 26px; }
    .featured-index-page .featured-sec-title-wrap { align-items: flex-start; }
    .featured-index-page .featured-sec-title { font-size: 19px; }
    .featured-index-page .featured-cards-grid,
    .featured-index-page .featured-books-grid,
    .featured-subpage .courses-grid,
    .favorites-page .favorites-grid,
    .favorites-page .favorites-books-grid,
    .my-books-page .my-books-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
    .featured-subpage .page-header { align-items: flex-start !important; gap: 14px; }
    .featured-subpage .page-header h1 { font-size: 25px; }
    .featured-subpage .featured-item-body,
    .favorites-page .fav-course-body,
    .favorites-page .fav-book-body,
    .my-books-page .my-book-body { padding: 14px; }
    .my-requests-page .requests-panel { padding: 14px !important; }
    .my-requests-page .request-card { padding: 15px; }
    .transactions-page .transactions-panel { padding: 14px; }
    .transactions-page .dataTables_wrapper .tableTop .row { gap: 10px; }
    .transactions-page .dataTables_wrapper .tableSearch,
    .transactions-page .dataTables_wrapper .tableLengthInput { width: 100%; }
    .transactions-page .dataTables_wrapper .dataTables_filter,
    .transactions-page .dataTables_wrapper .dataTables_filter label { width: 100%; }
    .transactions-page .dataTables_wrapper .dataTables_filter input { flex: 1; width: 100%; }
    .transactions-page .dataTables_wrapper .dataTables_length { text-align: left; }
    .transactions-page .dataTables_wrapper .tableBottom { display: block; }
    .transactions-page .dataTables_wrapper .dataTables_info { margin-bottom: 10px; text-align: center; }
    .profile-page .zTabHead,
    .settings-page .zTabHead { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .profile-page .zTabHead::-webkit-scrollbar,
    .settings-page .zTabHead::-webkit-scrollbar { display: none; }
    .profile-page .zTabHead .nav-link,
    .settings-page .zTabHead .nav-link { flex: 0 0 auto; padding: 9px 12px; font-size: 12px; }
    .settings-page .securityList > li { align-items: flex-start !important; }
    .settings-page .security-password-form { padding: 17px; }
}
@media (max-width: 479.98px) {
    .featured-index-page .featured-cards-grid,
    .featured-index-page .featured-books-grid,
    .featured-subpage .courses-grid,
    .favorites-page .favorites-grid,
    .favorites-page .favorites-books-grid,
    .my-books-page .my-books-grid { grid-template-columns: minmax(0, 1fr); }
    .favorites-page .favorites-header h1 { font-size: 25px; }
    .featured-index-page .featured-sec-title-wrap { flex-direction: column; }
    .featured-index-page .featured-sec-title-wrap .featured-sec-link { align-self: flex-end; }
    .my-requests-page .requests-empty-state { padding: 40px 12px; }
}
