/* ============================================================
   HMA Living - People Portal
   Navy + teal brand. The pipeline (stages as valves on a line)
   is the one signature element; everything else stays quiet.
   ============================================================ */
:root {
    --ggg-primary: #2b2622;
    --ggg-primary-dark: #1c1916;
    --ggg-accent: #8c6a3c;
    --ggg-accent-dark: #6f5330;
    --ggg-accent-soft: #f3ece1;
    --ggg-bg: #f6f4f0;
    --ggg-surface: #ffffff;
    --ggg-border: #dde4e8;
    --ggg-text: #1f2f38;
    --ggg-muted: #66788a;
    --ok: #1e7f4f;   --ok-bg: #e5f4ec;
    --warn: #9a5b00; --warn-bg: #fff3dc;
    --bad: #b42318;  --bad-bg: #fde8e6;
    --prog: #5a4a8a; --prog-bg: #e2f0f7;
    --radius-sm: 6px;
    --radius: 10px;
    --font: 'IBM Plex Sans', 'Segoe UI', Roboto, Arial, sans-serif;
}

body {
    background-color: var(--ggg-bg);
    color: var(--ggg-text);
    font-family: var(--font);
    font-size: .9375rem;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--ggg-accent-dark); }
a:hover { color: var(--ggg-primary); }
:focus-visible { outline: 2px solid var(--ggg-accent); outline-offset: 2px; }

/* ---------- Public navbar / header (request form, tracking, onboarding) ---------- */
.navbar-ggg { background: var(--ggg-primary); }
.navbar-ggg .navbar-brand { color: #fff; font-weight: 600; }
.navbar-ggg .navbar-brand small { display: block; font-size: .72rem; font-weight: 400; opacity: .8; }
.navbar-ggg .nav-link { color: rgba(255,255,255,.85) !important; }
.navbar-ggg .nav-link:hover { color: #fff !important; }
.page-header { background: var(--ggg-primary); color: #fff; padding: 40px 0 36px; margin-bottom: 30px; }
.page-header h1 { font-weight: 600; font-size: 1.8rem; margin-bottom: 6px; }
.page-header p { opacity: .85; margin-bottom: 0; max-width: 60ch; }
.navbar-logo-chip { display: inline-block; background: #fff; border-radius: var(--radius-sm); padding: 4px 10px; line-height: 0; }
.navbar-logo-chip img { display: block; max-width: 100%; height: auto; }

/* ---------- Cards, forms, buttons ---------- */
.card-ggg { border: 1px solid var(--ggg-border); border-radius: var(--radius); box-shadow: none; background: var(--ggg-surface); }
.card-ggg .card-header {
    background: transparent; border-bottom: 1px solid var(--ggg-border);
    font-weight: 600; color: var(--ggg-primary); padding: .85rem 1.1rem;
}
.form-label { font-weight: 500; color: var(--ggg-text); font-size: .875rem; margin-bottom: .3rem; }
.required-star { color: var(--bad); }
.form-control, .form-select { border-color: #cdd7dd; border-radius: var(--radius-sm); }
.form-control:focus, .form-select:focus { border-color: var(--ggg-accent); box-shadow: 0 0 0 3px rgba(140,106,60,.15); }
.form-section { font-size: .8rem; font-weight: 600; color: var(--ggg-muted); margin: .75rem 0 0; padding-top: .75rem; border-top: 1px dashed var(--ggg-border); }
.field-ro { padding: .4rem 0; min-height: 2rem; border-bottom: 1px solid #eef2f4; }

.btn-ggg-primary { background: var(--ggg-accent); border-color: var(--ggg-accent); color: #fff; font-weight: 500; }
.btn-ggg-primary:hover, .btn-ggg-primary:focus { background: var(--ggg-accent-dark); border-color: var(--ggg-accent-dark); color: #fff; }
.btn-ggg-outline { color: var(--ggg-primary); border-color: #b9c8d1; background: #fff; }
.btn-ggg-outline:hover { background: var(--ggg-primary); border-color: var(--ggg-primary); color: #fff; }
.btn-ggg-dark { background: var(--ggg-primary); color: #fff; border-color: var(--ggg-primary); }
.btn-ggg-dark:hover { background: var(--ggg-primary-dark); color: #fff; }
.btn-icon { border: 0; background: transparent; font-size: 1.4rem; color: var(--ggg-primary); padding: 0 .4rem; }

/* ---------- Status ---------- */
.status-badge { font-size: .78rem; padding: .3em .7em; border-radius: 20px; font-weight: 500; white-space: nowrap; }
.status-Pending   { background: var(--warn-bg); color: var(--warn); }
.status-In-Review { background: var(--prog-bg); color: var(--prog); }
.status-Approved  { background: var(--ok-bg);   color: var(--ok); }
.status-Rejected  { background: var(--bad-bg);  color: var(--bad); }
.pill { display: inline-block; font-size: .75rem; font-weight: 500; padding: .2em .65em; border-radius: 20px; white-space: nowrap; }
.st-ok { background: var(--ok-bg); color: var(--ok); }
.st-warn { background: var(--warn-bg); color: var(--warn); }
.st-bad { background: var(--bad-bg); color: var(--bad); }
.st-progress { background: var(--prog-bg); color: var(--prog); }
.st-muted { background: #eef1f3; color: var(--ggg-muted); }

/* ---------- Tables ---------- */
.table-ggg { --bs-table-bg: transparent; margin-bottom: 0; }
.table-ggg thead th {
    background: #f6f9fa; color: var(--ggg-muted); font-weight: 600; font-size: .78rem;
    border-bottom: 1px solid var(--ggg-border); white-space: nowrap;
}
.table-ggg tbody tr:hover { background-color: #faf7f2; }
.table-ggg td { border-color: #edf1f3; }

/* ---------- Login ---------- */
.login-wrapper { min-height: 90vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.login-card { max-width: 420px; width: 100%; }
footer.site-footer { padding: 20px 0; text-align: center; color: var(--ggg-muted); font-size: .85rem; margin-top: 40px; }

/* ============================================================
   Admin shell
   ============================================================ */
.admin-shell { display: flex; min-height: 100vh; }
.sidebar-admin {
    width: 248px; flex: 0 0 248px; background: var(--ggg-primary-dark); color: #fff;
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-admin .brand-box { padding: 20px 18px 14px; }
.sidebar-admin .brand-sub { margin-top: 10px; font-size: .8rem; color: rgba(255,255,255,.6); }
.sidebar-admin .nav { padding: 0 10px; flex: 1; }
.sidebar-admin .nav-group { font-size: .72rem; color: rgba(255,255,255,.45); padding: 16px 10px 6px; }
.sidebar-admin .nav-link {
    color: rgba(255,255,255,.78); padding: 8px 10px; border-radius: var(--radius-sm); margin-bottom: 2px;
    display: flex; align-items: center; gap: 10px; font-size: .9rem;
}
.sidebar-admin .nav-link i { font-size: 1rem; opacity: .85; }
.sidebar-admin .nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar-admin .nav-link.active { background: rgba(140,106,60,.18); color: #fff; box-shadow: inset 3px 0 0 var(--ggg-accent); }
.nav-badge { margin-left: auto; background: var(--ggg-accent); color: #fff; font-size: .72rem; font-weight: 600; border-radius: 10px; padding: 1px 7px; }
.sidebar-user { display: flex; gap: 10px; align-items: center; padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.08); }
.su-name { font-size: .85rem; font-weight: 500; }
.su-role { font-size: .75rem; color: rgba(255,255,255,.55); }
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: var(--ggg-surface);
    border-bottom: 1px solid var(--ggg-border); position: sticky; top: 0; z-index: 20;
}
.topbar-title { font-size: 1.15rem; font-weight: 600; margin: 0; color: var(--ggg-primary); }
.topbar-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.admin-content { padding: 24px 28px 48px; }
.sidebar-backdrop { display: none; }

@media (max-width: 991.98px) {
    .sidebar-admin { position: fixed; left: 0; top: 0; z-index: 1050; transform: translateX(-100%); transition: transform .2s ease; }
    .sidebar-admin.open { transform: none; }
    .sidebar-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(28,25,22,.45); z-index: 1040; }
    .topbar, .admin-content { padding-left: 16px; padding-right: 16px; }
}

/* ---------- Avatars ---------- */
.avatar {
    width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--ggg-accent-soft); color: var(--ggg-accent-dark); font-weight: 600; font-size: .95rem; flex: 0 0 auto;
}
.avatar-sm { width: 32px; height: 32px; font-size: .78rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.3rem; }
.sidebar-user .avatar { background: rgba(255,255,255,.12); color: #fff; }

/* ============================================================
   Overview
   ============================================================ */
.flow-strip {
    display: grid; grid-template-columns: repeat(4, 1fr); background: var(--ggg-surface);
    border: 1px solid var(--ggg-border); border-radius: var(--radius); overflow: hidden; margin-bottom: 24px;
}
.flow-cell { padding: 18px 20px; position: relative; color: inherit; text-decoration: none; }
.flow-cell + .flow-cell { border-left: 1px solid var(--ggg-border); }
.flow-cell + .flow-cell::before {
    content: ""; position: absolute; left: -7px; top: 50%; width: 12px; height: 12px; margin-top: -6px;
    background: var(--ggg-surface); border-top: 1px solid var(--ggg-border); border-right: 1px solid var(--ggg-border); transform: rotate(45deg);
}
.flow-cell:hover { background: #faf7f2; color: inherit; }
.flow-num { font-size: 2rem; font-weight: 600; color: var(--ggg-primary); line-height: 1.1; font-variant-numeric: tabular-nums; }
.flow-label { font-weight: 500; }
.flow-sub { font-size: .8rem; color: var(--ggg-muted); }
@media (max-width: 767.98px) {
    .flow-strip { grid-template-columns: 1fr 1fr; }
    .flow-cell:nth-child(3) { border-left: 0; border-top: 1px solid var(--ggg-border); }
    .flow-cell:nth-child(4) { border-top: 1px solid var(--ggg-border); }
    .flow-cell + .flow-cell::before { display: none; }
}

.task-list { list-style: none; margin: 0; padding: 0; }
.task-list li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #edf1f3; }
.task-list li:last-child { border-bottom: 0; }
.task-main { min-width: 0; flex: 1; }
.task-main a { font-weight: 600; color: var(--ggg-text); text-decoration: none; }
.task-main a:hover { color: var(--ggg-accent-dark); }
.task-sub { font-size: .8rem; color: var(--ggg-muted); }
.team-tag { font-size: .72rem; font-weight: 600; padding: .15em .55em; border-radius: 4px; background: #eef2f5; color: var(--ggg-primary); }
.team-hr { background: #f1e9fb; color: #5b2a91; }
.team-it { background: var(--prog-bg); color: var(--prog); }
.team-finance { background: var(--ok-bg); color: var(--ok); }
.team-employee { background: var(--warn-bg); color: var(--warn); }
.empty-state { padding: 28px 16px; text-align: center; color: var(--ggg-muted); }
.empty-state i { font-size: 1.6rem; display: block; margin-bottom: 6px; color: #a9b8c2; }

/* ============================================================
   Pipeline - the signature element
   ============================================================ */
.pipeline {
    --line: #cfd9df; --flow: var(--ggg-accent);
    list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n), 1fr); position: relative;
}
.pipe-step { position: relative; text-align: center; min-width: 0; }
.pipe-step > a { display: block; color: inherit; text-decoration: none; padding: 0 4px 6px; border-radius: var(--radius-sm); }
.pipe-step > a:hover .pipe-title { color: var(--ggg-accent-dark); }
/* the pipe between nodes */
.pipe-step::before {
    content: ""; position: absolute; top: 17px; left: -50%; width: 100%; height: 6px; background: var(--line); border-radius: 3px; z-index: 0;
}
.pipe-step:first-child::before { display: none; }
.pipe-step.is-completed::before, .pipe-step.is-pending::before { background: var(--flow); }
.pipe-node {
    position: relative; z-index: 1; width: 40px; height: 40px; margin: 0 auto 8px; border-radius: 50%;
    background: #fff; border: 3px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
}
.pipe-step.is-completed .pipe-node { background: var(--flow); border-color: var(--flow); color: #fff; }
.pipe-step.is-pending .pipe-node { border-color: var(--flow); box-shadow: 0 0 0 5px rgba(140,106,60,.18); }
.pipe-step.is-pending .pipe-node::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--flow); }
.pipe-step.is-skipped .pipe-node { border-style: dashed; color: var(--ggg-muted); }
.pipe-step.is-selected .pipe-title { text-decoration: underline; text-decoration-color: var(--ggg-accent); text-underline-offset: 4px; text-decoration-thickness: 2px; }
.pipe-team { display: block; font-size: .72rem; color: var(--ggg-muted); }
.pipe-title { display: block; font-weight: 600; font-size: .88rem; line-height: 1.25; }
.pipe-meta { display: block; font-size: .75rem; color: var(--ggg-muted); margin-top: 2px; }
.pipe-step.is-pending .pipe-meta { color: var(--ggg-accent-dark); font-weight: 500; }
@media (prefers-reduced-motion: no-preference) {
    .pipe-step.is-pending .pipe-node { animation: valve 2.4s ease-in-out infinite; }
    @keyframes valve { 0%,100% { box-shadow: 0 0 0 4px rgba(140,106,60,.18); } 50% { box-shadow: 0 0 0 8px rgba(140,106,60,.06); } }
}
/* compact version for tables */
.pipeline-compact { width: 120px; }
.pipeline-compact .pipe-step::before { top: 6px; height: 3px; }
.pipeline-compact .pipe-node { width: 15px; height: 15px; border-width: 2px; margin: 0 auto; font-size: .5rem; }
.pipeline-compact .pipe-step.is-pending .pipe-node { box-shadow: 0 0 0 3px rgba(140,106,60,.2); animation: none; }
.pipeline-compact .pipe-step.is-pending .pipe-node::after { width: 5px; height: 5px; }
@media (max-width: 767.98px) {
    .pipeline:not(.pipeline-compact) { grid-template-columns: 1fr; gap: 6px; }
    .pipeline:not(.pipeline-compact) .pipe-step { text-align: left; }
    .pipeline:not(.pipeline-compact) .pipe-step > a { display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; padding: 0; }
    .pipeline:not(.pipeline-compact) .pipe-step:not(:has(> a)) { display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; }
    .pipeline:not(.pipeline-compact) .pipe-step::before { left: 17px; top: -12px; width: 6px; height: 16px; }
    .topbar-title { font-size: 1rem; }
    .pipeline:not(.pipeline-compact) .pipe-node { grid-row: span 3; margin: 0; }
}

/* ---------- Process page ---------- */
.process-hero { background: var(--ggg-surface); border: 1px solid var(--ggg-border); border-radius: var(--radius); padding: 20px 22px 18px; margin-bottom: 22px; }
.process-who { display: flex; gap: 14px; align-items: center; margin-bottom: 22px; flex-wrap: wrap; }
.process-who h2 { font-size: 1.3rem; margin: 0; font-weight: 600; }
.process-who .meta { color: var(--ggg-muted); font-size: .88rem; }
.process-kind { font-size: .78rem; font-weight: 600; color: var(--ggg-accent-dark); }
.stage-panel .card-header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stage-panel .stage-icon { width: 34px; height: 34px; border-radius: 8px; background: var(--ggg-accent-soft); color: var(--ggg-accent-dark); display: inline-flex; align-items: center; justify-content: center; }
.stage-intro { color: var(--ggg-muted); font-size: .88rem; margin-bottom: 1rem; max-width: 75ch; }
.blockers { background: var(--warn-bg); border-left: 3px solid #e0a43a; border-radius: var(--radius-sm); padding: 10px 14px; font-size: .86rem; color: #6b4600; }
.blockers ul { margin: 4px 0 0; padding-left: 18px; }
.stage-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; border-top: 1px solid var(--ggg-border); padding-top: 16px; margin-top: 20px; }
.completed-note { font-size: .85rem; color: var(--ok); }

/* ---------- Checklist ---------- */
.checklist-head { display: flex; justify-content: space-between; align-items: baseline; margin-top: 1.25rem; font-weight: 600; color: var(--ggg-primary); }
.checklist-count { font-size: .8rem; font-weight: 500; color: var(--ggg-muted); }
.checklist-bar { height: 4px; background: #e7edf0; border-radius: 2px; margin: 6px 0 10px; overflow: hidden; }
.checklist-bar span { display: block; height: 100%; background: var(--ggg-accent); }
.checklist { list-style: none; margin: 0; padding: 0; border: 1px solid var(--ggg-border); border-radius: var(--radius-sm); }
.cl-item { display: grid; grid-template-columns: 1fr minmax(260px, 46%); gap: 12px; align-items: center; padding: 10px 12px; border-bottom: 1px solid #edf1f3; }
.cl-item:last-child { border-bottom: 0; }
.cl-item.cl-done .cl-label { color: var(--ggg-muted); }
.cl-by { display: block; font-size: .74rem; color: var(--ggg-muted); }
.cl-controls { display: flex; gap: 8px; align-items: center; }
.cl-note { flex: 1; min-width: 0; }
.cl-state { font-size: .8rem; font-weight: 600; }
.cl-done .cl-state { color: var(--ok); }
.cl-open .cl-state { color: var(--warn); }
.cl-na .cl-state { color: var(--ggg-muted); }
.cl-note-ro { font-size: .8rem; color: var(--ggg-muted); }
.seg { display: inline-flex; border: 1px solid #cdd7dd; border-radius: var(--radius-sm); overflow: hidden; flex: 0 0 auto; }
.seg-input { position: absolute; opacity: 0; pointer-events: none; }
.seg-label { padding: 3px 10px; font-size: .78rem; cursor: pointer; margin: 0; color: var(--ggg-muted); background: #fff; user-select: none; }
.seg-label + .seg-input + .seg-label { border-left: 1px solid #cdd7dd; }
.seg-input:focus-visible + .seg-label { outline: 2px solid var(--ggg-accent); outline-offset: -2px; }
.seg-input:checked + .seg-open { background: #fff3dc; color: var(--warn); font-weight: 600; }
.seg-input:checked + .seg-done { background: var(--ggg-accent); color: #fff; font-weight: 600; }
.seg-input:checked + .seg-na { background: #e9eef1; color: var(--ggg-text); font-weight: 600; }
@media (max-width: 767.98px) { .cl-item { grid-template-columns: 1fr; } }

/* ---------- Registers (assets / access) ---------- */
.register { border: 1px solid var(--ggg-border); border-radius: var(--radius-sm); padding: 12px; margin-top: 1rem; }
.register-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.register-head h6 { margin: 0; font-weight: 600; color: var(--ggg-primary); }
.register-form { background: #f7fafb; border: 1px solid #e3eaee; border-radius: var(--radius-sm); padding: 12px; margin-bottom: 10px; }
.register-form .row + .col-12, .register-form > .col-12 { margin-top: 10px; }
.register-table { margin: 0; font-size: .86rem; }
.register-table thead th { color: var(--ggg-muted); font-weight: 600; font-size: .75rem; border-bottom-color: var(--ggg-border); }
.remark-row td { font-size: .8rem; color: var(--ggg-muted); border-top: 0; padding-top: 0; }

/* ---------- Documents & activity ---------- */
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid #edf1f3; }
.doc-list li:last-child { border-bottom: 0; }
.doc-list i { font-size: 1.25rem; color: var(--ggg-accent-dark); }
.doc-meta { min-width: 0; }
.doc-meta a { font-weight: 500; display: block; }
.doc-meta span { font-size: .76rem; color: var(--ggg-muted); word-break: break-all; }
.activity { list-style: none; margin: 0; padding: 0; max-height: 380px; overflow-y: auto; }
.activity li { display: grid; grid-template-columns: 88px 1fr; column-gap: 10px; padding: 7px 0; border-bottom: 1px solid #f0f3f5; font-size: .83rem; }
.act-when { color: var(--ggg-muted); font-size: .76rem; font-variant-numeric: tabular-nums; }
.act-who { grid-column: 2; color: var(--ggg-muted); font-size: .74rem; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: .88rem; margin: 0; }
.kv dt { color: var(--ggg-muted); font-weight: 400; }
.kv dd { margin: 0; word-break: break-word; }

/* ---------- Employee list / profile ---------- */
.emp-cell { display: flex; align-items: center; gap: 10px; }
.emp-cell a { font-weight: 600; color: var(--ggg-text); text-decoration: none; }
.emp-cell a:hover { color: var(--ggg-accent-dark); }
.emp-cell small { display: block; color: var(--ggg-muted); }
.profile-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; background: var(--ggg-surface); border: 1px solid var(--ggg-border); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 18px; }
.profile-head h2 { font-size: 1.35rem; margin: 0; font-weight: 600; }
.profile-head .meta { color: var(--ggg-muted); font-size: .88rem; }
.profile-head .head-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.nav-tabs-ggg { border-bottom: 1px solid var(--ggg-border); margin-bottom: 18px; gap: 4px; flex-wrap: nowrap; overflow-x: auto; }
.nav-tabs-ggg .nav-link { border: 0; border-bottom: 2px solid transparent; color: var(--ggg-muted); font-weight: 500; white-space: nowrap; padding: .6rem .9rem; }
.nav-tabs-ggg .nav-link.active { color: var(--ggg-primary); border-bottom-color: var(--ggg-accent); background: transparent; }
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-bar .form-select, .filter-bar .form-control { width: auto; min-width: 160px; }
.filter-bar .grow { flex: 1; min-width: 200px; }
.dropdown-menu { font-size: .88rem; border-color: var(--ggg-border); }
.dropdown-item i { width: 20px; color: var(--ggg-muted); }
.warn-text { color: var(--warn); }
.bad-text { color: var(--bad); }

/* ---------- Joiner self-service page ---------- */
.onboard-hero { background: var(--ggg-primary); color: #fff; padding: 36px 0 70px; }
.onboard-hero h1 { font-size: 1.75rem; font-weight: 600; margin-bottom: .4rem; }
.onboard-hero p { opacity: .85; max-width: 60ch; margin: 0; }
.onboard-body { margin-top: -46px; }
.upload-row { display: grid; grid-template-columns: 1fr minmax(220px, 50%); gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid #edf1f3; }
.upload-row:last-child { border-bottom: 0; }
.upload-done { font-size: .8rem; color: var(--ok); }
@media (max-width: 767.98px) { .upload-row { grid-template-columns: 1fr; } }

/* ---------- Approval timeline (hiring requests) ---------- */
.approval-step { display: flex; gap: 12px; padding: 8px; margin: 0 -8px 4px; border-radius: 8px; position: relative; }
.approval-step:not(:last-child)::before { content: ""; position: absolute; left: 18px; top: 32px; bottom: -6px; width: 2px; background: var(--ggg-border); }
.approval-step.approval-approved:not(:last-child)::before { background: #198754; }
.approval-icon { font-size: 1.35rem; line-height: 1; flex: 0 0 22px; position: relative; z-index: 1; }
.approval-step.approval-pending { background: #fff8e6; }
.pending-with { font-size: .8rem; }

/* ---------- Print / Save-as-PDF ---------- */
@media print {
    .no-print, .navbar-ggg, .sidebar-admin, .topbar, footer.site-footer, .btn, nav, .stage-actions, .register-form, .collapse:not(.show) { display: none !important; }
    .admin-content, body, .container, .container-fluid { margin: 0 !important; padding: 0 !important; width: 100% !important; background: #fff !important; }
    .col-lg-8, .col-lg-4, .col-lg-7, .col-lg-5 { flex: 0 0 100% !important; max-width: 100% !important; }
    .card-ggg, .card, .process-hero, .profile-head { border: none !important; box-shadow: none !important; }
    .pipe-step.is-pending .pipe-node { animation: none; }
    .print-letterhead { display: flex !important; align-items: center; gap: 14px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 2px solid var(--ggg-primary); }
}
.print-letterhead { display: none; }

/* ============================================================
   Leave, requests & Employee Self-Service
   ============================================================ */
.team-manager { background: #fdeee4; color: #9a3d0b; }
.mini-stat { display: flex; gap: 14px; align-items: center; padding: 14px 16px; background: var(--ggg-surface); border: 1px solid var(--ggg-border);
    border-radius: var(--radius); color: inherit; text-decoration: none; height: 100%; }
.mini-stat:hover { border-color: var(--ggg-accent); color: inherit; }
.mini-stat i { font-size: 1.4rem; color: var(--ggg-accent-dark); }
.mini-stat strong { font-size: 1.35rem; color: var(--ggg-primary); font-variant-numeric: tabular-nums; margin-right: 4px; }
.mini-stat span { display: block; font-size: .78rem; color: var(--ggg-muted); }

.bal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.bal-compact { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.bal-card { border: 1px solid var(--ggg-border); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--ggg-surface); }
.bal-name { font-size: .8rem; color: var(--ggg-muted); font-weight: 500; }
.bal-num { font-size: 1.7rem; font-weight: 600; color: var(--ggg-primary); line-height: 1.15; font-variant-numeric: tabular-nums; }
.bal-num span { font-size: .78rem; font-weight: 500; color: var(--ggg-muted); }
.bal-compact .bal-num { font-size: 1.3rem; }
.bal-bar { height: 4px; background: #e7edf0; border-radius: 2px; margin: 6px 0; overflow: hidden; }
.bal-bar span { display: block; height: 100%; background: var(--ggg-accent); }
.bal-sub { font-size: .74rem; color: var(--ggg-muted); }

.ess-body { background: var(--ggg-bg); }
.ess-bar { background: var(--ggg-primary); color: #fff; }
.ess-bar .ess-wrap { display: flex; align-items: center; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.ess-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 600; }
.ess-brand:hover { color: #fff; }
.ess-signout { margin-left: auto; color: rgba(255,255,255,.85); text-decoration: none; font-size: .88rem; }
.ess-signout:hover { color: #fff; }
.ess-wrap { max-width: 760px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.ess-main { padding-top: 24px; padding-bottom: 32px; }
.ess-hero { text-align: center; padding: 18px 0 22px; }
.ess-hero h1 { font-size: 1.6rem; font-weight: 600; color: var(--ggg-primary); }
.ess-hero p { color: var(--ggg-muted); max-width: 46ch; margin: 0 auto; }
.ess-card { max-width: 460px; margin: 0 auto; }
.ess-big-icon { font-size: 2.4rem; color: var(--ggg-accent); }
.ess-hello { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.ess-hello h1 { font-size: 1.35rem; font-weight: 600; margin: 0; }
.ess-h1 { font-size: 1.35rem; font-weight: 600; color: var(--ggg-primary); margin-bottom: 14px; }
.ess-h2 { font-size: .95rem; font-weight: 600; color: var(--ggg-primary); margin-bottom: 10px; }
.ess-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 26px; }
.ess-action { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
    padding: 16px; border-radius: var(--radius); background: var(--ggg-accent); color: #fff; text-decoration: none; }
.ess-action + .ess-action { background: var(--ggg-primary); }
.ess-action:hover { color: #fff; filter: brightness(1.06); }
.ess-action i { grid-row: span 2; font-size: 1.7rem; }
.ess-action span { font-weight: 600; }
.ess-action small { opacity: .85; font-size: .78rem; }
.ess-list { list-style: none; margin: 0; padding: 0; }
.ess-list li { display: flex; gap: 12px; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #edf1f3; }
.ess-list li:last-child { border-bottom: 0; }
.ess-list-main { min-width: 0; }
.ess-daycount { margin-top: 10px; font-weight: 600; color: var(--ggg-accent-dark); min-height: 1.4em; }
.seg-lg { display: flex; }
.seg-lg .seg-label { padding: 8px 10px; font-size: .88rem; }
.ess-type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ess-type { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid #cdd7dd; border-radius: var(--radius-sm); cursor: pointer; margin: 0; background: #fff; height: 100%; }
.ess-type i { font-size: 1.25rem; color: var(--ggg-accent-dark); }
.ess-type span { font-size: .86rem; font-weight: 500; }
.seg-input:checked + .ess-type { border-color: var(--ggg-accent); box-shadow: 0 0 0 2px rgba(140,106,60,.25); background: var(--ggg-accent-soft); }
.seg-input:focus-visible + .ess-type { outline: 2px solid var(--ggg-accent); outline-offset: 2px; }
@media (max-width: 575.98px) { .ess-actions { grid-template-columns: 1fr; } }
.ess-brand .navbar-logo-chip img, .onboard-hero .navbar-logo-chip img { height: 28px; width: auto; }
.ess-brand span:last-child, .ess-signout { white-space: nowrap; }
@media (max-width: 400px) { .ess-brand span:last-child { display: none; } }
.ess-quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: -10px 0 24px; }
.ess-quick a { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 20px; background: var(--ggg-surface);
    border: 1px solid var(--ggg-border); color: var(--ggg-primary); text-decoration: none; font-size: .84rem; font-weight: 500; }
.ess-quick a:hover { border-color: var(--ggg-accent); color: var(--ggg-accent-dark); }
.ess-quick i { color: var(--ggg-accent-dark); }

/* ============================================================
   Public home page
   ============================================================ */
.navbar-ggg .nav-link.active { color: #fff !important; box-shadow: inset 0 -2px 0 var(--ggg-accent); }
.navbar-ggg .nav-cta { border: 1px solid rgba(255,255,255,.35); border-radius: var(--radius-sm); margin-left: 6px; }
.navbar-ggg .nav-cta:hover { background: rgba(255,255,255,.08); }
.home-hero { background: var(--ggg-primary); color: #fff; padding: 64px 0 72px; }
.home-eyebrow { font-size: .85rem; color: #e3cfa8; font-weight: 500; margin-bottom: 12px; }
.home-hero h1 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); font-weight: 600; line-height: 1.15; max-width: 18ch; letter-spacing: -.01em; }
.home-hero .lead { color: rgba(255,255,255,.82); max-width: 54ch; font-size: 1.08rem; margin-top: 16px; }
.btn-hero-outline { color: #fff; border: 1px solid rgba(255,255,255,.5); background: transparent; }
.btn-hero-outline:hover { background: #fff; color: var(--ggg-primary); }
.home-panel { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); padding: 22px 18px 18px; }
.home-panel-title { font-size: .85rem; color: rgba(255,255,255,.7); margin-bottom: 18px; }
.home-pipeline { --line: rgba(255,255,255,.22); }
.home-pipeline .pipe-node { background: var(--ggg-primary); }
.home-pipeline .pipe-title { color: #fff; }
.home-pipeline .pipe-meta { color: rgba(255,255,255,.6); }
.home-pipeline .pipe-step.is-pending .pipe-meta { color: #e3cfa8; }
.home-section { padding-top: 56px; padding-bottom: 8px; }
.home-h2 { font-size: 1.35rem; font-weight: 600; color: var(--ggg-primary); margin-bottom: 18px; }
.home-card { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 22px; background: var(--ggg-surface); border: 1px solid var(--ggg-border);
    border-radius: var(--radius); color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
.home-card:hover { border-color: var(--ggg-accent); color: inherit; transform: translateY(-2px); }
.home-card-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--ggg-accent-soft); color: var(--ggg-accent-dark);
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.home-card-title { font-weight: 600; font-size: 1.05rem; color: var(--ggg-primary); }
.home-card-text { color: var(--ggg-muted); font-size: .9rem; flex: 1; }
.home-card-go { font-size: .88rem; font-weight: 500; color: var(--ggg-accent-dark); }
.home-band { background: var(--ggg-surface); border-top: 1px solid var(--ggg-border); border-bottom: 1px solid var(--ggg-border); padding: 40px 0; margin-top: 56px; }
.home-approvals .pipe-node { font-size: .95rem; font-weight: 600; }
.home-fact { display: grid; grid-template-columns: 30px 1fr; column-gap: 10px; padding: 14px 16px; background: var(--ggg-surface); border: 1px solid var(--ggg-border); border-radius: var(--radius-sm); height: 100%; }
.home-fact i { grid-row: span 2; font-size: 1.3rem; color: var(--ggg-accent-dark); }
.home-fact strong { font-size: .95rem; color: var(--ggg-primary); }
.home-fact span { font-size: .82rem; color: var(--ggg-muted); }
@media (prefers-reduced-motion: reduce) { .home-card { transition: none; } .home-card:hover { transform: none; } }
@media (max-width: 991.98px) { .home-hero { padding: 40px 0 48px; } .navbar-ggg .nav-cta { margin-left: 0; display: inline-block; } }
.navbar-ggg .navbar-logo-chip img { height: 38px; width: auto; }
.navbar-ggg .navbar-brand { display: flex; align-items: center; gap: 10px; }
.navbar-ggg .navbar-brand small { display: inline; font-size: .8rem; opacity: .8; }
.home-hero h1 { max-width: 20ch; }

/* ---------- ESS notification bell ---------- */
.ess-bell-wrap { position: relative; }
.ess-bell { position: relative; background: transparent; border: 0; color: #fff; font-size: 1.25rem; padding: 4px 8px; border-radius: var(--radius-sm); line-height: 1; }
.ess-bell:hover, .ess-bell[aria-expanded="true"] { background: rgba(255,255,255,.1); }
.ess-bell-badge { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #e5484d; color: #fff;
    font-size: .68rem; font-weight: 700; line-height: 18px; text-align: center; border: 2px solid var(--ggg-primary); }
.ess-notes { width: min(360px, calc(100vw - 24px)); padding: 0; overflow: hidden; border-radius: var(--radius); box-shadow: 0 12px 32px rgba(28,25,22,.18); }
.ess-notes-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--ggg-border); }
.ess-notes-empty { padding: 26px 18px; text-align: center; color: var(--ggg-muted); font-size: .88rem; }
.ess-notes-empty i { display: block; font-size: 1.5rem; margin-bottom: 6px; color: #a9b8c2; }
.ess-notes .ess-note { max-height: none; }
.ess-note { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #edf1f3; color: inherit; text-decoration: none; position: relative; }
.ess-note:hover { background: #faf7f2; color: inherit; }
.ess-note.is-unread { background: #faf5ec; }
.ess-note.is-unread::after { content: ""; position: absolute; right: 14px; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--ggg-accent); }
.ess-note i { font-size: 1.05rem; margin-top: 1px; }
.ess-note .tone-ok { color: var(--ok); } .ess-note .tone-bad { color: var(--bad); } .ess-note .tone-warn { color: #c98500; } .ess-note .tone-info { color: var(--prog); }
.ess-note-title { display: block; font-weight: 600; font-size: .88rem; padding-right: 14px; }
.ess-note-body { display: block; font-size: .8rem; color: var(--ggg-muted); }
.ess-note-time { display: block; font-size: .74rem; color: #8a99a6; margin-top: 2px; }
.card .ess-note:last-child { border-bottom: 0; }
.ess-notes-all { display: block; text-align: center; padding: 10px; font-size: .85rem; font-weight: 500; text-decoration: none; background: #f8fafb; }
.row-disabled td { background: #fafbfc; }
.row-disabled input[type=text], .row-disabled input[type=email] { color: var(--ggg-muted); }
.form-switch .form-check-input:checked { background-color: var(--ggg-accent); border-color: var(--ggg-accent); }

/* ---------- Staff bell (admin) ---------- */
.staff-bell-wrap { margin-left: 8px; }
.staff-bell { position: relative; background: transparent; border: 1px solid var(--ggg-border); color: var(--ggg-primary); font-size: 1.1rem; width: 38px; height: 34px;
    border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; }
.staff-bell:hover, .staff-bell[aria-expanded="true"] { background: var(--ggg-accent-soft); }
.staff-bell .ess-bell-badge { border-color: #fff; }
.staff-note-list { max-height: 420px; overflow-y: auto; }
.staff-toast { width: 360px; max-width: calc(100vw - 24px); border: 1px solid var(--ggg-border); box-shadow: 0 10px 28px rgba(28,25,22,.18); }
.staff-toast .toast-body { display: flex; align-items: flex-start; padding: 0; }
.staff-toast .ess-note { flex: 1; border: 0; border-left: 3px solid var(--ggg-accent); }
.staff-toast .btn-close { margin: 12px 10px 0 0; font-size: .7rem; }

/* ---------- Subsidiaries ---------- */
.sub-badge { display: inline-block; font-size: .72rem; font-weight: 600; padding: .12em .5em; border-radius: 4px; background: #e7eef6; color: #2b4f75; white-space: nowrap; }
.sub-switch { margin-left: 4px; }
.sub-switch-btn { border: 1px solid var(--ggg-border); background: #fff; color: var(--ggg-primary); font-size: .82rem; max-width: 260px; display: inline-flex; align-items: center; gap: 6px; }
.sub-switch-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-switch-btn.is-filtered { background: var(--ggg-accent-soft); border-color: var(--ggg-accent); color: var(--ggg-accent-dark); font-weight: 600; }
.sub-switch-menu { max-height: 70vh; overflow-y: auto; }
.wf-level { display: grid; grid-template-columns: 30px 1fr 1.4fr 32px; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--ggg-border); }
.wf-level.wf-fixed { grid-template-columns: 30px 1fr; }
.wf-num { width: 26px; height: 26px; border-radius: 50%; background: var(--ggg-accent); color: #fff; font-size: .78rem; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 767.98px) { .wf-level { grid-template-columns: 30px 1fr 32px; } .wf-level select { grid-column: 2; } .sub-switch-btn span { max-width: 110px; } }

/* ---------- Performance ---------- */
.perf-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .78rem; color: var(--ggg-muted); padding: 8px 10px; background: #f6f9fa; border-radius: var(--radius-sm); }
.perf-legend strong { color: var(--ggg-primary); }
.perf-item { border: 1px solid var(--ggg-border); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 10px; }
.perf-item-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.perf-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.perf-col { background: #f9fbfc; border-radius: var(--radius-sm); padding: 10px; }
.perf-col-title { font-size: .72rem; font-weight: 600; color: var(--ggg-muted); margin-bottom: 6px; }
.perf-scale { display: inline-flex; border: 1px solid #cdd7dd; border-radius: var(--radius-sm); overflow: hidden; }
.perf-scale label { width: 38px; text-align: center; padding: 5px 0; font-size: .85rem; font-weight: 600; color: var(--ggg-muted); background: #fff; cursor: pointer; margin: 0; }
.perf-scale label + input + label { border-left: 1px solid #cdd7dd; }
.perf-scale .seg-input:checked + label { background: var(--ggg-accent); color: #fff; }
.perf-scale .seg-input:focus-visible + label { outline: 2px solid var(--ggg-accent); outline-offset: -2px; }
.perf-score { font-weight: 700; color: var(--ggg-primary); font-size: 1.05rem; }
.perf-score small { font-weight: 500; color: var(--ggg-muted); font-size: .75rem; }
.perf-big { font-size: 2rem; font-weight: 700; color: var(--ggg-primary); line-height: 1; }
.perf-big small { font-size: .9rem; color: var(--ggg-muted); font-weight: 500; }
.perf-bar { display: inline-block; width: 70px; height: 6px; background: #e7edf0; border-radius: 3px; overflow: hidden; vertical-align: middle; margin-right: 6px; }
.perf-bar span { display: block; height: 100%; background: var(--ggg-accent); }
.perf-dist { display: grid; grid-template-columns: 170px 1fr 34px; gap: 10px; align-items: center; margin-bottom: 8px; font-size: .85rem; }
.perf-dist-bar { height: 10px; background: #eef2f4; border-radius: 5px; overflow: hidden; }
.perf-dist-bar span { display: block; height: 100%; border-radius: 5px; }
.perf-dist-bar .st-ok { background: var(--ok); } .perf-dist-bar .st-progress { background: var(--prog); } .perf-dist-bar .st-warn { background: #d99a2b; } .perf-dist-bar .st-bad { background: var(--bad); }
.perf-trend { display: flex; gap: 14px; align-items: flex-end; height: 170px; }
.perf-trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; max-width: 90px; }
.perf-trend-bar { flex: 1; width: 28px; background: #eef2f4; border-radius: 4px; display: flex; align-items: flex-end; overflow: hidden; }
.perf-trend-bar span { display: block; width: 100%; background: var(--ggg-accent); border-radius: 4px; }
.perf-trend-val { font-size: .8rem; font-weight: 600; }
.perf-trend-lbl { font-size: .7rem; color: var(--ggg-muted); text-align: center; margin-top: 4px; line-height: 1.2; }
.perf-notes { list-style: none; margin: 12px 0 0; padding: 0; }
.perf-note { border-left: 3px solid var(--ggg-border); padding: 8px 10px; margin-bottom: 8px; background: #fafbfc; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.perf-note-commendation { border-left-color: var(--ok); } .perf-note-warning { border-left-color: var(--bad); }
@media (max-width: 575.98px) { .perf-dist { grid-template-columns: 110px 1fr 30px; } .perf-scale label { width: 34px; } }

/* ============================================================
 * v12 - Time & attendance, geofencing, calendar, reporting lines
 * ============================================================ */
.att-strip { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 12px; background: var(--ggg-surface);
    border: 1px solid var(--ggg-border); border-left: 4px solid var(--ggg-accent); border-radius: var(--radius); color: inherit; text-decoration: none; }
.att-strip:hover { border-color: var(--ggg-accent); color: inherit; }
.att-strip > i { font-size: 1.6rem; color: var(--ggg-accent-dark); }
.att-strip strong { display: block; color: var(--ggg-primary); }
.att-strip small { display: block; color: var(--ggg-muted); font-size: .8rem; }
.att-strip-team { border-left-color: var(--ggg-primary); }
.att-strip-team > i { color: var(--ggg-primary); }
.att-strip + .ess-actions { margin-top: 14px; }

.punch-clock { font-size: 2.8rem; font-weight: 600; color: var(--ggg-primary); font-variant-numeric: tabular-nums; letter-spacing: .02em; line-height: 1.1; margin: 6px 0; }
.punch-btn { min-width: 200px; padding: 12px 28px; font-weight: 600; }
.att-links { grid-template-columns: 1fr 1fr !important; }
.att-links .ess-action, .att-links .ess-action + .ess-action { background: var(--ggg-surface); color: var(--ggg-primary); border: 1px solid var(--ggg-border); padding: 12px 14px; }
.att-links .ess-action:hover { border-color: var(--ggg-accent); color: var(--ggg-primary); filter: none; }
.att-links .ess-action i { color: var(--ggg-accent-dark); font-size: 1.35rem; }
.att-links .ess-action small { color: var(--ggg-muted); opacity: 1; }

.att-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.att-tiles > a, .att-tiles > div { display: block; padding: 12px 14px; background: var(--ggg-surface); border: 1px solid var(--ggg-border);
    border-radius: var(--radius); color: inherit; text-decoration: none; }
.att-tiles > a:hover { border-color: var(--ggg-accent); color: inherit; }
.att-tiles strong { display: block; font-size: 1.5rem; color: var(--ggg-primary); font-variant-numeric: tabular-nums; line-height: 1.15; }
.att-tiles span { font-size: .78rem; color: var(--ggg-muted); }
.att-tiles .is-on { border-color: var(--ggg-accent); box-shadow: inset 0 0 0 1px var(--ggg-accent); background: var(--ggg-accent-soft); }
.att-tiles .is-warn strong { color: var(--warn); }
.att-tiles .is-bad strong { color: var(--bad); }

.decide-form { min-width: 260px; }
@media (min-width: 768px) { .decide-form { max-width: 320px; } }

.att-map { height: 460px; border-radius: var(--radius-sm); border: 1px solid var(--ggg-border); z-index: 0; }
@media (max-width: 575.98px) { .att-map { height: 340px; } }
.att-scroll { max-height: 600px; overflow-y: auto; }
.att-scroll thead th { position: sticky; top: 0; background: var(--ggg-surface); z-index: 1; }
.att-scroll-x { overflow-x: auto; }

.att-cal-wrap { overflow-x: auto; }
.att-cal { display: grid; grid-template-columns: repeat(7, minmax(110px, 1fr)); min-width: 780px; }
.att-cal > div { min-height: 104px; padding: 6px; border-right: 1px solid var(--ggg-border); border-bottom: 1px solid var(--ggg-border); }
.att-cal > div:nth-child(7n) { border-right: 0; }
.att-cal .dow { min-height: 0; padding: 8px 6px; font-size: .75rem; font-weight: 600; color: var(--ggg-muted); text-transform: uppercase; background: #f7f9fa; }
.att-cal .out { background: #fafbfc; }
.att-cal .wk { background: #f7f9fa; }
.att-cal .is-today { box-shadow: inset 0 0 0 2px var(--ggg-accent); }
.att-cal .num { display: block; font-size: .8rem; font-weight: 600; color: var(--ggg-muted); margin-bottom: 3px; }
.att-cal .ev { display: block; font-size: .72rem; line-height: 1.3; padding: 2px 5px; margin-bottom: 2px; border-radius: 4px; background: var(--prog-bg); color: var(--prog);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-cal .ev.wfh { background: var(--ggg-accent-soft); color: var(--ggg-accent-dark); }
.att-cal .ev.hol { background: var(--warn-bg); color: var(--warn); font-weight: 600; }
.att-cal .ev.more { background: transparent; color: var(--ggg-muted); }
.cal-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--prog-bg); border: 1px solid var(--prog); margin: 0 3px 0 8px; vertical-align: -1px; }
.cal-key.wfh { background: var(--ggg-accent-soft); border-color: var(--ggg-accent-dark); }
.cal-key.hol { background: var(--warn-bg); border-color: var(--warn); }

.org-tree, .org-tree ul { list-style: none; margin: 0; padding-left: 22px; position: relative; }
.org-tree { padding-left: 0; }
.org-tree ul::before { content: ""; position: absolute; left: 8px; top: 0; bottom: 14px; border-left: 1px solid var(--ggg-border); }
.org-tree li { position: relative; padding: 4px 0; }
.org-tree ul > li::before { content: ""; position: absolute; left: -14px; top: 22px; width: 12px; border-top: 1px solid var(--ggg-border); }
.org-node { display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border: 1px solid var(--ggg-border); border-radius: var(--radius); background: var(--ggg-surface); }
.org-node small { display: block; font-size: .75rem; color: var(--ggg-muted); }

/* v12.1 - module home, dashboards, organization */
.hrms-welcome h2 { font-size: 1.45rem; font-weight: 600; color: var(--ggg-primary); margin: 0 0 2px; }
.hrms-welcome p { color: var(--ggg-muted); margin: 0 0 18px; }
.hrms-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.hrms-tile { display: flex; flex-direction: column; padding: 20px; background: var(--ggg-surface); border: 1px solid var(--ggg-border); border-top: 4px solid var(--tile, var(--ggg-accent));
    border-radius: var(--radius); color: inherit; text-decoration: none; min-height: 190px; transition: box-shadow .15s, transform .15s; }
.hrms-tile:hover { color: inherit; box-shadow: 0 6px 18px rgba(11, 61, 89, .10); transform: translateY(-2px); }
.hrms-tile > i { font-size: 1.7rem; color: var(--tile, var(--ggg-accent)); margin-bottom: 8px; }
.hrms-tile h3 { font-size: 1.05rem; font-weight: 600; color: var(--ggg-primary); margin: 0 0 6px; }
.hrms-tile p { font-size: .84rem; color: var(--ggg-muted); margin: 0 0 12px; }
.hrms-stat { margin-top: auto; font-size: .8rem; font-weight: 600; color: var(--ggg-text); }
.m-core { --tile: #2b2622; } .m-hire { --tile: #6a4c93; } .m-leave { --tile: #5a4a8a; } .m-att { --tile: #8c6a3c; }
.m-geo { --tile: #1e7f4f; } .m-perf { --tile: #b0721a; } .m-svc { --tile: #66788a; }
.chart-box { position: relative; height: 260px; }
.hbar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: .84rem; }
.hbar-l { flex: 0 0 38%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-t { flex: 1; height: 8px; background: #edf1f3; border-radius: 4px; overflow: hidden; }
.hbar-t > span { display: block; height: 100%; background: var(--ggg-accent); border-radius: 4px; }
.hbar strong { min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; }
