/**
 * Wardiyat shared theme: loaded on every area after the page's own styles.
 *   1. Tokens + font
 *   2. Site shell (navbar, account menu, footer) for the public / job-seeker pages
 *   3. Polish shared by all areas
 *   4. Dark mode base for the public / job-seeker pages (Bootstrap surfaces, inline colours)
 * Page-specific dark rules live in wardiyat-dark-generated.css (built by resources/tools/build_dark_css.py).
 */

/* ── 1. Tokens + font ─────────────────────────────────────── */

:root {
    --primary: #7c3aed;
    --primary-50: #f5f3ff;
    --primary-100: #ede9fe;
    --primary-200: #ddd6fe;
    --primary-300: #c4b5fd;
    --primary-700: #6d28d9;
    --primary-800: #5b21b6;
    --danger: #dc2626;
    --wd-font: 'Thmanyah Serif Display', 'IBM Plex Sans Arabic', Inter, system-ui, -apple-system, sans-serif;
    --font-body: var(--wd-font);
    --font-display: var(--wd-font);
    --font-1: var(--wd-font);
}

body,
body .btn, body .form-control, body .form-select, body input, body select, body textarea, body button,
body h1, body h2, body h3, body h4, body h5, body h6 {
    font-family: var(--wd-font) !important;
}

/* ── 2. Site shell ────────────────────────────────────────── */

.wd-shell { font-size: 16px; line-height: 1.6; }
.wd-shell a { text-decoration: none; }
.wd-shell img { max-width: 100%; }
.wd-shell *, .wd-shell *::before, .wd-shell *::after { box-sizing: border-box; }
.wd-site-nav { margin-bottom: 24px; }
.wd-shell--footer { margin-top: 56px; }
.wd-shell--footer .mkt-footer { padding-top: 48px; }

.wd-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-inline: auto;
}

.wd-menu__link {
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--mkt-ink-2);
    border: 1px solid transparent;
    transition: background 180ms var(--mkt-ease), color 180ms var(--mkt-ease), border-color 180ms var(--mkt-ease);
    white-space: nowrap;
}

.wd-menu__link:hover,
.wd-menu__link:focus-visible {
    background: var(--mkt-primary-50, var(--primary-50));
    border-color: var(--primary-100);
    color: var(--mkt-primary);
    outline: none;
}

.wd-theme {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--mkt-line-strong);
    background: var(--mkt-surface);
    color: var(--mkt-ink-2);
    cursor: pointer;
    transition: color 180ms var(--mkt-ease), border-color 180ms var(--mkt-ease), transform 180ms var(--mkt-ease);
}

.wd-theme:hover {
    color: var(--mkt-primary);
    border-color: var(--primary-300);
    transform: translateY(-1px);
}

.wd-theme svg {
    width: 18px;
    height: 18px;
}

.wd-theme .wd-theme__sun,
html[data-theme='dark'] .wd-theme .wd-theme__moon {
    display: none;
}

html[data-theme='dark'] .wd-theme .wd-theme__sun {
    display: block;
}

.mkt-nav__logo {
    height: 44px;
    width: auto;
}

html[data-theme='dark'] .mkt-nav__logo,
.wd-footer__logo {
    filter: brightness(0) invert(1);
}

.wd-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font: 900 22px/1 var(--font-display);
    color: var(--mkt-ink);
}

.mkt-nav__burger {
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mkt-nav__burger svg {
    width: 20px;
    height: 20px;
}

.mkt-drawer[hidden] {
    display: none;
}

@media (max-width: 1080px) {
    .wd-menu {
        display: none;
    }
    .mkt-nav__actions {
        margin-inline-start: auto;
    }
    .mkt-nav__burger {
        display: inline-flex;
    }
}

@media (max-width: 640px) {
    .wd-hide-sm {
        display: none !important;
    }
}

.wd-stores {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.wd-store {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    border-radius: 14px;
    background: rgba(11, 5, 24, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: #fff;
    backdrop-filter: blur(8px);
    transition: transform 200ms var(--mkt-ease), background 200ms var(--mkt-ease);
}

.wd-store:hover {
    transform: translateY(-2px);
    background: rgba(11, 5, 24, 0.8);
    color: #fff;
}

.wd-store svg {
    width: 22px;
    height: 22px;
    flex: none;
}

.wd-store small {
    display: block;
    font-size: 10px;
    opacity: 0.75;
    line-height: 1.2;
}

.wd-store strong {
    display: block;
    font-size: 14px;
    line-height: 1.3;
    font-family: Inter, system-ui, sans-serif;
}

.wd-footer__grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
    gap: 36px;
    padding-block: 12px 36px;
}

.wd-footer__about {
    margin: 14px 0 0;
    max-width: 44ch;
    font-size: 14.5px;
    line-height: 1.8;
    color: var(--mkt-on-dark-muted);
}

.wd-footer__logo {
    height: 48px;
    width: auto;
    align-self: flex-start;
}

.wd-footer__col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.wd-footer .wd-stores {
    flex-direction: column;
    align-items: flex-start;
}

@media (max-width: 1024px) {
    .wd-footer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .wd-footer__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 26px;
    }
}

.wd-menu__link.is-active {
    background: var(--primary-100);
    color: var(--mkt-primary);
}

.wd-bell { position: relative; text-decoration: none; }
.wd-bell__count {
    position: absolute;
    inset-block-start: -6px;
    inset-inline-end: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: #e11d48;
    color: #fff;
    font: 700 11px/20px Inter, system-ui, sans-serif;
    text-align: center;
}

.wd-user { position: relative; }
.wd-user__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 4px 10px 4px 4px;
    padding-inline: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--mkt-line-strong);
    background: var(--mkt-surface);
    color: var(--mkt-ink);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 180ms, box-shadow 180ms;
}
.wd-user__btn:hover { border-color: var(--primary-300); box-shadow: var(--mkt-shadow-sm); }
.wd-user__avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; }
.wd-user__avatar--initial { display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #7c3aed, #a78bfa); color: #fff; font-weight: 800; }
.wd-user__caret { width: 14px; height: 14px; color: var(--mkt-muted); }
.wd-user__menu {
    position: absolute;
    inset-block-start: calc(100% + 8px);
    inset-inline-end: 0;
    z-index: 80;
    min-width: 200px;
    padding: 8px;
    border-radius: 16px;
    background: var(--mkt-surface);
    border: 1px solid var(--mkt-line);
    box-shadow: var(--mkt-shadow-lg);
}
.wd-user__menu[hidden] { display: none; }
.wd-user__menu a, .wd-user__menu button {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: var(--mkt-ink-2);
    font: inherit;
    font-size: 14.500px;
    font-weight: 600;
    text-align: start;
    cursor: pointer;
}
.wd-user__menu a:hover, .wd-user__menu button:hover { background: var(--mkt-tint-2); color: var(--mkt-primary); }
.wd-user__menu .is-danger { color: var(--danger); }
.wd-user__menu form { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--mkt-line); }

/* Phones: keep the bar on one row */
@media (max-width: 640px) {
    .wd-site-nav .mkt-nav__inner { flex-wrap: nowrap; gap: 8px; height: 64px; padding-inline: 14px; }
    .wd-site-nav .mkt-nav__brand { flex: 0 1 auto; min-width: 0; }
    .wd-site-nav .mkt-nav__logo { height: 32px; width: auto; }
    .wd-site-nav .mkt-nav__actions { gap: 6px; margin-inline-start: auto; flex: none; }
    .wd-site-nav .wd-theme, .wd-site-nav .mkt-nav__burger { width: 38px; height: 38px; }
    .wd-site-nav .wd-user__btn { height: 40px; padding: 3px; padding-inline: 3px; }
    .wd-site-nav .wd-user__caret { display: none; }
    .wd-site-nav .wd-user__avatar { width: 32px; height: 32px; }
    .wd-site-nav .mkt-btn--sm { padding: 9px 14px; font-size: 13px; }
    .wd-site-nav { margin-bottom: 14px; }
}

/* ── 3. Polish shared by all areas ────────────────────────── */

/* Cards: softer corners, a hairline border and a gentle lift on hover */
.card {
    border-radius: 18px !important;
    border: 1px solid rgba(124, 58, 237, 0.10) !important;
    box-shadow: 0 1px 2px rgba(15, 8, 40, 0.04), 0 10px 28px -18px rgba(76, 29, 149, 0.28) !important;
    transition: box-shadow 220ms cubic-bezier(.2, .8, .2, 1), transform 220ms cubic-bezier(.2, .8, .2, 1);
}
.card > .card-header:first-child { border-radius: 18px 18px 0 0 !important; }
.card-header { border-bottom: 1px solid rgba(124, 58, 237, 0.10) !important; }
.card-title { font-weight: 800 !important; letter-spacing: 0 !important; }

/* Buttons: pill shape, brand gradient for the main action */
.btn { border-radius: 999px !important; font-weight: 700 !important; transition: transform 160ms, box-shadow 160ms, background-color 160ms, border-color 160ms !important; }
.btn-sm { padding-inline: 14px !important; }
.btn-primary, .btn-primary:focus {
    background-image: linear-gradient(135deg, #7c3aed, #8b5cf6 60%, #a78bfa) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 10px 22px -12px rgba(124, 58, 237, 0.75) !important;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 26px -12px rgba(124, 58, 237, 0.85) !important; filter: brightness(1.05); }
.btn-primary:active { transform: translateY(0); }
.btn-outline-primary { border-color: #c4b5fd !important; color: #6d28d9 !important; }
.btn-outline-primary:hover { background: #7c3aed !important; border-color: #7c3aed !important; color: #fff !important; }

/* Form fields */
.form-control, .form-select, .select2-container--default .select2-selection--single, .select2-container--default .select2-selection--multiple {
    border-radius: 12px !important;
    border-color: #e4dcfb !important;
    transition: border-color 160ms, box-shadow 160ms !important;
}
.form-control:focus, .form-select:focus, .select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #8b5cf6 !important;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18) !important;
}
.form-label { font-weight: 700 !important; }

/* Tables */
.table thead th { font-size: 12.500px; font-weight: 800 !important; letter-spacing: 0; white-space: nowrap; border-bottom-width: 1px !important; }
.table td, .table th { vertical-align: middle; }
.table-responsive { border-radius: 14px; }

/* Badges, dropdowns, modals */
.badge { border-radius: 999px !important; font-weight: 700 !important; padding: 5px 10px !important; }
.dropdown-menu { border-radius: 16px !important; border: 1px solid rgba(124, 58, 237, 0.12) !important; box-shadow: 0 24px 48px -24px rgba(49, 16, 110, 0.45) !important; padding: 8px !important; }
.dropdown-item { border-radius: 10px !important; }
.modal-content { border-radius: 22px !important; border: 0 !important; box-shadow: 0 40px 90px -30px rgba(49, 16, 110, 0.55) !important; }
.alert { border-radius: 14px !important; }
.pagination .page-link { border-radius: 10px !important; margin-inline: 2px; }

/* Dashboards (company + admin): glass top bar, page title, sidebar */
.header { backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); }
.page-titles .welcome-text h4 {
    font-weight: 900 !important;
    background: linear-gradient(100deg, #6366f1, #7c3aed 45%, #d946ef);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
}
.quixnav .metismenu > li > a { border-radius: 14px !important; transition: background-color 180ms, color 180ms, transform 180ms !important; }
.quixnav .metismenu > li:not(.mm-active) > a:hover { transform: translateX(-2px); }
[dir='ltr'] .quixnav .metismenu > li:not(.mm-active) > a:hover { transform: translateX(2px); }
.quixnav .metismenu > li.mm-active > a { box-shadow: 0 12px 24px -14px rgba(124, 58, 237, 0.9) !important; }

@media (prefers-reduced-motion: reduce) {
    .card, .btn, .quixnav .metismenu > li > a { transition: none !important; }
    .btn-primary:hover, .quixnav .metismenu > li:not(.mm-active) > a:hover { transform: none; }
}

::selection { background: #ddd6fe; color: #3b0764; }
:focus-visible { outline: 2px solid #8b5cf6; outline-offset: 2px; }
html { scrollbar-color: #c4b5fd transparent; }

/* Job-seeker sidebar: the current page is a light pill with a purple label and a filled purple icon */
html:not([data-theme='dark']) .ap-side__link.is-active,
html:not([data-theme='dark']) .ap-side__link.is-active span { color: #6d28d9 !important; }
.ap-side__link.is-active i { color: #fff !important; }
/* Dark mode: soften the icon chips so they don't glow on the dark sidebar */
html[data-theme='dark'] .ap-side__link i { background: #23143f; color: #c4b5fd; }
html[data-theme='dark'] .ap-side__link.is-active::before { display: none; }

/* ── 4. Dark mode ─────────────────────────────────────────── */

html[data-theme='dark'] .mkt-portal,
html[data-theme='dark'] .mkt {
    --mkt-ink: #f7f3ff;
    --mkt-ink-2: #d9d2ee;
    --mkt-muted: #a8a1c0;
    --mkt-muted-2: #8780a1;
    --mkt-surface: #150a2b;
    --mkt-tint: #1b0f36;
    --mkt-tint-2: #23143f;
    --mkt-line: #2f2350;
    --mkt-line-strong: #40305f;
    --mkt-primary: #a78bfa;
    --mkt-primary-50: #23143f;
    --primary-50: #23143f;
    --primary-100: #2f1c57;
    --primary-200: #45297c;
    --primary-300: #5b3aa0;
    --mkt-shadow-sm: 0 2px 8px rgb(0 0 0 / 40%);
    --mkt-shadow-lg: 0 32px 64px -24px rgb(0 0 0 / 70%);
}
html[data-theme='dark'] .wd-site-nav { background: rgb(21 10 43 / 82%); }
html[data-theme='dark'] .wd-site-nav.is-stuck { background: rgb(21 10 43 / 95%); }
html[data-theme='dark'] .wd-shell .mkt-nav__logo { filter: brightness(0) invert(1); }
html[data-theme='dark'] .wd-shell .mkt-drawer__panel, html[data-theme='dark'] .wd-shell .mkt-lang__btn.is-on { background: #1b0f36; }
html[data-theme='dark'] .wd-shell .mkt-btn--ghost { background: #23143f; color: #f7f3ff; }
html[data-theme='dark'] .wd-shell .mkt-btn--primary { background: #7c3aed; color: #fff; }

/* Bootstrap pages of the public site and the job-seeker area */
html[data-theme='dark'] { color-scheme: dark; }
html[data-theme='dark'] body { background-color: #120824 !important; color: #e6e0f5 !important; }
html[data-theme='dark'] main.content, html[data-theme='dark'] .dashboard { background-color: transparent !important; }

/* Colours written straight into style="" attributes */
html[data-theme='dark'] [style*='background: #fff'], html[data-theme='dark'] [style*='background:#fff'],
html[data-theme='dark'] [style*='background-color: #fff'], html[data-theme='dark'] [style*='background-color:#fff'],
html[data-theme='dark'] [style*='background: white'], html[data-theme='dark'] [style*='background-color: white'],
html[data-theme='dark'] [style*='background: #FFF'], html[data-theme='dark'] [style*='background-color: #FFF'] {
    background-color: #1b0f36 !important;
}
html[data-theme='dark'] [style*='background: #f8'], html[data-theme='dark'] [style*='background:#f8'],
html[data-theme='dark'] [style*='background-color: #f8'], html[data-theme='dark'] [style*='background-color:#f8'],
html[data-theme='dark'] [style*='background: #f9'], html[data-theme='dark'] [style*='background-color: #f9'],
html[data-theme='dark'] [style*='background: #f5'], html[data-theme='dark'] [style*='background-color: #f5'],
html[data-theme='dark'] [style*='background: #f1'], html[data-theme='dark'] [style*='background-color: #f1'],
html[data-theme='dark'] [style*='background: #f3'], html[data-theme='dark'] [style*='background-color: #f3'],
html[data-theme='dark'] [style*='background: #f4'], html[data-theme='dark'] [style*='background-color: #f4'],
html[data-theme='dark'] [style*='background: #f6'], html[data-theme='dark'] [style*='background-color: #f6'],
html[data-theme='dark'] [style*='background: #f7'], html[data-theme='dark'] [style*='background-color: #f7'],
html[data-theme='dark'] [style*='background: #eee'], html[data-theme='dark'] [style*='background-color: #eee'],
html[data-theme='dark'] [style*='background: #e9ecef'], html[data-theme='dark'] [style*='background-color: #e9ecef'] {
    background-color: #23143f !important;
}
html[data-theme='dark'] [style*='color: #000'], html[data-theme='dark'] [style*='color:#000'],
html[data-theme='dark'] [style*='color: #111'], html[data-theme='dark'] [style*='color: #222'],
html[data-theme='dark'] [style*='color: #333'], html[data-theme='dark'] [style*='color:#333'],
html[data-theme='dark'] [style*='color: #212529'], html[data-theme='dark'] [style*='color: #0f172a'],
html[data-theme='dark'] [style*='color: #1e293b'], html[data-theme='dark'] [style*='color: #1f2937'],
html[data-theme='dark'] [style*='color: #334155'], html[data-theme='dark'] [style*='color: #343a40'],
html[data-theme='dark'] [style*='color: black'] {
    color: #f1ecff !important;
}
html[data-theme='dark'] [style*='color: #666'], html[data-theme='dark'] [style*='color:#666'],
html[data-theme='dark'] [style*='color: #555'], html[data-theme='dark'] [style*='color: #777'],
html[data-theme='dark'] [style*='color: #6c757d'], html[data-theme='dark'] [style*='color: #64748b'],
html[data-theme='dark'] [style*='color: #475569'], html[data-theme='dark'] [style*='color: #504545'],
html[data-theme='dark'] [style*='color: #7b6969'], html[data-theme='dark'] [style*='color: #6b7280'] {
    color: #a8a1c0 !important;
}
html[data-theme='dark'] [style*='border: 1px solid #e'], html[data-theme='dark'] [style*='border:1px solid #e'],
html[data-theme='dark'] [style*='border: 1px solid #d'], html[data-theme='dark'] [style*='border-color: #e'],
html[data-theme='dark'] [style*='border-bottom: 1px solid #e'], html[data-theme='dark'] [style*='border-top: 1px solid #e'] {
    border-color: #2f2350 !important;
}

/* Images that are dark artwork on a transparent background */
html[data-theme='dark'] img[src*='wardiyat-default.png'] { filter: none; }

/* Dark counterparts of the shared polish */
html[data-theme='dark'] .card { border-color: #2f2350 !important; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 30px -18px rgba(0, 0, 0, 0.8) !important; }
html[data-theme='dark'] .card-header { border-bottom-color: #2f2350 !important; }
html[data-theme='dark'] .form-control, html[data-theme='dark'] .form-select { border-color: #40305f !important; }
html[data-theme='dark'] .btn-outline-primary { border-color: #5b3aa0 !important; color: #c4b5fd !important; }
html[data-theme='dark'] .dropdown-menu { border-color: #2f2350 !important; }
html[data-theme='dark'] .page-titles .welcome-text h4 { background: linear-gradient(100deg, #a5b4fc, #c4b5fd 45%, #f0abfc); -webkit-background-clip: text; background-clip: text; }

/* ══ Fancy navbars ═══════════════════════════════════════════
   A. Company / admin dashboard top bar
   B. Site navbar (job seekers and public inner pages)
   ════════════════════════════════════════════════════════════ */

/* A. Dashboard top bar */
.header, .nav-header {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .86), rgba(250, 247, 255, .86)) !important;
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 0 !important;
    box-shadow: 0 10px 30px -24px rgba(76, 29, 149, .45) !important;
}
.header::after, .nav-header::after {
    content: '';
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #a78bfa 20%, #7c3aed 45%, #d946ef 70%, transparent);
    background-size: 200% 100%;
    animation: wdBarShine 9s linear infinite;
    opacity: .75;
}
@keyframes wdBarShine { to { background-position: -200% 0; } }

.nav-control .hamburger {
    background: linear-gradient(135deg, #7c3aed, #a78bfa) !important;
    border-radius: 14px !important;
    box-shadow: 0 10px 20px -12px rgba(124, 58, 237, .9);
}
.nav-control .hamburger .line { background: #fff !important; }

.mt-greeting {
    padding: 8px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(237, 233, 254, .9), rgba(250, 232, 255, .7));
    border: 1px solid rgba(167, 139, 250, .35);
}
.mt-greeting__name {
    font-weight: 900 !important;
    background: linear-gradient(100deg, #5b21b6, #7c3aed 50%, #c026d3);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
}

.header-right { gap: 8px !important; }
.header-right .mt-nav-item .mt-nav-link {
    position: relative;
    width: 44px;
    justify-content: center;
    padding: 0 !important;
    border-radius: 14px !important;
    background: #fff !important;
    border: 1px solid rgba(124, 58, 237, .14) !important;
    color: #5b21b6 !important;
    box-shadow: 0 6px 16px -12px rgba(76, 29, 149, .5);
    transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s, background .2s, color .2s !important;
}
.header-right .mt-nav-item.dropdown .mt-nav-link { width: auto; padding: 0 12px !important; gap: 6px; }
.header-right .mt-nav-item .mt-nav-link i { font-size: 18px; color: inherit !important; }
.header-right .mt-nav-item .mt-nav-link:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #7c3aed, #a78bfa) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 12px 22px -12px rgba(124, 58, 237, .9);
}
.header-right .badge-danger {
    background: linear-gradient(135deg, #f43f5e, #e11d48) !important;
    box-shadow: 0 0 0 2px #fff, 0 6px 12px -4px rgba(225, 29, 72, .6);
    animation: wdBadgePulse 2.4s ease-in-out infinite;
}
@keyframes wdBadgePulse { 50% { box-shadow: 0 0 0 2px #fff, 0 0 0 6px rgba(225, 29, 72, .18); } }

.mt-profile .mt-profile-trigger {
    background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, #c4b5fd, #7c3aed, #f0abfc) border-box !important;
    border: 1.5px solid transparent !important;
    box-shadow: 0 8px 20px -14px rgba(76, 29, 149, .6);
}
.mt-avatar {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #a78bfa !important;
}

/* B. Site navbar: floating glass pill */
.wd-site-nav {
    top: 12px;
    width: min(1240px, calc(100% - 24px));
    margin: 12px auto 26px !important;
    border-radius: 22px;
    background: rgba(255, 255, 255, .78) !important;
    border: 1px solid rgba(167, 139, 250, .28) !important;
    box-shadow: 0 18px 40px -30px rgba(76, 29, 149, .55) !important;
}
.wd-site-nav.is-stuck { background: rgba(255, 255, 255, .92) !important; box-shadow: 0 24px 50px -30px rgba(76, 29, 149, .7) !important; }
.wd-site-nav::before {
    content: '';
    position: absolute;
    inset: -1px;
    z-index: -1;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(120deg, rgba(167, 139, 250, .0), rgba(124, 58, 237, .55), rgba(217, 70, 239, .45), rgba(167, 139, 250, .0));
    background-size: 220% 100%;
    animation: wdBarShine 10s linear infinite;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
.wd-site-nav .mkt-nav__inner { height: 68px; padding-inline: 18px; max-width: none; }
.wd-site-nav .wd-menu { gap: 2px; padding: 4px; border-radius: 999px; background: rgba(245, 243, 255, .8); border: 1px solid rgba(167, 139, 250, .2); }
.wd-site-nav .wd-menu__link { padding: 8px 16px; border: 0; }
.wd-site-nav .wd-menu__link:hover { background: #fff; color: #6d28d9; box-shadow: 0 4px 10px -6px rgba(76, 29, 149, .4); }
.wd-site-nav .wd-menu__link.is-active {
    color: #fff !important;
    background: linear-gradient(135deg, #6d28d9, #8b5cf6 60%, #c084fc);
    box-shadow: 0 10px 20px -12px rgba(124, 58, 237, .95);
}
.wd-site-nav .wd-theme { border-radius: 14px; border-color: rgba(124, 58, 237, .16); color: #5b21b6; }
.wd-site-nav .wd-theme:hover { background: linear-gradient(135deg, #7c3aed, #a78bfa); color: #fff; border-color: transparent; transform: translateY(-2px); }
.wd-site-nav .wd-user__btn {
    background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, #c4b5fd, #7c3aed, #f0abfc) border-box;
    border: 1.5px solid transparent;
}
.wd-site-nav .wd-user__avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #a78bfa; }
.wd-site-nav .wd-bell__count { animation: wdBadgePulse 2.4s ease-in-out infinite; box-shadow: 0 0 0 2px #fff; }

@media (max-width: 640px) {
    .wd-site-nav { top: 8px; width: calc(100% - 16px); margin: 8px auto 16px !important; border-radius: 18px; }
    .wd-site-nav .mkt-nav__inner { height: 60px; padding-inline: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .header::after, .nav-header::after, .wd-site-nav::before, .header-right .badge-danger, .wd-site-nav .wd-bell__count { animation: none; }
}

/* Dark versions of the navbars */
html[data-theme='dark'] .header, html[data-theme='dark'] .nav-header {
    background: linear-gradient(180deg, rgba(27, 15, 54, .9), rgba(21, 10, 43, .9)) !important;
    box-shadow: 0 10px 30px -20px rgba(0, 0, 0, .8) !important;
}
html[data-theme='dark'] .mt-greeting { background: linear-gradient(135deg, rgba(47, 28, 87, .9), rgba(76, 29, 149, .5)); border-color: rgba(167, 139, 250, .25); }
html[data-theme='dark'] .mt-greeting__name { background: linear-gradient(100deg, #ddd6fe, #c4b5fd 50%, #f0abfc); -webkit-background-clip: text; background-clip: text; }
html[data-theme='dark'] .header-right .mt-nav-item .mt-nav-link { background: #23143f !important; border-color: #40305f !important; color: #ddd6fe !important; }
html[data-theme='dark'] .header-right .badge-danger { box-shadow: 0 0 0 2px #1b0f36; }
html[data-theme='dark'] .mt-profile .mt-profile-trigger { background: linear-gradient(#1b0f36, #1b0f36) padding-box, linear-gradient(135deg, #5b3aa0, #7c3aed, #a21caf) border-box !important; }
html[data-theme='dark'] .mt-avatar { box-shadow: 0 0 0 2px #1b0f36, 0 0 0 4px #7c3aed !important; }
html[data-theme='dark'] .wd-site-nav { background: rgba(27, 15, 54, .8) !important; border-color: rgba(124, 58, 237, .3) !important; }
html[data-theme='dark'] .wd-site-nav.is-stuck { background: rgba(27, 15, 54, .94) !important; }
html[data-theme='dark'] .wd-site-nav .wd-menu { background: rgba(35, 20, 63, .85); border-color: #2f2350; }
html[data-theme='dark'] .wd-site-nav .wd-menu__link:hover { background: #2f1c57; color: #fff; }
html[data-theme='dark'] .wd-site-nav .wd-theme { background: #23143f; color: #ddd6fe; border-color: #40305f; }
html[data-theme='dark'] .wd-site-nav .wd-user__btn { background: linear-gradient(#1b0f36, #1b0f36) padding-box, linear-gradient(135deg, #5b3aa0, #7c3aed, #a21caf) border-box; }
html[data-theme='dark'] .wd-site-nav .wd-user__avatar { box-shadow: 0 0 0 2px #1b0f36, 0 0 0 3.5px #7c3aed; }
html[data-theme='dark'] .wd-site-nav .wd-bell__count { box-shadow: 0 0 0 2px #1b0f36; }

/* Text set on bare elements by the old stylesheets (p { color: #6A7381 } ...).
   :where() keeps this at element weight, so it only beats other element rules and
   never a page's own class colours (white text on purple stays white). */
:where(html[data-theme='dark']) p,
:where(html[data-theme='dark']) li,
:where(html[data-theme='dark']) label,
:where(html[data-theme='dark']) td,
:where(html[data-theme='dark']) dd,
:where(html[data-theme='dark']) blockquote { color: #cfc6ea; }
:where(html[data-theme='dark']) h1, :where(html[data-theme='dark']) h2, :where(html[data-theme='dark']) h3,
:where(html[data-theme='dark']) h4, :where(html[data-theme='dark']) h5, :where(html[data-theme='dark']) h6 { color: #f1ecff; }
:where(html[data-theme='dark']) a:not([class]) { color: #c4b5fd; }
