* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #FFF8EE;
    color: #2A0A0A;
}


.login-body {
    background: linear-gradient(120deg, #0A0F1A, #0F1A2A);
}

.logo {
    width: 55px;
    height: 55px;
    display: grid;
    place-items: center;
    background: #F69D39;
    color: white;
    border-radius: 8px;
    font-weight: bold;
}

.brand-logo {
    width: 62px;
    height: 62px;
    object-fit: cover;
    border-radius: 50%;
    background: white;
    padding: 4px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.login-page {
    min-height: 100vh;
    padding: 40px;
}

.brand {
    max-width: 1100px;
    margin: 0 auto 25px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.brand p {
    margin: 0 0 5px;
    color: #5a1010;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.3px;
}

.brand h1 {
    margin: 0;
    font-size: 28px;
    color: #1a0505;
    font-weight: 800;
    line-height: 1.2;
}

.book-login {
    max-width: 1100px;
    min-height: 560px;
    margin: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.18);
}

.book-left,
.book-right {
    padding: 50px;
}

.book-left {
    background: #FFF3D4;
    border-right: 8px solid #e0d5bd;
}

.tag {
    color: #8B6914;
    font-weight: bold;
}

.book-left h2 {
    font-size: 36px;
}

.feature-box {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-left: 5px solid #A52020;
    margin-bottom: 12px;
}

.book-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.book-right h2 {
    text-align: center;
    color: #7B1A1A;
    font-size: 34px;
}

.subtitle {
    text-align: center;
    color: #7A5050;
}

.slide-box {
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.slide-dots {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}

.dot {
    width: 12px;
    height: 12px;
    background: #DDB98A;
    border-radius: 50%;
    display: inline-block;
}

.dot.active {
    width: 28px;
    border-radius: 20px;
    background: #D4821E;
}

form {
    display: grid;
    gap: 18px;
}

label {
    font-weight: bold;
    margin-bottom: 4px;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #E8C9A0;
    border-radius: 6px;
    font-family: Arial, sans-serif;
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: normal;
    color: #333;
    font-size: 0.95rem;
    line-height: 1.4;
}

.checkbox-label input {
    width: auto;
    margin: 0;
}

.checkbox-label a {
    color: #A52020;
    text-decoration: underline;
}

.checkbox-label a:hover {
    color: #6B1515;
}

.terms-accept {
    align-items: flex-start;
    padding: 12px;
    border: 1px solid #E8C9A0;
    border-radius: 8px;
    background: #FFF8EE;
}

.terms-link {
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #A52020;
    font-weight: 800;
    text-decoration: underline;
    cursor: pointer;
}

.terms-link:hover {
    color: #6B1515;
    background: transparent;
}

.terms-modal {
    width: min(920px, calc(100vw - 32px));
    max-height: min(760px, calc(100vh - 32px));
    border: 0;
    border-radius: 12px;
    padding: 0;
    color: #2A0A0A;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

.terms-modal::backdrop {
    background: rgba(28, 10, 10, 0.80);
}

.terms-modal-header,
.terms-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    background: #FFF8EE;
    border-bottom: 1px solid #E8C9A0;
}

.terms-modal-header p {
    margin: 0 0 5px;
    color: #A52020;
    font-weight: 800;
}

.terms-modal-header h2 {
    margin: 0;
    color: #7B1A1A;
}

.terms-close {
    width: 40px;
    height: 40px;
    min-height: 40px;
    border-radius: 50%;
    background: #F5E3D0;
    color: #7B1A1A;
    font-size: 24px;
    line-height: 1;
}

.terms-modal-body {
    max-height: 560px;
    overflow: auto;
    padding: 22px 26px;
}

.terms-lead {
    margin-top: 0;
    color: #7A5050;
    line-height: 1.6;
}

.terms-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding-left: 22px;
}

.terms-list li {
    line-height: 1.55;
}

.terms-list strong {
    color: #7B1A1A;
}

.terms-modal-footer {
    justify-content: flex-end;
    border-top: 1px solid #E8C9A0;
    border-bottom: 0;
}

.terms-page-panel {
    max-width: 960px;
    margin: 0 auto;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

button {
    min-height: 45px;
    border: 0;
    border-radius: 6px;
    background: #D4821E;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.secondary {
    background: #8B6914;
}

/* Sidebar hover automation */
.sidebar { /* HTU Maroon Sidebar */
    position: fixed;
    left: 0;
    top: 0;
    width: 88px;
    height: 100vh;
    padding: 24px 15px;
    background: #1C0A0A;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
    z-index: 20;
    transition:
        width 0.28s ease,
        padding 0.28s ease;
}

.sidebar:hover {
    width: 300px;
    padding: 24px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding-bottom: 16px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: white;
    white-space: nowrap;
}

.sidebar-brand img {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 50%;
    background: white;
    padding: 4px;
    flex-shrink: 0;
}

.brand-text {
    opacity: 0;
    transform: translateX(-8px);
    transition: 0.22s ease;
}

.sidebar:hover .brand-text {
    opacity: 1;
    transform: translateX(0);
}

.sidebar-brand strong {
    display: block;
    font-size: 18px;
    line-height: 1.1;
}

.sidebar-brand span {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #cbd7ea;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar a,
.logout-btn {
    min-height: 44px;
    padding: 10px 12px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    background: transparent;
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    white-space: nowrap;
    transition: background 0.18s ease, color 0.18s ease;
}

.sidebar a.active {
    background: #C9982A;
    color: #ffffff;
}

.sidebar a:hover:not(.active) {
    background: rgba(201,152,42,0.15);
    color: #ffffff;
}

.menu-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 8px;
    background: transparent;
    font-weight: bold;
    transition: background 0.18s ease;
}

.menu-label {
    opacity: 0;
    transform: translateX(-8px);
    transition: 0.22s ease;
    color: inherit;
    font-weight: 600;
    font-size: 14px;
}

.sidebar:hover .menu-label {
    opacity: 1;
    transform: translateX(0);
}

.logout-btn {
    margin-top: auto;
    background: transparent;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.content {
    margin-left: 88px;
    padding: 30px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

.topbar p {
    margin: 0;
    color: #7B1A1A;
    font-weight: bold;
}

.topbar h1 {
    margin: 5px 0 0;
}

.topbar input {
    max-width: 420px;
    height: 45px;
}

/* ── Admin 3-card dashboard layout ──────────────────────────────────────── */
.cards-3-admin {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.cards-3-admin .card {
    padding: 24px 22px 20px;
    border-left: none;
    border-top: 4px solid #A52020;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
    overflow: hidden;
}

.cards-3-admin .card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(165,32,32,0.04) 0%, transparent 60%);
    pointer-events: none;
}

.card-admin-pending  { border-top-color: #B85C00; }
.card-admin-accounts { border-top-color: #1565C0; }
.card-admin-users    { border-top-color: #2E7D32; }

.card-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(165,32,32,0.08);
    display: grid;
    place-items: center;
    margin-bottom: 10px;
}

.card-admin-pending  .card-icon-wrap { background: rgba(184,92,0,0.10);  color: #B85C00; }
.card-admin-accounts .card-icon-wrap { background: rgba(21,101,192,0.10); color: #1565C0; }
.card-admin-users    .card-icon-wrap { background: rgba(46,125,50,0.10);  color: #2E7D32; }

.card-icon-wrap svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
}

.cards-3-admin .card strong {
    font-size: 36px;
    font-weight: 800;
    color: #1a1a2e;
    line-height: 1;
    margin-bottom: 2px;
}

.cards-3-admin .card > span:not(.card-arrow):not(.card-sublabel) {
    font-size: 14px;
    font-weight: 600;
    color: #4a3030;
}

.card-sublabel {
    font-size: 12px;
    color: #9E8080;
    margin-bottom: 10px;
}

.cards-3-admin .card-arrow {
    margin-top: auto;
    font-size: 13px;
    color: #A52020;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    transform: translateX(-4px);
    display: inline-block;
}

.cards-3-admin a.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.cards-3-admin a.card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
}

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

@media (max-width: 600px) {
    .cards-3-admin {
        grid-template-columns: 1fr;
    }
}

.card,
.panel,
.record {
    background: white;
    border-radius: 8px;
}

.card {
    padding: 20px;
    border-left: 5px solid #A52020;
}

.card strong {
    display: block;
    font-size: 32px;
}

.card span {
    color: #7A5050;
}

/* Clickable stat cards on admin dashboard */
a.card.card-clickable {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    position: relative;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-left-color 0.15s ease;
    cursor: pointer;
}
a.card.card-clickable:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(165, 32, 32, 0.15);
    border-left-color: #7a0c0c;
}
a.card.card-clickable:active {
    transform: translateY(-1px);
}
a.card.card-clickable .card-arrow {
    display: inline-block;
    margin-top: 6px;
    font-size: 13px;
    color: #A52020;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    transform: translateX(-4px);
}
a.card.card-clickable:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
}

.grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 20px;
}

.panel {
    padding: 22px;
    margin-bottom: 20px;
}

.panel h2 {
    margin-top: 0;
    color: #7B1A1A;
}

.module-form {
    max-width: 900px;
}

.empty-state {
    padding: 30px;
    border: 2px dashed #E8C9A0;
    border-radius: 8px;
    text-align: center;
    background: #FFF8EE;
    margin-top: 16px;
}

.empty-state p {
    color: #7A5050;
}

.record-list {
    display: grid;
    gap: 12px;
}

.record {
    padding: 16px;
    border: 1px solid #E8C9A0;
}

.record h3 {
    margin: 0 0 8px;
}

.record p {
    margin: 4px 0;
    color: #7A5050;
}

.badge {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 10px;
    border-radius: 20px;
    background: #FFF8EE;
    color: #7B1A1A;
    font-weight: bold;
    font-size: 13px;
}

.actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* ══════════════════════════════════════════════
   ADMIN APPROVAL CARDS — two-column layout
   Left: image preview | Right: details + buttons
   ══════════════════════════════════════════════ */
.approval-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.approval-card {
    display: flex;
    gap: 24px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    align-items: flex-start;
}

/* LEFT — image */
.approval-card-left {
    flex: 0 0 240px;
    width: 240px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.approval-abstract-img {
    width: 100%;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    cursor: zoom-in;
    transition: box-shadow 0.18s;
    display: block;
    object-fit: cover;
    max-height: 320px;
}
.approval-abstract-img:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.approval-file-hint {
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
}
.approval-file-label {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.03em;
}

/* RIGHT — details */
.approval-card-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.approval-title {
    font-size: 15px;
    font-weight: 800;
    color: #1a202c;
    line-height: 1.35;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.01em;
}

/* Meta grid */
.approval-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.approval-meta-row {
    display: flex;
    gap: 8px;
    font-size: 13.5px;
    line-height: 1.4;
}
.approval-meta-label {
    font-weight: 700;
    color: #374151;
    flex-shrink: 0;
    min-width: 90px;
}
.approval-meta-val {
    color: #4b5563;
}

/* Abstract box */
.approval-abstract-box {
    background: #f8fafc;
    border-left: 3px solid #0b3b78;
    border-radius: 0 6px 6px 0;
    padding: 10px 14px;
}
.approval-abstract-label {
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #0b3b78;
    margin-bottom: 6px;
}
.approval-abstract-text {
    font-size: 13px;
    color: #374151;
    line-height: 1.65;
    max-height: 140px;
    overflow-y: auto;
}
.approval-no-abstract {
    font-size: 13px;
    color: #9ca3af;
    font-style: italic;
}

/* File link (non-image) */
.approval-file-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 7px;
    border: 1.5px solid #0b3b78;
    color: #0b3b78;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.18s;
    align-self: flex-start;
}
.approval-file-link:hover { background: #eff6ff; }

/* Approve / Reject buttons */
.approval-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
    flex-wrap: wrap;
}
.btn-approve,
.btn-reject {
    padding: 9px 22px;
    border-radius: 7px;
    border: none;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.18s, transform 0.12s;
    font-family: inherit;
    min-width: 110px;
}
.btn-approve {
    background: #1a6b42;
    color: #fff;
}
.btn-approve:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-reject {
    background: #c0392b;
    color: #fff;
}
.btn-reject:hover { opacity: 0.88; transform: translateY(-1px); }

/* Responsive: stack on small screens */
@media (max-width: 700px) {
    .approval-card { flex-direction: column; }
    .approval-card-left { flex: none; width: 100%; }
}

.ai-result {
    margin-top: 16px;
    padding: 18px;
    border-radius: 8px;
    background: #FFF8EE;
    border: 1px solid #E8C9A0;
}

.link-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-top: 12px;
    padding: 12px 16px;
    background: #D4821E;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    text-align: center;
}

/* Profile */
.profile-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    align-items: start;
}

.profile-card {
    background: white;
    border-radius: 8px;
    padding: 26px;
    text-align: center;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.profile-avatar {
    width: 120px;
    height: 120px;
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: #D4821E;
    color: white;
    font-size: 46px;
    font-weight: bold;
    border: 6px solid #FFF8EE;
}

.profile-avatar-image {
    object-fit: cover;
}

.profile-photo-picker {
    position: relative;
    display: inline-grid;
    place-items: center;
    margin: 0 auto 14px;
    border-radius: 50%;
    cursor: pointer;
}

.profile-photo-picker .profile-avatar {
    margin: 0;
}

.profile-photo-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.profile-edit-badge {
    position: absolute;
    right: 6px;
    bottom: 8px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #D4821E;
    color: white;
    border: 3px solid #ffffff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.profile-edit-badge svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.profile-photo {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    background: white;
    padding: 6px;
    border: 4px solid #FFF8EE;
    margin-bottom: 14px;
}

.profile-card h2 {
    margin: 0 0 6px;
    color: #7B1A1A;
}

.profile-card p {
    margin: 0 0 18px;
    color: #7A5050;
    font-weight: bold;
}

.profile-info-box {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border: 1px solid #E8C9A0;
    border-radius: 8px;
    margin-top: 10px;
    text-align: left;
}

.profile-info-box span {
    color: #7A5050;
}

.profile-info-box strong {
    color: #7B1A1A;
}

/* ── Profile: single-column layout (new stacked panels) ────────────────── */
.profile-layout-single {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-form-panel {
    margin-bottom: 0;
}

/* ── Profile: Avatar block (centered, non-editable) ────────────────────── */
.profile-panel-avatar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: 4px;
}

/* Override base .profile-avatar size to 130px with shadow */
.profile-panel-avatar-wrap .profile-avatar {
    width: 130px;
    height: 130px;
    font-size: 52px;
    margin: 0 auto 14px;
    border: 5px solid #FFF8EE;
    box-shadow: 0 6px 20px rgba(165, 32, 32, 0.22);
    cursor: default;
}

.profile-panel-avatar-wrap .profile-avatar-initials {
    /* inherits .profile-avatar — just an alias class so JS won't target it */
}

.profile-panel-name {
    margin: 0 0 6px;
    color: #7B1A1A;
    font-size: 1.2rem;
}

.profile-panel-role {
    margin: 0;
    color: #7A5050;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.profile-status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    background: #edf7ed;
    color: #2e7d32;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    border: 1px solid #a5d6a7;
}

/* ── Profile: Divider between avatar and form ───────────────────────────── */
.profile-section-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, #E8C9A0, transparent);
    margin: 18px 0 10px;
}

/* Responsive */
/* ── Mobile Hamburger Button ─────────────────────────────────────── */
.hamburger-open-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    color: #7a0c0c;
    min-height: auto;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 8px;
}

.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
    color: rgba(255,255,255,0.85);
    min-height: auto;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    align-self: flex-end;
    transition: background 0.18s;
}

.hamburger-btn:hover {
    background: rgba(255,255,255,0.12);
}

/* ── Sidebar Overlay (mobile) ────────────────────────────────────── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 999;
    animation: fadeIn 0.25s ease;
}

.sidebar-overlay.show {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── 900px: Tablet / Mobile ──────────────────────────────────────── */
@media (max-width: 900px) {

    /* Hamburger open button (in topbar) */
    .hamburger-open-btn {
        display: flex;
    }

    /* Close button inside sidebar */
    .hamburger-btn {
        display: flex;
    }

    /* Sidebar: hidden off-screen, slides in when .mobile-open */
    .sidebar {
        position: fixed !important;
        left: -300px !important;
        top: 0;
        width: 270px !important;
        height: 100vh !important;
        padding: 16px 14px !important;
        z-index: 1000;
        overflow-y: auto;
        overflow-x: hidden;
        transition: left 0.3s ease !important;
    }

    .sidebar:hover {
        width: 270px !important;
        left: -300px !important;
    }

    .sidebar.mobile-open,
    .sidebar.mobile-open:hover {
        left: 0 !important;
        width: 270px !important;
    }

    /* Always show labels when sidebar is open on mobile */
    .sidebar.mobile-open .brand-text,
    .sidebar.mobile-open .menu-label,
    .sidebar.mobile-open .profile-mini-text,
    .sidebar.mobile-open .profile-chevron {
        opacity: 1 !important;
        transform: translateX(0) !important;
    }

    /* Content fills full width */
    .content {
        margin-left: 0 !important;
        padding: 20px 16px;
    }

    /* Topbar: horizontal with hamburger */
    .topbar {
        flex-direction: row !important;
        align-items: center;
        flex-wrap: nowrap;
        gap: 8px;
        padding: 12px 16px;
    }

    .topbar > div:first-child {
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }

    .topbar h1 {
        font-size: 17px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-top: 2px;
    }

    /* Grids become single column */
    .book-login,
    .grid,
    .profile-layout {
        grid-template-columns: 1fr;
    }

    /* Avatar sizes */
    .profile-panel-avatar-wrap .profile-avatar {
        width: 100px;
        height: 100px;
        font-size: 40px;
    }

    /* Dashboard cards: 2 columns on tablet */
    .cards {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Panels */
    .panel {
        padding: 18px 16px;
    }

    /* Tables: scroll horizontally */
    .research-table-wrap,
    .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Approval cards */
    .approval-card {
        flex-direction: column;
    }

    .approval-card-left {
        width: 100%;
        flex: none;
    }

    /* User/account cards */
    .user-management-heading,
    .user-account-card {
        grid-template-columns: 1fr;
    }

    /* Login page — stack book panels */
    .book-login {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    /* Keep highlights visible on tablet */
    .book-left {
        min-height: 340px;
        padding: 28px 24px;
    }

    /* Report table header */
    .research-table-header {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Dashboard search */
    .dash-results-grid {
        grid-template-columns: 1fr;
    }

    /* Profile mini text always visible */
    .profile-mini-text,
    .profile-chevron {
        opacity: 1;
        transform: none;
    }
}

/* ── 600px: Small phones ─────────────────────────────────────────── */
@media (max-width: 600px) {
    .content {
        padding: 14px 12px;
    }

    .topbar {
        padding: 10px 12px;
        flex-wrap: wrap;
        row-gap: 8px;
    }

    /* When search is present, it drops to its own row */
    .topbar .topbar-search-wrap {
        order: 10;
        flex: 1 1 100%;
        max-width: none;
        min-width: 0;
    }

    .topbar h1 {
        font-size: 15px;
    }

    .topbar p {
        font-size: 11px;
    }

    /* Dashboard cards: 1 column */
    .cards {
        grid-template-columns: 1fr;
    }

    .cards-3-admin {
        grid-template-columns: 1fr;
    }

    /* Panels */
    .panel {
        padding: 14px 12px;
        border-radius: 10px;
    }

    .panel h2 {
        font-size: 15px;
    }

    /* Login page: hide left panel on very small screens */
    .book-left {
        display: none;
    }

    .book-right {
        padding: 28px 20px;
        border-radius: 16px;
    }

    /* Login page wrapper */
    .login-page {
        padding: 16px;
        min-height: 100dvh;
    }

    .book-login {
        border-radius: 16px;
        overflow: hidden;
    }

    /* Forgot password */
    .forgot-card {
        padding: 24px 18px;
        margin: 16px;
    }

    /* Buttons */
    button[type="submit"] {
        width: 100%;
    }

    /* Tables */
    table {
        font-size: 12px;
    }

    th, td {
        padding: 8px 10px;
    }

    /* Approval actions */
    .approval-actions {
        flex-direction: column;
        gap: 6px;
        align-items: stretch;
    }

    .approval-actions button,
    .approval-actions a {
        text-align: center;
    }

    /* Research table header */
    .research-table-header {
        gap: 8px;
    }

    /* Profile */
    .profile-layout {
        grid-template-columns: 1fr;
    }

    /* Brand heading */
    .brand h1 {
        font-size: 20px;
    }

    /* Cards admin */
    .cards {
        gap: 10px;
    }

    /* Settings */
    .settings-section,
    section {
        gap: 12px;
    }

    /* Form fields */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    select,
    textarea {
        font-size: 16px; /* Prevent iOS zoom */
    }
}

/* ── 400px: Very small (iPhone SE etc.) ──────────────────────────── */
@media (max-width: 400px) {
    .topbar h1 {
        font-size: 15px;
    }

    .panel {
        padding: 12px 10px;
    }

    .lp-slide-title {
        font-size: 18px;
    }
}

.dark-gray-theme {
    background: #e5e7eb;
    color: #1f2933;
}

.dark-gray-theme .content {
    background: #e5e7eb;
}

.dark-gray-theme .sidebar { /* HTU Maroon Sidebar */
    background: #2f343b;
}

.dark-gray-theme .sidebar a,
.dark-gray-theme .logout-btn {
    border-color: transparent;
}

.dark-gray-theme .sidebar a.active {
    background: #D4821E;
}

.dark-gray-theme .panel,
.dark-gray-theme .card,
.dark-gray-theme .record,
.dark-gray-theme .profile-card {
    background: #f8fafc;
}

.dark-gray-theme .panel h2,
.dark-gray-theme .topbar h1,
.dark-gray-theme .profile-card h2 {
    color: #26313f;
}

.dark-gray-theme .topbar p,
.dark-gray-theme .card span,
.dark-gray-theme .record p,
.dark-gray-theme .empty-state p {
    color: #7A5050;
}

.dark-gray-theme input,
.dark-gray-theme select,
.dark-gray-theme textarea {
    background: #ffffff;
    border-color: #b8c0cc;
    color: #1f2933;
}

.dark-gray-theme button,
.dark-gray-theme .link-button {
    background: #4b5563;
}

.dark-gray-theme button:hover,
.dark-gray-theme .link-button:hover {
    background: #374151;
}

.dark-gray-theme .empty-state,
.dark-gray-theme .ai-result {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.dark-gray-theme .menu-icon {
    background: transparent;
}

.dark-gray-theme .badge {
    background: #e2e8f0;
    color: #26313f;
}

.smooth-slide {
    transition:
        opacity 0.42s ease,
        transform 0.42s ease;
}

.slide-fade-out {
    opacity: 0;
    transform: translateY(8px);
}

.alert-box {
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 14px;
    font-weight: bold;
}

.alert-box.success {
    background: #e7f6ee;
    color: #8B6914;
    border: 1px solid #b9e4cc;
}

.alert-box.error {
    background: #fff0f0;
    color: #8a2d2d;
    border: 1px solid #efc2c2;
}

.smooth-slide {
    transition:
        opacity 0.42s ease,
        transform 0.42s ease;
}

.slide-fade-out {
    opacity: 0;
    transform: translateY(8px);
}

.demo-note {
    display: none;
}

/* Final Laravel UI polish */
.welcome-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 24px;
    margin-bottom: 20px;
    background: white;
    border-radius: 8px;
}

.welcome-panel h2 {
    margin: 10px 0 8px;
    color: #7B1A1A;
}

.mini-preview {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.mini-preview span {
    padding: 10px;
    border-radius: 6px;
    background: rgba(11, 88, 181, 0.08);
    color: #7B1A1A;
    font-weight: bold;
}

.logout-form {
    margin-top: auto;
}

.logout-form .logout-btn {
    width: 100%;
}

.profile-card {
    min-height: 260px;
}

.profile-avatar {
    line-height: 1;
}

.record-list form {
    display: inline-block;
}

.actions button {
    min-width: 110px;
}

/* Sidebar profile and icon upgrade */
.sidebar { /* HTU Maroon Sidebar */
    box-shadow: 10px 0 30px rgba(16, 41, 79, 0.18);
}

.sidebar-menu {
    overflow-y: auto;
    padding-right: 2px;
}

.sidebar-menu::-webkit-scrollbar {
    width: 0;
}

.menu-icon svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.sidebar a.active .menu-icon,
.sidebar a:hover .menu-icon,
.logout-btn:hover .menu-icon,
.profile-menu-item:hover .menu-icon {
    background: transparent;
    color: #ffffff;
}

.sidebar-profile {
    display: grid;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-bottom-row {
    display: flex;
    gap: 6px;
    align-items: center;
    overflow: hidden;
}

.profile-menu {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.profile-menu summary {
    list-style: none;
}

.profile-menu summary::-webkit-details-marker {
    display: none;
}

/* ── Collapsed state: just the avatar, no background box ───── */
.profile-mini {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px;
    border: none;
    border-radius: 10px;
    background: transparent;          /* no box when collapsed */
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.18s ease;
    overflow: hidden;
    min-width: 0;
    width: 100%;
}

/* ── Expanded state: subtle bg ──────────────────────────────── */
.sidebar:hover .profile-mini {
    background: rgba(255, 255, 255, 0.06);
    padding: 8px 10px;
}

.profile-mini:hover,
.profile-menu[open] .profile-mini {
    background: rgba(255, 255, 255, 0.11);
    color: white;
}

.profile-mini-avatar {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 50%;
    background: #D4821E;
    color: white;
    font-size: 13px;
    font-weight: 800;
    border: 2px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.profile-mini-text {
    opacity: 0;
    transform: translateX(-8px);
    transition: 0.22s ease;
    overflow: hidden;
}

.sidebar:hover .profile-mini-text {
    opacity: 1;
    transform: translateX(0);
}

.profile-mini-text strong,
.profile-mini-text span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 142px;
}

.profile-mini-text strong {
    font-size: 13px;
    line-height: 1.15;
}

.profile-mini-text span {
    margin-top: 2px;
    font-size: 11px;
    color: #cbd7ea;
}

.profile-chevron {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    margin-left: auto;
    opacity: 0;
    transform: translateX(-8px);
    transition: 0.22s ease;
    flex-shrink: 0;
}

.sidebar:hover .profile-chevron {
    opacity: 1;
    transform: translateX(0);
}

.profile-chevron svg,
.quick-logout svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.profile-menu[open] .profile-chevron {
    transform: rotate(180deg);
}

.profile-menu-panel {
    display: grid;
    gap: 2px;
    margin-top: 4px;
    padding: 4px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: none;
}

.profile-menu-item {
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 8px;
    border-radius: 8px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    text-align: left;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

.profile-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* ── Quick logout: hidden when collapsed, slides in on hover ── */
.profile-menu-form,
.quick-logout-form {
    margin: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, width 0.22s ease, max-width 0.22s ease;
    width: 0;
    max-width: 0;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar:hover .quick-logout-form {
    opacity: 1;
    pointer-events: auto;
    width: 38px;
    max-width: 38px;
}

.profile-menu-button {
    width: 100%;
    min-height: 34px;
    cursor: pointer;
}

.quick-logout {
    width: 38px;
    height: 44px;
    min-height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    flex-shrink: 0;
    overflow: hidden;
    transition: background 0.18s ease, color 0.18s ease;
}

.quick-logout:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

.logout-form {
    margin: 0;
}

.logout-form .logout-btn {
    width: 100%;
    margin-top: 0;
}

/* Top action bar inspired by the dashboard reference */
.topbar {
    align-items: center;
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.notification-menu {
    position: relative;
}

.notification-menu summary {
    list-style: none;
}

.notification-menu summary::-webkit-details-marker {
    display: none;
}

.notification-button {
    position: relative;
    cursor: pointer;
}

button:disabled {
    opacity: 0.68;
    cursor: wait;
}

/* ── Notification Badge ────────────────────────────────────────────── */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    padding: 0 5px;
    border-radius: 999px;
    background: #d83b3b;
    color: white;
    font-size: 11px;
    font-weight: 900;
    border: 2px solid white;
    animation: badgePop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.notif-badge-urgent {
    background: #C00B0B;
    box-shadow: 0 0 0 3px rgba(192, 11, 11, 0.22);
}

@keyframes badgePop {
    0%   { transform: scale(0); opacity: 0; }
    70%  { transform: scale(1.25); }
    100% { transform: scale(1); opacity: 1; }
}

/* ── Notification Panel ────────────────────────────────────────────── */
.notification-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: min(380px, calc(100vw - 32px));
    z-index: 9000;
    padding: 0;
    border-radius: 16px;
    background: white;
    border: 1px solid #EDD9B8;
    box-shadow: 0 20px 55px rgba(16, 41, 79, 0.20);
    overflow: hidden;
    animation: panelFadeIn 0.2s ease;
}

@keyframes panelFadeIn {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ── Panel Header ───────────────────────────────────────────────────── */
.notification-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid #f0e8df;
    background: linear-gradient(to right, #fffaf4, #fff);
}

.notif-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-panel h3 {
    margin: 0;
    color: #7B1A1A;
    font-size: 15px;
    font-weight: 800;
}

.notif-count-label {
    font-size: 11px;
    font-weight: 700;
    background: #7a0c0c;
    color: #fff;
    padding: 2px 9px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

/* ── Mark All Read Button ───────────────────────────────────────────── */
.notif-dismiss-all {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 0;
    padding: 5px 10px;
    border-radius: 8px;
    border: 1.5px solid #d4dceb;
    background: #f6f9fe;
    color: #4A6FA5;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.notif-dismiss-all svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
}

.notif-dismiss-all:hover {
    background: #e8f0fe;
    border-color: #4A6FA5;
    color: #1a4380;
}

/* ── Items wrap (scrollable) ─────────────────────────────────────────── */
.notif-items-wrap {
    max-height: 340px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.notif-items-wrap::-webkit-scrollbar {
    width: 4px;
}
.notif-items-wrap::-webkit-scrollbar-track { background: transparent; }
.notif-items-wrap::-webkit-scrollbar-thumb { background: #e0d0c0; border-radius: 4px; }

/* ── Notification Item ───────────────────────────────────────────────── */
.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 16px;
    background: #fff;
    color: #2A0A0A;
    text-decoration: none;
    border-bottom: 1px solid #f5ede6;
    transition: background 0.15s, transform 0.12s;
    position: relative;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: #fffaf5;
    transform: translateX(2px);
}

/* Urgency left-bar accent */
.notif-urgency-high::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #d83b3b;
    border-radius: 0 2px 2px 0;
}

.notif-urgency-medium::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #C9982A;
    border-radius: 0 2px 2px 0;
}

/* ── Icon Wrap ────────────────────────────────────────────────────────── */
.notif-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}
.notif-icon-wrap svg {
    width: 18px;
    height: 18px;
}
.notif-icon-users    { background: #dce8fa; color: #0b3b78; }
.notif-icon-research { background: #fef3c7; color: #92400e; }
.notif-icon-pending  { background: #fef3c7; color: #92400e; }
.notif-icon-approved { background: #dcfce7; color: #14532d; }
.notif-icon-rejected { background: #fee2e2; color: #7f1d1d; }
.notif-icon-new      { background: #ede9fe; color: #4c1d95; }

/* ── Text ─────────────────────────────────────────────────────────────── */
.notif-text {
    flex: 1;
    min-width: 0;
}

.notif-text strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #1a0505;
    margin-bottom: 2px;
    line-height: 1.35;
}

.notif-text span {
    display: block;
    font-size: 12px;
    color: #7A5050;
    line-height: 1.45;
    white-space: normal;
}

.notif-action-hint {
    display: block;
    font-size: 11px;
    font-style: normal;
    color: #A52020;
    font-weight: 600;
    margin-top: 4px;
    opacity: 0.75;
    transition: opacity 0.15s;
}

.notification-item:hover .notif-action-hint {
    opacity: 1;
}

/* ── Count Badges ─────────────────────────────────────────────────────── */
.notif-badge-small {
    flex-shrink: 0;
    min-width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    padding: 0 6px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    margin-top: 2px;
}

.notif-urgency-badge-high   { background: #fee2e2; color: #7f1d1d; }
.notif-urgency-badge-medium { background: #fef3c7; color: #78350f; }
.notif-urgency-badge-low    { background: #dcfce7; color: #14532d; }

/* ── Empty State ──────────────────────────────────────────────────────── */
.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 32px 16px;
    color: #9a8080;
    text-align: center;
}

.notification-empty svg {
    width: 34px;
    height: 34px;
    stroke: #d4c4c4;
    margin-bottom: 4px;
}

.notification-empty strong {
    font-size: 14px;
    color: #5a3030;
}

.notification-empty span {
    font-size: 12px;
    color: #9a8080;
}

/* ── Panel Footer ─────────────────────────────────────────────────────── */
.notification-panel-footer {
    border-top: 1px solid #f0e8df;
    padding: 10px 16px;
    background: #fffaf4;
    text-align: center;
}

.notif-view-all {
    font-size: 12px;
    font-weight: 700;
    color: #7B1A1A;
    text-decoration: none;
    opacity: 0.75;
    transition: opacity 0.15s;
}

.notif-view-all:hover {
    opacity: 1;
    text-decoration: underline;
}

.notification-item + .notification-item {
    margin-top: 0;
}

.notifications-off .notification-badge {
    display: none;
}

/* ── Notification panel: mobile responsive ─────────────────────────── */
@media (max-width: 900px) {
    .notification-panel {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100% !important;
        max-width: 100%;
        border-radius: 22px 22px 0 0;
        box-shadow: 0 -8px 40px rgba(16,41,79,0.25);
        max-height: 78vh;
        overflow-y: auto;
        z-index: 9999;
        animation: slideUpPanel 0.3s cubic-bezier(0.34,1.05,0.64,1);
    }

    @keyframes slideUpPanel {
        from { transform: translateY(100%); opacity: 0; }
        to   { transform: translateY(0);    opacity: 1; }
    }

    /* Drag handle indicator */
    .notification-panel::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: #ddd;
        border-radius: 99px;
        margin: 10px auto 0;
    }

    /* Full-width overlay behind panel on mobile */
    .notification-menu[open]::after {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.42);
        z-index: 9998;
        animation: fadeIn 0.22s ease;
    }

    .notification-panel {
        z-index: 9999;
    }

    .notif-items-wrap {
        max-height: 55vh;
    }

    .topbar-actions {
        gap: 6px;
        flex-shrink: 0;
    }

    .round-action,
    .topbar-profile {
        width: 38px;
        height: 38px;
        min-height: 38px;
    }
}

@media (max-width: 600px) {
    .notification-panel {
        max-height: 82vh;
        border-radius: 20px 20px 0 0;
    }

    .notification-item {
        padding: 14px 16px;
    }

    .notif-text strong {
        font-size: 13px;
    }

    .notif-text span {
        font-size: 12px;
    }

    .notif-dismiss-all span {
        display: none;
    }
}


.round-action,
.topbar-profile {
    width: 42px;
    height: 42px;
    min-height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid #d4deec;
    background: #ffffff;
    color: #7B1A1A;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(16, 41, 79, 0.08);
}

.round-action svg,
.topbar-cta svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.round-action:hover,
.topbar-profile:hover {
    background: #FFF8EE;
    color: #A52020;
}

.topbar-profile span {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #C9982A;
    color: #ffffff;
    font-weight: 800;
}

.topbar-cta {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    border-radius: 999px;
    background: #C9982A;
    color: #ffffff;
    text-decoration: none;
    font-weight: 800;
    box-shadow: 0 10px 22px rgba(11, 88, 181, 0.22);
}

.topbar-cta:hover {
    background: #6B1515;
}

.topbar-actions input {
    max-width: 320px;
}

/* ── Topbar Search Bar ─────────────────────────────────────── */
.topbar-search-wrap {
    flex: 1;
    max-width: 400px;
    min-width: 160px;
}

@media (max-width: 600px) {
    .topbar-search-wrap {
        min-width: 0;
        width: 100%;
        max-width: none;
    }
}
.topbar-search-inner {
    display: flex;
    align-items: center;
    background: #FFF8EE;
    border: 1.5px solid #EDD9B8;
    border-radius: 8px;
    padding: 0 12px;
    gap: 8px;
    transition: border-color 0.2s;
    height: 40px;
}
.topbar-search-inner:focus-within {
    border-color: #C9982A;
    background: #FFFDF5;
}
.topbar-search-icon {
    width: 15px;
    height: 15px;
    stroke: #C9982A;
    flex-shrink: 0;
}
.topbar-search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 13px;
    color: #1C0505;
    min-width: 0;
}
.topbar-search-input::placeholder { color: #BBA080; }
.topbar-search-clear {
    background: none;
    border: none;
    cursor: pointer;
    color: #BBA080;
    display: flex;
    align-items: center;
    padding: 0;
    flex-shrink: 0;
    transition: color 0.15s;
}
.topbar-search-clear:hover { color: #A52020; }


.content {
    min-height: 100vh;
}

@media (max-width: 900px) {
    .profile-mini-text,
    .profile-chevron {
        opacity: 1;
        transform: none;
    }

    .topbar-actions {
        justify-content: flex-end;
        flex-wrap: nowrap;
        flex-shrink: 0;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .topbar-actions {
        gap: 4px;
    }

    .topbar-cta {
        padding: 0 10px;
        font-size: 12px;
        gap: 5px;
    }

    .topbar-cta svg {
        width: 15px;
        height: 15px;
    }
}

/* ============================================================
   ROLE-SPECIFIC CARD GRIDS
   ============================================================ */
.cards-3 {
    grid-template-columns: repeat(3, 1fr);
}

.cards-2 {
    grid-template-columns: repeat(2, 1fr);
    max-width: 560px;
}

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

@media (max-width: 600px) {
    .cards-3,
    .cards-2 { grid-template-columns: 1fr; }
}

.card-accent {
    border-left-color: #8B6914;
}

/* ============================================================
   BADGE STATUS COLORS
   ============================================================ */
.badge-approved { background: #d4f0e4; color: #1a6b42; }
.badge-pending  { background: #fff3cd; color: #7a5500; }
.badge-rejected { background: #fce4e4; color: #8a1a1a; }

/* ============================================================
   SECTION HEADING
   ============================================================ */
.section-heading {
    margin: 0 0 14px;
    color: #7B1A1A;
    font-size: 20px;
}

/* ============================================================
   COLLEGE CAROUSEL
   ============================================================ */
.college-section {
    margin-bottom: 24px;
}

.college-carousel-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    width: 100%;
}

.college-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 8px 8px;
    flex: 1;
    -ms-overflow-style: none;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
}

.college-carousel::-webkit-scrollbar { display: none; }

.college-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 16px;
    min-width: 140px;
    background: white;
    border-radius: 12px;
    border: 2px solid transparent;
    text-decoration: none;
    color: #2A0A0A;
    box-shadow: 0 4px 14px rgba(16,41,79,0.08);
    transition: 0.2s ease;
    flex-shrink: 0;
    scroll-snap-align: start;
}

.college-card:hover {
    border-color: var(--col-color, #A52020);
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(16,41,79,0.14);
}

.college-card-icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: white;
    /* Subtle colored ring using the college's color variable */
    box-shadow: 0 0 0 3px var(--col-color, #A52020), 0 4px 12px rgba(0,0,0,0.12);
    overflow: hidden;
    padding: 4px;
}

/* The logo image inside the card icon circle */
.college-card-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.college-card-name {
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    color: #2A0A0A;
    line-height: 1.3;
}

.carousel-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1.5px solid #d4deec;
    background: white;
    color: #7B1A1A;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.10);
    cursor: pointer;
    z-index: 2;
    transition: all 0.18s;
}

.carousel-btn:hover {
    background: #D4821E;
    color: white;
    border-color: #A52020;
}

/* ============================================================
   QUICK BROWSE LINK
   ============================================================ */
.quick-browse-link {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    background: #f0f5ff;
    color: #7B1A1A;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 8px;
    transition: 0.18s ease;
}

.quick-browse-link:hover {
    background: #dce8fa;
}

/* ============================================================
   RESEARCH FILTER BAR
   ============================================================ */
.research-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-bar-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin: 0;
}

.filter-form input,
.filter-form select {
    width: auto;
    min-width: 160px;
    height: 42px;
    padding: 0 12px;
}

.filter-form button {
    height: 42px;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 6px;
    font-size: 14px;
}

.clear-filter-link {
    color: #7A5050;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
}

.research-count {
    font-size: 13px;
    color: #7A5050;
    white-space: nowrap;
}

/* ============================================================
   TABLE-STYLE RESEARCH VIEWER
   ============================================================ */
.research-table-panel {
    padding: 0;
    overflow: hidden;
}

.research-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
    border-bottom: 1px solid #e6edf7;
    background: #ffffff;
}

.research-table-header h2 {
    margin: 0 0 4px;
    color: #003A78;
}

.research-table-header p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.research-table-count {
    background: #eef5ff;
    color: #0b58b5;
    border: 1px solid #cfe0f7;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.research-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.research-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
    background: #ffffff;
}

.research-table th {
    text-align: left;
    padding: 13px 24px;
    background: #f6f9fd;
    color: #475569;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1px solid #e6edf7;
}

.research-table td {
    padding: 17px 24px;
    border-bottom: 1px solid #edf2f8;
    vertical-align: middle;
    color: #243449;
    font-size: 14px;
}

.research-table tbody tr:hover,
.research-row-focus {
    background: #f8fbff;
}

.research-table td:first-child {
    width: 52%;
}

.research-table td:nth-child(2) {
    width: 34%;
    color: #536579;
}

.research-table td:last-child {
    width: 120px;
    text-align: right;
}

.research-table strong {
    display: block;
    margin-top: 7px;
    color: #071a38;
    font-size: 15px;
    line-height: 1.35;
}

.research-table small {
    display: block;
    margin-top: 5px;
    color: #7b8ba0;
    font-size: 12px;
}

.research-dept-pill {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 5px 9px;
    background: #fff6e9;
    color: #7B1A1A;
    border: 1px solid #f1d8b7;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.table-view-btn {
    width: auto;
    min-width: 76px;
    min-height: 36px;
    padding: 0 16px;
    border-radius: 6px;
    background: #F69D39;
    color: #ffffff;
    border: none;
    font-weight: 800;
    cursor: pointer;
}

.table-view-btn:hover {
    background: #D4821E;
}

.compact-empty {
    margin: 0;
    border: none;
    background: transparent;
}

@media (max-width: 760px) {
    .research-table-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .research-table {
        min-width: 680px;
    }
}

/* ============================================================
   BOOK GRID
   ============================================================ */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

.book-card {
    display: flex;
    flex-direction: column;
    background: transparent;
}

.book-cover {
    display: flex;
    border-radius: 4px 10px 10px 4px;
    box-shadow: -6px 6px 18px rgba(16,41,79,0.18), 0 4px 10px rgba(16,41,79,0.08);
    overflow: hidden;
    min-height: 300px;   /* was 240px — taller card so title fits */
    background: white;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.book-card:hover .book-cover {
    transform: rotate(-1deg) scale(1.02);
    box-shadow: -8px 10px 28px rgba(16,41,79,0.24);
}

.book-spine {
    width: 16px;         /* was 14px — slightly wider spine */
    flex-shrink: 0;
    background: #F69D39;
    border-radius: 4px 0 0 4px;
}

.book-front {
    flex: 1;
    padding: 18px 16px;  /* more padding */
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: linear-gradient(160deg, #FFF8EE 70%, #FFF8EE);
    border-left: 1px solid #E8C9A0;
}

.book-cover-dept {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    color: #A52020;
    letter-spacing: 0.5px;
    line-height: 1.3;
    word-break: break-word;  /* prevent dept name overflow */
}

.book-cover-title {
    margin: 0;
    font-size: 14px;     /* was 13px */
    color: #7B1A1A;
    line-height: 1.45;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 6;   /* was 5 — show one more line */
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 700;
}

.book-cover-author {
    margin: 0;
    font-size: 12px;     /* was 11px */
    color: #7A5050;
    display: -webkit-box;
    -webkit-line-clamp: 2;   /* allow 2 lines for long author lists */
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    white-space: normal; /* was nowrap — allow wrapping */
}

.book-cover-year {
    font-size: 11px;     /* was 10px */
    color: #99aabb;
    margin-top: auto;
    font-weight: 600;
}

.book-open-btn {
    margin-top: 10px;
    height: 38px;
    min-height: 38px;
    background: #F69D39;
    color: white;
    border: 0;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
}

.book-open-btn:hover {
    background: #6B1515;
}

/* ============================================================
   BOOK READER MODAL
   ============================================================ */
.book-reader-modal {
    padding: 0;
    border: 0;
    border-radius: 16px;
    width: min(960px, calc(100vw - 24px));
    max-height: min(720px, calc(100vh - 32px));
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(8,25,52,0.42), 0 8px 24px rgba(8,25,52,0.18);
}

.book-reader-modal::backdrop {
    background: rgba(6,18,40,0.72);
    backdrop-filter: blur(3px);
}

.book-reader-modal.book-reader-open {
    animation: bookOpen 0.3s cubic-bezier(.34,1.36,.64,1) both;
}

@keyframes bookOpen {
    from { opacity: 0; transform: scale(0.92) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Two-column layout: narrow left cover, wider right content */
.book-reader {
    display: grid;
    grid-template-columns: 260px 1fr;
    height: min(720px, calc(100vh - 32px));
}

/* ── LEFT: Book cover panel ───────────────────────────────────────────────── */
.book-reader-left {
    background: linear-gradient(170deg, #0a2d5e 0%, #8B1A1A 55%, #0a6699 100%);
    padding: 40px 28px 36px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

/* Top decorative circle */
.book-reader-left::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    pointer-events: none;
}

/* Bottom decorative circle */
.book-reader-left::after {
    content: '';
    position: absolute;
    bottom: -40px; left: -40px;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    pointer-events: none;
}

/* Book icon top */
.book-reader-icon {
    font-size: 32px;
    opacity: 0.55;
    position: relative;
    z-index: 1;
    color: #ffffff;
}

.book-reader-icon svg {
    width: 72px;
    height: 72px;
    display: block;
}

.book-reader-cover-inner {
    position: relative;
    z-index: 1;
}

.book-reader-dept {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    color: #7ecfb3;
    letter-spacing: 1.2px;
    margin-bottom: 12px;
    line-height: 1.4;
    word-break: break-word;
}

.book-reader-title {
    margin: 0 0 16px;
    font-size: 17px;
    color: #ffffff;
    line-height: 1.45;
    font-weight: 700;
}

.book-reader-author {
    margin: 0 0 8px;
    font-size: 12px;
    color: #a8d0f0;
    line-height: 1.55;
}

.book-reader-year {
    margin: 0;
    font-size: 11px;
    color: #6a9fd4;
    font-weight: 600;
}

/* Thin spine shadow on right edge of left panel */
.book-reader-spine {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 6px;
    background: linear-gradient(to right, rgba(0,0,0,0.22), rgba(0,0,0,0.06));
}

/* ── RIGHT: Scrollable content panel ─────────────────────────────────────── */
.book-reader-right {
    background: #ffffff;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    position: relative;
    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #d0ddf0 transparent;
}

.book-reader-right::-webkit-scrollbar { width: 5px; }
.book-reader-right::-webkit-scrollbar-track { background: transparent; }
.book-reader-right::-webkit-scrollbar-thumb { background: #d0ddf0; border-radius: 4px; }

/* Close button */
.book-reader-close {
    position: sticky;
    top: 0;
    z-index: 10;
    align-self: flex-end;
    margin: 14px 14px 0 0;
    width: 32px;
    height: 32px;
    min-height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f0f4fb;
    color: #7B1A1A;
    font-size: 13px;
    border: 0;
    cursor: pointer;
    transition: background 0.14s;
    flex-shrink: 0;
}

.book-reader-close:hover { background: #dce8fa; }

/* Inner content padding */
.book-reader-content {
    padding: 20px 36px 40px;
    flex: 1;
}

/* Section label (ABSTRACT, KEYWORDS) */
.book-reader-label {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #A52020;
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.book-reader-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0eaf6;
}

/* Abstract text — larger, better line height, readable */
.book-reader-abstract {
    font-size: 15px;
    color: #1e2d40;
    line-height: 2.0;
    margin: 0 0 20px;
    text-align: justify;
    text-justify: inter-word;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    cursor: default;
    word-spacing: 0.03em;
}

/* Keywords chips container */
.book-reader-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}

.keyword-chip {
    display: inline-block;
    padding: 6px 15px;
    border-radius: 20px;
    background: #FFF8EE;
    color: #7B1A1A;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #cfe0f5;
    transition: background 0.12s;
}

.keyword-chip:hover { background: #d8eafc; }

/* Meta grid — 2 columns */
.book-reader-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 28px;
    padding: 24px;
    background: #f8fafd;
    border: 1px solid #e6edf7;
    border-radius: 12px;
    margin-bottom: 24px;
}

.book-reader-meta div {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.book-reader-meta span {
    font-size: 10px;
    color: #8fa8c8;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.book-reader-meta strong {
    font-size: 14px;
    color: #2A0A0A;
    font-weight: 600;
    word-break: break-word;
    line-height: 1.45;
}

/* Action buttons row */
.reader-actions {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
    vertical-align: middle;
}

.reader-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 8px;
    border: 1.5px solid #E8C9A0;
    background: white;
    color: #7B1A1A;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.14s, border-color 0.14s;
}

.reader-action-btn:hover {
    background: #FFF8EE;
    border-color: #A52020;
}

/* Admin delete button */
.reader-delete-form {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin: 0;
    padding: 0;
    border: none;
}

.reader-delete-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border: 1.5px solid #c0392b;
    border-radius: 8px;
    background: #e74c3c;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.16s, color 0.16s;
}

.reader-delete-btn:hover {
    background: #c0392b;
    color: white;
}

/* Admin delete button inside book reader */
.reader-delete-form {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin: 0;
    padding: 0;
    border: none;
}

.reader-delete-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border: 1.5px solid #c0392b;
    border-radius: 8px;
    background: #e74c3c;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease;
}

.reader-delete-btn:hover {
    background: #c0392b;
    color: #ffffff;
}

/* ============================================================
   FORM REQUIRED INDICATOR
   ============================================================ */
.req {
    color: #d83b3b;
    font-size: 14px;
}

/* ============================================================
   ALERT BOXES
   ============================================================ */
.alert-box {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-weight: bold;
}

.alert-box.success {
    background: #d4f0e4;
    color: #1a6b42;
    border-left: 4px solid #8B6914;
}

.alert-box.error {
    background: #fce4e4;
    color: #8a1a1a;
    border-left: 4px solid #d83b3b;
}

/* ─── Bigger Dashboard Stat Cards ────────────────────────────────────────────
   Increased padding and font size so the numbers stand out more at a glance.
   ─────────────────────────────────────────────────────────────────────────── */

.card {
    padding: 28px 24px;         /* was 20px — more breathing room */
    border-left: 6px solid #A52020;
}

.card strong {
    font-size: 42px;            /* was 32px — bigger number */
    line-height: 1;
    margin-bottom: 6px;
}

.card span {
    font-size: 14px;
    color: #7A5050;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ─── Activity Logs — Filter Buttons ─────────────────────────────────────────
   Pill-shaped buttons at the top of the Activity Logs panel for quick filtering.
   ─────────────────────────────────────────────────────────────────────────── */

.log-filter-btn {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #E8C9A0;
    background: #f3f6fb;
    color: #7B1A1A;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}

.log-filter-btn:hover {
    background: #e0eaf8;
    border-color: #A52020;
}

.log-filter-btn.active {
    background: #D4821E;
    border-color: #A52020;
    color: white;
}

/* ─── Activity Logs — Table ───────────────────────────────────────────────────
   Full-width table that lists every logged action with date, description,
   and who performed it.
   ─────────────────────────────────────────────────────────────────────────── */

.log-table-wrap {
    overflow-x: auto;           /* horizontal scroll on small screens */
    border-radius: 8px;
    border: 1px solid #e6edf7;
}

.log-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.log-table thead {
    background: #f3f6fb;
}

.log-table th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 700;
    color: #7B1A1A;
    border-bottom: 1px solid #e6edf7;
    white-space: nowrap;
}

.log-table td {
    padding: 11px 14px;
    border-bottom: 1px solid #f0f4f9;
    vertical-align: middle;
    color: #2A0A0A;
}

.log-table tbody tr:last-child td {
    border-bottom: none;
}

.log-table tbody tr:hover {
    background: #FFF8EE;
}

/* ─── Activity Log — Action Badge ────────────────────────────────────────────
   Small colored badge showing the action type (e.g. "Research Posted").
   Color is set inline by the blade template based on action type.
   ─────────────────────────────────────────────────────────────────────────── */

.log-action-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

/* User Management */
.user-management-summary {
    margin-bottom: 18px;
}

.user-management-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.user-management-heading h2 {
    margin-bottom: 6px;
}

.muted-text {
    margin: 0;
    color: #7A5050;
    line-height: 1.5;
}

.user-management-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #eef5ff;
    color: #A52020;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.user-account-list {
    display: grid;
    gap: 14px;
}

.user-account-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 16px;
    align-items: center;
    padding: 16px;
    border: 1px solid #d9e3f2;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(9, 38, 80, 0.04);
}

.user-account-main {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}

.user-avatar-small {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #C9982A;
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
    box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.18);
}

.user-account-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.user-account-title h3 {
    margin: 0;
    color: #1C0A0A;
}

.user-account-main p {
    margin: 5px 0 10px;
    color: #7A5050;
}

.user-account-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.user-account-meta span {
    padding: 5px 9px;
    border: 1px solid #d9e3f2;
    border-radius: 999px;
    background: #f7fbff;
    color: #4A1010;
    font-size: 12px;
    font-weight: 700;
}

.user-delete-form {
    display: grid;
    gap: 8px;
    padding: 12px;
    border-radius: 8px;
    background: #fff7f7;
    border: 1px solid #f3c9c9;
}

.user-delete-form label {
    font-size: 13px;
    font-weight: 700;
    color: #8a1a1a;
}

.user-delete-form select {
    width: 100%;
}

.user-delete-form button {
    width: 100%;
    background: #e74c3c;
    color: #fff;
    border: none;
    cursor: pointer;
}
.user-delete-form button:hover {
    background: #c0392b;
}

@media (max-width: 900px) {
    .user-management-heading,
    .user-account-card {
        grid-template-columns: 1fr;
    }

    .user-management-heading {
        display: grid;
    }
}


/* Responsive Dashboard Cards */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.card {
    background: #ffffff;
    padding: 24px;
    border-radius: 18px;
    min-height: 130px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(11, 59, 120, 0.08);
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
}

.card strong {
    font-size: 2rem;
    color: #7B1A1A;
    margin-bottom: 8px;
}

.card span {
    font-size: 0.95rem;
    color: #7A5050;
}

/* Live Search */
.live-search-wrap {
    position: relative;
    z-index: 99999;
    width: min(100%, 360px);
}

.live-search-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #d4dceb;
    background: #fff;
}

.live-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    overflow: hidden;
    z-index: 999999;
    display: none;
}

.search-result-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    text-decoration: none;
    border-bottom: 1px solid #edf2f7;
    color: #2A0A0A;
}

.search-result-item:hover {
    background: #f4f8ff;
}

.search-result-item strong {
    font-size: 0.95rem;
}

.search-result-item span {
    font-size: 0.82rem;
    color: #7A5050;
}

.search-empty {
    padding: 14px;
    font-size: 0.9rem;
    color: #7A5050;
}

@media (max-width: 768px) {
    .cards {
        grid-template-columns: 1fr;
    }

    .card {
        min-height: 110px;
        padding: 20px;
    }

    .card strong {
        font-size: 1.7rem;
    }

    .live-search-wrap {
    position: relative;
    z-index: 99998;
        width: 100%;
    }
}


/* LANDING BOOK PREVIEW - LOGIN REQUIRED START */

.landing-login-required {
    position: relative;
    cursor: pointer;
}

.landing-login-toast {
    position: absolute;
    left: 42px;
    right: 42px;
    bottom: 34px;
    padding: 13px 16px;
    border-radius: 8px;
    background: #1C0A0A;
    color: #ffffff;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 16px 34px rgba(7, 25, 54, 0.22);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.landing-login-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* LANDING BOOK PREVIEW - LOGIN REQUIRED END */




/* DASHBOARD COLLEGES CENTERED - STUDENT AND FACULTY START */

.center-heading {
    text-align: center;
}

.centered-colleges {
    justify-content: center;
}

.centered-colleges .college-carousel {
    flex: 1;
    justify-content: flex-start;
    max-width: 100%;
}

.centered-colleges .college-card {
    min-width: 145px;
}

@media (max-width: 900px) {
    .centered-colleges .college-carousel {
        justify-content: flex-start;
        flex: 1;
    }
}

/* DASHBOARD COLLEGES CENTERED - STUDENT AND FACULTY END */
/* ── Sidebar profile photo avatar ── */
.profile-mini-avatar-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.25);
  background: #F69D39;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-mini-avatar-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* crop modal removed — avatar is now static, non-editable */

.crop-canvas-wrap {
  width: 100%;
  margin: 0 auto 8px;
  position: relative;
  max-width: 260px;
  display: block;
  background: #f0f5ff;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #A52020;
  aspect-ratio: 1;
  cursor: grab;
  user-select: none;
}

.crop-canvas-wrap:active {
  cursor: grabbing;
}

.crop-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* "Drag to reposition" hint text below the canvas circle */
.crop-drag-hint {
  text-align: center;
  font-size: 12px;
  color: #7A5050;
  margin: 6px 0 12px;
  font-style: italic;
}

.crop-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.crop-controls label {
  font-size: 12px;
  font-weight: bold;
  color: #7A5050;
  margin-bottom: 3px;
  display: block;
}

.crop-controls input[type=range] {
  width: 100%;
  height: 4px;
  accent-color: #A52020;
}

.crop-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.crop-cancel-btn {
  height: 40px;
  padding: 0 18px;
  border-radius: 7px;
  border: 1.5px solid #E8C9A0;
  background: white;
  color: #7A5050;
  font-weight: bold;
  font-size: 13px;
  cursor: pointer;
}

.crop-save-btn {
  height: 40px;
  padding: 0 22px;
  border-radius: 7px;
  background: #D4821E;
  color: white;
  border: none;
  font-weight: bold;
  font-size: 13px;
  cursor: pointer;
}

.crop-save-btn:hover { background: #6B1515; }

/* ─── Landing Page Highlight Customizer ──────────────────────────────────────
   Admin settings panel for picking which research papers appear on the
   landing page slideshow.
   ─────────────────────────────────────────────────────────────────────────── */

/* Two-column layout: left = picker list, right = selected + save */


/* Scrollable list of all approved research records */


/* Each row in the picker */
















/* Right panel — selected list + save button */




/* Each selected item card */


/* Responsive: stack on smaller screens */
@media (max-width: 860px) {
    
    
}

/* ─── Landing Page Live Search ───────────────────────────────────────────────
   Search bar on the left panel of the login page.
   Searches approved research titles in real-time via /api/research-search.
   ─────────────────────────────────────────────────────────────────────────── */

/* Wrapper for the search bar + results dropdown */
.lp-search-wrap {
    position: relative;
    margin-bottom: 18px;
}

/* The search input row */
.lp-search-box {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.12);
    border: 1.5px solid rgba(255,255,255,0.22);
    border-radius: 10px;
    padding: 0 14px;
    gap: 10px;
    transition: background 0.18s, border-color 0.18s;
    backdrop-filter: blur(8px);
}

.lp-search-box:focus-within {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.45);
}

/* Magnifying glass icon inside the box */
.lp-search-icon {
    width: 18px;
    height: 18px;
    color: rgba(255,255,255,0.6);
    flex-shrink: 0;
}

/* The text input */
.lp-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 14px;
    padding: 13px 0;
    font-family: Arial, sans-serif;
}

.lp-search-input::placeholder {
    color: rgba(255,255,255,0.45);
}

/* Clear (✕) button */
.lp-search-clear {
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: color 0.15s;
    flex-shrink: 0;
}
.lp-search-clear:hover { color: white; }

/* Dropdown results panel */
.lp-search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: rgba(20,5,5,0.97);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 10px;
    overflow: hidden;
    z-index: 50;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
    max-height: 240px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(200,160,0,0.3) transparent;
}

/* Each result row */
.lp-result-item {
    padding: 11px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: background 0.12s;
}
.lp-result-item:last-child { border-bottom: none; }
.lp-result-item:hover { background: rgba(200,160,0,0.12); }

.lp-result-title {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.35;
    margin-bottom: 3px;
}

.lp-result-meta {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    font-weight: 600;
}

/* Loading and empty states */
.lp-result-loading,
.lp-result-empty {
    padding: 14px 16px;
    font-size: 13px;
    color: rgba(255,255,255,0.45);
    text-align: center;
}

/* Login-required notice — shown when user clicks a result */
.lp-login-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    background: rgba(200,160,0,0.12);
    border: 1px solid rgba(200,160,0,0.3);
    color: rgba(255,255,255,0.9);
    font-size: 13px;
    margin-bottom: 16px;
    animation: fadeInNotice 0.3s ease;
}
.lp-login-notice svg {
    width: 16px; height: 16px;
    flex-shrink: 0;
    stroke: rgba(200,160,0,0.8);
}
@keyframes fadeInNotice {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Featured Research Highlights ──────────────────────────────────────────
   Slideshow of featured research below the search bar.
   ─────────────────────────────────────────────────────────────────────────── */

.lp-highlights {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.lp-highlights-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(200,160,0,0.8);
    margin-bottom: 10px;
}

.lp-slide {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 16px 18px;
    backdrop-filter: blur(4px);
}

.lp-slide-dept {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: rgba(200,160,0,0.9);
    margin-bottom: 8px;
}

.lp-slide-title {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lp-slide-meta {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    font-weight: 600;
}

/* ── Modal-level X close button (top-right of dialog) ── */
.book-reader-modal {
    position: relative;
}

.book-reader-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 100;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    color: #7B1A1A;
    border: 1.5px solid #e0d0d0;
    cursor: pointer;
    transition: background 0.14s, box-shadow 0.14s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    flex-shrink: 0;
}

.book-reader-modal-close:hover {
    background: #fff0f0;
    box-shadow: 0 3px 12px rgba(0,0,0,0.15);
}

/* ── Table action cell — center-align the View button ── */
.research-table td:last-child {
    text-align: center;
    vertical-align: middle;
}

/* ── Copy Abstract button ── */
.copy-abstract-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    margin: 6px 0 14px;
    border-radius: 6px;
    background: #f3f7ff;
    color: #0b58b5;
    border: 1.5px solid #c8dbf8;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.14s, border-color 0.14s;
}

.copy-abstract-btn:hover {
    background: #e4edfc;
    border-color: #0b58b5;
}

/* ── Download button (green accent) ── */
.reader-download-btn {
    background: #f0faf5;
    color: #15803d;
    border-color: #a7d7be;
}

.reader-download-btn:hover {
    background: #e0f5ea;
    border-color: #15803d;
}

/* ══════════════════════════════════════════════════════
   DASHBOARD SEARCH + RESULTS
   ══════════════════════════════════════════════════════ */

/* College card as button (same look, no <a> link) */
button.college-card,
button.dash-college-btn {
    background: white;
    border: 2px solid transparent;
    cursor: pointer;
    font-family: inherit;
    transition: 0.2s ease;
}

button.dash-college-btn.active {
    border-color: var(--col-color, #A52020);
    background: color-mix(in srgb, var(--col-color, #A52020) 8%, white);
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(16,41,79,0.14);
}

/* Search bar */
.dash-search-wrap {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.dash-search-inner {
    position: relative;
    width: 100%;
    max-width: 560px;
    display: flex;
    align-items: center;
}

.dash-search-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: #9aabb8;
    pointer-events: none;
    flex-shrink: 0;
}

.dash-search-input {
    width: 100%;
    height: 48px;
    padding: 0 44px 0 44px;
    border: 1.5px solid #d4dceb;
    border-radius: 14px;
    font-size: 14px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: border-color 0.18s, box-shadow 0.18s;
}

.dash-search-input:focus {
    outline: none;
    border-color: #A52020;
    box-shadow: 0 0 0 3px rgba(165,32,32,0.10);
}

.dash-search-clear {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: #9aabb8;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}

.dash-search-clear:hover { color: #A52020; }

/* Results panel */
.dash-results-panel {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-top: 4px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.07);
}

.dash-results-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.dash-results-title {
    margin: 0 0 4px;
    font-size: 17px;
    color: #7B1A1A;
}

.dash-results-meta {
    margin: 0;
    font-size: 13px;
    color: #7A5050;
}

.dash-results-close {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border: 1.5px solid #e0cccc;
    border-radius: 8px;
    background: white;
    color: #7A5050;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}

.dash-results-close:hover {
    background: #fff0f0;
    color: #A52020;
    border-color: #A52020;
}

/* Results grid */
.dash-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.dash-result-card {
    padding: 18px 20px;
    border: 1.5px solid #EDD9B8;
    border-radius: 12px;
    background: #FFFAF3;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-color 0.15s, box-shadow 0.15s;
    /* Equal height — button always at bottom */
    min-height: 180px;
}

.dash-result-card:hover {
    border-color: #A52020;
    box-shadow: 0 4px 14px rgba(165,32,32,0.08);
}

.dash-result-dept {
    display: inline-block;
    padding: 3px 9px;
    background: #fff6e9;
    color: #7B1A1A;
    border: 1px solid #f1d8b7;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    align-self: flex-start;
}

.dash-result-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #1C0505;
    line-height: 1.35;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dash-result-authors {
    margin: 0;
    font-size: 12px;
    color: #5a6a80;
    line-height: 1.4;
}

.dash-result-year {
    margin: 0;
    font-size: 11px;
    color: #9aabb8;
    font-weight: 600;
}

.dash-result-btn {
    margin-top: auto;
    padding-top: 10px;
    display: block;
    width: 100%;
    text-align: center;
    padding: 9px 12px;
    background: #D4821E;
    color: white;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
    margin-top: auto;
}

.dash-result-btn:hover { background: #F69D39; }

.dash-results-empty {
    text-align: center;
    padding: 32px;
    color: #9aabb8;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .dash-search-input { font-size: 13px; }
    .dash-results-grid { grid-template-columns: 1fr; }
}

/* ══ Faculty Submit Form Enhancements ══════════════════════ */

/* Upload type toggle */
.upload-type-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}
.upload-type-btn {
    padding: 9px 20px;
    border-radius: 8px;
    border: 1.5px solid #EDD9B8;
    background: #FFF8EE;
    color: #7A5050;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
}
.upload-type-btn.active {
    background: #F69D39;
    color: #fff;
    border-color: #7B1A1A;
}
.upload-type-btn:not(.active):hover {
    border-color: #C9982A;
    color: #5A1010;
}
.upload-type-hint {
    font-size: 12px;
    color: #8B5050;
    margin-bottom: 20px;
    padding: 8px 12px;
    background: #FFF8EE;
    border-left: 3px solid #C9982A;
    border-radius: 0 6px 6px 0;
}

/* Field hints */
.field-hint {
    font-size: 11px;
    color: #9B7070;
    margin-top: 4px;
    margin-bottom: 4px;
    line-height: 1.5;
}
#duplicateWarning {
    background: #FFF3CD;
    border: 1px solid #E8B84B;
    color: #7A5000;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 6px;
}

/* Optional badge */
.upload-optional-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #A5D6A7;
    border-radius: 20px;
    padding: 1px 8px;
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* File upload box wrapper */
.file-upload-box {
    margin-top: 8px;
    border-radius: 10px;
    overflow: hidden;
}

/* File upload area */
.file-upload-area {
    border: 2px dashed #EDD9B8;
    border-radius: 10px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: #FFF8EE;
}
.file-upload-area:hover {
    border-color: #C9982A;
    background: #FFF3D4;
}
.file-upload-area svg {
    stroke: #C9982A;
    margin-bottom: 10px;
}
.file-upload-label {
    font-size: 14px;
    font-weight: 600;
    color: #5A2020;
    margin-bottom: 4px;
}
.file-upload-hint {
    font-size: 12px;
    color: #9B7070;
}
.file-selected {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #F0FFF4;
    border: 1.5px solid #A5D6A7;
    border-radius: 10px;
}
.file-selected svg { stroke: #2E7D32; flex-shrink: 0; }
.file-selected span { flex: 1; font-size: 13px; font-weight: 600; color: #1B5E20; word-break: break-all; }
.file-clear-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #C62828;
    font-size: 16px;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.15s;
    flex-shrink: 0;
}
.file-clear-btn:hover { background: #FFEBEE; }

/* Manual encode info box */
.manual-encode-info {
    background: #EEF2FF;
    border: 1.5px solid #C5CAE9;
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 13px;
    color: #3949AB;
    line-height: 1.6;
    margin-bottom: 8px;
}

/* ── Open-from-dashboard single record notice ── */
.open-record-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #FFF8EE;
    border: 1.5px solid #C9982A;
    border-radius: 10px;
    padding: 10px 18px;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 600;
    color: #7A5000;
    gap: 12px;
}
.open-record-clear {
    font-size: 12px;
    color: #A52020;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid #A52020;
    border-radius: 6px;
    padding: 3px 10px;
    transition: background 0.15s;
}
.open-record-clear:hover {
    background: #D4821E;
    color: white;
}

/* ── Row highlight when opened from dashboard ── */
.research-row-active {
    background: #FFF3CC !important;
    outline: 2px solid #C9982A;
    outline-offset: -2px;
    animation: rowPulse 0.5s ease;
}
@keyframes rowPulse {
    0%   { background: rgba(201,152,42,0.30) !important; }
    100% { background: #FFF3CC !important; }
}


/* ── Faculty submit form ── */
.upload-type-toggle { display:flex; gap:10px; margin-bottom:8px; }
.upload-type-btn { padding:9px 20px; border-radius:8px; border:1.5px solid #EDD9B8; background:#FFF8EE; color:#7A5050; font-family:inherit; font-size:13px; font-weight:600; cursor:pointer; transition:all 0.18s; }
.upload-type-btn.active { background:#7B1A1A; color:#fff; border-color:#7B1A1A; }
.upload-type-hint { font-size:12px; color:#8B5050; margin-bottom:20px; padding:8px 12px; background:#FFF8EE; border-left:3px solid #C9982A; border-radius:0 6px 6px 0; }
.field-hint { font-size:11px; color:#9B7070; margin-top:4px; margin-bottom:4px; line-height:1.5; }
#duplicateWarning { background:#FFF3CD; border:1px solid #E8B84B; color:#7A5000; padding:10px 14px; border-radius:8px; font-size:13px; margin-top:6px; }
.upload-optional-badge { display:inline-block; font-size:10px; font-weight:700; background:#E8F5E9; color:#2E7D32; border:1px solid #A5D6A7; border-radius:20px; padding:1px 8px; margin-left:6px; vertical-align:middle; letter-spacing:0.5px; text-transform:uppercase; }
.file-upload-area { border:2px dashed #EDD9B8; border-radius:10px; padding:28px 20px; text-align:center; cursor:pointer; transition:border-color 0.2s,background 0.2s; background:#FFF8EE; }
.file-upload-area:hover { border-color:#C9982A; background:#FFF3D4; }
.file-upload-area svg { stroke:#C9982A; margin-bottom:10px; }
.file-upload-label { font-size:14px; font-weight:600; color:#5A2020; margin-bottom:4px; }
.file-upload-hint { font-size:12px; color:#9B7070; }
.file-selected { display:flex; align-items:center; gap:10px; padding:12px 16px; background:#F0FFF4; border:1.5px solid #A5D6A7; border-radius:10px; }
.file-selected svg { stroke:#2E7D32; flex-shrink:0; }
.file-selected span { flex:1; font-size:13px; font-weight:600; color:#1B5E20; word-break:break-all; }
.file-clear-btn { background:none; border:none; cursor:pointer; color:#C62828; font-size:16px; line-height:1; padding:2px 6px; border-radius:4px; transition:background 0.15s; flex-shrink:0; }
.file-clear-btn:hover { background:#FFEBEE; }




/* Matches the Filter button color exactly: #A52020       */
.btn-add-research {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 42px;
  padding: 0 18px;
  background: #D4821E;
  color: #fff;
  border-radius: 6px;
  font-size: 14px;
  font-weight: bold;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: opacity 0.15s;
  flex-shrink: 0;
  border: 0;
}
.btn-add-research:hover {
  opacity: 0.88;
  color: #fff;
}



/* dash-dept-filter-wrap removed — replaced by dash-filter-bar */

/* ── Research Items — Program select (cascading) ───────────────────── */
#programSelect {
    min-width: 220px;
    max-width: 320px;
}


/* ── Dashboard Filter Bar (left-aligned, inline row) ───────────────── */
.dash-filter-section {
    margin-bottom: 24px;
}

.dash-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Search box */
.dash-filter-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 0 12px;
    flex: 1;
    min-width: 200px;
    max-width: 340px;
    height: 44px;
    transition: border-color 0.16s, box-shadow 0.16s;
}

.dash-filter-search:focus-within {
    border-color: #F69D39;
    box-shadow: 0 0 0 3px rgba(246,157,57,0.13);
}

.dash-filter-search svg {
    width: 16px; height: 16px;
    color: #94a3b8;
    flex-shrink: 0;
}

.dash-filter-search .dash-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: #1e2d40;
}

.dash-filter-search .dash-search-clear {
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 0;
    display: flex;
    align-items: center;
}

/* Department / Course select wrapper */
.dash-filter-select-wrap {
    position: relative;
}

.dash-filter-select {
    height: 44px;
    padding: 0 36px 0 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    color: #1e2d40;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color 0.16s, box-shadow 0.16s;
    min-width: 200px;
}

.dash-filter-select:focus {
    outline: none;
    border-color: #F69D39;
    box-shadow: 0 0 0 3px rgba(246,157,57,0.13);
}

/* dash-result-program label */
.dash-result-program {
    font-size: 11px;
    color: #64748b;
    margin: 2px 0 0;
}



/* ══════════════════════════════════════════════════════════════════
   BROWSE RESEARCH — SCRIBD-STYLE MEGA DROPDOWN
   ══════════════════════════════════════════════════════════════════ */

/* Wrapper */
.browse-research-wrap {
    position: relative;
}

/* Trigger button */
.browse-research-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 15px;
    background: #7B1A1A;
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    border: none;
    user-select: none;
    white-space: nowrap;
    transition: background 0.15s, box-shadow 0.15s;
}

.browse-research-btn:hover,
.browse-research-wrap.browse-open .browse-research-btn {
    background: #A52020;
    box-shadow: 0 2px 10px rgba(123,26,26,0.22);
}

.browse-chevron {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.browse-research-wrap.browse-open .browse-chevron {
    transform: rotate(180deg);
}

/* ── Mega panel (Scribd-style) ────────────────────────────── */
.browse-mega-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 640px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.14);
    z-index: 9999;
    overflow: hidden;
    animation: megaFadeIn 0.18s ease;
}

.browse-mega-panel[hidden] {
    display: none;
}

@keyframes megaFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Inner grid: 2 columns */
.browse-mega-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 20px 24px 22px;
    max-height: 480px;
    overflow-y: auto;
}

.browse-mega-inner::-webkit-scrollbar { width: 4px; }
.browse-mega-inner::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 99px; }

/* Each dept column */
.browse-dept-col {
    padding: 0 12px 18px 0;
}

.browse-dept-col:nth-child(even) {
    padding-left: 24px;
    border-left: 1px solid #f1f5f9;
}

/* Department heading button (clickable) */
.browse-dept-head {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    margin-bottom: 8px;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

.browse-dept-head:hover {
    text-decoration: none;
}

.browse-dept-head > svg {
    flex-shrink: 0;
    color: #94a3b8;
    transition: color 0.15s, transform 0.15s;
}

.browse-dept-head:hover > svg {
    color: #A52020;
    transform: translateX(2px);
}

/* Department name text */
.browse-dept-head span,
.browse-dept-head {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.4;
    transition: color 0.13s;
}

.browse-dept-head:hover,
.browse-dept-head:hover span {
    color: #A52020;
}

/* Course items under each dept */
.browse-course-item {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    background: none;
    border: none;
    padding: 4px 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    color: #4b5563;
    text-align: left;
    transition: color 0.13s;
    line-height: 1.4;
}

.browse-course-item > svg {
    flex-shrink: 0;
    color: #d1d5db;
    transition: color 0.13s, transform 0.13s;
    opacity: 0;
}

.browse-course-item:hover {
    color: #A52020;
}

.browse-course-item:hover > svg {
    color: #A52020;
    transform: translateX(2px);
    opacity: 1;
}

.browse-empty-msg {
    grid-column: 1 / -1;
    padding: 24px;
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
}

/* Mobile: single column */
@media (max-width: 640px) {
    .browse-mega-panel {
        width: calc(100vw - 16px);
        right: -8px;
    }
    .browse-mega-inner {
        grid-template-columns: 1fr;
        padding: 16px;
    }
    .browse-dept-col:nth-child(even) {
        padding-left: 0;
        border-left: none;
        border-top: 1px solid #f1f5f9;
        padding-top: 14px;
    }
}


/* ── Topbar search (inline in topbar-actions) ─────────────── */
.topbar-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 0 12px;
    height: 38px;
    flex: 1;
    min-width: 160px;
    max-width: 320px;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.topbar-search-wrap:focus-within {
    border-color: #A52020;
    box-shadow: 0 0 0 3px rgba(165,32,32,0.10);
}

.topbar-search-icon {
    width: 15px;
    height: 15px;
    color: #94a3b8;
    flex-shrink: 0;
    stroke: #94a3b8;
}

.topbar-search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 13px;
    color: #1e2d40;
    min-width: 0;
}

.topbar-search-input::placeholder { color: #94a3b8; }

.topbar-search-clear {
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
    padding: 0;
    flex-shrink: 0;
    transition: color 0.15s;
}

.topbar-search-clear:hover { color: #A52020; }

@media (max-width: 600px) {
    .topbar-search-wrap {
        min-width: 0;
        max-width: 140px;
    }
}


/* ══════════════════════════════════════════════════════════════════
   COMPACT WELCOME PANEL
   ══════════════════════════════════════════════════════════════════ */

.welcome-panel.welcome-panel-compact {
    padding: 10px 18px;
    margin-bottom: 16px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #f1f5f9;
    min-height: unset;
}

.welcome-compact-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.badge-sm {
    font-size: 10px;
    padding: 2px 9px;
}

.welcome-compact-name {
    font-size: 14px;
    font-weight: 700;
    color: #7B1A1A;
}

.welcome-compact-sep {
    font-size: 14px;
    color: #cbd5e1;
    font-weight: 300;
}

.welcome-compact-desc {
    font-size: 13px;
    color: #64748b;
    font-weight: 400;
}


/* ══════════════════════════════════════════════════════════════════
   REDESIGNED WELCOME PANEL
   ══════════════════════════════════════════════════════════════════ */



/* ══════════════════════════════════════════════════════════════════
   WELCOME PANEL
   ══════════════════════════════════════════════════════════════════ */

.dash-welcome {
    background: #fff;
    border: 1px solid #ede8e8;
    border-radius: 10px;
    padding: 24px 28px 22px;
    margin-bottom: 22px;
}

.dash-welcome-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: #7B1A1A;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}

.dash-welcome-name {
    font-size: 24px;
    font-weight: 800;
    color: #7B1A1A;
    margin: 0 0 8px;
    line-height: 1.25;
    letter-spacing: -0.3px;
}

.dash-welcome-desc {
    font-size: 14px;
    color: #5a6473;
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 600px) {
    .dash-welcome      { padding: 18px 16px 16px; }
    .dash-welcome-name { font-size: 19px; }
    .dash-welcome-desc { font-size: 13px; }
}


/* ══════════════════════════════════════════════════════════════════
   RESEARCH LIST VIEW
   ══════════════════════════════════════════════════════════════════ */

.dash-list {
    display: flex;
    flex-direction: column;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.dash-list-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 18px;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
    transition: background 0.14s;
    cursor: pointer;
}

.dash-list-row:last-child { border-bottom: none; }

.dash-list-row:hover { background: #fdf8f8; }
.dash-list-row:hover .dash-list-title  { color: #A52020; }
.dash-list-row:hover .dash-list-action { color: #A52020; opacity: 1; }

.dash-list-num {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dash-list-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dash-list-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e2d40;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.14s;
}

.dash-list-authors {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-list-tags {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.dash-list-dept {
    font-size: 10px;
    font-weight: 600;
    background: #fdf2f2;
    color: #7B1A1A;
    border: 1px solid #f5c6c6;
    padding: 1px 7px;
    border-radius: 99px;
    white-space: nowrap;
}

.dash-list-prog {
    font-size: 10px;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 1px 7px;
    border-radius: 99px;
    white-space: nowrap;
}

.dash-list-year {
    font-size: 10px;
    color: #94a3b8;
    background: #f8fafc;
    border: 1px solid #e9ecef;
    padding: 1px 7px;
    border-radius: 99px;
    white-space: nowrap;
}

.dash-list-action {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    opacity: 0.6;
    transition: color 0.14s, opacity 0.14s;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .dash-list-row    { padding: 11px 12px; gap: 10px; }
    .dash-list-title  { font-size: 13px; }
    .dash-list-action span { display: none; }
}


/* ══════════════════════════════════════════════════════════════════
   BROWSE RESEARCH — SCRIBD-STYLE MEGA DROPDOWN
   ══════════════════════════════════════════════════════════════════ */

.browse-research-wrap { position: relative; }

.browse-research-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 15px;
    background: #7B1A1A;
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    border: none;
    user-select: none;
    white-space: nowrap;
    transition: background 0.15s, box-shadow 0.15s;
}

.browse-research-btn:hover,
.browse-research-wrap.browse-open .browse-research-btn {
    background: #A52020;
    box-shadow: 0 2px 10px rgba(123,26,26,0.22);
}

.browse-chevron { flex-shrink: 0; transition: transform 0.2s ease; }
.browse-research-wrap.browse-open .browse-chevron { transform: rotate(180deg); }

.browse-mega-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 620px;
    max-width: calc(100vw - 24px);
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.13);
    z-index: 9999;
    overflow: hidden;
    animation: megaFadeIn 0.16s ease;
}

.browse-mega-panel[hidden] { display: none; }

@keyframes megaFadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}

.browse-mega-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 20px 24px 22px;
    max-height: 460px;
    overflow-y: auto;
}

.browse-mega-inner::-webkit-scrollbar { width: 4px; }
.browse-mega-inner::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 99px; }

.browse-dept-col { padding: 0 12px 18px 0; }
.browse-dept-col:nth-child(even) { padding-left: 24px; border-left: 1px solid #f1f5f9; }

.browse-dept-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    margin-bottom: 7px;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    transition: color 0.13s;
    gap: 4px;
}

.browse-dept-head svg { flex-shrink: 0; color: #cbd5e1; transition: color 0.13s, transform 0.13s; }
.browse-dept-head:hover { color: #A52020; }
.browse-dept-head:hover svg { color: #A52020; transform: translateX(2px); }

.browse-course-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    padding: 3px 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    color: #4b5563;
    text-align: left;
    transition: color 0.13s;
    line-height: 1.4;
    gap: 4px;
}

.browse-course-item svg { flex-shrink: 0; color: #d1d5db; opacity: 0; transition: opacity 0.13s, transform 0.13s, color 0.13s; }
.browse-course-item:hover { color: #A52020; }
.browse-course-item:hover svg { color: #A52020; transform: translateX(2px); opacity: 1; }

@media (max-width: 640px) {
    .browse-mega-panel { width: calc(100vw - 16px); right: -4px; }
    .browse-mega-inner { grid-template-columns: 1fr; padding: 14px 16px; }
    .browse-dept-col:nth-child(even) { padding-left: 0; border-left: none; border-top: 1px solid #f1f5f9; padding-top: 12px; }
}


/* ── Topbar search (dashboard-only) ───────────────────────── */

.topbar-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 0 12px;
    height: 38px;
    flex: 1;
    min-width: 160px;
    max-width: 300px;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.topbar-search-wrap:focus-within {
    border-color: #A52020;
    box-shadow: 0 0 0 3px rgba(165,32,32,0.09);
}

.topbar-search-icon { width: 15px; height: 15px; flex-shrink: 0; stroke: #94a3b8; }

.topbar-search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 13px;
    color: #1e2d40;
    min-width: 0;
}

.topbar-search-input::placeholder { color: #94a3b8; }

.topbar-search-clear {
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
    padding: 0;
    flex-shrink: 0;
    transition: color 0.15s;
}

.topbar-search-clear:hover { color: #A52020; }

@media (max-width: 600px) {
    .topbar-search-wrap { min-width: 0; max-width: 130px; }
}


/* ══════════════════════════════════════════
   FORCE SIDEBAR ALWAYS EXPANDED (no more hover-based collapse)
══════════════════════════════════════════ */
.sidebar {
  width: 300px !important;
  padding: 24px !important;
}

.brand-text,
.menu-label,
.profile-mini-text,
.profile-chevron {
  opacity: 1 !important;
  transform: translateX(0) !important;
}

.quick-logout-form {
  opacity: 1 !important;
  pointer-events: auto !important;
  width: 38px !important;
  max-width: 38px !important;
}

.profile-mini {
  background: rgba(255, 255, 255, 0.06) !important;
  padding: 8px 10px !important;
}

/* ══════════════════════════════════════════
   DASHBOARD: title-only topbar + separate actions row
══════════════════════════════════════════ */
.topbar-title-only {
  margin-bottom: 16px;
}

.dash-actions-row {
  margin-bottom: 25px;
}

.dash-actions-row .topbar-actions {
  justify-content: center !important;
  width: 100%;
}

.dash-actions-row .topbar-search-wrap {
  flex: 1 1 auto;
  max-width: 750px !important;
}

/* ══════════════════════════════════════════
   BROWSE RESEARCH: accordion redesign + position fix
══════════════════════════════════════════ */
.browse-mega-panel {
  left: 0 !important;
  right: auto !important;
  width: 320px !important;
  max-width: calc(100vw - 24px) !important;
}

.browse-mega-accordion {
  display: block !important;
  padding: 10px !important;
  max-height: 420px;
}

.browse-dept-col {
  padding: 0 !important;
  border-left: none !important;
  border-bottom: 1px solid #f1f5f9;
}
.browse-dept-col:last-child { border-bottom: none; }

.browse-dept-head {
  padding: 12px 6px !important;
  margin-bottom: 0 !important;
}

.browse-dept-col .browse-dept-head svg {
  transition: transform 0.18s ease, color 0.13s;
}
.browse-dept-col.browse-dept-open .browse-dept-head svg {
  transform: rotate(90deg);
  color: #A52020;
}

.browse-course-list {
  display: none;
  flex-direction: column;
  padding: 0 6px 10px 14px;
}
.browse-dept-col.browse-dept-open .browse-course-list {
  display: flex;
}

/* ── Force dashboard title to always be visible ── */
.topbar-title-only,
.topbar-title-only p,
.topbar-title-only h1 {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  height: auto !important;
  color: initial !important;
  font-size: initial !important;
}
.topbar-title-only p {
  color: #7B1A1A !important;
  font-weight: bold !important;
}
.topbar-title-only h1 {
  color: #1C0A00 !important;
  font-size: 28px !important;
  font-weight: 900 !important;
}

/* ══════════════════════════════════════════
   ADMIN APPROVAL: table layout for pending research
══════════════════════════════════════════ */
.approval-actions-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 100px;
}
.approval-actions-table .btn-approve,
.approval-actions-table .btn-reject {
  width: 100%;
  padding: 6px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.approval-details-toggle summary {
  cursor: pointer;
  color: #7B1A1A;
  font-weight: 700;
  font-size: 13px;
  list-style: none;
  user-select: none;
}
.approval-details-toggle summary::-webkit-details-marker { display: none; }
.approval-details-toggle summary::before {
  content: "▸ ";
}
.approval-details-toggle[open] summary::before {
  content: "▾ ";
}

.approval-details-panel {
  margin-top: 8px;
  padding: 10px;
  background: #f8fafc;
  border-radius: 8px;
  max-width: 260px;
}

.approval-abstract-img-sm {
  max-width: 100%;
  max-height: 140px;
  border-radius: 6px;
  display: block;
  margin-bottom: 8px;
  object-fit: cover;
}

.approval-abstract-text-sm {
  font-size: 12px;
  color: #334155;
  line-height: 1.5;
  margin: 0 0 6px;
}

.approval-keywords-sm {
  font-size: 11px;
  color: #64748b;
  margin: 0;
}

/* ── Content offset for always-expanded sidebar (permanent) ── */
.content {
  margin-left: 300px !important;
}

/* ── Move search clear (X) button to the far right edge (permanent) ── */
.topbar-search-wrap {
  position: relative;
}
.topbar-search-input {
  padding-right: 34px !important;
}
.topbar-search-clear {
  position: absolute !important;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0 !important;
}

/* ══════════════════════════════════════════
   ADMIN APPROVAL: compact thumbnail + floating details overlay
══════════════════════════════════════════ */
.approval-details-cell {
  position: relative;
  min-width: 70px;
}

.approval-details-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 30;
  width: 240px;
  max-height: 320px;
  overflow-y: auto;
  margin-top: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  border: 1px solid #e2e8f0;
}

.approval-thumb-link {
  display: block;
  text-decoration: none;
}

.approval-abstract-img-sm {
  max-width: 70px;
  max-height: 90px;
  width: auto;
  height: auto;
  border-radius: 6px;
  display: block;
  margin: 0 0 4px;
  object-fit: cover;
  border: 1px solid #e2e8f0;
}

.approval-thumb-hint {
  display: block;
  font-size: 10px;
  color: #7B1A1A;
  font-weight: 600;
  margin-bottom: 8px;
}

/* ── Title-click toggle for approval details (replaces separate Details column) ── */
.approval-title-toggle summary.research-title-link {
  cursor: pointer;
  display: inline;
  color: #1C0A00;
  font-weight: 800;
}
.approval-title-toggle summary.research-title-link:hover {
  color: #A52020;
  text-decoration: underline;
}
.approval-title-toggle summary::-webkit-details-marker {
  display: none;
}

/* ══════════════════════════════════════════
   SLIDESHOW WIDGET (shared: login page + admin preview)
══════════════════════════════════════════ */
.slide-panel {
  position: relative;
  overflow: hidden;
  background: #7A5800;
}
.slide-panel-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #5C3D00 0%, #8B6014 40%, #C9982A 75%, #E8B84B 100%);
  z-index: 0;
}
.slide-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}
.slide-orb-1 {
  width: 220px; height: 220px;
  top: -60px; right: -60px;
  background: radial-gradient(circle, rgba(201,152,42,0.35) 0%, transparent 70%);
}
.slide-orb-2 {
  width: 160px; height: 160px;
  bottom: -40px; left: -40px;
  background: radial-gradient(circle, rgba(255,220,100,0.22) 0%, transparent 70%);
}
.slide-panel-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 3;
  text-align: center;
}
.lp-highlights {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}
.lp-highlights-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #C9982A;
  margin-bottom: 14px;
  width: 100%;
}
.lp-slide {
  width: 100%;
  background: rgba(0,0,0,0.28);
  border: none;
  border-radius: 14px;
  padding: 18px 18px 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  text-align: left;
  box-sizing: border-box;
}
.lp-slide-dept {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #f0b429;
  margin: 0 0 10px;
}
.lp-slide-title {
  margin: 0 0 10px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.25;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.lp-slide-meta {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
}
.slide-dots { display: flex; gap: 6px; }
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transition: all 0.35s ease;
}
.dot.active { width: 20px; border-radius: 20px; background: #ffffff; }
.smooth-slide { transition: opacity 0.42s ease, transform 0.42s ease; }
.slide-fade-out { opacity: 0; transform: translateY(10px); }
