@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=DM+Sans:opsz,wght@9..40,300;400;500;600;700&display=swap');

/* ── CSS VARIABLES ── */
:root {
    --navy:   #0d2348;
    --navy2:  #163a6e;
    --navy3:  #1e4f9c;
    --border: #dde3f0;
    --bg:     #f2f5fa;
    --text:   #111827;
    --muted:  #6b7a99;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

.font-serif-display { font-family: 'Instrument Serif', serif; }


/* ════════════════════════════════════════
   HEADER
════════════════════════════════════════ */

.site-header {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 55%, var(--navy3) 100%);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 16px rgba(13,35,72,.25);
}

.header-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    gap: 1rem;
}

/* ── Logo ── */
.logo-wrap {
    display: flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
    flex-shrink: 0;
}
.logo-img   { height: 38px; width: auto; object-fit: contain; }
.logo-title { color: #fff; font-weight: 700; font-size: .95rem; line-height: 1.2; }
.logo-sub   { color: rgba(255,255,255,.5); font-size: .72rem; line-height: 1.2; }

/* ── Desktop nav ── */
.nav-links { display: flex; align-items: center; gap: .25rem; }
.nav-link {
    color: rgba(255,255,255,.65);
    font-size: .83rem;
    font-weight: 500;
    padding: .4rem .75rem;
    border-radius: 6px;
    text-decoration: none;
    transition: color .15s, background .15s;
}
.nav-link:hover  { color: #fff; background: rgba(255,255,255,.1); }
.nav-link.active { color: #fff; background: rgba(255,255,255,.15); }

/* ── Header right ── */
.header-actions { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }

/* ── Notification bell ── */
.notif-btn {
    position: relative;
    color: rgba(255,255,255,.65);
    background: none;
    border: none;
    cursor: pointer;
    padding: .3rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    transition: color .15s, background .15s;
}
.notif-btn:hover { color: #fff; background: rgba(255,255,255,.1); }
.notif-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--navy);
}

/* ── User dropdown trigger ── */
.dropdown-wrap   { position: relative; }
.user-trigger {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,.75);
    font-size: .83rem;
    font-weight: 500;
    padding: .3rem .5rem;
    border-radius: 7px;
    font-family: 'DM Sans', sans-serif;
    transition: color .15s, background .15s;
}
.user-trigger:hover { color: #fff; background: rgba(255,255,255,.1); }
.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    color: #fff;
    font-weight: 700;
    font-size: .8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid rgba(255,255,255,.25);
    flex-shrink: 0;
}

/* ── Dropdown menu ── */
.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + .5rem);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(13,35,72,.15);
    min-width: 180px;
    overflow: hidden;
    z-index: 100;
}
.dropdown-menu.open {
    display: block;
    animation: dropIn .15s ease;
}
@keyframes dropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.dropdown-header {
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--border);
    background: #fafbfe;
}
.dropdown-name  { font-weight: 700; font-size: .85rem; color: var(--navy); }
.dropdown-email { font-size: .74rem; color: var(--muted); margin-top: 1px; }
.dropdown-item {
    display: block;
    width: 100%;
    padding: .55rem 1rem;
    font-size: .83rem;
    color: #374151;
    text-decoration: none;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: background .12s;
}
.dropdown-item:hover        { background: #f5f7ff; color: var(--navy2); }
.dropdown-item.danger       { color: #dc2626; }
.dropdown-item.danger:hover { background: #fff1f2; }
.dropdown-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: .25rem 0;
}

/* ── Mobile toggle ── */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,.75);
    padding: .3rem;
    border-radius: 6px;
    align-items: center;
    transition: color .15s, background .15s;
}
.mobile-toggle:hover { color: #fff; background: rgba(255,255,255,.1); }

/* ── Mobile nav ── */
.mobile-nav {
    display: none;
    border-top: 1px solid rgba(255,255,255,.1);
    padding: .75rem 1.5rem;
    gap: .25rem;
    flex-direction: column;
}
.mobile-nav.open          { display: flex; }
.mobile-nav .nav-link     { padding: .55rem .75rem; }


/* ════════════════════════════════════════
   FOOTER
════════════════════════════════════════ */

.site-footer {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 60%, #1a3560 100%);
    border-top: 1px solid rgba(255,255,255,.08);
    margin-top: auto;
}
.footer-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 3rem 1.5rem 2rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.2fr;
    gap: 3rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-logo-wrap  { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.footer-logo-img   { height: 38px; width: auto; object-fit: contain; }
.footer-logo-title { color: #fff; font-weight: 700; font-size: .95rem; line-height: 1.2; }
.footer-logo-sub   { color: rgba(255,255,255,.45); font-size: .72rem; line-height: 1.2; }
.footer-desc {
    color: rgba(255,255,255,.45);
    font-size: .82rem;
    line-height: 1.65;
    margin-top: .75rem;
}
.footer-heading {
    color: rgba(255,255,255,.5);
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin: 0 0 1rem;
}
.footer-link {
    display: block;
    color: rgba(255,255,255,.55);
    font-size: .83rem;
    text-decoration: none;
    padding: .2rem 0;
    transition: color .15s;
}
.footer-link:hover { color: #fff; }
.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    color: rgba(255,255,255,.5);
    font-size: .82rem;
    margin-bottom: .6rem;
}
.footer-contact-item svg { flex-shrink: 0; margin-top: 1px; color: rgba(255,255,255,.3); }
.footer-socials { display: flex; gap: .6rem; margin-top: 1.25rem; }
.social-btn {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.5);
    text-decoration: none;
    transition: background .15s, color .15s;
}
.social-btn:hover { background: rgba(255,255,255,.16); color: #fff; }
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.5rem;
    font-size: .78rem;
    color: rgba(255,255,255,.3);
    flex-wrap: wrap;
    gap: .5rem;
}
.footer-bottom-links { display: flex; gap: 1.25rem; }
.footer-bottom a { color: rgba(255,255,255,.4); text-decoration: none; transition: color .15s; }
.footer-bottom a:hover { color: rgba(255,255,255,.7); }


/* ════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════ */

@media (max-width: 768px) {
    .nav-links       { display: none; }
    .mobile-toggle   { display: flex; }
    .user-name-text  { display: none; }
    .footer-grid     { grid-template-columns: 1fr; gap: 2rem; }
    .footer-bottom   { flex-direction: column; align-items: flex-start; }
}