:root {
    --bg: #f6f7fb;
    --surface: #ffffff;
    --border: #e7e9f2;
    --text: #1f2333;
    --muted: #6b7192;
    --primary: #454bea;        /* Glensol Indigo */
    --primary-dark: #3338c4;   /* darker indigo for hover */
    --primary-soft: #ecedfd;   /* light indigo tint */
    --accent: #059ff8;         /* Glensol Sky Blue */
    --brand-gradient: linear-gradient(135deg, #881b80 0%, #454bea 50%, #059ff8 100%);
    --shadow-sm: 0 1px 2px rgba(28, 30, 56, .06), 0 1px 3px rgba(28, 30, 56, .04);
    --shadow-md: 0 6px 24px rgba(28, 30, 56, .08);
    --shadow-lg: 0 20px 50px rgba(28, 30, 56, .18);
    --radius: 14px;
    --radius-sm: 10px;
}

html {
    font-size: 15px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
}
a:hover { color: var(--primary-dark); }

h1, h2, h3, h4, h5 { font-weight: 700; letter-spacing: -.01em; }

.btn:focus, .btn:active:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(69, 75, 234, .18);
}

/* ---------- Top navigation ---------- */
.app-navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: .55rem 0;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.app-brand {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -.02em;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: var(--text) !important;
}
.app-brand .brand-mark {
    width: 30px; height: 30px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: inline-grid; place-items: center;
    color: #fff; font-weight: 800; font-size: .95rem;
    box-shadow: var(--shadow-sm);
}

.app-navbar .nav-link {
    color: var(--muted) !important;
    font-weight: 600;
    font-size: .92rem;
    padding: .45rem .85rem !important;
    border-radius: 9px;
    transition: all .15s ease;
}
.app-navbar .nav-link:hover {
    color: var(--text) !important;
    background: var(--primary-soft);
}
.app-navbar .nav-link.active {
    color: var(--primary) !important;
    background: var(--primary-soft);
}

.nav-user {
    display: inline-flex; align-items: center; gap: .5rem;
    font-weight: 600; color: var(--text);
}
.nav-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff; display: inline-grid; place-items: center;
    font-size: .8rem; font-weight: 700;
}

/* ---------- Cards / surfaces ---------- */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0 !important;
    padding: .85rem 1.1rem;
}
.card-body { padding: 1.1rem; }

.epic-card { transition: box-shadow .2s ease, transform .2s ease; }
.epic-card:hover { box-shadow: var(--shadow-md); }

.feature-row {
    background: #fbfbfe;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
}

/* ---------- Buttons ---------- */
.btn {
    border-radius: 10px;
    font-weight: 600;
    font-size: .9rem;
    transition: all .15s ease;
}
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(69, 75, 234, .22);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline-secondary { color: var(--muted); border-color: var(--border); }
.btn-outline-secondary:hover { background: #f1f2f8; color: var(--text); border-color: var(--border); }

/* ---------- Badges ---------- */
.badge {
    font-weight: 600;
    letter-spacing: .02em;
    padding: .38em .7em;
    border-radius: 7px;
}
.tag {
    display: inline-flex; align-items: center;
    font-size: .68rem; font-weight: 800; letter-spacing: .06em;
    text-transform: uppercase;
    padding: .25em .55em; border-radius: 6px;
}
.tag-epic    { background: #ecedfd; color: #454bea; }
.tag-feature { background: #fff1e3; color: #c85f0f; }
.tag-task    { background: #eef0f5; color: #5c6280; }

/* status + priority pills */
.s-not-started { background: #eef0f5; color: #5c6280; border: 1px solid #e1e4ee; }
.s-in-progress { background: #e6efff; color: #2563eb; }
.s-blocked     { background: #ffe7e7; color: #d33; }
.s-completed   { background: #e2f7ef; color: #0c9b6f; }
.s-cancelled   { background: #f0f0f3; color: #8a8fa3; }

.p-low      { background: #eef0f5; color: #6b7192; }
.p-medium   { background: #e6efff; color: #2563eb; }
.p-high     { background: #fff2dd; color: #c47d10; }
.p-critical { background: #ffe1e1; color: #d22; }

/* ---------- Tables ---------- */
.table { --bs-table-bg: transparent; }
.table > :not(caption) > * > * { padding: .7rem .75rem; }
.table thead th {
    font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
    color: var(--muted); border-bottom: 1px solid var(--border);
}
.content-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem 1.4rem;
}

/* ---------- Progress ---------- */
.progress { background: #eceef6; border-radius: 99px; }
.progress-bar { background: linear-gradient(90deg, var(--primary), var(--accent)); }

/* ---------- Page header ---------- */
.page-title { font-size: 1.6rem; margin: 0; }
.page-sub { color: var(--muted); font-size: .9rem; }

/* ---------- Auth pages ---------- */
.auth-wrap {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    background: var(--bg);
}
.auth-hero {
    background: var(--brand-gradient);
    color: #fff;
    padding: 4rem 3.5rem;
    display: flex; flex-direction: column; justify-content: center;
    position: relative; overflow: hidden;
}
.auth-logo { height: 40px; width: auto; margin-bottom: 2rem; }
.app-logo { height: 30px; width: auto; display: block; }
.app-brand-sub {
    font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: var(--muted); padding-left: .6rem; margin-left: .55rem; border-left: 1px solid var(--border);
}
.auth-hero::after {
    content: ""; position: absolute; right: -120px; bottom: -120px;
    width: 380px; height: 380px; border-radius: 50%;
    background: rgba(255,255,255,.08);
}
.auth-hero h1 { font-size: 2.5rem; line-height: 1.1; margin-bottom: 1rem; }
.auth-hero p { font-size: 1.05rem; opacity: .9; max-width: 30rem; }
.auth-hero .brand-mark {
    width: 46px; height: 46px; border-radius: 12px;
    background: rgba(255,255,255,.16); display: inline-grid; place-items: center;
    font-weight: 800; font-size: 1.2rem; margin-bottom: 2rem;
}
.auth-feature { display: flex; gap: .65rem; align-items: center; margin-top: .9rem; opacity: .92; }
.auth-feature .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.auth-panel {
    display: flex; align-items: center; justify-content: center;
    padding: 3rem 2rem;
}
.auth-card { width: 100%; max-width: 400px; }

/* Auth panel scrolls on its own (html has overflow:hidden); margin:auto keeps the card
   centred when it fits and top-aligned (not clipped) when it doesn't. */
.auth-wrap { height: 100vh; }
.auth-panel { overflow-y: auto; align-items: flex-start; }
.auth-panel .auth-card { margin: auto 0; }

/* ---------- Demo accounts (login page, Demo:SeedMockData) ---------- */
.demo-accounts { margin-bottom: 1.25rem; }
.demo-accounts-head { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--muted); margin-bottom: .65rem; }
.demo-badge {
    font-size: .66rem; font-weight: 800; letter-spacing: .12em; color: #fff;
    background: var(--brand-gradient); padding: .2rem .5rem; border-radius: 6px;
}
.demo-accounts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.demo-account {
    display: flex; align-items: center; gap: .55rem; text-align: left;
    padding: .5rem .6rem; border: 1px solid var(--border); border-radius: 10px;
    background: var(--surface); cursor: pointer; min-width: 0;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.demo-account:hover:not(:disabled) { border-color: var(--primary); box-shadow: 0 4px 12px rgba(69, 75, 234, .14); transform: translateY(-1px); }
.demo-account:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.demo-account:disabled { opacity: .55; cursor: wait; }
.demo-account.is-loading { opacity: 1; border-color: var(--primary); }
.demo-avatar {
    flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%;
    display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .78rem;
}
.demo-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.demo-name { font-weight: 600; font-size: .83rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-role { font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-divider { display: flex; align-items: center; gap: .75rem; margin-top: 1.1rem; color: var(--muted); font-size: .78rem; }
.demo-divider::before, .demo-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
@media (max-width: 420px) { .demo-accounts-grid { grid-template-columns: 1fr; } }
.auth-card h2 { font-size: 1.6rem; margin-bottom: .35rem; }
.auth-card .sub { color: var(--muted); margin-bottom: 1.75rem; }

.form-control, .form-select {
    border-radius: 10px;
    border: 1px solid var(--border);
    padding: .6rem .8rem;
    background: #fbfbfe;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    background: #fff;
}
.form-label { font-weight: 600; font-size: .85rem; color: var(--text); margin-bottom: .35rem; }

@media (max-width: 880px) {
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-hero { display: none; }
}

/* ---------- Kanban board ---------- */
.board {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    align-items: flex-start;
}
.board-col {
    flex: 0 0 290px;
    background: #eef0f6;
    border-radius: var(--radius);
    padding: .65rem;
    min-height: 120px;
}
.board-col-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: .25rem .5rem .65rem;
    font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em;
    color: var(--muted);
}
.board-col-head .count {
    background: #fff; color: var(--muted);
    border-radius: 99px; padding: .05rem .55rem; font-size: .75rem;
}
.board-col-head .swatch { width: 9px; height: 9px; border-radius: 50%; margin-right: .5rem; }
.col-not-started .swatch { background: #b7bdd4; }
.col-in-progress .swatch { background: #2563eb; }
.col-blocked     .swatch { background: #e23b3b; }
.col-completed   .swatch { background: #0c9b6f; }
.col-cancelled   .swatch { background: #a0a5ba; }

.kanban-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    padding: .7rem .8rem;
    margin-bottom: .6rem;
    cursor: grab;
    transition: box-shadow .15s ease, transform .1s ease;
}
.kanban-card:hover { box-shadow: var(--shadow-md); }
.kanban-card.dragging { opacity: .5; transform: rotate(1.5deg); }
.kanban-card .title { font-weight: 600; font-size: .92rem; margin-bottom: .4rem; }
.kanban-card .meta { color: var(--muted); font-size: .76rem; margin-bottom: .5rem; }
.kanban-card .foot { display: flex; align-items: center; justify-content: space-between; }
.kanban-card .who {
    font-size: .72rem; color: var(--muted);
    display: inline-flex; align-items: center; gap: .35rem;
}
.kanban-card .mini-avatar {
    width: 22px; height: 22px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff; display: inline-grid; place-items: center; font-size: .65rem; font-weight: 700;
}
.board-col.drop-target { outline: 2px dashed var(--primary); outline-offset: -4px; background: var(--primary-soft); }

/* ---------- Project switcher ---------- */
.project-switcher {
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-weight: 700;
    border: 1px solid #e0dcff;
    border-radius: 9px;
    padding: .4rem .8rem;
}
.project-switcher:hover { background: #e6e2ff; color: var(--primary-dark); }
.proj-dot {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    background: var(--primary); margin-right: .4rem; vertical-align: middle;
}

/* ---------- Label chips ---------- */
.label-chip {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .72rem; font-weight: 600;
    padding: .12rem .5rem; border-radius: 99px;
    color: #fff; line-height: 1.4;
}
.label-chip .x { cursor: pointer; opacity: .8; font-weight: 700; }
.label-chip .x:hover { opacity: 1; }
.label-filter {
    border: 1px solid var(--border); border-radius: 99px;
    padding: .2rem .7rem; font-size: .8rem; font-weight: 600; cursor: pointer;
    background: #fff; color: var(--muted);
    display: inline-flex; align-items: center; gap: .35rem;
}
.label-filter.on { color: #fff; border-color: transparent; }
.label-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* ---------- Intranet dashboard ---------- */
.dash-hero {
    background: linear-gradient(120deg, #881b80 0%, #454bea 50%, #059ff8 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 2.2rem 2.4rem;
    box-shadow: var(--shadow-md);
}
.dash-hero-eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 700; opacity: .85; }
.dash-hero-title { font-size: 2rem; margin: .25rem 0 .35rem; }
.dash-hero-sub { opacity: .9; margin: 0; max-width: 40rem; }

.kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.1rem 1.2rem;
    height: 100%;
}
.kpi-card.kpi-danger { border-left-color: #e23b3b; }
.kpi-card.kpi-accent { border-left-color: var(--accent); }
.kpi-label { color: var(--muted); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kpi-value { font-size: 2.1rem; font-weight: 800; line-height: 1.1; margin: .2rem 0; }
.kpi-link { font-size: .8rem; font-weight: 600; }

.section-heading { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: .5rem 0 .25rem; }

.module-card {
    display: flex; align-items: center; gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.1rem 1.2rem;
    color: var(--text);
    transition: box-shadow .15s ease, transform .1s ease;
    height: 100%;
}
a.module-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); color: var(--text); }
.module-icon {
    width: 46px; height: 46px; border-radius: 12px; flex: 0 0 46px;
    display: grid; place-items: center; font-size: 1.4rem;
    background: var(--primary-soft);
}
.module-name { font-weight: 700; }
.module-desc { color: var(--muted); font-size: .85rem; }
.module-go { color: var(--primary); font-weight: 800; font-size: 1.2rem; }
.module-card.coming-soon { opacity: .65; box-shadow: none; }
/* On phones the two-up tiles are too narrow for the icon + text + arrow row, so
   switch to a compact, centered app-tile: icon on top, name below; drop the
   description and the arrow (the whole card is tappable). */
@media (max-width: 575.98px) {
    .module-card { flex-direction: column; text-align: center; gap: .5rem; padding: .95rem .55rem; }
    .module-card .flex-grow-1 { width: 100%; }
    .module-icon { width: 44px; height: 44px; flex: 0 0 44px; font-size: 1.3rem; }
    .module-name { font-size: .9rem; line-height: 1.2; }
    .module-desc { display: none; }
    .module-go { display: none; }
}
.badge-soon {
    display: inline-block; margin-top: .25rem;
    font-size: .68rem; font-weight: 700; letter-spacing: .04em;
    background: #eef0f5; color: #8a8fa3; padding: .1rem .5rem; border-radius: 6px;
}

.detail-list { display: grid; grid-template-columns: auto 1fr; gap: .35rem .9rem; }
.detail-list dt { color: var(--muted); font-weight: 600; font-size: .82rem; }
.detail-list dd { margin: 0; font-size: .9rem; }

/* misc */
footer.footer { color: var(--muted); font-size: .85rem; }
.empty-state {
    text-align: center; padding: 3rem 1rem; color: var(--muted);
    background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius);
}

/* ===== Schedule / Gantt ===== */
.schedule-kpi { padding: .3rem .75rem; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.legend-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; margin-right: 3px; }

.gantt-wrap { overflow-x: auto; }
.gantt { font-size: .85rem; }
.gantt-row { display: flex; align-items: stretch; min-height: 36px; border-bottom: 1px solid #f1f1f5; }
.gantt-row:last-child { border-bottom: 0; }
.gantt-label {
    flex: 0 0 280px; width: 280px; position: sticky; left: 0; z-index: 2;
    background: #fff; display: flex; align-items: center; gap: .4rem;
    padding: .3rem .7rem; border-right: 1px solid #e7e7ee; white-space: nowrap; overflow: hidden;
}
.gantt-label .g-name { overflow: hidden; text-overflow: ellipsis; }
.gantt-row.depth-0 .gantt-label { font-weight: 700; }
.gantt-row.depth-1 .gantt-label { padding-left: 1.5rem; }
.gantt-row.depth-2 .gantt-label { padding-left: 2.6rem; font-weight: 400; }

.gantt-track { position: relative; flex: 1 1 auto; }
.gantt-head { position: sticky; top: 0; z-index: 3; background: #fff; border-bottom: 1px solid #e2e2e9; }
.gantt-head .gantt-label { font-weight: 700; }
.gantt-head .gantt-track { min-height: 30px; }
.gantt-month { position: absolute; top: 0; height: 100%; display: flex; align-items: center; justify-content: center;
    font-size: .72rem; color: #6b7280; border-left: 1px solid #ededf2; }
.gantt-gridline { position: absolute; top: 0; bottom: 0; border-left: 1px solid #f4f4f8; }
.gantt-today { position: absolute; top: 0; bottom: 0; border-left: 2px dashed #ef4444; z-index: 1; }

.gantt-bar { position: absolute; top: 50%; transform: translateY(-50%); height: 18px; border-radius: 5px;
    overflow: hidden; min-width: 4px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.10); }
.gantt-bar.lvl-0 { height: 12px; border-radius: 3px; }
.gantt-bar.g-clickable { cursor: pointer; }
.gantt-bar.g-clickable:hover { box-shadow: inset 0 0 0 1px rgba(0,0,0,.30); }
.gantt-fill { position: absolute; left: 0; top: 0; bottom: 0; }
.gantt-bar-label { position: relative; z-index: 1; padding: 0 .35rem; font-size: .68rem; line-height: 18px;
    color: #1f2937; white-space: nowrap; }
.gantt-nodate { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); font-size: .72rem; color: #b6b6c0; font-style: italic; }

.gantt-bar.g-overdue { background: rgba(220,53,69,.20); }
.gantt-bar.g-overdue .gantt-fill { background: #dc3545; }
.gantt-bar.g-risk { background: rgba(245,158,11,.22); }
.gantt-bar.g-risk .gantt-fill { background: #f59e0b; }
.gantt-bar.g-ontrack { background: rgba(59,130,246,.20); }
.gantt-bar.g-ontrack .gantt-fill { background: #3b82f6; }
.gantt-bar.g-done { background: rgba(22,163,74,.20); }
.gantt-bar.g-done .gantt-fill { background: #16a34a; }
.gantt-bar.g-unscheduled { background: rgba(156,163,175,.25); }
.gantt-bar.g-cancelled { background: rgba(156,163,175,.25); }
.gantt-bar.g-unscheduled .gantt-fill, .gantt-bar.g-cancelled .gantt-fill { background: #9ca3af; }

.schedule-kpi.g-overdue { background: rgba(220,53,69,.15); color: #b02a37; }
.schedule-kpi.g-risk { background: rgba(245,158,11,.18); color: #b45309; }
.schedule-kpi.g-ontrack { background: rgba(59,130,246,.15); color: #1d4ed8; }
.schedule-kpi.g-done { background: rgba(22,163,74,.15); color: #15803d; }
.schedule-kpi.g-unscheduled { background: rgba(156,163,175,.20); color: #6b7280; }
.legend-swatch.g-overdue { background: #dc3545; }
.legend-swatch.g-risk { background: #f59e0b; }
.legend-swatch.g-ontrack { background: #3b82f6; }
.legend-swatch.g-done { background: #16a34a; }
.legend-swatch.g-unscheduled { background: #9ca3af; }

/* ---------- Task comments + @mentions ---------- */
.task-comments .comment-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.task-comments .comment-item:last-child { border-bottom: 0; }
.comment-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}
.comment-author { font-weight: 600; font-size: .875rem; color: var(--text); }
.comment-time { font-size: .75rem; color: var(--muted); }
.comment-del { margin-left: auto !important; line-height: 1; }
.comment-body {
    font-size: .9rem;
    color: var(--text);
    white-space: normal;
    word-break: break-word;
}
.comment-body .mention {
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-weight: 600;
    padding: 0 3px;
    border-radius: 4px;
}
.comment-form .mention-menu {
    position: absolute;
    z-index: 20;
    left: 0;
    right: 0;
    top: calc(100% - 34px);
    max-height: 220px;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    padding: 4px;
}
.mention-menu .mention-item {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: .875rem;
    color: var(--text);
    cursor: pointer;
}
.mention-menu .mention-item:hover,
.mention-menu .mention-item.active {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

/* ---------- Board: synced top scrollbar ---------- */
.board-scroll-top {
    position: sticky;
    top: 0; /* JS sets this to the navbar height so it sits just below the nav */
    z-index: 900;
    overflow-x: auto;
    overflow-y: hidden;
    height: 16px;
    margin-bottom: .25rem;
    background: var(--bg);
}
.board-scroll-top > div { height: 1px; }

/* ---------- Backlog tree: scroll-to + flash after create/edit ---------- */
.tree-anchor { scroll-margin-top: 90px; }
@keyframes treeFlash {
    0%   { box-shadow: 0 0 0 3px var(--primary); }
    100% { box-shadow: 0 0 0 3px rgba(109, 94, 252, 0); }
}
.tree-flash { animation: treeFlash 2.2s ease-out; }

/* ---------- Backlog: flash a newly inserted task row ---------- */
@keyframes rowFlash {
    0%   { background-color: var(--primary-soft); }
    100% { background-color: transparent; }
}
.row-flash > td { animation: rowFlash 2.2s ease-out; }

/* ---------- Client-side search hiding (board + backlog) ---------- */
.search-hide { display: none !important; }
mark.search-hit { background: #fde68a; padding: 0 1px; border-radius: 2px; }

/* ---------- Task subtask checklist ---------- */
.subtask-item .subtask-text { transition: color .15s ease; }
.subtask-item.done .subtask-text { text-decoration: line-through; color: var(--muted); }
.subtask-check { cursor: pointer; }

/* ---------- Subtask progress badge (board cards + backlog rows) ---------- */
.subtasks-complete {
    background: #dcfce7 !important;
    color: #0c9b6f !important;
    border-color: #a7f3d0 !important;
}

/* ============ Recruitment "by department" sticky sidebar ============ */
.rec-panel { position: sticky; top: 1rem; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); box-shadow: 0 4px 16px rgba(20, 30, 60, .06); }
.rec-panel-head { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; padding: 1.1rem 1.2rem .95rem; }
.rec-panel-cat { font-size: .58rem; letter-spacing: 1.5px; color: #bcd6f2; }
.rec-panel-title { font-size: 1.15rem; font-weight: 700; margin-top: .1rem; color: #fff; }
.rec-panel-sub { font-size: .78rem; color: #bcd6f2; }
.rec-kpis { display: flex; gap: .5rem; padding: 1rem 1.2rem; background: var(--surface); border-bottom: 1px solid var(--border); }
.rec-kpi { flex: 1; text-align: center; background: #f7f9fc; border: 1px solid var(--border); border-radius: 8px; padding: .55rem .3rem; }
.rec-kpi-val { font-size: 1.35rem; font-weight: 800; line-height: 1; color: var(--primary); }
.rec-kpi-val.text-success { color: #0c9b6f !important; }
.rec-kpi-val.text-danger { color: #e23b3b !important; }
.rec-kpi-lbl { font-size: .56rem; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); margin-top: .3rem; }
.rec-list { background: var(--surface); }
.rec-deptrow { display: flex; justify-content: space-between; align-items: center; padding: .7rem 1.2rem; border-bottom: 1px solid var(--border); font-size: .88rem; }
.rec-deptrow:last-child { border-bottom: none; }
.rec-dept-name { font-weight: 600; color: var(--text); }
.rec-crit { display: inline-block; margin-left: .4rem; font-size: .68rem; font-weight: 700; color: #c0392b; background: #fde2e1; border-radius: 12px; padding: 0 .5rem; }
.rec-dept-count { color: var(--muted); font-size: .82rem; }
.rec-dept-count .rec-num { font-weight: 700; color: var(--text); }
.rec-status { background: var(--primary-soft); color: var(--text); padding: 1rem 1.2rem; border-top: 1px solid var(--border); }
.rec-status-head { font-size: .6rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--primary-dark); margin-bottom: .55rem; }
.rec-status-row { display: flex; justify-content: space-between; align-items: center; font-size: .84rem; padding: .3rem 0; }
.rec-status-row .text-success { color: #0c9b6f !important; }
.rec-status-row .text-danger { color: #e23b3b !important; }
.rec-status-row .text-muted { color: var(--muted) !important; }

/* ============ Dashboard performance/recruitment toggle ============ */
.dash-toggle { display: inline-flex; background: #f1f2f8; border-radius: 10px; padding: .25rem; gap: .25rem; }
.dash-seg { border: none; background: transparent; padding: .4rem .95rem; border-radius: 7px; font-size: .85rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.dash-seg.active { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(20, 30, 60, .1); }

/* ============ Workforce Coverage Index (recruitment chart) ============ */
.wci-head { text-align: center; margin-bottom: 1rem; }
.wci-head h3 { font-size: 1.2rem; font-weight: 700; margin: 0 0 .25rem; color: var(--text); }
.wci-head p { font-size: .85rem; color: var(--muted); margin: 0; }
.wci-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: .35rem; background: #f1f2f8; border-radius: 10px; padding: .3rem; width: fit-content; max-width: 100%; margin: 0 auto 1.1rem; }
.wci-tab { border: none; background: transparent; padding: .45rem .9rem; border-radius: 7px; font-size: .84rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.wci-tab.active { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(20, 30, 60, .1); }
.wci-legend { display: flex; justify-content: center; gap: 1.3rem; margin-bottom: 1.3rem; flex-wrap: wrap; }
.wci-leg { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 600; color: var(--text); }
.wci-leg i { width: 22px; height: 12px; border-radius: 3px; display: inline-block; }
.wci-chart { display: flex; flex-direction: column; gap: .55rem; }
.wci-row { display: grid; grid-template-columns: 155px 1fr 82px; align-items: center; gap: .6rem; }
.wci-label { font-size: .82rem; font-weight: 600; color: var(--text); text-align: right; line-height: 1.15; }
.wci-track { display: flex; height: 26px; border-radius: 6px; overflow: hidden; background: #eef0f6; }
.wci-seg { height: 100%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: .68rem; font-weight: 700; letter-spacing: -.2px; white-space: nowrap; overflow: hidden; transition: width .45s ease; }
.wci-seg.wci-active { background: #0ea5e9; }
.wci-seg.wci-pipeline { background: #f59e0b; }
.wci-seg.wci-vacant { background: #ef4444; }
.wci-total { font-size: .8rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.wci-axis { display: flex; justify-content: space-between; margin: .55rem 82px 0 163px; font-size: .7rem; color: var(--muted); }
@media (max-width: 700px) {
    .wci-row { grid-template-columns: 92px 1fr 64px; }
    .wci-axis { margin: .55rem 64px 0 100px; }
}

/* ============ Editorial evaluation document (old-app style) ============ */
.eval-doc {
    --bg-stone: #f8f7f4; --border-stone: #dcdad2; --text-dark: #1a1a1a; --text-muted: #6e6d68;
    --accent: #2c3e50; --card-bg: #ffffff; --score-bg: #f1f0ea; --hover-bg: #faf9f6;
    --border-soft: #f0ede6; --sidebar-bg: #faf9f6; --sidebar-text: #1a1a1a; --sidebar-muted: #6e6d68; --sidebar-border: #dcdad2;
    background: var(--bg-stone);
    border: 1px solid var(--border-stone);
    border-radius: 14px;
    color: var(--text-dark);
    overflow: hidden;
}
.eval-doc[data-theme="denim"] {
    --bg-stone: #eef3f9; --border-stone: #cdd9e8; --text-dark: #1a2333; --text-muted: #5c6b82;
    --accent: #454bea; --score-bg: #ecedfd; --hover-bg: #f0f1fe; --border-soft: #dcdefb;
    --sidebar-bg: #454bea; --sidebar-text: #eef5fd; --sidebar-muted: #b9bcf5; --sidebar-border: #5a60ef;
}
.eval-doc[data-theme="forest"] {
    --bg-stone: #ecefe9; --border-stone: #c2c9bc; --text-dark: #242b20; --text-muted: #6b7565;
    --accent: #354a31; --score-bg: #e1e6de; --hover-bg: #e6eadd; --border-soft: #d3dbce;
    --sidebar-bg: #354a31; --sidebar-text: #f3f5f1; --sidebar-muted: #9bb396; --sidebar-border: #4a6346;
}
.eval-doc[data-theme="wine"] {
    --bg-stone: #f2eeed; --border-stone: #cfc2c0; --text-dark: #30201f; --text-muted: #85706d;
    --accent: #6b3331; --score-bg: #e8dbda; --hover-bg: #faefef; --border-soft: #e3d3d1;
    --sidebar-bg: #6b3331; --sidebar-text: #f7f2f1; --sidebar-muted: #c9a7a5; --sidebar-border: #8c4745;
}

.eval-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem 1.1rem; border-bottom: 1px solid var(--border-stone); background: var(--card-bg); flex-wrap: wrap; }
.eval-toolbar-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }

/* language switcher (navbar) */
.lang-switcher { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.lang-pill-btn { border: none; background: transparent; color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .5px; padding: .18rem .6rem; cursor: pointer; }
.lang-pill-btn.active { background: var(--primary); color: #fff; }
.eval-theme-switch { display: flex; align-items: center; gap: .45rem; }
.eval-theme-switch .et-label { font-size: .68rem; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); }
.et-btn { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border-stone); cursor: pointer; padding: 0; }
.et-btn[data-theme="marble"] { background: #2c3e50; }
.et-btn[data-theme="denim"] { background: #454bea; }
.et-btn[data-theme="forest"] { background: #354a31; }
.et-btn[data-theme="wine"] { background: #6b3331; }
.et-btn.active { box-shadow: 0 0 0 2px var(--accent); }

.eval-lock { margin: .9rem 1.1rem 0; background: #fff7e6; border: 1px solid #ffe1a6; color: #8a5a00; padding: .5rem .8rem; border-radius: 8px; font-size: .85rem; }

.editorial-container { display: grid; grid-template-columns: 300px minmax(0, 1fr); }
.eval-sidebar { background: var(--sidebar-bg); color: var(--sidebar-text); padding: 1.6rem 1.4rem; border-right: 1px solid var(--sidebar-border); }
.eval-sidebar .es-brand { padding-bottom: 1rem; margin-bottom: 1.1rem; border-bottom: 1px solid var(--sidebar-border); }
.eval-sidebar .es-brand-main { font-size: 1.35rem; font-weight: 800; letter-spacing: 3px; color: var(--sidebar-text); }
.eval-sidebar .es-brand-sub { font-size: .55rem; letter-spacing: 2px; text-transform: uppercase; color: var(--sidebar-muted); margin-top: .1rem; }
.eval-sidebar .es-cat { font-size: .6rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--sidebar-muted); margin-bottom: .5rem; }
.eval-sidebar .es-name { font-size: 1.25rem; font-weight: 700; line-height: 1.2; }
.eval-sidebar .es-nameen { color: var(--sidebar-muted); font-size: .85rem; margin-top: .1rem; }
.eval-sidebar .es-title { color: var(--sidebar-muted); font-size: .9rem; margin: .35rem 0 1.3rem; }
.eval-sidebar .es-meta { display: grid; gap: .6rem 0; margin: 0; }
.eval-sidebar .es-meta dt { font-size: .6rem; letter-spacing: 1px; text-transform: uppercase; color: var(--sidebar-muted); }
.eval-sidebar .es-meta dd { font-size: .9rem; margin: .05rem 0 0; }
.eval-sidebar .es-score { margin-top: 1.6rem; padding-top: 1.2rem; border-top: 1px solid var(--sidebar-border); }
.eval-sidebar .es-score-label { font-size: .6rem; letter-spacing: 1px; text-transform: uppercase; color: var(--sidebar-muted); }
.eval-sidebar .es-score-value { font-size: 2.4rem; font-weight: 300; line-height: 1; margin: .2rem 0 .55rem; }

.eval-main { padding: 1.8rem 2rem 2rem; background: var(--card-bg); }
.eval-doc .document-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; border-bottom: 2px solid var(--text-dark); padding-bottom: .9rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.eval-doc .document-title { font-size: 1.3rem; letter-spacing: 2px; font-weight: 700; }
.eval-doc .document-year { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 1.15rem; color: var(--text-muted); margin-top: .2rem; }
.eval-doc .top-right-score-box { text-align: right; background: var(--score-bg); padding: .85rem 1.3rem; border-radius: 6px; border: 1px solid rgba(0,0,0,.04); min-width: 200px; }
.eval-doc .score-box-title { font-size: .6rem; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }
.eval-doc .big-rating { font-size: 2.6rem; font-weight: 300; line-height: 1.05; color: var(--accent); margin: .1rem 0 .35rem; }

.eval-doc .section-header { display: flex; justify-content: space-between; align-items: baseline; margin: 1.8rem 0 1.1rem; border-bottom: 1px solid var(--text-dark); padding-bottom: .4rem; }
.eval-doc .section-header h2 { font-size: 1rem; letter-spacing: 1.5px; font-weight: 600; text-transform: uppercase; color: var(--accent); margin: 0; }
.eval-doc .section-weight { font-size: .8rem; color: var(--text-muted); }

.eval-doc .values-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 3.5rem; margin-bottom: 1rem; }
.eval-doc .values-col { display: flex; flex-direction: column; }
.eval-doc .value-item { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .75rem 0; border-bottom: 1px dashed var(--border-stone); }
.eval-doc .value-label { font-weight: 600; font-size: .92rem; }
.eval-doc .circle-group { display: flex; gap: 6px; flex-shrink: 0; }
.eval-doc .circle-radio { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.eval-doc .circle-btn { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--text-muted); color: var(--text-muted); display: flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 700; cursor: pointer; transition: all .15s; margin: 0; }
.eval-doc .circle-btn:hover { border-color: var(--accent); color: var(--accent); }
.eval-doc .circle-radio:checked + .circle-btn { background: var(--accent); border-color: var(--accent); color: #fff; }
.eval-doc .circle-radio:disabled + .circle-btn { cursor: default; }
.eval-doc .circle-radio:disabled + .circle-btn:hover { border-color: var(--text-muted); color: var(--text-muted); }
.eval-doc .circle-radio:disabled:checked + .circle-btn { background: var(--accent); border-color: var(--accent); color: #fff; }

.eval-doc table.eval-targets { width: 100%; border-collapse: collapse; }
.eval-doc table.eval-targets th { text-align: left; font-size: .68rem; letter-spacing: .5px; text-transform: uppercase; color: var(--text-muted); padding: .6rem .5rem; border-bottom: 1px solid var(--border-stone); font-weight: 600; }
.eval-doc table.eval-targets td { padding: .45rem .5rem; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.eval-doc .target-num { font-weight: 700; color: var(--text-muted); }
.eval-doc .target-circles { justify-content: flex-start; }
.eval-doc .eval-input { font-family: inherit; font-size: .9rem; color: var(--text-dark); background: transparent; border: none; border-bottom: 1px dashed var(--border-stone); width: 100%; padding: .25rem 0; outline: none; }
.eval-doc .eval-input:focus { border-bottom-color: var(--accent); background: var(--hover-bg); }
.eval-doc select.eval-input { cursor: pointer; }
.eval-doc .et-add { background: transparent; border: 1px solid var(--border-stone); color: var(--accent); border-radius: 6px; padding: .3rem .7rem; font-size: .82rem; font-weight: 600; cursor: pointer; margin-top: .6rem; }
.eval-doc .targets-hint { font-size: .78rem; color: var(--text-muted); margin-top: .4rem; display: flex; align-items: center; gap: .6rem; }
.eval-doc .wtot { display: inline-flex; align-items: center; gap: .1rem; font-weight: 700; padding: .1rem .5rem; border-radius: 20px; background: var(--score-bg); color: var(--text-dark); }
.eval-doc .wtot.over { background: #fde2e1; color: #c0392b; }
.eval-doc .et-save:disabled { opacity: .5; cursor: not-allowed; }
.eval-doc .btn-remove { background: transparent; border: none; color: #c0392b; font-size: 1.15rem; cursor: pointer; line-height: 1; }
.eval-doc .et-save { margin-top: 1.5rem; background: var(--accent); border-color: var(--accent); color: #fff; }

.eval-doc .comment-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.6rem; }
.eval-doc .comment-card { background: var(--score-bg); border: 1px solid var(--border-soft); border-radius: 8px; padding: .85rem 1rem; }
.eval-doc .comment-author { font-size: .68rem; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dark); font-weight: 700; margin-bottom: .4rem; }
.eval-doc .comment-textarea { width: 100%; min-height: 60px; font-family: inherit; font-size: .88rem; color: var(--text-dark); border: none; background: transparent; resize: vertical; outline: none; padding: 0; line-height: 1.5; }
.eval-doc .comment-textarea:focus { background: transparent; }
.eval-doc .comment-textarea::placeholder { color: var(--text-muted); }
.eval-doc .comment-textarea:disabled { color: var(--text-muted); }
/* Full wrapped value of a target/comment, rendered only when printing (see @media print). */
.eval-doc .eval-print-val { display: none; }
/* Target/comment fields auto-grow to fit their content (JS sets the height), so long
   text is fully visible on screen — no inner scrollbar, no manual resize handle. */
.eval-doc .eval-target-desc, .eval-doc .comment-textarea { overflow: hidden; resize: none; box-sizing: border-box; }
.eval-doc textarea.eval-target-desc { min-height: 1.6em; line-height: 1.5; }
.eval-doc table.eval-targets td { vertical-align: top; }

/* DocuSign-style signatures (2 columns, matching the legacy PDF) */
.eval-doc .signature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem 3rem; margin-top: 1.6rem; padding-top: 1.2rem; border-top: 1px solid var(--border-stone); }
.eval-doc .sig-box { text-align: left; }
.eval-doc .sig-line { border-bottom: 1px solid var(--accent); height: 46px; margin-bottom: .4rem; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.eval-doc .signature-stamp { font-family: "Segoe Script", "Bradley Hand", "Comic Sans MS", cursive; font-size: 1.3rem; color: #1b5f7a; transform: rotate(-1.5deg); line-height: 1.1; margin-bottom: 2px; }
.eval-doc[data-theme="forest"] .signature-stamp,
.eval-doc[data-theme="wine"] .signature-stamp { color: var(--accent); }
.eval-doc .signature-date { font-family: "Courier New", Courier, monospace; font-size: .62rem; color: #7f8c8d; line-height: 1; margin-bottom: 2px; }
.eval-doc .sig-pending { font-style: italic; font-size: .72rem; color: var(--text-muted); margin-bottom: 3px; }
.eval-doc .sig-title { font-size: .7rem; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.eval-doc .sig-action { margin-top: .55rem; }

/* acknowledgement banner (matches legacy bottom banner) */
.eval-doc .ack-banner { border-radius: 8px; padding: .9rem 1rem; margin-top: 1.5rem; text-align: center; font-size: .85rem; }
.eval-doc .ack-banner.info { background: rgba(52, 152, 219, .08); border: 1px solid rgba(52, 152, 219, .3); color: #2471a3; }
.eval-doc .ack-banner.success { background: rgba(46, 204, 113, .08); border: 1px solid rgba(46, 204, 113, .3); color: #1e8449; }

.eval-workflow { padding: 0 1.1rem 1.3rem; }

@media (max-width: 900px) {
    .editorial-container { grid-template-columns: 1fr; }
    .eval-sidebar { border-right: none; border-bottom: 1px solid var(--sidebar-border); }
    .eval-doc .values-grid, .eval-doc .comment-grid { grid-template-columns: 1fr; gap: 0; }
    .eval-doc .comment-grid { gap: 1rem; }
}

/* ---------- Print / PDF of the evaluation document (matches legacy app) ---------- */
@media print {
    @page { size: A4 portrait; margin: 6mm 8mm; }
    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
    .app-navbar, .navbar, .app-footer, .to-top, .route-progress, .modal, .modal-backdrop,
    .eval-toolbar, .eval-workflow, .eval-lock, .alert, .eval-doc button, .sig-action,
    .eval-doc .sig-pending, .eval-doc .ack-banner { display: none !important; }
    html, body { background: #fff !important; font-size: 11px !important; line-height: 1.3 !important; }
    .container { max-width: 100% !important; padding: 0 !important; margin: 0 !important; }
    .eval-doc { border: none !important; border-radius: 0 !important; }
    .editorial-container { grid-template-columns: 200px 1fr !important; }
    .eval-doc .eval-main { padding: 1rem 1.5rem !important; }
    .eval-doc .eval-sidebar { padding: 1.2rem .9rem !important; }
    .eval-doc .document-header { margin-bottom: 1rem !important; }
    .eval-doc .document-title { font-size: 1.1rem !important; }
    .eval-doc .document-year { font-size: 1rem !important; }
    .eval-doc .top-right-score-box { padding: .7rem 1.1rem !important; }
    .eval-doc .big-rating { font-size: 2.2rem !important; }
    .eval-doc .section-header { margin: 1.1rem 0 .6rem !important; break-after: avoid; }
    .eval-doc .section-header h2 { font-size: .85rem !important; }
    /* A4 portrait is ~794px, which would trip the 900px responsive collapse —
       force the 2-column layouts back on for print. */
    .eval-doc .values-grid { grid-template-columns: 1fr 1fr !important; gap: .5rem 2rem !important; }
    .eval-doc .comment-grid { grid-template-columns: 1fr 1fr !important; gap: .7rem 1.5rem !important; }
    .eval-doc .signature-row { grid-template-columns: 1fr 1fr !important; gap: 1rem 2rem !important; break-inside: avoid; margin-top: 1.3rem !important; padding-top: 1rem !important; }
    .eval-doc .value-item { padding: .4rem 0 !important; break-inside: avoid; }
    .eval-doc .circle-btn { width: 20px !important; height: 20px !important; font-size: .65rem !important; border-width: 1px !important; }
    .eval-doc .circle-group { gap: 4px !important; }
    .eval-doc .comment-card { padding: .7rem .9rem !important; }
    /* Long targets/comments: hide the (clipping) form fields and show the full,
       wrapped value "mirror" instead, so nothing is cut off in the PDF. */
    .eval-doc .comment-textarea, .eval-doc .eval-target-desc { display: none !important; }
    .eval-doc .eval-input { border: none !important; background: transparent !important; resize: none !important; }
    .eval-doc .eval-print-val { display: block !important; white-space: pre-wrap; word-break: break-word;
        font-size: .88rem; color: var(--text-dark); line-height: 1.4; }
    .eval-doc table.eval-targets td { vertical-align: top !important; }
    .eval-doc .sig-line { height: 36px !important; }
    .eval-doc .ack-banner { padding: .7rem !important; margin-top: 1.2rem !important; font-size: .78rem !important; }
}

/* ============ News cards / article / newspaper flip-book ============ */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.news-grid-home { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.news-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; text-decoration: none; color: var(--text); transition: box-shadow .15s ease, transform .15s ease; }
.news-card:hover { box-shadow: 0 8px 22px rgba(20, 30, 60, .1); transform: translateY(-2px); color: var(--text); }
.news-thumb { position: relative; height: 160px; background-size: cover; background-repeat: no-repeat; background-position: center; background-color: #eef2f8; display: flex; align-items: center; justify-content: center; }
.news-thumb-empty { background: linear-gradient(135deg, var(--primary-soft), #dfeaf7); }
.news-thumb-ico { font-size: 2.4rem; opacity: .55; }
/* News-article cards: show the whole photo (contain) over a blurred copy of itself. */
.news-thumb-full { background: #0b1a2b; }
.news-thumb-full::before {
    content: ""; position: absolute; inset: -6%; z-index: 0;
    background-image: var(--img); background-size: cover; background-position: center;
    filter: blur(16px) brightness(.72); transform: scale(1.06);
}
.news-thumb-full::after {
    content: ""; position: absolute; inset: 0; z-index: 1;
    background-image: var(--img); background-size: contain; background-position: center; background-repeat: no-repeat;
}
.news-thumb-full .news-type-badge, .news-thumb-full .news-bilingual { z-index: 2; }
.news-type-badge { position: absolute; top: .55rem; left: .55rem; background: rgba(255, 255, 255, .92); color: var(--text); font-size: .68rem; font-weight: 700; padding: .12rem .5rem; border-radius: 20px; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.news-type-badge.np { background: var(--primary); color: #fff; }
.news-body { padding: .8rem .9rem 1rem; display: flex; flex-direction: column; gap: .3rem; }
.news-date { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.news-title { font-weight: 700; font-size: 1.02rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

.news-article { max-width: 820px; margin: 0 auto; }
.news-article-date { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.news-article-title { font-size: 2rem; font-weight: 800; line-height: 1.2; margin: .3rem 0 .6rem; }
.news-article-lead { font-size: 1.12rem; color: var(--muted); font-weight: 500; }
.news-article-img { width: 100%; border-radius: 14px; margin: 1.2rem 0; box-shadow: 0 8px 24px rgba(20, 30, 60, .08); }
.news-article-body { font-size: 1.02rem; }
.news-article-body p { line-height: 1.75; margin-bottom: 1.05rem; }

/* Timesheet calendar */
.ts-cal-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 6px; }
.ts-cal-table th { text-align: center; font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; padding-bottom: .2rem; }
.ts-cal-table td { vertical-align: top; height: 78px; border: 1px solid var(--border); border-radius: 10px; padding: .35rem .45rem; background: var(--surface); }
.ts-cal-table td.ts-empty { border: none; background: transparent; }
.ts-day-num { font-weight: 700; font-size: .9rem; color: var(--text); }
.ts-day-hours { margin-top: .35rem; display: inline-block; background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; font-size: .82rem; padding: .1rem .45rem; border-radius: 20px; }
.ts-day-add { margin-top: .5rem; font-size: .78rem; color: var(--muted); opacity: 0; transition: opacity .12s; }
.ts-day.ts-editable { cursor: pointer; }
.ts-day.ts-editable:hover { border-color: var(--primary); box-shadow: 0 4px 12px rgba(69, 75, 234, .12); }
.ts-day.ts-editable:hover .ts-day-add { opacity: 1; }
.ts-day.ts-weekend { background: #f5f7fa; }
.ts-day.ts-holiday { background: #fff5ec; border-color: #ffd9b3; }
.ts-hol-dot { color: var(--accent); font-size: .7rem; }

/* Timesheet dashboard bars */
.ts-bar { height: 12px; background: var(--primary-soft); border-radius: 20px; overflow: hidden; }
.ts-bar > span { display: block; height: 100%; background: var(--primary); border-radius: 20px; }
.ts-bar.ts-bar-accent > span { background: var(--accent); }
.ts-trend { display: flex; align-items: flex-end; gap: .4rem; height: 160px; }
.ts-trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.ts-trend-bar { width: 60%; min-height: 2px; background: var(--primary); border-radius: 6px 6px 0 0; transition: height .2s; }
.ts-trend-col.is-current .ts-trend-bar { background: var(--accent); }
.ts-trend-lbl { font-size: .7rem; color: var(--muted); margin-top: .25rem; }

.np-viewer { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.np-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem; padding: .7rem; border-bottom: 1px solid var(--border); background: #f7f9fc; }
.np-btn { border: 1px solid var(--border); background: #fff; border-radius: 8px; padding: .35rem .75rem; cursor: pointer; font-size: .9rem; text-decoration: none; color: var(--text); }
.np-btn:hover { background: var(--primary-soft); color: var(--primary); }
.np-counter { font-weight: 600; min-width: 74px; text-align: center; }
.np-stage { padding: 1.6rem; background: #e9edf3; display: flex; justify-content: center; min-height: 420px; }
.np-book { position: relative; perspective: 2200px; width: 100%; max-width: 780px; }
.np-canvas { display: block; width: 100%; height: auto; background: #fff; box-shadow: 0 8px 30px rgba(20, 30, 60, .2); }
.np-flip { position: absolute; top: 0; left: 0; width: 100%; transform-origin: left center; transform: rotateY(0deg); opacity: 1; background: #fff; box-shadow: 0 8px 30px rgba(0, 0, 0, .3); transition: transform .5s ease, opacity .5s ease; z-index: 5; backface-visibility: hidden; }
.np-flip.turn-next, .np-flip.turn-start { transform: rotateY(-108deg); opacity: .3; }
.np-status { padding: 2.5rem 1rem; color: var(--muted); align-self: center; }

/* full-screen newspaper */
.np-viewer:fullscreen { background: #111; display: flex; flex-direction: column; }
.np-viewer:fullscreen .np-toolbar { background: #1c1c1c; border-color: #333; }
.np-viewer:fullscreen .np-btn { background: #2a2a2a; color: #eee; border-color: #444; }
.np-viewer:fullscreen .np-btn:hover { background: #3a3a3a; color: #fff; }
.np-viewer:fullscreen .np-counter { color: #eee; }
.np-viewer:fullscreen .np-stage { flex: 1; background: #111; align-items: center; min-height: 0; padding: 1rem; }
.np-viewer:fullscreen .np-book { width: auto; max-width: 96vw; }
.np-viewer:fullscreen .np-canvas { width: auto; height: auto; max-height: calc(100vh - 90px); max-width: 96vw; margin: 0 auto; }
.np-viewer:fullscreen .np-flip { max-height: calc(100vh - 90px); }

/* ===================== Employee Recognition ===================== */
.rec-hero { text-align: center; padding: 1.6rem 1rem 0.4rem; }
.rec-hero-title { font-weight: 800; font-size: 2rem; margin: 0; color: var(--primary, #454bea); }
.rec-hero-sub { color: #6b7280; margin: .35rem 0 0; font-size: 1.05rem; }

.rec-monthnav { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.rec-month-current { font-weight: 800; letter-spacing: .06em; font-size: 1.05rem; color: #111827; }

.rec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 992px) { .rec-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .rec-grid { grid-template-columns: 1fr; } }

.rec-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 1.25rem 1.1rem 0.9rem; display: flex; flex-direction: column; box-shadow: 0 1px 2px rgba(16,24,40,.04); transition: box-shadow .15s, transform .15s; }
.rec-card:hover { box-shadow: 0 8px 24px rgba(16,24,40,.10); transform: translateY(-2px); }
.rec-card-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; align-items: center; text-align: center; flex-grow: 1; }
.rec-card-link:hover { color: inherit; }

.rec-avatar { width: 68px; height: 68px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.5rem; color: #fff; margin-bottom: .6rem; background: var(--primary, #454bea); }
.rec-avatar-lg { width: 104px; height: 104px; font-size: 2.3rem; }
.rec-avatar-sm { width: 40px; height: 40px; font-size: 1rem; margin-bottom: 0; flex: 0 0 40px; }
.rec-avatar-0 { background: #454bea; } .rec-avatar-1 { background: #7c3aed; }
.rec-avatar-2 { background: #0891b2; } .rec-avatar-3 { background: #16a34a; }
.rec-avatar-4 { background: #ea580c; } .rec-avatar-5 { background: #db2777; }

.rec-name { font-weight: 800; text-transform: uppercase; letter-spacing: .02em; font-size: 1.02rem; }
.rec-role { color: #6b7280; font-size: .85rem; margin-bottom: .55rem; }
.rec-cat-badge { display: inline-block; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .28rem .6rem; border-radius: 999px; margin-bottom: .55rem; }
.rec-cat-0 { background: #fef3c7; color: #92400e; } .rec-cat-1 { background: #dbeafe; color: #1e40af; }
.rec-cat-2 { background: #ede9fe; color: #5b21b6; } .rec-cat-3 { background: #cffafe; color: #155e75; }
.rec-cat-4 { background: #fee2e2; color: #991b1b; } .rec-cat-5 { background: #dcfce7; color: #166534; }
.rec-cat-6 { background: #ffe4e6; color: #9f1239; } .rec-cat-7 { background: #e5e7eb; color: #374151; }
.rec-title { font-weight: 700; margin-bottom: .35rem; }
.rec-desc { color: #374151; font-size: .9rem; line-height: 1.5; }
.rec-date { color: #9ca3af; font-size: .8rem; margin-top: .6rem; }

.rec-actions { display: flex; align-items: center; justify-content: space-between; gap: .5rem; border-top: 1px solid #f0f1f3; margin-top: .85rem; padding-top: .6rem; }
.rec-like-btn { border: none; background: transparent; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; color: #6b7280; font-weight: 600; font-size: .88rem; padding: .2rem .35rem; border-radius: 8px; }
.rec-like-btn:hover { background: #f9fafb; color: #db2777; }
.rec-like-btn.liked { color: #db2777; }
.rec-heart { font-size: 1.1rem; line-height: 1; }
.rec-comment-link { text-decoration: none; color: #6b7280; font-size: .88rem; font-weight: 600; }
.rec-comment-link:hover { color: var(--primary, #454bea); }

/* Details */
.rec-detail { text-align: center; }
.rec-detail-eyebrow { letter-spacing: .18em; color: #9ca3af; font-size: .8rem; font-weight: 700; margin-bottom: .75rem; }
.rec-detail .rec-avatar { margin-left: auto; margin-right: auto; }
.rec-detail-name { font-weight: 800; text-transform: uppercase; margin: .5rem 0 .1rem; }
.rec-detail-role { color: #6b7280; margin-bottom: .7rem; }
.rec-detail-title { font-size: 1.15rem; font-weight: 700; margin: .5rem 0; }
.rec-detail-desc { max-width: 640px; margin: .5rem auto; color: #374151; line-height: 1.6; }
.rec-detail-date { color: #9ca3af; font-size: .85rem; margin-bottom: 1rem; }
.rec-detail-like { margin-top: .5rem; }
.rec-detail-like .rec-like-btn { font-size: 1rem; border: 1px solid #e5e7eb; padding: .45rem .9rem; border-radius: 999px; }

.rec-comments { display: flex; flex-direction: column; gap: .9rem; }
.rec-comment { display: flex; gap: .6rem; align-items: flex-start; }
.rec-comment-body { flex-grow: 1; }
.rec-comment-head { display: flex; gap: .5rem; align-items: baseline; }
.rec-comment-author { font-weight: 700; font-size: .9rem; }
.rec-comment-date { color: #9ca3af; font-size: .78rem; }
.rec-comment-text { color: #374151; font-size: .9rem; white-space: pre-wrap; }
.rec-add-comment textarea { resize: vertical; }

/* Homepage "Recently Recognised" */
.rec-recent { display: flex; flex-direction: column; gap: .4rem; }
.rec-recent-item { display: flex; align-items: center; gap: .7rem; padding: .5rem .25rem; text-decoration: none; color: inherit; border-radius: 10px; }
.rec-recent-item:hover { background: #f9fafb; color: inherit; }
/* min-width:0 lets the meta column shrink so long names/categories truncate with an
   ellipsis instead of pushing the date off-screen (horizontal overflow on phones). */
.rec-recent-meta { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.rec-recent-name { font-weight: 700; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-recent-cat { color: #6b7280; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-recent-date { color: #9ca3af; font-size: .78rem; margin-left: auto; flex: 0 0 auto; white-space: nowrap; padding-left: .5rem; }

/* Recognition — reactions + photo avatar */
.rec-photo { background-size: cover; background-position: center; color: transparent; }

.rec-reactions { display: inline-flex; align-items: center; gap: .05rem; }
.rec-react-btn { border: none; background: transparent; cursor: pointer; font-size: 1.15rem; line-height: 1; padding: .2rem .3rem; border-radius: 8px; opacity: .7; transition: transform .1s ease, opacity .1s ease, background .1s ease; }
.rec-react-btn:hover { transform: scale(1.3); opacity: 1; }
.rec-react-btn.active { opacity: 1; background: #eef2ff; }
.rec-react-count { font-weight: 700; font-size: .85rem; color: #6b7280; margin-left: .35rem; }

.rec-reactions-lg { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.rec-reactions-lg .rec-react-btn { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid #e5e7eb; border-radius: 999px; padding: .4rem .85rem; font-size: 1.05rem; opacity: .9; }
.rec-reactions-lg .rec-react-btn:hover { transform: none; background: #f9fafb; }
.rec-reactions-lg .rec-react-btn .rec-react-name { font-size: .85rem; font-weight: 600; color: #374151; }
.rec-reactions-lg .rec-react-btn.active { background: #eef2ff; border-color: #6366f1; opacity: 1; }
.rec-react-total { margin-top: .6rem; color: #6b7280; font-size: .85rem; }
.rec-react-total .rec-react-count { color: #111827; }

/* Recognition — admin reactor breakdown */
.rec-reactor-group { display: flex; align-items: baseline; gap: .5rem; padding: .4rem 0; border-bottom: 1px solid #f0f1f3; }
.rec-reactor-group:last-child { border-bottom: none; }
.rec-reactor-emoji { font-size: 1.15rem; }
.rec-reactor-label { font-weight: 700; font-size: .85rem; color: #374151; white-space: nowrap; }
.rec-reactor-names { color: #6b7280; font-size: .88rem; }

/* Recognition — month label uppercased via CSS so the underlying month word stays translatable */
.rec-month-current { text-transform: uppercase; }

/* Recognition — clamp long descriptions on the card + read-more cue */
.rec-desc { display: -webkit-box; -webkit-line-clamp: 4; line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.rec-readmore { display: inline-block; margin-top: .35rem; color: var(--primary, #454bea); font-weight: 600; font-size: .82rem; }
.rec-card:hover .rec-readmore { text-decoration: underline; }

/* ===================== Budget Tracker ===================== */
.bud-table th { font-size: .76rem; text-transform: uppercase; letter-spacing: .02em; color: #64748b; white-space: nowrap; }
.bud-table td { white-space: nowrap; }
.bud-section td { background: #f1f5f9; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: .78rem; color: #334155; }
.bud-toggle { border: none; background: transparent; cursor: pointer; padding: 0 .35rem 0 0; color: #64748b; font-size: .8rem; line-height: 1; }
.bud-toggle:hover { color: var(--primary, #454bea); }

/* Budget — ranked horizontal bars & analytics */
.bud-rank { display: flex; flex-direction: column; gap: .5rem; }
.bud-rank-row { display: grid; grid-template-columns: minmax(120px, 32%) 1fr auto; gap: .6rem; align-items: center; }
.bud-rank-name { font-size: .82rem; color: #334155; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bud-rank-name .code { color: #94a3b8; font-variant-numeric: tabular-nums; }
.bud-rank-track { background: #eef2f7; border-radius: 6px; height: 16px; overflow: hidden; }
.bud-rank-fill { height: 100%; border-radius: 6px; min-width: 2px; transition: width .3s ease; }
.bud-rank-val { font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap; color: #475569; }
.bud-chip { display: inline-flex; align-items: baseline; gap: .35rem; }
.bud-chip .n { font-size: 1.5rem; font-weight: 700; line-height: 1; }
.bud-donut-wrap { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.bud-legend { font-size: .82rem; color: #475569; }
.bud-legend .sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: .4rem; vertical-align: middle; }

/* ===== Searchable select (dependency-free) ===== */
.ss-wrap { position: relative; }
select.ss-native { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.ss-control {
    display: flex; align-items: center; flex-wrap: wrap; gap: .3rem;
    min-height: 38px; padding: .3rem .55rem; cursor: pointer; background: #fff;
    border: 1px solid #ced4da; border-radius: .375rem;
}
.ss-control:focus { outline: 0; border-color: #86b7fe; box-shadow: 0 0 0 .2rem rgba(13,110,253,.2); }
.ss-wrap.ss-open .ss-control { border-color: #86b7fe; box-shadow: 0 0 0 .2rem rgba(13,110,253,.2); }
.ss-wrap.ss-disabled .ss-control { background: #e9ecef; cursor: not-allowed; }
.ss-values { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem; flex: 1 1 auto; min-width: 0; }
.ss-single { color: #212529; }
.ss-placeholder { color: #6c757d; }
.ss-caret { margin-left: auto; color: #6c757d; font-size: .75rem; padding-left: .4rem; }
.ss-chip {
    display: inline-flex; align-items: center; gap: .3rem;
    background: #e9eef5; color: #1f2a44; border-radius: 12px;
    padding: .1rem .2rem .1rem .55rem; font-size: .82rem; line-height: 1.4;
}
.ss-chip-x { border: 0; background: transparent; color: #64748b; cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 .25rem; }
.ss-chip-x:hover { color: #dc3545; }
.ss-panel {
    position: fixed; z-index: 1090;
    background: #fff; border: 1px solid #ced4da; border-radius: .5rem;
    box-shadow: 0 8px 24px rgba(15,23,42,.15); max-height: 320px; display: flex; flex-direction: column; overflow: hidden;
}
.ss-search { padding: .5rem; border-bottom: 1px solid #eef1f5; }
.ss-search-input { width: 100%; padding: .35rem .55rem; border: 1px solid #ced4da; border-radius: .375rem; font-size: .9rem; }
.ss-search-input:focus { outline: 0; border-color: #86b7fe; box-shadow: 0 0 0 .15rem rgba(13,110,253,.15); }
.ss-list { overflow-y: auto; }
.ss-option { padding: .45rem .7rem; cursor: pointer; font-size: .92rem; }
.ss-option:hover { background: #f1f5f9; }
.ss-option.ss-selected { background: #e7f1ff; font-weight: 500; }
.ss-option.ss-selected::after { content: '✓'; float: right; color: #2563eb; }
.ss-option.ss-opt-disabled { color: #adb5bd; cursor: default; }
.ss-empty { padding: .6rem .7rem; color: #6c757d; font-size: .88rem; }

/* Editable evaluation date in the eval sidebar (HR/admin) */
.es-date-form { display: flex; align-items: center; gap: 5px; }
.es-date-input { font-size: .8rem; padding: 2px 5px; border-radius: 4px; border: 1px solid rgba(255,255,255,.45); background: #fff; color: #111; max-width: 140px; }
.es-date-save { border: none; background: rgba(255,255,255,.22); color: #fff; border-radius: 4px; cursor: pointer; padding: 2px 8px; line-height: 1.2; }
.es-date-save:hover { background: rgba(255,255,255,.4); }
@media print { .es-date-save { display: none; } .es-date-input { border: none; background: transparent; color: inherit; padding: 0; } }

/* Homepage oil & gas price widget */
.mkt-card { padding: 1rem 1.1rem; }
.mkt-head { display: flex; justify-content: space-between; align-items: baseline; }
.mkt-name { font-weight: 600; }
.mkt-unit { font-size: .75rem; color: #94a3b8; }
.mkt-row { display: flex; justify-content: space-between; align-items: baseline; margin: .35rem 0 .5rem; gap: .5rem; }
.mkt-price { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.mkt-change { font-size: .85rem; font-weight: 600; white-space: nowrap; }
.mkt-change.up { color: #0c9b6f; }
.mkt-change.down { color: #e23b3b; }
.mkt-spark { display: block; overflow: visible; }

/* Homepage oil & gas line charts */
.mkt-title { font-weight: 700; font-size: 1.05rem; margin-bottom: .4rem; }
.mkt-legend { display: flex; flex-wrap: wrap; gap: .35rem 1.2rem; margin-bottom: .5rem; }
.mkt-leg-item { display: flex; align-items: baseline; gap: .4rem; font-size: .85rem; }
.mkt-leg-dot { width: 10px; height: 10px; border-radius: 2px; display: inline-block; align-self: center; }
.mkt-leg-name { color: #475569; }
.mkt-leg-price { font-weight: 700; font-variant-numeric: tabular-nums; }
.mkt-leg-unit { font-weight: 400; font-size: .72rem; color: #94a3b8; }
.mkt-leg-chg { font-size: .78rem; font-weight: 600; }
.mkt-leg-chg.up { color: #0c9b6f; }
.mkt-leg-chg.down { color: #e23b3b; }
.mkt-chart { display: block; width: 100%; height: auto; }

/* Homepage "Celebrations this week" */
.celeb-head { font-weight: 700; margin-bottom: .6rem; }
.celeb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.celeb-item { display: flex; align-items: center; gap: .6rem; }
.celeb-meta { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.celeb-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.celeb-dept { font-size: .78rem; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.celeb-date { font-size: .8rem; color: #64748b; white-space: nowrap; }
.celeb-badge { font-size: .78rem; font-weight: 700; color: #0c9b6f; background: #e7f6f0; border-radius: 10px; padding: .1rem .5rem; white-space: nowrap; }

/* ---------- Back-to-top button ---------- */
.to-top {
    position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 1050;
    width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
    background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff;
    font-size: 1.4rem; line-height: 1; display: grid; place-items: center;
    box-shadow: var(--shadow-md);
    opacity: 0; transform: translateY(12px); pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, filter .15s ease;
}
.to-top.visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { filter: brightness(1.07); transform: translateY(-2px); }
.to-top:active { transform: translateY(0); }

/* ---------- Intranet footer + sticky-footer shell ---------- */
body.intranet-shell { display: flex; flex-direction: column; min-height: 100vh; }
body.intranet-shell > .container.py-4 { flex: 1 0 auto; width: 100%; }

.app-footer { position: relative; margin-top: 2rem; background: #0d2b52; color: #dbe6f5; }
.app-footer-accent { height: 4px; background: var(--brand-gradient); }
.app-footer-inner {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    padding: 1.1rem 0 1.25rem;
}
.app-footer-brand { display: flex; flex-direction: column; }
.app-footer-title { font-weight: 800; color: #fff; letter-spacing: -.01em; }
.app-footer-copy { font-size: .78rem; opacity: .72; }
.app-footer-feedback {
    background: rgba(255, 255, 255, .10); color: #fff; border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px; padding: .4rem 1rem; font-weight: 600; font-size: .85rem; cursor: pointer;
    transition: background .15s ease, transform .15s ease, border-color .15s ease;
}
.app-footer-feedback:hover { background: linear-gradient(135deg, var(--primary), var(--accent)); border-color: transparent; transform: translateY(-1px); }
.app-footer-powered { font-size: .82rem; opacity: .9; }
.app-footer-powered strong { color: #fff; background: linear-gradient(90deg, #97ecfd, #ff9d4d); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
@media (max-width: 620px) { .app-footer-inner { flex-direction: column; align-items: flex-start; gap: .7rem; } }

/* ============================================================
   Gallery module
   ============================================================ */
.gal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.gal-search { display: flex; align-items: center; gap: .4rem; }
.gal-search input[type="search"] { min-width: 220px; }
@media (max-width: 560px) { .gal-search { width: 100%; } .gal-search input[type="search"] { flex: 1 1 auto; min-width: 0; } }
.gal-tabs { display: inline-flex; gap: .3rem; background: #eef0f5; padding: .25rem; border-radius: 999px; }
.gal-tab { padding: .3rem .9rem; border-radius: 999px; font-size: .85rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.gal-tab:hover { color: var(--text); }
.gal-tab.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }

.gallery-grid {
    display: grid; gap: 1.1rem;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
/* Card */
.gal-tile {
    position: relative; display: flex; flex-direction: column; padding: 0; border: 1px solid var(--border);
    cursor: pointer; text-align: left; border-radius: 16px; overflow: hidden; background: var(--surface);
    box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.gal-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--primary-soft); }
.gal-media { position: relative; display: block; aspect-ratio: 16 / 10; background: #eef2f8; overflow: hidden; }
.gal-thumb { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.gal-tile:hover .gal-thumb { transform: scale(1.07); }
.gal-badge {
    position: absolute; top: .55rem; left: .55rem; background: rgba(15, 23, 42, .72); color: #fff;
    font-size: .66rem; font-weight: 700; letter-spacing: .02em; padding: .16rem .5rem; border-radius: 20px;
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.gal-play {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
    background: rgba(0, 0, 0, .5); color: #fff; font-size: 1.25rem; padding-left: 4px;
    border: 2px solid rgba(255, 255, 255, .9); transition: transform .18s ease, background .18s ease;
}
.gal-tile:hover .gal-play { background: #e2331f; transform: translate(-50%, -50%) scale(1.08); }
.gal-body { padding: .7rem .85rem .8rem; display: flex; flex-direction: column; gap: .15rem; }
.gal-title { font-weight: 700; font-size: .95rem; color: var(--text); line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gal-sub { font-size: .8rem; color: var(--muted); line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Lightbox */
.gal-lightbox {
    position: fixed; inset: 0; z-index: 3000; background: rgba(6, 10, 20, .94);
    display: flex; flex-direction: column; align-items: center; justify-content: center; padding: clamp(1rem, 4vh, 3rem) 1rem;
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    animation: galFade .2s ease both;
}
@keyframes galFade { from { opacity: 0; } to { opacity: 1; } }
.gal-viewport { display: flex; align-items: center; justify-content: center; width: 100%; max-width: 1200px; flex: 1 1 auto; min-height: 0; }
.gal-stage { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.gal-media-photo { max-width: 100%; max-height: 82vh; border-radius: 12px; box-shadow: 0 24px 70px rgba(0,0,0,.55); animation: galPop .22s ease both; }
.gal-media-video { width: min(1120px, 94vw); aspect-ratio: 16 / 9; height: auto; max-height: 82vh; border-radius: 12px; box-shadow: 0 24px 70px rgba(0,0,0,.55); background: #000; animation: galPop .22s ease both; }
@keyframes galPop { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.gal-lb-caption { color: #fff; text-align: center; margin-top: 1.1rem; max-width: 820px; }
.gal-lb-title { font-weight: 800; font-size: 1.05rem; }
.gal-lb-text { opacity: .82; font-size: .9rem; margin-top: .25rem; }
.gal-close, .gal-arrow {
    position: absolute; background: rgba(255, 255, 255, .12); color: #fff; border: none; cursor: pointer;
    border-radius: 50%; line-height: 1; display: grid; place-items: center; transition: background .15s ease, transform .15s ease;
}
.gal-close { top: 1.1rem; right: 1.1rem; width: 44px; height: 44px; font-size: 1.3rem; }
.gal-arrow { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 2rem; }
.gal-close:hover { background: rgba(255, 255, 255, .28); }
.gal-arrow:hover { background: rgba(255, 255, 255, .28); }
.gal-prev { left: 1.2rem; }
.gal-next { right: 1.2rem; }
@media (max-width: 620px) {
    .gal-arrow { top: auto; bottom: 1rem; transform: none; width: 46px; height: 46px; }
    .gal-prev { left: 1.2rem; } .gal-next { right: 1.2rem; }
}

/* Homepage gallery strip — larger cards. auto-fit + a max keeps a single item from sitting
   tiny in one track: cards grow to fill the row (capped), and the row is centered. */
.gal-strip { display: grid; gap: 1.1rem; justify-content: center;
    grid-template-columns: repeat(auto-fit, minmax(320px, 480px)); }
/* On phones a 320px min track overflows narrow screens — go single column. */
@media (max-width: 620px) { .gal-strip { grid-template-columns: 1fr; } }
.gal-strip-item { position: relative; display: block; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 9;
    background: #eef2f8; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease; }
.gal-strip-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.gal-strip-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.gal-strip-item:hover img { transform: scale(1.06); }
.gal-strip-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.8rem .95rem .7rem; color: #fff;
    background: linear-gradient(to top, rgba(8, 15, 30, .85), transparent); }
.gal-strip-title { font-weight: 700; font-size: 1rem; display: block; text-shadow: 0 1px 6px rgba(0,0,0,.5);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gal-strip-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 56px; height: 56px;
    border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.5); color: #fff; font-size: 1.15rem; padding-left: 4px;
    border: 2px solid rgba(255,255,255,.9); transition: background .18s ease, transform .18s ease; }
.gal-strip-item:hover .gal-strip-play { background: #e2331f; transform: translate(-50%,-50%) scale(1.08); }

/* News article attachments */
.news-files { max-width: 760px; margin: 1.4rem auto 0; border-top: 1px solid var(--border); padding-top: 1.1rem; }
.news-files-head { font-weight: 800; margin-bottom: .6rem; }
.news-files-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.news-file { display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem; border: 1px solid var(--border);
    border-radius: 12px; background: var(--surface); text-decoration: none; color: var(--text);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.news-file:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); transform: translateY(-1px); color: var(--text); }
.news-file-ico { font-size: 1.4rem; }
.news-file-meta { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.news-file-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.news-file-size { font-size: .78rem; color: var(--muted); }
.news-file-dl { color: var(--primary); font-weight: 800; font-size: 1.1rem; }

/* News featured image slider (homepage) */
.news-slider { position: absolute; inset: 0; overflow: hidden; }
.news-slider-track { display: flex; height: 100%; transition: transform .35s ease; }
/* Whole image shown (contain), with a blurred copy of itself filling the 16:9 letterbox. */
.news-slide { position: relative; flex: 0 0 100%; height: 100%; overflow: hidden; background: #0b1a2b; }
.news-slide::before {
    content: ""; position: absolute; inset: -6%; z-index: 0;
    background-image: var(--img); background-size: cover; background-position: center;
    filter: blur(20px) brightness(.7); transform: scale(1.06);
}
.news-slide::after {
    content: ""; position: absolute; inset: 0; z-index: 1;
    background-image: var(--img); background-size: contain; background-position: center; background-repeat: no-repeat;
}
.news-slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%;
    border: none; background: rgba(0, 0, 0, .42); color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer;
    display: grid; place-items: center; opacity: .9; transition: opacity .15s ease, background .15s ease; z-index: 2; }
.news-slider-arrow:hover { opacity: 1; background: rgba(0, 0, 0, .68); }
.news-slider-arrow.prev { left: .5rem; }
.news-slider-arrow.next { right: .5rem; }
.news-slider-dots { position: absolute; bottom: .55rem; left: 0; right: 0; display: flex; justify-content: center; gap: .35rem; z-index: 2; }
.news-slider-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .55); cursor: pointer; box-shadow: 0 0 3px rgba(0,0,0,.35); }
.news-slider-dot.active { background: #fff; }

/* News article image gallery (detail page) — side by side */
.news-gallery { max-width: 760px; margin: 1.2rem auto; display: grid; gap: .6rem; }
.news-gallery-1 { grid-template-columns: 1fr; }
.news-gallery-2 { grid-template-columns: 1fr 1fr; }
.news-gallery-3 { grid-template-columns: 1fr 1fr 1fr; }
.news-gallery-item { position: relative; display: block; border: none; padding: 0; cursor: pointer;
    border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; background: #0b1a2b; }
.news-gallery-1 .news-gallery-item { aspect-ratio: 16 / 9; }
.news-gallery-item::before {
    content: ""; position: absolute; inset: -6%; z-index: 0;
    background-image: var(--img); background-size: cover; background-position: center;
    filter: blur(16px) brightness(.72); transform: scale(1.06);
}
.news-gallery-item::after {
    content: ""; position: absolute; inset: 0; z-index: 1;
    background-image: var(--img); background-size: contain; background-position: center; background-repeat: no-repeat;
    transition: transform .3s ease;
}
.news-gallery-item:hover::after { transform: scale(1.03); }
@media (max-width: 620px) { .news-gallery-2, .news-gallery-3 { grid-template-columns: 1fr; } }

/* Admin: existing news images with a remove toggle */
.news-img-edit { width: 120px; }
.news-img-edit img { width: 120px; height: 80px; object-fit: cover; border-radius: 8px; display: block; border: 1px solid var(--border); }
.news-img-remove { font-size: .74rem; display: inline-flex; align-items: center; gap: .25rem; margin-top: .25rem; cursor: pointer; }

/* Homepage "Latest News" — featured (left) + list of 3 (right) */
.news-home { display: grid; grid-template-columns: 1.55fr 1fr; gap: 1.1rem; align-items: stretch; }
.news-home-feature { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border);
    border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); text-decoration: none; color: var(--text);
    transition: transform .18s ease, box-shadow .18s ease; }
.news-home-feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); color: var(--text); }
.news-home-media { position: relative; aspect-ratio: 16 / 9; background-size: cover; background-position: center; background-color: #eef2f8; }
.news-home-media.is-empty { background: linear-gradient(135deg, var(--primary-soft), #dfeaf7); display: grid; place-items: center; }
.news-home-media .news-thumb-ico { font-size: 3rem; opacity: .5; }
.news-home-badge { position: absolute; top: .7rem; left: .7rem; background: var(--primary); color: #fff; font-size: .68rem;
    font-weight: 800; letter-spacing: .04em; padding: .2rem .6rem; border-radius: 20px; }
.news-home-body { padding: 1.1rem 1.3rem 1.3rem; display: flex; flex-direction: column; gap: .35rem; }
.news-home-date { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .4px; }
.news-home-title { font-size: 1.35rem; font-weight: 800; line-height: 1.22;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-home-sum { color: var(--muted); font-size: .92rem; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-home-more { color: var(--primary); font-weight: 700; margin-top: .25rem; }

.news-home-list { display: flex; flex-direction: column; gap: .8rem; }
.news-home-item { display: flex; gap: .8rem; align-items: center; flex: 1 1 0; min-height: 0;
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .55rem; overflow: hidden;
    text-decoration: none; color: var(--text); transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.news-home-item:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); transform: translateY(-1px); color: var(--text); }
.news-home-item-thumb { flex: 0 0 116px; width: 116px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden;
    background-size: cover; background-position: center; background-color: #eef2f8; display: grid; place-items: center; }
.news-home-item-thumb.is-empty { background: linear-gradient(135deg, var(--primary-soft), #dfeaf7); }
.news-home-item-thumb .news-thumb-ico { font-size: 1.4rem; opacity: .55; }
.news-home-item-body { min-width: 0; }
.news-home-item-title { font-weight: 700; font-size: .92rem; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-home-item-date { color: var(--muted); font-size: .75rem; margin-top: .15rem; }
@media (max-width: 800px) {
    .news-home { grid-template-columns: 1fr; }
    /* Stacked single-column: the list no longer fills the feature's height, so the
       items must size to their own content (the `flex:1 1 0` above collapses them). */
    .news-home-item { flex: 0 0 auto; }
}
/* Below ~430px the 116px thumb leaves little room for the title — trim it a touch. */
@media (max-width: 430px) {
    .news-home-item-thumb { flex-basis: 96px; width: 96px; }
    .news-home-title { font-size: 1.2rem; }
}

/* Admin */
.gal-admin-thumb { width: 72px; height: 54px; border-radius: 8px; background-size: cover; background-position: center; background-color: #eef2f8; position: relative; }
.gal-admin-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.6); font-size: .8rem; }
.gal-yt-preview img { max-height: 140px; border-radius: 10px; }

/* ============================================================
   Speak Up (whistleblowing) module
   ============================================================ */
.su-hero {
    position: relative; overflow: hidden; border-radius: var(--radius);
    background: linear-gradient(120deg, #0b3d67 0%, #12659e 55%, #2b8fb8 100%);
    color: #fff; padding: 2rem 2.2rem; box-shadow: var(--shadow-md);
}
.su-hero-badge { font-size: 2rem; line-height: 1; }
.su-hero-title { font-weight: 800; margin: .4rem 0 .2rem; }
.su-hero-sub-title { font-weight: 500; opacity: .85; font-size: 1.2rem; }
.su-hero-lead { max-width: 44rem; opacity: .95; margin-bottom: .9rem; }
.su-assurances { display: flex; gap: .5rem; flex-wrap: wrap; }
.su-chip { background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .25); padding: .25rem .6rem; border-radius: 20px; font-size: .8rem; font-weight: 600; }

.su-action {
    display: block; height: 100%; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.2rem; text-decoration: none;
    color: var(--text); transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.su-action:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); color: var(--text); border-color: var(--primary-soft); }
.su-action-primary { border-color: var(--primary); }
.su-action-ico { font-size: 1.7rem; }
.su-action-name { font-weight: 800; margin-top: .3rem; }
.su-action-az { font-weight: 500; color: var(--muted); }
.su-action-desc { color: var(--muted); font-size: .88rem; margin-top: .2rem; }

.su-reviewer {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    background: #eef7f1; border: 1px solid #cfe8da; border-radius: var(--radius); padding: 1rem 1.3rem;
}
.su-reviewer-kicker { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #0c9b6f; font-weight: 800; }
.su-reviewer-title { font-weight: 800; font-size: 1.05rem; }
.su-reviewer-desc { color: var(--muted); font-size: .88rem; max-width: 44rem; }

.su-bullets { margin: 0; padding-left: 1.1rem; }
.su-bullets li { margin-bottom: .35rem; }
.su-notice { background: #eef5fb; border: 1px solid #d5e6f4; color: #234b6b; border-radius: var(--radius-sm); padding: .8rem 1rem; font-size: .9rem; }

.su-modes { display: grid; gap: .6rem; }
.su-mode { display: block; border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: .7rem .9rem; cursor: pointer; }
.su-mode:hover { border-color: var(--primary); }
.su-mode input { margin-right: .5rem; }
.su-mode-name { font-weight: 700; }
.su-mode-desc { display: block; color: var(--muted); font-size: .85rem; margin-top: .15rem; margin-left: 1.4rem; }

.su-submitted { padding: 2rem; }
.su-submitted-ico { font-size: 2.6rem; }
.su-cred { margin: 1.1rem auto; max-width: 420px; }
.su-cred-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.su-cred-value { font-size: 1.4rem; font-weight: 800; letter-spacing: .04em; margin: .2rem 0 .5rem; word-break: break-all; }
.su-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #b3242b; }
.su-cred-code { background: #fff7f6; border: 1px dashed #f0c9c5; border-radius: var(--radius-sm); padding: .8rem; }
.su-warn { background: #fff8e6; border: 1px solid #f3e0a8; color: #7a5b00; border-radius: var(--radius-sm); padding: .7rem .9rem; font-size: .88rem; margin-top: .6rem; }

.su-thread { display: flex; flex-direction: column; gap: .5rem; }
.su-msg { border-radius: 10px; padding: .55rem .75rem; max-width: 85%; }
.su-msg-meta { font-size: .72rem; color: var(--muted); margin-bottom: .15rem; }
.su-msg-me { background: #e6f0fb; align-self: flex-end; }
.su-msg-staff { background: #f1f3f8; align-self: flex-start; }
.su-msg-internal { background: #fdf3e7; border: 1px solid #f2ddc0; align-self: stretch; max-width: 100%; }
.su-identity { font-weight: 700; background: #fff7f6; border: 1px solid #f0c9c5; border-radius: var(--radius-sm); padding: .5rem .7rem; }
.su-history { list-style: none; margin: 0; padding: 0; font-size: .85rem; }
.su-history li { padding: .15rem 0; border-bottom: 1px dashed var(--border); }

/* ---------- Newspaper: language chooser + in-viewer switch ---------- */
.np-chooser { display: flex; justify-content: center; padding: 1.5rem 0 2.5rem; }
.np-chooser-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-md); padding: 2rem 2.2rem; max-width: 560px; width: 100%; text-align: center;
}
.np-chooser-emoji { font-size: 2.6rem; line-height: 1; }
.np-chooser-title { margin: .6rem 0 .25rem; font-weight: 800; }
.np-chooser-sub { color: var(--muted); margin: 0 0 1.4rem; }
.np-chooser-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.np-lang-choice {
    flex: 1 1 180px; max-width: 220px; display: flex; flex-direction: column; align-items: center; gap: .3rem;
    padding: 1.1rem 1rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text); text-decoration: none; background: #fff;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.np-lang-choice:hover {
    transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary); color: var(--text);
}
.np-lang-flag { font-size: 2rem; line-height: 1; }
.np-lang-label { font-weight: 700; font-size: 1.05rem; }
.np-lang-file { font-size: .72rem; color: var(--muted); word-break: break-word; }
.np-lang-switch { display: inline-flex; margin-left: auto; border: 1px solid rgba(255, 255, 255, .5); border-radius: 20px; overflow: hidden; }
.np-lang-pill { padding: .12rem .6rem; font-size: .74rem; font-weight: 700; color: #fff; text-decoration: none; letter-spacing: .04em; }
.np-lang-pill:hover { color: #fff; background: rgba(255, 255, 255, .18); }
.np-lang-pill.active { background: #fff; color: var(--primary); }

/* Small "AZ · EN" indicator on bilingual newspaper cards. */
.news-bilingual { position: absolute; top: .55rem; right: .55rem; background: rgba(15, 47, 91, .92); color: #fff; font-size: .62rem; font-weight: 800; letter-spacing: .06em; padding: .12rem .45rem; border-radius: 20px; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }

/* ============================================================
   Motion & polish — route loader, page transitions, hero, cards
   ============================================================ */

/* --- Top route-progress loader (shown while a new page loads) --- */
.route-progress {
    position: fixed; top: 0; left: 0; right: 0; height: 3px;
    z-index: 4000; pointer-events: none;
    opacity: 0; transition: opacity .25s ease;
}
.route-progress.active { opacity: 1; }
.route-progress-fill {
    height: 100%; width: 0;
    background: linear-gradient(90deg, var(--primary) 0%, #7b4a7a 45%, var(--accent) 75%, #97ecfd 100%);
    background-size: 200% 100%;
    box-shadow: 0 0 12px rgba(5, 159, 248, .75), 0 0 6px rgba(69, 75, 234, .6);
    border-radius: 0 4px 4px 0;
    transition: width .2s ease;
    animation: routeShimmer 1.1s linear infinite;
}
.route-progress.done .route-progress-fill { transition: width .3s ease; animation: none; }
@keyframes routeShimmer { to { background-position: 200% 0; } }

/* --- Gentle fade when each new page paints --- */
main[role="main"] { animation: pageIn .42s ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* CRITICAL: the transform in pageIn makes <main> a containing block + stacking
   context. Bootstrap modals live inside <main> but their backdrop is appended to
   <body> (z-index 1050). With <main> as a stacking context, its whole subtree —
   including the modal (z-index 1055) — paints BELOW that body-level backdrop, so
   the backdrop covers the modal, swallows every click and the page looks frozen.
   While any modal is open Bootstrap marks <body class="modal-open">; drop the
   animation then so <main> is a plain block and the modal paints above its backdrop. */
body.modal-open main[role="main"] { animation: none; }

/* --- Hero: animated aurora gradient + floating light blobs --- */
.dash-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: linear-gradient(120deg, #23277a 0%, #454bea 38%, #881b80 68%, #059ff8 100%);
    background-size: 200% 200%;
    box-shadow: var(--shadow-lg);
    animation: heroPan 20s ease-in-out infinite;
}
.dash-hero > div { position: relative; z-index: 2; }
.dash-hero::before {
    content: ""; position: absolute; inset: -35%; z-index: 1;
    background:
        radial-gradient(38% 55% at 16% 20%, rgba(255, 178, 102, .55), transparent 62%),
        radial-gradient(42% 58% at 84% 12%, rgba(126, 197, 237, .50), transparent 64%),
        radial-gradient(48% 62% at 72% 92%, rgba(151, 236, 253, .38), transparent 62%);
    filter: blur(8px);
    animation: heroBlobs 16s ease-in-out infinite alternate;
}
.dash-hero::after {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background-image: radial-gradient(rgba(255, 255, 255, .10) 1px, transparent 1.5px);
    background-size: 20px 20px;
    -webkit-mask-image: linear-gradient(125deg, #000, transparent 68%);
            mask-image: linear-gradient(125deg, #000, transparent 68%);
    opacity: .5;
}
.dash-hero-title {
    font-size: 2.3rem; font-weight: 800; letter-spacing: -.02em;
    text-shadow: 0 2px 18px rgba(0, 20, 50, .28);
}
.dash-hero-sub { opacity: .94; text-shadow: 0 1px 10px rgba(0, 20, 50, .22); }
.dash-hero-sub a { transition: opacity .15s ease; }
.dash-hero-sub a:hover { opacity: .82; }
@keyframes heroPan { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes heroBlobs {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(0, -3%, 0) scale(1.09); }
}

/* --- KPI cards: lift, top-accent sheen, gradient numerals --- */
.kpi-card {
    position: relative; overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
}
.kpi-card::after {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.kpi-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.kpi-card:hover::after { transform: scaleX(1); }
.kpi-value {
    background: linear-gradient(120deg, var(--text) 0%, var(--primary) 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: var(--primary);
}
.kpi-card.kpi-danger .kpi-value { background: linear-gradient(120deg, #b3242b, #e23b3b); -webkit-background-clip: text; background-clip: text; }
.kpi-card.kpi-accent .kpi-value { background: linear-gradient(120deg, #c85a12, var(--accent)); -webkit-background-clip: text; background-clip: text; }

/* --- Module cards: lift, icon pop, arrow nudge --- */
a.module-card { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
a.module-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--primary-soft); }
.module-icon { transition: transform .2s ease; background: linear-gradient(135deg, var(--primary-soft), #ffffff); }
a.module-card:hover .module-icon { transform: scale(1.08) rotate(-4deg); }
.module-go { transition: transform .2s ease; }
a.module-card:hover .module-go { transform: translateX(5px); }

/* --- Recognition / news / celebration cards: subtle lift --- */
.content-card { transition: transform .18s ease, box-shadow .18s ease; }
.rec-recent-item, .celeb-item { transition: background .15s ease; }

/* --- Homepage entrance: staggered rise for hero + card grids --- */
body[data-page="Home"] .dash-hero { animation: heroPan 20s ease-in-out infinite, riseIn .55s ease both; }
body[data-page="Home"] .row.g-3 > [class*="col-"],
body[data-page="Home"] .news-grid-home > .news-card {
    animation: riseIn .5s ease both;
}
body[data-page="Home"] .row.g-3 > [class*="col-"]:nth-child(2) { animation-delay: .05s; }
body[data-page="Home"] .row.g-3 > [class*="col-"]:nth-child(3) { animation-delay: .10s; }
body[data-page="Home"] .row.g-3 > [class*="col-"]:nth-child(4) { animation-delay: .15s; }
body[data-page="Home"] .row.g-3 > [class*="col-"]:nth-child(5) { animation-delay: .20s; }
body[data-page="Home"] .row.g-3 > [class*="col-"]:nth-child(6) { animation-delay: .25s; }
body[data-page="Home"] .news-grid-home > .news-card:nth-child(2) { animation-delay: .06s; }
body[data-page="Home"] .news-grid-home > .news-card:nth-child(3) { animation-delay: .12s; }
body[data-page="Home"] .news-grid-home > .news-card:nth-child(4) { animation-delay: .18s; }
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* --- Honor reduced-motion: kill decorative animation, keep content visible --- */
@media (prefers-reduced-motion: reduce) {
    main[role="main"],
    .dash-hero, .dash-hero::before,
    body[data-page="Home"] .dash-hero,
    body[data-page="Home"] .row.g-3 > [class*="col-"],
    body[data-page="Home"] .news-grid-home > .news-card {
        animation: none !important;
    }
    .route-progress { display: none; }
    .kpi-card:hover, a.module-card:hover { transform: none; }
}

/* ============================================================
   Action Tracker dashboard
   ============================================================ */
/* Project picker chips */
.dash-projpick { display: flex; flex-wrap: wrap; gap: .5rem; }
.dash-proj input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dash-proj span { display: inline-block; padding: .35rem .8rem; border: 1px solid var(--border); border-radius: 999px;
    font-size: .85rem; cursor: pointer; background: var(--surface); color: var(--text); transition: background .12s ease, border-color .12s ease, color .12s ease; user-select: none; }
.dash-proj span:hover { border-color: var(--primary, #454bea); }
.dash-proj input:checked + span { background: var(--primary, #454bea); border-color: var(--primary, #454bea); color: #fff; font-weight: 600; }
.dash-proj input:focus-visible + span { outline: 2px solid var(--primary, #454bea); outline-offset: 2px; }

/* KPI tiles */
.dash-kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); padding: .9rem 1rem; height: 100%; border-left: 3px solid var(--primary, #454bea); }
.dash-kpi-val { font-size: 1.5rem; font-weight: 800; line-height: 1.1; color: var(--text); }
.dash-kpi-lbl { font-size: .76rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin-top: .15rem; }
.dash-kpi-sub { font-size: .72rem; color: #9ca3af; margin-top: .1rem; }
.dash-kpi-done { border-left-color: #0c9b6f; }
.dash-kpi-over { border-left-color: #e23b3b; }
.dash-kpi-soon { border-left-color: #f59e0b; }

/* Completion donut */
.dash-donut { width: 150px; height: 150px; border-radius: 50%; margin: .25rem auto 0; position: relative;
    background: conic-gradient(#0c9b6f calc(var(--pct) * 1%), #e5e7eb 0); }
.dash-donut-hole { position: absolute; inset: 18px; background: var(--surface); border-radius: 50%;
    display: flex; flex-direction: column; align-items: center; justify-content: center; }
.dash-donut-pct { font-size: 1.6rem; font-weight: 800; color: var(--text); line-height: 1; }
.dash-donut-sub { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-top: .15rem; }
.dash-legend { display: flex; justify-content: center; gap: 1rem; font-size: .8rem; color: var(--muted); }
.dash-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .25rem; vertical-align: middle; }
.dash-mini-val { font-size: 1.3rem; font-weight: 800; color: var(--text); }
.dash-mini-lbl { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* Horizontal bars (status / priority / workload / per-project) */
.dash-bar-row { margin-bottom: .7rem; }
.dash-bar-row:last-child { margin-bottom: 0; }
.dash-bar-top { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .22rem; }
.dash-bar-lbl { font-size: .85rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-bar-num { font-size: .82rem; font-weight: 700; color: var(--text); white-space: nowrap; }
.dash-bar { background: #eef1f6; border-radius: 6px; height: 8px; overflow: hidden; }
.dash-bar-fill { height: 100%; border-radius: 6px; min-width: 2px; transition: width .4s ease; }
.dash-proj-table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
