/* =========================================================
   UBE REPOSITORY — Main Stylesheet
   Refined Academic Purple Theme
   ========================================================= */

:root {
    --brand-violet:        #5b2a86;
    --brand-violet-dark:   #32104f;
    --brand-violet-accent: #7b4ba3;

    --purple-deep:  #52297a;
    --purple-main:  #6b2fa0;
    --purple-mid:   #8b44be;
    --purple-light: #c4a0e0;
    --purple-pale:  #f0e8f8;
    --purple-ghost: #faf5ff;

    --ink:     #1a1228;
    --text:    #2d2440;
    --muted:   #7a6a8a;
    --border:  #e2d6f0;
    --white:   #ffffff;

    --green:  #1a7a4a;
    --amber:  #b45309;
    --red:    #be2535;
    --blue:   #1e4d8c;
    --teal:   #0f7a73;

    --radius-sm: 6px;
    --radius:    10px;
    --radius-lg: 16px;

    --shadow-sm: 0 1px 4px rgba(61,31,92,.08);
    --shadow:    0 4px 16px rgba(61,31,92,.12);
    --shadow-lg: 0 8px 32px rgba(61,31,92,.18);

    --font-head: 'Playfair Display', Georgia, serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
*::before, *::after { box-sizing: border-box; }
[hidden]:not([hidden="until-found"]) { display: none !important; }
button, input, select, textarea { font-family: inherit; }
input, select, textarea { min-width: 0; max-width: 100%; }
button, input[type="button"], input[type="submit"] { -webkit-appearance: button; }
img, video { max-width: 100%; }
button svg, a svg { flex-shrink: 0; }
button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
    outline: 2px solid var(--purple-mid);
    outline-offset: 3px;
}
/* Reserve scrollbar space when login and other modals lock page scrolling. */
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body { font-family: var(--font-body); background: var(--purple-ghost); color: var(--text); line-height: 1.65; min-height: 100vh; }

/* ── TOP NAV ──────────────────────────────────────────── */
.top-nav {
    background: linear-gradient(90deg, var(--brand-violet) 0%, var(--brand-violet-dark) 100%);
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.logo-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    text-decoration: none;
}
.logo-seal {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(255,255,255,.45));
}
.logo-text {
    display: grid;
    gap: 2px;
    color: var(--white);
    line-height: 1;
    text-rendering: geometricPrecision;
}
.logo-text strong {
    max-width: 270px;
    color: inherit;
    font-size: 13.5px;
    font-weight: 900;
    letter-spacing: .7px;
    line-height: .96;
    text-transform: uppercase;
}
.logo-text span {
    color: inherit;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .35px;
    line-height: 1.2;
    text-transform: uppercase;
}
.logo-img { height: 48px; width: auto; border-radius: 6px; filter: drop-shadow(0 0 10px rgba(255,255,255,.8)); }
.logo-fallback { font-family: var(--font-head); font-size: 22px; color: white; font-weight: 700; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a { color: rgba(255,255,255,.85); text-decoration: none; font-size: 14px; font-weight: 500; padding: 8px 14px; border-radius: var(--radius-sm); transition: all .2s; }
.main-nav a:hover, .main-nav a.active { background: var(--brand-violet-accent); color: white; }
.nav-badge.admin { background: rgba(255,200,60,.2); color: #ffd700; border: 1px solid rgba(255,200,60,.3); }
.nav-submit { background: var(--purple-mid) !important; color: white !important; border-radius: var(--radius-sm); font-weight: 600 !important; }
.nav-login  { border: 1px solid rgba(255,255,255,.3) !important; }
.nav-register { background: white !important; color: var(--purple-main) !important; font-weight: 600 !important; }

/* Mobile Nav Toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: white;
    font-size: 22px;
}

/* ── USER MENU DROPDOWN ──────────────────────────────── */
.user-menu { position: relative; }
.user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 220px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.22);
    color: white;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    padding: 7px 12px 7px 8px;
    border-radius: 30px;
    cursor: pointer;
    transition: all .2s;
}
.user-btn:hover,
.user-menu:focus-within .user-btn { background: rgba(255,255,255,.2); }
.caret { font-size: 11px; opacity: .72; margin-left: auto; }
.user-avatar {
    width: 28px;
    height: 28px;
    background: var(--purple-light);
    color: var(--purple-deep);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
}
.user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: min(310px, calc(100vw - 24px));
    background: white;
    border: 1px solid rgba(226,214,240,.95);
    border-radius: 16px;
    box-shadow: 0 18px 44px rgba(38,13,64,.24);
    overflow: hidden;
    z-index: 300;
}
.user-menu:hover .user-dropdown,
.user-menu:focus-within .user-dropdown { display: block; }
.dropdown-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    display: grid;
    gap: 12px;
}
.dd-avatar-row {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}
.dd-avatar-img,
.dd-avatar-big {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    flex-shrink: 0;
}
.dd-avatar-img {
    object-fit: cover;
    border: 2px solid #f1e8fb;
}
.dd-avatar-big {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #d8c2f0, #b790df);
    color: #3b175f;
    font-size: 18px;
    font-weight: 900;
}
.dd-user-meta {
    min-width: 0;
    display: grid;
    gap: 2px;
}
.dropdown-header strong {
    color: var(--ink);
    font-size: 15px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dropdown-header small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dd-badge-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    width: fit-content;
}
.role-badge.admin      { background: #fef3c7; color: #92400e; }
.role-badge.researcher { background: #ede9fe; color: #5b21b6; }
.role-badge.user       { background: #e0f2fe; color: #0369a1; }
.dd-role-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: .8;
}
.dd-user-id {
    color: #403550;
    font-size: 13px;
    font-weight: 700;
}
.dd-actions {
    display: grid;
    gap: 4px;
    padding: 8px;
}
.dd-actions form { margin: 0; }
.dropdown-item {
    width: 100%;
    min-height: 54px;
    display: grid !important;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 9px 10px !important;
    border: 0;
    border-radius: 10px !important;
    background: transparent;
    color: var(--text) !important;
    font-family: var(--font-body);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background .18s, color .18s;
}
.dropdown-item:hover {
    background: #f7f1ff !important;
    color: var(--purple-deep) !important;
}
.dd-item-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
}
.dd-icon-profile {
    background: #f0e8f8;
    color: var(--purple-main);
}
.dd-icon-out {
    background: #fff1f2;
    color: #dc2626;
}
.dd-item-copy {
    min-width: 0;
    display: grid;
    gap: 1px;
    line-height: 1.25;
}
.dd-item-label {
    color: inherit;
    font-size: 13.5px;
    font-weight: 800;
}
.dd-item-sub {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    white-space: normal;
}
.dd-signout { color: #b91c1c !important; }
.dd-signout:hover {
    background: #fff1f2 !important;
    color: #991b1b !important;
}

/* ── HERO BANNER ────────────────────────────────────── */
.hero-banner { position: relative; background: var(--purple-deep); padding: 5px 40px; overflow: hidden; text-align: center; }
.hero-bg-mesh { position: absolute; inset: 0; background: radial-gradient(ellipse at 20% 50%, rgba(107,47,160,.5) 0%, transparent 60%), radial-gradient(ellipse at 80% 30%, rgba(139,68,190,.4) 0%, transparent 55%); }
.hero-inner { position: relative; z-index: 1; }
.hero-title { font-family: var(--font-head); font-size: clamp(22px, 4vw, 48px); color: white; letter-spacing: -.5px; margin-bottom: 12px; }
.hero-sub { color: rgba(255,255,255,.75); font-size: clamp(13px, 2vw, 17px); max-width: 560px; margin: 0 auto; }

/* ── FLASH MESSAGES ─────────────────────────────────── */
.flash { display: flex; align-items: center; gap: 10px; padding: 14px 20px; margin: 16px 40px 0; border-radius: var(--radius-sm); font-weight: 500; font-size: 14px; }
.flash button { margin-left: auto; background: none; border: none; cursor: pointer; font-size: 18px; opacity: .6; }
.flash-success { background: #d1fae5; color: #065f46; border-left: 4px solid #10b981; }
.flash-error   { background: #fee2e2; color: #991b1b; border-left: 4px solid #ef4444; }

/* ── PAGE LAYOUT ───────────────────────────────────── */
.page-container { display: flex; gap: 28px; padding: 28px 16px; max-width: 1400px; margin: 0 auto; }
.page-container.page-narrow { flex-direction: column; max-width: 860px; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.page-header h1 { font-family: var(--font-head); font-size: clamp(20px, 3vw, 28px); color: var(--purple-deep); }

/* ── SIDEBAR ───────────────────────────────────────── */
.sidebar { width: 280px; flex-shrink: 0; }
.box { background: white; border-radius: var(--radius); border: 1px solid var(--border); border-left: 4px solid var(--purple-main); padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.box-title { font-family: var(--font-head); font-size: 14px; color: var(--purple-deep); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 16px; }
.search-box { border-left-color: var(--purple-mid); }
.search-group { margin-bottom: 14px; }
.search-group label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.year-range { display: flex; align-items: center; gap: 8px; }
.year-range span { color: var(--muted); font-weight: 600; }
.year-range input { flex: 1; }
.browse-list { list-style: none; }
.browse-list li a { display: block; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; color: var(--text); text-decoration: none; transition: all .2s; border-left: 3px solid transparent; }
.browse-list li a:hover, .browse-list li a.active { background: var(--purple-pale); color: var(--purple-main); border-left-color: var(--purple-main); padding-left: 16px; }

/* ── MAIN CONTENT ──────────────────────────────────── */
.content { flex: 1; min-width: 0; }
.section-title { font-family: var(--font-head); font-size: clamp(18px, 2.5vw, 22px); color: var(--purple-deep); border-bottom: 2px solid var(--border); padding-bottom: 10px; margin-bottom: 20px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.result-count { font-family: var(--font-body); font-size: 14px; color: var(--muted); font-weight: normal; }

/* ── RESEARCH GRID & CARDS ─────────────────────────── */
.research-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.research-card { background: white; border-radius: var(--radius); border: 1px solid var(--border); border-top: 3px solid var(--purple-main); padding: 20px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column; gap: 8px; }
.research-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-top-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card-type-badge { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; padding: 3px 10px; border-radius: 20px; width: fit-content; }
.card-view-counter { font-size: 12px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.card-title a { font-family: var(--font-head); font-size: 15px; font-weight: 600; color: var(--purple-deep); text-decoration: none; line-height: 1.4; display: block; }
.card-title a:hover { color: var(--purple-main); }
.card-author, .card-dept { font-size: 13px; color: var(--muted); }
.card-abstract { font-size: 13px; color: #555; flex: 1; line-height: 1.6; }
.card-footer { display: flex; align-items: center; gap: 10px; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.card-year { font-size: 12px; color: var(--muted); font-weight: 600; }
.card-years { display: grid; gap: 4px; }
.card-stats { display: flex; gap: 10px; font-size: 12px; color: var(--muted); margin-left: auto; }

.type-thesis     { background: #ede9fe; color: #5b21b6; }
.type-dissertation { background: #dbeafe; color: #1e40af; }
.type-journal    { background: #d1fae5; color: #065f46; }
.type-conference { background: #fef3c7; color: #92400e; }
.type-research   { background: #fce7f3; color: #9d174d; }
.type-case-study { background: #e0f2fe; color: #0369a1; }
.type-quantitative { background: #ffe4e6; color: #be123c; }
.type-qualitative { background: #f0fdf4; color: #166534; }
.type-descriptive { background: #dcfce7; color: #15803d; }
.type-developmental { background: #e0f2fe; color: #075985; }

/* ── BUTTONS ───────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; border: none; transition: all .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary  { background: var(--purple-main); color: white; }
.btn-primary:hover { background: var(--purple-deep); }
.btn-outline  { background: white; color: var(--purple-main); border: 2px solid var(--purple-main); }
.btn-outline:hover { background: var(--purple-pale); }
.btn-ghost    { background: var(--purple-ghost); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--purple-pale); }
.btn-green    { background: #10b981; color: white; }
.btn-green:hover { background: #059669; }
.btn-amber    { background: #f59e0b; color: white; }
.btn-amber:hover { background: #d97706; }
.btn-red      { background: #ef4444; color: white; }
.btn-red:hover { background: #dc2626; }
.btn-danger   { background: #fff1f2; color: var(--red); border: 1px solid #fecdd3; }
.btn-danger:hover { background: #fee2e2; }
.btn-full { width: 100%; justify-content: center; }
.btn-lg   { padding: 12px 24px; font-size: 15px; }
.btn-sm   { padding: 5px 12px; font-size: 12px; }

/* ── FORMS ─────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--purple-deep); margin-bottom: 7px; }
.required { color: var(--red); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea { width: 100%; padding: 10px 14px; border: 2px solid var(--border); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 14px; color: var(--text); background: #fafafa; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--purple-main); background: white; box-shadow: 0 0 0 3px rgba(107,47,160,.12); }
input::placeholder, textarea::placeholder { color: #bbb; }
textarea { resize: vertical; line-height: 1.6; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-section { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.form-section-title { font-family: var(--font-head); font-size: 16px; color: var(--purple-deep); margin-bottom: 18px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; flex-wrap: wrap; }
.form-note { font-size: 13px; color: var(--muted); margin-top: 14px; text-align: center; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 5px; display: block; }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 44px; }
.toggle-pw { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--muted); padding: 4px; border-radius: 6px; display: flex; align-items: center; justify-content: center; transition: color .2s, background .2s; line-height: 1; }
.toggle-pw:hover { color: var(--purple-main); background: var(--purple-pale); }

.checkbox-label { display: flex !important; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; font-weight: 400 !important; color: var(--text); margin-bottom: 0 !important; }
.checkbox-label input[type="checkbox"] { width: auto; padding: 0; cursor: pointer; }

.file-upload-area { position: relative; border: 2px dashed var(--purple-light); border-radius: var(--radius); padding: 32px 20px; text-align: center; background: var(--purple-ghost); transition: all .2s; cursor: pointer; }
.file-upload-area:hover { border-color: var(--purple-main); background: var(--purple-pale); }
.file-upload-area input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; padding: 0; border: none; background: none; }
.file-upload-ui { pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.file-upload-icon { font-size: 36px; }
.file-upload-text { font-weight: 600; color: var(--purple-main); }
.file-upload-ui small { color: var(--muted); font-size: 12px; }

.pin-btn { background: var(--purple-ghost); border: 1px solid var(--border); color: var(--purple-main); font-size: 12px; font-weight: 700; cursor: pointer; padding: 5px 14px; border-radius: 20px; transition: all .2s; margin-left: auto; font-family: var(--font-body); }
.pin-btn:hover { background: var(--purple-pale); border-color: var(--purple-main); }
.pin-btn.pinned { background: var(--purple-main); color: white; border-color: var(--purple-main); }

/* ── AUTH PAGES ─────────────────────────────────────── */
.auth-page { min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; padding: 40px 20px; background: radial-gradient(ellipse at 20% 30%, rgba(107,47,160,.12) 0%, transparent 60%), radial-gradient(ellipse at 80% 70%, rgba(61,31,92,.10) 0%, transparent 60%), var(--purple-ghost); }
.auth-card { background: rgb(255,255,255); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 40px; width: 100%; max-width: 440px; border-top: 4px solid var(--purple-main); }
.auth-card-wide { max-width: 700px; }
.auth-brand { text-align: center; margin-bottom: 30px; }
.auth-logo { font-size: 40px; display: block; margin-bottom: 10px; }
.auth-brand h2 { font-family: var(--font-head); font-size: 26px; color: var(--purple-deep); margin-bottom: 6px; }
.auth-brand p { color: var(--muted); font-size: 14px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 14px; color: var(--muted); }
.auth-footer a { color: var(--purple-main); font-weight: 600; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }
.back-link { display: block; margin-top: 12px; color: var(--muted) !important; font-weight: 400 !important; }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 20px; }
.alert p { font-size: 14px; }
.alert-error { background: #fee2e2; color: #991b1b; border-left: 3px solid #ef4444; }
.alert-success { background: #d1fae5; color: #065f46; border-left: 3px solid #10b981; }

.form-card { background: white; border-radius: var(--radius); border: 1px solid var(--border); padding: 32px; box-shadow: var(--shadow); }
.card { background: white; border-radius: var(--radius); border: 1px solid var(--border); padding: 24px; box-shadow: var(--shadow-sm); }

/* ── TABLES ─────────────────────────────────────────── */
.submissions-table-wrap, .data-table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { text-align: left; padding: 12px 14px; background: var(--purple-ghost); color: var(--purple-deep); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; border-bottom: 2px solid var(--border); }
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:hover td { background: var(--purple-ghost); }
.table-title { color: var(--purple-main); font-weight: 600; text-decoration: none; }
.table-title:hover { text-decoration: underline; }

/* ── STATUS BADGES ──────────────────────────────────── */
.status-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.status-badge.status-pending  { background: #fef3c7; color: #92400e; }
.status-badge.status-approved { background: #d1fae5; color: #065f46; }
.status-badge.status-rejected { background: #fee2e2; color: #991b1b; }
.badge-sm { font-size: 11px; padding: 2px 8px; }

/* ── EMPTY STATE ─────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-icon { font-size: 48px; margin-bottom: 16px; display: block; }
.empty-state h3 { font-family: var(--font-head); font-size: 22px; color: var(--text); margin-bottom: 8px; }
.empty-state p { margin-bottom: 20px; }

/* ── RESEARCH DETAIL ─────────────────────────────────── */
.breadcrumb-nav { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 20px; color: var(--muted); flex-wrap: wrap; }
.breadcrumb-nav a { color: var(--purple-main); text-decoration: none; }
.breadcrumb-nav a:hover { text-decoration: underline; }
.research-detail-card { background: white; border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow); }
.research-detail-header { padding: 32px; border-bottom: 1px solid var(--border); background: linear-gradient(135deg, var(--purple-ghost), white); }
.research-detail-title { font-family: var(--font-head); font-size: clamp(18px, 3vw, 26px); color: var(--purple-deep); margin: 14px 0; line-height: 1.4; }
.research-meta-row { display: flex; flex-wrap: wrap; gap: 18px; font-size: 14px; color: var(--muted); }
.keyword-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.keyword-chip { background: var(--purple-pale); color: var(--purple-main); font-size: 12px; padding: 4px 12px; border-radius: 20px; font-weight: 600; }
.research-detail-body { padding: 32px; }
.research-detail-body h3 { font-family: var(--font-head); color: var(--purple-deep); margin-bottom: 14px; }
.abstract-text { font-size: 15px; line-height: 1.8; color: #444; }
.research-detail-actions { padding: 20px 32px; display: flex; gap: 12px; align-items: center; border-top: 1px solid var(--border); background: var(--purple-ghost); flex-wrap: wrap; }

/* ── PAGINATION ──────────────────────────────────────── */
.pagination-wrap { margin-top: 24px; display: flex; justify-content: center; }
.pagination-wrap nav { display: flex; gap: 4px; flex-wrap: wrap; }
.pagination-wrap .page-link, .pagination-wrap [aria-label] a, .pagination-wrap span { padding: 7px 13px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; text-decoration: none; color: var(--purple-main); border: 1px solid var(--border); background: white; transition: all .2s; display: inline-block; }
.pagination-wrap .active span, .pagination-wrap [aria-current] span { background: var(--purple-main); color: white; border-color: var(--purple-main); }

/* ── FOOTER ─────────────────────────────────────────────── */
.site-footer { background: var(--purple-deep); color: rgba(255,255,255,.8); padding: 14px 40px 10px; margin-top: 20px; }
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-logo { font-family: var(--font-head); font-size: 15px; color: white; font-weight: 700; display: block; margin-bottom: 3px; }
.footer-tagline { font-style: italic; font-size: 10px; color: rgba(255,255,255,.6); margin-bottom: 4px; }
.footer-desc { font-size: 10px; color: rgba(255,255,255,.5); line-height: 1.5; margin-bottom: 8px; }
.footer-socials { display: flex; gap: 6px; }
.footer-socials a { width: 24px; height: 24px; background: rgba(255,255,255,.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.8); text-decoration: none; transition: background .2s; }
.footer-socials a:hover { background: rgba(255,255,255,.25); color: white; }
.footer-col-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: white; margin-bottom: 8px; }
.footer-links-list { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.footer-links-list a { color: rgba(255,255,255,.65); text-decoration: none; font-size: 11px; transition: color .2s; }
.footer-links-list a:hover { color: white; }
.footer-address { font-size: 10px; color: rgba(255,255,255,.6); line-height: 1.6; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 8px; font-size: 10px; color: rgba(255,255,255,.4); }

/* ── MODAL ──────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 500; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-box { background: white; border-radius: var(--radius-lg); padding: 28px; width: 440px; max-width: 100%; box-shadow: var(--shadow-lg); }
.modal-box h3 { font-family: var(--font-head); font-size: 20px; color: var(--purple-deep); margin-bottom: 12px; }

/* ── MISC ───────────────────────────────────────────── */
.text-muted { color: var(--muted); font-size: 13px; }
.text-center { text-align: center; }
.action-cell { white-space: nowrap; }
.rejection-hint { font-size: 12px; color: var(--red); cursor: help; }

/* ── RESPONSIVE ─────────────────────────────────────── */

/* Tablet — 1024px */
@media (max-width: 1024px) {
    .top-nav { padding: 0 20px; }
    .page-container { padding: 20px 16px; gap: 20px; }
    .sidebar { width: 240px; }
    .research-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
    .footer-top { grid-template-columns: 1fr 1fr; }
}

/* Mobile — 768px */
@media (max-width: 768px) {
    /* Nav */
    .top-nav { padding: 0 16px; height: 56px; }
    .nav-toggle { display: flex; }
    .main-nav {
        display: none;
        position: fixed;
        top: 56px; left: 0; right: 0;
        background: #2a0d4a;
        flex-direction: column;
        padding: 16px;
        gap: 4px;
        z-index: 199;
        box-shadow: 0 8px 24px rgba(0,0,0,.3);
    }
    .main-nav.open { display: flex; max-height: calc(100vh - 56px); max-height: calc(100dvh - 56px); overflow-y: auto; }
    .main-nav a { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 15px; }
    .user-menu { width: 100%; }
    .user-btn { width: 100%; max-width: none; justify-content: space-between; border-radius: var(--radius-sm); }
    .user-dropdown { position: static; width: 100%; box-shadow: none; border: 1px solid rgba(255,255,255,.16); background: #fff; border-radius: 14px; margin-top: 6px; }
    .logo-img { height: 36px; }
    .logo-wrap { gap: 9px; }
    .logo-seal { width: 38px; height: 38px; }
    .logo-text strong { max-width: 210px; font-size: 10.5px; letter-spacing: .5px; }
    .logo-text span { max-width: 210px; font-size: 7.8px; letter-spacing: .2px; }

    /* Layout */
    .page-container { flex-direction: column; padding: 12px; gap: 16px; }
    .sidebar { width: 100%; }
    .form-row { grid-template-columns: 1fr; }
    .hero-banner { padding: 20px 16px; }
    .research-grid { grid-template-columns: 1fr; }
    .flash { margin: 12px 16px 0; }

    /* Auth */
    .auth-card { padding: 24px 20px; }
    .auth-card-wide { max-width: 100%; }

    /* Detail */
    .research-detail-header { padding: 20px; }
    .research-detail-body { padding: 20px; }
    .research-detail-actions { padding: 16px 20px; flex-direction: column; align-items: stretch; }

    /* Footer */
    .site-footer { padding: 16px; }
    .footer-top { grid-template-columns: 1fr; gap: 14px; }
    .footer-bottom { flex-direction: column; gap: 4px; text-align: center; }

    /* Forms */
    .form-card { padding: 20px 16px; }
    .form-actions { flex-direction: column; }
    .form-actions .btn { width: 100%; justify-content: center; }

    /* Tables */
    .data-table { font-size: 12px; }
    .data-table th, .data-table td { padding: 8px 10px; }
}

/* Small Mobile — 480px */
@media (max-width: 480px) {
    .hero-title { font-size: 22px; }
    .hero-sub { font-size: 13px; }
    .auth-card { padding: 20px 14px; }
    .research-detail-title { font-size: 18px; }
    .btn-lg { padding: 10px 18px; font-size: 14px; }
    .section-title { font-size: 18px; }
}

/* Hide browser built-in password toggle */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear,
input[type="password"]::-webkit-contacts-auto-fill-button,
input[type="password"]::-webkit-credentials-auto-fill-button {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
}

/* Frontend public pages restore */
.home-page,
.info-page {
    background:
        radial-gradient(circle at 16% 28%, rgba(107,47,160,.12), transparent 32%),
        radial-gradient(circle at 84% 20%, rgba(15,122,115,.10), transparent 34%),
        #fbf8ff;
}

.home-kicker,
.info-kicker,
.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--teal);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.8px;
}

.home-kicker::before,
.info-kicker::before,
.hero-kicker::before {
    content: "";
    width: 24px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
}

.home-hero {
    min-height: 574px;
    display: flex;
    align-items: center;
    color: white;
    background:
        linear-gradient(90deg, rgba(50,16,79,.92) 0%, rgba(91,42,134,.80) 48%, rgba(123,75,163,.68) 100%),
        url("../images/First-Section-1.jpg") center / cover no-repeat;
    box-shadow: inset 0 -1px 0 rgba(255,255,255,.12);
}

.home-hero-inner {
    width: min(1136px, calc(100% - 64px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 760px);
    align-items: center;
    justify-content: start;
}

.home-hero-copy h1 {
    max-width: 620px;
    margin: 18px 0 16px;
    font-family: var(--font-head);
    font-size: clamp(48px, 7vw, 86px);
    line-height: .9;
    letter-spacing: 0;
    color: white;
}

.home-hero-copy p {
    max-width: 700px;
    color: rgba(255,255,255,.84);
    font-size: clamp(17px, 1.7vw, 20px);
    line-height: 1.65;
    font-weight: 500;
}

.home-hero .home-kicker,
.hero-kicker {
    color: rgba(255,255,255,.86);
}

.home-search-panel,
.home-filter-card,
.home-browse,
.home-results,
.info-card,
.ct-map-panel,
.faq-category {
    background: rgba(255,255,255,.94);
    border: 1px solid #ded0ee;
    border-radius: 8px;
    box-shadow: 0 20px 46px rgba(61,31,92,.09);
}

.home-search-panel {
    padding: 24px;
    color: var(--text);
}

.home-search-head,
.faq-cat-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.home-search-icon,
.info-icon-box,
.ct-card-icon-wrap,
.login-modal-icon {
    width: 43px;
    height: 43px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: var(--purple-main);
    background: var(--purple-pale);
}

.info-icon-box.teal,
.ct-icon-loc,
.ct-icon-web {
    color: var(--teal);
    background: #dff7f3;
}

.ct-icon-phone {
    color: var(--amber);
    background: #fff3cd;
}

.home-search-head h2,
.home-filter-card h3,
.info-card h2,
.ct-map-panel h2,
.faq-cat-title {
    margin: 0;
    font-family: var(--font-head);
    color: var(--purple-deep);
    line-height: 1.1;
}

.home-search-head h2 {
    font-size: 25px;
}

.home-search-head p,
.home-filter-card p,
.home-section-head p,
.info-section-head p,
.info-card p,
.ct-map-panel p,
.faq-cat-sub {
    color: #746184;
}

.home-search-row {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 14px;
}

.home-search-row label,
.login-modal-group label {
    color: var(--purple-deep);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .7px;
}

.home-search-row input,
.home-search-row select,
.login-modal-input-wrap input {
    min-height: 42px;
    border: 2px solid #ddc8ef;
    border-radius: 6px;
    background: rgba(255,255,255,.86);
}

.home-filter-grid,
.home-year-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.home-search-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.home-shell,
.info-wrap {
    width: min(1180px, calc(100% - 64px));
    margin: 0 auto;
    padding: 34px 0 28px;
}

.home-browse {
    padding: 32px 28px;
    margin-bottom: 26px;
    overflow: hidden;
}

.home-section-head,
.info-section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, .72fr);
    gap: 28px;
    align-items: end;
    margin-bottom: 22px;
}

.home-section-head.compact {
    align-items: start;
}

.home-section-head h2,
.info-section-head h2 {
    margin: 8px 0 0;
    font-family: var(--font-head);
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.05;
    color: var(--purple-deep);
}

.department-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(210px, 1fr);
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.department-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 80px;
    padding: 14px;
    border: 1px solid #decdf0;
    border-radius: 8px;
    color: #190b2b;
    background: #fbf7ff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
}

.department-chip:hover,
.department-chip.active {
    border-color: var(--purple-main);
    box-shadow: 0 10px 22px rgba(107,47,160,.12);
    transform: translateY(-1px);
}

.department-chip span {
    width: 42px;
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: white;
    color: var(--purple-main);
    box-shadow: var(--shadow-sm);
    font-size: 12px;
}

.home-layout {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.home-sidebar {
    position: sticky;
    top: 82px;
}

.home-filter-card {
    padding: 22px;
}

.home-filter-card h3 {
    font-size: 22px;
}

.home-results {
    padding: 28px 24px;
    scroll-margin-top: 90px;
}

.home-results-status {
    color: var(--purple-deep);
    font-size: 14px;
}

.home-results-status:empty {
    display: none;
}

.home-results-status:not(:empty) {
    margin-bottom: 16px;
}

.home-results[aria-busy="true"] .home-results-status::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    vertical-align: -2px;
    border: 2px solid var(--border);
    border-top-color: var(--purple-main);
    border-radius: 50%;
    animation: home-filter-spin .8s linear infinite;
}

.home-results[aria-busy="true"] #home-results-content {
    opacity: .55;
}

#home-filters button:disabled {
    opacity: .65;
    cursor: wait;
}

@keyframes home-filter-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .home-results[aria-busy="true"] .home-results-status::before {
        animation: none;
    }
}

.home-research-grid .research-card {
    border-top-width: 4px;
}

.card-details-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 6px;
    background: var(--purple-pale);
    color: var(--purple-main);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.card-details-btn:hover {
    background: var(--purple-main);
    color: white;
}

.home-empty {
    grid-column: 1 / -1;
}

.hero-banner {
    min-height: 296px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 68px 32px;
    background:
        linear-gradient(90deg, rgba(55,15,84,.94), rgba(85,43,123,.82), rgba(21,126,123,.62)),
        url("../images/philcstarea.jpg") center / cover no-repeat;
}

.hero-bg-mesh {
    display: none;
}

.hero-inner {
    width: min(920px, 100%);
    text-align: center;
}

.hero-title {
    margin: 12px auto;
    font-size: clamp(42px, 6vw, 70px);
    line-height: .98;
    letter-spacing: 0;
}

.info-page .hero-sub {
    max-width: 760px;
    font-size: 18px;
    line-height: 1.6;
    font-weight: 600;
}

.info-wrap {
    padding-top: 34px;
}

.info-card {
    padding: 26px;
}

.about-intro-grid,
.ab-mv-grid,
.ct-grid {
    display: grid;
    grid-template-columns: 1fr 1.22fr;
    gap: 22px;
    align-items: stretch;
    margin-bottom: 24px;
}

.ab-mv-grid {
    grid-template-columns: 1fr 1fr;
}

.about-copy h2,
.ct-lede h2,
.ct-map-panel h2 {
    margin: 10px 0 12px;
    font-size: clamp(28px, 3vw, 36px);
}

.about-focus-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.about-focus-list span {
    padding: 7px 12px;
    border-radius: 999px;
    background: #f6effd;
    color: var(--purple-main);
    font-size: 12px;
    font-weight: 800;
}

.about-campus-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid #ded0ee;
    border-radius: 8px;
    min-height: 350px;
    box-shadow: 0 20px 46px rgba(61,31,92,.09);
}

.about-campus-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-campus-caption {
    position: absolute;
    left: 18px;
    bottom: 18px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(17,12,27,.82);
    color: white;
    font-size: 12px;
    font-weight: 800;
}

.ab-mv-card,
.contact-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.ab-mv-card h3,
.ab-feature h4,
.contact-card strong {
    color: var(--purple-deep);
    font-size: 22px;
    font-family: var(--font-head);
    line-height: 1.15;
}

.info-section {
    margin-top: 42px;
}

.ab-features-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.ab-feature {
    min-height: 170px;
    padding: 22px;
    border: 1px solid #ded0ee;
    border-radius: 8px;
    background: white;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.ab-feature:hover,
.ab-feature.active {
    border-color: var(--purple-main);
    box-shadow: 0 14px 32px rgba(107,47,160,.12);
}

.ab-feature h4 {
    margin: 14px 0 8px;
}

.feature-expand {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    color: #655277;
    font-size: 13px;
}

.feature-expand ul {
    padding-left: 18px;
}

.feature-expand li {
    margin: 5px 0;
}

.colleges-accordion {
    display: grid;
    gap: 12px;
}

.college-item {
    padding: 0;
    overflow: hidden;
}

.college-header {
    width: 100%;
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 22px;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.college-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ab-college-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--purple-pale);
    color: var(--purple-main);
    font-weight: 900;
    font-size: 12px;
}

.college-name {
    display: block;
    color: var(--purple-deep);
    font-weight: 800;
}

.college-count {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.college-chevron {
    color: var(--purple-main);
    transition: transform .2s;
}

.college-header.is-open .college-chevron {
    transform: rotate(180deg);
}

.college-body {
    padding: 0 22px 22px;
    border-top: 1px solid var(--border);
}

.ab-college-desc {
    margin: 16px 0;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.course-card {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fdfbff;
}

.course-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.course-card h4 {
    color: var(--purple-deep);
    line-height: 1.25;
}

.ab-view-link,
.ct-maps-btn {
    color: var(--purple-main);
    font-weight: 800;
    text-decoration: none;
}

.faq-body {
    display: grid;
    grid-template-columns: 304px 1fr 1fr;
    gap: 18px;
    align-items: start;
}

.faq-guide {
    min-height: 510px;
}

.faq-guide h2 {
    margin: 12px 0;
    font-size: clamp(28px, 3vw, 36px);
}

.faq-guide-list {
    display: grid;
    gap: 10px;
    margin-top: 24px;
}

.faq-guide-row {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 10px;
    padding: 14px 12px;
    border-radius: 8px;
    background: #f7f0fb;
    color: #382b46;
    font-size: 13px;
    font-weight: 800;
}

.faq-guide-row span {
    color: var(--purple-main);
}

.faq-category {
    overflow: hidden;
    padding: 0;
}

.faq-category.faq-access {
    grid-column: 2;
}

.faq-cat-header {
    margin: 0;
    padding: 34px 36px 22px;
    background: linear-gradient(180deg, #fff 0%, #fbf7ff 100%);
}

.faq-cat-title {
    font-size: clamp(26px, 3vw, 36px);
}

.faq-list {
    border-top: 1px solid var(--border);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px;
    border: 0;
    border-bottom: 1px solid var(--border);
    background: white;
    color: #160625;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}

.faq-question.open {
    color: var(--purple-main);
}

.faq-arrow {
    color: var(--purple-main);
    transition: transform .2s;
}

.faq-question.open .faq-arrow {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 20px 18px;
    color: #66536f;
    border-bottom: 1px solid var(--border);
}

.ct-grid {
    grid-template-columns: .92fr 1.12fr;
}

.ct-info,
.ct-cards {
    display: grid;
    gap: 14px;
}

.contact-card {
    min-height: 110px;
}

.contact-card p {
    margin: 6px 0 0;
}

.contact-card a {
    color: var(--purple-main);
    font-weight: 800;
    text-decoration: none;
}

.map-wrap {
    height: 430px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin: 22px 0 14px;
}

.ct-maps-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.login-modal {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-modal.is-open {
    display: flex;
}

.login-modal-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(28,15,43,.62);
    backdrop-filter: blur(6px);
}

.login-modal-panel {
    position: relative;
    z-index: 1;
    width: min(480px, 100%);
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 48px 28px 34px;
    border: 1px solid #9d56d5;
    border-radius: 20px;
    background: url('../images/login-waves.svg') center / 100% 100% no-repeat,
        linear-gradient(145deg, #fff 35%, #fdfaff 100%);
    box-shadow: 0 28px 80px rgba(24,9,41,.32), inset 0 1px 0 rgba(255,255,255,.9);
}

.login-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: rgba(247,239,255,.8);
    color: #55118b;
    cursor: pointer;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}

.login-modal-close:hover {
    background: #ead7fb;
}

.login-modal-close svg {
    width: 20px;
    height: 20px;
}

.login-modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 26px;
}

.login-modal-header > div:last-child {
    min-width: 0;
}

.login-modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, #cb6bff 0%, #9227eb 42%, #57218a 100%);
    box-shadow: 0 12px 26px rgba(138,43,211,.16), inset 0 1px 2px rgba(255,255,255,.5);
}

.login-modal-icon svg {
    width: 30px;
    height: 30px;
}

.login-modal-header h2 {
    margin: 0;
    color: #4c0d7d;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 36px;
    font-weight: 700;
    line-height: 1.1;
}

.login-modal-header p,
.login-modal-policy {
    color: #827098;
    line-height: 1.5;
}

.login-modal-header p {
    margin-top: 5px;
    font-size: 14px;
}

.login-modal-error {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-left: 4px solid var(--red);
    border-radius: 6px;
    background: #fff1f2;
    color: #991b1b;
    font-size: 13px;
}

.login-modal-group {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.login-modal-group label {
    color: #55118b;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    line-height: 1.4;
}

.login-modal-input-wrap {
    position: relative;
}

.login-modal-input-wrap input {
    min-height: 48px;
    padding: 10px 48px 10px 52px;
    border: 1.5px solid #d9b7f7;
    border-radius: 8px;
    background: rgba(255,255,255,.88);
    color: #402055;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(138,43,211,.06);
}

.login-modal-input-wrap input::placeholder {
    color: #998aaa;
    opacity: 1;
}

.login-modal-input-wrap input:focus {
    border-color: #bd86f0;
    box-shadow: 0 0 0 3px rgba(177,112,235,.18);
}

.login-modal-input-icon,
.login-modal-toggle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #827098;
}

.login-modal-input-icon {
    left: 16px;
    color: #55118b;
    pointer-events: none;
}

.login-modal-input-icon svg,
.login-modal-toggle svg {
    width: 22px;
    height: 22px;
}

.login-modal-toggle {
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
}

.login-modal-remember {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #827098;
    font-size: 14px;
    cursor: pointer;
}

.login-modal-remember input {
    appearance: none;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    margin: 0;
    border: 1.5px solid #827098;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

.login-modal-remember input:checked {
    border-color: #7720b9;
    background: #7720b9 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='m4 9 3 3 7-7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.login-modal-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 22px;
}

.login-modal-forgot {
    color: #7720b9;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.login-modal-forgot:hover {
    text-decoration: underline;
}

.login-modal-submit {
    width: 100%;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    border-radius: 11px;
    background: radial-gradient(ellipse at 0% 0%, rgba(218,141,255,.32) 0 24%, transparent 24.5%),
        radial-gradient(ellipse at 110% 120%, rgba(192,102,255,.25) 0 25%, transparent 25.5%),
        linear-gradient(115deg, #a22df0, #59208a);
    color: white;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(107,47,160,.22), inset 0 1px 1px rgba(255,255,255,.4);
    transition: filter .2s, box-shadow .2s;
}

.login-modal-submit:hover {
    filter: brightness(1.08);
    box-shadow: 0 16px 30px rgba(107,47,160,.3);
}

.login-modal-submit svg {
    width: 22px;
    height: 22px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-modal-policy {
    margin-top: 16px;
    font-size: 12px;
    text-align: center;
}

.login-modal-policy a {
    color: #7720b9;
    font-weight: 700;
    text-decoration: none;
}

.login-modal-policy a:hover {
    text-decoration: underline;
}

.login-modal-header .login-modal-forgot-title {
    font-size: 30px;
}

.login-modal-status {
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid #d9b7f7;
    border-radius: 8px;
    background: #f7efff;
    color: #55118b;
    font-size: 14px;
    line-height: 1.5;
}

.login-modal-submit:disabled {
    opacity: .7;
    cursor: wait;
    filter: none;
}

.login-modal-back {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 18px;
    padding: 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #7720b9;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.login-modal-back:hover {
    background: #f4e9fc;
}

.modal-open {
    overflow: hidden;
}

@media (max-width: 1024px) {
    .home-hero-inner,
    .home-layout,
    .about-intro-grid,
    .ab-mv-grid,
    .ct-grid,
    .faq-body {
        grid-template-columns: 1fr;
    }

    .home-sidebar {
        position: static;
    }

    .faq-category.faq-access {
        grid-column: auto;
    }

    .ab-features-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .home-hero {
        min-height: auto;
        padding: 56px 0;
    }

    .home-hero-inner,
    .home-shell,
    .info-wrap {
        width: min(100% - 28px, 1180px);
    }

    .home-hero-inner {
        gap: 28px;
    }

    .home-hero-copy h1 {
        font-size: clamp(42px, 13vw, 64px);
    }

    .hero-title {
        font-size: clamp(34px, 10vw, 48px);
    }

    .home-search-panel,
    .home-browse,
    .home-results,
    .info-card,
    .ct-map-panel {
        padding: 20px;
    }

    .home-section-head,
    .info-section-head,
    .home-filter-grid,
    .home-year-grid,
    .courses-grid,
    .ab-features-grid {
        grid-template-columns: 1fr;
    }

    .department-strip {
        grid-auto-columns: minmax(230px, 85vw);
    }

    .hero-banner {
        min-height: 260px;
        padding: 48px 18px;
    }

    .faq-guide {
        min-height: auto;
    }

    .faq-cat-header {
        padding: 24px 20px 18px;
    }

    .map-wrap {
        height: 320px;
    }

}

@media (max-width: 600px) {
    .login-modal {
        padding: 16px;
    }

    .login-modal-panel {
        max-height: calc(100vh - 32px);
        max-height: calc(100dvh - 32px);
        padding: 52px 20px 28px;
        border-radius: 18px;
    }

    .login-modal-close {
        top: 14px;
        right: 14px;
        width: 36px;
        height: 36px;
    }

    .login-modal-header {
        gap: 12px;
        margin-bottom: 24px;
    }

    .login-modal-icon {
        width: 50px;
        height: 50px;
        border-radius: 14px;
    }

    .login-modal-icon svg {
        width: 26px;
        height: 26px;
    }

    .login-modal-header h2 {
        font-size: 32px;
    }

    .login-modal-header .login-modal-forgot-title {
        font-size: 26px;
    }

    .login-modal-header p {
        font-size: 14px;
    }

    .login-modal-input-wrap input {
        padding-left: 52px;
        font-size: 16px;
    }

    .login-modal-input-icon {
        left: 16px;
    }

    .login-modal-remember,
    .login-modal-forgot {
        font-size: 14px;
    }

    .login-modal-remember {
        gap: 8px;
    }

    .login-modal-policy {
        font-size: 12px;
    }
}
body,
body *:not(input):not(textarea):not(select):not([contenteditable="true"]):not([contenteditable=""]) {
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
}

input,
textarea,
select,
[contenteditable="true"],
[contenteditable=""] {
    user-select: text;
    -webkit-user-select: text;
    -ms-user-select: text;
}

img,
a,
button,
svg {
    -webkit-user-drag: none;
}

.research-id {
    display: block;
    margin: 4px 0;
    color: #756887;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
