:root {
    --primary-green: #059644;
    --dark-green: #075b32;
    --accent-yellow: #f3c301;
    --white: #ffffff;
    --light-bg: #f8faf9;
    --dark-text: #212529;
    --muted-text: #68756f;
    --border-color: #e2ebe6;
    --sidebar-width: 248px;
    --navbar-height: 72px;
    --shadow-soft: 0 8px 24px rgba(20, 108, 67, 0.08);
    font-size: 17px;
}

/* In-app notifications use the existing shared navigation and theme. */
.notification-trigger { position: relative; color: var(--dark-green); min-width: 44px; min-height: 44px; }
.notification-counter { position: absolute; top: 0; right: -4px; font-size: .65rem; }
.notification-counter[hidden] { display: none; }
.notification-dropdown { width: min(410px, calc(100vw - 24px)); max-height: calc(100dvh - var(--navbar-height) - 24px); padding: 0; border-radius: 12px; }
.notification-dropdown.show { display: flex; flex-direction: column; }
.notification-dropdown > :not(.notification-recent) { flex-shrink: 0; }
.notification-recent { min-height: 0; flex: 0 1 auto; max-height: min(440px, calc(100dvh - 220px)); overflow-y: auto; overscroll-behavior: contain; }
.notification-item { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; border-bottom: 1px solid var(--border-color); overflow-wrap: anywhere; }
.notification-item:last-child { border-bottom: 0; }
.notification-unread { background: #eff9f2; border-left: 4px solid var(--primary-green); }
.notification-link { display: block; }
.notification-link:hover strong { text-decoration: underline; color: var(--dark-green); }
.notification-item[data-notification-type="rejected"] .notification-link strong { color: #DC2626; }
.notification-item[data-notification-type="pending"] .notification-link strong { color: #B45309; }
.notification-item[data-notification-type="approved"] .notification-link strong { color: #15803D; }
/* Keep the specified red above 4.5:1 contrast on unread rows. */
.notification-unread[data-notification-type="rejected"] { background: #f4fbf6; }
.notification-state { color: var(--dark-green); white-space: nowrap; }
@media (max-width: 575.98px) {
    .notification-bell .notification-dropdown { position: fixed !important; inset: calc(var(--navbar-height) + 8px) 12px auto 12px !important; transform: none !important; width: auto; }
}
@media (max-width: 374.98px) {
    .app-navbar .container-fluid { flex-wrap: nowrap; }
    .app-navbar .navbar-brand { margin-right: 0; font-size: 1rem; gap: .25rem !important; }
    .app-navbar .brand-logo { width: 32px; height: 32px; flex-basis: 32px; }
    .app-navbar .sidebar-toggle { flex-shrink: 0; }
}

/* Global Styles */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 17px; }
body { margin: 0; color: var(--dark-text); background: var(--light-bg); font-family: "Roboto", sans-serif; font-size: 1rem; line-height: 1.5; overflow-x: hidden; }
img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4, h5, h6, .navbar-brand strong, .public-brand strong, .page-title { font-family: "Roboto Slab", serif; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(255, 193, 7, 0.75); outline-offset: 2px; }
.btn:disabled { opacity: 0.65; cursor: not-allowed; }

/* Navbar */
.app-navbar { height: var(--navbar-height); background: var(--white); border-bottom: 3px solid var(--accent-yellow); position: sticky; top: 0; z-index: 1040; }
.navbar-brand { color: var(--dark-green); letter-spacing: 0.03em; }
.navbar-brand > span:last-child { display: flex; flex-direction: column; line-height: 1.05; }
.navbar-brand small { color: var(--muted-text); font-size: 0.68rem; font-weight: 500; letter-spacing: 0; }
.brand-logo { width: 42px; height: 42px; flex: 0 0 42px; display: block; object-fit: contain; }
.department-logo { width: 64px; height: 64px; flex: 0 0 64px; display: block; object-fit: contain; object-position: center; border-radius: 50%; background: #fff; padding: 4px; border: 1px solid rgba(15, 23, 42, .12); }
.department-logo-sm { width: 52px; height: 52px; flex-basis: 52px; }
.logo-container {
    width: 84px;
    height: 84px;
    min-width: 84px;
    max-width: 84px;
    flex: 0 0 84px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: #ffffff;
    border: 1px solid #e5ebe7;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}
.logo-container .department-logo {
    width: 100%;
    height: 100%;
    flex: 0 0 100%;
    padding: 0;
    border: 0;
}
.user-department-card {
    display: block;
    background: #ffffff;
    border: 1px solid #e4ebe6;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 70, 40, 0.05);
    transition: box-shadow 160ms ease, transform 160ms ease, border-color 160ms ease;
}
.user-department-card:hover {
    border-color: rgba(5, 150, 68, 0.35);
    box-shadow: 0 12px 28px rgba(0, 70, 40, 0.08);
    transform: translateY(-1px);
}
.user-department-card .panel-body {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 150px;
    padding: 22px;
}
.user-department-card .department-card-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.department-card-title {
    display: block;
    color: #102d1f;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
}
.department-card-code {
    display: block;
    margin-top: 4px;
    color: var(--muted-text);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.01em;
}
.department-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    color: #4f5f56;
    font-size: 14px;
    line-height: 1.4;
}
.department-card-count {
    color: #51615a;
}
.department-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-green);
    font-weight: 600;
    white-space: nowrap;
}
.department-card-link i {
    font-size: 0.82em;
}
@media (max-width: 991.98px) {
    .logo-container {
        width: 72px;
        height: 72px;
        min-width: 72px;
        max-width: 72px;
        flex-basis: 72px;
    }
}
@media (max-width: 575.98px) {
    .logo-container {
        width: 64px;
        height: 64px;
        min-width: 64px;
        max-width: 64px;
        flex-basis: 64px;
    }
}
.brand-mark { width: 38px; height: 38px; display: inline-grid; place-items: center; color: var(--white); background: var(--primary-green); border-radius: 10px; }
.icon-button, .sidebar-toggle { width: 40px; height: 40px; display: inline-grid; place-items: center; color: var(--dark-green); background: transparent; border: 1px solid transparent; border-radius: 9px; }
.icon-button:hover, .sidebar-toggle:hover { color: var(--primary-green); background: var(--light-bg); border-color: var(--border-color); }
.notification-dot { width: 7px; height: 7px; position: absolute; top: 8px; right: 8px; background: var(--accent-yellow); border: 2px solid var(--white); border-radius: 50%; }
.app-navbar .container-fluid { flex-wrap: nowrap; }
.navbar-account { min-width: 0; }
.navbar-account .notification-bell { flex: 0 0 auto; }
.profile-dropdown { min-width: 0; }
.profile-trigger { display: flex; align-items: center; gap: 9px; max-width: 100%; min-width: 0; min-height: 44px; color: var(--dark-text); background: transparent; border: 0; padding: 3px; }
.profile-trigger::after { flex-shrink: 0; color: var(--muted-text); }
.profile-trigger .avatar { flex: 0 0 36px; }
.profile-name { min-width: 0; max-width: min(32vw, 30rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.3; }
.profile-menu { width: max-content; min-width: 12rem; max-width: min(28rem, calc(100vw - 24px)); }
.profile-menu-name { color: var(--dark-text); white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 767.98px) {
    .profile-name { max-width: 18vw; }
}
@media (max-width: 575.98px) {
    .profile-dropdown .profile-menu { position: fixed !important; inset: calc(var(--navbar-height) + 8px) 12px auto 12px !important; transform: none !important; width: auto; max-width: none; max-height: calc(100dvh - var(--navbar-height) - 24px); overflow-y: auto; }
}
@media (max-width: 374.98px) {
    .profile-name { display: none; }
}
.avatar { width: 36px; height: 36px; display: inline-grid; place-items: center; color: var(--dark-green); background: #dcefe5; border-radius: 50%; font-size: 0.75rem; font-weight: 700; }
.avatar-image { display: block; object-fit: cover; }
.profile-picture-frame { width: 92px; height: 92px; display: grid; place-items: center; }
.profile-picture { width: 92px; height: 92px; display: block; object-fit: cover; border: 3px solid #dcefe5; border-radius: 50%; }
.dropdown-item { padding: 0.65rem 1rem; color: var(--dark-text); }
.dropdown-item:hover { color: var(--dark-green); background: var(--light-bg); }

/* Sidebar */
.app-sidebar { width: var(--sidebar-width); height: calc(100vh - var(--navbar-height)); position: fixed; top: var(--navbar-height); left: 0; z-index: 1030; color: var(--white); background: var(--dark-green); border-right: 4px solid var(--accent-yellow); }
.sidebar-inner { height: 100%; display: flex; flex-direction: column; padding: 1.5rem 0.9rem; }
.sidebar-heading { padding: 0.25rem 0.85rem 0.8rem; color: #acd8bd; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.sidebar-nav { display: grid; gap: 0.3rem; }
.sidebar-link { min-height: 44px; display: flex; align-items: center; gap: 0.85rem; padding: 0.78rem 0.85rem; color: #d9eee1; border-left: 3px solid transparent; border-radius: 7px; font-size: 0.92rem; transition: background 160ms ease, color 160ms ease, border-color 160ms ease; }
.sidebar-link i { width: 19px; color: #a9d6b9; text-align: center; }
.sidebar-link:hover { color: var(--white); background: rgba(255, 255, 255, 0.1); }
.sidebar-link.active { color: var(--white); background: rgba(255, 193, 7, 0.14); border-left-color: var(--accent-yellow); }
.sidebar-link.active i { color: var(--accent-yellow); }
.sidebar-footer-note { display: flex; gap: 0.6rem; align-items: center; margin-top: auto; padding: 0.9rem 0.85rem; color: #acd8bd; border-top: 1px solid rgba(255,255,255,0.14); font-size: 0.76rem; }
.sidebar-backdrop { display: none; }
.admin-page-back-row { display: flex; justify-content: flex-end; margin-bottom: 0.65rem; }
.admin-page-back { min-height: 44px; display: inline-flex; align-items: center; gap: 0.55rem; color: var(--dark-green); border-color: var(--border-color); background: var(--white); }
.admin-page-back:hover { color: var(--dark-green); border-color: var(--dark-green); background: var(--light-bg); }
.admin-page-back:focus-visible { outline: 2px solid var(--primary-green); outline-offset: 2px; }

/* Main Content */
.app-shell { min-height: calc(100vh - var(--navbar-height)); margin-left: var(--sidebar-width); display: flex; flex-direction: column; }
.app-main { flex: 1 0 auto; width: 100%; min-height: calc(100vh - var(--navbar-height)); padding: 2rem clamp(1rem, 3vw, 2.75rem); }
.app-toast { position: fixed; top: calc(var(--navbar-height) + 1rem); right: 1rem; z-index: 1100; display: flex; align-items: center; gap: 0.65rem; width: max-content; max-width: calc(100vw - 2rem); padding: 0.85rem 1rem; border: 1px solid; border-radius: 10px; box-shadow: 0 10px 28px rgba(24, 49, 37, 0.16); font-size: 0.9rem; font-weight: 600; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity 220ms ease, transform 220ms ease, visibility 220ms ease; }
.app-toast.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.app-toast i { flex: 0 0 auto; font-size: 1rem; }
.app-toast-success { color: #075b32; background: #e6f4eb; border-color: #acd8bd; }
.app-toast-warning { color: #725500; background: #fff8db; border-color: #ead78c; }
.app-toast-error { color: #842029; background: #f8d7da; border-color: #f1aeb5; }
.research-shell { margin-left: 0; }
.research-shell .app-main { width: calc(100% - var(--sidebar-width)); margin-left: var(--sidebar-width); }
.research-shell + .app-footer { display: none; }
.research-shell .app-main { padding-bottom: 3rem; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.eyebrow { margin-bottom: 0.35rem; color: var(--primary-green); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.page-title { margin: 0; color: var(--dark-green); font-size: clamp(1.55rem, 3vw, 2.1rem); font-weight: 700; }
.breadcrumb { margin: 0; font-size: 0.82rem; }
.breadcrumb-item a { color: var(--primary-green); }

/* Cards */
.ui-card { height: 100%; background: var(--white); border: 1px solid var(--border-color); border-radius: 12px; box-shadow: var(--shadow-soft); }
.stat-card { position: relative; overflow: hidden; padding: 1.2rem; }
.stat-card::after { width: 72px; height: 72px; content: ""; position: absolute; right: -28px; bottom: -30px; background: rgba(25, 135, 84, 0.08); border-radius: 50%; }
.stat-icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 1rem; color: var(--primary-green); background: #e6f4eb; border-radius: 10px; }
.stat-label { margin-bottom: 0.25rem; color: var(--muted-text); font-size: 0.8rem; }
.stat-value { color: var(--dark-green); font-size: 1.65rem; font-weight: 700; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--border-color); }
.panel-title { margin: 0; color: var(--dark-green); font-size: 1rem; font-weight: 700; }
.panel-body { padding: 1.2rem; }
.empty-state { padding: 2.3rem 1rem; color: var(--muted-text); text-align: center; }
.empty-state-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 1rem; color: var(--primary-green); background: #e6f4eb; border-radius: 50%; font-size: 1.35rem; }

.app-main .row.g-3 > .col-sm-6.col-xl-4 > a[href*="department_courses.php"]:not(.user-department-card):not(.admin-department-card) > .panel-body { min-width: 0; flex-wrap: wrap; }
.app-main .row.g-3 > .col-sm-6.col-xl-4 > a[href*="department_courses.php"]:not(.user-department-card):not(.admin-department-card) > .panel-body > div { flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; }
.app-main .row.g-3 > .col-sm-6.col-xl-4 > a[href*="department_courses.php"]:not(.user-department-card):not(.admin-department-card) > .panel-body > div strong,
.app-main .row.g-3 > .col-sm-6.col-xl-4 > a[href*="department_courses.php"]:not(.user-department-card):not(.admin-department-card) > .panel-body > div small { overflow-wrap: anywhere; }
.app-main .row.g-3 > .col-sm-6.col-xl-4 > a[href*="department_courses.php"]:not(.user-department-card):not(.admin-department-card) > .panel-body > .badge { flex: 0 0 auto; max-width: 100%; margin-left: auto; padding: 0.3rem 0.55rem; white-space: nowrap; }
.user-department-card .panel-body,
.user-course-card .panel-body,
.user-course-research-card .panel-body { min-width: 0; }
.admin-department-card .panel-body {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
    flex-wrap: wrap;
}
.admin-department-card .logo-container,
.admin-selected-department-logo {
    width: 72px;
    height: 72px;
    min-width: 72px;
    max-width: 72px;
    flex-basis: 72px;
}
.admin-department-card .department-admin-card-copy {
    flex: 1 1 160px;
    min-width: 0;
    overflow-wrap: anywhere;
}
.admin-department-card .badge {
    flex: 0 0 auto;
    max-width: 100%;
    margin-left: auto;
    white-space: nowrap;
}
.college-management-page .college-catalog-header { align-items: center; flex-wrap: wrap; gap: 1rem; }
.college-management-page .department-search { display: block; width: min(100%, 560px); min-width: 0; }
.college-management-page .department-search .input-group { min-width: 0; flex-wrap: nowrap; }
.college-management-page .department-search .form-control { min-width: 0; }
.college-management-page .department-search .btn { width: auto; flex: 0 0 auto; }
.college-management-page .department-search .form-control,
.college-management-page .department-search .btn { min-height: 44px; }
.college-management-page .legacy-extension-warning { overflow-wrap: break-word; }
@media (max-width: 575.98px) {
    .college-management-page .department-search .input-group { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: .5rem; }
    .college-management-page .department-search .input-group > * { margin-left: 0 !important; border-radius: 7px !important; }
    .college-management-page .department-search .form-control { width: 100%; }
    .college-management-page .department-search .btn { grid-column: 1 / -1; }
}
@media (max-width: 991.98px) {
    .admin-department-card .logo-container,
    .admin-selected-department-logo {
        width: 68px;
        height: 68px;
        min-width: 68px;
        max-width: 68px;
        flex-basis: 68px;
    }
}
@media (max-width: 575.98px) {
    .admin-department-card .logo-container,
    .admin-selected-department-logo {
        width: 60px;
        height: 60px;
        min-width: 60px;
        max-width: 60px;
        flex-basis: 60px;
    }
}
.user-department-card .department-card-copy,
.user-course-card h2,
.user-course-research-copy { min-width: 0; overflow-wrap: anywhere; }
.user-course-research-copy h3,
.user-course-research-copy p { overflow-wrap: anywhere; }
.user-course-research-card .btn { max-width: 100%; white-space: normal; }
.course-major-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 96px;
    height: 100%;
    padding: 1.15rem 1.25rem;
    color: var(--dark-green);
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.course-major-card:hover,
.course-major-card:focus-visible {
    color: var(--dark-green);
    border-color: rgba(25, 135, 84, 0.45);
    box-shadow: 0 10px 26px rgba(24, 56, 46, 0.1);
    transform: translateY(-2px);
}
.course-major-card:focus-visible { outline: 3px solid rgba(25, 135, 84, 0.25); outline-offset: 2px; }
.course-major-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    color: var(--primary-green);
    background: #e6f4eb;
    border-radius: 10px;
}
.course-major-name { min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.course-major-arrow { margin-left: auto; color: #a17b00; }

@media (max-width: 767.98px) {
    .app-main .row.g-3 > .col-sm-6.col-xl-4 > a[href*="department_courses.php"]:not(.user-department-card):not(.admin-department-card) > .panel-body { display: grid !important; grid-template-columns: 64px minmax(0, 1fr); align-items: center; justify-content: stretch; gap: 0.5rem; }
    .app-main .row.g-3 > .col-sm-6.col-xl-4 > a[href*="department_courses.php"]:not(.user-department-card):not(.admin-department-card) > .panel-body > div { grid-column: 2; }
    .app-main .row.g-3 > .col-sm-6.col-xl-4 > a[href*="department_courses.php"]:not(.user-department-card):not(.admin-department-card) > .panel-body > .badge { grid-column: 2; justify-self: end; margin-left: 0; }
}

/* Buttons */
.btn { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; border-radius: 7px; font-weight: 600; }
.btn-primary { --bs-btn-bg: var(--primary-green); --bs-btn-border-color: var(--primary-green); --bs-btn-hover-bg: var(--dark-green); --bs-btn-hover-border-color: var(--dark-green); }
.btn-warning { --bs-btn-bg: var(--accent-yellow); --bs-btn-border-color: var(--accent-yellow); --bs-btn-color: var(--dark-text); --bs-btn-hover-bg: #e0a900; --bs-btn-hover-border-color: #e0a900; }
.btn-outline-secondary { --bs-btn-color: #5e6a64; --bs-btn-border-color: #b8c8bf; }

.pdf-upload-field {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.45rem;
}
.pdf-upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.7rem 1.1rem;
    border-radius: 10px;
    border: 1px solid rgba(7, 91, 50, 0.16);
    background: rgba(5, 150, 68, 0.06);
    color: var(--dark-green);
    font-size: 0.93rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}
.pdf-upload-btn:hover,
.pdf-upload-btn:focus-visible {
    background: rgba(5, 150, 68, 0.1);
    border-color: rgba(7, 91, 50, 0.2);
    transform: translateY(-1px);
}
.pdf-upload-name {
    color: var(--muted-text);
    font-size: 0.92rem;
    line-height: 1.5;
    word-break: break-word;
}

/* Forms */
.form-label { margin-bottom: 0.4rem; color: var(--dark-text); font-size: 0.82rem; font-weight: 600; }
.form-control, .form-select { min-height: 42px; border-color: var(--border-color); border-radius: 7px; }
.research-add-form > div { min-width: 0; }
.research-add-form .form-select { width: 100%; min-width: 0; }
.research-add-form #course_hint { overflow-wrap: anywhere; }
.form-control[type="file"] { height: auto; padding: 0.62rem 0.75rem; }
.form-control:focus, .form-select:focus { border-color: var(--primary-green); box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.14); }
.input-group-text { color: var(--muted-text); background: var(--light-bg); border-color: var(--border-color); }
.registration-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.registration-name-grid,
.registration-account-grid {
    display: grid;
    min-width: 0;
    grid-column: 1 / -1;
    gap: 16px;
}
.registration-name-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.registration-account-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.registration-field { min-width: 0; }
.registration-field .form-label {
    display: block;
    min-height: 2.5rem;
}
.registration-field .form-control,
.registration-field .form-select {
    width: 100%;
    box-sizing: border-box;
}
.registration-full-field { grid-column: 1 / -1; }
@media (max-width: 991.98px) {
    .registration-name-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
    .registration-form-grid,
    .registration-name-grid,
    .registration-account-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Tables */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border-color); border-radius: 9px; }
.table { width: 100%; min-width: 920px; margin-bottom: 0; vertical-align: middle; }
.table > :not(caption) > * > * { padding: 0.85rem 1rem; border-bottom-color: var(--border-color); }
.table thead th { color: var(--muted-text); background: var(--light-bg); font-size: 0.73rem; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.table tbody tr:hover { background: #fbfdfc; }
.table tbody td { overflow-wrap: anywhere; font-size: 0.88rem; }

.submission-table .status-column,
.submission-table .review-date-column,
.submission-table .actions-column { min-width: 130px; }
.submission-table .status-column { min-width: 150px; }
.submission-table .review-date-column { min-width: 140px; }
.submission-table .actions-column { min-width: 170px; }

.submissions-page { width: 100%; min-width: 0; }
.submissions-page-heading { align-items: center; }
.submissions-page-heading > a { flex: 0 0 auto; }
.submission-history-card,
.submission-history-card .panel-body { min-width: 0; }
.submission-history-card > .panel-header { align-items: flex-end; flex-wrap: wrap; }
.submission-filters { display: grid; grid-template-columns: minmax(280px, 1.7fr) minmax(170px, .75fr) auto; align-items: end; gap: .65rem; width: min(100%, 900px); min-width: 0; }
.submission-filter-field { min-width: 0; }
.submission-filter-field .form-label { display: block; margin-bottom: .3rem; }
.submission-filter-search .input-group { min-width: 0; }
.submission-filter-actions { display: flex; gap: .5rem; }
.submission-filter-actions .btn { white-space: nowrap; }
.submission-table-wrapper { width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.submission-table { width: 100%; min-width: 1380px; table-layout: fixed; }
.submission-table .submission-col-number { width: 56px; }
.submission-table .submission-col-title { width: 330px; }
.submission-table .submission-col-department { width: 215px; }
.submission-table .submission-col-year { width: 130px; }
.submission-table .submission-col-type { width: 105px; }
.submission-table .submission-col-submitted { width: 165px; }
.submission-table .submission-col-status { width: 150px; }
.submission-table .submission-col-reviewed { width: 145px; }
.submission-table .submission-col-actions { width: 140px; }
.submission-table thead th,
.submission-table tbody td { vertical-align: middle; }
.submission-table tbody td { padding: .8rem .75rem; line-height: 1.5; word-break: normal; overflow-wrap: break-word; }
.submission-table .submission-cell-number,
.submission-table .submission-cell-year,
.submission-table .submission-cell-type,
.submission-table .submission-cell-submitted,
.submission-table .submission-cell-status,
.submission-table .submission-cell-reviewed { white-space: nowrap; }
.submission-table .submission-cell-title,
.submission-table .submission-cell-department { white-space: normal; }
.submission-table .submission-cell-title strong { overflow-wrap: break-word; }
.submission-row-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .4rem; }
.submission-row-actions .btn { flex: 0 0 auto; white-space: nowrap; word-break: normal; overflow-wrap: normal; }
.submission-cell-status .status-badge { flex-shrink: 0; }

@media (max-width: 991.98px) {
    .submission-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
    .submission-filter-search { grid-column: 1 / -1; }
    .submission-filter-actions { justify-content: flex-end; }
}

@media (max-width: 767.98px) {
    .submissions-page-heading { align-items: stretch; flex-direction: column; }
    .submissions-page-heading > a { width: 100%; }
    .submission-history-card > .panel-header { align-items: stretch; flex-direction: column; }
    .submission-filters { grid-template-columns: minmax(0, 1fr); }
    .submission-filter-search { grid-column: auto; }
    .submission-filter-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .submission-filter-actions .btn { width: 100%; }
    .submission-table-wrapper { overflow: visible; border: 0; }
    .submission-table colgroup { display: none; }
    .app-main .submission-history-card .submission-table-wrapper > .submission-table { display: block; width: 100%; min-width: 0 !important; table-layout: auto !important; border-collapse: separate; }
    .submission-table thead { display: none; }
    .submission-table tbody { display: grid; gap: .75rem; }
    .submission-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 0; overflow: hidden; background: var(--white); border: 1px solid var(--border-color); border-radius: 9px; box-shadow: var(--shadow-soft); }
    .submission-table tbody td { display: grid; grid-template-columns: minmax(5.25rem, .42fr) minmax(0, 1fr); align-items: start; gap: .5rem; min-width: 0; padding: .65rem .75rem; border-bottom: 1px solid var(--border-color); font-size: .82rem; line-height: 1.45; white-space: normal; overflow-wrap: anywhere; }
    .submission-table tbody td::before { content: attr(data-label); color: var(--muted-text); font-size: .68rem; font-weight: 700; line-height: 1.45; }
    .submission-table .submission-cell-number,
    .submission-table .submission-cell-title,
    .submission-table .submission-cell-department,
    .submission-table .submission-cell-year,
    .submission-table .submission-cell-type,
    .submission-table .submission-cell-submitted,
    .submission-table .submission-cell-status,
    .submission-table .submission-cell-reviewed,
    .submission-table .submission-cell-actions { grid-column: 1 / -1; }
    .submission-table .submission-cell-number { white-space: nowrap; }
    .submission-table .submission-cell-year,
    .submission-table .submission-cell-type { white-space: nowrap; }
    .submission-table .submission-cell-status .status-badge { min-width: 120px; max-width: 100%; white-space: nowrap; }
    .submission-row-actions { display: flex; width: 100%; flex-wrap: nowrap; gap: .5rem; }
    .submission-row-actions .btn { flex: 1 1 0; min-width: 0; white-space: nowrap; }
}

/* Personal research workspace */
.my-research-page { min-width: 0; }
.my-research-page .ui-card { min-width: 0; }
.my-research-welcome { padding: clamp(1.5rem, 4vw, 3.5rem); text-align: center; }
.my-research-welcome-icon { display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto 1.5rem; border-radius: 24px; background: #e7f4ec; color: #198754; font-size: 1.8rem; }
.my-research-welcome h2 { margin: .6rem 0 1rem; font-size: clamp(1.3rem, 3vw, 1.9rem); }
.my-research-welcome p { max-width: 520px; margin: 0 auto 1.5rem; color: var(--muted-text); line-height: 1.75; }
.my-research-cover { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.5rem; border-bottom: 1px solid var(--border-color); background: linear-gradient(120deg, #eef8f1, #fff); border-radius: 9px 9px 0 0; }
.my-research-reference { margin: .35rem 0 0; font-size: .78rem; color: var(--muted-text); letter-spacing: .06em; }
.my-research-title { max-width: 950px; margin: 0 0 .75rem; font-size: clamp(1.35rem, 2.1vw, 2rem); line-height: 1.4; color: #163f2b; overflow-wrap: anywhere; }
.my-research-authors { color: var(--muted-text); margin-bottom: 1.5rem; overflow-wrap: anywhere; }
.my-research-metadata { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.35rem 1.75rem; margin: 0 0 1.75rem; }
.my-research-metadata > div { min-width: 0; }
.my-research-metadata dt { font-size: .75rem; font-weight: 500; color: var(--muted-text); margin-bottom: .35rem; }
.my-research-metadata dd { margin: 0; font-size: .88rem; line-height: 1.65; font-weight: 500; overflow-wrap: anywhere; }
.my-research-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; border-top: 1px solid var(--border-color); padding-top: 1.3rem; }
.my-research-actions .btn, .my-research-documents .btn, .my-research-welcome .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; white-space: normal; }
.my-research-content-section { margin-top: 1.5rem; padding-top: 1.35rem; border-top: 1px solid var(--border-color); }
.my-research-section-title { margin: 0 0 1rem; color: var(--dark-green); font-size: 1rem; font-weight: 700; }
.my-research-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; margin-top: 1.5rem; }
.my-research-grid--single { grid-template-columns: minmax(0, 1fr); }
.my-research-progress { list-style: none; padding: 0; margin: 0; }
.my-research-progress li { display: flex; gap: 1rem; position: relative; padding-bottom: 1.6rem; }
.my-research-progress li:last-child { padding-bottom: 0; }
.my-research-progress li:not(:last-child)::after { content: ''; position: absolute; top: 38px; bottom: 4px; left: 18px; width: 2px; background: #e3e9e5; }
.my-research-progress .progress-symbol { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border: 1px solid #dce6df; border-radius: 50%; background: #f5f8f6; color: #718078; }
.my-research-progress .is-complete .progress-symbol { background: #198754; border-color: #198754; color: white; }
.my-research-progress .is-current .progress-symbol { background: #fff1bf; border-color: #e9c94d; color: #795b00; }
.my-research-progress .is-rejected .progress-symbol { background: #f9dadd; border-color: #edc5cb; color: #a52834; }
.my-research-progress li > div { min-width: 0; padding-top: .15rem; }
.my-research-progress strong { font-size: .88rem; }
.my-research-progress p { font-size: .77rem; color: var(--muted-text); margin: .35rem 0 0; overflow-wrap: anywhere; }
.my-research-remarks { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.75; margin: 0; font-size: .88rem; }
.my-research-feedback { min-width: 0; scroll-margin-top: calc(var(--navbar-height) + 1rem); }
.my-research-feedback .panel-header { flex-wrap: wrap; }
.my-research-feedback--rejected { border-left: 4px solid #DC2626; }
.my-research-feedback--rejected .my-research-section-title { color: #B91C1C; }
.my-research-revision-guidance { margin: 1rem 0; color: var(--muted-text); font-size: .88rem; }
.my-research-feedback .btn { max-width: 100%; white-space: normal; }
.my-research-disclosure summary { cursor: pointer; font-weight: 600; color: #146c43; padding: .65rem 0; min-height: 44px; }
.my-research-disclosure { overflow-wrap: anywhere; }
.my-research-documents { padding: 0; margin: 0; list-style: none; }
.my-research-documents li { display: flex; align-items: center; gap: 1rem; border-top: 1px solid var(--border-color); padding: 1rem 0; }
.my-research-documents li > div { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.my-research-documents strong { font-size: .86rem; }
.my-research-documents p { color: var(--muted-text); font-size: .75rem; margin: .4rem 0 0; }
.my-research-document-icon { color: #198754; font-size: 1.3rem; }
.my-research-documents .btn { flex-shrink: 0; }
.my-research-review-history { margin: 1rem 0 0; padding-left: 1.4rem; }
.my-research-review-history li + li { margin-top: 1.25rem; }
.my-research-page :is(a, summary):focus-visible { outline: 3px solid #198754; outline-offset: 4px; }
@media (max-width: 991.98px) {
    .my-research-metadata { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .my-research-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 575.98px) {
    .my-research-cover { padding: 1.2rem; flex-wrap: wrap; }
    .my-research-metadata { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
    .my-research-actions { align-items: stretch; flex-direction: column; }
    .my-research-actions .btn, .my-research-documents .btn, .my-research-welcome .btn { width: 100%; }
    .my-research-documents li { flex-wrap: wrap; }
    .my-research-documents .btn { width: 100%; }
    .my-research-grid .panel-header { flex-wrap: wrap; gap: .5rem; }
}

/* Badges */
.catalog-management-page { min-width: 0; overflow-wrap: anywhere; }
.catalog-college-information { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; }
.catalog-college-logo { width: 72px; height: 72px; object-fit: contain; flex-shrink: 0; }
.catalog-college-copy { min-width: 0; flex: 1 1 240px; overflow-wrap: anywhere; }
.catalog-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.catalog-name { min-width: 0; overflow-wrap: anywhere; }
.catalog-edit-control { min-width: 44px; min-height: 44px; flex-shrink: 0; }
.catalog-delete-control { min-height: 44px; }
.catalog-major-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.catalog-major-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.catalog-major-actions .btn { min-height: 44px; }
.catalog-edit-modal .modal-body { overflow-wrap: anywhere; }
.catalog-delete-modal .modal-body, .catalog-delete-modal [data-delete-dependencies] { overflow-wrap: anywhere; }
.catalog-edit-modal .btn-close { min-width: 44px; min-height: 44px; }
.catalog-edit-modal .modal-footer .btn { min-height: 44px; }
.catalog-delete-modal .modal-footer .btn { min-height: 44px; }
@media (max-width: 575.98px) {
    .catalog-actions { width: 100%; }
    .catalog-actions .btn { flex: 1 1 100%; min-height: 44px; }
    .catalog-major-heading > .btn { width: 100%; min-height: 44px; }
    .catalog-edit-modal .modal-content, .catalog-edit-modal form { min-height: 100%; }
    .catalog-edit-modal form { display: flex; flex-direction: column; }
    .catalog-edit-modal .modal-body { flex: 1; }
    .catalog-edit-modal .modal-footer .btn { flex: 1; }
    .catalog-delete-modal .modal-content, .catalog-delete-modal form { min-height: 100%; }
    .catalog-delete-modal form { display: flex; flex-direction: column; }
    .catalog-delete-modal .modal-body { flex: 1; }
    .catalog-delete-modal .modal-footer { flex-wrap: wrap; }
    .catalog-delete-modal .modal-footer .btn { flex: 1 1 100%; }
}
.status-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 120px; padding: 0.38rem 0.72rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; line-height: 1.2; white-space: nowrap; word-break: normal; overflow-wrap: normal; }
.status-approved { color: #146c43; background: #d9f1e2; }
.status-pending { color: #795b00; background: #fff1bf; }
.status-rejected { color: #a52834; background: #f9dadd; }

.submission-action-button { display: inline-flex !important; align-items: center; justify-content: center; gap: 0.45rem; white-space: nowrap; word-break: normal; overflow-wrap: normal; }
.submission-action-button i { display: inline-flex; align-items: center; }
.submission-action-button span { white-space: nowrap; }
.alert { border-radius: 9px; }

/* Footer */
.app-footer { position: relative; z-index: 2; display: flex; clear: both; flex-direction: column; align-items: center; justify-content: center; gap: 0.55rem; margin-top: auto; padding: 0.7rem 1rem 0.55rem; color: var(--dark-text); background: var(--white); border-top: 1px solid var(--border-color); font-size: 0.78rem; font-weight: 700; text-align: center; }
.footer-logos { display: flex; align-items: center; justify-content: center; gap: 0.7rem; min-height: 38px; }
.footer-logos img { width: 42px; height: 42px; display: block; object-fit: contain; }
.footer-copyright { line-height: 1.35; }

/* Responsive Styles */
@media (max-width: 991.98px) {
    .app-sidebar { transform: translateX(-100%); transition: transform 220ms ease; box-shadow: 12px 0 30px rgba(0,0,0,0.16); }
    .sidebar-open .app-sidebar { transform: translateX(0); }
    .sidebar-backdrop { position: fixed; inset: var(--navbar-height) 0 0; z-index: 1025; background: rgba(12, 35, 24, 0.42); }
    .sidebar-open .sidebar-backdrop { display: block; }
    .app-shell { margin-left: 0; }
    .research-shell .app-main { width: 100%; margin-left: 0; }
}
@media (max-width: 575.98px) {
    :root { --navbar-height: 64px; }
    .app-navbar { height: var(--navbar-height); }
    .app-sidebar { top: var(--navbar-height); height: calc(100vh - var(--navbar-height)); }
    .sidebar-backdrop { inset: var(--navbar-height) 0 0; }
    .app-main { padding: 1.35rem 0.85rem; }
    .admin-page-back-row { justify-content: flex-start; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .page-heading .btn { width: 100%; }
    .panel-header { align-items: flex-start; flex-direction: column; }
    .panel-header .btn { width: 100%; }
    .app-footer { padding: 0.7rem 0.75rem 0.55rem; font-size: 0.7rem; }
    .footer-logos img { width: 36px; height: 36px; }
    .profile-trigger { padding-right: 0; }
    .research-details-actions,
    .app-main > .d-flex.flex-wrap.gap-2.mt-4 { flex-direction: column; }
    .research-details-actions .btn,
    .app-main > .d-flex.flex-wrap.gap-2.mt-4 .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

@media print {
    .app-navbar, .app-sidebar, .sidebar-backdrop, .app-footer, .btn, form { display: none !important; }
    .app-shell { margin-left: 0; }
    .app-main { padding: 0; }
    .ui-card { border: 0; box-shadow: none; }
}

/* Public Landing Page */
.public-navbar { position: sticky; top: 0; z-index: 1040; padding: 0.9rem 0; background: rgba(255, 255, 255, 0.95); border-bottom: 1px solid var(--border-color); backdrop-filter: blur(12px); }
.public-brand { display: inline-flex; align-items: center; gap: 0.65rem; color: var(--dark-green); letter-spacing: 0.04em; }
.public-brand > span:last-child { display: flex; flex-direction: column; line-height: 1.05; }
.public-brand small { color: var(--muted-text); font-size: 0.68rem; font-weight: 500; letter-spacing: 0; }
.public-nav-links a:not(.btn) { color: var(--muted-text); font-size: 0.88rem; font-weight: 600; }
.public-nav-links a:not(.btn):hover, .public-nav-links a.active { color: var(--primary-green); }
.public-nav-links .public-login { margin-left: 0.6rem; padding-left: 1.5rem; border-left: 1px solid var(--border-color); }
.public-menu-button { width: 40px; height: 40px; color: var(--dark-green); background: var(--light-bg); border: 1px solid var(--border-color); border-radius: 8px; }
.public-mobile-menu { display: none; flex-direction: column; gap: 0.8rem; padding: 1rem max(1rem, calc((100% - 720px) / 2)); background: var(--white); border-top: 1px solid var(--border-color); }
.public-mobile-menu.is-open { display: flex; }
.public-mobile-menu a { color: var(--dark-green); font-weight: 600; }

.landing-hero { position: relative; overflow: hidden; padding: 6rem 0 6.5rem; color: var(--white); background: linear-gradient(135deg, #075b32 0%, #059644 100%); }
.landing-hero::before { width: 480px; height: 480px; content: ""; position: absolute; top: -220px; right: -100px; border: 1px solid rgba(255,255,255,0.13); border-radius: 50%; box-shadow: 0 0 0 60px rgba(255,255,255,0.025), 0 0 0 120px rgba(255,255,255,0.02); }
.hero-kicker { display: flex; align-items: center; gap: 0.55rem; margin-bottom: 1.4rem; color: #f2d34d; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; }
.hero-kicker span { width: 25px; height: 2px; background: var(--accent-yellow); }
.landing-hero h1 { margin-bottom: 0.8rem; color: var(--accent-yellow); font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 800; letter-spacing: 0.04em; line-height: 0.95; }
.hero-subtitle { max-width: 680px; margin-bottom: 1rem; font-size: clamp(1.15rem, 2.2vw, 1.65rem); font-weight: 600; line-height: 1.25; }
.hero-copy { max-width: 535px; margin: 0; color: #d3e9da; font-size: 1rem; line-height: 1.7; }
.hero-trust { display: flex; align-items: center; gap: 0.5rem; margin-top: 2.2rem; color: #b9dfc7; font-size: 0.78rem; }
.hero-trust i { color: var(--accent-yellow); }
.hero-visual { min-height: 350px; position: relative; display: grid; place-items: center; }
.hero-visual-orbit { width: min(340px, 75vw); aspect-ratio: 1; border: 1px solid rgba(255,255,255,0.2); border-radius: 50%; box-shadow: 0 0 0 28px rgba(255,255,255,0.035), 0 0 0 72px rgba(255,255,255,0.02); }
.hero-visual-card { position: absolute; display: flex; align-items: center; gap: 0.65rem; padding: 0.8rem 1rem; color: var(--dark-green); background: var(--white); border-radius: 9px; box-shadow: 0 16px 32px rgba(0,0,0,0.18); font-size: 0.78rem; font-weight: 700; }
.hero-visual-card i { color: var(--primary-green); font-size: 1.1rem; }
.hero-visual-card-main { width: 190px; height: 175px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0.45rem; padding: 1.3rem; background: #f6fbf7; transform: rotate(-4deg); }
.hero-visual-card-main i { width: 38px; height: 38px; display: grid; place-items: center; color: var(--white); background: var(--primary-green); border-radius: 9px; }
.hero-visual-card-main strong { font-size: 1.15rem; line-height: 1.05; }
.hero-visual-card-main span { color: var(--muted-text); font-size: 0.7rem; font-weight: 500; }
.hero-visual-card-top { top: 23%; right: 3%; transform: rotate(4deg); }
.hero-visual-card-bottom { bottom: 20%; left: 5%; color: var(--white); background: var(--primary-green); transform: rotate(-3deg); }
.hero-visual-card-bottom i { color: var(--accent-yellow); }
.landing-search { position: relative; z-index: 2; margin-top: -2.6rem; }
.search-panel { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: center; gap: 2rem; padding: 1.6rem 2rem; background: var(--white); border: 1px solid var(--border-color); border-radius: 12px; box-shadow: 0 14px 35px rgba(20, 108, 67, 0.12); }
.search-panel h2, .section-heading h2 { margin: 0; color: var(--dark-green); font-size: 1.35rem; }
.search-panel p { margin: 0.35rem 0 0; color: var(--muted-text); font-size: 0.78rem; }
.repository-search .input-group-text { padding-left: 1rem; background: var(--white); border-right: 0; }
.repository-search .form-control { border-left: 0; }
.repository-page,
.repository-page .repository-search,
.repository-page .repository-search .input-group,
.repository-page .repository-search .form-control,
.repository-page .form-select,
.repository-page .research-card { min-width: 0; }
.repository-page .research-card h3 { word-break: normal; overflow-wrap: break-word; }
.repository-page .research-meta span:first-child { flex: 1 1 0; min-width: 0; overflow: visible; white-space: normal; text-overflow: clip; word-break: normal; overflow-wrap: break-word; }
.repository-page .research-meta span:last-child { flex: 0 0 auto; white-space: nowrap; }
.landing-section { padding: 4.5rem 0; }
.public-stat { display: flex; align-items: center; gap: 1rem; height: 100%; padding: 1.2rem; background: var(--white); border: 1px solid var(--border-color); border-radius: 10px; }
.public-stat > i { width: 42px; height: 42px; display: grid; place-items: center; color: var(--primary-green); background: #e6f4eb; border-radius: 9px; }
.public-stat strong, .public-stat span { display: block; }
.public-stat strong { color: var(--dark-green); font-size: 1.5rem; }
.public-stat span { color: var(--muted-text); font-size: 0.78rem; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.7rem; }
.text-link, .research-link { color: var(--primary-green); font-size: 0.82rem; font-weight: 700; }
.text-link:hover, .research-link:hover { color: var(--dark-green); }
.research-card { height: 100%; display: flex; flex-direction: column; padding: 1.25rem; background: var(--white); border: 1px solid var(--border-color); border-radius: 10px; transition: transform 180ms ease, box-shadow 180ms ease; }
.research-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.research-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; color: var(--primary-green); }
.research-type { padding: 0.3rem 0.55rem; color: var(--dark-green); background: #e6f4eb; border-radius: 999px; font-size: 0.67rem; font-weight: 700; }
.research-card h3 { min-height: 3.1rem; margin: 0 0 0.75rem; color: var(--dark-green); font-size: 1rem; line-height: 1.55; }
.research-author { min-height: 2.6rem; margin-bottom: 1rem; color: var(--muted-text); font-size: 0.8rem; }
.research-meta { display: flex; justify-content: space-between; gap: 0.7rem; margin-top: auto; padding: 0.8rem 0; color: var(--muted-text); border-top: 1px solid var(--border-color); font-size: 0.7rem; }
.research-meta span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.research-link { margin-top: 0.8rem; }
.public-empty { padding: 3rem 1rem; color: var(--muted-text); text-align: center; background: var(--white); border: 1px dashed #bbcec2; border-radius: 10px; }
.public-empty i { margin-bottom: 0.8rem; color: var(--primary-green); font-size: 2rem; }
.public-empty h3 { color: var(--dark-text); font-size: 1rem; }
.public-empty p { margin: 0; font-size: 0.85rem; }
.department-band { background: #edf7f0; }
.department-card { min-height: 105px; position: relative; display: flex; flex-direction: column; justify-content: center; gap: 0.25rem; padding: 1rem; background: var(--white); border: 1px solid #d6e8dc; border-radius: 9px; }
.department-card:hover { border-color: var(--primary-green); }
.department-card span { color: var(--primary-green); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; }
.department-card strong { max-width: 85%; color: var(--dark-green); font-size: 0.86rem; }
.department-card i { position: absolute; top: 1rem; right: 1rem; color: #9bb9a6; font-size: 0.75rem; }
.about-section { padding: 5rem 0; color: var(--white); background: var(--dark-green); }
.about-section h2 { margin: 0 0 1rem; font-size: clamp(1.8rem, 3.5vw, 2.7rem); line-height: 1.15; }
.about-section h2 span { color: var(--accent-yellow); }
.about-section p { max-width: 570px; margin: 0; color: #d3e9da; line-height: 1.7; }
.about-seal { min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; padding: 2rem; color: #d3e9da; border: 1px solid rgba(255,255,255,0.2); border-radius: 50%; text-align: center; }
.about-seal i { color: var(--accent-yellow); font-size: 1.8rem; }
.about-seal strong { max-width: 260px; font-size: 0.9rem; }
.about-seal span { color: #acd8bd; font-size: 0.72rem; }
.public-footer { padding: 3rem 0 1rem; color: #cde3d4; background: #0e4d30; }
.public-footer .public-brand { color: var(--white); }
.public-footer p { margin: 0.8rem 0 0; color: #acd8bd; font-size: 0.8rem; }
.public-footer h2 { margin-bottom: 0.85rem; color: var(--accent-yellow); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; }
.public-footer .col-md-3 a { display: block; margin-bottom: 0.55rem; color: #d3e9da; font-size: 0.8rem; }
.public-footer a:hover { color: var(--white); }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1rem; color: #91bca0; border-top: 1px solid rgba(255,255,255,0.14); font-size: 0.7rem; }

@media (max-width: 767.98px) {
    .landing-hero { padding: 4.5rem 0 5rem; }
    .hero-visual { min-height: 290px; margin-top: -1rem; }
    .hero-visual-card-top { right: 0; }
    .hero-visual-card-bottom { left: 0; }
    .search-panel { grid-template-columns: 1fr; gap: 1rem; padding: 1.3rem; }
    .repository-search .input-group { flex-wrap: wrap; }
    .repository-search .input-group > * { height: 44px; }
    .repository-search .form-control { flex: 1 1 70%; width: auto; }
    .repository-search .btn { flex: 1 1 100%; margin-top: 0.5rem; border-radius: 7px !important; }
    .landing-section { padding: 3.2rem 0; }
    .section-heading { align-items: flex-start; flex-direction: column; }
    .footer-bottom { align-items: flex-start; flex-direction: column; }
}

/* Admin Dashboard */
.admin-welcome { overflow: hidden; background: linear-gradient(120deg, #ffffff 0%, #f1f9f4 100%); }
.admin-welcome h2 { margin: 0 0 0.45rem; color: var(--dark-green); font-size: 1.45rem; }
.admin-welcome p { max-width: 620px; margin: 0; color: var(--muted-text); }
.admin-welcome-icon { margin-right: 2rem; color: rgba(25, 135, 84, 0.18); font-size: 5rem; }
.admin-dashboard { --dashboard-ink: #17342b; --dashboard-muted: #738079; --dashboard-line: #e3eae5; }
.dashboard-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(210px, 270px); gap: 2.5rem; align-items: center; overflow: hidden; margin-bottom: 1.25rem; padding: 1.8rem 2rem; color: #fff; background: repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 1px, transparent 1px 13px), linear-gradient(110deg, #103c2b 0%, #0b6039 68%, #14734a 100%); border-radius: 8px; box-shadow: 0 12px 30px rgba(9, 68, 41, .16); animation: dashboard-rise 420ms ease-out both; }
.dashboard-hero::before { width: 5px; content: ""; position: absolute; inset: 0 auto 0 0; background: var(--accent-yellow); }
.dashboard-hero-copy { min-width: 0; }
.dashboard-date { display: flex; align-items: center; gap: .5rem; margin-bottom: .9rem; color: #c7dfd0; font-size: .76rem; font-weight: 600; }
.dashboard-kicker, .dashboard-section-kicker { color: var(--dark-green); font-size: .75rem; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.dashboard-kicker { margin-bottom: .35rem; }
.dashboard-hero .dashboard-kicker { color: #f2d34d; font-size: .66rem; letter-spacing: normal; }
.dashboard-hero h1 { max-width: 680px; margin: 0; color: #fff; font-size: 2rem; line-height: 1.18; overflow-wrap: anywhere; }
.dashboard-hero-copy > p { max-width: 580px; margin: .65rem 0 1.2rem; color: #d3e6da; font-size: .9rem; }
.dashboard-hero .dashboard-system-name { max-width: 640px; margin: .35rem 0 0; color: #fff; font-size: 1.08rem; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.dashboard-hero .dashboard-dedication { max-width: 640px; margin: .45rem 0 0; color: #d3e6da; font-size: .82rem; line-height: 1.55; overflow-wrap: anywhere; }
.dashboard-hero .dashboard-admin-greeting { max-width: 640px; margin: .55rem 0 1rem; color: #e2eee7; font-size: .84rem; line-height: 1.55; overflow-wrap: anywhere; }
.dashboard-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.dashboard-hero-actions .btn { min-height: 44px; padding-inline: 1rem; }
.dashboard-action-count { min-width: 1.55rem; padding: .05rem .3rem; color: #fff; background: rgba(23, 52, 43, .22); border-radius: 5px; text-align: center; }
.dashboard-text-link { display: inline-flex; align-items: center; gap: .55rem; color: #fff; font-size: .8rem; font-weight: 600; }
.dashboard-text-link:hover { color: #f2d34d; }
.dashboard-hero-pulse { display: grid; align-content: center; gap: .35rem; min-width: 0; padding: .3rem 0 .3rem 1.5rem; border-left: 1px solid rgba(255,255,255,.2); }
.pulse-label { color: #c7dfd0; font-size: .69rem; font-weight: 700; text-transform: uppercase; }
.pulse-rate { color: #fff; font-size: 2.3rem; line-height: 1.05; }
.pulse-caption, .pulse-total { color: #d3e6da; font-size: .74rem; }
.pulse-track { height: 6px; overflow: hidden; margin: .35rem 0 .1rem; background: rgba(255,255,255,.2); border-radius: 8px; }
.pulse-track span { height: 100%; display: block; background: var(--accent-yellow); border-radius: inherit; }
.dashboard-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1.25rem; }
.dashboard-stat { display: flex; align-items: center; gap: .75rem; min-width: 0; min-height: 96px; padding: .95rem .85rem; background: #fff; border: 1px solid var(--dashboard-line); border-radius: 8px; box-shadow: 0 3px 10px rgba(24, 49, 37, .035); animation: dashboard-rise 420ms ease-out both; }
.dashboard-stat:nth-child(2) { animation-delay: 35ms; }
.dashboard-stat:nth-child(3) { animation-delay: 70ms; }
.dashboard-stat:nth-child(4) { animation-delay: 105ms; }
.dashboard-stat:nth-child(5) { animation-delay: 140ms; }
.dashboard-stat:nth-child(6) { animation-delay: 175ms; }
.dashboard-stat-priority { border-color: #ead78c; background: #fffdf3; }
.dashboard-stat-icon { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 7px; font-size: .85rem; }
.tone-green { color: #087343; background: #e5f3e9; }
.tone-blue { color: #256782; background: #e7f2f5; }
.tone-yellow { color: #8a6800; background: #fff3c9; }
.tone-red { color: #a8323c; background: #fae9e8; }
.tone-cyan { color: #277e78; background: #e5f3ef; }
.dashboard-stat > div { display: grid; min-width: 0; }
.dashboard-stat-label { overflow: hidden; color: var(--dashboard-muted); font-size: .68rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-stat strong { color: var(--dashboard-ink); font-size: 1.35rem; line-height: 1.35; }
.dashboard-stat small { overflow: hidden; color: #87928c; font-size: .63rem; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-content-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(270px, .8fr); gap: 1rem; align-items: start; }
.dashboard-primary-column, .dashboard-side-column { display: grid; gap: 1rem; min-width: 0; }
.dashboard-panel { overflow: hidden; border-radius: 8px; box-shadow: 0 4px 16px rgba(24, 49, 37, .045); }
.dashboard-panel .panel-header { min-height: 68px; padding: .85rem 1rem; }
.dashboard-panel .panel-header > a.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dashboard-panel .panel-body { padding: 1rem; }
.dashboard-panel .panel-header > div { display: grid; gap: .15rem; }
.dashboard-panel-mark { color: #98a79d; }
.dashboard-submission-table { min-width: 680px; }
.admin-dashboard .table-responsive { max-width: 100%; overscroll-behavior-x: contain; }
.dashboard-submission-table > :not(caption) > * > * { padding: .72rem .7rem; }
.dashboard-submission-table tbody td, .dashboard-submission-table tbody th { font-size: .77rem; }
.dashboard-submission-table tbody td:not(:last-child) { overflow-wrap: anywhere; vertical-align: top; }
.dashboard-submission-table tbody td:first-child { min-width: 190px; color: var(--dashboard-ink); }
.dashboard-submission-table tbody td:nth-last-child(2) { white-space: nowrap; }
.admin-dashboard .dashboard-submission-table th:last-child,
.admin-dashboard .dashboard-submission-table td:last-child { width: 110px; min-width: 110px; text-align: center; }
.admin-dashboard .dashboard-submission-table .status-badge { min-width: 82px; flex-shrink: 0; justify-content: center; white-space: nowrap; word-break: normal; overflow-wrap: normal; }
.dashboard-status-list { display: grid; gap: 1.15rem; }
.dashboard-status-label { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .4rem; color: var(--dashboard-muted); font-size: .78rem; }
.dashboard-status-label > span { display: inline-flex; align-items: center; gap: .5rem; }
.dashboard-status-label strong { color: var(--dashboard-ink); }
.tone-green-text { color: #16834d; }
.tone-yellow-text { color: #a17a00; }
.tone-red-text { color: #bd4650; }
.dashboard-status-track { height: 6px; overflow: hidden; background: #edf1ee; border-radius: 8px; }
.dashboard-status-track span { height: 100%; display: block; border-radius: inherit; }
.status-fill-approved { background: #16834d; }
.status-fill-pending { background: #e2b91e; }
.status-fill-rejected { background: #c94a54; }
.dashboard-panel .quick-actions { gap: .25rem; }
.dashboard-panel .quick-actions a { padding: .62rem .55rem; font-size: .76rem; }
@keyframes dashboard-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1199.98px) {
    .dashboard-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-content-grid { grid-template-columns: minmax(0, 1.5fr) minmax(250px, .8fr); }
}
@media (max-width: 767.98px) {
    .dashboard-hero { grid-template-columns: 1fr; gap: 1.25rem; padding: 1.4rem 1.25rem; }
    .dashboard-hero h1 { font-size: 1.65rem; }
    .dashboard-hero-pulse { grid-template-columns: auto 1fr; column-gap: .75rem; padding: 1rem 0 0; border-top: 1px solid rgba(255,255,255,.2); border-left: 0; }
    .pulse-label, .pulse-caption, .pulse-track, .pulse-total { grid-column: 1 / -1; }
    .pulse-rate { font-size: 1.8rem; }
    .dashboard-content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .dashboard-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
    .dashboard-stat { gap: .55rem; padding: .75rem .65rem; }
    .dashboard-stat-icon { width: 30px; height: 30px; flex-basis: 30px; }
    .dashboard-panel .panel-header { align-items: flex-start; gap: .75rem; }
    .dashboard-panel .panel-header .btn { flex: 0 0 auto; }
}
@media (max-width: 350px) {
    .dashboard-stat-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    .dashboard-hero, .dashboard-stat { animation: none; }
}
.stat-card-warning .stat-icon { color: #8a6800; background: #fff4cc; }
.stat-card-danger .stat-icon { color: #b02a37; background: #f9dadd; }
.activity-list { display: grid; gap: 1rem; }
.activity-item { display: flex; align-items: flex-start; gap: 0.75rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border-color); }
.activity-item:last-child { padding-bottom: 0; border-bottom: 0; }
.activity-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; color: var(--primary-green); background: #e6f4eb; border-radius: 8px; }
.activity-item strong { color: var(--dark-green); font-size: 0.82rem; }
.activity-item p { margin: 0.15rem 0; color: var(--dark-text); font-size: 0.8rem; }
.activity-item small { color: var(--muted-text); font-size: 0.7rem; }
.quick-actions { display: grid; gap: 0.6rem; }
.quick-actions a { display: flex; align-items: center; gap: 0.7rem; padding: 0.72rem 0.75rem; color: var(--dark-green); border: 1px solid transparent; border-radius: 7px; font-size: 0.8rem; font-weight: 600; }
.quick-actions a:hover { background: var(--light-bg); border-color: var(--border-color); }
.quick-actions a > i:first-child { width: 20px; color: var(--primary-green); text-align: center; }
.quick-actions a > i:last-child { color: var(--muted-text); font-size: 0.7rem; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 0.35rem; color: var(--muted-text); font-size: 0.8rem; }
.summary-row strong { color: var(--dark-green); }
.progress { height: 7px; background: #e9f0eb; }
.profile-summary { display: flex; align-items: flex-start; gap: 0.8rem; }
.profile-summary-avatar { width: 44px; height: 44px; flex: 0 0 auto; }
.profile-summary h3 { margin: 0 0 0.2rem; color: var(--dark-green); font-size: 0.95rem; }
.profile-summary p { margin: 0 0 0.6rem; color: var(--muted-text); font-size: 0.75rem; overflow-wrap: anywhere; }
.profile-identity-card { padding: 1.5rem; }
.profile-identity-head { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; margin-bottom: 1.25rem; text-align: center; }
.profile-avatar-shell { width: 96px; height: 96px; display: grid; place-items: center; overflow: hidden; color: var(--dark-green); background: linear-gradient(135deg, #e9f9ee, #dfeee5); border: 3px solid #d7efe1; border-radius: 50%; box-shadow: 0 8px 18px rgba(25, 135, 84, 0.12); }
.profile-avatar-shell img { width: 100%; height: 100%; display: block; object-fit: cover; }
.profile-avatar-large { width: 130px; height: 130px; display: grid; place-items: center; font-size: 2rem; font-weight: 800; letter-spacing: 0.08em; }
.profile-identity-card h2 { margin: 0; color: var(--dark-green); font-size: clamp(1.4rem, 2vw, 1.9rem); }
.profile-role-pill { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 0.5rem; padding: 0.38rem 0.7rem; color: #0d6d42; background: #dff6e9; border-radius: 999px; font-size: 0.74rem; font-weight: 700; }
.profile-detail-list { margin: 0; }
.profile-detail-list .row { margin: 0; padding: 0.72rem 0; border-top: 1px solid var(--border-color); }
.profile-detail-list .row:first-child { border-top: 0; }
.profile-detail-list dt, .profile-detail-list dd { margin: 0; color: var(--muted-text); font-size: 0.8rem; }
.profile-detail-list dd { color: var(--dark-text); font-weight: 600; text-align: right; }
.profile-section-stack { display: grid; gap: 1.25rem; }
.profile-upload-layout { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.profile-upload-preview { width: 86px; height: 86px; display: grid; place-items: center; overflow: hidden; color: var(--dark-green); background: linear-gradient(135deg, #ebf7ee, #dfeee5); border: 2px solid #dcefe4; border-radius: 50%; }
.profile-upload-preview img { width: 100%; height: 100%; display: block; object-fit: cover; }
.profile-upload-preview span { font-size: 1.15rem; font-weight: 700; letter-spacing: 0.08em; }
.profile-upload-controls { flex: 1 1 220px; min-width: 220px; }
.profile-form-actions { display: flex; justify-content: flex-end; margin-top: 1.2rem; }
.profile-form-actions .btn { min-width: 160px; }
.profile-layout { display: grid; grid-template-columns: minmax(260px, 330px) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.profile-overview { position: relative; overflow: hidden; padding: 0; background: linear-gradient(180deg, #f9fffb 0%, #f1faf4 100%); border: 1px solid #dfece4; }
.profile-overview::before { width: 220px; height: 220px; content: ""; position: absolute; top: -90px; right: -40px; background: rgba(25, 135, 84, 0.06); border-radius: 50%; }
.profile-identity-cover { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; padding: 1.7rem 1.25rem 1rem; background: linear-gradient(135deg, rgba(5, 150, 68, 0.08), rgba(7, 91, 50, 0.03)); }
.profile-overview-body { position: relative; z-index: 1; padding: 1.2rem 1.25rem 1.4rem; }
.profile-chip-row { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-bottom: 1rem; }
.profile-chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.38rem 0.7rem; color: var(--dark-green); background: #e6f4eb; border: 1px solid rgba(25, 135, 84, 0.12); border-radius: 999px; font-size: 0.7rem; font-weight: 700; }
.profile-overview h2 { margin: 0 0 0.3rem; color: var(--dark-green); font-size: clamp(1.4rem, 2vw, 1.8rem); }
.profile-email { margin: 0 0 1rem; color: var(--muted-text); font-size: 0.82rem; overflow-wrap: anywhere; }
.profile-meta-grid { display: grid; gap: 0.75rem; }
.profile-meta-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding-top: 0.75rem; border-top: 1px solid rgba(39, 99, 67, 0.08); }
.profile-meta-row:first-child { border-top: 0; padding-top: 0; }
.profile-meta-label { color: var(--muted-text); font-size: 0.75rem; }
.profile-meta-row strong { color: var(--dark-text); font-size: 0.8rem; text-align: right; }
.profile-content { display: grid; gap: 1.25rem; }
.profile-panel { overflow: hidden; }
.profile-panel .panel-header { padding: 1rem 1.2rem; }
.profile-panel .panel-body { padding: 1.2rem; }
.profile-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.profile-form-grid .full { grid-column: 1 / -1; }
.field-group { display: flex; flex-direction: column; gap: 0.45rem; }
.profile-panel .btn { min-width: 182px; }
.status-summary-box { height: 100%; padding: 1.2rem; background: var(--light-bg); border: 1px solid var(--border-color); border-radius: 9px; }

@media (max-width: 991.98px) {
    .profile-layout { grid-template-columns: 1fr; }
}

@media (max-width: 575.98px) {
    .profile-form-grid { grid-template-columns: 1fr; }
    .profile-upload-layout { flex-direction: column; align-items: stretch; }
    .profile-form-actions { justify-content: stretch; }
    .profile-form-actions .btn { width: 100%; }
    .profile-panel .panel-header { align-items: flex-start; }
}
.status-summary-box p { color: var(--muted-text); }
.detail-text { white-space: normal; color: var(--muted-text); line-height: 1.7; }
.research-details-title { margin: 0; color: var(--dark-green); font-size: clamp(1.5rem, 3vw, 2.25rem); line-height: 1.2; overflow-wrap: anywhere; }
.research-details-author { margin: 0.85rem 0 0; color: var(--muted-text); }
.research-details-actions { position: relative; z-index: 1; clear: both; margin-top: 1.5rem; }
.research-details-layout { align-items: start; }
.research-details-layout > [class*="col-"] { min-width: 0; }
.research-details-layout .ui-card,
.research-details-layout .status-summary-box { height: auto; min-height: 0; }
.research-shell .app-main > .d-flex.flex-wrap.gap-2.mt-4 { align-self: auto; flex-basis: auto; min-height: 0; padding: 0; background: transparent; }
.app-main > .d-flex.flex-wrap.gap-2.mt-4 { position: relative; z-index: 1; display: flex !important; flex-basis: 100%; align-self: stretch; clear: both; float: none; min-height: 52px; margin-top: 1.5rem !important; padding: 0.5rem 0; background: var(--light-bg); isolation: isolate; }
.user-filter-header { align-items: flex-start; flex-wrap: wrap; }
.user-filters { min-width: min(100%, 720px); flex: 1; }
.user-filters .form-select { max-width: 150px; }

.app-main > section.ui-card:first-of-type .user-filter-header { gap: 1rem; }
.app-main > section.ui-card:first-of-type .user-filters { width: 100%; min-width: 0; max-width: none; }
.app-main > section.ui-card:first-of-type .user-filters .input-group { display: grid; grid-template-columns: 42px minmax(200px, 2fr) minmax(150px, 1.25fr) minmax(125px, 1fr) minmax(135px, 1fr) auto; gap: 0.5rem; }
.app-main > section.ui-card:first-of-type .user-filters .input-group > * { width: 100%; min-width: 0; border-radius: 7px !important; }
.app-main > section.ui-card:first-of-type .user-filters .form-select { max-width: none; }
.app-main > section.ui-card:first-of-type .user-filters .btn { min-width: 84px; white-space: nowrap; }
.app-main:not(.librarian-records-page):not(.user-management-page) > section.ui-card:first-of-type .table-responsive > .table { min-width: 1280px; table-layout: fixed; }
.app-main:not(.librarian-records-page):not(.user-management-page) > section.ui-card:first-of-type .table thead th:nth-child(1) { width: 54px; }
.app-main:not(.librarian-records-page):not(.user-management-page) > section.ui-card:first-of-type .table thead th:nth-child(2) { width: 290px; }
.app-main:not(.librarian-records-page):not(.user-management-page) > section.ui-card:first-of-type .table thead th:nth-child(3) { width: 155px; }
.app-main:not(.librarian-records-page):not(.user-management-page) > section.ui-card:first-of-type .table thead th:nth-child(4) { width: 180px; }
.app-main:not(.librarian-records-page):not(.user-management-page) > section.ui-card:first-of-type .table thead th:nth-child(5) { width: 140px; }
.app-main:not(.librarian-records-page):not(.user-management-page) > section.ui-card:first-of-type .table thead th:nth-child(6) { width: 125px; }
.app-main:not(.librarian-records-page):not(.user-management-page) > section.ui-card:first-of-type .table thead th:nth-child(7) { width: 175px; }
.app-main:not(.librarian-records-page):not(.user-management-page) > section.ui-card:first-of-type .table thead th:nth-child(8) { width: 140px; text-align: center; }
.app-main:not(.librarian-records-page):not(.user-management-page) > section.ui-card:first-of-type .table thead th:nth-child(9) { width: 125px; }
.app-main:not(.librarian-records-page):not(.user-management-page) > section.ui-card:first-of-type .table tbody td:nth-child(2) { white-space: normal; overflow-wrap: anywhere; }
.app-main:not(.librarian-records-page):not(.user-management-page) > section.ui-card:first-of-type .table tbody td:nth-child(7) { white-space: nowrap; }
.app-main:not(.librarian-records-page):not(.user-management-page) > section.ui-card:first-of-type .table tbody td:nth-child(8) { text-align: center; }
.app-main:not(.librarian-records-page):not(.user-management-page) > section.ui-card:first-of-type .table tbody td:nth-child(8) .status-badge { min-width: 112px; }
.app-main:not(.librarian-records-page):not(.user-management-page) > section.ui-card:first-of-type .table tbody td:last-child > a { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-width: 96px; padding: 0.45rem 0.65rem; white-space: nowrap !important; word-break: normal !important; overflow-wrap: normal !important; }
.pending-status-link { text-decoration: none; }
.pending-queue-page,
.pending-queue-page > .ui-card,
.pending-queue-page .panel-body,
.pending-queue-page .table-responsive { min-width: 0; max-width: 100%; }
.pending-queue-page .table tbody td:nth-child(4) { white-space: normal; word-break: normal; overflow-wrap: break-word; }
@media (min-width: 992px) and (max-width: 1199.98px) {
    .app-main.pending-queue-page > section.ui-card:first-of-type .user-filters .input-group { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pending-queue-page .user-filters .input-group-text { display: none; }
    .pending-queue-page .user-filters #pendingSearch,
    .pending-queue-page .user-filters .btn { grid-column: 1 / -1; }
}
.review-btn { display: inline-flex !important; align-items: center; justify-content: center; gap: 0.4rem; min-width: 96px; padding: 0.45rem 0.65rem; white-space: nowrap !important; word-break: normal !important; overflow-wrap: normal !important; }
.review-btn i, .review-btn span { flex: 0 0 auto; white-space: nowrap; }

.pending-review-page { width: 100%; max-width: 1500px; margin-inline: auto; }
.pending-review-heading { align-items: flex-end; margin-bottom: 1.5rem; }
.pending-review-layout { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(300px, 1fr); align-items: start; gap: 1.25rem; }
.pending-review-content { display: grid; min-width: 0; gap: 1.25rem; }
.pending-review-content .ui-card, .pending-review-panel { min-width: 0; overflow: hidden; }
.pending-review-title { margin: 0; color: var(--dark-green); font-size: clamp(1.5rem, 2.2vw, 2rem); font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.pending-research-info { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border-color); }
.pending-review-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.5rem; margin: 1rem 0 0; }
.pending-review-meta-item { min-width: 0; }
.pending-review-meta-item dt { margin-bottom: 0.25rem; color: var(--muted-text); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; }
.pending-review-meta-item dd { margin: 0; color: var(--dark-text); font-size: 0.92rem; overflow-wrap: anywhere; }
.pending-abstract-text { margin-top: 1rem; }
.abstract-content,
.pending-abstract-text,
.research-abstract,
.research-card .small.text-muted.mb-2 {
    width: 100%;
    max-width: none;
    color: var(--dark-text);
    font-size: 16px;
    line-height: 1.75;
    text-align: left;
    text-justify: auto;
    white-space: normal;
    word-spacing: normal;
    letter-spacing: normal;
    overflow-wrap: anywhere;
}
.abstract-content > p {
    margin: 0 0 1rem;
}
.abstract-content > p:last-child {
    margin-bottom: 0;
}
.my-research-abstract {
    text-align: justify;
    text-align-last: left;
    hyphens: auto;
}
@media (max-width: 575.98px) {
    .my-research-abstract { text-align: left; }
}
textarea[name="abstract"] {
    font-family: "Century Gothic", CenturyGothic, AppleGothic, sans-serif;
    font-size: 10.5pt;
    line-height: 2;
    text-align: left;
}
.pending-keywords { margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px solid var(--border-color); }
.pending-keyword-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.8rem 0 0; padding: 0; list-style: none; }
.pending-keyword-list li { max-width: 100%; padding: 0.32rem 0.65rem; color: var(--dark-green); background: #eaf4ee; border: 1px solid #d8e9de; border-radius: 999px; font-size: 0.78rem; overflow-wrap: anywhere; }
.pending-keywords-empty, .pending-document-empty, .pending-reviewed-note { margin: 0.75rem 0 0; color: var(--muted-text); font-size: 0.88rem; }
.pending-review-sidebar { position: sticky; top: calc(var(--navbar-height) + 1rem); min-width: 0; }
.pending-review-panel-section { padding: 1.2rem; border-bottom: 1px solid var(--border-color); }
.pending-review-panel-section:last-child { border-bottom: 0; }
.pending-review-section-title { margin: 0 0 0.8rem; color: var(--dark-green); font-size: 0.9rem; font-weight: 700; }
.pending-review-status { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.pending-review-status .status-badge { flex: 0 0 auto; }
.pending-document-heading { display: flex; align-items: flex-start; gap: 0.65rem; min-width: 0; color: var(--dark-green); }
.pending-document-heading i { flex: 0 0 auto; margin-top: 0.2rem; color: #b42332; }
.pending-document-heading strong { min-width: 0; font-size: 0.88rem; line-height: 1.45; overflow-wrap: anywhere; word-break: break-word; }
.pending-document-meta { margin: 0.6rem 0 0.9rem; color: var(--muted-text); font-size: 0.8rem; line-height: 1.6; overflow-wrap: anywhere; }
.pending-review-actions .form-label { display: block; margin-top: 0.1rem; }
.pending-review-actions textarea { width: 100%; resize: vertical; }
.pending-review-actions .btn, .pending-review-panel > .btn { white-space: normal; }
.pending-review-panel .btn-outline-danger { --bs-btn-color: #a52834; --bs-btn-border-color: #d8999f; --bs-btn-hover-bg: #a52834; --bs-btn-hover-border-color: #a52834; }
.pending-review-panel .btn:hover, .pending-review-panel .btn:focus-visible { box-shadow: 0 0 0 0.2rem rgba(7, 91, 50, 0.14); }

.reports-page,
.reports-page .ui-card,
.reports-page .panel-body,
.reports-page .report-groups > * { min-width: 0; }
.reports-page .eyebrow { color: var(--dark-green); }
.reports-page .ui-card { height: auto; }
.reports-page .panel-header { min-height: 65px; }
.reports-page .page-heading { flex-wrap: wrap; align-items: center; gap: 1rem; }
.reports-page .page-heading > div:first-child { flex: 1 1 340px; min-width: 0; }
.reports-page .report-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; }
.reports-page .report-toolbar .btn,
.reports-page .report-filter-actions .btn { min-height: 44px; white-space: nowrap; }
.reports-page .report-filter-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.reports-page .report-filter-form > div { min-width: 0; }
.reports-page .report-filter-form .form-text { overflow-wrap: anywhere; }
.reports-page .report-filter-form .form-control,
.reports-page .report-filter-form .form-select { width: 100%; min-width: 0; min-height: 44px; }
.reports-page .report-filter-actions { display: flex; flex-wrap: wrap; gap: .5rem; grid-column: 1 / -1; }
.reports-page .report-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.reports-page .stat-card { padding: 1rem; }
.reports-page .stat-label { overflow-wrap: break-word; }
.reports-page .stat-value { overflow-wrap: break-word; line-height: 1.3; }
.reports-page .report-groups { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
.reports-page .report-group { align-self: start; }
.reports-page .report-summary-wrapper,
.reports-page .report-table-wrapper { width: 100%; min-width: 0; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-inline: contain; }
.reports-page .report-table-wrapper:focus-visible { outline: 3px solid var(--accent-yellow); outline-offset: 2px; }
.reports-page .report-summary-table { width: 100%; min-width: 0; table-layout: auto; }
.reports-page .report-summary-table > :not(caption) > * > * { padding: .7rem .5rem; vertical-align: middle; }
.reports-page .report-summary-table td { line-height: 1.45; word-break: normal; overflow-wrap: break-word; }
.reports-page .report-summary-table th,
.reports-page .report-summary-table .report-metric { text-align: right; white-space: nowrap; }
.reports-page .report-summary-table th:first-child,
.reports-page .report-summary-table .report-category { text-align: left; }
.reports-page .report-group-department th:nth-child(2) { text-align: left; }
.reports-page .report-group-department .report-summary-table tfoot > tr > * { font-weight: 700; border-top: 2px solid var(--border-color); }
.reports-page .report-group-department .report-summary-table tfoot th,
.reports-page .report-group-course .report-summary-table tfoot th,
.reports-page .report-group-major .report-summary-table tfoot th { text-align: left; }
.reports-page .report-group-department .report-summary-table tfoot td,
.reports-page .report-group-course .report-summary-table tfoot td,
.reports-page .report-group-major .report-summary-table tfoot td { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.reports-page .report-group-role th:nth-child(2) { text-align: left; }
.reports-page .report-metric { width: 1%; font-variant-numeric: tabular-nums; }
.reports-page .report-cell-label { display: none; }
.reports-page .report-cell-value { min-width: 0; overflow-wrap: break-word; }
.reports-page .report-table { width: 100%; min-width: 1479px; table-layout: fixed; margin-bottom: 0; vertical-align: middle; }
.reports-page .report-table > :not(caption) > * > * { padding: .7rem .5rem; vertical-align: middle; }
.reports-page .report-table thead th { white-space: normal; }
.reports-page .report-table tbody td { line-height: 1.45; overflow-wrap: break-word; word-break: normal; }
.reports-page .report-col-number { width: 54px; }
.reports-page .report-col-title { width: 330px; }
.reports-page .report-col-author { width: 170px; }
.reports-page .report-col-department { width: 170px; }
.reports-page .report-col-program { width: 240px; }
.reports-page .report-col-type { width: 115px; }
.reports-page .report-col-year { width: 120px; }
.reports-page .report-col-status { width: 120px; }
.reports-page .report-col-date { width: 160px; }
.reports-page .report-col-type .report-cell-value { white-space: nowrap; overflow-wrap: normal; }
.reports-page .report-status-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 88px; padding: .36rem .45rem; border-radius: 999px; font-size: .74rem; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.reports-page .report-status-pending { color: #795b00; background: #fff1bf; }
.reports-page .report-status-approved { color: #146c43; background: #d9f1e2; }
.reports-page .report-status-rejected { color: #a52834; background: #f9dadd; }
.reports-page .report-status-review { color: #174a37; background: #dcefe5; }
.reports-page .report-status-draft, .reports-page .report-status-archived, .reports-page .report-status-neutral { color: #4f5b55; background: #edf1ee; }
.reports-page .pagination { flex-wrap: wrap; gap: .25rem; }
.reports-page .report-print-header { display: none; }
.reports-page .report-signatures { display: none; }
.reports-page .report-letterhead { display: grid; grid-template-columns: 80px minmax(0, 1fr) 80px; align-items: center; gap: .5rem; padding-bottom: .5rem; text-align: center; font-family: "Century Gothic", CenturyGothic, Arial, sans-serif; }
.reports-page .report-header-logo { display: block; width: 80px; height: 80px; object-fit: contain; }
.reports-page .report-letterhead h1 { margin: 0; font-family: inherit; color: #00b050; font-size: 12px; font-weight: 700; line-height: 1.25; }
.reports-page .report-letterhead p { margin: 0; font-size: 12px; line-height: 1.25; }
.reports-page .report-letterhead a { color: #111; text-decoration: underline; }
.reports-page .report-document-title { text-align: center; margin: 1rem 0 .5rem; }
.reports-page .report-document-title h2 { font-size: 1.1rem; font-weight: 700; }
.reports-page .report-official-footer { display: none; }
.reports-page .report-page-header-resource { display: none; }
.reports-page .report-summary-title { display: none; }
.reports-page .report-letterhead h2 { margin: .8rem 0 0; font-size: 1.1rem; font-weight: 700; letter-spacing: .05em; }
.reports-page .report-generated { margin: .8rem 0; }
.reports-page .report-coverage-title { margin: 0 0 .5rem; font-size: 1rem; font-weight: 700; }
.reports-page .report-scope-note { margin: .5rem 0 0; font-size: .8rem; }
.reports-page .report-print-notice { display: none; }
.reports-page .report-detail-card { scroll-margin-top: calc(var(--navbar-height) + 1rem); }
.reports-page .report-group-department > .panel-header { flex-wrap: wrap; }
.reports-page .report-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.reports-page .report-record-count { font-size: .875rem; }
.reports-page .report-page-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .65rem; }
.reports-page .report-page-controls .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
.reports-page .report-page-indicator { font-size: .875rem; white-space: nowrap; }
.reports-page .academic-active-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem 1rem; text-align: left; }
.reports-page .academic-active-filters > div { min-width: 0; overflow-wrap: anywhere; }
.reports-page .academic-active-filters dd { margin: .15rem 0 0; }
.reports-page.academic-print-view .report-print-header { display: block; margin-bottom: 1.5rem; }
.reports-page .report-filter-form > [hidden] { display: none !important; }
.reports-page.has-academic-breakdown .report-group-department,
.reports-page.has-academic-breakdown .report-group-course,
.reports-page.has-academic-breakdown .report-group-major { grid-column: 1 / -1; }

@media (min-width: 1024px) {
    .reports-page .report-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .reports-page .report-summary-title { display: block; margin: 3mm 0 2mm; font-size: 11pt; break-after: avoid; }
}
@media (min-width: 1200px) {
    .reports-page .report-filter-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1600px) {
    .reports-page .report-summary { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .reports-page .report-filter-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1800px) {
    .reports-page .report-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
    .reports-page .page-heading > div:first-child { flex-basis: 100%; }
    .reports-page .report-toolbar { width: 100%; }
    .reports-page .report-toolbar .btn { flex: 1 1 100%; }
    .reports-page .report-filter-form { grid-template-columns: minmax(0, 1fr); }
    .reports-page .academic-active-filters { grid-template-columns: minmax(0, 1fr); }
    .reports-page .report-filter-actions .btn { flex: 1 1 100%; }
    .reports-page .panel-body { padding: .85rem; }
    .reports-page .report-summary-wrapper,
    .reports-page .report-table-wrapper { overflow: visible; border: 0; border-radius: 0; }
    .reports-page .report-summary-table { display: block; }
    .reports-page .report-summary-table thead { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
    .reports-page .report-summary-table tbody { display: grid; gap: .8rem; }
    .reports-page .report-summary-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: .5rem; border: 1px solid var(--border-color); border-radius: 8px; }
    .reports-page .report-summary-table tbody td { display: grid; gap: .2rem; min-width: 0; width: auto; padding: .5rem; border: 0; box-shadow: none; text-align: left; white-space: normal; }
    .reports-page .report-summary-table tbody td:first-child,
    .reports-page .report-group-department tbody td:nth-child(2),
    .reports-page .report-summary-table tbody td.report-empty-cell { grid-column: 1 / -1; }
    .reports-page .report-summary-table tbody td:first-child .report-cell-value { color: var(--dark-green); font-weight: 700; }
    .reports-page .report-cell-label { display: block; color: var(--muted-text); font-size: .75rem; font-weight: 600; }
    .reports-page .report-group-department .report-summary-table tfoot,
    .reports-page .report-group-course .report-summary-table tfoot,
    .reports-page .report-group-major .report-summary-table tfoot { display: block; margin-top: .75rem; }
    .reports-page .report-group-department .report-summary-table tfoot tr,
.reports-page .report-group-course .report-summary-table tfoot tr,
.reports-page .report-group-major .report-summary-table tfoot tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: .5rem; border: 1px solid var(--border-color); border-top: 2px solid var(--border-color); border-radius: 8px; }
    .reports-page .report-group-department .report-summary-table tfoot td:first-child { display: none; }
    .reports-page .report-group-department .report-summary-table tfoot th,
.reports-page .report-group-course .report-summary-table tfoot th,
.reports-page .report-group-major .report-summary-table tfoot th { grid-column: 1 / -1; padding: .5rem; border: 0; text-align: left; }
    .reports-page .report-group-department .report-summary-table tfoot td,
.reports-page .report-group-course .report-summary-table tfoot td,
.reports-page .report-group-major .report-summary-table tfoot td { display: flex; justify-content: space-between; gap: .5rem; min-width: 0; padding: .5rem; border: 0; }
    .reports-page .report-group-department .report-summary-table tfoot td::before,
.reports-page .report-group-course .report-summary-table tfoot td::before,
.reports-page .report-group-major .report-summary-table tfoot td::before { content: attr(data-label); color: var(--muted-text); font-size: .75rem; font-weight: 600; white-space: normal; }
}
/* The detailed report uses complete labeled cards on phones and on paper. */
@media (max-width: 767.98px), print {
    .reports-page .report-table-wrapper { overflow: visible; border: 0; border-radius: 0; }
    .reports-page .report-table { display: block; min-width: 0; table-layout: auto; }
    .reports-page .report-table thead { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
    .reports-page .report-table tbody { display: grid; gap: 1rem; }
    .reports-page .report-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: .5rem; border: 1px solid var(--border-color); border-radius: 9px; break-inside: avoid; }
    .reports-page .report-table tbody td { display: grid; gap: .25rem; width: auto; min-width: 0; padding: .5rem; border: 0; box-shadow: none; }
    .reports-page .report-table .report-col-title,
    .reports-page .report-table .report-col-author,
    .reports-page .report-table .report-col-department,
    .reports-page .report-table .report-col-program { grid-column: 1 / -1; }
    .reports-page .report-table .report-col-title .report-cell-value { color: var(--dark-green); font-size: 1rem; font-weight: 700; line-height: 1.45; }
    .reports-page .report-table .report-cell-label { display: block; color: var(--muted-text); font-size: .75rem; font-weight: 600; }
}
@media (max-width: 389.98px) {
    .reports-page .report-summary { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 575.98px) {
    .reports-page .report-table tbody tr { grid-template-columns: minmax(0, 1fr); }
    .reports-page .report-pagination { flex-direction: column; align-items: stretch; text-align: center; }
    .reports-page .report-page-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
    .reports-page .report-page-indicator { grid-column: 1 / -1; grid-row: 1; }
}
@media print {
    .reports-page .report-actions, .reports-page .report-filters { display: none !important; }
    body:has(.reports-page) { background: #fff; }
    .app-shell:has(.reports-page) { display: block; min-height: 0; }
    .reports-page { page: letdsAnalyticsReport; min-height: 0; color: #111; background: transparent; font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 1.4; }
    .reports-page .admin-page-back-row { display: none; }
    .reports-page h1, .reports-page h2, .reports-page h3 { font-family: Arial, Helvetica, sans-serif; }
    .reports-page .report-print-header { break-inside: avoid; }
    /* The shared outer table repeats the original institutional heading on every sheet. */
    .reports-page .report-letterhead { display: none; }
    .reports-page .report-letterhead { grid-template-columns: 28mm minmax(0, 1fr) 28mm; gap: 2mm; padding-bottom: 2mm; }
    .reports-page .report-header-logo { width: 28mm; height: 25.4mm; }
    .reports-page .report-letterhead h1 { font-family: "Century Gothic", CenturyGothic, Arial, sans-serif; font-size: 9pt; color: #00b050; }
    .reports-page .report-letterhead p { font-size: 9pt; }
    .reports-page .report-document-title { margin: 4mm 0 2mm; }
    .reports-page .report-document-title h2 { margin: 0; font-size: 12pt; }
    /* Margin boxes reserve footer space on every sheet without fixed-element clipping. */
    .reports-page .report-official-footer { display: none; }
    .reports-page .report-letterhead { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .reports-page .report-generated { margin: 3mm 0; font-size: 9pt; }
    .reports-page .report-coverage-title { font-size: 10pt; }
    .reports-page .academic-active-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2mm 5mm; margin-bottom: 2mm; font-size: 9pt; }
    .reports-page .report-scope-note { font-size: 8pt; }
    .reports-page.academic-print-view .academic-active-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .reports-page.academic-print-view { background: transparent; color: #111; }
    .reports-page:not(.report-complete-print) .report-detail-card { display: none !important; }
    .reports-page .report-print-notice { display: block; }
    .reports-page .report-print-header { display: block; margin-bottom: 1rem; }
    .reports-page .report-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .reports-page .report-groups { display: block; }
    .reports-page .report-summary-wrapper { overflow: visible; }
    .reports-page .report-group { break-inside: auto; margin-bottom: 5mm; }
    .reports-page .panel-header { min-height: 0; padding: 2mm 0; border-bottom: 1px solid #555; break-after: avoid; }
    .reports-page .panel-title { color: #111; font-size: 11pt; }
    .reports-page .panel-body { padding: 3mm 0; }
    .reports-page .ui-card { height: auto; background: transparent; border-radius: 0; overflow: visible; }
    .reports-page .stat-card { padding: 3mm; border: 1px solid #999; break-inside: avoid; }
    .reports-page .stat-card::after { display: none; }
    .reports-page .stat-label { color: #111; font-size: 9pt; }
    .reports-page .stat-value { color: #111; font-size: 18pt; }
    .reports-page .report-summary-table { display: table; width: 100%; border-collapse: collapse; font-size: 9pt; }
    .reports-page .report-summary-table thead { display: table-header-group; position: static; width: auto; height: auto; margin: 0; clip: auto; overflow: visible; white-space: normal; }
    .reports-page .report-summary-table tbody { display: table-row-group; }
    .reports-page .report-summary-table tfoot { display: table-row-group; }
    .reports-page .report-summary-table tr { display: table-row !important; break-inside: avoid; }
    .reports-page .report-summary-table td,
    .reports-page .report-summary-table th { display: table-cell !important; padding: 5pt; border: 1px solid #999; color: #111; background: #fff; box-shadow: none; }
    .reports-page .report-summary-table thead th { background: #eee; }
    .reports-page .report-summary-table .report-cell-label,
    .reports-page .report-summary-table tfoot td::before { display: none; }
    .reports-page .report-summary-table tfoot td:first-child { display: table-cell; }
    .reports-page .report-summary-table .report-metric { text-align: right; }
    .reports-page .report-summary-table .report-category { text-align: left; }
    .reports-page .report-table { display: table; width: 100%; min-width: 0; table-layout: fixed; border-collapse: collapse; }
    .reports-page .report-table thead { display: table-header-group; position: static; width: auto; height: auto; margin: 0; clip: auto; overflow: visible; white-space: normal; }
    .reports-page .report-table tbody { display: table-row-group; }
    .reports-page .report-table thead tr,
    .reports-page .report-table tbody tr { display: table-row; margin: 0; padding: 0; break-inside: avoid; }
    .reports-page .report-table th,
    .reports-page .report-table tbody td { display: table-cell; padding: 1.2mm; border: 1px solid #999; font-size: 8pt; vertical-align: top; overflow-wrap: anywhere; }
    .reports-page .report-table thead th { background: #eee; }
    .reports-page .report-table .report-cell-label { display: none; }
    .reports-page .report-table .report-col-title .report-cell-value { color: #111; font-size: 8pt; }
    .reports-page .report-table .report-col-number { width: 4%; }
    .reports-page .report-table .report-col-title { width: 23%; }
    .reports-page .report-table .report-col-author { width: 11%; }
    .reports-page .report-table .report-col-department { width: 13%; }
    .reports-page .report-table .report-col-program { width: 15%; }
    .reports-page .report-table .report-col-type { width: 7%; }
    .reports-page .report-table .report-col-year { width: 7%; }
    .reports-page .report-table .report-col-status { width: 9%; }
    .reports-page .report-table .report-col-date { width: 11%; }
    .reports-page .report-status-badge { min-width: 0; padding: 0; color: #111; background: none; font-size: 9pt; white-space: normal; }
    .reports-page .report-col-type .report-cell-value { white-space: normal; overflow-wrap: anywhere; }
    .reports-page .report-signatures { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12mm; margin-top: 10mm; padding-top: 3mm; break-inside: avoid; font-size: 10pt; }
    .reports-page .report-signatures p { margin: 0; }
    .reports-page .report-signature-line { margin-top: 15mm; padding-top: 0; border: 0; }
    .reports-page .report-signature-line strong { min-height: 1.5em; line-height: 1.5; overflow-wrap: anywhere; font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; text-decoration-skip-ink: none; }
    .reports-page .report-signature-line strong,
    .reports-page .report-signature-line span { display: block; }
    .reports-page .report-table .report-col-author,
    .reports-page .report-table .report-col-department,
    .reports-page .report-table .report-col-program { grid-column: auto; }
    .reports-page .report-table .report-col-number,
    .reports-page .report-table .report-col-date { grid-column: 1 / -1; }
}

/* Paper dimensions and repeated institutional resources are shared in report_paper.css and report_print_footer.php. */

@media (max-width: 991.98px) {
    .pending-review-layout { grid-template-columns: minmax(0, 1fr); }
    .pending-review-sidebar { position: static; }
    .app-main > section.ui-card:first-of-type .user-filters .input-group { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .app-main > section.ui-card:first-of-type .user-filters .input-group-text { display: none; }
    .app-main > section.ui-card:first-of-type .user-filters #pendingSearch,
    .app-main > section.ui-card:first-of-type .user-filters .btn { grid-column: 1 / -1; }
}

@media (max-width: 767.98px) {
    .user-filters .input-group { flex-wrap: wrap; }
    .user-filters .form-control { min-width: 0; flex: 1 1 65%; }
    .user-filters .form-select { max-width: none; flex: 1 1 calc(50% - 0.25rem); }
    .user-filters .btn { flex: 1 1 100%; margin-top: 0.5rem; }
}

@media (max-width: 575.98px) {
    .pending-review-heading { align-items: flex-start; }
    .pending-review-layout, .pending-review-content { gap: 1rem; }
    .pending-review-meta { grid-template-columns: minmax(0, 1fr); gap: 0.85rem; }
    .pending-review-content .panel-body { padding: 1rem; }
    .pending-review-panel-section { padding: 1rem; }
    .pending-review-title { font-size: 1.4rem; }
    .pending-review-panel .btn { width: 100%; }
    .app-main > section.ui-card:first-of-type .user-filters .input-group { grid-template-columns: minmax(0, 1fr); }
    .app-main > section.ui-card:first-of-type .user-filters .input-group > * { grid-column: 1; }
}

/* Admin User Management: scoped toolbar, table, and responsive user cards. */
.user-management-page, .user-management-card { min-width: 0; }
.user-management-page .user-management-header { flex-direction: column; align-items: stretch; gap: 1rem; }
.user-management-page .user-management-filters { display: grid; grid-template-columns: minmax(0, 1fr) 145px 150px 90px; align-items: center; gap: 0.75rem; width: 100%; min-width: 0; }
.user-management-page .user-management-filters > *,
.user-management-page .user-management-search { min-width: 0; }
.user-management-page .user-management-filters .form-control,
.user-management-page .user-management-filters .form-select,
.user-management-page .user-management-filters .btn,
.user-management-page .user-management-filters .input-group-text { height: 44px; min-height: 44px; }
.user-management-page .user-management-search { flex-wrap: nowrap; }
.user-management-page .user-table-wrapper { width: 100%; max-width: 100%; }
.user-management-page .user-table { min-width: 960px; table-layout: fixed; }
.user-management-page .user-col-number { width: 42px; }
.user-management-page .user-col-name { width: 16%; }
.user-management-page .user-col-username { width: 12%; }
.user-management-page .user-col-email { width: auto; }
.user-management-page .user-col-role { width: 100px; }
.user-management-page .user-col-status { width: 100px; }
.user-management-page .user-col-date { width: 145px; }
.user-management-page .user-col-actions { width: 210px; }
.user-management-page .user-table > :not(caption) > * > * { padding: 0.85rem 0.65rem; vertical-align: middle; text-align: left; }
.user-management-page .user-table thead th { white-space: normal; }
.user-management-page .user-cell-value { min-width: 0; overflow-wrap: anywhere; }
.user-management-page .user-table .user-cell-number { text-align: center; }
.user-management-page .user-table .user-cell-actions { text-align: right; }
.user-management-page .user-cell-label, .user-management-page .user-action-label { display: none; }
.user-management-page .user-table .status-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 76px; min-height: 28px; padding: 0.3rem 0.45rem; line-height: 1.2; white-space: nowrap; }
.user-management-page .user-actions { display: flex; flex-wrap: nowrap; align-items: center; justify-content: flex-end; gap: 0.4rem; }
.user-management-page .user-actions > *,
.user-management-page .user-actions .btn { flex: 0 0 auto; }
.user-management-page .user-actions form { margin: 0; }
.user-management-page .user-actions .btn { height: 40px; min-width: 40px; padding: 0.4rem 0.55rem; white-space: nowrap; overflow-wrap: normal; }
.user-management-page .user-management-pagination .pagination { flex-wrap: wrap; gap: 0.35rem; }
.user-management-page .user-management-pagination .page-link { display: grid; place-items: center; min-width: 44px; min-height: 44px; margin: 0; border-radius: 7px; }
#viewUserModal dd { overflow-wrap: anywhere; }

@media (max-width: 1199.98px) {
    .user-management-page .user-management-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .user-management-page .user-management-search { grid-column: 1 / -1; }
    .user-management-page .user-table-wrapper { overflow: visible; border: 0; border-radius: 0; }
    .user-management-page .user-table { display: block; min-width: 0; table-layout: auto; }
    .user-management-page .user-table colgroup { display: none; }
    /* Keep column headers available to assistive technology when rows become cards. */
    .user-management-page .user-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
    .user-management-page .user-table tbody { display: grid; gap: 1rem; }
    .user-management-page .user-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0.5rem; background: var(--white); border: 1px solid var(--border-color); border-radius: 9px; }
    .user-management-page .user-table tbody td { display: grid; grid-template-columns: 6.25rem minmax(0, 1fr); align-items: center; gap: 0.6rem; min-width: 0; padding: 0.6rem; border: 0; box-shadow: none; text-align: left; }
    .user-management-page .user-cell-label { display: block; color: var(--muted-text); font-size: 0.75rem; font-weight: 600; }
    .user-management-page .user-table .user-cell-number { grid-column: 1 / -1; text-align: left; border-bottom: 1px solid var(--border-color); margin-bottom: 0.3rem; }
    .user-management-page .user-table .user-cell-actions { grid-column: 1 / -1; text-align: left; border-top: 1px solid var(--border-color); margin-top: 0.3rem; }
    .user-management-page .user-actions { justify-content: flex-start; }
    .user-management-page .user-action-label { display: inline; }
    .user-management-page .user-actions .btn { height: 44px; min-height: 44px; }
}

@media (max-width: 767.98px) {
    .user-management-page .user-table tbody tr { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 575.98px) {
    .user-management-page .user-management-header,
    .user-management-page .user-management-card > .panel-body { padding: 0.85rem; }
    .user-management-page .user-management-filters { grid-template-columns: minmax(0, 1fr); }
    .user-management-page .user-management-filters > * { width: 100%; grid-column: 1; }
    .user-management-page .user-table tbody tr { padding: 0.35rem; }
    .user-management-page .user-table tbody td { padding: 0.55rem 0.4rem; }
    .user-management-page .user-table .user-cell-actions { grid-template-columns: minmax(0, 1fr); }
    .user-management-page .user-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 0.4rem; }
    .user-management-page .user-actions .btn { width: 100%; font-size: 0.78rem; }
    .user-management-page .view-user i, .user-management-page .edit-user i { display: none; }
    .user-management-page .user-management-pagination .pagination { justify-content: center !important; }
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    background: radial-gradient(circle at top right, rgba(243, 195, 1, 0.13), transparent 30%), linear-gradient(180deg, #f8faf7 0%, #f1f7f0 100%);
}
.auth-page *, .auth-page *::before, .auth-page *::after {
    box-sizing: border-box;
}
.auth-shell {
    width: min(1280px, 100%);
    margin: 0 auto;
}
.auth-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: clamp(1.4rem, 2vw, 2.2rem);
}
.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.72rem 1rem;
    color: var(--dark-green);
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid rgba(7, 91, 50, 0.08);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    transition: background 180ms ease, transform 180ms ease, border-color 180ms ease;
}
.auth-back-link:hover {
    background: rgba(5, 150, 68, 0.06);
    border-color: rgba(5, 150, 68, 0.18);
    transform: translateX(-1px);
}
.auth-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: clamp(1.2rem, 3vw, 3rem);
    align-items: center;
}
.auth-intro {
    position: relative;
    padding: clamp(1.5rem, 3vw, 2.2rem);
    background: rgba(255, 255, 255, 0.42);
    border: 1px solid rgba(7, 91, 50, 0.08);
    border-radius: 28px;
    box-shadow: 0 22px 50px rgba(7, 91, 50, 0.05);
    overflow: hidden;
}
.auth-intro::before {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -60px;
    width: 220px;
    height: 220px;
    background: rgba(243, 195, 1, 0.08);
    border-radius: 50%;
}
.auth-badge {
    position: relative;
    z-index: 1;
    display: inline-flex;
    padding: 0.48rem 0.8rem;
    background: rgba(5, 150, 68, 0.08);
    border: 1px solid rgba(5, 150, 68, 0.08);
    border-radius: 999px;
    color: var(--primary-green);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}
.auth-brand-inline {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
    color: var(--dark-green);
}
.auth-brand-inline .brand-logo {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
}
.auth-intro h1 {
    position: relative;
    z-index: 1;
    margin: 1.2rem 0 0.9rem;
    color: var(--dark-green);
    font-size: clamp(2.2rem, 3vw, 3.2rem);
    line-height: 1.05;
    letter-spacing: -0.05em;
}
.auth-intro > p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: var(--muted-text);
    font-size: 1.02rem;
    line-height: 1.7;
}
.auth-feature-list {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1rem;
    margin-top: 1.6rem;
}
.auth-feature {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.95rem 1rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(7, 91, 50, 0.08);
    border-radius: 16px;
}
.auth-feature i {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    background: rgba(5, 150, 68, 0.09);
    border-radius: 10px;
    color: var(--primary-green);
}
.auth-feature strong {
    display: block;
    margin-bottom: 0.15rem;
    color: var(--dark-green);
    font-size: 1rem;
    line-height: 1.4;
}
.auth-feature small {
    display: block;
    color: var(--muted-text);
    font-size: 0.76rem;
    line-height: 1.55;
}
.auth-card-wrap {
    display: flex;
    justify-content: center;
}
.auth-card {
    width: min(460px, 100%);
    padding: clamp(1.6rem, 3vw, 2.3rem);
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(7, 91, 50, 0.08);
    border-radius: 22px;
    box-shadow: 0 22px 60px rgba(7, 91, 50, 0.08);
    backdrop-filter: blur(6px);
}
.auth-card-heading {
    margin-bottom: 1.4rem;
}
.auth-card-label {
    display: inline-flex;
    margin-bottom: 0.6rem;
    padding: 0.42rem 0.7rem;
    background: rgba(5, 150, 68, 0.07);
    border-radius: 999px;
    color: var(--primary-green);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.auth-card-heading h2 {
    margin: 0 0 0.45rem;
    color: var(--dark-green);
    font-size: clamp(2rem, 2.5vw, 2.5rem);
    line-height: 1.08;
}
.auth-card-heading p {
    margin: 0;
    color: var(--muted-text);
    font-size: 0.95rem;
    line-height: 1.6;
}
.auth-alert {
    margin: 0 0 1.2rem;
    font-size: 0.9rem;
}
.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.auth-input-icon {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    color: var(--primary-green);
}
.form-control.auth-input {
    width: 100%;
    min-height: 52px;
    padding: 0.8rem 1rem 0.8rem 2.8rem;
    border: 1px solid rgba(7, 91, 50, 0.14);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--dark-text);
    box-sizing: border-box;
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.form-control.auth-input:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 4px rgba(5, 150, 68, 0.12);
    background: #fff;
}
.password-wrap .auth-input {
    padding-right: 3rem;
}
.auth-input-wrap .password-toggle {
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2.1rem;
    height: 2.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--muted-text);
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease;
}
.auth-input-wrap .password-toggle:hover,
.auth-input-wrap .password-toggle:focus-visible {
    background: rgba(5, 150, 68, 0.06);
    color: var(--primary-green);
}
.auth-submit {
    width: 100%;
    min-height: 52px;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 12px 24px rgba(5, 150, 68, 0.18);
}
.auth-card-footer {
    margin: 1.35rem 0 0;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(7, 91, 50, 0.08);
    color: var(--muted-text);
    text-align: center;
    font-size: 0.92rem;
}
.auth-card-footer a {
    color: var(--primary-green);
    font-weight: 700;
}
@media (max-width: 991.98px) {
    .auth-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
    }
    .auth-card {
        width: min(560px, 100%);
    }
}
@media (max-width: 767.98px) {
    .auth-page {
        padding: 20px 16px;
    }
    .auth-topbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.8rem;
    }
    .auth-intro {
        padding: 1.2rem 1rem 1.3rem;
    }
    .auth-intro h1 {
        font-size: clamp(2rem, 10vw, 2.8rem);
    }
    .auth-card {
        width: 100%;
        border-radius: 18px;
    }
}
@media (max-width: 575.98px) {
    .auth-shell {
        padding: 0;
    }
    .auth-back-link {
        width: 100%;
        justify-content: center;
    }
    .auth-card-heading h2 {
        font-size: 1.9rem;
    }
    .auth-card {
        padding: 1.3rem 1rem;
    }
    .auth-feature {
        padding: 0.8rem 0.85rem;
    }
    .auth-feature i {
        width: 38px;
        height: 38px;
    }
}

.user-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    background: linear-gradient(180deg, #f9faf7 0%, #f2f7ef 100%);
}
.user-login-shell {
    width: min(1280px, 100%);
    margin: 0 auto;
}
.user-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: clamp(1.4rem, 2.4vw, 2.2rem);
}
.user-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--dark-green);
}
.user-brand strong {
    font-size: clamp(1.2rem, 2vw, 1.7rem);
    letter-spacing: 0.04em;
}
.user-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1rem;
    color: var(--dark-green);
    background: rgba(255, 255, 255, 0.46);
    border: 1px solid rgba(7, 91, 50, 0.08);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    transition: background 180ms ease, transform 180ms ease, border-color 180ms ease;
}
.user-back-link:hover {
    background: rgba(5, 150, 68, 0.06);
    border-color: rgba(5, 150, 68, 0.18);
    transform: translateX(-1px);
}
.user-login-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(1.2rem, 3vw, 3rem);
}
.user-welcome-panel {
    position: relative;
    padding: clamp(1.4rem, 3vw, 2.2rem);
    background: rgba(255, 255, 255, 0.34);
    border: 1px solid rgba(7, 91, 50, 0.08);
    border-radius: 28px;
    box-shadow: 0 20px 50px rgba(7, 91, 50, 0.04);
    overflow: hidden;
}
.user-welcome-panel::before {
    content: "";
    position: absolute;
    inset: auto -60px -80px auto;
    width: 240px;
    height: 240px;
    background: rgba(243, 195, 1, 0.08);
    border-radius: 50%;
}
.user-kicker {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.8rem;
    background: rgba(5, 150, 68, 0.08);
    border: 1px solid rgba(5, 150, 68, 0.08);
    border-radius: 999px;
    color: var(--primary-green);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.user-brand-inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.3rem;
    color: var(--dark-green);
}
.user-brand-inline .brand-logo {
    width: 52px;
    height: 52px;
}
.user-welcome-panel h1 {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 1.2rem 0 0.95rem;
    color: var(--dark-green);
    font-size: clamp(2.3rem, 4vw, 4rem);
    line-height: 1.04;
    letter-spacing: -0.05em;
}
.user-welcome-panel > p {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 0;
    color: var(--muted-text);
    font-size: 1.02rem;
    line-height: 1.7;
}
.user-academic-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 160px;
    margin: 2rem 0 1.5rem;
}
.academic-doc {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 180px;
    min-height: 128px;
    padding: 1rem 1rem 0.8rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(233, 244, 236, 0.9));
    border: 1px solid rgba(7, 91, 50, 0.08);
    border-radius: 18px;
    box-shadow: 0 20px 36px rgba(7, 91, 50, 0.08);
}
.academic-doc-main {
    transform: rotate(-6deg);
    margin-right: -14px;
}
.academic-doc-secondary {
    transform: rotate(8deg);
    margin-left: -8px;
}
.doc-badge {
    width: fit-content;
    display: inline-flex;
    padding: 0.26rem 0.5rem;
    background: rgba(5, 150, 68, 0.1);
    border-radius: 999px;
    color: var(--primary-green);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.academic-doc strong {
    color: var(--dark-green);
    font-size: 1.2rem;
}
.academic-orb {
    position: absolute;
    left: 48%;
    top: 50%;
    width: 120px;
    height: 120px;
    transform: translate(-50%, -50%);
    background: rgba(255, 246, 217, 0.65);
    border: 1px solid rgba(7, 91, 50, 0.08);
    border-radius: 50%;
    box-shadow: inset 0 0 0 18px rgba(255,255,255,0.32);
}
.user-feature-list {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.9rem;
    margin-top: 0.6rem;
}
.user-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.95rem 1rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(7, 91, 50, 0.08);
    border-radius: 16px;
}
.user-feature-item i {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: var(--primary-green);
    background: rgba(5, 150, 68, 0.09);
    border-radius: 10px;
}
.user-feature-item strong {
    display: block;
    color: var(--dark-green);
    font-size: 1rem;
    line-height: 1.4;
}
.user-feature-item small {
    display: block;
    color: var(--muted-text);
    font-size: 0.76rem;
    line-height: 1.5;
}
.user-journey {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.7rem 0.9rem;
    background: rgba(255,255,255,0.56);
    border: 1px solid rgba(7, 91, 50, 0.08);
    border-radius: 999px;
    color: var(--dark-green);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.journey-arrow {
    color: var(--primary-green);
}
.user-login-panel {
    display: flex;
    justify-content: center;
}
.user-login-card {
    width: min(440px, 100%);
    padding: clamp(1.5rem, 3vw, 2.3rem);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(7, 91, 50, 0.08);
    border-radius: 22px;
    box-shadow: 0 20px 60px rgba(7, 91, 50, 0.08);
    backdrop-filter: blur(6px);
}
.user-card-header {
    margin-bottom: 1.5rem;
}
.user-card-label {
    display: inline-flex;
    margin-bottom: 0.7rem;
    padding: 0.42rem 0.7rem;
    border-radius: 999px;
    background: rgba(5, 150, 68, 0.07);
    color: var(--primary-green);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.user-card-header h2 {
    margin: 0 0 0.45rem;
    color: var(--dark-green);
    font-size: clamp(2rem, 2.6vw, 2.5rem);
    line-height: 1.08;
}
.user-card-header p {
    margin: 0;
    color: var(--muted-text);
    font-size: 0.92rem;
    line-height: 1.6;
}
.user-alert {
    margin: 1rem 0 1.2rem;
    font-size: 0.9rem;
}
.alert-danger {
    background: #fff4f4;
    border: 1px solid #f3c9c9;
    color: #8b2e2e;
}
.alert-success {
    background: #f0faf5;
    border: 1px solid #cfead9;
    color: #20613c;
}
.user-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.user-input-icon {
    position: absolute;
    left: 0.95rem;
    z-index: 1;
    color: var(--primary-green);
}
.form-control.user-input {
    min-height: 52px;
    padding: 0.8rem 1rem 0.8rem 2.8rem;
    border: 1px solid rgba(7, 91, 50, 0.14);
    border-radius: 12px;
    background: rgba(255,255,255,0.9);
    color: var(--dark-text);
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.form-control.user-input:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 4px rgba(5, 150, 68, 0.12);
    background: #fff;
}
.password-wrap .user-input {
    padding-right: 3rem;
}
.password-toggle {
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2.1rem;
    height: 2.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--muted-text);
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease;
}
.password-toggle:hover,
.password-toggle:focus-visible {
    background: rgba(5, 150, 68, 0.06);
    color: var(--primary-green);
}
.user-submit {
    width: 100%;
    min-height: 54px;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 12px 24px rgba(5, 150, 68, 0.18);
}
.user-submit:hover {
    box-shadow: 0 16px 28px rgba(5, 150, 68, 0.22);
}
.user-account-cta {
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(7, 91, 50, 0.08);
    text-align: center;
}
.user-account-cta p {
    margin: 0 0 0.45rem;
    color: var(--muted-text);
    font-size: 0.9rem;
}
.user-account-cta a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1rem;
    color: var(--primary-green);
    background: rgba(5,150,68,0.06);
    border: 1px solid rgba(5,150,68,0.12);
    border-radius: 10px;
    font-weight: 700;
    transition: background 180ms ease, transform 180ms ease;
}
.user-account-cta a:hover {
    background: rgba(5,150,68,0.1);
    transform: translateY(-1px);
}
@media (max-width: 991.98px) {
    .user-login-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
    }
    .user-login-card {
        width: min(560px, 100%);
    }
}
@media (max-width: 767.98px) {
    .user-login-page {
        padding: 20px 16px;
    }
    .user-topbar {
        align-items: center;
        flex-direction: row;
        gap: 0.8rem;
        margin-bottom: 1rem;
    }
    .user-back-link {
        flex: 0 0 auto;
        width: auto;
        min-width: 44px;
        min-height: 44px;
        justify-content: center;
        white-space: nowrap;
    }
    .user-welcome-panel {
        padding: 1.2rem 1rem 1.3rem;
    }
    .user-welcome-panel h1 {
        font-size: clamp(2rem, 10vw, 3rem);
    }
    .user-academic-visual {
        min-height: 120px;
        margin: 1.5rem 0 1.2rem;
    }
    .academic-doc {
        width: 146px;
        min-height: 108px;
    }
    .academic-orb {
        width: 100px;
        height: 100px;
    }
}
@media (max-width: 575.98px) {
    .user-login-shell {
        padding: 0;
    }
    .user-brand strong {
        font-size: 1.2rem;
    }
    .user-card-header h2 {
        font-size: 1.85rem;
    }
    .user-login-card {
        padding: 1.3rem 1rem;
        border-radius: 18px;
    }
    .user-feature-item {
        padding: 0.8rem 0.85rem;
    }
    .user-feature-item i {
        width: 38px;
        height: 38px;
    }
    .user-account-cta a {
        width: 100%;
    }
}

/* User Dashboard */
.user-dashboard { --user-ink: #18382e; --user-muted: #708078; --user-line: #dfe9e3; }
.user-dashboard > .page-heading { margin-bottom: .9rem; }
.user-welcome-band { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .42fr); gap: 2rem; align-items: center; overflow: hidden; margin-bottom: 1rem; padding: 1.4rem 1.7rem; background: repeating-linear-gradient(135deg, rgba(24, 56, 46, .018) 0 1px, transparent 1px 12px), linear-gradient(115deg, #f1f7f2 0%, #e6f1eb 68%, #dcebe3 100%); border-left: 5px solid var(--accent-yellow); border-radius: 8px; }
.user-welcome-copy { min-width: 0; }
.user-welcome-overline { display: flex; align-items: center; gap: .5rem; margin-bottom: .55rem; color: #367054; font-size: .7rem; font-weight: 700; text-transform: uppercase; }
.user-welcome-band h2 { margin: 0; color: var(--user-ink); font-size: clamp(1.45rem, 2.4vw, 1.8rem); line-height: 1.2; overflow-wrap: anywhere; }
.user-welcome-band p { max-width: 580px; margin: .55rem 0 0; color: #65766d; font-size: .9rem; }
.user-welcome-mark { display: grid; justify-items: start; gap: .3rem; padding: .3rem 0 .3rem 1.4rem; color: #547466; border-left: 1px solid rgba(24, 56, 46, .16); }
.user-welcome-mark > i { margin-bottom: .2rem; color: #29734d; font-size: 1.5rem; }
.user-welcome-mark > span { font-size: .65rem; font-weight: 700; text-transform: uppercase; }
.user-welcome-mark strong { color: var(--user-ink); font-size: .86rem; }
.user-welcome-mark strong i { margin-left: .25rem; color: #a37c00; font-size: .7rem; }
.user-dashboard .ui-card { border-radius: 8px; box-shadow: 0 4px 16px rgba(24, 56, 46, .045); }
.user-dashboard .panel-header { min-height: 64px; padding: .85rem 1rem; flex-wrap: wrap; }
.user-dashboard .panel-body { padding: 1rem; }
.user-dashboard .panel-title { min-width: 0; font-size: .96rem; overflow-wrap: anywhere; }
.user-dashboard .panel-header .btn { max-width: 100%; white-space: normal; line-height: 1.25; }
.user-research-overview { margin-bottom: 1rem; }
.user-dashboard-section-kicker { display: block; margin-bottom: .18rem; color: #367054; font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.user-research-title { margin: 0 0 1.2rem; color: var(--user-ink); font-size: clamp(1.05rem, 1.8vw, 1.35rem); font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.user-research-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 0; }
.user-research-summary > div { min-width: 0; }
.user-research-summary dt { margin-bottom: .35rem; color: var(--user-muted); font-size: .72rem; }
.user-research-summary dd { margin: 0; color: var(--user-ink); font-size: .84rem; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.user-research-summary .status-badge { min-width: 0; white-space: normal; }
.user-research-empty { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.user-research-empty > div { min-width: 0; flex: 1; }
.user-research-empty h3 { margin: 0 0 .25rem; color: var(--user-ink); font-size: 1rem; }
.user-research-empty p { margin: 0; color: var(--user-muted); font-size: .85rem; }
.user-dashboard-sections { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); gap: 1rem; margin-top: 1rem; }
.user-dashboard-sections > section { min-width: 0; }
.user-dashboard-research-list { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.user-dashboard-research-item { display: grid; gap: .28rem; min-width: 0; padding: .8rem; color: inherit; text-decoration: none; background: #fbfdfb; border: 1px solid var(--user-line); border-radius: 7px; }
.user-dashboard-research-item:hover { background: #f2f8f4; border-color: #bfd8c8; }
.user-dashboard-research-title { color: var(--user-ink); font-size: .84rem; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }
.user-dashboard-research-authors { color: var(--user-muted); font-size: .75rem; line-height: 1.45; overflow-wrap: anywhere; }
.user-dashboard-research-meta { display: flex; flex-wrap: wrap; gap: .25rem .75rem; color: #65766d; font-size: .68rem; }
.user-dashboard-research-meta > span { min-width: 0; overflow-wrap: anywhere; }
.user-dashboard-section-intro { margin: 0 0 .75rem; color: var(--user-muted); font-size: .78rem; overflow-wrap: anywhere; }
.user-dashboard-empty { display: grid; justify-items: start; gap: .5rem; padding: .75rem 0; }
.user-dashboard-empty > i { color: #367054; font-size: 1.3rem; }
.user-dashboard-empty p { margin: 0; color: var(--user-muted); font-size: .82rem; overflow-wrap: anywhere; }
.user-dashboard-empty a { color: #146c43; font-size: .78rem; font-weight: 600; }
.user-explore-links { display: grid; gap: .65rem; }
.user-explore-link { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: .75rem; min-width: 0; min-height: 76px; padding: .75rem; color: inherit; text-decoration: none; background: #fbfdfb; border: 1px solid var(--user-line); border-radius: 7px; }
.user-explore-link:hover { background: #f2f8f4; border-color: #bfd8c8; }
.user-discovery-icon { display: grid; place-items: center; width: 38px; height: 38px; color: #146c43; background: #e6f4eb; border-radius: 9px; }
.user-explore-link > span:nth-child(2) { display: grid; gap: .2rem; min-width: 0; }
.user-explore-link strong { color: var(--user-ink); font-size: .8rem; }
.user-explore-link small { color: var(--user-muted); font-size: .69rem; line-height: 1.4; overflow-wrap: anywhere; }
.user-explore-link > i { color: #7e8b84; font-size: .75rem; }
.user-dashboard-quick-actions { display: grid; gap: .25rem; }
.user-dashboard-quick-actions a { min-height: 44px; padding: .62rem .55rem; font-size: .76rem; }
.user-dashboard a:focus-visible { outline: 3px solid #198754; outline-offset: 3px; }
@media (max-width: 767.98px) {
    .user-welcome-band { grid-template-columns: 1fr; gap: 1rem; padding: 1.25rem; }
    .user-welcome-mark { grid-template-columns: auto 1fr; align-items: center; column-gap: .65rem; padding: .85rem 0 0; border-top: 1px solid rgba(24, 56, 46, .16); border-left: 0; }
    .user-welcome-mark > i { grid-row: 1 / 3; margin: 0; }
    .user-dashboard-sections { grid-template-columns: minmax(0, 1fr); }
    .user-research-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
    .user-research-summary { grid-template-columns: minmax(0, 1fr); gap: .8rem; }
    .user-research-empty { align-items: flex-start; flex-wrap: wrap; }
    .user-research-empty .btn { width: 100%; min-height: 44px; }
    .user-dashboard .panel-header { align-items: flex-start; }
}

/* Admin Activity Logs: contained table on tablet; complete cards below 768px. */
.activity-logs-page { min-width: 0; }
.activity-logs-page .activity-summary { display: grid; grid-template-columns: minmax(0, 1fr); }
.activity-logs-page .activity-summary > div { width: auto; min-width: 0; }
.activity-logs-page .activity-summary .stat-card { height: 100%; padding: 1rem; }
.activity-logs-page .stat-label, .activity-logs-page .stat-value { overflow-wrap: break-word; }
.activity-logs-page .stat-label { min-height: 2.4em; }
@media (min-width: 390px) {
    .activity-logs-page .activity-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
    .activity-logs-page .activity-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.activity-logs-page .activity-logs-card { min-width: 0; }
.activity-logs-page .activity-filter-header { gap: 1rem; }
.activity-logs-page .activity-filters { width: 100%; min-width: 0; max-width: none; flex: 1 1 735px; }
.activity-logs-page .activity-filters .input-group { display: grid; grid-template-columns: 42px minmax(240px, 2fr) minmax(190px, 1.2fr) minmax(145px, 1fr) auto; gap: 0.5rem; }
.activity-logs-page .activity-filters .input-group > * { width: 100%; min-width: 0; min-height: 44px; margin-left: 0 !important; border-radius: 7px !important; }
.activity-logs-page .activity-filters .btn { min-width: 84px; white-space: nowrap; }
.activity-logs-page .activity-filters .form-select { max-width: none; }
.activity-logs-page .activity-filters a.btn { grid-column: 2 / -1; justify-self: end; width: auto; }
.activity-logs-page .activity-filters .visually-hidden { position: absolute !important; }
.activity-logs-page .activity-logs-body { min-width: 0; }
.activity-logs-page .activity-table-wrapper { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-inline: contain; }
.activity-logs-page .activity-table-wrapper:focus-visible { outline: 3px solid rgba(255, 193, 7, 0.75); outline-offset: 2px; }
.activity-logs-page .activity-table { width: 100%; min-width: 1180px; table-layout: fixed; }
.activity-logs-page .activity-table thead th:nth-child(1) { width: 4%; }
.activity-logs-page .activity-table thead th:nth-child(2) { width: 14%; }
.activity-logs-page .activity-table thead th:nth-child(3) { width: 8%; }
.activity-logs-page .activity-table thead th:nth-child(4) { width: 18%; }
.activity-logs-page .activity-table thead th:nth-child(5) { width: 31%; }
.activity-logs-page .activity-table thead th:nth-child(6) { width: 13%; }
.activity-logs-page .activity-table thead th:nth-child(7) { width: 12%; }
.activity-logs-page .activity-table th,
.activity-logs-page .activity-table tbody td { padding: .85rem .75rem; vertical-align: middle; word-break: normal; overflow-wrap: break-word; }
.activity-logs-page .activity-table .activity-cell-id,
.activity-logs-page .activity-table .activity-cell-role,
.activity-logs-page .activity-table .activity-cell-date { white-space: nowrap; }
.activity-logs-page .activity-table .activity-cell-user { overflow-wrap: break-word; }
.activity-logs-page .activity-username { display: block; margin-top: 0.25rem; color: var(--muted-text); font-size: 0.78rem; }
.activity-logs-page .activity-cell-action .status-badge { display: inline-block; width: fit-content; max-width: 100%; padding: .4rem .6rem; font-size: .8rem; line-height: 1.4; white-space: normal; word-break: normal; overflow-wrap: break-word; text-align: left; text-transform: capitalize; }
.activity-logs-page .activity-table .activity-description { line-height: 1.5; overflow-wrap: break-word; }
.activity-logs-page .activity-cell-ip { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.82rem !important; }
.activity-logs-page .activity-cell-date time,
.activity-logs-page .activity-cell-date time span { display: block; }
.activity-logs-page .activity-pagination { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 0.65rem; margin-top: 1rem; }
.activity-logs-page .activity-page-numbers { display: flex; flex-wrap: wrap; gap: 0.2rem; }
.activity-logs-page .activity-page-numbers .page-link { min-width: 40px; min-height: 44px; display: grid; place-items: center; padding: 0.4rem 0.65rem; color: var(--dark-green); border-color: var(--border-color); }
.activity-logs-page .activity-page-numbers .page-item.active .page-link { color: var(--white); background: var(--primary-green); border-color: var(--primary-green); }
.activity-logs-page .activity-page-ellipsis { min-width: 24px; display: grid; place-items: center; color: var(--muted-text); }
.activity-logs-page .activity-page-control { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; padding: 0.4rem 0.65rem; color: var(--dark-green); border: 1px solid var(--border-color); border-radius: 7px; font-size: 0.82rem; font-weight: 600; white-space: nowrap; }
.activity-logs-page .activity-page-control:hover { color: var(--primary-green); border-color: var(--primary-green); }
.activity-logs-page .activity-page-control.is-disabled { color: var(--muted-text); opacity: 0.55; pointer-events: none; }
.activity-logs-page .activity-page-summary { color: var(--muted-text); font-size: 0.82rem; white-space: nowrap; }
.activity-logs-page .activity-page-control:focus-visible,
.activity-logs-page .activity-page-numbers .page-link:focus-visible { outline: 3px solid rgba(255, 193, 7, 0.75); outline-offset: 2px; }

@media (max-width: 1199.98px) {
    .activity-logs-page .activity-filters { flex-basis: auto; }
    .activity-logs-page .activity-filters .input-group { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .activity-logs-page .activity-filters .input-group-text { display: none; }
    .activity-logs-page .activity-filters #activitySearch,
    .activity-logs-page .activity-filters .btn { grid-column: 1 / -1; }
    .activity-logs-page .activity-filters a.btn { grid-column: 1 / -1; width: 100%; }
}

@media (max-width: 767.98px) {
    .activity-logs-page .activity-filter-header { align-items: stretch; }
    .activity-logs-page .activity-filters .input-group { grid-template-columns: minmax(0, 1fr); }
    .activity-logs-page .activity-filters .input-group > *,
    .activity-logs-page .activity-filters #activitySearch,
    .activity-logs-page .activity-filters .btn { grid-column: 1; }
    .activity-logs-page .activity-table-wrapper { overflow: visible; border: 0; }
    .activity-logs-page .activity-table { display: block; width: 100%; min-width: 0; table-layout: auto; }
    .activity-logs-page .activity-table thead { display: none; }
    .activity-logs-page .activity-table tbody { display: grid; gap: 0.85rem; }
    .activity-logs-page .activity-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; background: var(--white); border: 1px solid var(--border-color); border-radius: 9px; box-shadow: 0 3px 12px rgba(20, 108, 67, 0.06); }
    .activity-logs-page .activity-table tbody td { min-width: 0; display: flex; flex-direction: column; gap: 0.3rem; padding: 0.75rem; border-bottom: 1px solid var(--border-color); font-size: 0.84rem; }
    .activity-logs-page .activity-table tbody td::before { content: attr(data-label); color: var(--muted-text); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
    .activity-logs-page .activity-table .activity-cell-id,
    .activity-logs-page .activity-table .activity-cell-role,
    .activity-logs-page .activity-table .activity-cell-date { white-space: nowrap; }
    .activity-logs-page .activity-table .activity-cell-action .status-badge { width: fit-content; max-width: 100%; white-space: normal; overflow-wrap: break-word; }
    .activity-logs-page .activity-table .activity-description { grid-column: 1 / -1; overflow-wrap: break-word; }
    .activity-logs-page .activity-table .activity-cell-user { grid-column: 1 / -1; grid-row: 1; overflow-wrap: break-word; font-size: 1rem; }
    .activity-logs-page .activity-table .activity-cell-action,
    .activity-logs-page .activity-table .activity-cell-ip,
    .activity-logs-page .activity-table .activity-cell-date { grid-column: 1 / -1; }
    .activity-logs-page .activity-table .activity-cell-date { border-bottom: 0; }
    .activity-logs-page .activity-table .activity-cell-ip { font-size: 0.78rem !important; }
    .activity-logs-page .activity-pagination { justify-content: center; }
    .activity-logs-page .activity-page-numbers { justify-content: center; }
}

@media (max-width: 575.98px) {
    .activity-logs-page .activity-logs-body { padding: 0.85rem; }
    .activity-logs-page .activity-pagination { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 0.5rem; }
    .activity-logs-page .activity-page-control { padding: 0.45rem 0.55rem; }
    .activity-logs-page .activity-page-control:first-child { justify-self: start; }
    .activity-logs-page .activity-page-control:last-child { justify-self: end; }
    .activity-logs-page .activity-page-numbers { display: none; }
    .activity-logs-page .activity-page-summary { text-align: center; }
}
.research-records-page,
.research-records-page .dashboard-panel,
.research-records-page .dashboard-panel > .panel-body {
    min-width: 0;
}
.research-records-page .research-table > :not(caption) > * > * { padding: 0.7rem 0.5rem; vertical-align: middle; text-align: left; }
.research-records-page > section:first-of-type {
    min-width: 0;
}
.research-filter-form {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1rem;
    margin: 0;
}
.research-filter-form > .research-filter-field,
.research-filter-form > .research-filter-actions {
    width: auto;
    max-width: none;
    padding: 0;
}
.research-filter-form > .research-filter-search { grid-column: span 2; }
.research-filter-form > .research-filter-actions { grid-column: 1 / -1; }
.research-filter-form .form-control,
.research-filter-form .form-select { width: 100%; min-width: 0; }
.research-records-page .research-table-wrapper {
    position: relative;
    isolation: isolate;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
}
.research-records-page .research-table-wrapper:focus-visible { outline: 3px solid var(--accent-yellow); outline-offset: 2px; }
.research-records-page .research-table {
    width: 100%;
    min-width: 1400px;
    table-layout: fixed;
}
.research-records-page .research-table thead th { white-space: normal; }
.research-records-page .research-table th:nth-child(1),
.research-records-page .research-table td:nth-child(1) { width: 25%; }
.research-records-page .research-table th:nth-child(2),
.research-records-page .research-table td:nth-child(2) { width: 13%; }
.research-records-page .research-table th:nth-child(3),
.research-records-page .research-table td:nth-child(3) { width: 15%; }
.research-records-page .research-table th:nth-child(4),
.research-records-page .research-table td:nth-child(4) { width: 8%; }
.research-records-page .research-table th:nth-child(5),
.research-records-page .research-table td:nth-child(5) { width: 7%; text-align: center; }
.research-records-page .research-table th:nth-child(6),
.research-records-page .research-table td:nth-child(6) { width: 8%; text-align: center; }
.research-records-page .research-table th:nth-child(7),
.research-records-page .research-table td:nth-child(7) { width: 10%; }
.research-records-page .research-table th:nth-child(8),
.research-records-page .research-table td:nth-child(8) { width: 14%; text-align: right; }
.research-records-page .research-table tbody td {
    word-break: normal;
    overflow-wrap: normal;
    line-height: 1.45;
}
.research-records-page .research-cell-label { display: none; }
.research-records-page .research-cell-value { min-width: 0; overflow-wrap: break-word; }
.research-records-page .research-table-type .research-cell-value { white-space: nowrap; overflow-wrap: normal; }
.research-records-page .research-table .research-table-title {
    line-height: 1.4;
    overflow-wrap: break-word;
}
.research-records-page .research-table-title strong { display: block; }
.research-records-page .research-table-title .small { margin-top: 0.25rem; }
.research-records-page .research-table .research-table-department,
.research-records-page .research-table .research-table-program {
    word-break: normal;
    overflow-wrap: break-word;
}
.research-records-page .research-table-created small { white-space: nowrap; }
.research-records-page .research-table .research-table-status .status-badge {
    min-width: 82px;
    min-height: 28px;
    padding: 0.3rem 0.4rem;
    flex-shrink: 0;
    white-space: nowrap;
    line-height: 1.2;
}
.research-records-page .research-row-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
}
.research-records-page .research-table .research-table-actions .btn {
    flex: 0 0 auto;
    height: 40px;
    min-width: 40px;
    padding: 0.4rem 0.5rem;
    font-size: 0.82rem;
    white-space: nowrap;
    overflow-wrap: normal;
}
.research-records-page .research-table .research-table-actions form { flex: 0 0 auto; display: block; margin: 0; }
.research-records-page .research-table-pagination { min-width: 0; }

@media (min-width: 768px) {
    /* Keep every action reachable while the readable metadata columns scroll. */
    .research-records-page .research-table .research-table-actions {
        position: sticky;
        right: 0;
        z-index: 1;
        background: var(--white);
        box-shadow: -1px 0 0 var(--border-color);
    }
    .research-records-page .research-table thead .research-table-actions { background: var(--light-bg); }
}

@media (max-width: 1199.98px) {
    .research-filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .research-filter-form > .research-filter-search { grid-column: 1 / -1; }
}

@media (max-width: 767.98px) {
    .research-records-page .research-table-wrapper { overflow: visible; border: 0; border-radius: 0; }
    .research-records-page .research-table { display: block; min-width: 0; table-layout: auto; }
    /* Retain headers for assistive technology when table rows become cards. */
    .research-records-page .research-table thead { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
    .research-records-page .research-table tbody { display: grid; gap: 1rem; }
    .research-records-page .research-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr); padding: 0.5rem; background: var(--white); border: 1px solid var(--border-color); border-radius: 9px; }
    .research-records-page .research-table tbody td:nth-child(n) { display: grid; grid-template-columns: 6.25rem minmax(0, 1fr); align-items: center; gap: 0.6rem; width: auto; min-width: 0; padding: 0.55rem 0.4rem; border: 0; box-shadow: none; text-align: left; }
    .research-records-page .research-cell-label { display: block; color: var(--muted-text); font-size: 0.75rem; font-weight: 600; }
    .research-records-page .research-table tbody td.research-table-title { display: block; padding-bottom: 0.85rem; margin-bottom: 0.3rem; border-bottom: 1px solid var(--border-color); }
    .research-records-page .research-table-title .research-cell-label { margin-bottom: 0.3rem; }
    .research-records-page .research-table-title strong { font-size: 1rem; line-height: 1.45; }
    .research-records-page .research-table tbody td.research-table-actions { grid-template-columns: minmax(0, 1fr); margin-top: 0.3rem; padding-top: 0.85rem; border-top: 1px solid var(--border-color); }
    .research-records-page .research-row-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .research-records-page .research-table .research-table-actions .btn { width: 100%; height: 44px; min-height: 44px; }
}

@media (max-width: 575.98px) {
    .research-records-page .dashboard-panel > .panel-body { padding: 0.85rem; }
    .research-records-page .research-table tbody td:nth-child(n) { grid-template-columns: minmax(0, 1fr); gap: 0.3rem; }
    .research-filter-form { grid-template-columns: minmax(0, 1fr); }
    .research-filter-form > .research-filter-search,
    .research-filter-form > .research-filter-actions { grid-column: 1; }
    .research-filter-form > .research-filter-actions { justify-content: stretch; }
    .research-filter-form > .research-filter-actions .btn { flex: 1 1 0; }
    .research-records-page > section:first-of-type { align-items: flex-start !important; }
    .research-records-page > section:first-of-type > .btn { max-width: 100%; }
    .research-records-page .research-table-pagination { align-items: stretch !important; }
    .research-records-page .research-table-pagination > * { text-align: center; }
}

@media (min-width: 1200px) {
    .research-records-page { padding-inline: clamp(1rem, 2vw, 1.75rem); }
}

.user-profile-page,
.user-profile-page .profile-layout,
.user-profile-page .profile-content,
.user-profile-page .profile-panel,
.user-profile-page .profile-panel .panel-body {
    min-width: 0;
}
.user-profile-page .profile-overview,
.user-profile-page .profile-panel {
    height: auto;
    min-height: 0;
}
.user-profile-page .profile-meta-row strong { min-width: 0; overflow-wrap: anywhere; }
.user-profile-page .profile-upload-controls { min-width: 0; }
.user-profile-page .profile-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.user-profile-page .profile-file-input:focus-visible + .profile-file-picker {
    outline: 3px solid rgba(255, 193, 7, 0.75);
    outline-offset: 2px;
}
.user-profile-page .profile-file-picker { margin: 0 .5rem .25rem 0; }
.user-profile-page .profile-file-name { color: var(--muted-text); font-size: .82rem; overflow-wrap: anywhere; }
.user-profile-page .profile-alert { padding: .7rem .9rem; font-size: .88rem; }
.user-profile-page .profile-alert ul { padding-left: 1.1rem; }
.user-profile-page .profile-alert li + li { margin-top: .2rem; }

@media (max-width: 767.98px) {
    .user-profile-page { padding: 1.25rem 1rem; }
    .user-profile-page > .page-heading { margin-bottom: 1rem; }
    .user-profile-page .page-title { font-size: clamp(2rem, 8vw, 3rem); line-height: 1.1; }
    .user-profile-subtitle { max-width: 34rem; margin-top: .45rem !important; font-size: .9rem; line-height: 1.45; }
    .user-profile-page .profile-layout { gap: 1rem; }
    .user-profile-page .profile-overview-body { padding: 1rem; }
    .user-profile-page .profile-identity-cover { padding: 1rem 1rem .65rem; }
    .user-profile-page .profile-avatar-large { width: 104px; height: 104px; font-size: 1.65rem; }
    .user-profile-page .profile-chip-row { gap: .4rem; margin-bottom: .7rem; }
    .user-profile-page .profile-chip-row .status-badge,
    .user-profile-page .profile-chip { min-width: 0; padding: .32rem .6rem; font-size: .78rem; }
    .user-profile-page .profile-overview h2 { margin-bottom: .2rem; font-size: clamp(1.5rem, 6vw, 2rem); line-height: 1.2; overflow-wrap: anywhere; }
    .user-profile-page .profile-email { margin-bottom: .75rem; font-size: .82rem; }
    .user-profile-page .profile-meta-grid { gap: .55rem; }
    .user-profile-page .profile-meta-row { gap: .5rem; padding-top: .55rem; }
    .user-profile-page .profile-meta-label,
    .user-profile-page .profile-meta-row strong { font-size: .78rem; }
    .user-profile-page .profile-panel .panel-header { padding: .8rem 1rem; }
    .user-profile-page .profile-panel .panel-body { padding: 1rem; }
    .user-profile-page .profile-content { gap: 1rem; }
    .user-profile-page .profile-form-grid { gap: .8rem; }
    .user-profile-page .profile-upload-layout { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: .85rem; }
    .user-profile-page .profile-upload-preview { width: 76px; height: 76px; }
    .user-profile-page .profile-upload-controls { min-width: 0; }
    .user-profile-page .profile-form-actions { grid-column: 1 / -1; width: 100%; margin-top: .25rem; }
    .user-profile-page .profile-form-actions .btn,
    .user-profile-page .profile-panel .btn { width: 100%; min-width: 0; min-height: 46px; }
    .user-profile-page .form-control,
    .user-profile-page .form-select { width: 100%; min-width: 0; min-height: 44px; box-sizing: border-box; }
    .user-profile-page .profile-alert { margin-bottom: 1rem; }
}

@media (max-width: 374.98px) {
    .user-profile-page { padding-inline: .85rem; }
    .user-profile-page .profile-meta-row { align-items: flex-start; flex-direction: column; gap: .15rem; }
    .user-profile-page .profile-upload-layout { grid-template-columns: minmax(0, 1fr); justify-items: center; }
    .user-profile-page .profile-upload-controls { width: 100%; }
}

.librarian-records-page {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
}
.librarian-records-page .records-panel {
    width: 100%;
    min-width: 0;
}
.librarian-records-page .records-panel-header {
    padding: 1rem 1.2rem;
}
.librarian-records-page .records-filter-area {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border-color);
}
.librarian-records-page .records-filters,
.librarian-records-page .records-filter-grid,
.librarian-records-page .records-filter-field {
    width: 100%;
    min-width: 0;
}
.librarian-records-page .records-filter-grid {
    display: grid;
    grid-template-columns: minmax(230px, 2fr) minmax(150px, 1.2fr) repeat(3, minmax(135px, 1fr)) auto;
    align-items: end;
    gap: 0.65rem;
}
.librarian-records-page .records-filter-label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--muted-text);
    font-size: 0.72rem;
    font-weight: 600;
}
.librarian-records-page .records-filter-field .form-control,
.librarian-records-page .records-filter-field .form-select {
    width: 100%;
    min-width: 0;
    min-height: 42px;
}
.librarian-records-page .records-search-control {
    display: flex;
    flex-wrap: nowrap;
    min-width: 0;
}
.librarian-records-page .records-search-control .input-group-text {
    flex: 0 0 auto;
    padding-inline: 0.8rem;
    background: #fff;
}
.librarian-records-page .records-search-control .form-control {
    min-width: 0;
}
.librarian-records-page .records-filter-action {
    min-width: 82px;
}
.librarian-records-page .records-filter-action .btn {
    width: 100%;
    min-height: 42px;
    white-space: nowrap;
}
.librarian-records-page .records-table-panel {
    min-width: 0;
}
.librarian-records-page .records-table-wrapper {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.librarian-records-page .records-table {
    width: 100%;
    min-width: 1635px;
    table-layout: fixed;
    margin-bottom: 0;
}
.librarian-records-page .records-table > :not(caption) > * > * {
    height: auto;
    padding: 0.68rem 0.72rem;
    vertical-align: middle;
}
.librarian-records-page .records-table thead th {
    white-space: nowrap;
}
.librarian-records-page .records-table tbody td {
    line-height: 1.4;
    word-break: normal;
    overflow-wrap: break-word;
}
.librarian-records-page .records-table th:nth-child(1),
.librarian-records-page .records-table td:nth-child(1) { width: 50px; white-space: nowrap; }
.librarian-records-page .records-table th:nth-child(2),
.librarian-records-page .records-table td:nth-child(2) { width: 300px; white-space: normal; word-break: normal; overflow-wrap: break-word; }
.librarian-records-page .records-table th:nth-child(3),
.librarian-records-page .records-table td:nth-child(3) { width: 145px; }
.librarian-records-page .records-table th:nth-child(4),
.librarian-records-page .records-table td:nth-child(4) { width: 180px; }
.librarian-records-page .records-table th:nth-child(5),
.librarian-records-page .records-table td:nth-child(5) { width: 220px; white-space: normal; word-break: normal; overflow-wrap: break-word; }
.librarian-records-page .records-table th:nth-child(6),
.librarian-records-page .records-table td:nth-child(6) { width: 110px; white-space: nowrap; }
.librarian-records-page .records-table th:nth-child(7),
.librarian-records-page .records-table td:nth-child(7) { width: 115px; white-space: nowrap; }
.librarian-records-page .records-table th:nth-child(8),
.librarian-records-page .records-table td:nth-child(8) { width: 120px; white-space: nowrap; }
.librarian-records-page .records-table th:nth-child(9),
.librarian-records-page .records-table td:nth-child(9) { width: 155px; white-space: nowrap; }
.librarian-records-page .records-table th:nth-child(10),
.librarian-records-page .records-table td:nth-child(10) { width: 240px; white-space: nowrap; }
.librarian-records-page .records-table .status-badge {
    min-width: 100px;
    justify-content: center;
    white-space: nowrap;
}
.librarian-records-page .records-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 0.4rem;
}
.librarian-records-page .records-actions .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

@media (max-width: 1399.98px) {
    .librarian-records-page .records-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .librarian-records-page .records-filter-area {
        padding: 1rem;
    }
    .librarian-records-page .records-filter-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .librarian-records-page .records-filter-action .btn {
        width: 100%;
    }
    .librarian-records-page .records-table-panel {
        padding: 0.8rem;
    }
    .librarian-records-page .records-table > :not(caption) > * > * {
        padding: 0.65rem;
    }
}
/* Opt-in Abstract fields share PDF formatting controls and natural wrapping. */
textarea[data-abstract-format] {
    box-sizing: border-box;
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 160px;
    padding: 12px;
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    resize: vertical;
}
.abstract-format-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    max-width: 100%;
}
.abstract-format-controls .form-text {
    flex: 1 1 240px;
    margin: 0;
}
.status-fill-draft { background: #68756f; }
.status-fill-archived { background: #526174; }
.status-fill-other { background: #b45309; }
.course-records-page .course-record-pagination { display: flex; justify-content: center; margin-top: 1.5rem; }
.course-records-page .course-record-pagination .pagination { justify-content: center; flex-wrap: wrap; gap: 0.35rem; }
.course-records-page .course-record-pagination .page-link { display: grid; place-items: center; min-width: 44px; min-height: 44px; margin: 0; border-radius: 7px; color: var(--dark-green); }
.course-records-page .course-record-pagination .active .page-link { background: var(--primary-green); border-color: var(--primary-green); color: var(--white); }
.course-records-page .course-record-pagination .disabled .page-link { color: var(--muted-text); background: var(--light-bg); }
.course-records-page .course-record-pagination .page-link:focus-visible { outline: 3px solid var(--accent-yellow); outline-offset: 2px; }
.course-records-page #courseResearchRecords { scroll-margin-top: calc(var(--navbar-height) + 16px); }
.course-records-page #courseResearchRecords article { overflow-wrap: anywhere; }

