/* HN Group Staff Portal — colours taken from the HN Group logo stripes */
:root {
    --pink: #e97de8;
    --purple: #5514b4;
    --yellow: #e3e65b;
    --teal: #3e9ba3;
    --plum: #7a1f6c;
    --raspberry: #c2306b;
    --green: #5fae7b;
    --navy: #1c2135;

    --primary: #5514b4;
    --primary-hover: #460f96;
    --primary-tint: #f3eefb;
    --bg: #f5f6f9;
    --surface: #ffffff;
    --surface-2: #f8f9fb;
    --text: #1a1a1a;
    --text-muted: #5f6577;
    --border: #e3e5ec;
    --border-strong: #cfd3de;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(28, 33, 53, 0.05), 0 4px 16px rgba(28, 33, 53, 0.06);
    --shadow-pop: 0 2px 6px rgba(28, 33, 53, 0.06), 0 16px 40px rgba(28, 33, 53, 0.16);
    --on-primary: #ffffff;
    --focus-ring: rgba(85, 20, 180, 0.15);
    --primary-soft-border: #ddd0f3;
    --row-hover: #fbfbfd;
    --border-hover: #d4d7e2;
    --backdrop: rgba(28, 33, 53, 0.5);
    --success-bg: #e9f6ee; --success-text: #23683d; --success-border: #bfe3cc;
    --warn-bg: #fbfbe3; --warn-text: #6b6a12; --warn-border: #e6e79a;
    --danger-bg: #fdecf2; --danger-text: #9b1d4f; --danger-border: #f6c4d6;
    --alt-tint: #e7f4f5; --alt: #3e9ba3;
    --inverse-bg: #1c2135; --inverse-text: #ffffff;
    --input-bg: #ffffff;
    color-scheme: light;
    --topbar-h: 68px;
    --stripe: linear-gradient(90deg,
        #e97de8 0 14%, #5514b4 14% 26%, #e3e65b 26% 31%,
        #3e9ba3 31% 49%, #7a1f6c 49% 57%, #c2306b 57% 66%,
        #5fae7b 66% 78%, #1c2135 78% 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
body.modal-open { overflow: hidden; }
body.app-loading .topbar > *:not(.brand), body.app-loading .footer { visibility: hidden; }

h1 { font-size: 1.9rem; line-height: 1.2; letter-spacing: -0.02em; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
a { color: var(--primary); }
.muted { color: var(--text-muted); }
.small { font-size: 0.85rem; }
.center { text-align: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.icon { width: 18px; height: 18px; flex-shrink: 0; }
.icon.big { width: 44px; height: 44px; color: var(--text-muted); }

/* ---------- Brand ---------- */
.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}
.brand-logo { height: 38px; width: auto; display: block; }
.brand-sub {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    border-left: 1px solid var(--border);
    padding-left: 0.9rem;
    white-space: nowrap;
}
.brand-lg { flex-direction: column; gap: 0.6rem; margin-bottom: 1.75rem; }
.brand-lg .brand-logo { height: 72px; }
.brand-lg .brand-sub { border-left: 0; padding-left: 0; }

/* ---------- Forms & buttons ---------- */
label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 1rem 0 0.4rem;
}
.req { color: var(--raspberry); }
input[type="text"], input[type="password"], input[type="search"], input[type="tel"], input[type="email"], input[type="number"], input[type="date"], input[type="time"], input[type="month"], input[type="datetime-local"], select, textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    font: inherit;
    color: var(--text);
    background: var(--input-bg);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
select {
    appearance: none;
    padding-right: 2.2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f6577' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 16px;
}
textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--focus-ring);
}
input[readonly] { background: var(--surface-2); color: var(--text-muted); }

.password-field { position: relative; }
.password-field input { padding-right: 4.2rem; }
.toggle-pw {
    position: absolute;
    right: 0.4rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 0;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    padding: 0.35rem 0.5rem;
    cursor: pointer;
    border-radius: 6px;
}
.toggle-pw:hover { background: var(--primary-tint); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.65rem 1.15rem;
    font: inherit;
    font-size: 0.925rem;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, opacity 0.15s;
    margin: 0;
}
.btn .icon { width: 16px; height: 16px; }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-danger { background: var(--raspberry); color: #fff; }
.btn-danger:hover { background: #a82659; }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-dark { background: var(--inverse-bg); color: var(--inverse-text); }
.btn-small { padding: 0.45rem 0.9rem; font-size: 0.85rem; }
.btn-block { width: 100%; margin-top: 1.5rem; }
.btn-block-sm { width: 100%; margin-top: 1rem; }
.btn-link {
    background: none;
    border: 0;
    padding: 0.3rem 0;
    color: var(--primary);
    font-weight: 600;
}
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: var(--raspberry); }
.btn-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
}
.icon-btn:hover, .icon-btn[aria-expanded="true"] { background: var(--surface-2); border-color: var(--border); color: var(--text); }

.form-error, .form-success {
    margin-top: 1rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    font-size: 0.875rem;
}
.form-error { background: var(--danger-bg); color: var(--danger-text); border: 1px solid var(--danger-border); }
.form-success { background: var(--success-bg); color: var(--success-text); border: 1px solid var(--success-border); }
.hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.4rem; }
.hint-top { margin: 0 0 0.75rem; }
.form-actions { margin-top: 1.25rem; display: flex; justify-content: flex-end; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }

/* ---------- Login ---------- */
.login-page { min-height: 100vh; }
.login-shell { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }

/* Brand panel: always the deep HN Group colours, whatever the theme */
.login-brand {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(145deg, #1c2135 0%, #2a1650 55%, #3d1a6e 100%);
    display: flex;
}
.login-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
    animation: drift 18s ease-in-out infinite alternate;
}
.login-glow.g1 { width: 420px; height: 420px; background: #5514b4; top: -120px; left: -80px; }
.login-glow.g2 { width: 360px; height: 360px; background: #c2306b; bottom: -140px; right: -60px; animation-duration: 22s; opacity: 0.4; }
.login-glow.g3 { width: 300px; height: 300px; background: #3e9ba3; top: 40%; left: 45%; animation-duration: 26s; opacity: 0.3; }
@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, 30px) scale(1.08); }
    100% { transform: translate(-30px, 50px) scale(0.95); }
}
.login-brand-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: 3.5rem 3rem;
}
.login-brand-logo { width: 150px; height: auto; animation: rise 0.6s ease both; }
.login-kicker {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #e97de8;
    margin-bottom: 0.9rem;
}
.login-brand-copy h2 { font-size: 2.3rem; line-height: 1.15; letter-spacing: -0.02em; animation: rise 0.6s 0.08s ease both; }
.login-brand-copy p:last-child { margin-top: 1rem; color: rgba(255, 255, 255, 0.72); font-size: 1.05rem; max-width: 30rem; animation: rise 0.6s 0.16s ease both; }
.login-companies { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; animation: rise 0.6s 0.24s ease both; }
.login-companies li {
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
}
.login-stripes { display: flex; gap: 6px; height: 6px; }
.login-stripes span { flex: 1; border-radius: 3px; transform-origin: left; animation: stripe-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.login-stripes span:nth-child(1) { background: #e97de8; animation-delay: 0.30s; flex: 1.4; }
.login-stripes span:nth-child(2) { background: #5514b4; animation-delay: 0.36s; flex: 1.2; }
.login-stripes span:nth-child(3) { background: #e3e65b; animation-delay: 0.42s; flex: 0.5; }
.login-stripes span:nth-child(4) { background: #3e9ba3; animation-delay: 0.48s; flex: 1.8; }
.login-stripes span:nth-child(5) { background: #7a1f6c; animation-delay: 0.54s; flex: 0.8; }
.login-stripes span:nth-child(6) { background: #c2306b; animation-delay: 0.60s; flex: 0.9; }
.login-stripes span:nth-child(7) { background: #5fae7b; animation-delay: 0.66s; flex: 1.2; }
.login-stripes span:nth-child(8) { background: #8b93b0; animation-delay: 0.72s; flex: 2.2; }
@keyframes stripe-in { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }

/* Sign-in form side */
.login-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    background: var(--bg);
}
.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-pop);
    padding: 2.5rem 2.25rem 2rem;
    animation: rise 0.5s 0.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.login-card.shake { animation: shake 0.4s ease; }
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(7px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(3px); }
}
.login-card-logo { margin-bottom: 1.75rem; }
.login-card-logo img { height: 46px; width: auto; display: block; }
.login-card h1 { font-size: 1.75rem; letter-spacing: -0.02em; }
.login-card > .muted { margin-top: 0.3rem; font-size: 0.95rem; }
.field-icon { position: relative; }
.field-icon > .icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.15s;
}
.field-icon input { padding-left: 2.6rem; height: 48px; }
.field-icon:focus-within > .icon { color: var(--primary); }
.btn-login { position: relative; height: 50px; font-size: 1rem; margin-top: 1.75rem; overflow: hidden; }
.btn-login .btn-arrow { width: 18px; height: 18px; transition: transform 0.2s; }
.btn-login:hover:not(:disabled) .btn-arrow { transform: translateX(4px); }
.btn-login .spinner { display: none; }
.btn-login.busy .btn-arrow { display: none; }
.btn-login.busy .spinner, .btn-login.done .spinner { display: none; }
.btn-login.busy .spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: var(--on-primary);
    animation: spin 0.7s linear infinite;
}
.btn-login:disabled { opacity: 0.9; }
@keyframes spin { to { transform: rotate(360deg); } }
.login-foot { margin-top: 1.5rem; font-size: 0.85rem; text-align: center; }
.legal { margin-top: 1.25rem; font-size: 0.78rem; color: var(--text-muted); text-align: center; }
body.leaving .login-card { transition: transform 0.35s ease, opacity 0.35s ease; transform: translateY(-8px) scale(0.98); opacity: 0; }

@media (max-width: 900px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-brand { min-height: auto; }
    .login-brand-inner { padding: 2rem 1.5rem 1.75rem; gap: 1.25rem; }
    .login-brand-copy h2 { font-size: 1.5rem; }
    .login-brand-copy p:last-child, .login-companies { display: none; }
    .login-brand-logo { width: 110px; }
    .login-card-logo { display: none; }
    .login-main { padding: 1.5rem 1rem 2rem; justify-content: flex-start; }
    .login-card { padding: 2rem 1.5rem 1.5rem; }
}

/* ---------- Top bar & navigation ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--topbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.75rem;
}
.topbar::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -4px;
    height: 4px;
    background: var(--stripe);
    z-index: 1;
    pointer-events: none;
}
.mainnav { display: flex; align-items: center; gap: 0.25rem; height: 100%; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 0.5rem; height: 100%; margin-left: auto; }
.nav-item { position: relative; height: 100%; display: flex; align-items: center; }
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    height: 38px;
    padding: 0 0.8rem;
    border-radius: 8px;
    border: 0;
    background: none;
    font: inherit;
    font-size: 0.925rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.nav-link .icon { width: 17px; height: 17px; }
.nav-link .chev { width: 15px; height: 15px; transition: transform 0.15s; }
.nav-link:hover, .nav-link[aria-expanded="true"] { background: var(--surface-2); color: var(--text); }
.nav-link[aria-expanded="true"] .chev { transform: rotate(180deg); }
.nav-link.active { color: var(--primary); background: var(--primary-tint); }
.nav-toggle { display: none; }

/* Dropdown menus — open below the colour stripe and above everything else in the bar. */
.menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 70;
    min-width: 300px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-pop);
    padding: 0.4rem;
    animation: menu-in 0.12s ease-out;
}
.menu-right { left: auto; right: 0; }
@keyframes menu-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: none; }
}
.menu-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    padding: 0.6rem 0.7rem;
    border: 0;
    border-radius: 10px;
    background: none;
    font: inherit;
    text-align: left;
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--primary-tint); outline: none; }
.mi-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--primary-tint);
    color: var(--primary);
    flex-shrink: 0;
}
.menu-item:hover .mi-icon { background: var(--primary); color: var(--on-primary); }
.mi-text { display: flex; flex-direction: column; min-width: 0; }
.mi-title { font-weight: 600; font-size: 0.925rem; display: flex; align-items: center; gap: 0.4rem; }
.mi-desc { font-size: 0.8rem; color: var(--text-muted); }
.soon {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.menu-item.compact { padding: 0.55rem 0.75rem; gap: 0.7rem; font-size: 0.925rem; }
.menu-item.compact .icon { color: var(--text-muted); }
.menu-item.compact:hover .icon { color: var(--primary); }
.menu-item.danger, .menu-item.danger .icon { color: var(--raspberry); }
.menu-item.danger:hover { background: var(--danger-bg); }
.menu-item.danger:hover .icon { color: var(--raspberry); }
.menu-sep { height: 1px; background: var(--border); margin: 0.35rem 0.25rem; }
.menu-header { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.7rem 0.5rem; }
.menu-header-text { min-width: 0; }
.mh-name { font-weight: 700; }
.mh-email { font-size: 0.8rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-user { min-width: 270px; }

.user-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: none;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.25rem 0.6rem 0.25rem 0.25rem;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-align: left;
}
.user-btn:hover, .user-btn[aria-expanded="true"] { background: var(--surface-2); border-color: var(--border); }
.user-btn .chev { width: 15px; height: 15px; color: var(--text-muted); }
.user-meta { display: flex; flex-direction: column; line-height: 1.25; max-width: 200px; }
.user-name { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* First sign-in: hide navigation until a password is set */
body.locked .mainnav, body.locked .topbar-right { display: none; }

/* ---------- Avatars ---------- */
.avatar {
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    flex-shrink: 0;
    object-fit: cover;
    background: var(--primary);
    line-height: 1;
}
.avatar-xs { width: 24px; height: 24px; font-size: 0.65rem; }
.avatar-sm { width: 34px; height: 34px; font-size: 0.8rem; }
.avatar-md { width: 42px; height: 42px; font-size: 0.95rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.2rem; }
.avatar-xl { width: 96px; height: 96px; font-size: 2rem; }
.avatar-c0 { background: var(--primary); }
.avatar-c1 { background: var(--teal); }
.avatar-c2 { background: var(--raspberry); }
.avatar-c3 { background: var(--plum); }
.avatar-c4 { background: #3f8a5a; }
.avatar-c5 { background: var(--navy); }

/* ---------- Page layout ---------- */
.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
    flex: 1;
    outline: none;
}
.loading, .empty { padding: 3rem 1rem; text-align: center; color: var(--text-muted); }
.empty-page { text-align: center; padding: 4rem 1rem; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.page-head .muted { margin-top: 0.3rem; }
.page-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}
.banner-warn { background: var(--warn-bg); border: 1px solid var(--warn-border); }

.hero { margin: 0.25rem 0 1.5rem; }
.eyebrow {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 0.35rem;
}
.hero .muted { margin-top: 0.35rem; }

/* Clocks */
.clocks { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 2.25rem; }
.clock-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.4rem;
    box-shadow: 0 1px 2px rgba(28, 33, 53, 0.04);
    position: relative;
    overflow: hidden;
}
.clock-card::before {
    content: "";
    position: absolute;
    left: 0; top: 0; right: 0;
    height: 3px;
    background: var(--primary);
}
.clock-card-alt::before { background: var(--teal); }
.clock-head { display: flex; align-items: center; gap: 0.75rem; }
.clock-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--primary-tint);
    color: var(--primary);
}
.clock-card-alt .clock-icon { background: var(--alt-tint); color: var(--alt); }
.clock-label { font-weight: 700; }
.clock-sub { font-size: 0.8rem; color: var(--text-muted); }
.clock-time {
    font-size: 2.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    margin-top: 0.75rem;
    line-height: 1.1;
}
.clock-date { color: var(--text-muted); margin-top: 0.2rem; }
.clock-note {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding-top: 0.6rem;
    border-top: 1px dashed var(--border);
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 2rem;
    align-items: start;
}
.section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.9rem;
}

.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}
.tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(28, 33, 53, 0.04);
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    overflow: hidden;
}
.tile::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--accent, var(--primary));
}
.tile-c0 { --accent: var(--primary); }
.tile-c1 { --accent: var(--teal); }
.tile-c2 { --accent: var(--pink); }
.tile-c3 { --accent: var(--raspberry); }
.tile-c4 { --accent: var(--green); }
.tile-c5 { --accent: var(--plum); }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-hover); }
.tile-icon { color: var(--accent); margin-bottom: 0.4rem; }
.tile-icon .icon { width: 24px; height: 24px; }
.tile-title { font-weight: 700; }
.tile-desc { font-size: 0.875rem; color: var(--text-muted); }

.tag, .badge {
    display: inline-block;
    align-self: flex-start;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.12rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-muted);
    white-space: nowrap;
}
.tag { margin-top: 0.5rem; }
.tag-live { background: var(--primary-tint); color: var(--primary); border-color: var(--primary-soft-border); }
.badge-grey { }
.badge-green { background: var(--success-bg); color: var(--success-text); border-color: var(--success-border); }
.badge-yellow { background: var(--warn-bg); color: var(--warn-text); border-color: var(--warn-border); }
.badge-red { background: var(--danger-bg); color: var(--danger-text); border-color: var(--danger-border); }

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}
.side-col .panel + .panel { margin-top: 1rem; }
.panel .muted { font-size: 0.9rem; }
.panel-title { font-size: 1.05rem; margin-bottom: 0.25rem; }
.news h3 { margin: 0 0 0.35rem; }
.me-card { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 0.75rem; }
.me-name { font-weight: 700; }

.facts { display: grid; grid-template-columns: auto 1fr; gap: 0.45rem 1rem; font-size: 0.9rem; margin-top: 0.75rem; }
.facts dt { color: var(--text-muted); }
.facts dd { word-break: break-word; }

.footer { text-align: center; font-size: 0.8rem; padding: 1.5rem; border-top: 1px solid var(--border); }

/* ---------- Toolbar, directory ---------- */
.toolbar { display: flex; gap: 0.75rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.toolbar select { width: auto; min-width: 220px; }
.search { position: relative; flex: 1; min-width: 240px; margin: 0; font-weight: 400; }
.search .icon { position: absolute; left: 0.8rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); width: 17px; height: 17px; }
.search input { padding-left: 2.4rem; }

.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; margin-top: 0.75rem; }
.person-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.2rem;
    padding: 1.5rem 1rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font: inherit;
    color: inherit;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.person-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.person-card .avatar { margin-bottom: 0.6rem; }
.pc-name { font-weight: 700; }
.pc-title { font-size: 0.875rem; }
.pc-company { font-size: 0.8rem; color: var(--primary); font-weight: 600; }
.pc-meta { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.78rem; color: var(--text-muted); margin-top: 0.5rem; }
.pc-meta .icon { width: 13px; height: 13px; }

.profile-head { display: flex; align-items: center; gap: 1.25rem; padding-right: 2rem; }
.profile-body { margin-top: 1.5rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
.chip { font-size: 0.78rem; font-weight: 600; padding: 0.15rem 0.6rem; border-radius: 999px; background: var(--primary-tint); color: var(--primary); }
.person-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.25rem 0.75rem 0.25rem 0.25rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    font: inherit;
    font-size: 0.875rem;
    cursor: pointer;
}
.person-chip:hover { border-color: var(--primary); }
.detail-row { display: flex; gap: 0.85rem; padding: 0.7rem 0; border-top: 1px solid var(--border); }
.detail-row > .icon { color: var(--text-muted); margin-top: 0.15rem; }
.detail-row a { text-decoration: none; }
.detail-row a:hover { text-decoration: underline; }
.detail-head { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-top: 1.25rem; }

/* ---------- Employee table ---------- */
.table-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th {
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}
.table th:first-child { border-top-left-radius: var(--radius); }
.table th:last-child { border-top-right-radius: var(--radius); }
.table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--row-hover); }
.col-actions { width: 56px; text-align: right; }
.emp-cell { display: flex; align-items: center; gap: 0.75rem; }
.emp-name { font-weight: 600; }
.row-menu { height: auto; justify-content: flex-end; }
.row-menu .menu { top: calc(100% + 4px); min-width: 220px; }
.row-menu .menu.flip-up { top: auto; bottom: calc(100% + 4px); }

/* ---------- Modals ---------- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: var(--backdrop);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 6vh 1rem 2rem;
    overflow-y: auto;
    z-index: 100;
    animation: fade-in 0.12s ease-out;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
    position: relative;
    width: 100%;
    max-width: 460px;
    background: var(--surface);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 20px 50px rgba(28, 33, 53, 0.25);
}
.modal-wide { max-width: 720px; }
.modal-title { font-size: 1.3rem; padding-right: 2rem; }
.modal-title.center { padding: 0; }
.modal > .muted { margin-top: 0.3rem; }
.modal-close { position: absolute; top: 1rem; right: 1rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 1.5rem; flex-wrap: wrap; }
.sticky-actions {
    position: sticky;
    bottom: -1.75rem;
    background: var(--surface);
    margin: 1.5rem -1.75rem -1.75rem;
    padding: 1rem 1.75rem;
    border-top: 1px solid var(--border);
    border-radius: 0 0 16px 16px;
}

fieldset { border: 0; border-top: 1px solid var(--border); margin-top: 1.5rem; padding-top: 0.5rem; }
legend { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--primary); padding-right: 0.75rem; }

.check-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.check-chip { margin: 0; font-weight: 500; cursor: pointer; }
.check-chip input { position: absolute; opacity: 0; pointer-events: none; }
.check-chip span {
    display: inline-block;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    font-size: 0.85rem;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.check-chip input:checked + span { background: var(--primary-tint); border-color: var(--primary); color: var(--primary); font-weight: 600; }
.check-chip input:focus-visible + span { box-shadow: 0 0 0 3px var(--focus-ring); }
.check-chip.disabled { opacity: 0.4; cursor: default; }

.email-row { padding: 0.75rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); margin-bottom: 0.6rem; }
.email-input { display: flex; align-items: center; gap: 0.4rem; }
.email-input .email-local { flex: 1.2; min-width: 0; }
.email-input select { flex: 1; min-width: 0; }
.email-at { color: var(--text-muted); font-weight: 600; }
.email-opts { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; margin-top: 0.5rem; }
.email-opts .btn-link { margin-left: auto; font-size: 0.85rem; }
.inline-check { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0; font-weight: 500; font-size: 0.85rem; cursor: pointer; }
.inline-check input { accent-color: var(--primary); width: 15px; height: 15px; }
.email-note { margin-top: 0.4rem; font-size: 0.8rem; color: var(--warn-text); }

.success-mark {
    width: 56px;
    height: 56px;
    margin: 0.25rem auto 1rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--primary-tint);
    color: var(--primary);
}
.success-mark .icon { width: 26px; height: 26px; }
.cred-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 1rem;
    margin-top: 0.9rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
}
.cred-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.cred-value { font-weight: 600; font-size: 0.95rem; overflow-wrap: anywhere; }
.cred-value.big { font-size: 1.35rem; letter-spacing: 0.04em; }
.plain-list { list-style: none; margin-top: 0.5rem; font-size: 0.9rem; }
.plain-list li { padding: 0.35rem 0; border-bottom: 1px solid var(--border); }

/* ---------- Settings ---------- */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
.avatar-edit { display: flex; align-items: center; gap: 1.25rem; margin-top: 1rem; }
.avatar-edit label.btn { margin: 0; }
.settings-grid .facts { margin-top: 1rem; }
#password { scroll-margin-top: calc(var(--topbar-h) + 1.5rem); }

.force-wrap { display: flex; justify-content: center; padding: 2rem 0; }
.force-card {
    width: 100%;
    max-width: 440px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 2rem;
}
.force-card h1 { font-size: 1.5rem; }
.force-card .btn-link { margin-top: 0.75rem; }

.toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--inverse-bg);
    color: var(--inverse-text);
    padding: 0.7rem 1.1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    box-shadow: var(--shadow);
    z-index: 200;
    max-width: calc(100% - 2rem);
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .brand-sub { display: none; }
    .user-meta { display: none; }
    .topbar { gap: 1rem; }
}
@media (max-width: 900px) {
    .layout, .settings-grid { grid-template-columns: 1fr; }
    .nav-toggle { display: inline-grid; }
    .mainnav {
        display: none;
        position: absolute;
        top: calc(100% + 4px);
        left: 0;
        right: 0;
        height: auto;
        max-height: calc(100vh - var(--topbar-h));
        overflow-y: auto;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem 1rem 1rem;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-pop);
    }
    body.nav-open .mainnav { display: flex; }
    .mainnav .nav-item { height: auto; flex-direction: column; align-items: stretch; }
    .mainnav .nav-link { width: 100%; height: 46px; justify-content: flex-start; }
    .mainnav .nav-link .chev { margin-left: auto; }
    .mainnav .menu {
        position: static;
        box-shadow: none;
        border: 0;
        padding: 0 0 0.4rem 0.5rem;
        min-width: 0;
        animation: none;
    }
}
@media (max-width: 700px) {
    .clocks { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    .table thead { display: none; }
    .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
    .table tr { position: relative; padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
    .table tbody tr:last-child { border-bottom: 0; }
    .table td { border: 0; padding: 0.2rem 1rem; }
    .table td[data-label]::before { content: attr(data-label) ": "; color: var(--text-muted); font-size: 0.8rem; }
    .table td.col-actions { position: absolute; top: 0.75rem; right: 0; width: auto; }
    .table td:first-child { padding-right: 3rem; }
}
@media (max-width: 600px) {
    .topbar { padding: 0 1rem; }
    .brand-logo { height: 30px; }
    .container { padding: 1.5rem 1rem 2.5rem; }
    h1 { font-size: 1.5rem; }
    .clock-time { font-size: 2.1rem; }
    .banner { flex-direction: column; align-items: flex-start; }
    .login-card { padding: 2rem 1.25rem 1.5rem; }
    .modal { padding: 1.4rem; }
    .sticky-actions { margin: 1.5rem -1.4rem -1.4rem; padding: 1rem 1.4rem; bottom: -1.4rem; }
    .toolbar select { width: 100%; }
    .profile-head { flex-direction: column; align-items: flex-start; }
    .avatar-edit { flex-direction: column; align-items: flex-start; }
}

.count-pill {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-muted);
    vertical-align: 1px;
}

/* ---------- Owner, roles ---------- */
.badge-owner { background: var(--inverse-bg); color: var(--inverse-text); border-color: var(--inverse-bg); }
.role-list { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.6rem; }
.role-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
}
.role-item.current { border-color: var(--primary); background: var(--primary-tint); }
.role-company { font-weight: 600; font-size: 0.9rem; }
.role-list.compact { margin: 0.75rem 0 0; }
.role-list.compact .role-item { padding: 0.5rem 0.7rem; }
.facts dd .role-list { margin-top: 0; }

.role-row { margin-top: 0.75rem; padding: 0.75rem 0.9rem 0.9rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.role-row-head { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 0.9rem; color: var(--primary); }
.role-row-head .icon { width: 16px; height: 16px; }
.role-row label { margin-top: 0.6rem; }

/* ---------- Directory views ---------- */
.segmented { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); }
.segmented button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border: 0;
    border-radius: 8px;
    background: none;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
}
.segmented button .icon { width: 16px; height: 16px; }
.segmented button:hover { color: var(--text); }
.segmented button.active { background: var(--primary); color: var(--on-primary); }

.company-tabs { display: flex; gap: 0.4rem; overflow-x: auto; padding-bottom: 0.25rem; margin-bottom: 0.9rem; scrollbar-width: thin; }
.company-tabs button {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
}
.company-tabs button:hover { color: var(--text); border-color: var(--text-muted); }
.company-tabs button.active { background: var(--primary-tint); border-color: var(--primary); color: var(--primary); }
.tab-count { font-size: 0.72rem; padding: 0 0.4rem; border-radius: 999px; background: var(--surface-2); color: var(--text-muted); }
.company-tabs button.active .tab-count { background: var(--surface); color: var(--primary); }

.pc-reports { font-size: 0.78rem; color: var(--text-muted); }
.table-click tbody tr { cursor: pointer; }
.table-click tbody tr:focus-visible td { background: var(--primary-tint); outline: none; }
.nowrap { white-space: nowrap; }

/* Org chart */
.org-hint { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.6rem; }
.org-hint .icon { width: 15px; height: 15px; }
.org-scroll {
    overflow: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1rem 2rem;
    max-height: 75vh;
}
.org { width: max-content; min-width: 100%; margin: 0 auto; }
.org ul { display: flex; justify-content: center; padding-top: 22px; position: relative; list-style: none; }
.org li { position: relative; padding: 22px 8px 0; display: flex; flex-direction: column; align-items: center; }
.org li::before, .org li::after {
    content: "";
    position: absolute;
    top: 0;
    right: 50%;
    width: 50%;
    height: 22px;
    border-top: 2px solid var(--border-strong);
}
.org li::after { right: auto; left: 50%; border-left: 2px solid var(--border-strong); }
.org li:only-child::before, .org li:only-child::after { display: none; }
.org li:only-child { padding-top: 0; }
.org li:first-child::before, .org li:last-child::after { border: 0 none; }
.org li:last-child::before { border-right: 2px solid var(--border-strong); border-radius: 0 8px 0 0; }
.org li:first-child::after { border-radius: 8px 0 0 0; }
.org ul ul::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    height: 22px;
    border-left: 2px solid var(--border-strong);
}
.org ul.org-roots { padding-top: 0; gap: 2rem; align-items: flex-start; }
.org ul.org-roots > li { padding-top: 0; }
.org ul.org-roots > li::before, .org ul.org-roots > li::after { display: none; }
.org-node { position: relative; display: flex; flex-direction: column; align-items: center; }
.org-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 200px;
    padding: 0.6rem 0.7rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(28, 33, 53, 0.08);
    font: inherit;
    text-align: left;
    color: inherit;
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.15s;
}
.org-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.org-node.is-owner .org-card { border-top-color: var(--inverse-bg); }
.org-text { display: flex; flex-direction: column; min-width: 0; }
.org-name { font-weight: 700; font-size: 0.875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-title { font-size: 0.78rem; color: var(--text-muted); line-height: 1.3; }
.org-company { font-size: 0.7rem; font-weight: 600; color: var(--primary); margin-top: 0.1rem; }
.org-toggle {
    position: relative;
    z-index: 1;
    margin-top: -10px;
    min-width: 26px;
    height: 20px;
    padding: 0 0.4rem;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    font: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
}
.org-toggle:hover { border-color: var(--primary); color: var(--primary); }
.org-node:has(.org-toggle) + ul { padding-top: 12px; }

/* ---------- Logged in as banner ---------- */
.imp-banner { background: var(--inverse-bg); color: var(--inverse-text); }
.imp-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0.7rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    margin-top: 4px;
}
.imp-inner span { flex: 1; }
.btn-light { background: var(--inverse-text); color: var(--inverse-bg); }
.btn-light:hover { opacity: 0.9; }

/* ---------- System panel ---------- */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.25rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; }
.stat-value { font-size: 1.8rem; font-weight: 700; letter-spacing: -0.02em; }
.stat-label { font-size: 0.85rem; color: var(--text-muted); }
.sys-section { margin-bottom: 1.25rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.panel-title { display: flex; align-items: center; gap: 0.5rem; }
.panel-title .icon { color: var(--primary); }
.table-card.flat { border-radius: 10px; overflow-x: auto; }
.sys-search { display: block; margin: 0.75rem 0; }
.user-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 0.6rem; max-height: 420px; overflow-y: auto; }
.user-pick-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 10px;
}
.user-pick-row .emp-cell { min-width: 0; flex: 1; }
.user-pick-row .emp-cell > div { min-width: 0; }
.user-pick-row .muted.small, .user-pick-row .emp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-pick-row > .btn, .user-pick-row > .muted { flex-shrink: 0; white-space: nowrap; }
.audit { list-style: none; max-height: 360px; overflow-y: auto; margin-top: 0.75rem; }
.audit li { padding: 0.55rem 0; border-bottom: 1px solid var(--border); font-size: 0.875rem; }
.audit li:last-child { border-bottom: 0; }
.pin-input {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 1.8rem !important;
    letter-spacing: 0.6em;
    padding-left: 0.6em !important;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 700px) {
    .stat-row { grid-template-columns: 1fr 1fr 1fr; gap: 0.5rem; }
    .stat { padding: 0.75rem; }
    .stat-value { font-size: 1.4rem; }
    .user-pick { grid-template-columns: 1fr; }
    .imp-inner { flex-wrap: wrap; padding: 0.7rem 1rem; }
    .page-head .segmented { width: 100%; }
    .segmented button { flex: 1; justify-content: center; }
}

/* ---------- Activity log ---------- */
.audit-tools { margin-top: 0.75rem; }
.audit-table { max-height: 560px; overflow-y: auto; }
.audit-table thead th { position: sticky; top: 0; z-index: 1; }
.audit-table td { vertical-align: top; }
.audit-table tr.audit-bad td:nth-child(3) { color: var(--danger-text); }
.audit-more { margin-top: 0.75rem; }
.sys-pin { max-width: 560px; }
.audit-table th { white-space: nowrap; }


/* =================================================================
   Themes — chosen per user under Profile & settings → Appearance.
   The colour stripe always stays in the HN Group brand colours.
   ================================================================= */

/* Logo: the black wordmark on light themes, a white one on dark themes */
.logo-dark-theme { display: none !important; }
:root[data-theme="dark"] .logo-light-theme, :root[data-theme="lavender-dusk"] .logo-light-theme, :root[data-theme="midnight"] .logo-light-theme { display: none !important; }
:root[data-theme="dark"] .logo-dark-theme, :root[data-theme="lavender-dusk"] .logo-dark-theme, :root[data-theme="midnight"] .logo-dark-theme { display: block !important; }

:root[data-theme="lavender"] {
    --primary: #7c5cc4;
    --primary-hover: #6a4bb0;
    --primary-tint: #efe8fb;
    --primary-soft-border: #d9cbf3;
    --focus-ring: rgba(124, 92, 196, 0.2);
    --bg: #f5f1fc;
    --surface: #ffffff;
    --surface-2: #faf7fe;
    --input-bg: #ffffff;
    --text: #241b35;
    --text-muted: #6d6182;
    --border: #e8def7;
    --border-strong: #d5c7ee;
    --border-hover: #cbb8ec;
    --row-hover: #faf7fe;
    --alt-tint: #f6e9fb; --alt: #a05fc0;
    --inverse-bg: #3d2a63; --inverse-text: #ffffff;
    --shadow: 0 1px 2px rgba(61, 42, 99, 0.05), 0 4px 16px rgba(61, 42, 99, 0.07);
    --shadow-pop: 0 2px 6px rgba(61, 42, 99, 0.07), 0 16px 40px rgba(61, 42, 99, 0.16);
}

:root[data-theme="ocean"] {
    --primary: #1f7a8c;
    --primary-hover: #17606f;
    --primary-tint: #e3f2f5;
    --primary-soft-border: #bfe0e7;
    --focus-ring: rgba(31, 122, 140, 0.2);
    --bg: #f0f6f8;
    --surface-2: #f6fafb;
    --text: #12262c;
    --text-muted: #577079;
    --border: #dce8ec;
    --border-strong: #c3d6dc;
    --border-hover: #b3cbd2;
    --row-hover: #f6fafb;
    --alt-tint: #e5edfb; --alt: #3a68c4;
    --inverse-bg: #12343d; --inverse-text: #ffffff;
}

:root[data-theme="forest"] {
    --primary: #2f7d4f;
    --primary-hover: #25653f;
    --primary-tint: #e6f2ea;
    --primary-soft-border: #c4e1cf;
    --focus-ring: rgba(47, 125, 79, 0.2);
    --bg: #f2f6f1;
    --surface-2: #f7faf6;
    --text: #17261c;
    --text-muted: #5b6e60;
    --border: #dde7dd;
    --border-strong: #c6d5c7;
    --border-hover: #b5c8b7;
    --row-hover: #f7faf6;
    --alt-tint: #f5efe1; --alt: #a07a2c;
    --inverse-bg: #1d3a28; --inverse-text: #ffffff;
}

/* Dark themes */
:root[data-theme="dark"], :root[data-theme="lavender-dusk"], :root[data-theme="midnight"] {
    color-scheme: dark;
    --on-primary: #ffffff;
    --backdrop: rgba(0, 0, 0, 0.6);
    --success-bg: rgba(95, 174, 123, 0.15); --success-text: #8fd6a8; --success-border: rgba(95, 174, 123, 0.35);
    --warn-bg: rgba(227, 230, 91, 0.1); --warn-text: #e6e88f; --warn-border: rgba(227, 230, 91, 0.3);
    --danger-bg: rgba(194, 48, 107, 0.16); --danger-text: #ff94bd; --danger-border: rgba(194, 48, 107, 0.4);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
    --shadow-pop: 0 2px 6px rgba(0, 0, 0, 0.35), 0 16px 40px rgba(0, 0, 0, 0.45);
    --inverse-bg: #eef0f6; --inverse-text: #151821;
}

:root[data-theme="dark"] {
    --primary: #9a6cf0;
    --primary-hover: #8857e8;
    --primary-tint: rgba(154, 108, 240, 0.16);
    --primary-soft-border: rgba(154, 108, 240, 0.4);
    --focus-ring: rgba(154, 108, 240, 0.3);
    --bg: #0f1117;
    --surface: #171a22;
    --surface-2: #1d212b;
    --input-bg: #12151c;
    --text: #eceef4;
    --text-muted: #9aa0b0;
    --border: #272c38;
    --border-strong: #363c4b;
    --border-hover: #444b5c;
    --row-hover: #1c2029;
    --alt-tint: rgba(62, 155, 163, 0.18); --alt: #6cc6ce;
}

:root[data-theme="lavender-dusk"] {
    --primary: #b79cf2;
    --primary-hover: #a586ec;
    --on-primary: #1d1530;
    --primary-tint: rgba(183, 156, 242, 0.15);
    --primary-soft-border: rgba(183, 156, 242, 0.4);
    --focus-ring: rgba(183, 156, 242, 0.3);
    --bg: #17121f;
    --surface: #201a2b;
    --surface-2: #281f35;
    --input-bg: #1a1424;
    --text: #efe9fb;
    --text-muted: #a99cbf;
    --border: #33293f;
    --border-strong: #43374f;
    --border-hover: #554766;
    --row-hover: #261e31;
    --alt-tint: rgba(233, 125, 232, 0.15); --alt: #f0a6ef;
}

:root[data-theme="midnight"] {
    --primary: #5ea8ff;
    --primary-hover: #4794f2;
    --on-primary: #08121f;
    --primary-tint: rgba(94, 168, 255, 0.14);
    --primary-soft-border: rgba(94, 168, 255, 0.4);
    --focus-ring: rgba(94, 168, 255, 0.3);
    --bg: #0a0f1c;
    --surface: #111a2c;
    --surface-2: #162137;
    --input-bg: #0d1424;
    --text: #e7eefb;
    --text-muted: #8fa0bd;
    --border: #1f2b44;
    --border-strong: #2c3a57;
    --border-hover: #3a4a6b;
    --row-hover: #142036;
    --alt-tint: rgba(56, 189, 248, 0.15); --alt: #7dd3fc;
}

/* Dark-theme touch-ups for things drawn on top of the surface colours */
:root[data-theme="dark"] .badge-owner, :root[data-theme="lavender-dusk"] .badge-owner, :root[data-theme="midnight"] .badge-owner { border-color: transparent; }
:root[data-theme="dark"] select, :root[data-theme="lavender-dusk"] select, :root[data-theme="midnight"] select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0a6b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* ---------- Appearance picker ---------- */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; margin-top: 1rem; }
.theme-option {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.6rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s;
}
.theme-option:hover { border-color: var(--border-hover); }
.theme-option.active { border-color: var(--primary); }
.theme-option:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.theme-preview {
    position: relative;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(128, 128, 128, 0.25);
}
.theme-preview .tp-bar { position: absolute; left: 0; right: 0; top: 0; height: 12px; }
.theme-preview .tp-card { position: absolute; left: 10px; right: 34px; top: 20px; bottom: 10px; border-radius: 5px; }
.theme-preview .tp-dot { position: absolute; right: 10px; top: 22px; width: 16px; height: 16px; border-radius: 50%; }
.theme-preview .tp-line { position: absolute; left: 18px; top: 30px; width: 40%; height: 5px; border-radius: 3px; }
.theme-preview.split .tp-half { position: absolute; top: 0; bottom: 0; right: 0; width: 50%; }
.theme-name { display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: 0.875rem; padding: 0 0.15rem; }
.theme-name .icon { width: 16px; height: 16px; color: var(--primary); }

/* Home: your details beside news and help */
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; align-items: start; }
.home-grid > .panel:first-child { grid-row: span 2; }
@media (max-width: 700px) { .home-grid > .panel:first-child { grid-row: auto; } }
.inline-check.remember { margin-top: 1rem; }

/* ---------- Settings tabs ---------- */
.settings-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.settings-nav { display: flex; flex-direction: column; gap: 0.25rem; position: sticky; top: calc(var(--topbar-h) + 1.25rem); }
.settings-nav button {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.8rem;
    border: 0;
    border-radius: 8px;
    background: none;
    font: inherit;
    font-weight: 600;
    font-size: 0.925rem;
    color: var(--text-muted);
    text-align: left;
    cursor: pointer;
}
.settings-nav button:hover { background: var(--surface-2); color: var(--text); }
.settings-nav button.active { background: var(--primary-tint); color: var(--primary); }
.settings-body .span-2 { grid-column: 1 / -1; }
.narrow-panel { max-width: 520px; }
@media (max-width: 800px) {
    .settings-layout { grid-template-columns: 1fr; }
    .settings-nav { position: static; flex-direction: row; overflow-x: auto; }
    .settings-nav button { flex-shrink: 0; }
}

/* ---------- Nav counts ---------- */
.count-badge {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: var(--raspberry);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
}
.nav-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--raspberry); }
.badge-new { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.badge .icon { width: 12px; height: 12px; vertical-align: -2px; margin-right: 0.2rem; }

/* ---------- Announcements ---------- */
.announcements { display: flex; flex-direction: column; gap: 1rem; max-width: 820px; }
.announcement {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.4rem;
    border-left: 4px solid var(--border);
}
.announcement.unread { border-left-color: var(--primary); }
.announcement.important { border-left-color: var(--raspberry); }
.ann-head { display: flex; align-items: center; gap: 0.75rem; }
.ann-meta { flex: 1; min-width: 0; }
.ann-author { font-weight: 700; }
.ann-flags { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; }
.ann-flags .row-menu { height: auto; }
.ann-title { font-size: 1.2rem; margin: 0.9rem 0 0.4rem; }
.ann-body { line-height: 1.6; overflow-wrap: anywhere; }
.announcement footer { margin-top: 0.9rem; }
.chip-all { background: var(--surface-2); color: var(--text-muted); }
.option-row { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 1rem; }

/* Home panels */
.panel-head.tight { margin-bottom: 0.5rem; }
.panel-head.tight .section-title { margin: 0; }
.news-item { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.65rem 0; border-top: 1px solid var(--border); text-decoration: none; color: inherit; }
.news-item:first-child { border-top: 0; padding-top: 0; }
.news-item:hover .news-title { color: var(--primary); }
.news-date { font-size: 0.75rem; font-weight: 600; color: var(--primary); }
.news-title { font-weight: 700; }
.news-snippet { overflow-wrap: anywhere; }
.todo-panel { border-color: var(--warn-border); background: var(--warn-bg); }
.todo-panel .section-title { display: flex; align-items: center; gap: 0.4rem; color: var(--warn-text); }
.todo-list { list-style: none; margin: 0.5rem 0 0; display: flex; flex-direction: column; gap: 0.4rem; }
.todo-list li { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: 0.9rem; }

/* ---------- Documents ---------- */
.doc-list { display: flex; flex-direction: column; gap: 0.75rem; }
.doc-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.doc-row.needs-ack { border-color: var(--warn-border); box-shadow: inset 4px 0 0 var(--yellow); }
.doc-main { flex: 1; min-width: 0; }
.doc-title { font-weight: 700; }
.doc-desc { margin-top: 0.15rem; }
.doc-meta { margin-top: 0.3rem; }
.doc-main .chips { margin-top: 0.5rem; }
.doc-side { display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; flex-shrink: 0; }
.doc-side .btn-row { align-items: center; }
.doc-side .row-menu { height: auto; }
.file-badge {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    flex-shrink: 0;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: #fff;
    background: #6b7280;
}
.todo-list .file-badge { width: 30px; height: 30px; border-radius: 7px; font-size: 0.55rem; }
.file-pdf { background: #c2306b; }
.file-doc, .file-docx, .file-odt, .file-rtf { background: #2f62c4; }
.file-xls, .file-xlsx, .file-ods, .file-csv { background: #2f7d4f; }
.file-ppt, .file-pptx, .file-odp { background: #c25b2f; }
.file-png, .file-jpg, .file-jpeg { background: #7a1f6c; }
.file-txt { background: #5f6577; }
.ack-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 0;
    background: none;
    font: inherit;
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
}
.ack-progress:hover { color: var(--primary); }
.ack-bar { width: 90px; height: 6px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.ack-bar span { display: block; height: 100%; background: var(--green); }
.ack-list { list-style: none; margin-top: 0.5rem; max-height: 300px; overflow-y: auto; }
.ack-row { display: flex; align-items: center; gap: 0.7rem; padding: 0.45rem 0; border-bottom: 1px solid var(--border); }
.ack-who { flex: 1; min-width: 0; }
.ack-open { justify-content: center; margin: 1rem 0; }
.ack-confirm { margin: 0.5rem 0 0; justify-content: center; display: flex; }

.drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 1.5rem 1rem;
    margin: 1rem 0 0;
    border: 2px dashed var(--border-strong);
    border-radius: 12px;
    background: var(--surface-2);
    text-align: center;
    font-weight: 400;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.drop-zone .icon { width: 26px; height: 26px; color: var(--primary); }
.drop-zone:hover, .drop-zone.dragging { border-color: var(--primary); background: var(--primary-tint); }
.dz-text { overflow-wrap: anywhere; }
.upload-progress { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 0.6rem; }
.upload-progress span { display: block; height: 100%; width: 0; background: var(--primary); transition: width 0.2s; }

@media (max-width: 700px) {
    .doc-row { flex-wrap: wrap; }
    .doc-side { width: 100%; align-items: flex-start; }
}

/* Home: announcements front and centre */
.home-announcements { margin-bottom: 2rem; }
.home-announcements .section-title { display: flex; align-items: center; gap: 0.45rem; }
.home-announcements .section-title .icon { width: 16px; height: 16px; color: var(--primary); }
.announcements.wide { max-width: none; }
.read-more { display: inline-block; margin-top: 0.4rem; font-weight: 600; }
.more-link { align-self: flex-start; }
.popup-list { margin-top: 1rem; max-height: 60vh; overflow-y: auto; }
.popup-list .announcement { box-shadow: none; }

.hero-sub { margin-top: 0.35rem; font-size: 1.02rem; }

/* Role profiles */
.badge-soft { background: var(--surface-2); color: var(--text-muted); }
.person-card .badge { margin-top: 0.15rem; }
.profile-role { font-weight: 600; font-size: 1.05rem; }
.role-switch { width: 100%; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.role-switch:hover { border-color: var(--primary); }

/* ---------- Sign-in code ---------- */
.login-step.step-enter { animation: rise 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.code-mark {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: var(--primary-tint);
    color: var(--primary);
    margin-bottom: 1.25rem;
}
.code-mark .icon { width: 26px; height: 26px; }
.code-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.6rem; margin-top: 1.5rem; }
.code-boxes input {
    width: 100%;
    height: 58px;
    padding: 0;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    border-radius: 12px;
    border: 1.5px solid var(--border-strong);
    background: var(--input-bg);
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.code-boxes input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--focus-ring); transform: translateY(-2px); outline: none; }
.code-boxes input.filled { border-color: var(--primary); background: var(--primary-tint); animation: pop 0.18s ease; }
@keyframes pop { 50% { transform: scale(1.08); } }
.code-back { display: block; margin: 1rem auto 0; font-size: 0.9rem; }
.code-setup .code-boxes { margin-top: 0.6rem; }
.code-setup .code-label { font-size: 0.85rem; font-weight: 600; margin-top: 1.25rem; }

/* ---------- Profile pop-up ---------- */
.modal-profile { max-width: 560px; padding: 0; overflow: hidden; }
.modal-profile .modal-close { color: #fff; background: rgba(0, 0, 0, 0.18); z-index: 2; }
.modal-profile .modal-close:hover { background: rgba(0, 0, 0, 0.3); border-color: transparent; color: #fff; }
.profile-cover {
    height: 104px;
    background:
        radial-gradient(circle at 15% 20%, rgba(233, 125, 232, 0.55), transparent 45%),
        radial-gradient(circle at 85% 30%, rgba(62, 155, 163, 0.5), transparent 45%),
        linear-gradient(135deg, #1c2135, #3d1a6e);
    position: relative;
}
.profile-cover::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 4px;
    background: var(--stripe);
}
.profile-top {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 1.1rem;
    padding: 0 1.75rem;
    margin-top: -44px;
    position: relative;
}
.profile-avatar .avatar { box-shadow: 0 0 0 5px var(--surface), 0 8px 20px rgba(0, 0, 0, 0.18); }
.profile-id { padding-top: 58px; min-width: 0; }
.profile-id .modal-title { padding: 0; font-size: 1.45rem; line-height: 1.2; }
.profile-role { font-weight: 600; margin-top: 0.15rem; }
.profile-company { display: flex; align-items: center; gap: 0.35rem; color: var(--text-muted); font-size: 0.9rem; margin-top: 0.1rem; }
.profile-company .icon { width: 15px; height: 15px; }
.profile-badges { grid-column: 1 / -1; display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.75rem; }
.profile-badges:empty { display: none; }

.role-tabs { display: flex; gap: 0.5rem; padding: 1rem 1.75rem 0; overflow-x: auto; scrollbar-width: thin; }
.role-tab {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    padding: 0.5rem 0.85rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.role-tab:hover { border-color: var(--border-hover); transform: translateY(-1px); }
.role-tab.active { border-color: var(--primary); background: var(--primary-tint); }
.rt-company { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.role-tab.active .rt-company { color: var(--primary); }
.rt-title { font-size: 0.875rem; font-weight: 600; }

.profile-content { padding: 1.25rem 1.75rem 0.5rem; }
.profile-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 0.75rem; }
.info-card { border: 1px solid var(--border); border-radius: 12px; padding: 0.85rem 1rem; background: var(--surface-2); min-width: 0; }
.info-label { display: flex; align-items: center; gap: 0.4rem; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.4rem; }
.info-label .icon { width: 14px; height: 14px; }
.email-line { display: flex; align-items: center; justify-content: space-between; gap: 0.4rem; min-width: 0; }
.email-line a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem; text-decoration: none; }
.email-line a:hover { text-decoration: underline; }
.icon-btn-sm { width: 28px; height: 28px; flex-shrink: 0; }
.icon-btn-sm .icon { width: 14px; height: 14px; }
.info-time { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.info-sub { display: flex; align-items: center; gap: 0.35rem; font-size: 0.875rem; margin-top: 0.35rem; }
.info-sub .icon { width: 14px; height: 14px; color: var(--text-muted); }
.info-sub a { text-decoration: none; }
.profile-section { margin-top: 1.1rem; }
.profile-section .detail-head { display: flex; align-items: center; gap: 0.4rem; margin: 0 0 0.5rem; }
.person-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.person-row:hover { border-color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow); }
.pr-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pr-name { font-weight: 600; font-size: 0.9rem; }
.pr-title { font-size: 0.8rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-chev { width: 16px; height: 16px; color: var(--text-muted); transform: rotate(-90deg); }
.team-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.top-of-org { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.45rem 0.8rem; border-radius: 999px; background: var(--surface-2); border: 1px dashed var(--border-strong); color: var(--text-muted); font-size: 0.85rem; }
.top-of-org .icon { width: 15px; height: 15px; }
.profile-actions { display: flex; justify-content: flex-end; gap: 0.6rem; padding: 1rem 1.75rem 1.5rem; }
@media (max-width: 600px) {
    .profile-top, .role-tabs, .profile-content, .profile-actions { padding-left: 1.25rem; padding-right: 1.25rem; }
    .profile-top { grid-template-columns: 1fr; }
    .profile-id { padding-top: 0.75rem; }
    .profile-grid, .team-grid { grid-template-columns: 1fr; }
}

/* =================================================================
   Motion. Subtle, quick, and switched off for people who prefer less motion.
   ================================================================= */
@keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}
@keyframes modal-in {
    from { opacity: 0; transform: translateY(14px) scale(0.97); }
    to { opacity: 1; transform: none; }
}
@keyframes toast-in {
    from { opacity: 0; transform: translate(-50%, 12px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* Page content rises in when you open a page */
.view-enter > * { animation: rise 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.view-enter > *:nth-child(2) { animation-delay: 0.05s; }
.view-enter > *:nth-child(3) { animation-delay: 0.1s; }
.view-enter > *:nth-child(4) { animation-delay: 0.15s; }
.view-enter > *:nth-child(5) { animation-delay: 0.2s; }
.view-enter > *:nth-child(n+6) { animation-delay: 0.25s; }

/* Lists and grids stagger in */
.people-grid > *, .announcements > *, .doc-list > *, .home-grid > *, .clocks > *, .theme-grid > * {
    animation: rise 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.people-grid > *:nth-child(2), .announcements > *:nth-child(2), .doc-list > *:nth-child(2), .home-grid > *:nth-child(2), .clocks > *:nth-child(2), .theme-grid > *:nth-child(2) { animation-delay: 0.04s; }
.people-grid > *:nth-child(3), .announcements > *:nth-child(3), .doc-list > *:nth-child(3), .home-grid > *:nth-child(3), .theme-grid > *:nth-child(3) { animation-delay: 0.08s; }
.people-grid > *:nth-child(4), .announcements > *:nth-child(4), .doc-list > *:nth-child(4), .theme-grid > *:nth-child(4) { animation-delay: 0.12s; }
.people-grid > *:nth-child(5), .announcements > *:nth-child(5), .doc-list > *:nth-child(5), .theme-grid > *:nth-child(5) { animation-delay: 0.16s; }
.people-grid > *:nth-child(6), .doc-list > *:nth-child(6), .theme-grid > *:nth-child(6) { animation-delay: 0.2s; }
.people-grid > *:nth-child(n+7), .doc-list > *:nth-child(n+7), .theme-grid > *:nth-child(n+7) { animation-delay: 0.24s; }
.org-card { animation: rise 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

.modal { animation: modal-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1); }
.toast { animation: toast-in 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); }
.force-card { animation: modal-in 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.clock-time span { display: inline-block; }

/* Gentle hover lift on cards */
.clock-card, .panel, .announcement, .doc-row { transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s; }
.announcement:hover, .doc-row:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn { transition: background 0.15s, border-color 0.15s, opacity 0.15s, transform 0.12s, box-shadow 0.15s; }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 6px 16px var(--focus-ring); }
.nav-dot { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(194, 48, 107, 0.45); }
    50% { box-shadow: 0 0 0 5px rgba(194, 48, 107, 0); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        animation-delay: 0s !important;
        transition-duration: 0.01ms !important;
    }
}
.modal.modal-profile { padding: 0; }

/* =================================================================
   Design refresh: typeface, dark brand top bar, page banners,
   richer cards and the home banner. Built on the theme tokens, so
   every theme (light and dark) picks it up.
   ================================================================= */

@font-face {
    font-family: "Plus Jakarta Sans";
    src: url("/assets/fonts/plus-jakarta-sans.woff2") format("woff2");
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --radius: 16px;
    --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --brand-deep: linear-gradient(120deg, #161a2b 0%, #241447 45%, #3d1a6e 100%);
    --card-shadow: 0 1px 2px rgba(28, 33, 53, 0.04), 0 10px 30px -18px rgba(28, 33, 53, 0.25);
    --card-shadow-hover: 0 2px 4px rgba(28, 33, 53, 0.05), 0 18px 40px -16px rgba(28, 33, 53, 0.3);
}
:root[data-theme="dark"], :root[data-theme="lavender-dusk"], :root[data-theme="midnight"] {
    --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px -18px rgba(0, 0, 0, 0.6);
    --card-shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.35), 0 18px 40px -16px rgba(0, 0, 0, 0.7);
}

body, button, input, select, textarea { font-family: var(--font); }
body {
    background:
        radial-gradient(900px 420px at 85% -120px, var(--primary-tint), transparent 70%),
        radial-gradient(700px 360px at -10% 10%, var(--alt-tint), transparent 70%),
        var(--bg);
    background-attachment: fixed;
    letter-spacing: -0.005em;
}
h1, h2, h3, .modal-title { letter-spacing: -0.025em; }
h1 { font-weight: 800; }

/* ----- Top bar: dark brand glass in every theme ----- */
.topbar {
    background: var(--brand-deep);
    border-bottom: 0;
    box-shadow: 0 8px 30px -12px rgba(22, 26, 43, 0.55);
}
.topbar .logo-light-theme { display: none !important; }
.topbar .logo-dark-theme { display: block !important; }
.topbar .brand-sub { color: rgba(255, 255, 255, 0.62); border-left-color: rgba(255, 255, 255, 0.2); }
.topbar .user-btn { color: #fff; }
.topbar .user-role, .topbar .user-btn .chev { color: rgba(255, 255, 255, 0.62); }
.topbar .user-btn:hover, .topbar .user-btn[aria-expanded="true"] { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.14); }
.topbar .avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35); }
.topbar .nav-toggle { color: #fff; }
.topbar .nav-toggle:hover, .topbar .nav-toggle[aria-expanded="true"] { background: rgba(255, 255, 255, 0.12); border-color: transparent; color: #fff; }
@media (min-width: 901px) {
    .topbar .nav-link { color: rgba(255, 255, 255, 0.72); }
    .topbar .nav-link:hover, .topbar .nav-link[aria-expanded="true"] { background: rgba(255, 255, 255, 0.1); color: #fff; }
    .topbar .nav-link.active { background: rgba(255, 255, 255, 0.16); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
}
.menu { border-radius: 16px; box-shadow: var(--card-shadow-hover), 0 0 0 1px var(--border); border: 0; }

/* ----- Cards and panels ----- */
.panel, .table-card, .person-card, .announcement, .doc-row, .clock-card, .stat, .info-card, .theme-option, .login-card, .force-card, .email-row, .role-row {
    border-color: var(--border);
}
.panel, .table-card, .person-card, .announcement, .doc-row, .stat, .force-card {
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
}
.panel { padding: 1.4rem; }
.panel-title { font-weight: 700; }
.section-title { font-size: 0.75rem; letter-spacing: 0.12em; }
.badge, .tag, .chip { font-weight: 600; }

/* ----- Buttons ----- */
.btn { border-radius: 10px; font-weight: 700; letter-spacing: -0.005em; }
.btn-primary {
    background: var(--primary);
    background-image: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 72%, #c2306b));
    box-shadow: 0 6px 18px -8px var(--primary);
}
.btn-primary:hover:not(:disabled) { background-image: linear-gradient(135deg, var(--primary-hover), color-mix(in srgb, var(--primary-hover) 72%, #c2306b)); }
.btn-ghost { background: var(--surface); box-shadow: 0 1px 2px rgba(28, 33, 53, 0.05); }
input[type="text"], input[type="password"], input[type="search"], input[type="tel"], input[type="email"], input[type="number"], input[type="date"], input[type="time"], input[type="month"], input[type="datetime-local"], select, textarea { border-radius: 10px; }

/* ----- Page banners ----- */
.page-head {
    position: relative;
    overflow: hidden;
    align-items: center;
    gap: 1.1rem;
    padding: 1.6rem 1.75rem;
    margin-bottom: 1.5rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    background:
        radial-gradient(500px 200px at 100% 0%, var(--primary-tint), transparent 70%),
        radial-gradient(400px 200px at 0% 120%, var(--alt-tint), transparent 70%),
        var(--surface);
    box-shadow: var(--card-shadow);
}
.page-head::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background: var(--stripe);
    opacity: 0.85;
}
.page-head > div:not(.page-actions):not(.segmented) { flex: 1; min-width: 220px; }
.page-head h1 { font-size: 1.85rem; }
.page-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    flex-shrink: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 60%, #c2306b));
    box-shadow: 0 10px 24px -10px var(--primary);
}
.page-icon .icon { width: 26px; height: 26px; }
@media (max-width: 600px) {
    .page-head { padding: 1.2rem; border-radius: 16px; }
    .page-icon { width: 44px; height: 44px; border-radius: 13px; }
    .page-icon .icon { width: 22px; height: 22px; }
    .page-head h1 { font-size: 1.45rem; }
}

/* ----- Home banner ----- */
.home-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: center;
    padding: 2.25rem 2.25rem 2.5rem;
    margin-bottom: 1.75rem;
    border-radius: 24px;
    color: #fff;
    background: var(--brand-deep);
    box-shadow: 0 24px 50px -24px rgba(36, 20, 71, 0.65);
}
.home-hero::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 5px;
    background: var(--stripe);
}
.hero-glow { position: absolute; border-radius: 50%; filter: blur(50px); pointer-events: none; animation: drift 20s ease-in-out infinite alternate; }
.hero-glow.g1 { width: 380px; height: 380px; right: -60px; top: -160px; background: color-mix(in srgb, var(--primary) 80%, #e97de8); opacity: 0.55; }
.hero-glow.g2 { width: 300px; height: 300px; left: 25%; bottom: -200px; background: #3e9ba3; opacity: 0.35; animation-duration: 26s; }
.hero-main, .hero-clocks { position: relative; z-index: 1; }
.hero-date { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: #e97de8; }
.home-hero h1 { font-size: 2.6rem; line-height: 1.05; margin-top: 0.5rem; color: #fff; }
.home-hero .hero-sub { color: rgba(255, 255, 255, 0.72); font-size: 1.05rem; margin-top: 0.5rem; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
    transition: background 0.15s, transform 0.15s;
}
.hero-chip .icon { width: 15px; height: 15px; }
a.hero-chip:hover { background: rgba(255, 255, 255, 0.2); transform: translateY(-1px); }
.hero-chip.warn { background: rgba(227, 230, 91, 0.18); border-color: rgba(227, 230, 91, 0.4); }
.hero-chip.calm .icon { color: #8fd6a8; }
.hero-clocks { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.glass-clock {
    padding: 1.1rem 1.2rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
    min-width: 0;
}
.gc-label { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; font-weight: 600; color: rgba(255, 255, 255, 0.75); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-label .icon { width: 14px; height: 14px; flex-shrink: 0; }
.gc-time { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-top: 0.35rem; line-height: 1.1; }
.gc-sub { font-size: 0.78rem; color: rgba(255, 255, 255, 0.65); margin-top: 0.3rem; }
.gc-sub a { color: #fff; }
@media (max-width: 960px) {
    .home-hero { grid-template-columns: 1fr; padding: 1.75rem 1.5rem 2rem; }
    .home-hero h1 { font-size: 2rem; }
}
@media (max-width: 480px) { .hero-clocks { grid-template-columns: 1fr; } }

.home-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.5rem; align-items: start; }
.home-side { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: calc(var(--topbar-h) + 1.25rem); }
@media (max-width: 960px) {
    .home-layout { grid-template-columns: 1fr; }
    .home-side { position: static; }
}
.home-announcements { margin-bottom: 0; }
.link-arrow::after { content: " \2192"; }
.me-panel .me-card { margin-bottom: 0.25rem; }
.me-email { display: flex; align-items: center; gap: 0.45rem; margin-top: 0.85rem; font-size: 0.875rem; color: var(--text-muted); overflow-wrap: anywhere; }
.me-email .icon { width: 15px; height: 15px; flex-shrink: 0; }
.help-panel { display: flex; gap: 0.85rem; align-items: flex-start; }
.help-panel > .icon { width: 36px; height: 36px; padding: 8px; border-radius: 12px; color: var(--alt); background: var(--alt-tint); flex-shrink: 0; }
.help-panel .section-title { margin-bottom: 0.3rem; }

/* ----- Announcements ----- */
.announcement { padding: 1.4rem 1.5rem; border-left-width: 4px; }
.ann-title { font-size: 1.25rem; font-weight: 800; }
.announcement.important { background: linear-gradient(90deg, var(--danger-bg), var(--surface) 40%); }
.announcement.unread:not(.important) { background: linear-gradient(90deg, var(--primary-tint), var(--surface) 40%); }

/* ----- People cards ----- */
.person-card {
    position: relative;
    overflow: hidden;
    padding: 0 1rem 1.3rem;
    background: var(--surface);
}
.pc-band {
    display: block;
    align-self: stretch;
    height: 64px;
    margin: 0 -1rem;
    background:
        radial-gradient(160px 80px at 85% 0%, color-mix(in srgb, var(--primary) 55%, transparent), transparent),
        linear-gradient(120deg, #1c2135, #3d1a6e);
}
.person-card .avatar { margin: -34px 0 0.65rem; box-shadow: 0 0 0 4px var(--surface), 0 6px 16px rgba(0, 0, 0, 0.15); }
.person-card:hover { box-shadow: var(--card-shadow-hover); transform: translateY(-3px); }
.pc-name { font-size: 1.02rem; }

/* ----- Tables, tabs and controls ----- */
.table th { background: var(--surface-2); font-size: 0.7rem; letter-spacing: 0.1em; }
.table tbody tr { transition: background 0.15s; }
.company-tabs button, .segmented { box-shadow: 0 1px 2px rgba(28, 33, 53, 0.04); }
.segmented button.active, .company-tabs button.active { box-shadow: 0 4px 12px -6px var(--primary); }
.segmented button.active { background-image: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 72%, #c2306b)); }
.search input { height: 46px; }

/* ----- Misc ----- */
.doc-row { padding: 1.1rem 1.25rem; }
.file-badge { border-radius: 12px; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, 0.5); }
.stat { position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--primary); }
.stat-value { font-weight: 800; }
.empty-page .icon.big { width: 64px; height: 64px; padding: 14px; border-radius: 20px; background: var(--primary-tint); color: var(--primary); }
.footer { border-top: 0; color: var(--text-muted); }
.modal { border-radius: 22px; }
.toast { border-radius: 12px; font-weight: 600; }
.imp-banner { background: linear-gradient(90deg, #7a1f6c, #c2306b); color: #fff; }
.imp-banner .btn-light { background: #fff; color: #7a1f6c; }

/* No colour stripe along the bottom of the home banner, page headers or profile covers */
.home-hero::after, .page-head::after, .profile-cover::after { display: none; }

/* ---------- Profile banners ---------- */
.pc-band, .profile-cover, .bp-cover { position: relative; overflow: hidden; }
.has-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-aurora { background: radial-gradient(circle at 20% 20%, rgba(233, 125, 232, 0.7), transparent 50%), radial-gradient(circle at 80% 40%, rgba(62, 155, 163, 0.7), transparent 50%), linear-gradient(135deg, #1c2135, #3d1a6e) !important; }
.banner-sunset { background: linear-gradient(120deg, #ff9a5a 0%, #e9547c 45%, #7a1f6c 100%) !important; }
.banner-ocean { background: radial-gradient(circle at 80% 10%, rgba(125, 211, 252, 0.6), transparent 50%), linear-gradient(130deg, #0b3b5c 0%, #1f7a8c 60%, #3e9ba3 100%) !important; }
.banner-forest { background: radial-gradient(circle at 15% 85%, rgba(227, 230, 91, 0.35), transparent 45%), linear-gradient(130deg, #13301f 0%, #2f7d4f 60%, #5fae7b 100%) !important; }
.banner-lavender { background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.45), transparent 45%), linear-gradient(130deg, #7c5cc4 0%, #b79cf2 60%, #e3d6fb 100%) !important; }
.banner-midnight { background: radial-gradient(circle at 75% 25%, rgba(94, 168, 255, 0.5), transparent 45%), linear-gradient(140deg, #050814 0%, #111a2c 50%, #1f3a6b 100%) !important; }
.banner-ember { background: radial-gradient(circle at 30% 80%, rgba(227, 230, 91, 0.45), transparent 45%), linear-gradient(130deg, #3a0d0d 0%, #c2306b 55%, #ff7a45 100%) !important; }
.banner-slate { background: linear-gradient(130deg, #2b3040 0%, #4a5168 60%, #8b93b0 100%) !important; }

.banner-preview { position: relative; margin-top: 1rem; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); }
.bp-cover { height: 140px; background: radial-gradient(circle at 15% 20%, rgba(233, 125, 232, 0.55), transparent 45%), radial-gradient(circle at 85% 30%, rgba(62, 155, 163, 0.5), transparent 45%), linear-gradient(135deg, #1c2135, #3d1a6e); }
.bp-avatar { position: absolute; left: 1.25rem; bottom: -0px; transform: translateY(35%); }
.banner-preview { padding-bottom: 2rem; background: var(--surface-2); }
.bp-avatar .avatar { box-shadow: 0 0 0 4px var(--surface-2); }
.banner-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 0.6rem; margin-top: 1rem; }
.banner-swatch {
    position: relative;
    height: 56px;
    border-radius: 12px;
    border: 2px solid transparent;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 0.35rem 0.5rem;
    font: inherit;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.banner-swatch span { font-size: 0.72rem; font-weight: 700; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); }
.banner-swatch:hover { transform: translateY(-2px); box-shadow: var(--card-shadow-hover); }
.banner-swatch.active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); }
.banner-actions { margin-top: 1rem; }
.banner-actions label.btn { margin: 0; }
.person-card .avatar, .profile-avatar { position: relative; z-index: 1; }
.banner-preview { padding-bottom: 2.6rem; }
.bp-avatar { position: absolute; left: 1.25rem; top: 112px; bottom: auto; transform: none; z-index: 1; }
#emp-body tr[data-id] { cursor: pointer; }

/* ================= Workplace & people features ================= */

.danger-text, .danger-text .icon { color: var(--danger-text) !important; }
.success-mark.danger-mark { background: var(--danger-bg); color: var(--danger-text); }
.info-banner { display: flex; align-items: flex-start; gap: 0.6rem; background: var(--primary-tint); border: 1px solid var(--primary-soft-border); color: var(--text); margin-bottom: 1.25rem; }
.info-banner .icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--primary); margin-top: 1px; }
.label-spacer { user-select: none; }
.option-row { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; margin-top: 0.9rem; }
.person-chip.static { cursor: default; }
.person-chip.static:hover { border-color: var(--border); }
.section-title .icon { width: 16px; height: 16px; color: var(--primary); }
.panel > .section-title, .panel-head .section-title { display: flex; align-items: center; gap: 0.45rem; }
.ob-done-title { margin-top: 2rem; }

/* Top bar search */
.search-btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    height: 38px; padding: 0 0.6rem 0 0.75rem; min-width: 190px;
    border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2);
    color: var(--text-muted); font: inherit; font-size: 0.88rem; cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.search-btn:hover { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 3px var(--focus-ring); }
.search-btn .icon { width: 16px; height: 16px; }
.search-btn .sb-text { flex: 1; text-align: left; }
.search-btn kbd, .sp-input kbd {
    font: inherit; font-size: 0.7rem; font-weight: 700; padding: 0.1rem 0.4rem; border-radius: 6px;
    border: 1px solid var(--border); background: var(--surface); color: var(--text-muted);
}
@media (max-width: 1360px) {
    .search-btn { min-width: 0; padding: 0; width: 38px; justify-content: center; }
    .search-btn .sb-text, .search-btn kbd { display: none; }
}
body.locked .search-btn { display: none; }

/* Search palette */
.search-overlay {
    position: fixed; inset: 0; z-index: 400; background: var(--backdrop);
    display: flex; justify-content: center; align-items: flex-start; padding: 10vh 1rem 1rem;
    animation: fade-in 0.12s ease-out;
}
.search-palette {
    width: 100%; max-width: 620px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-pop);
    border: 1px solid var(--border); overflow: hidden; animation: modal-in 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sp-input { display: flex; align-items: center; gap: 0.65rem; padding: 0.4rem 1rem; border-bottom: 1px solid var(--border); }
.sp-input > .icon { width: 20px; height: 20px; color: var(--primary); flex-shrink: 0; }
.sp-input input { border: 0 !important; box-shadow: none !important; background: transparent !important; font-size: 1.05rem; padding: 0.75rem 0 !important; }
.sp-results { max-height: min(60vh, 480px); overflow-y: auto; padding: 0.4rem; }
.sp-hint { padding: 1rem; text-align: center; }
.sp-group { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); padding: 0.7rem 0.75rem 0.3rem; }
.sp-item {
    display: flex; align-items: center; gap: 0.75rem; width: 100%; padding: 0.55rem 0.75rem; border: 0; border-radius: 10px;
    background: transparent; font: inherit; color: var(--text); text-align: left; cursor: pointer;
}
.sp-item.active, .sp-item:hover { background: var(--primary-tint); }
.sp-icon { width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--primary); flex-shrink: 0; }
.sp-icon .icon { width: 17px; height: 17px; }
.sp-text { display: flex; flex-direction: column; min-width: 0; }
.sp-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Status */
.status-pill {
    display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; font-weight: 600; color: var(--text);
    padding: 0.15rem 0.6rem 0.15rem 0.5rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border);
    max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.status-msg { color: var(--text-muted); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); flex-shrink: 0; }
.st-available .status-dot, .status-badge.st-available { background: #3fae69; }
.st-busy .status-dot, .status-badge.st-busy { background: #d93a5b; }
.st-away .status-dot, .status-badge.st-away { background: #e0a526; }
.st-ooo .status-dot, .status-badge.st-ooo { background: var(--purple); }
.st-none { color: var(--text-muted); border-style: dashed; }
.person-card .status-pill { margin-top: 0.15rem; }
.emp-cell .status-pill { margin-top: 0.25rem; }
.profile-status { padding: 0 1.5rem; margin-top: 0.4rem; }
.avatar-wrap { position: relative; display: inline-flex; }
.status-badge { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface); }
.status-item { padding-top: 0.35rem; padding-bottom: 0.35rem; }
.status-set {
    display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; width: 100%; margin-top: 0.85rem;
    background: transparent; border: 0; padding: 0; font: inherit; cursor: pointer; color: var(--text-muted);
}
.status-set .icon { width: 14px; height: 14px; opacity: 0; transition: opacity 0.15s; }
.status-set:hover .icon { opacity: 1; }
.status-set:hover .status-pill { border-color: var(--primary); }
.status-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; margin: 1rem 0 0.25rem; }
.status-option {
    display: flex; align-items: center; gap: 0.55rem; margin: 0; padding: 0.7rem 0.85rem; border: 1px solid var(--border);
    border-radius: 10px; cursor: pointer; font-weight: 600; transition: border-color 0.15s, background 0.15s;
}
.status-option input { position: absolute; opacity: 0; pointer-events: none; }
.status-option:hover { border-color: var(--border-hover); }
.status-option:has(input:checked) { border-color: var(--primary); background: var(--primary-tint); box-shadow: 0 0 0 3px var(--focus-ring); }
.status-option:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Announcements: reactions, comments, acknowledgements, scheduling */
.ann-actions { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 0.75rem; }
.ann-actions-right { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-left: auto; }
.reactions { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.reaction {
    display: inline-flex; align-items: center; gap: 0.25rem; height: 30px; padding: 0 0.5rem; border-radius: 999px;
    border: 1px solid var(--border); background: var(--surface); font: inherit; font-size: 0.82rem; cursor: pointer;
    transition: transform 0.12s, border-color 0.15s, background 0.15s;
}
.reaction:not(.has) { opacity: 0.55; filter: grayscale(0.6); }
.reaction:not(.has):hover, .reaction.has { opacity: 1; filter: none; }
.reaction:hover { transform: translateY(-1px); border-color: var(--primary); }
.reaction:active { transform: scale(0.94); }
.reaction.mine { background: var(--primary-tint); border-color: var(--primary); }
.r-emoji { font-size: 0.95rem; line-height: 1; }
.r-count { font-weight: 700; color: var(--text); }
.comment-toggle { display: inline-flex; align-items: center; gap: 0.35rem; }
.comment-toggle .icon { width: 15px; height: 15px; }
.ack-progress { display: inline-flex; align-items: center; gap: 0.45rem; border: 0; background: transparent; font: inherit; font-size: 0.8rem; color: var(--text-muted); cursor: pointer; }
.ack-progress:hover { color: var(--primary); }
.ann-comments { margin-top: 0.9rem; display: flex; flex-direction: column; gap: 0.65rem; }
.comment { display: flex; gap: 0.6rem; align-items: flex-start; animation: rise 0.3s ease both; }
.comment-bubble { flex: 1; min-width: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px 14px 14px 14px; padding: 0.5rem 0.8rem; }
.comment-head { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; }
.comment-head .icon-btn { margin-left: auto; opacity: 0.6; }
.comment-head .icon-btn:hover { opacity: 1; }
.comment-body { font-size: 0.9rem; margin-top: 0.15rem; word-break: break-word; }
.comment-form { display: flex; gap: 0.6rem; align-items: flex-start; }
.comment-form textarea { flex: 1; min-height: 38px; resize: vertical; }
.announcement.not-live { opacity: 0.8; border-style: dashed; }
.announcements > .no-anim, .no-anim, .no-anim .comment { animation: none !important; }
.announcement.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 60% { box-shadow: 0 0 0 4px var(--focus-ring), var(--shadow); border-color: var(--primary); } }
.badge .icon { width: 12px; height: 12px; }

/* Home: coming up, onboarding, to-do */
.upcoming { list-style: none; display: flex; flex-direction: column; gap: 0.35rem; }
.up-item { display: flex; align-items: center; gap: 0.7rem; padding: 0.45rem 0.5rem; border-radius: 10px; }
.up-item[data-item] { cursor: pointer; transition: background 0.15s; }
.up-item[data-item]:hover { background: var(--surface-2); }
.up-icon { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--ci-bg); color: var(--ci-fg); }
.up-icon .icon { width: 16px; height: 16px; }
.up-text { display: flex; flex-direction: column; min-width: 0; }
.up-title { font-weight: 700; font-size: 0.9rem; line-height: 1.3; }
.ci-event, .ci-meeting, .ci-training { --ci-bg: var(--primary-tint); --ci-fg: var(--primary); }
.ci-social { --ci-bg: #fdeefd; --ci-fg: #a3329f; }
.ci-holiday, .ci-bank-holiday { --ci-bg: var(--alt-tint); --ci-fg: var(--alt); }
.ci-birthday { --ci-bg: var(--danger-bg); --ci-fg: var(--raspberry); }
.ci-anniversary { --ci-bg: var(--warn-bg); --ci-fg: #8a7b06; }
.todo-list a { display: flex; align-items: center; gap: 0.55rem; color: inherit; text-decoration: none; padding: 0.3rem; border-radius: 8px; width: 100%; }
.todo-list a:hover { background: var(--surface-2); color: var(--primary); }
.todo-list .sp-icon { width: 30px; height: 30px; border-radius: 7px; }

/* Checklists */
.checklist { display: flex; flex-direction: column; gap: 0.6rem; }
.checklist + .checklist { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.checklist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.checklist-grid > .checklist { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--card-shadow, var(--shadow)); margin: 0; animation: rise 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.checklist-grid > .checklist + .checklist { border-top: 1px solid var(--border); padding-top: 1.1rem; }
.checklist-grid.compact .cl-tasks { display: none; }
.cl-head { display: flex; align-items: center; gap: 0.7rem; }
.cl-who { flex: 1; min-width: 0; }
.progress { height: 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--pink)); border-radius: inherit; transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.cl-tasks { list-style: none; display: flex; flex-direction: column; gap: 0.15rem; }
.cl-check { display: flex; align-items: flex-start; gap: 0.6rem; margin: 0; padding: 0.45rem 0.4rem; border-radius: 8px; cursor: pointer; font-weight: 400; }
.cl-check:hover { background: var(--surface-2); }
.cl-check.locked { cursor: default; }
.cl-check.locked:hover { background: transparent; }
.cl-check input { position: absolute; opacity: 0; pointer-events: none; }
.cl-box { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--border-strong); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; transition: background 0.15s, border-color 0.15s; }
.cl-box .icon { width: 13px; height: 13px; stroke-width: 3; color: #fff; opacity: 0; transform: scale(0.5); transition: opacity 0.15s, transform 0.2s; }
.cl-check input:checked + .cl-box { background: var(--green); border-color: var(--green); }
.cl-check input:checked + .cl-box .icon { opacity: 1; transform: none; }
.cl-check input:focus-visible + .cl-box { box-shadow: 0 0 0 3px var(--focus-ring); }
.cl-check.locked .cl-box { border-style: dashed; }
.cl-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cl-title { font-weight: 600; font-size: 0.9rem; }
.cl-task.done .cl-title { text-decoration: line-through; color: var(--text-muted); }
.owner-employee { background: var(--primary-tint); color: var(--primary); }
.owner-supervisor { background: var(--alt-tint); color: var(--alt); }
.owner-hr { background: var(--warn-bg); color: var(--warn-text); }
.tpl-list li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

/* Builders (polls and checklist templates) */
.pb-q { border: 1px solid var(--border); border-radius: 12px; padding: 0.8rem; margin-bottom: 0.7rem; background: var(--surface-2); display: flex; flex-direction: column; gap: 0.5rem; }
.pb-q-head { display: flex; align-items: center; gap: 0.6rem; }
.pb-q-head select { width: auto; flex: 1; max-width: 240px; }
.pb-q-head .pb-remove { margin-left: auto; }
.pb-num { width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-weight: 800; font-size: 0.8rem; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Calendar */
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.25rem; align-items: start; }
.cal-panel { padding: 1rem; }
.cal-toolbar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.cal-title { font-size: 1.2rem; margin: 0; }
.cal-legend { margin-left: auto; display: flex; gap: 0.75rem; flex-wrap: wrap; font-size: 0.75rem; color: var(--text-muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 0.3rem; }
.cal-legend span::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--ci-fg); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.cal-dow { background: var(--surface-2); padding: 0.45rem; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); text-align: center; }
.cal-day { background: var(--surface); min-height: 108px; padding: 0.3rem; display: flex; flex-direction: column; gap: 2px; min-width: 0; transition: background 0.15s; }
.cal-day.weekend { background: var(--surface-2); }
.cal-day.holiday { background: color-mix(in srgb, var(--alt-tint) 60%, var(--surface)); }
.cal-day.other { opacity: 0.45; }
.cal-num { font-size: 0.8rem; font-weight: 700; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--text-muted); }
.cal-day.today .cal-num { background: var(--primary); color: var(--on-primary); }
.cal-item {
    display: block; width: 100%; text-align: left; border: 0; border-radius: 6px; padding: 0.15rem 0.4rem; font: inherit; font-size: 0.72rem; font-weight: 600;
    background: var(--ci-bg); color: var(--ci-fg); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: filter 0.15s, transform 0.12s;
}
.cal-item:hover { filter: brightness(0.95); transform: translateX(1px); }
.cal-time { font-weight: 800; margin-right: 0.25rem; }
.cal-more { border: 0; background: transparent; font: inherit; font-size: 0.7rem; font-weight: 700; color: var(--text-muted); text-align: left; padding: 0 0.4rem; cursor: pointer; }
.cal-more:hover { color: var(--primary); }
.cal-side { position: sticky; top: calc(var(--topbar-h) + 1rem); }
.event-detail { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; }
.ed-icon { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--ci-bg); color: var(--ci-fg); }
.ed-icon .icon { width: 22px; height: 22px; }
@media (max-width: 1000px) {
    .cal-layout { grid-template-columns: 1fr; }
    .cal-side { position: static; }
}
@media (max-width: 700px) {
    .cal-day { min-height: 64px; }
    .cal-item { font-size: 0; padding: 0; height: 6px; border-radius: 3px; background: var(--ci-fg); }
    .cal-item .cal-time { display: none; }
    .cal-legend { margin-left: 0; }
}

/* Polls */
.poll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.poll-grid > * { animation: rise 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.poll-grid > .empty-page { grid-column: 1 / -1; }
.poll-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.15rem 1.2rem; display: flex; flex-direction: column; gap: 0.45rem; box-shadow: var(--card-shadow, var(--shadow)); transition: transform 0.15s, box-shadow 0.15s; }
.poll-card:hover { transform: translateY(-2px); box-shadow: var(--card-shadow-hover, var(--shadow-pop)); }
.poll-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.poll-icon { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, var(--primary), var(--pink)); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.poll-icon .icon { width: 20px; height: 20px; }
.poll-flags { display: flex; align-items: center; gap: 0.35rem; }
.poll-title { font-size: 1.08rem; margin-top: 0.3rem; }
.poll-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.poll-actions { display: flex; gap: 0.5rem; margin-top: auto; padding-top: 0.6rem; align-items: center; }
.anon-note { display: flex; align-items: center; gap: 0.45rem; background: var(--alt-tint); color: var(--alt); border-radius: 10px; padding: 0.55rem 0.8rem; font-size: 0.85rem; font-weight: 600; margin-top: 0.75rem; }
.anon-note .icon { width: 16px; height: 16px; }
.poll-q { border: 0; margin-top: 1.25rem; }
.poll-q legend, .pq-title { font-weight: 700; font-size: 0.98rem; margin-bottom: 0.55rem; }
.poll-options { display: flex; flex-direction: column; gap: 0.4rem; }
.poll-option { display: flex; align-items: center; gap: 0.6rem; margin: 0; padding: 0.65rem 0.85rem; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-weight: 500; transition: border-color 0.15s, background 0.15s; }
.poll-option:hover { border-color: var(--border-hover); }
.poll-option input { accent-color: var(--primary); width: 17px; height: 17px; }
.poll-option:has(input:checked) { border-color: var(--primary); background: var(--primary-tint); }
.rating { display: flex; gap: 0.3rem; }
.rating-star { border: 0; background: transparent; cursor: pointer; padding: 0.2rem; color: var(--border-strong); transition: transform 0.12s, color 0.12s; }
.rating-star .icon { width: 30px; height: 30px; }
.rating-star:hover { transform: scale(1.12); }
.rating-star.on { color: #f0b429; }
.rating-star.on .icon { fill: currentColor; }
.poll-result { margin-top: 0.55rem; }
.poll-result.compact { margin-top: 0.3rem; }
.pr-row { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.88rem; font-weight: 600; margin-bottom: 0.25rem; }
.poll-bar { height: 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.poll-bar span { display: block; height: 100%; width: 0; background: var(--border-strong); border-radius: inherit; transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.poll-bar.top span { background: linear-gradient(90deg, var(--primary), var(--pink)); }
.rating-avg { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; }
.text-answers { list-style: none; display: flex; flex-direction: column; gap: 0.45rem; }
.text-answers li { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 0.55rem 0.8rem; font-size: 0.9rem; }

/* Roles & permissions */
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 1rem; }
.role-card { animation: rise 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.role-card .panel-title { display: flex; align-items: center; gap: 0.45rem; margin: 0; }
.role-card .panel-title .icon { width: 18px; height: 18px; color: var(--primary); }
.perm-list { display: flex; flex-direction: column; gap: 0.15rem; }
.perm { display: flex; align-items: flex-start; gap: 0.75rem; margin: 0; padding: 0.55rem 0.4rem; border-radius: 8px; cursor: pointer; font-weight: 400; }
.perm:hover { background: var(--surface-2); }
.perm > span:last-child { display: flex; flex-direction: column; }
.perm-name { font-weight: 700; font-size: 0.9rem; }
.switch { position: relative; width: 38px; height: 22px; flex-shrink: 0; margin-top: 1px; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.slider { position: absolute; inset: 0; border-radius: 999px; background: var(--border-strong); transition: background 0.2s; }
.slider::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1); }
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::after { transform: translateX(16px); }
.switch input:focus-visible + .slider { box-shadow: 0 0 0 3px var(--focus-ring); }
.role-members { margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid var(--border); }
.rm-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.5rem; }
.rm-head .detail-head { margin: 0; }
.member-list { max-height: 50vh; overflow-y: auto; margin-top: 0.75rem; display: flex; flex-direction: column; gap: 0.2rem; }
.member-row { display: flex; align-items: center; gap: 0.7rem; margin: 0; padding: 0.5rem; border-radius: 10px; cursor: pointer; font-weight: 400; }
.member-row:hover { background: var(--surface-2); }
.member-row input { width: 18px; height: 18px; accent-color: var(--primary); margin-left: auto; }
.mr-text { display: flex; flex-direction: column; min-width: 0; }
@media (max-width: 500px) { .role-grid, .checklist-grid, .poll-grid { grid-template-columns: 1fr; } }

/* Sessions */
.session-list { list-style: none; display: flex; flex-direction: column; gap: 0.3rem; }
.session-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.4rem; border-radius: 10px; }
.session-row + .session-row { border-top: 1px solid var(--border); }
.session-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--surface-2); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.session-icon .icon { width: 18px; height: 18px; }
.session-text { flex: 1; min-width: 0; }
#my-sessions .panel-title { display: flex; align-items: center; gap: 0.45rem; margin: 0; }
#sys-backups .col-actions { width: auto; white-space: nowrap; }
.status-pill { white-space: normal; text-align: left; line-height: 1.35; padding-top: 0.2rem; padding-bottom: 0.2rem; }
.status-pill .status-msg { overflow: visible; }
.person-card .status-pill { justify-content: center; text-align: center; }
.info-banner { justify-content: flex-start; }
.sp-input input::-webkit-search-cancel-button { display: none; }
.poll-result.compact .poll-bar span { background: var(--primary); }
.cl-more { margin-top: 0.25rem; }
.status-pill { display: inline-block; }
.status-pill .status-dot { display: inline-block; vertical-align: 0; margin-right: 0.35rem; }
/* Role tabs wrap onto extra rows instead of scrolling sideways. */
.role-tabs { flex-wrap: wrap; overflow: visible; }
.role-tab { flex: 1 1 180px; max-width: 100%; }

/* ----- Top bar and home banner follow the theme ----- */
:root[data-theme="lavender"] { --brand-deep: linear-gradient(120deg, #3b2a6b 0%, #5b42a0 50%, #8a6fd0 100%); }
:root[data-theme="ocean"] { --brand-deep: linear-gradient(120deg, #0c2f3a 0%, #13505e 50%, #1f7a8c 100%); }
:root[data-theme="forest"] { --brand-deep: linear-gradient(120deg, #13301f 0%, #1f5034 50%, #2f7d4f 100%); }
:root[data-theme="dark"] { --brand-deep: linear-gradient(120deg, #11131b 0%, #1a1530 50%, #2a1d4d 100%); }
:root[data-theme="lavender-dusk"] { --brand-deep: linear-gradient(120deg, #1a1426 0%, #2c2142 50%, #4a3870 100%); }
:root[data-theme="midnight"] { --brand-deep: linear-gradient(120deg, #070c18 0%, #0e1d38 50%, #173a6b 100%); }

/* ================= About HN Group ================= */
.about-hero {
    display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2rem; align-items: center;
    background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 2rem 2.25rem;
    box-shadow: var(--card-shadow, var(--shadow)); position: relative; overflow: hidden;
}
.about-hero::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--stripe); }
.about-hero h2 { font-size: 1.6rem; line-height: 1.25; margin: 0.4rem 0 0.75rem; letter-spacing: -0.02em; }
.about-hero-logo { display: flex; justify-content: center; }
.about-hero-logo img { width: 100%; max-width: 300px; height: auto; }
.about-title { display: flex; align-items: center; gap: 0.45rem; margin: 2.25rem 0 0.9rem; }
.about-sub { margin: -0.4rem 0 0.9rem; }
.company-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.company-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem 1.35rem;
    display: flex; flex-direction: column; gap: 0.55rem; box-shadow: var(--card-shadow, var(--shadow));
    transition: transform 0.15s, box-shadow 0.15s; animation: rise 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.company-card:hover { transform: translateY(-2px); box-shadow: var(--card-shadow-hover, var(--shadow-pop)); }
.cc-logo { height: 56px; display: flex; align-items: center; margin-bottom: 0.35rem; }
.cc-logo img { max-height: 56px; max-width: 220px; width: auto; height: auto; }
.cc-name { font-size: 1.1rem; }
.cc-about { color: var(--text-muted); font-size: 0.9rem; line-height: 1.55; }
.cc-points { list-style: none; display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.86rem; font-weight: 600; }
.cc-points li { display: flex; align-items: center; gap: 0.4rem; }
.cc-points .icon { width: 14px; height: 14px; color: var(--green); }
.cc-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; padding-top: 0.5rem; }
.cc-meta .chip { display: inline-flex; align-items: center; gap: 0.3rem; text-decoration: none; }
.cc-meta .chip .icon { width: 13px; height: 13px; }
a.chip:hover { box-shadow: 0 0 0 2px var(--focus-ring); }
.swatch-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.75rem; }
.swatch {
    display: flex; flex-direction: column; align-items: flex-start; gap: 0.15rem; padding: 0.5rem 0.5rem 0.7rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: 14px; cursor: pointer; font: inherit; color: var(--text);
    transition: transform 0.15s, box-shadow 0.15s;
}
.swatch:hover { transform: translateY(-2px); box-shadow: var(--card-shadow-hover, var(--shadow)); }
.swatch-chip { width: 100%; height: 64px; border-radius: 10px; margin-bottom: 0.4rem; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); }
.swatch-name { font-weight: 700; font-size: 0.88rem; padding: 0 0.25rem; }
.swatch-hex { font-size: 0.78rem; color: var(--text-muted); padding: 0 0.25rem; }
.brand-notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; }
.brand-notes p { margin-top: 0.35rem; color: var(--text-muted); line-height: 1.5; }
.brand-group { margin-top: 1.25rem; }
.brand-group .detail-head { margin: 0 0 0.6rem; }
.logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.85rem; }
.logo-tile { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; animation: rise 0.35s ease both; }
.logo-preview { height: 130px; display: flex; align-items: center; justify-content: center; padding: 1.25rem; background: #ffffff; border-bottom: 1px solid var(--border); }
.logo-preview.on-dark { background: linear-gradient(135deg, #1c2135, #2a1d4d); }
.logo-preview.is-icon { background-color: #f1f2f6; background-image: linear-gradient(45deg, #e3e5ec 25%, transparent 25%, transparent 75%, #e3e5ec 75%), linear-gradient(45deg, #e3e5ec 25%, transparent 25%, transparent 75%, #e3e5ec 75%); background-size: 16px 16px; background-position: 0 0, 8px 8px; }
.logo-preview img { max-width: 100%; max-height: 100%; width: auto; height: auto; }
.logo-preview.is-icon img { max-height: 80px; border-radius: 18px; }
.logo-info { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.6rem 0.75rem; }
.logo-name { font-weight: 700; font-size: 0.86rem; }
.logo-dl { display: flex; gap: 0.3rem; }
.logo-dl .btn { padding: 0.25rem 0.55rem; font-size: 0.75rem; }
.perm-super .perm-name::after { content: "Super admin"; margin-left: 0.45rem; font-size: 0.65rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.1rem 0.4rem; border-radius: 999px; background: var(--inverse-bg); color: var(--inverse-text); vertical-align: 1px; }
.perm.locked { cursor: not-allowed; opacity: 0.6; }
@media (max-width: 800px) {
    .about-hero { grid-template-columns: 1fr; padding: 1.5rem; }
    .about-hero-logo { justify-content: flex-start; }
    .about-hero-logo img { max-width: 220px; }
}

/* ----- Role members picker ----- */
.modal-members { max-width: 520px; }
.rm-modal-head { display: flex; align-items: center; gap: 0.85rem; padding-right: 2.5rem; }
.rm-modal-head .modal-title { margin: 0; }
.rm-modal-head p { margin-top: 0.15rem; }
.rm-modal-icon { width: 44px; height: 44px; border-radius: 13px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary), var(--pink)); color: #fff; box-shadow: 0 8px 18px -8px var(--primary); }
.rm-modal-icon .icon { width: 22px; height: 22px; }
.rm-search { margin-top: 1.1rem; }
.modal-members .member-list { gap: 0.45rem; margin-top: 0.9rem; max-height: min(50vh, 420px); padding: 2px; }
.modal-members .member-row {
    position: relative; gap: 0.85rem; padding: 0.65rem 0.8rem; border: 1px solid var(--border); border-radius: 14px;
    background: var(--surface); transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.modal-members .member-row:hover { background: var(--surface-2); border-color: var(--border-hover); }
.modal-members .member-row.on { border-color: var(--primary); background: var(--primary-tint); box-shadow: 0 0 0 3px var(--focus-ring); }
.modal-members .member-row.is-owner { cursor: default; background: var(--surface-2); border-style: dashed; }
.modal-members .member-row.is-owner:hover { border-color: var(--border); }
.modal-members .member-row.is-owner .badge { margin-left: auto; white-space: nowrap; }
.modal-members .mr-text { flex: 1; }
.modal-members .mr-text .emp-name { font-size: 0.95rem; }
.modal-members .member-row input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.mr-check {
    width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; margin-left: auto;
    border: 2px solid var(--border-strong); display: inline-flex; align-items: center; justify-content: center;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.mr-check .icon { width: 15px; height: 15px; stroke-width: 3; color: var(--on-primary); opacity: 0; transform: scale(0.4); transition: opacity 0.15s, transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1.4); }
.member-row.on .mr-check { background: var(--primary); border-color: var(--primary); }
.member-row.on .mr-check .icon { opacity: 1; transform: none; }
.member-row input:focus-visible + .mr-check { box-shadow: 0 0 0 3px var(--focus-ring); }
.rm-empty { text-align: center; padding: 1.5rem 0; }
.rm-actions { align-items: center; }
.rm-count { margin-right: auto; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }

/* ================= Smooth scrolling ================= */
/* The page background sits on its own fixed layer instead of background-attachment: fixed,
   which made the browser repaint the whole page on every scroll frame. */
body { background: var(--bg); background-attachment: scroll; }
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(900px 420px at 85% -120px, var(--primary-tint), transparent 70%),
        radial-gradient(700px 360px at -10% 10%, var(--alt-tint), transparent 70%);
    transform: translateZ(0);
}
/* Home banner: the glows keep their own layers, and the glass effects no longer re-blur them each frame. */
.home-hero { contain: paint; isolation: isolate; }
.hero-glow { will-change: transform; }
.glass-clock { backdrop-filter: none; background: rgba(255, 255, 255, 0.1); }
.hero-chip { backdrop-filter: none; }
/* The home side column is taller than the screen now, so it scrolls with the page instead of sticking. */
.home-side { position: static; }
/* While scrolling, cards don't react to the mouse passing over them (no bobbing up and down). */
body.is-scrolling #view { pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
    .hero-glow { animation: none; }
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ================= Email signature ================= */
.sig-layout { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.sig-form .panel-title, .sig-preview-panel .panel-title, .sig-help .panel-title { display: flex; align-items: center; gap: 0.45rem; margin: 0; }
.sig-form .panel-title { margin-bottom: 0.25rem; }
.sig-right { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.sig-mail { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: #ffffff; box-shadow: 0 10px 30px -18px rgba(28, 33, 53, 0.35); }
.sig-mail-bar { display: flex; gap: 6px; padding: 0.6rem 0.8rem; background: #f1f2f6; border-bottom: 1px solid #e3e5ec; }
.sig-mail-bar span { width: 10px; height: 10px; border-radius: 50%; background: #d4d7e2; }
.sig-mail-bar span:first-child { background: #f06a6a; }
.sig-mail-bar span:nth-child(2) { background: #f4c04e; }
.sig-mail-bar span:nth-child(3) { background: #5fc27e; }
.sig-mail-body { padding: 1.5rem 1.6rem 1.8rem; color: #1a1a1a; overflow-x: auto; }
.sig-mail-text { font-family: Arial, Helvetica, sans-serif; font-size: 14px; margin-bottom: 1.1rem; color: #1a1a1a; }
#sig-preview a { pointer-events: none; }
.sig-tabs { margin: 0.9rem 0 0.4rem; }
.sig-steps { padding-left: 1.3rem; display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.9rem; margin-top: 0.6rem; }
.sig-steps li::marker { color: var(--primary); font-weight: 800; }
@media (max-width: 900px) { .sig-layout { grid-template-columns: 1fr; } }

/* ================= Scrollbars ================= */
/* Thin, rounded scrollbars in the theme's colours wherever something has to scroll. */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--text-muted); }
::-webkit-scrollbar-corner { background: transparent; }

/* Org chart: no scrollbar at all; drag to move, with fades at the edges when there's more. */
.org-frame { position: relative; }
.org-scroll { scrollbar-width: none; cursor: grab; user-select: none; }
.org-scroll::-webkit-scrollbar { display: none; }
.org-scroll.dragging { cursor: grabbing; }
.org-scroll.dragging * { cursor: grabbing !important; }
.org-fade {
    position: absolute; top: 1px; bottom: 1px; width: 56px; z-index: 2; pointer-events: none;
    opacity: 0; transition: opacity 0.2s;
}
.org-fade.left { left: 1px; border-radius: var(--radius) 0 0 var(--radius); background: linear-gradient(90deg, var(--surface), transparent); }
.org-fade.right { right: 1px; border-radius: 0 var(--radius) var(--radius) 0; background: linear-gradient(270deg, var(--surface), transparent); }
.org-frame.more-left .org-fade.left, .org-frame.more-right .org-fade.right { opacity: 1; }

/* ================= HR & Support pages ================= */
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.week-nav { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 1rem; flex-wrap: wrap; }
.week-nav input[type="month"] { width: auto; }
.week-title { font-size: 1.15rem; margin: 0 0 0 0.5rem; }
.small-tabs button { font-size: 0.8rem; padding: 0.3rem 0.75rem; }
.ci-leave { --ci-bg: #fff4dc; --ci-fg: #a86b00; }

/* ----- Leave ----- */
.leave-summary { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 1rem; margin-bottom: 1.25rem; }
.ls-main { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 1.3rem 1.5rem; box-shadow: var(--card-shadow, var(--shadow)); }
.ls-year { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.ls-remaining { display: flex; align-items: baseline; gap: 0.6rem; margin: 0.4rem 0 0.9rem; }
.ls-big { font-size: 3rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--primary); }
.ls-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.ls-bar span { display: block; height: 100%; width: 0; transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.ls-taken, .ls-k.taken::before { background: var(--primary); }
.ls-booked, .ls-k.booked::before { background: var(--pink); }
.ls-pending, .ls-k.pending::before { background: repeating-linear-gradient(45deg, var(--yellow), var(--yellow) 4px, #f1f29a 4px, #f1f29a 8px); }
.ls-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin-top: 0.7rem; font-size: 0.82rem; color: var(--text-muted); }
.ls-k { display: inline-flex; align-items: center; gap: 0.35rem; }
.ls-k::before { content: ""; width: 10px; height: 10px; border-radius: 3px; }
.ls-side { display: flex; flex-direction: column; gap: 1rem; }
.ls-side .stat { flex: 1; }
.ls-today .stat-value .icon { width: 28px; height: 28px; color: #e0a526; }
.leave-list { padding: 0.4rem; }
.leave-row { display: flex; align-items: flex-start; gap: 0.9rem; padding: 0.85rem 0.9rem; border-radius: 12px; }
.leave-row + .leave-row { border-top: 1px solid var(--border); border-radius: 0; }
.leave-icon { width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--primary-tint); color: var(--primary); }
.leave-icon .icon { width: 20px; height: 20px; }
.lt-annual { background: #fff4dc; color: #a86b00; }
.lt-sick { background: var(--danger-bg); color: var(--danger-text); }
.lt-compassionate { background: #fdeefd; color: #a3329f; }
.lr-main { flex: 1; min-width: 0; }
.lr-title { font-weight: 700; }
.lr-note { margin-top: 0.35rem; font-size: 0.86rem; color: var(--text); background: var(--surface-2); border-radius: 8px; padding: 0.35rem 0.6rem; display: inline-flex; gap: 0.35rem; align-items: center; }
.lr-note .icon { width: 13px; height: 13px; color: var(--text-muted); }
.lr-side { display: flex; flex-direction: column; align-items: flex-end; gap: 0.45rem; }
.allow-default { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.allow-default label { margin: 0; font-weight: 600; font-size: 0.85rem; }
.allow-default input, .allow-input { width: 90px; }
.lv-count { display: flex; align-items: center; gap: 0.45rem; margin-top: 0.9rem; padding: 0.6rem 0.85rem; border-radius: 10px; background: var(--primary-tint); font-size: 0.9rem; }
.lv-count .icon { width: 16px; height: 16px; color: var(--primary); }
@media (max-width: 760px) { .leave-summary { grid-template-columns: 1fr; } .ls-side { flex-direction: row; } }

/* ----- Rota ----- */
.rota-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--card-shadow, var(--shadow)); }
.rota { width: 100%; border-collapse: collapse; min-width: 860px; }
.rota th, .rota td { border-bottom: 1px solid var(--border); padding: 0.45rem; vertical-align: top; }
.rota thead th { background: var(--surface-2); font-size: 0.75rem; text-align: center; padding: 0.55rem 0.4rem; position: sticky; top: 0; }
.rota thead th.rota-person { text-align: left; }
.rd-dow { display: block; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; color: var(--text-muted); }
.rd-num { display: block; font-size: 1.05rem; font-weight: 800; color: var(--text); }
.rota th.is-today .rd-num { color: var(--primary); }
.rota td.is-today { background: color-mix(in srgb, var(--primary-tint) 55%, transparent); }
.rota-person { width: 210px; min-width: 190px; text-align: left; font-weight: 400; background: var(--surface); position: sticky; left: 0; z-index: 1; }
.rota-total { width: 70px; text-align: right; font-weight: 700; font-size: 0.85rem; white-space: nowrap; }
.rota-cell { min-width: 92px; height: 58px; position: relative; }
.rota-cell.editable { cursor: pointer; }
.rota-cell.editable:hover { background: var(--surface-2); }
.rota-add { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--text-muted); opacity: 0; transition: opacity 0.15s; }
.rota-add .icon { width: 16px; height: 16px; }
.rota-cell.editable:hover .rota-add { opacity: 1; }
.shift {
    display: flex; flex-direction: column; width: 100%; text-align: left; border: 0; cursor: pointer; font: inherit;
    background: var(--primary-tint); color: var(--primary); border-left: 3px solid var(--primary); border-radius: 7px; padding: 0.3rem 0.45rem; margin-bottom: 3px;
    transition: transform 0.12s, filter 0.15s;
}
.shift:hover { filter: brightness(0.96); transform: translateY(-1px); }
.sh-time { font-weight: 800; font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.sh-note { font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rota-leave { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.72rem; font-weight: 700; color: #a86b00; background: #fff4dc; border-radius: 6px; padding: 0.15rem 0.4rem; margin-bottom: 3px; }
.rota-leave .icon { width: 12px; height: 12px; }

/* ----- Timesheets ----- */
.ts-panel .panel-head { margin-bottom: 0.5rem; }
.ts-table input { padding: 0.45rem 0.55rem; min-width: 0; }
.ts-table input[type="time"] { width: 120px; }
.ts-table input[type="number"] { width: 90px; }
.ts-table tfoot td { border-top: 2px solid var(--border); }
.ts-hours { font-weight: 700; white-space: nowrap; }
.ts-actions { justify-content: flex-end; }
.ts-recent li { display: flex; align-items: center; gap: 0.75rem; }
.ts-recent li .btn-link { margin-right: auto; }
.ts-review { margin-bottom: 0.9rem; }
.ts-review-head { display: flex; align-items: center; gap: 0.8rem; }
.ts-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.4rem; margin-top: 0.85rem; }
.ts-day { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.5rem; border-radius: 10px; background: var(--primary-tint); position: relative; }
.ts-day.off { background: var(--surface-2); }
.tsd-dow { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.tsd-time { font-size: 0.78rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.tsd-hours { font-size: 0.75rem; color: var(--primary); font-weight: 700; }
.tsd-note { position: absolute; top: 0.4rem; right: 0.4rem; color: var(--text-muted); }
.tsd-note .icon { width: 12px; height: 12px; }
@media (max-width: 700px) { .ts-days { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ----- Payslips ----- */
.payslip-hero {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    background: var(--brand-deep); color: #fff; border-radius: 20px; padding: 1.6rem 1.8rem; margin-bottom: 1.25rem; position: relative; overflow: hidden;
}
.payslip-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--stripe); }
.payslip-hero .eyebrow { color: #e97de8; }
.payslip-hero .muted { color: rgba(255, 255, 255, 0.7); }
.ph-net { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; margin: 0.2rem 0; font-variant-numeric: tabular-nums; }
.modal-payslip { max-width: 820px; }
.pd-draft { margin-bottom: 1rem; }
.payslip-doc { background: #ffffff; color: #1a1a1a; border: 1px solid #e3e5ec; border-radius: 14px; padding: 1.6rem 1.8rem; font-size: 0.9rem; }
.pd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.pd-employer { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; }
.pd-kicker { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #5514b4; margin-top: 0.2rem; }
.pd-logo { height: 42px; width: auto; }
.pd-stripe { height: 4px; border-radius: 2px; background: var(--stripe); margin: 1rem 0 1.1rem; }
.pd-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.7rem 1rem; margin-bottom: 1.2rem; }
.pd-meta dt, .pd-ytd dt { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #6b7080; }
.pd-meta dd { font-weight: 600; margin-top: 0.1rem; }
.pd-tables { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pd-table { width: 100%; border-collapse: collapse; }
.pd-table th { text-align: left; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #6b7080; border-bottom: 2px solid #1a1a1a; padding: 0.35rem 0; }
.pd-table td { padding: 0.45rem 0; border-bottom: 1px solid #eceef3; }
.pd-table tfoot td { font-weight: 800; border-bottom: 0; padding-top: 0.6rem; }
.pd-table .muted { color: #8a8f9c; }
.pd-net { display: flex; align-items: center; justify-content: space-between; margin: 1.1rem 0; padding: 0.9rem 1.1rem; border-radius: 12px; background: #f3eefb; color: #3d1a6e; }
.pd-net span { font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; }
.pd-net strong { font-size: 1.7rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pd-bottom { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.pd-box { border: 1px solid #eceef3; border-radius: 12px; padding: 0.85rem 1rem; }
.pd-box h4 { font-size: 0.8rem; margin-bottom: 0.5rem; }
.pd-ytd div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.2rem 0; }
.pd-ytd dd { font-weight: 700; font-variant-numeric: tabular-nums; }
.pd-small { font-size: 0.72rem; color: #8a8f9c; margin-top: 0.4rem; }
.pd-note { margin-top: 1rem; padding: 0.7rem 0.9rem; background: #f8f9fb; border-radius: 10px; }
.pd-foot { margin-top: 1.2rem; font-size: 0.72rem; color: #8a8f9c; text-align: center; }
.pr-rates { display: flex; gap: 0.45rem; align-items: flex-start; margin-top: 0.9rem; }
.pr-rates .icon { width: 16px; height: 16px; flex-shrink: 0; color: var(--warn-text); margin-top: 1px; }
@media (max-width: 700px) {
    .pd-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pd-tables { grid-template-columns: 1fr; }
    .payslip-doc { padding: 1.1rem; }
}

/* Payslip editor */
.pe-recalc { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; }
.pe-section { margin-top: 1rem; }
.pe-head { display: flex; align-items: center; justify-content: space-between; }
.pe-head .detail-head { margin: 0; }
.pe-line { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.45rem; }
.pe-label { flex: 1; min-width: 0; }
.pe-kind { width: 170px; flex-shrink: 0; }
.pe-money { display: flex; align-items: center; gap: 0.25rem; width: 150px; flex-shrink: 0; }
.pe-money span { color: var(--text-muted); font-weight: 700; }
.pe-amount { text-align: right; }
.pe-empty { margin-top: 0.4rem; }
.pe-totals { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: flex-end; margin: 1.1rem 0 0.25rem; padding: 0.75rem 1rem; border-radius: 12px; background: var(--surface-2); font-size: 0.92rem; }
.pe-net strong { color: var(--primary); font-size: 1.1rem; }
@media (max-width: 640px) { .pe-line { flex-wrap: wrap; } .pe-label { flex-basis: 100%; } .pe-kind, .pe-money { flex: 1; width: auto; } }

/* Printing a payslip: only the payslip. */
@media print {
    body.printing > *:not(#modal-root) { display: none !important; }
    body.printing #modal-root .modal-backdrop { position: static; background: none; padding: 0; display: block; animation: none; }
    body.printing .modal { box-shadow: none; max-width: none; width: auto; padding: 0; border: 0; animation: none; max-height: none; overflow: visible; }
    body.printing .modal-close, body.printing .no-print, body.printing .pd-draft { display: none !important; }
    body.printing .payslip { border: 0; box-shadow: none; }
    body.printing::before { display: none; }
    body.printing { background: #fff; }
    .payslip, .payslip * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ----- Helpdesk ----- */
.ticket-list { display: flex; flex-direction: column; gap: 0.5rem; }
.ticket-row {
    display: flex; align-items: center; gap: 1rem; width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer;
    background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 0.85rem 1.1rem;
    box-shadow: var(--card-shadow, var(--shadow)); transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    animation: rise 0.35s ease both;
}
.ticket-row:hover { transform: translateY(-1px); border-color: var(--primary-soft-border); box-shadow: var(--card-shadow-hover, var(--shadow-pop)); }
.tk-num { font-weight: 800; font-size: 0.82rem; color: var(--text-muted); font-variant-numeric: tabular-nums; min-width: 3.4rem; }
.tk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tk-subject { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-side { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }
.tk-status, .tk-priority { font-size: 0.72rem; font-weight: 700; padding: 0.15rem 0.55rem; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.tk-open { background: var(--primary-tint); color: var(--primary); }
.tk-in-progress { background: var(--alt-tint); color: var(--alt); }
.tk-waiting { background: var(--warn-bg); color: var(--warn-text); border-color: var(--warn-border); }
.tk-resolved { background: var(--success-bg); color: var(--success-text); }
.tk-closed { background: var(--surface-2); color: var(--text-muted); }
.tp-low { color: var(--text-muted); background: var(--surface-2); }
.tp-normal { color: var(--text-muted); background: var(--surface-2); }
.tp-high { color: #a86b00; background: #fff4dc; }
.tp-urgent { color: #fff; background: var(--raspberry); }
.tk-assignee { display: inline-flex; }
@media (max-width: 640px) { .ticket-row { flex-wrap: wrap; } .tk-side { width: 100%; } }
.modal-ticket { max-width: 760px; }
.tk-header { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.4rem; }
.tk-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; margin: 1rem 0 0; padding: 0.8rem; border-radius: 12px; background: var(--surface-2); }
.tk-controls label { margin: 0; font-size: 0.75rem; font-weight: 700; color: var(--text-muted); display: flex; flex-direction: column; gap: 0.25rem; }
.tk-thread { display: flex; flex-direction: column; gap: 0.8rem; margin: 1.1rem 0; max-height: 46vh; overflow-y: auto; padding: 0.2rem; }
.tk-msg { display: flex; gap: 0.6rem; align-items: flex-start; }
.tk-msg.mine { flex-direction: row-reverse; }
.tk-bubble { max-width: 82%; background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px 14px 14px 14px; padding: 0.55rem 0.85rem; }
.tk-msg.mine .tk-bubble { background: var(--primary-tint); border-color: var(--primary-soft-border); border-radius: 14px 4px 14px 14px; }
.tk-msg.internal .tk-bubble { background: var(--warn-bg); border-color: var(--warn-border); border-style: dashed; }
.tk-meta { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; font-size: 0.85rem; margin-bottom: 0.2rem; }
.tk-body { font-size: 0.92rem; word-break: break-word; }
.tk-reply textarea { min-height: 80px; }
.tk-reply-bar { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 0.5rem; }
@media (max-width: 640px) { .tk-controls { grid-template-columns: 1fr; } }
.stat-row { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

/* Date and time boxes match the theme (including the picker icon in dark themes). */
input[type="date"], input[type="time"], input[type="month"], input[type="datetime-local"] { min-height: 2.75rem; }
:root[data-theme="dark"] input::-webkit-calendar-picker-indicator, :root[data-theme="lavender-dusk"] input::-webkit-calendar-picker-indicator, :root[data-theme="midnight"] input::-webkit-calendar-picker-indicator { filter: invert(1) opacity(0.7); }
.week-nav input[type="month"] { width: auto; padding-top: 0.45rem; padding-bottom: 0.45rem; min-height: 0; }
.pd-tables { align-items: start; }
.pr-rates > span { flex: 1; }
.pe-amount { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }

/* ================= Payslip (redesigned) ================= */
.modal-payslip { max-width: 860px; }
.payslip {
    --ps-ink: #171a26; --ps-muted: #6b7080; --ps-line: #eceef3; --ps-purple: #5514b4; --ps-tint: #f4effc;
    background: #ffffff; color: var(--ps-ink); border-radius: 18px; overflow: hidden; border: 1px solid #e3e5ec;
    font-size: 0.9rem; box-shadow: 0 18px 40px -28px rgba(28, 33, 53, 0.45);
}
.ps-band { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.4rem 1.8rem; background: linear-gradient(120deg, #161a2b 0%, #241447 50%, #3d1a6e 100%); color: #fff; }
.ps-brand img { height: 42px; width: auto; display: block; }
.ps-title { display: flex; flex-direction: column; align-items: flex-end; }
.ps-kicker { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; color: #e97de8; }
.ps-period { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; }
.ps-stripe { height: 5px; background: linear-gradient(90deg, #e97de8 0 14%, #5514b4 14% 26%, #e3e65b 26% 31%, #3e9ba3 31% 49%, #7a1f6c 49% 57%, #c2306b 57% 66%, #5fae7b 66% 78%, #1c2135 78%); }
.ps-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.25rem; align-items: center; padding: 1.5rem 1.8rem 1rem; }
.ps-name { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; }
.ps-job { color: var(--ps-muted); margin-top: 0.1rem; }
.ps-employer { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 0.6rem; font-size: 0.78rem; font-weight: 700; color: var(--ps-purple); background: var(--ps-tint); padding: 0.25rem 0.6rem; border-radius: 999px; }
.ps-employer .icon { width: 13px; height: 13px; }
.ps-netcard { display: flex; flex-direction: column; align-items: flex-end; text-align: right; padding: 1rem 1.3rem; border-radius: 16px; background: linear-gradient(135deg, #5514b4, #7a3ad6); color: #fff; min-width: 230px; box-shadow: 0 12px 24px -14px rgba(85, 20, 180, 0.8); }
.ps-netlabel { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.8; }
.ps-netvalue { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.ps-netdate { font-size: 0.75rem; opacity: 0.8; }
.ps-facts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0 1.8rem; border: 1px solid var(--ps-line); border-radius: 12px; overflow: hidden; }
.ps-fact { padding: 0.6rem 0.75rem; display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.ps-fact + .ps-fact { border-left: 1px solid var(--ps-line); }
.ps-fact span { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ps-muted); }
.ps-fact strong { font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-flow { padding: 1.2rem 1.8rem 0.2rem; }
.ps-flow-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--ps-line); }
.ps-flow-bar span { display: block; height: 100%; width: 0; }
.pf-net, .k-net::before { background: #5514b4; }
.pf-tax, .k-tax::before { background: #e97de8; }
.pf-other, .k-other::before { background: #3e9ba3; }
.ps-flow-key { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; margin-top: 0.5rem; font-size: 0.78rem; color: var(--ps-muted); }
.ps-flow-key span { display: inline-flex; align-items: center; gap: 0.35rem; }
.ps-flow-key span::before { content: ""; width: 9px; height: 9px; border-radius: 3px; }
.ps-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; padding: 1.2rem 1.8rem 0; align-items: start; }
.ps-col h4 { display: flex; align-items: center; gap: 0.4rem; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ps-muted); padding-bottom: 0.45rem; border-bottom: 2px solid var(--ps-ink); }
.ps-col h4 .icon { width: 13px; height: 13px; }
.ps-line { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px dashed var(--ps-line); }
.ps-amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ps-none { color: var(--ps-muted); }
.ps-total { border-bottom: 0; font-weight: 800; padding-top: 0.65rem; }
.ps-sum { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; margin: 1.3rem 1.8rem 0; padding: 0.9rem 1rem; border-radius: 14px; background: #f8f9fb; }
.ps-sum span { display: flex; flex-direction: column; align-items: center; font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.ps-sum small { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ps-muted); }
.ps-sum b { font-size: 1.3rem; color: var(--ps-muted); }
.ps-sum .ps-sum-net { color: var(--ps-purple); font-size: 1.4rem; }
.ps-ytd { margin: 1.2rem 1.8rem 0; }
.ps-ytd h4 { font-size: 0.8rem; font-weight: 800; margin-bottom: 0.55rem; }
.ps-ytd h4 small { font-weight: 500; color: var(--ps-muted); margin-left: 0.3rem; }
.ps-ytd-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; }
.ps-ytd-grid div { border: 1px solid var(--ps-line); border-radius: 12px; padding: 0.6rem 0.75rem; display: flex; flex-direction: column; gap: 0.15rem; }
.ps-ytd-grid span { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ps-muted); }
.ps-ytd-grid strong { font-variant-numeric: tabular-nums; }
.ps-ytd-grid .ps-ytd-net { background: var(--ps-tint); border-color: transparent; }
.ps-ytd-grid .ps-ytd-net strong { color: var(--ps-purple); }
.ps-employer-extra, .ps-note { display: flex; gap: 0.6rem; align-items: flex-start; margin: 1rem 1.8rem 0; padding: 0.75rem 0.95rem; border-radius: 12px; font-size: 0.85rem; }
.ps-employer-extra { background: #eef8f1; color: #23683d; }
.ps-note { background: #f8f9fb; }
.ps-employer-extra .icon, .ps-note .icon { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.ps-foot { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1.4rem; padding: 0.9rem 1.8rem; border-top: 1px solid var(--ps-line); font-size: 0.72rem; color: var(--ps-muted); background: #fbfbfd; }
@media (max-width: 760px) {
    .ps-band, .ps-intro, .ps-flow, .ps-columns { padding-left: 1.1rem; padding-right: 1.1rem; }
    .ps-facts, .ps-sum, .ps-ytd, .ps-employer-extra, .ps-note { margin-left: 1.1rem; margin-right: 1.1rem; }
    .ps-intro { grid-template-columns: 1fr; }
    .ps-netcard { align-items: flex-start; text-align: left; }
    .ps-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ps-fact:nth-child(odd) { border-left: 0; }
    .ps-fact:nth-child(n+3) { border-top: 1px solid var(--ps-line); }
    .ps-columns { grid-template-columns: 1fr; }
    .ps-ytd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ps-brand img { height: 32px; }
}

/* Staff payslip list */
.ph-side { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.ph-stat { display: flex; flex-direction: column; align-items: flex-end; }
.ph-stat span { font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.ph-stat small { color: rgba(255, 255, 255, 0.7); font-size: 0.78rem; }
.slip-list { display: flex; flex-direction: column; gap: 0.55rem; }
.slip-row {
    display: flex; align-items: center; gap: 1rem; width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer;
    background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 0.85rem 1.1rem;
    box-shadow: var(--card-shadow, var(--shadow)); transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; animation: rise 0.35s ease both;
}
.slip-row:hover { transform: translateY(-1px); border-color: var(--primary-soft-border); box-shadow: var(--card-shadow-hover, var(--shadow-pop)); }
.slip-icon { width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--primary-tint); color: var(--primary); flex-shrink: 0; }
.slip-icon .icon { width: 20px; height: 20px; }
.slip-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.slip-gross, .slip-net { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; min-width: 6.5rem; }
.slip-gross small, .slip-net small { font-size: 0.7rem; color: var(--text-muted); font-weight: 600; }
.slip-gross { color: var(--text-muted); }
.slip-net { font-weight: 800; font-size: 1.05rem; color: var(--primary); }
.slip-chev { width: 18px; height: 18px; color: var(--text-muted); }
@media (max-width: 600px) { .slip-gross { display: none; } }

/* ================= Company funds ================= */
.funds-warning { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }
.funds-warning > .icon { width: 22px; height: 22px; flex-shrink: 0; }
.funds-warning > div { flex: 1; }
.funds-warning.is-danger { background: var(--danger-bg); border: 1px solid var(--danger-border); color: var(--danger-text); }
.funds-warning.is-warn { background: var(--warn-bg); border: 1px solid var(--warn-border); color: var(--warn-text); }
.fund-cards { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 0.75rem; align-items: stretch; margin-bottom: 1.25rem; }
.fund-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 1.35rem 1.5rem; box-shadow: var(--card-shadow, var(--shadow)); display: flex; flex-direction: column; gap: 0.45rem; position: relative; overflow: hidden; }
.fund-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--stripe); opacity: 0.9; }
.fc-head { display: flex; align-items: center; gap: 0.55rem; font-weight: 800; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.fc-icon { width: 36px; height: 36px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: var(--primary-tint); color: var(--primary); }
.fc-icon .icon { width: 18px; height: 18px; }
.fc-value { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.fc-sub { color: var(--text-muted); font-size: 0.85rem; flex: 1; }
.fund-card .btn-row { margin-top: 0.35rem; }
.fund-payroll .fc-icon { background: var(--alt-tint); color: var(--alt); }
.fund-payroll.overdrawn { border-color: var(--danger-border); background: linear-gradient(180deg, var(--danger-bg), var(--surface) 70%); }
.fund-payroll.overdrawn .fc-value { color: var(--danger-text); }
.fund-arrow { display: flex; align-items: center; color: var(--text-muted); }
.fund-arrow .icon { width: 26px; height: 26px; }
@media (max-width: 760px) { .fund-cards { grid-template-columns: 1fr; } .fund-arrow { justify-content: center; transform: rotate(90deg); } }
.fund-in { color: var(--success-text); font-weight: 700; }
.fund-out { color: var(--text); font-weight: 700; }
.money-input { display: flex; align-items: center; gap: 0.4rem; }
.money-input span { font-size: 1.3rem; font-weight: 800; color: var(--text-muted); }
.money-input input { font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.fd-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-top: 0.6rem; }
.fd-quick .chip { border: 0; cursor: pointer; font: inherit; font-size: 0.78rem; font-weight: 600; }
.payroll-funds { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; padding: 0.85rem 1.2rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 1.1rem; }
.payroll-funds > div { display: flex; flex-direction: column; }
.payroll-funds strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.pf-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.payroll-funds .btn { margin-left: auto; }
.run-summary { margin-top: 1rem; border-radius: 12px; background: var(--surface-2); padding: 0.4rem 0.9rem; }
.run-summary:empty { display: none; }
.run-summary > div { display: flex; justify-content: space-between; padding: 0.35rem 0; font-size: 0.9rem; }
.run-summary > div + div { border-top: 1px solid var(--border); }
.run-warn { display: flex; gap: 0.4rem; align-items: flex-start; color: var(--danger-text); font-size: 0.85rem; font-weight: 600; padding: 0.5rem 0 0.3rem; }
.run-warn .icon { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.pe-auto { justify-content: space-between; padding: 0.55rem 0.75rem; border-radius: 10px; background: var(--surface-2); }
.pe-auto-label { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--text); }
.pe-auto-label .icon { width: 13px; height: 13px; color: var(--text-muted); }
.pe-auto-amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.hero-chip.danger { background: rgba(194, 48, 107, 0.35); border-color: rgba(255, 160, 190, 0.55); }
.modal-payslip .modal-close { z-index: 3; background: var(--surface); box-shadow: var(--shadow); top: 0.6rem; right: 0.6rem; }
.fund-main.overdrawn { border-color: var(--danger-border); background: linear-gradient(180deg, var(--danger-bg), var(--surface) 70%); } .fund-main.overdrawn .fc-value { color: var(--danger-text); }
.pe-override { display: flex; gap: 0.6rem; align-items: flex-start; margin-top: 0.9rem; padding: 0.75rem 0.9rem; border-radius: 12px; background: var(--warn-bg); border: 1px solid var(--warn-border); color: var(--warn-text); }
.pe-override > .icon { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }
.pe-override .inline-check { margin-top: 0.35rem; color: var(--text); font-weight: 500; }
.ps-employer-ded { padding: 1.2rem 1.8rem 0; }
.ps-employer-ded h4 small { font-size: 0.7rem; font-weight: 500; letter-spacing: 0; text-transform: none; margin-left: 0.35rem; }
.ps-cost { border-bottom: 0; padding-top: 0.2rem; color: var(--ps-muted); font-size: 0.82rem; }
@media (max-width: 760px) { .ps-employer-ded { padding-left: 1.1rem; padding-right: 1.1rem; } .ps-employer-ded h4 small { display: block; margin: 0.2rem 0 0; } }

/* ================= Funds statement ================= */
.st-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; padding-right: 2.5rem; }
.st-toolbar .modal-title { margin: 0; }
.st-toolbar .week-nav { margin: 0; }
.statement {
    --ps-ink: #171a26; --ps-muted: #6b7080; --ps-line: #eceef3; --ps-purple: #5514b4; --ps-tint: #f4effc;
    background: #fff; color: var(--ps-ink); border-radius: 18px; overflow: hidden; border: 1px solid #e3e5ec; font-size: 0.88rem;
}
.st-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; padding: 1.4rem 1.8rem 0.4rem; }
.st-generated { font-size: 0.75rem; color: var(--ps-muted); text-align: right; }
.st-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.55rem; padding: 1rem 1.8rem 0; }
.st-card { border: 1px solid var(--ps-line); border-radius: 12px; padding: 0.7rem 0.8rem; display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.st-card span { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ps-muted); }
.st-card strong { font-size: 1.12rem; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-card small { font-size: 0.7rem; color: var(--ps-muted); }
.st-card.st-estimate { background: linear-gradient(135deg, #5514b4, #7a3ad6); border-color: transparent; color: #fff; }
.st-card.st-estimate span, .st-card.st-estimate small { color: rgba(255, 255, 255, 0.8); }
.st-card.st-estimate strong.st-neg { color: #ffd1df; }
.st-in { color: #23683d; }
.st-neg { color: #b4234f !important; }
.st-box { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0.9rem 1.8rem 0; padding: 0.75rem 0.95rem; border-radius: 12px; background: var(--ps-tint); font-size: 0.84rem; line-height: 1.5; }
.st-box .icon { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; color: var(--ps-purple); }
.st-section { padding: 1.2rem 1.8rem 0; }
.st-section h4 { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ps-muted); padding-bottom: 0.45rem; border-bottom: 2px solid var(--ps-ink); margin-bottom: 0.2rem; }
.st-section h4 small { font-weight: 600; margin-left: 0.3rem; }
.st-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--ps-line); margin: 0.6rem 0 0.3rem; }
.st-bar span { display: block; height: 100%; width: 0; }
.sb-payroll { background: #5514b4; }
.sb-removed { background: #e97de8; }
.st-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 0.45rem; vertical-align: 0; }
.st-table { width: 100%; border-collapse: collapse; }
.st-table th { text-align: left; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ps-muted); padding: 0.5rem 0.4rem 0.35rem; border-bottom: 1px solid var(--ps-line); }
.st-table td { padding: 0.5rem 0.4rem; border-bottom: 1px dashed var(--ps-line); vertical-align: top; }
.st-table th:first-child, .st-table td:first-child { padding-left: 0; }
.st-table th:last-child, .st-table td:last-child { padding-right: 0; }
.st-tx td { font-size: 0.82rem; }
.st-internal td { color: var(--ps-muted); }
.st-ref { font-size: 0.72rem; color: var(--ps-muted); }
.st-by { font-size: 0.72rem; color: var(--ps-muted); }
.st-small { font-size: 0.74rem; color: var(--ps-muted); margin-top: 0.5rem; }
.statement .ps-foot { margin-top: 1.4rem; }
@media (max-width: 760px) {
    .st-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-left: 1.1rem; padding-right: 1.1rem; }
    .st-card.st-estimate { grid-column: 1 / -1; }
    .st-intro, .st-section { padding-left: 1.1rem; padding-right: 1.1rem; }
    .st-box { margin-left: 1.1rem; margin-right: 1.1rem; }
    .st-tx th:nth-child(3), .st-tx td:nth-child(3) { display: none; }
}
@media print {
    body.printing .statement { border: 0; }
    .statement, .statement * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .st-table tr { break-inside: avoid; }
}
.st-card.st-estimate.is-negative { background: linear-gradient(135deg, #b4234f, #d9416f); }
.st-card.st-estimate.is-negative small { font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; }
.st-table th.num { text-align: right; }
.st-flow { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 0.6rem; margin-top: 0.7rem; }
.st-flow-step { border: 1px solid var(--ps-line); border-radius: 12px; padding: 0.7rem 0.85rem; display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.st-flow-step span { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ps-muted); }
.st-flow-step strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.st-flow-step small { font-size: 0.7rem; color: var(--ps-muted); }
.st-flow-result { background: var(--ps-tint); border-color: transparent; }
.st-flow-result strong { color: var(--ps-purple); }
.st-flow-result.is-negative { background: #fdecf2; }
.st-flow-result.is-negative strong, .st-flow-result.is-negative small { color: #b4234f; font-weight: 800; }
.st-op { align-self: center; font-size: 1.3rem; color: var(--ps-muted); }
@media (max-width: 760px) { .st-flow { grid-template-columns: 1fr; } .st-op { justify-self: center; } }

/* ================= Scroll bounce ================= */
/* Cards spring into place as they scroll on screen: from below when scrolling down, from above when scrolling up. */
.rv { opacity: 0; transform: translate3d(0, 26px, 0) scale(0.985); transition: opacity 0.45s ease, transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1); }
.rv.rv-from-top { transform: translate3d(0, -26px, 0) scale(0.985); }
.rv.rv-in { opacity: 1; transform: none; }
/* A little elastic give at the top and bottom of the page. */
#view.edge-bounce { transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1); }
@media (prefers-reduced-motion: reduce) {
    .rv, .rv.rv-from-top { opacity: 1 !important; transform: none !important; transition: none !important; }
}
@media print { .rv { opacity: 1 !important; transform: none !important; } }

/* ================= Probation & reviews ================= */
.probation-banner { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 1.1rem; background: var(--primary-tint); border-color: var(--primary-soft-border); }
.probation-banner > .icon { width: 22px; height: 22px; color: var(--primary); flex-shrink: 0; }
.review-list { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 0.5rem; }
.review-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1rem 1.15rem; display: flex; flex-direction: column; gap: 0.5rem; }
.rc-head { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.rc-type { font-weight: 800; }
.rc-date { margin-left: auto; color: var(--text-muted); font-size: 0.85rem; }
.rc-rating { display: flex; gap: 0.1rem; }
.rc-rating .icon { width: 16px; height: 16px; color: var(--border-strong); }
.rc-rating .on .icon { color: #f0b429; fill: currentColor; }
.rc-body { font-size: 0.93rem; }
.rc-part h4 { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.15rem; }
.rc-part { font-size: 0.9rem; }
.rc-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; padding-top: 0.5rem; border-top: 1px solid var(--border); }
.probation-box { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.85rem 1rem; border-radius: 12px; background: var(--surface-2); margin-top: 0.9rem; }
.pb-label { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.3rem; }
.rv-head { margin-top: 1.2rem; }

/* Leavers and return to work */
.leaver-badge { margin-top: 0.3rem; display: inline-flex; align-items: center; gap: 0.3rem; }
.leaver-badge .icon { width: 12px; height: 12px; }
.cl-action { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.75rem; font-weight: 700; color: var(--danger-text); }
.cl-action .icon { width: 12px; height: 12px; }
.lr-note.rtw-done { background: var(--success-bg); color: var(--success-text); }
.allow-forms { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; }
.bradford { display: inline-block; min-width: 2.4rem; text-align: center; font-weight: 800; padding: 0.1rem 0.5rem; border-radius: 999px; font-variant-numeric: tabular-nums; }
.b-low { background: var(--success-bg); color: var(--success-text); }
.b-mid { background: var(--warn-bg); color: var(--warn-text); }
.b-high { background: var(--danger-bg); color: var(--danger-text); }

/* ================= Staff documents ================= */
.sf-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.sf-people { padding: 0.8rem; position: sticky; top: calc(var(--topbar-h) + 1rem); }
.sf-people-list { display: flex; flex-direction: column; gap: 0.2rem; margin-top: 0.6rem; max-height: 60vh; overflow-y: auto; }
.sf-person { display: flex; align-items: center; gap: 0.6rem; width: 100%; padding: 0.45rem 0.5rem; border: 0; border-radius: 10px; background: transparent; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.sf-person:hover { background: var(--surface-2); }
.sf-person.active { background: var(--primary-tint); }
.sf-person .mr-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.sf-list { display: flex; flex-direction: column; }
.sf-row { display: flex; align-items: center; gap: 0.85rem; padding: 0.8rem 0.3rem; }
.sf-row + .sf-row { border-top: 1px solid var(--border); }
.sf-main { flex: 1; min-width: 0; }
.sf-actions { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 860px) { .sf-layout { grid-template-columns: 1fr; } .sf-people { position: static; } .sf-row { flex-wrap: wrap; } }

/* ================= Service status ================= */
.status-hero { display: flex; align-items: center; gap: 1rem; padding: 1.3rem 1.5rem; border-radius: 18px; margin-bottom: 1.25rem; color: #fff; }
.status-hero h2 { font-size: 1.3rem; margin: 0; }
.status-hero p { opacity: 0.85; margin-top: 0.15rem; }
.sh-icon { width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sh-icon .icon { width: 24px; height: 24px; }
.sh-up { background: linear-gradient(120deg, #23683d, #3fae69); }
.sh-down { background: linear-gradient(120deg, #9b1d4f, #d9416f); }
.sh-empty { background: linear-gradient(120deg, #3a3f52, #5f6577); }
.monitor-list { display: flex; flex-direction: column; gap: 0.85rem; }
.monitor { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1.1rem 1.25rem; box-shadow: var(--card-shadow, var(--shadow)); }
.monitor.m-down { border-color: var(--danger-border); }
.mon-head { display: flex; align-items: center; gap: 0.75rem; }
.mon-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--border-strong); flex-shrink: 0; }
.m-up .mon-dot { background: #3fae69; box-shadow: 0 0 0 4px rgba(63, 174, 105, 0.18); }
.m-down .mon-dot { background: #d93a5b; box-shadow: 0 0 0 4px rgba(217, 58, 91, 0.18); animation: pulse-dot 1.6s ease-in-out infinite; }
@keyframes pulse-dot { 50% { box-shadow: 0 0 0 8px rgba(217, 58, 91, 0.05); } }
.mon-name { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.mon-name a { text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mon-state { font-weight: 800; font-size: 0.85rem; padding: 0.2rem 0.7rem; border-radius: 999px; background: var(--surface-2); color: var(--text-muted); }
.m-up .mon-state { background: var(--success-bg); color: var(--success-text); }
.m-down .mon-state { background: var(--danger-bg); color: var(--danger-text); }
.mon-bar { display: grid; grid-template-columns: repeat(48, minmax(0, 1fr)); gap: 2px; margin-top: 0.95rem; height: 28px; }
.mon-bar span { border-radius: 3px; background: var(--border); }
.mon-bar .mb-up { background: #3fae69; }
.mon-bar .mb-down { background: #d93a5b; }
.mon-bar .mb-partial { background: #e0a526; }
.mon-bar-labels { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--text-muted); margin-top: 0.25rem; }
.mon-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem; margin-top: 0.85rem; }
.mon-stats div { display: flex; flex-direction: column; }
.mon-stats span { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); }
.mon-stats strong { font-variant-numeric: tabular-nums; }
.mon-error { display: flex; gap: 0.4rem; align-items: center; margin-top: 0.75rem; color: var(--danger-text); font-weight: 600; font-size: 0.88rem; }
.mon-error .icon { width: 15px; height: 15px; }
.mon-actions { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.85rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
@media (max-width: 640px) { .mon-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mon-bar { gap: 1px; } }
.lv-count.lv-over { background: var(--warn-bg); color: var(--warn-text); border: 1px solid var(--warn-border); }
.lv-count.lv-over .icon { color: var(--warn-text); }
.lr-over { display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap; }
.lr-over .icon { width: 12px; height: 12px; }
.lv-count strong { white-space: nowrap; }

/* ---------- Expenses ---------- */
.claim-row .lr-side { min-width: 130px; }
.claim-amt { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.claim-receipt { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.82rem; margin-top: 0.3rem; }
.claim-receipt .icon { width: 14px; height: 14px; }
.stat-danger .stat-value { color: var(--danger-text); }
.stat-danger::before { background: var(--danger-text); }

/* ---------- Funds charts and budgets ---------- */
.chart-wrap { overflow: hidden; }
.funds-chart { width: 100%; height: auto; display: block; }
.fc-grid { stroke: var(--border); stroke-width: 1; }
.fc-zero { stroke: var(--danger-text); stroke-width: 1; stroke-dasharray: 4 3; }
.fc-axis { fill: var(--text-muted); font-size: 11px; font-family: inherit; }
.fc-in { fill: #3e9ba3; opacity: 0.85; }
.fc-out { fill: #e97de8; opacity: 0.85; }
.fc-line { fill: none; stroke: var(--primary); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.fc-dot { fill: var(--surface); stroke: var(--primary); stroke-width: 2; }
.chart-key { display: flex; flex-wrap: wrap; gap: 0.9rem; font-size: 0.8rem; color: var(--text-muted); }
.chart-key span { display: inline-flex; align-items: center; gap: 0.35rem; }
.chart-key span::before { content: ""; width: 10px; height: 10px; border-radius: 3px; }
.chart-key .ck-in::before { background: #3e9ba3; }
.chart-key .ck-out::before { background: #e97de8; }
.chart-key .ck-line::before { height: 3px; border-radius: 2px; background: var(--primary); }
.budget-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.8rem; }
.budget-row { border: 1px solid var(--border); border-radius: 10px; padding: 0.75rem 0.9rem; background: var(--surface-2); display: grid; gap: 0.4rem; }
.br-head { display: flex; justify-content: space-between; gap: 0.5rem; font-variant-numeric: tabular-nums; }
.br-bar { height: 8px; border-radius: 99px; background: var(--border); overflow: hidden; }
.br-bar span { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--success-text); transition: width 0.6s ease; }
.b-close .br-bar span { background: #d9a400; }
.b-over .br-bar span { background: var(--danger-text); }
.b-over { border-color: var(--danger-border); background: var(--danger-bg); }
.b-close { border-color: var(--warn-border); }
.budget-edit { display: grid; gap: 0.45rem; margin: 0.8rem 0; }
.be-row { display: grid; grid-template-columns: 1fr 170px 34px; gap: 0.6rem; align-items: center; }
.be-row .money-input span, .be-row .money-input input { font-size: 0.95rem; }
.inline-form { display: flex; gap: 0.5rem; }
.inline-form input { flex: 1; }
.sb-expenses { background: #3e9ba3; }
.st-subhead { margin: 1rem 0 0.4rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }

/* ---------- Invoices ---------- */
.iv-parties { display: grid; grid-template-columns: 1fr 1fr auto; gap: 1.2rem; padding: 1.2rem 1.8rem 0; }
.iv-parties > div { display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.9rem; }
.iv-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-weight: 700; }
.iv-dates { display: grid !important; gap: 0.5rem !important; }
.iv-dates > div { display: flex; flex-direction: column; }
.iv-totals { margin: 0.8rem 0 0 auto; max-width: 300px; display: grid; gap: 0.3rem; font-variant-numeric: tabular-nums; }
.iv-totals > div { display: flex; justify-content: space-between; gap: 1rem; }
.iv-grand { border-top: 2px solid var(--text); padding-top: 0.4rem; font-weight: 800; font-size: 1.15rem; }
.iv-paid { margin: 1rem 1.8rem 0; display: inline-block; padding: 0.3rem 0.9rem; border: 3px solid var(--success-text); color: var(--success-text); font-weight: 800; letter-spacing: 0.1em; border-radius: 6px; transform: rotate(-3deg); }
.iv-line { display: grid; grid-template-columns: 1fr 80px 150px 34px; gap: 0.5rem; align-items: center; margin-bottom: 0.45rem; }
.iv-line .money-input span, .iv-line .money-input input { font-size: 0.95rem; }
.iv-edit-total { display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-end; }
.iv-edit-total strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
    .iv-parties { grid-template-columns: 1fr; padding-left: 1.1rem; padding-right: 1.1rem; }
    .iv-line { grid-template-columns: 1fr 64px; }
    .iv-line .money-input { grid-column: 1; }
}

/* ---------- Year end, P60 and pay changes ---------- */
.p60-note { margin: 1rem 1.8rem 0; }
.pd-changes { border-top: 1px solid var(--border); margin-top: 1.2rem; }
.pc-list { display: grid; gap: 0.4rem; margin: 0.6rem 0; }
.pc-row { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; padding: 0.55rem 0.8rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.pc-row.applied { opacity: 0.7; }
.pc-row .icon-btn { margin-left: auto; }
.pc-when { font-weight: 700; color: var(--primary); min-width: 110px; }
.pc-form { display: grid; grid-template-columns: 150px 150px 150px 1fr auto; gap: 0.5rem; align-items: center; }
.pc-form .money-input span, .pc-form .money-input input { font-size: 0.95rem; }
@media (max-width: 760px) { .pc-form { grid-template-columns: 1fr 1fr; } }
.ps-reimb { padding: 1.2rem 1.8rem 0; }
.ps-reimb h4 small { font-size: 0.7rem; font-weight: 500; text-transform: none; letter-spacing: 0; margin-left: 0.35rem; }
@media (max-width: 760px) { .ps-reimb { padding-left: 1.1rem; padding-right: 1.1rem; } }
.ye-table td:first-child { min-width: 170px; }
.ye-table .emp-name { white-space: nowrap; }
#fd-insights > .panel { margin-bottom: 1.25rem; }

/* ---------- Leave calendar, shutdowns, TOIL ---------- */
.stat-btn { text-align: left; font: inherit; color: inherit; cursor: pointer; }
.stat-btn:hover { border-color: var(--primary-soft-border); }
.stat-unit { font-size: 0.9rem; font-weight: 600; margin-left: 0.2rem; color: var(--text-muted); }
.lr-clash { color: var(--warn-text); background: var(--warn-bg); border-color: var(--warn-border); }
.lc-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.lc-toolbar .week-nav { margin: 0; }
.lc-toolbar select { width: auto; min-width: 200px; }
.lc-warn { margin-bottom: 0.8rem; }
.lc-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.lc-grid { border-collapse: separate; border-spacing: 0; font-size: 0.78rem; min-width: 100%; }
.lc-grid th, .lc-grid td { padding: 0; text-align: center; border-bottom: 1px solid var(--border); min-width: 28px; height: 34px; }
.lc-grid thead th { font-weight: 700; color: var(--text-muted); padding: 0.35rem 0; background: var(--surface-2); position: sticky; top: 0; }
.lc-grid thead th span { display: block; font-size: 0.65rem; font-weight: 600; opacity: 0.7; }
.lc-grid .lc-name { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; padding: 0 0.7rem; min-width: 180px; border-right: 1px solid var(--border); }
.lc-grid thead .lc-name { background: var(--surface-2); z-index: 2; }
.lc-grid .lc-name .emp-cell { gap: 0.5rem; }
.lc-grid .lc-name .emp-name { font-size: 0.82rem; white-space: nowrap; }
.lc-grid .lc-we { background: var(--surface-2); }
.lc-grid .lc-bh { background: repeating-linear-gradient(135deg, var(--surface-2) 0 4px, var(--border) 4px 5px); }
.lc-grid .lc-clash { box-shadow: inset 0 3px 0 var(--danger-text); }
.lc-grid thead .lc-today { color: var(--primary); }
.lc-cell { display: inline-block; width: 22px; height: 22px; border-radius: 6px; vertical-align: middle; background: #b39ddb; }
.lc-cell.lt-annual { background: #8b5cf6; }
.lc-cell.lt-toil { background: #3e9ba3; }
.lc-cell.lt-sick, .lc-cell.lt-off { background: #e06c8a; }
.lc-cell.lt-compassionate { background: #e0a526; }
.lc-cell.lt-unpaid { background: #8a93a8; }
.lc-cell.lt-other { background: #5ea8ff; }
.lc-cell.lc-pending { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.55) 0 3px, transparent 3px 6px); }
.lc-cell.lc-half { height: 11px; }
.lc-key { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 0.8rem; font-size: 0.8rem; color: var(--text-muted); }
.lc-key span { display: inline-flex; align-items: center; gap: 0.35rem; }
.lc-key .lc-cell { width: 14px; height: 14px; border-radius: 4px; }
.lc-bh-key { display: inline-block; width: 14px; height: 14px; border-radius: 4px; background: repeating-linear-gradient(135deg, var(--surface-2) 0 4px, var(--border-strong) 4px 5px); border: 1px solid var(--border); }
.check-grid { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.toil-balance { display: flex; align-items: baseline; gap: 0.6rem; margin: 0.4rem 0 0.6rem; }
.toil-balance strong { font-size: 1.8rem; }
.toil-form { display: grid; grid-template-columns: 170px 1fr auto; gap: 0.5rem; margin: 0.6rem 0; }
.toil-list { display: grid; gap: 0.3rem; margin-top: 0.6rem; }
.toil-row { display: grid; grid-template-columns: 80px 1fr auto; gap: 0.6rem; padding: 0.45rem 0.6rem; border-radius: 8px; background: var(--surface-2); font-size: 0.88rem; }

/* ---------- Training ---------- */
.tr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.tr-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; display: grid; gap: 0.6rem; box-shadow: var(--shadow); }
.tr-top { display: flex; align-items: flex-start; gap: 0.7rem; }
.tr-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.tr-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--primary-tint); color: var(--primary); flex: none; }
.tr-icon .icon { width: 18px; height: 18px; }
.tr-dates { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; font-size: 0.85rem; color: var(--text-muted); }
.tr-dates strong { color: var(--text); }
.tr-foot { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 0.6rem; }
.tr-verified { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.8rem; color: var(--success-text); }
.tr-verified .icon { width: 14px; height: 14px; }
.tr-actions { margin-left: auto; display: flex; gap: 0.2rem; }
.tr-gaps { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.5rem; margin-top: 0.6rem; }
.tr-gap { display: flex; flex-direction: column; padding: 0.55rem 0.8rem; border-radius: 10px; background: var(--warn-bg); border: 1px solid var(--warn-border); }

/* ---------- HR cases ---------- */
.case-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding-right: 2.5rem; }
.case-head .modal-title { margin: 0.1rem 0 0.4rem; }
.case-summary { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 0.8rem 1rem; margin: 0.8rem 0; }
.case-entry { display: grid; grid-template-columns: 150px 160px 1fr auto; gap: 0.5rem; align-items: start; margin-bottom: 0.8rem; }
.case-timeline { list-style: none; padding: 0 0 0 1rem; margin: 0; border-left: 2px solid var(--primary-soft-border); display: grid; gap: 0.8rem; }
.case-timeline li { position: relative; }
.case-timeline li::before { content: ""; position: absolute; left: calc(-1rem - 6px); top: 0.35rem; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.case-timeline li.ct-auto::before { background: var(--border-strong); }
.case-timeline p { margin: 0.25rem 0 0; }
.ct-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.case-upload { margin-top: 0.5rem; cursor: pointer; }
.sf-files { display: flex; flex-direction: column; gap: 0.3rem; }
@media (max-width: 760px) { .case-entry { grid-template-columns: 1fr 1fr; } .case-entry textarea { grid-column: 1 / -1; } }

/* ---------- Jobs ---------- */
.job-list { display: grid; gap: 1rem; }
.job-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.4rem; box-shadow: var(--shadow); display: grid; gap: 0.8rem; }
.job-card.job-closed { opacity: 0.75; }
.job-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.job-head h2 { margin: 0 0 0.3rem; font-size: 1.2rem; }
.job-meta { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; font-size: 0.85rem; color: var(--text-muted); }
.job-meta span { display: inline-flex; align-items: center; gap: 0.3rem; }
.job-meta .icon { width: 14px; height: 14px; }
.job-desc { font-size: 0.92rem; max-height: 9rem; overflow: auto; }
.job-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.job-pipeline { border-top: 1px dashed var(--border-strong); padding-top: 0.8rem; }
.jp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.6rem; }
.jp-cols { display: grid; grid-template-columns: repeat(5, minmax(140px, 1fr)); gap: 0.6rem; overflow-x: auto; }
.jp-col { background: var(--surface-2); border-radius: 10px; padding: 0.5rem; display: grid; gap: 0.4rem; align-content: start; min-height: 70px; }
.jp-col-head { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.jp-card { text-align: left; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 0.45rem 0.6rem; display: flex; flex-direction: column; cursor: pointer; }
.jp-card:hover { border-color: var(--primary-soft-border); }
.ap-facts { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; align-items: center; font-size: 0.88rem; margin: 0.3rem 0 0.6rem; }
.lt-toil { background: #e7f4f5; color: #2b7b82; }
.banner > .icon + div { flex: 1; }

/* ---------- Notifications bell ---------- */
.bell-menu { position: relative; }
.bell-btn {
    position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px;
    border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--text-muted); cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.bell-btn:hover, .bell-btn[aria-expanded="true"] { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 3px var(--focus-ring); color: var(--text); }
.bell-btn .icon { width: 18px; height: 18px; }
.bell-count {
    position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
    background: #e0306b; color: #fff; font-size: 0.68rem; font-weight: 800; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--surface);
}
.bell-menu-panel { width: 380px; max-width: calc(100vw - 24px); padding: 0; overflow: hidden; }
.bell-head { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--border); }
.bell-list { max-height: 60vh; overflow-y: auto; }
.bell-foot { display: block; text-align: center; padding: 0.65rem; font-size: 0.85rem; font-weight: 600; border-top: 1px solid var(--border); text-decoration: none; }
.bell-foot:hover { background: var(--surface-2); }
.bell-empty { display: grid; place-items: center; gap: 0.3rem; padding: 1.8rem 1rem; color: var(--text-muted); }
.bell-empty .icon { width: 26px; height: 26px; }
.bell-empty p { margin: 0; }
.note-item { display: flex; gap: 0.7rem; width: 100%; text-align: left; padding: 0.7rem 0.9rem; border: 0; border-bottom: 1px solid var(--border); background: none; font: inherit; color: inherit; cursor: pointer; text-decoration: none; position: relative; }
.note-item:last-child { border-bottom: 0; }
.note-item:hover { background: var(--surface-2); }
.note-item.unread { background: var(--primary-tint); }
.note-item.unread::after { content: ""; position: absolute; right: 0.9rem; top: 1rem; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.note-icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--surface); border: 1px solid var(--border); color: var(--primary); }
.note-icon .icon { width: 16px; height: 16px; }
.note-text { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; padding-right: 1rem; }
.note-title { font-weight: 600; font-size: 0.88rem; }
.note-body { font-size: 0.82rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.note-time { font-size: 0.75rem; color: var(--text-muted); }
.note-page { padding: 0; overflow: hidden; }

/* ---------- Kudos and milestones ---------- */
.kudos-layout, .team-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.25rem; align-items: start; }
.team-main, .team-side, .kudos-side { display: grid; gap: 1.25rem; }
.team-main > .panel, .team-side > .panel, .kudos-side > .panel { margin: 0; }
@media (max-width: 960px) { .kudos-layout, .team-layout { grid-template-columns: 1fr; } }
.kudos-feed { display: grid; gap: 1rem; }
.kudos-feed.compact { gap: 0.6rem; }
.kudos-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem 0.9rem 1.3rem; box-shadow: var(--shadow); overflow: hidden; }
.kudos-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--kv, var(--primary)); }
.kv-teamwork { --kv: #3e9ba3; } .kv-above-and-beyond { --kv: #8b5cf6; } .kv-customers { --kv: #e0a526; }
.kv-ideas { --kv: #5ea8ff; } .kv-helping { --kv: #2f7d4f; } .kv-thanks { --kv: #e97de8; }
.kc-head { display: flex; align-items: center; gap: 0.6rem; }
.kc-head .icon-btn { margin-left: auto; }
.kc-value { display: inline-block; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--kv, var(--primary)); }
.kc-people { display: flex; align-items: center; gap: 0.25rem; margin: 0.6rem 0 0.4rem; flex-wrap: wrap; }
.kc-arrow { color: var(--text-muted); }
.kc-arrow .icon { width: 14px; height: 14px; }
.kc-names { margin-left: 0.4rem; font-size: 0.9rem; }
.kc-msg { margin: 0.2rem 0 0.6rem; font-size: 1rem; line-height: 1.5; }
.kc-reacts { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.react-btn { font: inherit; font-size: 0.85rem; padding: 0.15rem 0.55rem; border-radius: 99px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; }
.react-btn.mine { border-color: var(--primary); background: var(--primary-tint); }
.react-btn:hover { border-color: var(--primary-soft-border); }
.ms-list { display: grid; gap: 0.5rem; }
.ms-item { display: flex; align-items: center; gap: 0.65rem; padding: 0.55rem 0.65rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.ms-item.ms-today { background: linear-gradient(120deg, var(--primary-tint), var(--surface-2)); border-color: var(--primary-soft-border); }
.ms-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ms-title { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 600; font-size: 0.88rem; }
.ms-title .icon { width: 15px; height: 15px; color: var(--primary); flex: none; }
.ms-birthday .ms-title .icon { color: #e0306b; }
.ms-anniversary .ms-title .icon { color: #e0a526; }
.ms-item .btn { flex: none; }
.kd-leaders { list-style: none; padding: 0; margin: 0.4rem 0 0; display: grid; gap: 0.45rem; counter-reset: kd; }
.kd-leaders li { display: flex; align-items: center; gap: 0.6rem; counter-increment: kd; }
.kd-leaders li::before { content: counter(kd); width: 1.2rem; font-weight: 800; color: var(--text-muted); }
.kd-leaders .badge { margin-left: auto; }
.kf-chosen { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.4rem; }
.kf-chip { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.3rem 0.2rem 0.25rem; border-radius: 99px; background: var(--primary-tint); font-size: 0.85rem; font-weight: 600; }
.kf-chip button { border: 0; background: none; cursor: pointer; display: grid; place-items: center; color: var(--text-muted); padding: 0 0.15rem; }
.kf-chip .icon { width: 13px; height: 13px; }
.kf-results { display: grid; gap: 0.2rem; margin-top: 0.3rem; }
.kf-result { display: flex; align-items: center; gap: 0.55rem; text-align: left; font: inherit; color: inherit; border: 1px solid var(--border); background: var(--surface); padding: 0.4rem 0.6rem; border-radius: 10px; cursor: pointer; }
.kf-result:hover { border-color: var(--primary); }
.kf-values { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.kf-value input { position: absolute; opacity: 0; pointer-events: none; }
.kf-value span { display: inline-block; padding: 0.35rem 0.8rem; border-radius: 99px; border: 1px solid var(--border); cursor: pointer; font-size: 0.85rem; font-weight: 600; }
.kf-value input:checked + span { background: var(--kv); border-color: var(--kv); color: #fff; }
.kf-value input:focus-visible + span { box-shadow: 0 0 0 3px var(--focus-ring); }
.home-kudos { display: grid; gap: 0.15rem; padding: 0.6rem 0.7rem; margin-top: 0.5rem; border-radius: 10px; border: 1px solid var(--border); text-decoration: none; color: inherit; font-size: 0.88rem; }
.home-kudos:hover { border-color: var(--primary-soft-border); }

/* ---------- Ideas ---------- */
.idea-list { display: grid; gap: 1rem; }
.idea-card { display: grid; grid-template-columns: 64px 1fr; gap: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.vote-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; height: 74px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; font: inherit; color: var(--text); }
.vote-btn .vote-up { transform: rotate(-90deg); width: 18px; height: 18px; color: var(--text-muted); }
.vote-btn strong { font-size: 1.2rem; line-height: 1.1; }
.vote-btn span { font-size: 0.7rem; color: var(--text-muted); }
.vote-btn.voted { background: var(--primary); border-color: var(--primary); color: #fff; }
.vote-btn.voted .vote-up, .vote-btn.voted span { color: #fff; }
.vote-btn:disabled { cursor: default; opacity: 0.7; }
.idea-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.8rem; }
.idea-head h3 { margin: 0; font-size: 1.05rem; }
.idea-body { margin: 0.4rem 0; }
.idea-meta { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.idea-response { display: flex; gap: 0.5rem; margin-top: 0.6rem; padding: 0.6rem 0.8rem; border-radius: 10px; background: var(--primary-tint); font-size: 0.9rem; }
.idea-response .icon { flex: none; width: 16px; height: 16px; margin-top: 0.15rem; color: var(--primary); }
.idea-comments { margin-top: 0.6rem; }
.idea-comments summary { cursor: pointer; font-size: 0.85rem; font-weight: 600; color: var(--primary); }
.ic-row { display: flex; gap: 0.55rem; margin: 0.55rem 0; }
.ic-row p { margin: 0.1rem 0 0; font-size: 0.9rem; }
.idea-actions { display: flex; gap: 0.4rem; margin-top: 0.5rem; }
.idea-st-review, .idea-st-new { background: var(--warn-bg); color: var(--warn-text); border-color: var(--warn-border); }
.idea-st-planned, .idea-st-progress { background: var(--primary-tint); color: var(--primary); border-color: var(--primary-soft-border); }
.idea-st-done { background: var(--success-bg); color: var(--success-text); border-color: var(--success-border); }
.idea-st-declined { background: var(--surface-2); color: var(--text-muted); }
.toolbar select#id-sort { width: auto; }

/* ---------- Team pages ---------- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.6rem; margin-top: 0.5rem; }
.team-person { display: flex; gap: 0.65rem; align-items: flex-start; padding: 0.6rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.team-person.is-off { opacity: 0.75; }
.team-news { padding: 0.7rem 0; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 0.15rem; }
.team-news:last-child { border-bottom: 0; }
.team-news p { margin: 0.25rem 0 0; font-size: 0.9rem; }
.team-list { list-style: none; padding: 0; margin: 0.4rem 0 0; display: grid; gap: 0.5rem; }
.team-list li { display: flex; flex-direction: column; }
.ms-congrats { font-size: 1.05rem; padding: 0.25rem 0.55rem; }

/* ---------- Outage banner, backups, reports ---------- */
.status-banner { background: #9b1d4f; color: #fff; position: relative; z-index: 40; }
.status-banner .sb-inner { max-width: 1240px; margin: 0 auto; padding: 0.6rem 1rem; display: flex; align-items: center; gap: 0.7rem; font-size: 0.9rem; }
.status-banner .sb-inner > .icon { flex: none; width: 18px; height: 18px; }
.status-banner .sb-inner > span { flex: 1; }
.status-banner .sb-close { color: #fff; border-color: transparent; }
.status-banner .sb-close:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }
.bk-upload { cursor: pointer; }
.bk-health { display: flex; align-items: center; gap: 0.5rem; padding: 0.55rem 0.8rem; margin: 0.6rem 0 0.9rem; border-radius: 10px; background: var(--success-bg); color: var(--success-text); border: 1px solid var(--success-border); font-size: 0.86rem; }
.bk-health.is-stale { background: var(--danger-bg); color: var(--danger-text); border-color: var(--danger-border); }
.bk-health .icon { flex: none; width: 16px; height: 16px; }
.report-wrap { margin-top: 1rem; }
.report-wrap .statement { max-width: 900px; margin: 0 auto; }
.rp-bars { display: flex; align-items: flex-end; gap: 3px; height: 90px; padding: 0.4rem 0; border-bottom: 1px solid var(--border); }
.rp-bar { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.rp-bar i { display: block; width: 100%; height: 2%; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, #8b5cf6, var(--primary)); }
.rp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.rp-activity { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0.4rem; }
.rp-activity div { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.4rem 0.6rem; border-radius: 8px; background: var(--surface-2); font-size: 0.85rem; }
@media (max-width: 760px) { .rp-cols { grid-template-columns: 1fr; } }
@media print { .rp-bar i { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.job-list { grid-template-columns: minmax(0, 1fr); }
.job-card { grid-template-columns: minmax(0, 1fr); min-width: 0; }

/* Dropdown menus never run off the bottom of the screen; long ones use two columns. */
@media (min-width: 901px) {
    .mainnav .menu { max-height: calc(100vh - var(--topbar-h) - 24px); overflow-y: auto; overscroll-behavior: contain; }
    .mainnav .menu.menu-cols { display: grid; grid-template-columns: repeat(2, minmax(270px, 1fr)); gap: 0 0.2rem; width: min(640px, calc(100vw - 24px)); }
    .mainnav .menu.menu-cols[hidden] { display: none; }
}

/* ---------- Resume session and maintenance (sign-in page) ---------- */
.resume-offer {
    display: flex; align-items: center; gap: 0.8rem; width: 100%; margin: 0 0 1.2rem; padding: 0.7rem 0.9rem;
    border: 1px solid var(--primary-soft-border); border-radius: 14px; background: var(--primary-tint); color: var(--text);
    font: inherit; text-align: left; cursor: pointer; transition: box-shadow 0.15s, border-color 0.15s;
}
.resume-offer:hover { border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); }
.resume-offer > .icon { margin-left: auto; width: 18px; height: 18px; color: var(--primary); }
.resume-offer[hidden] { display: none; }
.resume-text { display: flex; flex-direction: column; }
.resume-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--primary); }
.resume-avatar {
    flex: none; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; overflow: hidden;
    background: linear-gradient(135deg, var(--primary), #e97de8); color: #fff; font-weight: 800; font-size: 0.95rem;
}
.resume-avatar img { width: 100%; height: 100%; object-fit: cover; }
.resume-avatar.resume-big { width: 76px; height: 76px; font-size: 1.6rem; margin: 0 auto 0.8rem; display: grid; box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--primary-soft-border); }
.resume-avatar.resume-big[hidden] { display: none; }
.code-forget { display: block; margin: 0.2rem auto 0; font-size: 0.82rem; color: var(--text-muted); }
.maint-step { text-align: center; }
.maint-logo { display: flex; justify-content: center; margin: 0.4rem 0 1.4rem; }
.maint-logo img { max-width: 260px; width: 80%; height: auto; }
.maint-mark { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--warn-bg); color: var(--warn-text); border: 1px solid var(--warn-border); margin-bottom: 0.8rem; }
.maint-mark .icon { width: 26px; height: 26px; }
.maint-msg { font-size: 1.02rem; line-height: 1.55; margin: 0.6rem 0 0.4rem; white-space: pre-line; }
.login-card.maint-card .login-card-logo { display: none; }
.status-banner.maint-banner { background: #5514b4; }
.login-maint-banner { display: flex; gap: 0.65rem; align-items: flex-start; margin: 0 0 1.1rem; padding: 0.75rem 0.9rem; border-radius: 12px; background: var(--warn-bg); color: var(--warn-text); border: 1px solid var(--warn-border); font-size: 0.88rem; line-height: 1.45; }
.login-maint-banner .icon { flex: none; width: 18px; height: 18px; margin-top: 0.1rem; }
.login-maint-banner[hidden], .maint-card .login-maint-banner { display: none; }
.login-maint-banner strong { display: block; }

/* ---------- Payroll approval, bands, history, bills, forecast ---------- */
.pr-approval { margin: 0 0 0.8rem; font-size: 0.88rem; }
.pr-ok { display: inline-flex; align-items: center; gap: 0.25rem; color: var(--success-text); margin-top: 0.2rem; }
.pr-ok .icon { width: 13px; height: 13px; }
.pr-wait { display: inline-block; max-width: 140px; white-space: normal; vertical-align: middle; margin-right: 0.3rem; }
.band-below { background: var(--warn-bg); color: var(--warn-text); border-color: var(--warn-border); }
.band-within { background: var(--success-bg); color: var(--success-text); border-color: var(--success-border); }
.band-above { background: var(--primary-tint); color: var(--primary); border-color: var(--primary-soft-border); }
.band-form, .extra-form { display: grid; grid-template-columns: 1fr 150px 150px auto; gap: 0.5rem; align-items: center; margin-top: 0.8rem; }
.extra-form { grid-template-columns: 170px 1fr 140px auto auto; }
.ex2-range { display: flex; gap: 0.4rem; }
.ex2-range[hidden] { display: none; }
.band-form .money-input span, .band-form .money-input input, .extra-form .money-input span, .extra-form .money-input input { font-size: 0.95rem; }
@media (max-width: 760px) { .band-form, .extra-form { grid-template-columns: 1fr 1fr; } }
.band-meter { padding: 0.8rem 1rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); margin-bottom: 0.6rem; }
.bm-head { display: flex; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.6rem; }
.bm-track { position: relative; height: 10px; border-radius: 99px; background: linear-gradient(90deg, var(--warn-border), var(--success-border), var(--primary-soft-border)); margin: 0 7px 0.5rem; }
.bm-dot { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px var(--surface); }
.pay-bars { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding: 0.4rem 0; }
.pb-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; min-width: 0; }
.pb-col span { display: block; width: 100%; max-width: 34px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #8b5cf6, var(--primary)); }
.pb-col small { font-size: 0.65rem; color: var(--text-muted); }
.sb-bills { background: #e0a526; }
.fc-dot.neg { stroke: var(--danger-text); }
.forecast-table td, .forecast-table th { white-space: nowrap; }
#fd-forecast > .panel { margin-bottom: 1.25rem; }

/* ---------- Document versions ---------- */
.link-btn { border: 0; background: none; padding: 0; font: inherit; color: var(--primary); cursor: pointer; text-decoration: underline; }
.version-list { list-style: none; padding: 0; margin: 0.6rem 0 0; display: grid; gap: 0.6rem; }
.version-list li { border: 1px solid var(--border); border-radius: 12px; padding: 0.7rem 0.9rem; background: var(--surface-2); }
.version-list li.current { border-color: var(--success-border); background: var(--success-bg); }
.vl-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.vl-head .btn { margin-left: auto; }
.vl-note { margin: 0.35rem 0; }
.vl-acks summary { cursor: pointer; font-size: 0.85rem; color: var(--primary); margin-top: 0.3rem; }
.vl-acks ul { margin: 0.4rem 0 0; padding-left: 1.1rem; font-size: 0.88rem; }

/* ---------- Goals ---------- */
.obj-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.25rem; align-items: start; }
@media (max-width: 960px) { .obj-layout { grid-template-columns: 1fr; } }
.obj-list { display: grid; gap: 1rem; }
.obj-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem; box-shadow: var(--shadow); }
.obj-head { display: flex; justify-content: space-between; gap: 0.8rem; align-items: flex-start; }
.obj-head h3 { margin: 0; font-size: 1.05rem; }
.obj-progress { display: grid; grid-template-columns: 1fr auto; gap: 0.7rem; align-items: center; margin: 0.7rem 0 0.3rem; }
.obj-progress .br-bar span { background: var(--primary); }
.obj-updates summary { cursor: pointer; font-size: 0.85rem; color: var(--primary); }
.obj-actions { margin-top: 0.6rem; }
.obj-team { display: grid; gap: 0.5rem; }
.obj-member { display: flex; gap: 0.6rem; align-items: center; padding: 0.45rem; border-radius: 10px; text-decoration: none; color: inherit; }
.obj-member:hover { background: var(--surface-2); }
.obj-member > span:last-child { display: flex; flex-direction: column; }
input[type="range"] { width: 100%; accent-color: var(--primary); }

/* ---------- 360 feedback ---------- */
.rating-row { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.rating-pill input { position: absolute; opacity: 0; pointer-events: none; }
.rating-pill span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); cursor: pointer; font-weight: 700; }
.rating-pill input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.rating-pill input:focus-visible + span { box-shadow: 0 0 0 3px var(--focus-ring); }
.rating-key { margin-left: 0.4rem; }
.gf-q { margin-bottom: 1rem; }
.gf-q > label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.fb-request { border-top: 1px solid var(--border); padding: 0.9rem 0; }
.fb-request:first-of-type { border-top: 0; }
.fb-head { display: flex; align-items: center; gap: 0.7rem; }
.fb-head .btn-row { margin-left: auto; }
.fb-results { display: grid; gap: 0.7rem; margin-top: 0.7rem; }
.fb-rating { display: grid; grid-template-columns: 1fr auto; gap: 0.3rem 1rem; align-items: center; padding: 0.6rem 0.8rem; border-radius: 10px; background: var(--surface-2); }
.fb-dist { grid-column: 1 / -1; display: flex; gap: 0.3rem; }
.fb-dist span { font-size: 0.75rem; color: var(--text-muted); padding: 0.1rem 0.45rem; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); }
.fb-dist b { margin-left: 0.3rem; color: var(--text); }
.fb-text > span { font-weight: 600; font-size: 0.9rem; }
.fb-text ul { margin: 0.3rem 0 0; padding-left: 1.1rem; }
.fr-share { margin-top: 1.9rem; }

/* ---------- Pulse ---------- */
.pulse-q { font-size: 1.05rem; font-weight: 600; margin: 0.5rem 0 0.7rem; }
.pulse-faces { display: flex; gap: 0.4rem; }
.pulse-face { flex: 1; font-size: 1.7rem; padding: 0.45rem 0; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; transition: transform 0.12s, border-color 0.12s; }
.pulse-face:hover { transform: translateY(-2px); border-color: var(--primary); }
.pulse-comment { margin-top: 0.6rem; }
.pulse-done { display: flex; align-items: center; gap: 0.5rem; color: var(--success-text); font-weight: 600; }
.pulse-done .icon { width: 18px; height: 18px; }
.pulse-trend { display: flex; align-items: flex-end; gap: 6px; height: 170px; margin: 0.6rem 0 1rem; }
.pt-col { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.pt-val { font-weight: 700; font-size: 0.8rem; }
.pt-bar { flex: 1; width: 100%; max-width: 40px; display: flex; align-items: flex-end; }
.pt-bar i { display: block; width: 100%; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, #3e9ba3, var(--primary)); }
.pt-col small { font-size: 0.68rem; color: var(--text-muted); }
.pulse-week { border-top: 1px solid var(--border); padding: 0.6rem 0; }
.pulse-week ul { margin: 0.4rem 0 0; padding-left: 1.1rem; font-size: 0.9rem; }

/* ---------- Exit interviews and flexible working ---------- */
.exit-form { max-width: 760px; }
.xi-answers { display: grid; gap: 0.2rem 0; margin: 0.6rem 0 0; }
.xi-answers dt { font-weight: 600; font-size: 0.85rem; color: var(--text-muted); margin-top: 0.5rem; }
.xi-answers dd { margin: 0; }
.flex-card { margin-bottom: 1rem; }
.flex-card .inline-form { margin-top: 0.7rem; }
.flex-actions { margin-top: 0.6rem; }
.day-pick { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 0.6rem 0; }
.day-chip input { position: absolute; opacity: 0; pointer-events: none; }
.day-chip span { display: inline-grid; place-items: center; width: 56px; height: 44px; border-radius: 10px; border: 1px solid var(--border); cursor: pointer; font-weight: 700; }
.day-chip input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.day-chip input:focus-visible + span { box-shadow: 0 0 0 3px var(--focus-ring); }
.section-title + .flex-card { margin-top: 0.6rem; }
.version-list li { position: relative; padding-right: 3.6rem; }
.vl-head .btn { position: absolute; right: 0.8rem; top: 0.7rem; margin: 0; }

/* ---------- Chat ---------- */
.chat-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 1rem; height: calc(100vh - var(--topbar-h) - 11rem); min-height: 420px; }
.chat-channels { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.6rem; overflow-y: auto; }
.ch-group { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); padding: 0.6rem 0.5rem 0.3rem; }
.ch-none { padding: 0 0.5rem; margin: 0; }
.ch-item { display: flex; align-items: center; gap: 0.6rem; width: 100%; text-align: left; padding: 0.5rem; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; cursor: pointer; }
.ch-item:hover { background: var(--row-hover); }
.ch-item.active { background: var(--primary-tint); }
.ch-item.unread strong { color: var(--primary); }
.ch-name { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ch-name strong, .ch-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-hash { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--surface-2); color: var(--text-muted); font-weight: 700; }
.chat-pane { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 0.6rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); min-height: 3.4rem; }
.chat-messages { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.15rem; }
.chat-empty { margin: auto; text-align: center; color: var(--text-muted); }
.chat-msg { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.35rem 0.4rem; border-radius: 10px; position: relative; }
.chat-msg:not(.cont) { margin-top: 0.5rem; }
.chat-msg:hover { background: var(--row-hover); }
.cm-gap { width: 34px; flex: none; }
.cm-body { min-width: 0; flex: 1; }
.cm-head { display: flex; gap: 0.5rem; align-items: baseline; }
.cm-text { overflow-wrap: anywhere; }
.cm-text p { margin: 0.1rem 0; }
.cm-del { opacity: 0; position: absolute; right: 0.4rem; top: 0.3rem; }
.chat-msg:hover .cm-del, .cm-del:focus-visible { opacity: 1; }
.chat-input { display: flex; gap: 0.5rem; align-items: flex-end; padding: 0.75rem; border-top: 1px solid var(--border); }
.chat-input textarea { flex: 1; resize: none; min-height: 2.6rem; margin: 0; }
.chat-input .btn { flex: none; }
@media (max-width: 760px) {
    .chat-layout { grid-template-columns: minmax(0, 1fr); height: auto; }
    .chat-channels { max-height: 220px; }
    .chat-pane { height: 70vh; }
    .cm-del { opacity: 1; }
}

/* ---------- Markdown ---------- */
.md { line-height: 1.6; overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md h1, .md h2, .md h3 { margin: 1.2rem 0 0.5rem; line-height: 1.25; }
.md h1 { font-size: 1.5rem; } .md h2 { font-size: 1.25rem; } .md h3 { font-size: 1.05rem; }
.md ul, .md ol { padding-left: 1.4rem; }
.md code { background: var(--surface-2); border-radius: 6px; padding: 0.1rem 0.35rem; font-size: 0.9em; }
.md pre { background: var(--surface-2); border-radius: 10px; padding: 0.8rem 1rem; overflow-x: auto; }
.md pre code { background: none; padding: 0; }
.md blockquote { margin: 0.8rem 0; padding: 0.4rem 1rem; border-left: 3px solid var(--primary); color: var(--text-muted); }
.md hr { border: 0; border-top: 1px solid var(--border); margin: 1.2rem 0; }
.md a[data-wikilink].missing { color: var(--danger-text); text-decoration: underline dashed; }

/* ---------- Q&A ---------- */
.back-link { display: inline-flex; align-items: center; gap: 0.3rem; margin-bottom: 0.8rem; color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.back-link:hover { color: var(--primary); }
.back-link .icon { width: 16px; height: 16px; }
.qa-list { display: grid; gap: 0.6rem; }
.qa-row { display: flex; gap: 1rem; align-items: flex-start; padding: 0.9rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); }
.qa-row:hover { border-color: var(--primary); }
.qa-count { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; width: 70px; height: 58px; border-radius: 12px; border: 1px solid var(--border); font-size: 0.72rem; color: var(--text-muted); }
.qa-count strong { font-size: 1.15rem; color: var(--text); }
.qa-count.answered { border-color: var(--success-border); }
.qa-count.solved { background: var(--success-bg); border-color: var(--success-border); color: var(--success-text); }
.qa-count.solved strong { color: var(--success-text); }
.qa-main { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.qa-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-top: 0.3rem; }
.qa-question h1 { font-size: 1.4rem; margin: 0 0 0.4rem; }
.qa-question .md { margin-top: 1rem; }
.qa-answer { display: flex; gap: 1rem; margin-top: 0.8rem; }
.qa-answer.accepted { border-color: var(--success-border); box-shadow: 0 0 0 1px var(--success-border); }
.qa-vote { flex: none; width: 56px; }
.qa-vote .vote-btn { width: 56px; height: 64px; }
.qa-vote .vote-btn[disabled] { cursor: default; opacity: 0.6; }
.qa-a-main { min-width: 0; flex: 1; }
.qa-a-main .badge { margin-bottom: 0.5rem; }
.qa-reply { margin-top: 1rem; }
.qa-reply textarea { width: 100%; }

/* ---------- Knowledge base ---------- */
.wk-section { margin-bottom: 1rem; }
.wk-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.6rem; margin-top: 0.6rem; }
.wk-page { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.75rem 0.9rem; border: 1px solid var(--border); border-radius: 12px; text-decoration: none; color: var(--text); background: var(--surface-2); }
.wk-page:hover { border-color: var(--primary); }
.wk-article { max-width: 900px; }
.wk-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: 0.8rem; margin-bottom: 1rem; }
.wk-head h1 { margin: 0.2rem 0; font-size: 1.6rem; }
.wk-links { margin-top: 1.4rem; padding-top: 0.8rem; border-top: 1px solid var(--border); }
.wk-old { margin-top: 0.6rem; padding: 0.8rem; border: 1px dashed var(--border); border-radius: 10px; max-height: 320px; overflow-y: auto; }
.we-tabs { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; margin: 0.8rem 0 0.4rem; }
.we-tabs button { border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 999px; padding: 0.3rem 0.9rem; font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.we-tabs button.active { background: var(--primary); border-color: var(--primary); color: var(--on-primary, #fff); }
.we-body { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9rem; }
.we-preview { min-height: 300px; padding: 0.8rem 1rem; border: 1px solid var(--border); border-radius: 10px; }

/* ---------- Mentoring ---------- */
.mt-card { margin-bottom: 1rem; }
.mt-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; margin-top: 1rem; }
.mt-meeting { padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.mt-meeting p { margin: 0.2rem 0; }
.mt-meeting:last-child { border-bottom: 0; }
@media (max-width: 760px) { .mt-cols { grid-template-columns: minmax(0, 1fr); } }

/* ---------- On call ---------- */
.oc-rota { margin-bottom: 1rem; }
.oc-now { display: flex; gap: 0.8rem; align-items: center; }
.oc-now > div { display: flex; flex-direction: column; }
.oc-now a { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.9rem; }
.oc-now a .icon { width: 14px; height: 14px; }
.oc-contact { display: flex; flex-direction: column; }
.oc-weeks { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.5rem; margin-top: 1rem; }
.oc-week { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.6rem 0.7rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); min-width: 0; }
.oc-week select { margin: 0; }
.oc-home { display: grid; gap: 0.4rem; margin-top: 0.7rem; }
.oc-home-row { display: flex; gap: 0.6rem; align-items: center; text-decoration: none; color: var(--text); padding: 0.4rem; border-radius: 10px; }
.oc-home-row:hover { background: var(--row-hover); }
.oc-home-row > span { display: flex; flex-direction: column; min-width: 0; }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.9rem; }
.profile-section .detail-head + .tag-list { margin-top: 0; }
.tag-list .tag { margin-top: 0; }

/* ---------- Sign-in history ---------- */
.login-list .session-row.is-failed .session-icon { color: var(--danger-text); background: var(--danger-bg); }
.login-list .session-row .btn { flex: none; }

/* ---------- Security & data (System Admin) ---------- */
.sec-split { margin-top: 1.6rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }
.ret-grid { display: grid; gap: 0.5rem; margin: 0.8rem 0; }
.ret-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.6rem 0.8rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.ret-row > div { display: flex; flex-direction: column; min-width: 0; }
.ret-row select { width: auto; min-width: 150px; margin: 0; }
@media (max-width: 600px) { .ret-row { flex-direction: column; align-items: stretch; } .ret-row select { width: 100%; } }

/* ---------- Announcement schedule ---------- */
#ann-tabs { margin-bottom: 1rem; }
#ann-tabs .icon { width: 15px; height: 15px; margin-right: 0.3rem; vertical-align: -2px; }
.ac-scheduled { --ci-bg: var(--warn-bg); --ci-fg: var(--warn-text); }
.ac-live { --ci-bg: var(--primary-tint); --ci-fg: var(--primary); }
.ac-expired { --ci-bg: var(--surface-2); --ci-fg: var(--text-muted); }
.ac-end { --ci-bg: var(--surface-2); --ci-fg: var(--text-muted); text-decoration: line-through; }
#ann-schedule .cal-day { cursor: pointer; }
#ann-schedule .cal-day.other { cursor: default; }
.ann-upcoming { display: grid; gap: 0.4rem; margin-top: 0.6rem; }
.ann-up-row { display: flex; flex-direction: column; gap: 0.15rem; text-align: left; border: 1px solid var(--border); background: var(--surface-2); border-radius: 10px; padding: 0.55rem 0.7rem; font: inherit; color: var(--text); cursor: pointer; }
.ann-up-row:hover { border-color: var(--primary); }

/* ---------- Home page panels ---------- */
.home-customise { justify-self: center; align-self: center; color: var(--text-muted); }
.lw-stats { display: flex; gap: 1.2rem; flex-wrap: wrap; margin: 0.6rem 0 0.3rem; }
.lw-stats > div { display: flex; flex-direction: column; }
.lw-stats strong { font-size: 1.25rem; }
.qw-list { display: grid; gap: 0.2rem; margin-top: 0.5rem; }
.qw-row { display: flex; flex-direction: column; padding: 0.45rem 0.5rem; border-radius: 10px; text-decoration: none; color: var(--text); }
.qw-row:hover { background: var(--row-hover); }
.hw-list { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 0.4rem; }
.hw-row { display: flex; align-items: center; gap: 0.8rem; padding: 0.55rem 0.7rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.hw-row.is-off { background: var(--surface-2); }
.hw-row.is-off strong { color: var(--text-muted); }
.hw-toggle { display: flex; align-items: center; gap: 0.7rem; flex: 1; margin: 0; cursor: pointer; font-weight: 400; min-width: 0; }
.hw-toggle input { width: 18px; height: 18px; flex: none; margin: 0; }
.hw-toggle > span { display: flex; flex-direction: column; min-width: 0; }
.hw-move { display: flex; gap: 0.2rem; flex: none; }
.hw-move .hw-up { transform: rotate(90deg); }
.hw-move .hw-down { transform: rotate(90deg); }

/* ---------- Website enquiries ---------- */
.enq-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 1rem; align-items: start; }
.enq-list { display: grid; gap: 0.4rem; }
.enq-row { display: flex; flex-direction: column; gap: 0.15rem; text-align: left; padding: 0.7rem 0.85rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; min-width: 0; }
.enq-row:hover { border-color: var(--border-hover); }
.enq-row.active { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.enq-row.is-new strong::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-right: 0.4rem; vertical-align: 1px; }
.enq-top { display: flex; justify-content: space-between; gap: 0.5rem; }
.enq-snip { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.enq-detail { position: sticky; top: calc(var(--topbar-h) + 1rem); }
.enq-contact { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; margin-bottom: 1rem; }
.enq-contact a, .enq-contact span { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.9rem; }
.enq-contact .icon { width: 15px; height: 15px; }
.enq-message { padding: 0.9rem 1rem; background: var(--surface-2); border-radius: 12px; margin-bottom: 1rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.enq-notes { list-style: none; padding: 0; margin: 0 0 0.6rem; display: grid; gap: 0.5rem; }
.enq-notes li { padding: 0.5rem 0.7rem; border-left: 3px solid var(--primary-soft-border); }
.enq-actions { align-items: center; }
.enq-actions #enq-del { margin-right: auto; }
@media (max-width: 860px) { .enq-layout { grid-template-columns: minmax(0, 1fr); } .enq-detail { position: static; } }
