/* =============================================================
   CALABARZON e-RPMES — Community of Practice on Evaluation
   Complete stylesheet · Blue / Navy / White theme
   Self-contained · Modern · Mobile-responsive
   ============================================================= */

:root {
    --navy-900: #0b1f4d;
    --navy-800: #102a5c;
    --navy-700: #16356e;
    --blue-700: #1d4ed8;
    --blue-600: #2563eb;
    --blue-500: #3b82f6;
    --blue-400: #60a5fa;
    --blue-100: #dbeafe;
    --blue-050: #eff6ff;

    --ink:        #0f172a;
    --text:       #1f2937;
    --text-soft:  #64748b;
    --line:       #e6ecf5;
    --bg:         #f4f7fc;
    --white:      #ffffff;

    --danger:  #ef4444;
    --success: #22c55e;

    --radius-sm: 12px;
    --radius:    18px;
    --radius-lg: 24px;

    --shadow-sm: 0 4px 14px rgba(15, 31, 77, .06);
    --shadow-md: 0 10px 30px rgba(15, 31, 77, .08);
    --shadow-lg: 0 20px 48px rgba(15, 31, 77, .12);

    --sidebar-w: 264px;
    --header-h:  72px;

    --t: .22s ease;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(30,64,175,.25); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(30,64,175,.45); }

/* ── SIDEBAR ─────────────────────────────────────── */
.app-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w);
    background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-700) 100%);
    display: flex;
    flex-direction: column;
    z-index: 1050;
    transition: transform var(--t);
    box-shadow: 4px 0 24px rgba(11,31,77,.18);
}
.app-sidebar::before {
    content: "";
    display: block;
    height: var(--header-h);
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E")
        20px center / 26px no-repeat;
}
.app-sidebar::after {
    content: "CALABARZON CoPE";
    position: absolute;
    top: 0; left: 56px; right: 14px;
    height: var(--header-h);
    display: flex;
    align-items: center;
    color: #fff;
    font-weight: 800;
    font-size: 1.02rem;
    letter-spacing: .3px;
}
.sidebar-nav { flex: 1; padding: 18px 14px; overflow-y: auto; }
.nav-item {
    display: flex; align-items: center; gap: 14px;
    padding: 13px 16px; border-radius: 14px;
    color: rgba(255,255,255,.78); font-weight: 600; font-size: .96rem;
    margin-bottom: 4px; transition: var(--t);
}
.nav-item .nav-icon { font-size: 1.15rem; width: 22px; text-align: center; }
.nav-item:hover { background: rgba(255,255,255,.10); color: #fff; }
.nav-item.active {
    background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
    color: #fff; box-shadow: 0 10px 24px rgba(37,99,235,.4);
}
.nav-item-group .nav-sub { overflow: hidden; max-height: 0; transition: max-height .28s ease; padding-left: 14px; }
.nav-item-group.open .nav-sub { max-height: 320px; }
.nav-sub-item {
    display: block; padding: 10px 16px 10px 38px;
    color: rgba(255,255,255,.6); font-size: .9rem;
    border-radius: 10px; margin-bottom: 2px; transition: var(--t); position: relative;
}
.nav-sub-item::before {
    content: ""; position: absolute; left: 20px; top: 50%;
    width: 6px; height: 6px; border-radius: 50%;
    background: rgba(255,255,255,.3); transform: translateY(-50%);
}
.nav-sub-item:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-sub-item.active { color: var(--blue-400); font-weight: 700; }
.nav-sub-item.active::before { background: var(--blue-400); }
.sidebar-footer { padding: 16px 14px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-logout {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; border-radius: 12px;
    color: #fca5a5; font-weight: 600; transition: var(--t);
}
.sidebar-logout:hover { background: rgba(239,68,68,.16); color: #fecaca; }

/* ── HEADER ──────────────────────────────────────── */
.app-header {
    position: sticky; top: 0;
    margin-left: var(--sidebar-w);
    height: var(--header-h);
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 0 26px;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    z-index: 1000;
}
.header-inner { display: flex; align-items: center; gap: 14px; min-width: 0; }
.sidebar-toggle {
    display: none; border: none;
    background: var(--blue-050); color: var(--blue-700);
    width: 42px; height: 42px; border-radius: 12px;
    font-size: 1.3rem; cursor: pointer;
    align-items: center; justify-content: center;
}
.header-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.header-logo {
    width: 42px; height: 42px; border-radius: 12px;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; flex-shrink: 0;
}
.header-titles { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name { font-weight: 800; font-size: 1.02rem; color: var(--ink); }
.brand-sub  { font-size: .78rem; color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-user { flex-shrink: 0; }
.user-btn {
    display: flex; align-items: center; gap: 10px;
    border: 1px solid var(--line); background: #fff;
    padding: 6px 12px 6px 6px; border-radius: 99px; cursor: pointer; transition: var(--t);
}
.user-btn:hover { box-shadow: var(--shadow-sm); border-color: var(--blue-100); }
.user-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    object-fit: cover; border: 2px solid var(--blue-100); flex-shrink: 0;
}
.user-name { font-weight: 600; font-size: .92rem; color: var(--ink); }
.user-btn.dropdown-toggle::after { margin-left: 2px; color: var(--text-soft); }
.dropdown-menu { border: none; box-shadow: var(--shadow-md); border-radius: 14px; padding: 8px; list-style: none; }
.dropdown-menu li { list-style: none; }
.dropdown-item { border-radius: 10px; padding: 10px 14px; font-weight: 500; }
.dropdown-item:hover { background: var(--blue-050); color: var(--blue-700); }

/* ── MAIN ────────────────────────────────────────── */
.app-main {
    margin-left: var(--sidebar-w);
    padding: 28px;
    min-height: calc(100vh - var(--header-h));
    animation: fadeIn .3s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.sidebar-overlay {
    position: fixed; inset: 0;
    background: rgba(11,31,77,.45); backdrop-filter: blur(2px);
    z-index: 1040; opacity: 0; visibility: hidden; transition: opacity var(--t);
}
.sidebar-overlay.show { opacity: 1; visibility: visible; }

/* ── PAGE HEADER ─────────────────────────────────── */
.page-header {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; margin-bottom: 24px;
}
.page-title { font-size: 1.7rem; font-weight: 800; color: var(--ink); }
.page-actions { display: flex; align-items: center; gap: 12px; }
.page-body { animation: fadeIn .35s ease; }
.back-btn {
    width: 42px; height: 42px; border-radius: 12px;
    background: #fff; border: 1px solid var(--line);
    display: flex; align-items: center; justify-content: center;
    color: var(--blue-700); font-size: 1.1rem; transition: var(--t);
}
.back-btn:hover { background: var(--blue-050); border-color: var(--blue-100); }

.search-form { margin: 0; }
.search-wrap, .search-box {
    display: flex; align-items: center; gap: 10px;
    background: #fff; border: 1px solid var(--line);
    border-radius: 99px; padding: 0 16px; height: 46px;
    min-width: 240px; transition: var(--t);
}
.search-wrap:focus-within, .search-box:focus-within { border-color: var(--blue-400); box-shadow: 0 0 0 4px rgba(59,130,246,.12); }
.search-icon { color: var(--text-soft); }
.search-input, .search-box input { border: none; outline: none; background: none; width: 100%; height: 100%; font-size: .95rem; color: var(--text); }
.search-clear { color: var(--text-soft); }

/* ── DATA TABLE ──────────────────────────────────── */
.table-responsive { overflow-x: auto; border-radius: var(--radius); }
.data-table {
    width: 100%; border-collapse: separate; border-spacing: 0;
    background: #fff; border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-sm); min-width: 680px;
}
.data-table thead th {
    background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
    color: #fff; font-weight: 700; font-size: .82rem;
    letter-spacing: .4px; text-transform: uppercase;
    padding: 16px 18px; text-align: left; white-space: nowrap;
}
.data-table tbody td { padding: 16px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: .94rem; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background var(--t); }
.clickable-row { cursor: pointer; }
.clickable-row:hover { background: var(--blue-050); }
.member-name-cell { display: flex; align-items: center; gap: 12px; }
.member-mini-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.member-link, .study-title-link { font-weight: 700; color: var(--ink); }
.member-link:hover, .study-title-link:hover { color: var(--blue-700); }
.expertise-cell { color: var(--text-soft); max-width: 360px; }
.view-badge {
    display: inline-block; padding: 6px 16px; border-radius: 99px;
    background: var(--blue-050); color: var(--blue-700);
    font-weight: 700; font-size: .82rem; transition: var(--t);
}
.badge-link:hover .view-badge { background: var(--blue-600); color: #fff; }
.result-count { margin-top: 14px; color: var(--text-soft); font-size: .9rem; }

.empty-state {
    text-align: center; padding: 70px 20px; color: var(--text-soft);
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.empty-state.small-empty { padding: 40px 20px; }
.empty-icon { font-size: 3rem; color: var(--blue-400); display: block; margin-bottom: 12px; }

/* ── DATABASE CATEGORY TILES ─────────────────────── */
.db-categories-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.db-category-card {
    position: relative; overflow: hidden; border-radius: var(--radius-lg);
    padding: 36px 32px; min-height: 190px;
    display: flex; flex-direction: column; justify-content: center;
    background: #fff; border: 1px solid var(--line);
    box-shadow: var(--shadow-sm); transition: var(--t);
}
.db-category-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.db-cat-icon {
    width: 64px; height: 64px; border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.9rem; color: #fff;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
    margin-bottom: 18px;
}
.db-cat-name { font-size: 1.5rem; font-weight: 800; color: var(--ink); }
.db-cat-desc { color: var(--text-soft); margin-top: 8px; font-size: .92rem; }
.db-cat-economic       .db-cat-icon { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.db-cat-governance     .db-cat-icon { background: linear-gradient(135deg, #4f46e5, #4338ca); }
.db-cat-infrastructure .db-cat-icon { background: linear-gradient(135deg, #0ea5e9, #0369a1); }
.db-cat-social         .db-cat-icon { background: linear-gradient(135deg, #6366f1, #4f46e5); }

.category-banner {
    display: flex; align-items: center; gap: 18px;
    padding: 26px 30px; border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--blue-700), var(--navy-800));
    color: #fff; margin-bottom: 24px;
}
.cat-banner-icon {
    width: 58px; height: 58px; border-radius: 16px;
    background: rgba(255,255,255,.15);
    display: flex; align-items: center; justify-content: center; font-size: 1.7rem;
}
.cat-banner-title { font-size: 1.6rem; font-weight: 800; }

/* ── STUDY DETAIL & HERO ─────────────────────────── */
.study-hero-modern, .events-hero, .forum-hero {
    background: linear-gradient(135deg, var(--blue-700), var(--navy-800));
    color: #fff; border-radius: var(--radius-lg);
    padding: 36px; margin-bottom: 24px;
    display: flex; justify-content: space-between; gap: 26px;
    align-items: center; flex-wrap: wrap;
}
.study-hero-modern h1 { font-size: 1.9rem; font-weight: 800; margin-bottom: 14px; line-height: 1.2; }
.events-hero h1, .forum-hero h1 { font-size: 1.9rem; font-weight: 800; margin: 10px 0; }
.study-category-badge, .hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 14px; border-radius: 99px;
    background: rgba(255,255,255,.16); font-size: .82rem; font-weight: 600; margin-bottom: 12px;
}
.study-meta-modern { display: flex; gap: 20px; flex-wrap: wrap; font-size: .94rem; opacity: .95; }
.study-content-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.study-section-card, .study-side-card {
    background: #fff; border-radius: var(--radius); padding: 28px;
    box-shadow: var(--shadow-sm); margin-bottom: 20px;
}
.section-title { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; font-weight: 700; margin-bottom: 16px; color: var(--ink); }
.study-abstract { line-height: 1.9; color: var(--text); }
.study-info-list { list-style: none; }
.study-info-list li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.study-info-list li:last-child { border-bottom: none; }
.keyword-list, .expertise-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.keyword-tag, .expertise-tag {
    padding: 7px 14px; border-radius: 99px;
    background: var(--blue-050); color: var(--blue-700); font-size: .82rem; font-weight: 600;
}

/* ── PROFILE ─────────────────────────────────────── */
.profile-card { background: #fff; border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-sm); margin-bottom: 24px; }
.profile-main { display: grid; grid-template-columns: auto 1fr 1.2fr; gap: 32px; align-items: start; }
.profile-avatar-wrap { flex-shrink: 0; }
.profile-avatar {
    width: 150px; height: 150px; border-radius: 50%; object-fit: cover;
    border: 5px solid var(--blue-050); box-shadow: var(--shadow-sm);
}
.profile-name { font-size: 1.9rem; font-weight: 800; color: var(--ink); }
.profile-agency { color: var(--blue-700); font-weight: 600; margin-bottom: 14px; }
.profile-contacts { display: flex; flex-direction: column; gap: 8px; }
.contact-item { display: flex; align-items: center; gap: 10px; color: var(--text-soft); font-size: .94rem; }
.contact-item i { color: var(--blue-600); }
.profile-expertise-panel { background: var(--blue-050); border-radius: var(--radius); padding: 24px; }
.expertise-title { font-size: 1.1rem; font-weight: 800; margin-bottom: 12px; color: var(--ink); }
.expertise-text { color: var(--text); line-height: 1.8; margin-bottom: 16px; font-size: .92rem; }
.profile-studies-section { margin-top: 8px; }
.section-heading { font-size: 1.3rem; font-weight: 800; color: var(--ink); margin-bottom: 18px; }
.studies-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.study-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; height: 100%; transition: var(--t); }
.study-card-link:hover .study-card { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--blue-100); }
.study-card-category {
    display: inline-block; padding: 5px 12px; border-radius: 99px;
    background: var(--blue-050); color: var(--blue-700); font-size: .76rem; font-weight: 700; margin-bottom: 12px;
}
.study-card-title { font-size: 1.02rem; font-weight: 700; color: var(--ink); margin-bottom: 12px; line-height: 1.4; }
.study-card-meta, .study-card-date { color: var(--text-soft); font-size: .86rem; margin-bottom: 4px; }
.study-card-meta i, .study-card-date i { color: var(--blue-500); margin-right: 4px; }

/* ── EVENTS ──────────────────────────────────────── */
.modern-events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
.modern-event-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: var(--t); }
.modern-event-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.event-cover { height: 130px; background: linear-gradient(135deg, var(--blue-600), var(--navy-800)); position: relative; }
.event-date-badge {
    position: absolute; top: 18px; left: 18px;
    width: 64px; height: 72px; border-radius: 14px; background: #fff;
    display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: var(--shadow-sm);
}
.event-date-badge span { font-size: .72rem; color: var(--text-soft); text-transform: uppercase; }
.event-date-badge strong { font-size: 1.5rem; color: var(--blue-700); line-height: 1; }
.event-body { padding: 22px; }
.event-category {
    display: inline-block; padding: 5px 12px; border-radius: 99px;
    background: var(--blue-050); color: var(--blue-700); font-size: .76rem; font-weight: 700; margin-bottom: 12px;
}
.event-body h4 { font-size: 1.15rem; font-weight: 800; color: var(--ink); margin-bottom: 12px; }
.event-meta { color: var(--text-soft); font-size: .88rem; margin-bottom: 12px; }
.event-meta i { color: var(--blue-500); }
.event-footer { display: flex; gap: 10px; margin-top: 18px; }
.event-footer .btn { flex: 1; }
.event-action-btn.active-status { background: var(--blue-700); color: #fff; border-color: var(--blue-700); }

/* ── FORUM ───────────────────────────────────────── */
.forum-layout { display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: start; }
.forum-sidebar { position: sticky; top: calc(var(--header-h) + 20px); }
.forum-filter-nav { background: #fff; border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow-sm); margin-top: 14px; }
.forum-filter-link {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; border-radius: 12px; color: var(--text);
    font-weight: 600; font-size: .92rem; margin-bottom: 4px; transition: var(--t);
}
.forum-filter-link:hover { background: var(--blue-050); color: var(--blue-700); }
.forum-filter-link.active { background: var(--blue-100); color: var(--navy-800); }
.forum-stat { background: rgba(255,255,255,.16); border-radius: 14px; padding: 16px 22px; text-align: center; }
.discussion-composer { margin-bottom: 24px; }
.composer-card { background: #fff; border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-sm); }
.composer-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; font-weight: 600; color: var(--text-soft); }
.discussion-input {
    width: 100%; border: 1px solid var(--line); background: var(--bg);
    border-radius: 14px; padding: 16px; resize: vertical; min-height: 90px;
    font-family: inherit; font-size: .95rem;
}
.discussion-input:focus { outline: none; border-color: var(--blue-400); box-shadow: 0 0 0 4px rgba(59,130,246,.12); }
.composer-footer { margin-top: 14px; display: flex; justify-content: flex-end; }
.discussion-feed { display: flex; flex-direction: column; gap: 18px; }
.discussion-card { background: #fff; border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm); }
.discussion-header { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.discussion-avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.discussion-header h5 { font-weight: 700; font-size: 1rem; color: var(--ink); margin: 0; }
.discussion-meta { color: var(--text-soft); font-size: .85rem; }
.discussion-content { line-height: 1.8; color: var(--text); margin-bottom: 16px; }
.discussion-footer { display: flex; gap: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.discussion-action {
    border: none; background: none; cursor: pointer; color: var(--text-soft);
    display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: .9rem; transition: var(--t);
}
.discussion-action:hover { color: var(--blue-700); }
.like-btn:hover { color: var(--danger); }
.like-btn.liked, .like-btn.liked i { color: var(--danger); }
.reply-input:focus { outline: none; border-color: var(--blue-400) !important; box-shadow: 0 0 0 3px rgba(59,130,246,.12); }

/* ── BUTTONS / FORM / MODAL ──────────────────────── */
.btn-primary, .btn.btn-primary {
    background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
    border: none; color: #fff; font-weight: 600; border-radius: 12px; padding: 10px 20px;
}
.btn-primary:hover, .btn.btn-primary:hover { background: linear-gradient(135deg, var(--blue-700), var(--navy-800)); box-shadow: 0 8px 22px rgba(37,99,235,.32); }
.btn-outline-primary { border: 1.5px solid var(--blue-600); color: var(--blue-700); background: #fff; font-weight: 600; border-radius: 12px; }
.btn-outline-primary:hover { background: var(--blue-600); color: #fff; }
.btn-primary-outline { border: 1.5px solid var(--blue-600); color: var(--blue-700); background: #fff; font-weight: 600; border-radius: 12px; padding: 9px 18px; transition: var(--t); }
.btn-primary-outline:hover { background: var(--blue-600); color: #fff; }
.text-primary { color: var(--blue-700) !important; }
.modal-content { border: none; border-radius: var(--radius-lg); overflow: hidden; }
.modal-header { background: linear-gradient(135deg, var(--blue-600), var(--blue-700)); color: #fff; border: none; }
.modal-header .btn-close { filter: invert(1) grayscale(1) brightness(2); }
.form-control { border-radius: 12px; border: 1px solid var(--line); padding: 11px 14px; }
.form-control:focus { border-color: var(--blue-400); box-shadow: 0 0 0 4px rgba(59,130,246,.12); }
.form-label { font-weight: 600; font-size: .9rem; color: var(--ink); }
.alert { border: none; border-radius: 14px; }
.alert-success { background: #ecfdf5; color: #065f46; }
.alert-danger  { background: #fef2f2; color: #991b1b; }

/* ── LOGIN ───────────────────────────────────────── */
.login-body {
    font-family: 'DM Sans', sans-serif; min-height: 100vh;
    background: linear-gradient(135deg, var(--navy-900) 0%, var(--blue-700) 100%); overflow-x: hidden;
}
.login-wrapper { min-height: 100vh; display: grid; grid-template-columns: 1fr 480px; }
.login-left {
    position: relative; display: flex; align-items: center; padding: 70px;
    color: #fff; overflow: hidden; background: linear-gradient(160deg, var(--navy-900), var(--blue-700));
}
.login-left::before, .login-left::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.06); }
.login-left::before { width: 520px; height: 520px; top: -180px; right: -120px; }
.login-left::after  { width: 360px; height: 360px; bottom: -120px; left: -100px; }
.login-brand-content { position: relative; z-index: 2; max-width: 560px; }
.login-logo-icon {
    width: 80px; height: 80px; border-radius: 22px;
    background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center;
    font-size: 2.2rem; color: #fff; margin-bottom: 28px;
}
.login-title { font-size: 3.4rem; font-weight: 900; line-height: 1; letter-spacing: -1px; }
.login-subtitle { font-size: 2rem; font-weight: 700; line-height: 1.15; margin-top: 10px; opacity: .95; }
.login-footer-info { margin-top: 40px; font-size: .92rem; opacity: .85; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.login-divider { opacity: .5; }
.login-right { display: flex; align-items: center; justify-content: center; padding: 40px; background: #fff; }
.login-card { width: 100%; max-width: 380px; }
.login-card-logo {
    width: 60px; height: 60px; border-radius: 18px;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
    color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; margin-bottom: 22px;
}
.login-card-title { font-size: 1.7rem; font-weight: 800; color: var(--ink); }
.login-card-sub { color: var(--text-soft); margin-bottom: 26px; }
.login-form { margin-top: 4px; }
.login-label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 8px; color: var(--ink); }
.login-input-wrap { position: relative; }
.login-input {
    width: 100%; height: 52px; border: 1px solid var(--line); border-radius: 14px;
    padding: 0 16px; font-size: .98rem; background: var(--bg); transition: var(--t);
}
.login-input:focus { outline: none; border-color: var(--blue-400); background: #fff; box-shadow: 0 0 0 4px rgba(59,130,246,.15); }
.login-eye { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); border: none; background: none; color: var(--text-soft); font-size: 1.1rem; cursor: pointer; }
.login-btn {
    width: 100%; height: 52px; border: none; border-radius: 14px;
    font-weight: 700; font-size: 1rem; color: #fff;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-700)); transition: var(--t); cursor: pointer;
}
.login-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(37,99,235,.35); }
.login-help { text-align: center; margin-top: 20px; color: var(--text-soft); font-size: .86rem; }

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 1100px) {
    .study-content-layout { grid-template-columns: 1fr; }
    .profile-main { grid-template-columns: auto 1fr; }
    .profile-expertise-panel { grid-column: 1 / -1; }
}
@media (max-width: 991px) {
    .app-sidebar { transform: translateX(-100%); }
    .app-sidebar.show { transform: translateX(0); }
    .app-header { margin-left: 0; }
    .app-main { margin-left: 0; }
    .sidebar-toggle { display: flex; }
    .db-categories-grid { grid-template-columns: 1fr; }
    .forum-layout { grid-template-columns: 1fr; }
    .forum-sidebar { position: static; }
    .login-wrapper { grid-template-columns: 1fr; }
    .login-left { display: none; }
}
@media (max-width: 640px) {
    .app-main { padding: 18px; }
    .page-title { font-size: 1.4rem; }
    .brand-sub { display: none; }
    .user-name { display: none !important; }
    .profile-main { grid-template-columns: 1fr; text-align: center; }
    .profile-avatar-wrap { display: flex; justify-content: center; }
    .profile-contacts { align-items: center; }
    .study-hero-modern, .events-hero, .forum-hero { padding: 24px; }
    .study-hero-modern h1 { font-size: 1.5rem; }
    .event-footer { flex-direction: column; }
    .modern-events-grid { grid-template-columns: 1fr; }
    .login-title { font-size: 2.6rem; }
}
.study-card {
    position: relative;
    border-radius: 12px;
}

.study-card-header .dropdown-toggle::after {
    display: none;
}

.study-card .dropdown-menu {
    min-width: 150px;
    border-radius: 10px;
}

.study-card .dropdown-item {
    font-size: 0.9rem;
}