/* ═══════════════════════════════════════════════════════════════════════════
 *  portal.css — the consultant portal's look
 * ═══════════════════════════════════════════════════════════════════════════
 *
 * Linked after theme-pro.css and const.css on every consultant page, so it wins on equal specificity.
 * Colours come from theme-pro's --pro-* tokens; the few that are not there are defined below.
 *
 * It restyles what the pages already use (.card, .table, .btn, .form-control, tabs, modals) and adds the
 * top bar (portal_nav.php). No page's markup or script depends on any rule here.
 */

:root {
  --pt-bg: #f5f7fb;
  --pt-card: #ffffff;
  --pt-line: #e6eaf2;
  --pt-ink: #172033;
  --pt-ink-2: #4b5a72;
  --pt-ink-3: #8090a6;
  --pt-accent: #2f5bea;
  --pt-accent-dark: #2447c4;
  --pt-accent-soft: #eaf0ff;
  --pt-top-bg: rgba(255, 255, 255, .92);
  --pt-hover: #f0f3fa;
  --pt-head: #f7f9fd;
  --pt-muted-bg: #f3f5fa;
  --pt-input-line: #d6dce9;
  --pt-line-strong: #c5d2f7;
  --pt-row-line: #eef1f7;
  --pt-row-hover: #f8faff;
  --pt-weekend: #f8f9fc;
  --pt-box: #fafbfe;
  --pt-pos: #1e7e34;
  --pt-pos-bg: #eef9f0;
  --pt-pos-line: #c9e9d0;
  --pt-neg: #b42318;
  --pt-neg-bg: #fdeceb;
  --pt-chip-bg: #f1f5ff;
  --pt-chip-line: #dbe5fb;
  --pt-warn: #b26a00;
  --pt-warn-bg: #fff5e6;
  --pt-we-bg: #f1eefd;
  --pt-we: #6a4fd8;
  --pt-leave-bg: #e6f6f3;
  --pt-leave: #0f766e;
  --pt-radius: 14px;
  --pt-shadow: 0 1px 2px rgba(23, 32, 51, .04), 0 4px 16px rgba(23, 32, 51, .05);
}

html, body { background: var(--pt-bg); color-scheme: light; }
body { background: var(--pt-bg); color: var(--pt-ink-2); font-family: 'Public Sans', -apple-system, 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing: antialiased; }

/* The old left menu is gone: nothing reserves room for it any more. */
.layout-page.pt-page { display: block; width: 100%; padding-left: 0 !important; min-height: 100vh; }
.layout-wrapper, .layout-container { width: 100%; }
.layout-menu-fixed .layout-page, .layout-wrapper.layout-content-navbar .layout-page { padding-left: 0 !important; }
.layout-container { display: block; }
.layout-overlay { display: none !important; }
.content-wrapper { background: transparent; min-width: 0; width: 100%; }
.container-xxl { box-sizing: border-box; max-width: 100%; }
.content-footer, .content-footer.footer { display: none; }
.content-backdrop { display: none; }

/* ── Top bar ─────────────────────────────────────────────────────────── */
.pt-top { position: sticky; top: 0; z-index: 1030; background: var(--pt-top-bg); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--pt-line); }
.pt-top-in { max-width: 1320px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 22px; }
.pt-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: 0 0 auto; }
.pt-mark { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, #2f5bea, #6d8cff); color: #fff; font-weight: 700; font-size: 1rem; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(47, 91, 234, .35); }
.pt-brand-name { font-weight: 700; color: var(--pt-ink); letter-spacing: -.01em; font-size: 1.02rem; }
.pt-links { display: flex; align-items: center; gap: 2px; flex: 1 1 auto; min-width: 0; }
.pt-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 10px; color: var(--pt-ink-2); font-size: .87rem; font-weight: 500; text-decoration: none; white-space: nowrap; transition: background .15s, color .15s; }
.pt-link i { font-size: 1.15rem; color: var(--pt-ink-3); transition: color .15s; }
.pt-link:hover { background: var(--pt-hover); color: var(--pt-ink); }
.pt-link.active { background: var(--pt-accent-soft); color: var(--pt-accent); font-weight: 600; }
.pt-link.active i { color: var(--pt-accent); }
.pt-burger { display: none; margin-left: auto; border: 0; background: transparent; font-size: 1.6rem; color: var(--pt-ink); padding: 4px 8px; }

.pt-user { position: relative; flex: 0 0 auto; margin-left: auto; }
.pt-user-btn { display: flex; align-items: center; gap: 9px; border: 1px solid var(--pt-line); background: var(--pt-card); border-radius: 999px; padding: 4px 12px 4px 4px; cursor: pointer; color: var(--pt-ink); font-size: .88rem; font-weight: 500; }
.pt-user-btn:hover { border-color: var(--pt-line-strong); }
.pt-user-btn i { color: var(--pt-ink-3); }
.pt-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--pt-accent-soft); color: var(--pt-accent); font-weight: 700; font-size: .78rem; display: grid; place-items: center; }
.pt-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--pt-card); border: 1px solid var(--pt-line); border-radius: 12px; box-shadow: 0 12px 32px rgba(23, 32, 51, .14); padding: 6px; display: none; z-index: 1040; }
.pt-menu.open { display: block; }
.pt-menu-who { padding: 10px 12px 10px; border-bottom: 1px solid var(--pt-line); margin-bottom: 4px; }
.pt-menu-who b { display: block; color: var(--pt-ink); font-size: .9rem; }
.pt-menu-who small { color: var(--pt-ink-3); }
.pt-menu a { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 8px; color: var(--pt-ink-2); font-size: .88rem; text-decoration: none; }
.pt-menu a:hover { background: var(--pt-hover); color: var(--pt-ink); }
.pt-menu a.out { color: var(--pt-neg); }
.pt-menu a.out:hover { background: var(--pt-neg-bg); }

/* ── Page heading ────────────────────────────────────────────────────── */
.pt-heading { max-width: 1240px; margin: 0 auto; padding: 28px 24px 4px; }
.pt-heading h1 { margin: 0; font-size: 1.55rem; font-weight: 700; color: var(--pt-ink); letter-spacing: -.02em; }
.pt-heading p { margin: 4px 0 0; color: var(--pt-ink-3); font-size: .92rem; }

/* ── Content area ────────────────────────────────────────────────────── */
.container-xxl.container-p-y, .container-xxl.flex-grow-1 { max-width: 1240px; padding-left: 24px; padding-right: 24px; }
.container-p-y:not(.container-fluid) { padding-top: 1.25rem !important; padding-bottom: 1.5rem !important; }

.card { background: var(--pt-card); border: 1px solid var(--pt-line); border-radius: var(--pt-radius); box-shadow: var(--pt-shadow); }
.card-header { background: transparent; border-bottom: 1px solid var(--pt-line); padding: 1rem 1.35rem; }
.card-header h5, .card-header .card-title, .card .card-title { font-size: 1.02rem; font-weight: 650; color: var(--pt-ink); margin: 0; }
.card > .card-body, .card .card-body { padding: 1.35rem; }
h1, h2, h3, h4, h5, h6 { color: var(--pt-ink); }

/* ── Forms ───────────────────────────────────────────────────────────── */
.form-label, .col-form-label { color: var(--pt-ink-2); font-weight: 600; font-size: .84rem; text-transform: none; letter-spacing: 0; margin-bottom: .35rem; }
.form-control, .form-select { border: 1px solid var(--pt-input-line); border-radius: 10px; padding: .55rem .8rem; color: var(--pt-ink); background-color: var(--pt-card); box-shadow: none; transition: border-color .15s, box-shadow .15s; }
.form-control:focus, .form-select:focus { border-color: var(--pt-accent); box-shadow: 0 0 0 3px rgba(47, 91, 234, .14); }
.form-control::placeholder { color: var(--pt-ink-3); }
.form-control:disabled, .form-control[readonly] { background: var(--pt-muted-bg); color: var(--pt-ink-3); }
.input-group-text { border-color: var(--pt-input-line); background: var(--pt-muted-bg); color: var(--pt-ink-3); border-radius: 10px; }
.form-check-input:checked { background-color: var(--pt-accent); border-color: var(--pt-accent); }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn { border-radius: 10px; font-weight: 600; font-size: .88rem; padding: .5rem 1rem; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--pt-accent); border-color: var(--pt-accent); color: #fff; box-shadow: 0 1px 2px rgba(47, 91, 234, .3); }
.btn-primary:hover, .btn-primary:focus { background: var(--pt-accent-dark); border-color: var(--pt-accent-dark); color: #fff; }
.btn-outline-primary { color: var(--pt-accent); border-color: var(--pt-line-strong); background: var(--pt-card); }
.btn-outline-primary:hover { background: var(--pt-accent-soft); color: var(--pt-accent-dark); border-color: var(--pt-line-strong); }
.btn-outline-secondary, .btn-secondary { border-color: var(--pt-input-line); color: var(--pt-ink-2); background: var(--pt-card); }
.btn-outline-secondary:hover, .btn-secondary:hover { background: var(--pt-hover); color: var(--pt-ink); border-color: var(--pt-line-strong); }
.btn-sm { padding: .32rem .7rem; font-size: .8rem; border-radius: 8px; }

/* ── Tables ──────────────────────────────────────────────────────────── */
.table { --bs-table-bg: transparent; color: var(--pt-ink-2); margin-bottom: 0; }
.table > thead > tr > th { background: var(--pt-head); color: var(--pt-ink-3); font-size: .72rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--pt-line); padding: .75rem 1rem; white-space: nowrap; }
.table > tbody > tr > td { padding: .8rem 1rem; border-color: var(--pt-row-line); vertical-align: middle; font-size: .88rem; }
.table-hover > tbody > tr:hover > * { background: var(--pt-row-hover); }
.table-responsive, .card-datatable { border-radius: 0 0 var(--pt-radius) var(--pt-radius); }
.dataTables_wrapper .dataTables_filter input, .dataTables_wrapper .dataTables_length select { border: 1px solid var(--pt-input-line); border-radius: 9px; padding: .35rem .6rem; }

/* ── Badges, alerts, tabs, modals ────────────────────────────────────── */
.badge { border-radius: 999px; font-weight: 600; font-size: .72rem; padding: .35em .75em; }
.alert { border-radius: 12px; border-width: 1px; }
.nav-tabs { border-bottom: 1px solid var(--pt-line); }
.nav-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; color: var(--pt-ink-3); font-weight: 600; padding: .65rem 1rem; }
.nav-tabs .nav-link:hover { color: var(--pt-ink); }
.nav-tabs .nav-link.active { color: var(--pt-accent); border-bottom-color: var(--pt-accent); background: transparent; }
.nav-pills .nav-link.active { background: var(--pt-accent); }
.modal-content { border: 0; border-radius: 16px; box-shadow: 0 24px 60px rgba(23, 32, 51, .25); }
.modal-header { border-bottom: 1px solid var(--pt-line); }
.modal-footer { border-top: 1px solid var(--pt-line); }
.dropdown-menu { border: 1px solid var(--pt-line); border-radius: 12px; box-shadow: 0 12px 32px rgba(23, 32, 51, .14); }

/* ── Dashboard ───────────────────────────────────────────────────────── */
.pd-hello { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; padding: 1.6rem 1.8rem; border-radius: 18px; color: #fff; background: linear-gradient(120deg, #2447c4 0%, #2f5bea 55%, #5d83ff 100%); box-shadow: 0 10px 30px rgba(47, 91, 234, .28); }
.pd-hello h2 { color: #fff; margin: 0; font-size: 1.45rem; font-weight: 700; letter-spacing: -.02em; }
.pd-hello p { margin: .3rem 0 0; color: rgba(255, 255, 255, .78); font-size: .88rem; }
.pd-hello .pd-when { text-align: right; font-size: .8rem; color: rgba(255, 255, 255, .8); }
.pd-hello .pd-when b { display: block; color: #fff; font-size: .95rem; }
.pd-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 1rem; margin-top: 1.25rem; }
.pd-action { display: flex; align-items: center; gap: 14px; padding: 1.1rem 1.2rem; background: var(--pt-card); border: 1px solid var(--pt-line); border-radius: var(--pt-radius); box-shadow: var(--pt-shadow); text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; }
.pd-action:hover { transform: translateY(-2px); border-color: var(--pt-line-strong); box-shadow: 0 10px 26px rgba(47, 91, 234, .12); }
.pd-action .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--pt-accent-soft); color: var(--pt-accent); display: grid; place-items: center; font-size: 1.4rem; flex: 0 0 auto; }
.pd-action b { display: block; color: var(--pt-ink); font-size: .95rem; }
.pd-action small { color: var(--pt-ink-3); font-size: .8rem; }
.pd-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin-top: 1.25rem; }
@media (min-width: 992px) { .pd-grid { grid-template-columns: 1.4fr 1fr; } }

/* ── Narrow screens: the pages fold into a menu button ───────────────── */
@media (max-width: 1279.98px) {
  .pt-top-in { gap: 12px; padding: 0 16px; }
  .pt-burger { display: block; }
  .pt-user { margin-left: 0; }
  .pt-user-name { display: none; }
  .pt-links { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--pt-card); border-bottom: 1px solid var(--pt-line); flex-direction: column; align-items: stretch; padding: 8px 12px 12px; box-shadow: 0 14px 24px rgba(23, 32, 51, .1); }
  .pt-links.open { display: flex; }
  .pt-link { padding: 12px 14px; }
  .pt-heading { padding: 20px 16px 0; }
}
@media (max-width: 991.98px) {
  .pt-heading { padding: 20px 16px 0; }
  .container-xxl.container-p-y, .container-xxl.flex-grow-1 { padding-left: 16px; padding-right: 16px; }
}

/* ── Sign-in ─────────────────────────────────────────────────────────── */
body.pt-auth { background: var(--pt-card); display: grid; grid-template-columns: minmax(380px, 46%) 1fr; min-height: 100vh; }
.pa-side { background: linear-gradient(150deg, #1c3aa8 0%, #2f5bea 55%, #6d8cff 100%); color: #fff; display: flex; align-items: center; padding: 3rem; position: relative; overflow: hidden; }
.pa-side::before, .pa-side::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .07); }
.pa-side::before { width: 420px; height: 420px; right: -140px; top: -120px; }
.pa-side::after { width: 300px; height: 300px; left: -100px; bottom: -110px; }
.pa-side-in { position: relative; max-width: 440px; z-index: 1; }
.pa-side .pt-brand-name { color: #fff; }
.pa-side .pt-mark { background: var(--pt-card); color: var(--pt-accent); box-shadow: none; }
.pa-side h2 { color: #fff; font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; margin: 2.2rem 0 .9rem; }
.pa-side p { color: rgba(255, 255, 255, .82); font-size: 1rem; }
.pa-side ul { list-style: none; padding: 0; margin: 1.8rem 0 0; }
.pa-side li { display: flex; align-items: center; gap: 10px; margin-bottom: .8rem; color: rgba(255, 255, 255, .92); font-size: .95rem; }
.pa-side li i { font-size: 1.3rem; color: #a9c0ff; }
.pa-main.container-xxl { display: flex; align-items: center; justify-content: center; max-width: none; padding: 2rem; }
.pa-main .authentication-wrapper { padding: 0 !important; }
.pa-main .authentication-inner { max-width: 420px; width: 100%; }
.pa-main .card { border: 0; box-shadow: none; background: transparent; }
.pa-main .card-body { padding: 0; }
.pa-head h1 { font-size: 1.7rem; font-weight: 700; color: var(--pt-ink); letter-spacing: -.02em; margin: 0; }
.pa-head p { color: var(--pt-ink-3); margin: .35rem 0 1.8rem; }
.pa-main .form-control { padding: .7rem .9rem; }
.pa-main .btn-primary { padding: .72rem 1rem; font-size: .95rem; border-radius: 12px; }
@media (max-width: 860px) {
  body.pt-auth { grid-template-columns: 1fr; }
  .pa-side { display: none; }
}
.pa-main .authentication-inner::before, .pa-main .authentication-inner::after { display: none !important; }
.pa-main a { font-weight: 600; font-size: .88rem; }

/* ── Onboarding and regulations (public pages, no top bar) ───────────── */
body .onb-wrap { max-width: 920px; padding-top: 32px; }
body .onb-slot { border: 1.5px dashed var(--pt-line-strong); border-radius: 12px; background: var(--pt-box); }
body .onb-slot.has-file { border-style: solid; border-color: var(--pt-pos-line); background: var(--pt-pos-bg); }
body .onb-bar { border-top: 1px solid var(--pt-line); box-shadow: 0 -8px 24px rgba(23, 32, 51, .06); }
.onb-section h6 { text-transform: uppercase; letter-spacing: .05em; font-size: .76rem; color: var(--pt-ink-3); }

/* ── Timesheet entry (Submit Timesheet): the day grid, and the totals beside it ───────────────────── */
.tf-pick { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem 1.25rem; margin-bottom: 1.25rem; }
.tf-pick-f { min-width: 170px; }
.tf-pick-hint { color: var(--pt-ink-3); font-size: .84rem; padding-bottom: .55rem; }
.tf-pick-hint i { vertical-align: -2px; }
.tf-body { display: flex; gap: 1.4rem; align-items: flex-start; }
.tf-grid { flex: 1 1 auto; min-width: 0; border: 1px solid var(--pt-line); border-radius: 12px; overflow: hidden; position: relative; min-height: 220px; }
.tf-grid table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .88rem; }
.tf-grid thead th { background: var(--pt-head); padding: .6rem .6rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--pt-ink-3); text-align: center; border-bottom: 1px solid var(--pt-line); }
.tf-grid td { padding: .2rem .5rem; border-bottom: 1px solid var(--pt-row-line); text-align: center; }
.tf-grid td.dn { width: 38px; font-weight: 650; color: var(--pt-ink); }
.tf-grid td.dd { width: 52px; color: var(--pt-ink-3); text-align: left; }
.tf-grid tr.we td { background: var(--pt-weekend); }
.tf-grid tr.we td.dd { color: var(--pt-warn); font-weight: 600; }
.tf-grid tr.has td.dn { color: var(--pt-pos); }
.tf-grid tbody input { width: 100%; max-width: 110px; text-align: center; border: 1px solid var(--pt-input-line); border-radius: 8px; padding: .28rem .4rem; font-size: .9rem; background: var(--pt-card); color: var(--pt-ink); }
.tf-grid tbody input:focus { outline: none; border-color: var(--pt-accent); box-shadow: 0 0 0 3px rgba(47, 91, 234, .15); }
.tf-grid tfoot td { background: var(--pt-head); font-weight: 700; color: var(--pt-ink); padding: .6rem .5rem; border-top: 1px solid var(--pt-line); border-bottom: 0; }
.tf-grid tfoot td:first-child { text-align: left; padding-left: 1rem; }
.tf-empty { position: absolute; inset: 44px 0 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; color: var(--pt-ink-3); background: var(--pt-card); }
.tf-empty i { font-size: 2.2rem; color: var(--pt-ink-3); }
.tf-empty b { color: var(--pt-ink); }
.tf-side { flex: 0 0 300px; display: flex; flex-direction: column; gap: .9rem; position: sticky; top: 84px; }
.tf-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.tf-tile { border: 1px solid var(--pt-line); border-radius: 12px; padding: .5rem .75rem; background: var(--pt-card); }
.tf-tile span { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--pt-ink-3); }
.tf-tile b { font-size: 1.2rem; color: var(--pt-ink); }
.tf-tile.big { grid-column: 1 / -1; background: var(--pt-pos-bg); border-color: var(--pt-pos-line); }
.tf-tile.big b { font-size: 1.8rem; color: var(--pt-pos); }
.tf-box { border: 1px solid var(--pt-line); border-radius: 12px; padding: .8rem; background: var(--pt-box); }
.tf-h { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--pt-ink-2); font-weight: 650; margin-bottom: .55rem; }
.tf-dim { opacity: .5; pointer-events: none; }
@media (max-width: 991.98px) {
  .tf-body { flex-direction: column; }
  .tf-side { flex: 0 0 auto; width: 100%; position: static; }
}

/* ── Change-password dialog (opened from the user menu on every page) ── */
.pt-modal { position: fixed; inset: 0; background: rgba(23, 32, 51, .45); z-index: 2100; display: none; align-items: center; justify-content: center; padding: 1rem; }
.pt-modal.open { display: flex; }
.pt-modal-box { background: var(--pt-card); border-radius: 16px; width: min(440px, 100%); box-shadow: 0 24px 60px rgba(23, 32, 51, .3); }
.pt-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.3rem; border-bottom: 1px solid var(--pt-line); }
.pt-modal-head h5 { margin: 0; font-size: 1.05rem; font-weight: 650; }
.pt-modal-body { padding: 1.2rem 1.3rem .6rem; }
.pt-modal-foot { display: flex; justify-content: flex-end; gap: .5rem; padding: .9rem 1.3rem 1.2rem; }
.pt-weak-box { padding: 1.9rem 1.7rem 1.5rem; text-align: center; }
.pt-weak-ico { width: 64px; height: 64px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin-bottom: .95rem; background: var(--pt-warn-bg); color: var(--pt-warn); font-size: 1.9rem; }
.pt-weak-box h5 { margin: 0 0 .5rem; font-size: 1.15rem; font-weight: 650; color: var(--pt-ink); }
.pt-weak-box p { margin: 0 auto 1.4rem; max-width: 330px; color: var(--pt-ink-2); font-size: .93rem; line-height: 1.55; }
.pt-weak-actions { display: flex; gap: .6rem; justify-content: center; }
.pt-weak-actions .btn { min-width: 120px; }
.pt-modal-msg { min-height: 1.3rem; margin-top: .7rem; font-size: .86rem; }
.pt-modal-msg.bad { color: var(--pt-neg); }
.pt-modal-msg.ok { color: var(--pt-pos); }

/* ── Submitted timesheets (the history table under the entry form) ───── */
.th-head { padding: 1.1rem 1.4rem .4rem; }
.th-head h5 { margin: 0; font-size: 1.05rem; font-weight: 650; color: var(--pt-ink); }
.th-head p { margin: .2rem 0 0; color: var(--pt-ink-3); font-size: .86rem; }
.th-wrap { padding: .6rem 1.2rem 1.2rem !important; }
.th-table > tbody > tr > td { padding: .7rem .9rem; }
.th-month { font-weight: 600; color: var(--pt-ink); }
.th-add { display: inline-flex; align-items: center; gap: 5px; padding: .3rem .75rem; border: 1px dashed var(--pt-line-strong); border-radius: 999px; color: var(--pt-accent); font-weight: 600; font-size: .8rem; cursor: pointer; background: var(--pt-card); transition: background .15s, border-color .15s; }
.th-add:hover { background: var(--pt-accent-soft); border-color: var(--pt-accent); }
.th-file { display: inline-flex; align-items: center; gap: 4px; max-width: 220px; margin: 2px 6px 2px 0; padding: .2rem .35rem .2rem .6rem; background: var(--pt-chip-bg); border: 1px solid var(--pt-chip-line); border-radius: 999px; font-size: .8rem; }
.th-file a { display: inline-flex; align-items: center; gap: 4px; min-width: 0; color: var(--pt-accent); text-decoration: none; font-weight: 500; }
.th-file a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }
.th-file .delete-file, .th-file .delete_file_rent, .th-file .delete_monthly_rent { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; color: var(--pt-neg); }
.th-file .delete-file:hover, .th-file .delete_file_rent:hover, .th-file .delete_monthly_rent:hover { background: var(--pt-neg-bg); }
.th-none { color: var(--pt-ink-3); font-size: .84rem; }
.th-open { display: inline-flex; align-items: center; gap: 5px; padding: .3rem .8rem; border-radius: 8px; border: 1px solid var(--pt-line-strong); color: var(--pt-accent); font-weight: 600; font-size: .8rem; text-decoration: none; background: var(--pt-card); }
.th-open:hover { background: var(--pt-accent-soft); color: var(--pt-accent-dark); }

/* ── Theme switch ────────────────────────────────────────────────────── */
.pt-theme { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--pt-line); background: var(--pt-card); color: var(--pt-ink-2); display: grid; place-items: center; cursor: pointer; font-size: 1.2rem; transition: background .15s, border-color .15s; }
.pt-theme:hover { background: var(--pt-hover); border-color: var(--pt-line-strong); }
.pt-theme .bx-sun { display: none; }
html[data-pt-theme="dark"] .pt-theme .bx-sun { display: inline; }
html[data-pt-theme="dark"] .pt-theme .bx-moon { display: none; }
.pt-user { margin-left: 0; }
.pt-links + .pt-theme { margin-left: auto; }
.pt-auth-theme { position: fixed; top: 16px; right: 16px; z-index: 5; }

/* ═══════════════════════════════════════════════════════════════════════
 *  Dark theme. Everything above reads the variables; this only moves them,
 *  then repairs the few template and vendor surfaces that ignore them.
 * ═══════════════════════════════════════════════════════════════════════ */
html[data-pt-theme="dark"] {
  color-scheme: dark;
  --pt-bg: #0e1524;
  --pt-card: #161f33;
  --pt-line: #26324b;
  --pt-ink: #e9eef9;
  --pt-ink-2: #b6c2d9;
  --pt-ink-3: #8696b2;
  --pt-accent: #7595ff;
  --pt-accent-dark: #93adff;
  --pt-accent-soft: rgba(117, 149, 255, .16);
  --pt-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  --pt-top-bg: rgba(14, 21, 36, .88);
  --pt-hover: #1d2840;
  --pt-head: #1a2438;
  --pt-muted-bg: #1a2438;
  --pt-input-line: #33415f;
  --pt-line-strong: #3a4a6e;
  --pt-row-line: #222d45;
  --pt-row-hover: #1b2640;
  --pt-weekend: #131c2f;
  --pt-box: #131c2f;
  --pt-pos: #5fd08a;
  --pt-pos-bg: rgba(63, 185, 110, .13);
  --pt-pos-line: rgba(95, 208, 138, .35);
  --pt-neg: #ff8a80;
  --pt-neg-bg: rgba(255, 138, 128, .14);
  --pt-chip-bg: rgba(117, 149, 255, .12);
  --pt-chip-line: rgba(117, 149, 255, .28);
  --pt-warn: #f0a63a;
  --pt-warn-bg: rgba(240, 166, 58, .12);
  --pt-we-bg: rgba(129, 140, 248, .10);
  --pt-we: #a5a9ff;
  --pt-leave-bg: rgba(45, 212, 191, .10);
  --pt-leave: #5eead4;
  /* the app-wide tokens theme-pro.css draws its tables, tabs and badges from */
  --pro-canvas: #0e1524; --pro-surface: #161f33; --pro-surface-alt: #1a2438; --pro-line: #26324b; --pro-line-strong: #33415f;
  --pro-ink: #e9eef9; --pro-ink-2: #b6c2d9; --pro-ink-3: #8696b2;
  --pro-accent: #7595ff; --pro-accent-dark: #93adff; --pro-accent-soft: rgba(117, 149, 255, .16);
}
html[data-pt-theme="dark"] body, html[data-pt-theme="dark"] .layout-wrapper, html[data-pt-theme="dark"] .layout-container,
html[data-pt-theme="dark"] .content-wrapper { background: var(--pt-bg); color: var(--pt-ink-2); }
html[data-pt-theme="dark"] .card, html[data-pt-theme="dark"] .modal-content, html[data-pt-theme="dark"] .dropdown-menu,
html[data-pt-theme="dark"] .bg-white, html[data-pt-theme="dark"] .table-responsive { background-color: var(--pt-card); color: var(--pt-ink-2); }
html[data-pt-theme="dark"] .table, html[data-pt-theme="dark"] .table > :not(caption) > * > * { color: var(--pt-ink-2); background-color: transparent; border-color: var(--pt-row-line); }
html[data-pt-theme="dark"] .table > thead > tr > th { background: var(--pt-head); color: var(--pt-ink-3); }
html[data-pt-theme="dark"] .form-control, html[data-pt-theme="dark"] .form-select, html[data-pt-theme="dark"] select, html[data-pt-theme="dark"] textarea {
  background-color: #0f1729; color: var(--pt-ink); border-color: var(--pt-input-line);
}
html[data-pt-theme="dark"] .form-control::placeholder { color: #61718d; }
html[data-pt-theme="dark"] .form-control:disabled, html[data-pt-theme="dark"] .form-control[readonly] { background: #131c2f; color: var(--pt-ink-3); }
html[data-pt-theme="dark"] .form-select { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%238696b2' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"); }
html[data-pt-theme="dark"] .input-group-text { background: #1a2438; color: var(--pt-ink-3); border-color: var(--pt-input-line); }
html[data-pt-theme="dark"] input[type="file"]::file-selector-button { background: #1a2438; color: var(--pt-ink-2); border-color: var(--pt-input-line); }
html[data-pt-theme="dark"] .btn-outline-secondary, html[data-pt-theme="dark"] .btn-secondary { background: var(--pt-card); color: var(--pt-ink-2); border-color: var(--pt-input-line); }
html[data-pt-theme="dark"] .btn-outline-secondary:hover, html[data-pt-theme="dark"] .btn-secondary:hover { background: var(--pt-hover); color: var(--pt-ink); }
html[data-pt-theme="dark"] .btn-outline-primary { background: var(--pt-card); }
html[data-pt-theme="dark"] .btn-primary { color: #0b1020; }
html[data-pt-theme="dark"] .btn-primary:hover, html[data-pt-theme="dark"] .btn-primary:focus { color: #0b1020; }
html[data-pt-theme="dark"] .btn-close { filter: invert(1) grayscale(1) brightness(1.6); }
html[data-pt-theme="dark"] .modal-header, html[data-pt-theme="dark"] .modal-footer, html[data-pt-theme="dark"] .card-header { border-color: var(--pt-line); }
html[data-pt-theme="dark"] .dropdown-item { color: var(--pt-ink-2); }
html[data-pt-theme="dark"] .dropdown-item:hover { background: var(--pt-hover); color: var(--pt-ink); }
html[data-pt-theme="dark"] .text-muted { color: var(--pt-ink-3) !important; }
html[data-pt-theme="dark"] .alert { background: var(--pt-card); color: var(--pt-ink-2); }
html[data-pt-theme="dark"] .badge.bg-label-primary { background: var(--pt-accent-soft) !important; color: var(--pt-accent) !important; }
html[data-pt-theme="dark"] .nav-tabs .nav-link.active { color: var(--pt-accent); }
html[data-pt-theme="dark"] .dataTables_wrapper, html[data-pt-theme="dark"] .dataTables_wrapper label, html[data-pt-theme="dark"] .dataTables_info { color: var(--pt-ink-3); }
html[data-pt-theme="dark"] .dataTables_wrapper .dataTables_filter input, html[data-pt-theme="dark"] .dataTables_wrapper .dataTables_length select { background: #0f1729; color: var(--pt-ink); border-color: var(--pt-input-line); }
html[data-pt-theme="dark"] .page-link { background: var(--pt-card); color: var(--pt-ink-2); border-color: var(--pt-line); }
html[data-pt-theme="dark"] .page-item.active .page-link { background: var(--pt-accent); border-color: var(--pt-accent); color: #0b1020; }
html[data-pt-theme="dark"] .page-item.disabled .page-link { background: var(--pt-card); color: var(--pt-ink-3); opacity: .6; }
html[data-pt-theme="dark"] table.dataTable > tbody > tr, html[data-pt-theme="dark"] table.dataTable > tbody > tr > td { background-color: transparent; }
html[data-pt-theme="dark"] table.dataTable thead th, html[data-pt-theme="dark"] table.dataTable thead td { border-bottom-color: var(--pt-line); }
html[data-pt-theme="dark"] .pt-menu, html[data-pt-theme="dark"] .pt-modal-box { background: var(--pt-card); }
html[data-pt-theme="dark"] .pt-modal { background: rgba(2, 6, 14, .65); }
html[data-pt-theme="dark"] .pt-mark { box-shadow: 0 2px 12px rgba(117, 149, 255, .35); }
html[data-pt-theme="dark"] .pd-hello { box-shadow: 0 10px 30px rgba(0, 0, 0, .4); background: linear-gradient(120deg, #1d2f7a 0%, #2b4bc4 55%, #4a6ee0 100%); }
html[data-pt-theme="dark"] .pd-action:hover { box-shadow: 0 10px 26px rgba(0, 0, 0, .35); }
html[data-pt-theme="dark"] .tf-grid tbody input { background: #0f1729; color: var(--pt-ink); }
html[data-pt-theme="dark"] .tf-grid thead th, html[data-pt-theme="dark"] .tf-grid tfoot td { background: var(--pt-head); }
html[data-pt-theme="dark"] .tf-empty { background: var(--pt-card); }
html[data-pt-theme="dark"] .tf-tile { background: var(--pt-card); }
html[data-pt-theme="dark"] .tf-tile.big { background: var(--pt-pos-bg); }
html[data-pt-theme="dark"] body.pt-auth, html[data-pt-theme="dark"] .pa-main.container-xxl { background: var(--pt-bg); }
html[data-pt-theme="dark"] .pa-side { background: linear-gradient(150deg, #0f1c52 0%, #1f3aa8 55%, #3a58d0 100%); }
html[data-pt-theme="dark"] .onb-wrap, html[data-pt-theme="dark"] body .onb-bar { background: var(--pt-card); }
html[data-pt-theme="dark"] body .onb-slot { background: var(--pt-box); }
html[data-pt-theme="dark"] .onb-wrap h4, html[data-pt-theme="dark"] .onb-wrap h6 { color: var(--pt-ink); }
html[data-pt-theme="dark"] .pa-main .card { background-color: transparent; }
html[data-pt-theme="dark"] .pa-main a, html[data-pt-theme="dark"] a { color: var(--pt-accent); }
html[data-pt-theme="dark"] .pt-link, html[data-pt-theme="dark"] .pt-menu a, html[data-pt-theme="dark"] .pd-action { color: var(--pt-ink-2); }
html[data-pt-theme="dark"] .pt-link.active { color: var(--pt-accent); }
html[data-pt-theme="dark"] .pt-menu a.out { color: var(--pt-neg); }

/* the history table fits the card: no side scroll, files wrap beside their Add button */
.th-wrap { overflow: hidden; }
.th-table { width: 100% !important; table-layout: auto; }
.th-table th, .th-table td { white-space: normal; }
.th-table > thead > tr > th { white-space: nowrap; }
.th-files { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.th-files .th-file { margin: 0; }
.hol-cal-nav button.hol-nohol { width: auto; height: 34px; padding: 0 12px; white-space: nowrap; }
.hol-cal-header { flex-wrap: wrap; gap: 10px; }
.hol-cal-nav button.hol-nohol { background: var(--pt-neg-bg); color: var(--pt-neg); border: 1px solid var(--pt-neg-bg); }
.hol-cal-nav button.hol-nohol:hover { background: var(--pt-neg); color: #fff; }
#holidayListTable .btn { white-space: nowrap; }
html[data-pt-theme="dark"] .badge.bg-label-info { background: rgba(56, 189, 248, .14) !important; color: #7dd3fc !important; }
html[data-pt-theme="dark"] .badge.bg-label-warning { background: rgba(240, 166, 58, .16) !important; color: #f0a63a !important; }
html[data-pt-theme="dark"] .badge.bg-label-success { background: var(--pt-pos-bg) !important; color: var(--pt-pos) !important; }
html[data-pt-theme="dark"] .badge.bg-label-danger { background: var(--pt-neg-bg) !important; color: var(--pt-neg) !important; }

/* ── Mobility: upload boxes and the lists under them ─────────────────── */
.mo-drop { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1.5px dashed var(--pt-line-strong); border-radius: 12px; background: var(--pt-box); transition: border-color .15s, background .15s; }
.mo-drop:hover, .mo-drop:focus-within { border-color: var(--pt-accent); background: var(--pt-accent-soft); }
.mo-drop > i { font-size: 2.1rem; color: var(--pt-accent); flex: 0 0 auto; }
.mo-drop-in { flex: 1; min-width: 0; }
.mo-drop-in small { display: block; margin-top: 6px; color: var(--pt-ink-3); font-size: .78rem; }
.th-when { color: var(--pt-ink-3); font-size: .82rem; white-space: nowrap; }
.th-wrap .dataTables_wrapper > .row { margin-left: 0; margin-right: 0; }
.th-wrap .dataTables_wrapper > .row > div { padding-left: 0; padding-right: 0; }
.th-wrap .dataTables_filter input { width: 150px; max-width: 100%; margin-left: .4rem; }
.th-file { max-width: 340px; }
.th-file a span { max-width: 250px; }

/* ── Mobility: submitted proofs as one card per month ─────────────────── */
.mo-years { display: inline-flex; gap: 4px; padding: 3px; background: var(--pt-muted-bg); border-radius: 10px; }
.mo-year { border: 0; background: transparent; color: var(--pt-ink-2); font-weight: 600; font-size: .8rem; padding: .3rem .8rem; border-radius: 8px; cursor: pointer; }
.mo-year:hover { color: var(--pt-ink); }
.mo-year.active { background: var(--pt-card); color: var(--pt-accent); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.mo-months { padding: .4rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .75rem; }
.mo-month { border: 1px solid var(--pt-line); border-radius: 14px; background: var(--pt-box); padding: .85rem 1rem; }
.mo-month-top { display: flex; align-items: center; gap: .85rem; }
.mo-cal { flex: 0 0 auto; width: 52px; border-radius: 12px; overflow: hidden; text-align: center; border: 1px solid var(--pt-line); background: var(--pt-card); }
.mo-cal span { display: block; background: var(--pt-accent); color: #fff; font-size: .62rem; font-weight: 700; letter-spacing: .08em; padding: 2px 0; }
.mo-cal b { display: block; font-size: .95rem; color: var(--pt-ink); padding: 3px 0 4px; }
.mo-month-title { flex: 1; min-width: 0; }
.mo-month-title b { display: block; color: var(--pt-ink); font-size: .98rem; }
.mo-month-title small { color: var(--pt-ink-3); font-size: .78rem; }
.mo-count { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 2px; border: 0; background: var(--pt-accent-soft); color: var(--pt-accent); font-weight: 650; font-size: .78rem; padding: .3rem .55rem .3rem .8rem; border-radius: 999px; cursor: pointer; }
.mo-count i { font-size: 1.1rem; transition: transform .2s; }
.mo-count:hover { background: var(--pt-accent); color: #fff; }
.mo-month.open .mo-count i { transform: rotate(180deg); }
.mo-files { display: none; margin-top: .7rem; flex-direction: column; gap: 4px; padding-left: calc(52px + .85rem); }
.mo-file { display: flex; align-items: center; gap: 8px; padding: .38rem .6rem; background: var(--pt-card); border: 1px solid var(--pt-line); border-radius: 9px; }
.mo-file > i { color: var(--pt-accent); font-size: 1.1rem; flex: 0 0 auto; }
.mo-file a { flex: 1; min-width: 0; color: var(--pt-ink-2); font-size: .82rem; text-decoration: none; word-break: break-all; line-height: 1.3; }
.mo-file a:hover { color: var(--pt-accent); text-decoration: underline; }
.mo-file .delete_monthly_rent { flex: 0 0 auto; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; cursor: pointer; color: var(--pt-neg); }
.mo-file .delete_monthly_rent:hover { background: var(--pt-neg-bg); }
.mo-empty { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: 2.2rem 1rem; color: var(--pt-ink-3); text-align: center; }
.mo-empty i { font-size: 2.2rem; }
.mo-empty b { color: var(--pt-ink); }
@media (max-width: 575.98px) { .mo-files { padding-left: 0; } }
.mo-month-top { cursor: pointer; }
.mo-month.open .mo-files { display: flex; }
.mo-month:hover { border-color: var(--pt-line-strong); }
.mo-all { border: 1px solid var(--pt-line-strong); background: var(--pt-card); color: var(--pt-accent); font-weight: 600; font-size: .8rem; padding: .35rem .8rem; border-radius: 9px; cursor: pointer; }
.mo-all:hover { background: var(--pt-accent-soft); }

/* ── Mobility: months he has not uploaded for ─────────────────────────── */
.mo-missing { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--pt-neg); background: var(--pt-neg-bg); color: var(--pt-neg); font-weight: 700; font-size: .8rem; padding: .35rem .85rem; border-radius: 999px; cursor: pointer; }
.mo-missing i { font-size: 1.1rem; }
.mo-missing:hover, .mo-missing.active { background: var(--pt-neg); color: #fff; }
.mo-complete { display: inline-flex; align-items: center; gap: 6px; color: var(--pt-pos); background: var(--pt-pos-bg); font-weight: 650; font-size: .8rem; padding: .35rem .85rem; border-radius: 999px; }
.mo-alert { display: flex; align-items: flex-start; gap: 10px; margin: .3rem 1.2rem .5rem; padding: .7rem .95rem; border: 1px solid var(--pt-neg); background: var(--pt-neg-bg); color: var(--pt-neg); border-radius: 12px; font-size: .86rem; }
.mo-alert i { font-size: 1.3rem; flex: 0 0 auto; }
.mo-month.is-missing { border-color: var(--pt-neg); background: var(--pt-neg-bg); }
.mo-month.is-missing .mo-month-top { cursor: default; }
.mo-month.is-missing .mo-cal { border-color: var(--pt-neg); }
.mo-month.is-missing .mo-cal span { background: var(--pt-neg); }
.mo-month.is-missing .mo-month-title small { color: var(--pt-neg); }
.mo-badge-missing { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; color: var(--pt-neg); font-weight: 700; font-size: .76rem; }
.mo-upnow { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; border: 0; background: var(--pt-neg); color: #fff; font-weight: 650; font-size: .78rem; padding: .35rem .8rem; border-radius: 9px; cursor: pointer; }
.mo-upnow:hover { filter: brightness(1.1); }
html[data-pt-theme="dark"] .mo-upnow, html[data-pt-theme="dark"] .mo-missing:hover, html[data-pt-theme="dark"] .mo-missing.active { color: #1b0a09; }
.mo-month.is-empty .mo-month-top { cursor: default; }
.mo-month.is-empty { opacity: .75; }

/* the three upload and agreement tiles stay in view while the long list of months scrolls */
@media (min-width: 1200px) { .mo-left { position: sticky; top: 84px; align-self: flex-start; } }

/* ── Timesheet entry as a month calendar ──────────────────────────────── */
.tf-key { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.1rem; padding: .6rem .9rem; border-bottom: 1px solid var(--pt-line); font-size: .78rem; color: var(--pt-ink-3); }
.tf-key b { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; background: var(--pt-accent-soft); color: var(--pt-accent); font-size: .68rem; margin-right: 4px; }
.tf-key em { margin-left: auto; font-style: normal; }
.tf-calhead { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--pt-head); border-bottom: 1px solid var(--pt-line); }
.tf-calhead span { text-align: center; padding: .5rem 0; font-size: .72rem; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--pt-ink-3); }
.tf-calhead span:nth-child(n+6) { color: var(--pt-warn); }
.tf-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.tf-pad { min-height: 92px; background: var(--pt-weekend); border-right: 1px solid var(--pt-row-line); border-bottom: 1px solid var(--pt-row-line); opacity: .5; }
.tf-day { min-height: 92px; padding: 6px 7px 8px; border-right: 1px solid var(--pt-row-line); border-bottom: 1px solid var(--pt-row-line); background: var(--pt-card); transition: background .15s; }
.tf-day.we { background: var(--pt-weekend); }
.tf-day.has { background: var(--pt-pos-bg); }
.tf-day.today { box-shadow: inset 0 0 0 2px var(--pt-accent); }
.tf-day:focus-within { background: var(--pt-accent-soft); }
.tf-day-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.tf-day .dn { font-weight: 700; font-size: .95rem; color: var(--pt-ink); }
.tf-day.we .dn { color: var(--pt-warn); }
.tf-day .dd { display: none; font-size: .72rem; color: var(--pt-ink-3); }
.tf-in { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.tf-in label { position: relative; margin: 0; }
.tf-in i { position: absolute; top: -1px; left: 50%; transform: translate(-50%, -50%); font-style: normal; font-size: .58rem; font-weight: 700; color: var(--pt-ink-3); background: var(--pt-card); padding: 0 3px; line-height: 1; pointer-events: none; z-index: 1; }
.tf-day.we .tf-in i { background: var(--pt-weekend); }
.tf-day.has .tf-in i { background: var(--pt-pos-bg); }
.tf-in input { width: 100%; text-align: center; border: 1px solid var(--pt-input-line); border-radius: 7px; padding: 5px 0 3px; font-size: .84rem; background: var(--pt-card); color: var(--pt-ink); min-width: 0; }
.tf-in input:focus { outline: none; border-color: var(--pt-accent); box-shadow: 0 0 0 3px rgba(47, 91, 234, .18); }
.tf-totals { display: flex; flex-wrap: wrap; gap: .3rem 1.6rem; padding: .7rem 1rem; background: var(--pt-head); font-size: .84rem; color: var(--pt-ink-3); }
.tf-totals span:first-child { font-weight: 700; color: var(--pt-ink); text-transform: uppercase; letter-spacing: .05em; font-size: .72rem; align-self: center; }
.tf-totals b { color: var(--pt-ink); margin-left: 4px; }
html[data-pt-theme="dark"] .tf-in input { background: #0f1729; }
@media (max-width: 767.98px) {
  .tf-calhead, .tf-pad { display: none; }
  .tf-cal { grid-template-columns: 1fr; }
  .tf-day { min-height: 0; display: flex; align-items: center; gap: 12px; }
  .tf-day-top { flex: 0 0 74px; margin: 0; flex-direction: column; align-items: flex-start; gap: 0; }
  .tf-day .dd { display: block; }
  .tf-in { flex: 1; }
}

/* ── one box per day: weekend colour for Saturdays, Sundays and public holidays, no green ───────── */
.tf-key { gap: .4rem .6rem; }
.tf-key .k-we, .tf-key .k-ot { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-left: .6rem; }
.tf-key .k-we { background: var(--pt-warn-bg); border: 1px solid var(--pt-warn); }
.tf-key .k-ot { background: var(--pt-accent-soft); border: 1px solid var(--pt-accent); }
.tf-day.has { background: var(--pt-card); }
.tf-day.we { background: var(--pt-warn-bg); }
.tf-day.we .dn { color: var(--pt-warn); }
.tf-day.we.has { box-shadow: inset 0 0 0 1px var(--pt-warn); }
.tf-day-top { gap: 6px; flex-wrap: wrap; }
.tf-day .dh { flex: 1 0 100%; font-size: .66rem; font-weight: 600; color: var(--pt-warn); line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tf-one { width: 100%; text-align: center; border: 1px solid var(--pt-input-line); border-radius: 8px; padding: 6px 4px; font-size: .95rem; font-weight: 600; background: var(--pt-card); color: var(--pt-ink); }
.tf-one:focus { outline: none; border-color: var(--pt-accent); box-shadow: 0 0 0 3px rgba(47, 91, 234, .18); }
.tf-note { min-height: 1em; margin-top: 4px; font-size: .66rem; text-align: center; color: var(--pt-ink-3); line-height: 1.1; }
.tf-note.on { color: var(--pt-accent); font-weight: 600; }
.tf-day.we .tf-note.on { color: var(--pt-warn); }
html[data-pt-theme="dark"] .tf-one { background: #0f1729; }
@media (max-width: 767.98px) { .tf-day { flex-wrap: wrap; } .tf-one { flex: 1; width: auto; } .tf-note { flex: 1 0 100%; text-align: left; } .tf-day .dh { flex: 1; } }

/* ── Holiday records: a card per month, the days as chips ─────────────── */
.hl-list { padding: .3rem 1.1rem 1.2rem; }
.hl-msg { padding: 1.6rem 0; text-align: center; color: var(--pt-ink-3); }
.hl-year { margin-bottom: .6rem; }
.hl-year-head { width: 100%; display: flex; align-items: center; gap: .8rem; border: 0; background: var(--pt-head); padding: .55rem .9rem; border-radius: 10px; cursor: pointer; text-align: left; }
.hl-year-head b { font-size: 1.05rem; color: var(--pt-accent); }
.hl-year-head span { flex: 1; font-size: .8rem; color: var(--pt-ink-3); }
.hl-year-head i { font-size: 1.3rem; color: var(--pt-ink-3); transition: transform .2s; }
.hl-year.open .hl-year-head i { transform: rotate(180deg); }
.hl-year-body { display: none; padding-top: .55rem; flex-direction: column; gap: .5rem; }
.hl-year.open .hl-year-body { display: flex; }
.hl-month { display: flex; align-items: center; gap: .85rem; padding: .7rem .85rem; border: 1px solid var(--pt-line); border-radius: 12px; background: var(--pt-box); }
.hl-month.none { opacity: .8; }
.hl-tile { flex: 0 0 auto; width: 46px; border-radius: 10px; overflow: hidden; text-align: center; border: 1px solid var(--pt-line); background: var(--pt-card); }
.hl-tile span { display: block; background: var(--pt-accent); color: #fff; font-size: .6rem; font-weight: 700; letter-spacing: .08em; padding: 2px 0; }
.hl-tile b { display: block; font-size: .95rem; color: var(--pt-ink); padding: 2px 0 3px; }
.hl-main { flex: 1; min-width: 0; }
.hl-title { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.hl-title b { color: var(--pt-ink); font-size: .92rem; }
.hl-title small { color: var(--pt-ink-3); font-size: .76rem; }
.hl-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.hl-chip { background: var(--pt-pos-bg); color: var(--pt-pos); border-radius: 8px; padding: 1px 8px; font-size: .78rem; font-weight: 600; }
.hl-chip small { font-weight: 500; opacity: .85; }
.hl-none { color: var(--pt-ink-3); font-size: .8rem; display: inline-flex; align-items: center; gap: 5px; }
.hl-view { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--pt-line-strong); background: var(--pt-card); color: var(--pt-accent); font-weight: 600; font-size: .78rem; padding: .32rem .75rem; border-radius: 9px; cursor: pointer; }
.hl-view:hover { background: var(--pt-accent-soft); }

/* ── Timesheet: month navigator and the "already submitted" notice ───── */
.tf-nav { align-items: center; }
.tf-arrow { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--pt-line-strong); background: var(--pt-card); color: var(--pt-accent); font-size: 1.3rem; display: grid; place-items: center; cursor: pointer; }
.tf-arrow:hover:not(:disabled) { background: var(--pt-accent-soft); }
.tf-arrow:disabled { opacity: .35; cursor: default; }
.tf-nav-title { display: flex; align-items: center; gap: .7rem; min-width: 250px; }
.tf-nav-title b { font-size: 1.35rem; color: var(--pt-ink); letter-spacing: -.01em; }
.tf-state { font-size: .74rem; font-weight: 700; padding: .25rem .65rem; border-radius: 999px; }
.tf-state.todo { background: var(--pt-warn-bg); color: var(--pt-warn); }
.tf-state.ok { background: var(--pt-pos-bg); color: var(--pt-pos); }
.tf-tofill { border: 1px solid var(--pt-accent); background: var(--pt-accent-soft); color: var(--pt-accent); font-weight: 650; font-size: .8rem; padding: .4rem .85rem; border-radius: 10px; cursor: pointer; }
.tf-tofill:hover { background: var(--pt-accent); color: #fff; }
.tf-done { display: flex; align-items: center; gap: 14px; padding: 1.1rem 1.2rem; border: 1px solid var(--pt-pos-line); background: var(--pt-pos-bg); border-radius: 14px; margin-bottom: 1rem; }
.tf-done > i { font-size: 2rem; color: var(--pt-pos); }
.tf-done div { flex: 1; }
.tf-done b { display: block; color: var(--pt-ink); }
.tf-done span { color: var(--pt-ink-2); font-size: .86rem; }
@media (max-width: 575.98px) { .tf-nav-title { min-width: 0; flex: 1; } .tf-nav-title b { font-size: 1.1rem; } }

/* ── Holiday calendar: public holidays, the footer with the "no holiday" action ───────────────────── */
.hol-cal-cell.hol-public { background: var(--pt-warn-bg); border-color: var(--pt-warn-bg); }
.hol-cal-cell.hol-public > span:first-child { color: var(--pt-warn); font-weight: 700; }
.hol-cal-cell .hol-pub-name { position: absolute; left: 3px; right: 3px; bottom: 3px; font-size: .56rem; line-height: 1.1; text-align: center; color: var(--pt-warn); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hol-cal-cell.hol-has-entry.hol-public { border-color: var(--pt-line-strong); }
.hol-legend-dot.pub { background: var(--pt-warn-bg); border: 2px solid var(--pt-warn); }
.hol-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--pt-line); }
.hol-foot .hol-legend { margin-top: 0; }
.hol-nohol-btn { display: inline-flex; align-items: center; gap: 7px; border: 1.5px dashed var(--pt-line-strong); background: transparent; color: var(--pt-ink-2); font-size: .82rem; font-weight: 600; padding: .45rem .95rem; border-radius: 10px; cursor: pointer; transition: all .15s; }
.hol-nohol-btn i { font-size: 1.15rem; color: var(--pt-accent); }
.hol-nohol-btn b { color: var(--pt-ink); }
.hol-nohol-btn:hover { border-style: solid; border-color: var(--pt-accent); background: var(--pt-accent-soft); }
.hol-blocked { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: .65rem .95rem; border: 1px solid var(--pt-pos-line); background: var(--pt-pos-bg); color: var(--pt-pos); border-radius: 12px; font-size: .86rem; font-weight: 600; }
.hol-blocked i { font-size: 1.3rem; }
.hol-blocked .hol-undo { margin-left: auto; border: 1px solid var(--pt-pos); background: transparent; color: var(--pt-pos); font-weight: 650; font-size: .78rem; padding: .25rem .8rem; border-radius: 8px; cursor: pointer; }
.hol-blocked .hol-undo:hover { background: var(--pt-pos); color: #fff; }

/* ── Back button in the page heading (the report pages) ──────────────── */
.pt-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.pt-back { display: inline-flex; align-items: center; gap: 7px; margin-top: .4rem; border: 1px solid var(--pt-line-strong); background: var(--pt-card); color: var(--pt-accent); font-weight: 650; font-size: .85rem; padding: .5rem 1rem; border-radius: 10px; text-decoration: none; }
.pt-back i { font-size: 1.15rem; }
.pt-back:hover { background: var(--pt-accent-soft); color: var(--pt-accent-dark); }

/* ── Timesheet calendar, compact: about half the height ──────────────── */
.tf-day { min-height: 60px; padding: 4px 6px 5px; }
.tf-pad { min-height: 60px; }
.tf-day-top { margin-bottom: 2px; }
.tf-day .dn { font-size: .78rem; }
.tf-day .dh { font-size: .58rem; }
.tf-one { padding: 2px 4px; font-size: .82rem; border-radius: 6px; }
.tf-note { min-height: 0; margin-top: 2px; font-size: .6rem; }
.tf-calhead span { padding: .35rem 0; font-size: .66rem; }
.tf-key { padding: .4rem .8rem; font-size: .72rem; }
.tf-totals { padding: .5rem .9rem; }
@media (max-width: 767.98px) { .tf-day { min-height: 0; } }

/* the legend now sits in the navigator row, beside the month arrows */
.tf-nav .tf-key { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; margin-left: auto; padding: 0; border: 0; font-size: .78rem; color: var(--pt-ink-3); }
.tf-nav .tf-key span { display: inline-flex; align-items: center; gap: 6px; }
.tf-nav .tf-key i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin: 0; }
.tf-nav .tf-key .k-we { background: var(--pt-warn-bg); border: 1px solid var(--pt-warn); }
.tf-nav .tf-key .k-ot { background: var(--pt-accent-soft); border: 1px solid var(--pt-accent); }

/* the calendar box is as tall as the box beside it: the weeks share the extra height, the totals stay at the bottom */
@media (min-width: 992px) {
  .tf-body { align-items: stretch; }
  .tf-grid { display: flex; flex-direction: column; }
  .tf-grid .tf-cal { flex: 1 1 auto; grid-auto-rows: 1fr; align-content: stretch; }
  .tf-grid .tf-day { display: flex; flex-direction: column; justify-content: center; }
  .tf-side { position: static; }
}

/* weekends and public holidays: a soft indigo instead of amber (amber turned brown on the dark theme) */
.tf-day.we, .tf-day.we.hol { background: var(--pt-we-bg); }
.tf-day.we .dn, .tf-day .dh, .tf-day.we .tf-note.on { color: var(--pt-we); }
.tf-day.we.has { box-shadow: inset 0 0 0 1px var(--pt-we); }
.tf-day.we .tf-one { border-color: var(--pt-we); background: var(--pt-card); }
.tf-day.we .tf-one::placeholder { color: var(--pt-ink-3); }
.tf-calhead span:nth-child(n+6) { color: var(--pt-we); }
.tf-nav .tf-key .k-we, .tf-key .k-we { background: var(--pt-we-bg); border: 1px solid var(--pt-we); }
.hol-cal-cell.hol-public { background: var(--pt-we-bg); border-color: var(--pt-we-bg); }
.hol-cal-cell.hol-public > span:first-child, .hol-cal-cell .hol-pub-name { color: var(--pt-we); }
.hol-legend-dot.pub { background: var(--pt-we-bg); border: 2px solid var(--pt-we); }
html[data-pt-theme="dark"] .tf-day.we .tf-one { background: #0f1729; border-color: rgba(165, 169, 255, .45); }

/* ── Timesheet report: the month as a read-only calendar ──────────────── */
.ar-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.ar-title { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.ar-title h2 { margin: 0; font-size: 1.5rem; letter-spacing: -.01em; color: var(--pt-ink); }
.ar-pill { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 700; padding: .3rem .75rem; border-radius: 999px; }
.ar-pill.ok { background: var(--pt-pos-bg); color: var(--pt-pos); }
.ar-pill.wait { background: var(--pt-warn-bg); color: var(--pt-warn); }
.ar-tiles { display: flex; gap: .55rem; flex-wrap: wrap; }
.ar-tile { min-width: 98px; border: 1px solid var(--pt-line); border-radius: 12px; padding: .45rem .8rem; background: var(--pt-card); }
.ar-tile span { display: block; font-size: .64rem; text-transform: uppercase; letter-spacing: .05em; color: var(--pt-ink-3); }
.ar-tile b { font-size: 1.2rem; color: var(--pt-ink); }
.ar-tile.big { background: var(--pt-pos-bg); border-color: var(--pt-pos-line); }
.ar-tile.big b { color: var(--pt-pos); }
.ar-card { overflow: hidden; padding: 0; }
.ar-head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--pt-head); border-bottom: 1px solid var(--pt-line); }
.ar-head span { text-align: center; padding: .5rem 0; font-size: .7rem; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--pt-ink-3); }
.ar-head span:nth-child(n+6) { color: var(--pt-we); }
.ar-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ar-pad { min-height: 84px; background: var(--pt-weekend); border-right: 1px solid var(--pt-row-line); border-bottom: 1px solid var(--pt-row-line); opacity: .5; }
.ar-day { min-height: 84px; padding: 6px 9px 8px; border-right: 1px solid var(--pt-row-line); border-bottom: 1px solid var(--pt-row-line); background: var(--pt-card); display: flex; flex-direction: column; }
.ar-day.we { background: var(--pt-we-bg); }
.ar-day-top { display: flex; align-items: baseline; justify-content: space-between; }
.ar-day .dn { font-weight: 700; font-size: .85rem; color: var(--pt-ink); }
.ar-day.we .dn { color: var(--pt-we); }
.ar-day .dd { display: none; font-size: .72rem; color: var(--pt-ink-3); }
.ar-day .dh { font-size: .6rem; font-weight: 600; color: var(--pt-we); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-hours { margin: auto 0; text-align: center; font-size: 1.3rem; font-weight: 700; color: var(--pt-ink); }
.ar-hours.none { color: var(--pt-ink-3); font-weight: 400; opacity: .6; }
.ar-note { text-align: center; font-size: .64rem; color: var(--pt-accent); font-weight: 600; }
.ar-day.we .ar-note { color: var(--pt-we); }
.ar-empty { padding: 1rem; text-align: center; color: var(--pt-ink-3); }
@media (max-width: 767.98px) {
  .ar-head, .ar-pad { display: none; }
  .ar-cal { grid-template-columns: 1fr; }
  .ar-day { min-height: 0; flex-direction: row; align-items: center; gap: 12px; }
  .ar-day-top { flex: 0 0 70px; flex-direction: column; align-items: flex-start; }
  .ar-day .dd { display: block; }
  .ar-hours { margin: 0 0 0 auto; }
}

/* ── Submitted timesheets: a card per month, grouped by year ──────────── */
.sm-list { padding: .3rem 1.2rem 1.3rem; }
.sm-year + .sm-year { margin-top: 1.1rem; }
.sm-year-head { display: flex; align-items: baseline; gap: .8rem; margin: .4rem 0 .6rem; }
.sm-year-head b { font-size: 1.1rem; color: var(--pt-accent); }
.sm-year-head span { font-size: .8rem; color: var(--pt-ink-3); }
.sm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.sm-card { border: 1px solid var(--pt-line); border-radius: 14px; background: var(--pt-box); padding: .85rem 1rem; display: flex; flex-direction: column; gap: .7rem; }
.sm-top { display: flex; align-items: center; gap: .85rem; }
.sm-title { flex: 1; min-width: 0; }
.sm-title b { display: block; color: var(--pt-ink); font-size: .98rem; }
.sm-title small { color: var(--pt-ink-3); font-size: .76rem; }
.sm-stats { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; font-size: .8rem; color: var(--pt-ink-3); padding: .45rem .7rem; background: var(--pt-card); border: 1px solid var(--pt-row-line); border-radius: 10px; }
.sm-stats b { color: var(--pt-ink); font-size: .92rem; margin-right: 2px; }
.sm-stats .hl b { color: var(--pt-accent); }
.sm-files { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: auto; }
.sm-files .th-file { margin: 0; max-width: 100%; }
@media (max-width: 991.98px) { .sm-grid { grid-template-columns: 1fr; } }

/* a submitted month: the same calendar, locked */
.tf-cal.ro .tf-one { background: transparent; border-color: transparent; cursor: default; pointer-events: none; color: var(--pt-ink); }
.tf-cal.ro .tf-one::placeholder { color: transparent; }
.tf-readonly { display: flex; align-items: center; gap: 8px; padding: .75rem 1rem; border-radius: 12px; background: var(--pt-pos-bg); border: 1px solid var(--pt-pos-line); color: var(--pt-pos); font-weight: 650; font-size: .88rem; }
.tf-readonly i { font-size: 1.2rem; }
.tf-cal.ro .tf-day .tf-one, .tf-cal.ro .tf-day.we .tf-one, html[data-pt-theme="dark"] .tf-cal.ro .tf-day .tf-one, html[data-pt-theme="dark"] .tf-cal.ro .tf-day.we .tf-one { background: transparent; border-color: transparent; }

/* the holiday name sits under the box, so every box is at the same height; the day content starts at the top */
.tf-day > .dh { display: block; margin-top: 3px; text-align: center; font-size: .6rem; font-weight: 600; color: var(--pt-we); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 992px) { .tf-grid .tf-day { justify-content: flex-start; } }

.tf-state.sub { background: var(--pt-accent-soft); color: var(--pt-accent); }

.tf-editbar { display: none; gap: .5rem; }
.tf-editbar.on { display: flex; }

/* holiday calendar, smaller: short cells, tighter header and legend */
.hol-cal-cell .hol-pub-name { font-size: .5rem; bottom: 2px; }
.hol-cal-cell .hol-hour-badge { top: 2px; right: 3px; font-size: .55rem; padding: 0 5px; }
.hol-cal-cell.hol-has-entry .hol-dot { bottom: 4px; width: 5px; height: 5px; }
.hol-cal-header { margin-bottom: 10px; }
.hol-cal-day-name { padding: 3px 0; font-size: .68rem; }
.hol-foot { margin-top: 10px; padding-top: 10px; }

/* weekends at the end of the week, in the same indigo as the timesheet; still clickable */
.hol-cal-day-name.we { color: var(--pt-we); }
.hol-cal-cell.hol-we { background: var(--pt-we-bg); }
.hol-cal-cell.hol-we > span:first-child { color: var(--pt-we); font-weight: 600; }
.hol-cal-cell.hol-we:hover { border-color: var(--pt-we); }
.hol-cal-cell.hol-today.hol-we { border-color: var(--pt-accent); }
.hol-cal-cell.hol-has-entry.hol-we { background: var(--pt-accent-soft); }
.hol-legend-dot.we { background: var(--pt-we-bg); border: 1px solid var(--pt-we); }
.hol-legend .hol-legend-dot.we { background: var(--pt-we-bg); border: 1px solid var(--pt-we); }

.hol-cal-grid.locked .hol-cal-cell { cursor: default; }
.hol-cal-grid.locked .hol-cal-cell:hover { border-color: transparent; }

/* ── leave days in the timesheet calendar ─────────────────────────────── */
.tf-day-top { position: relative; }
.tf-leave { margin-left: auto; border: 0; background: transparent; color: var(--pt-ink-3); width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: .9rem; cursor: pointer; opacity: .55; padding: 0; }
.tf-leave:hover { opacity: 1; background: var(--pt-leave-bg); color: var(--pt-leave); }
.tf-day.leave .tf-leave { opacity: 1; color: var(--pt-leave); }
.tf-cal.ro .tf-leave { display: none; }
.tf-leave-tag { display: none; text-align: center; padding: 3px 4px; border-radius: 6px; background: var(--pt-leave-bg); color: var(--pt-leave); font-size: .78rem; font-weight: 650; }
.tf-day.leave { background: var(--pt-leave-bg); box-shadow: inset 0 0 0 1px var(--pt-leave); }
.tf-day.leave .dn { color: var(--pt-leave); }
.tf-day.leave .tf-leave-tag { display: block; }
.tf-day.leave .tf-one, .tf-day.leave .tf-note { display: none; }
.tf-tile.wide { grid-column: 1 / -1; }

/* ── leave by the hour ────────────────────────────────────────────────── */
.tf-leave { width: auto; height: auto; padding: 1px 7px 1px 5px; gap: 3px; border: 1px solid var(--pt-line-strong); border-radius: 999px; opacity: 1; font-size: .62rem; font-weight: 650; color: var(--pt-ink-3); display: inline-flex; align-items: center; }
.tf-leave i { font-size: .8rem; }
.tf-leave:hover { background: var(--pt-leave-bg); border-color: var(--pt-leave); color: var(--pt-leave); }
.tf-day.leave .tf-leave { background: var(--pt-leave); border-color: var(--pt-leave); color: #04201c; }
html:not([data-pt-theme="dark"]) .tf-day.leave .tf-leave { color: #fff; }
.tf-leave-row { display: none; align-items: center; gap: 4px; margin-top: 3px; font-size: .66rem; font-weight: 650; color: var(--pt-leave); }
.tf-leave-row i { font-size: .8rem; }
.tf-day.leave .tf-leave-row { display: flex; }
.tf-lv { width: 42px; text-align: center; border: 1px solid var(--pt-leave); border-radius: 6px; background: transparent; color: var(--pt-ink); font-size: .78rem; padding: 0 2px; }
.tf-lv:focus { outline: none; box-shadow: 0 0 0 2px var(--pt-leave-bg); }
.tf-cal.ro .tf-lv { border-color: transparent; pointer-events: none; }
.tf-day.leave .tf-one { display: block; }
.tf-key .k-lv, .tf-nav .tf-key .k-lv { background: var(--pt-leave-bg); border: 1px solid var(--pt-leave); }

/* every month is as tall as an open one, read only or not */
@media (min-width: 992px) {
  .tf-grid .tf-cal { grid-auto-rows: minmax(112px, 1fr); }
  .tf-day, .tf-pad { min-height: 112px; }
}
.tf-day.leave .tf-note { display: block; }

/* ── Messages in the middle of the screen ─────────────────────────────── */
.pt-alert { position: fixed; inset: 0; z-index: 3000; display: none; align-items: center; justify-content: center; background: rgba(8, 12, 24, .45); padding: 1rem; }
.pt-alert.open { display: flex; }
.pt-alert-box { width: min(440px, 100%); background: var(--pt-card); border: 1px solid var(--pt-line-strong); border-top: 4px solid var(--pt-neg); border-radius: 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); padding: 1.4rem 1.5rem 1.2rem; text-align: center; }
.pt-alert.ok .pt-alert-box { border-top-color: var(--pt-pos); }
.pt-alert-box i { font-size: 2.4rem; color: var(--pt-neg); }
.pt-alert.ok .pt-alert-box i { color: var(--pt-pos); }
.pt-alert-box p { margin: .4rem 0 1rem; color: var(--pt-ink); font-size: 1rem; font-weight: 600; word-break: break-word; }

/* Saturdays and Sundays are days off already: no Leave button there (unless leave was recorded on one, so it can be removed) */
.tf-day.wk:not(.leave) .tf-leave { display: none; }

/* the same for Belgian public holidays: days off already, nothing to record */
.tf-day.hol:not(.leave) .tf-leave { display: none; }

/* a public holiday's name sits in the top row, where the Leave button would be (there is none on a holiday) */
.tf-day .tf-day-top { flex-wrap: nowrap; align-items: center; }
.tf-day .tf-day-top .dh { flex: 0 1 auto; margin: 0 0 0 auto; max-width: 80%; text-align: right; font-size: .62rem; font-weight: 650; color: var(--pt-we); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* the legend under the month arrows: its own row, aligned to the left edge of the calendar */
.tf-nav .tf-key { margin-left: 0; flex: 1 0 100%; justify-content: flex-start; }

.yc-chip.work { background: var(--pt-accent-soft); color: var(--pt-accent); }
.yc-chip.work b { color: var(--pt-accent); }
.yc-chip small { font-size: .7rem; opacity: .85; }

/* ═══ Wide screens: the navigation is a bar down the left, so the page starts at the very top ═══
 * Below 1280px it stays the top bar with the menu button (rules above). */
@media (min-width: 1280px) {
  .layout-wrapper.layout-content-navbar .layout-page.pt-page { padding-left: 236px !important; }
  .pt-top { position: fixed; top: 0; bottom: 0; left: 0; width: 236px; height: 100vh; z-index: 1030; background: var(--pt-card); backdrop-filter: none; border-bottom: 0; border-right: 1px solid var(--pt-line); }
  .pt-top-in { max-width: none; height: 100%; margin: 0; padding: 20px 14px 16px; flex-direction: column; align-items: stretch; gap: 16px; }
  .pt-brand { padding: 2px 8px 10px; border-bottom: 1px solid var(--pt-line); margin-bottom: 4px; }
  .pt-links { flex: 1 1 auto; flex-direction: column; align-items: stretch; gap: 3px; margin: 0; }
  .pt-link { padding: 10px 12px; font-size: .92rem; border-radius: 10px; }
  .pt-link span { white-space: nowrap; }
  .pt-links + .pt-theme { margin-left: 0; }
  .pt-theme { align-self: flex-start; margin-left: 4px; }
  .pt-user { width: 100%; margin: 0; }
  .pt-user-btn { width: 100%; justify-content: flex-start; border-radius: 12px; padding: 6px 10px 6px 6px; }
  .pt-user-btn .bx-chevron-down { margin-left: auto; }
  .pt-user-name { display: inline; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pt-menu { top: auto; bottom: calc(100% + 8px); left: 0; right: 0; min-width: 0; }
  /* The account menu stays open in the bar (Switch account, Change password, Log out): no name, no label, nothing to click open. */
  .pt-user .pt-user-btn { display: none; }
  html .pt-user .pt-menu { position: static; display: block; min-width: 0; margin-top: 6px; border: 0; box-shadow: none; background: transparent; padding: 0; }
  .pt-burger { display: none; }
  .container-xxl.container-p-y, .container-xxl.flex-grow-1 { padding-top: 0; }
  .container-p-y:not(.container-fluid) { padding-top: 1.25rem !important; }
  .mo-left { top: 20px; }
}

/* ── Request Invoice: the requests as cards ───────────────────────────── */
.ri-list { padding: .4rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .75rem; }
.ri-item { border: 1px solid var(--pt-line); border-radius: 14px; background: var(--pt-box); padding: .85rem 1rem; display: flex; flex-direction: column; gap: .65rem; }
.ri-top { display: flex; align-items: center; gap: .85rem; }
.ri-title { flex: 1; min-width: 0; }
.ri-title b { display: block; color: var(--pt-ink); font-size: .96rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ri-title small { color: var(--pt-ink-3); font-size: .76rem; }
.ri-amount { font-weight: 700; color: var(--pt-ink); font-size: 1.05rem; white-space: nowrap; }
.ri-status { flex: 0 0 auto; font-size: .74rem; font-weight: 700; padding: .28rem .7rem; border-radius: 999px; }
.ri-status.wait { background: var(--pt-warn-bg); color: var(--pt-warn); }
.ri-status.ok { background: var(--pt-pos-bg); color: var(--pt-pos); }
.ri-status.bad { background: var(--pt-neg-bg); color: var(--pt-neg); }
.ri-comment { display: flex; align-items: flex-start; gap: 7px; padding: .5rem .75rem; border-radius: 10px; background: var(--pt-card); border: 1px solid var(--pt-row-line); color: var(--pt-ink-2); font-size: .84rem; }
.ri-comment i { color: var(--pt-ink-3); font-size: 1.05rem; margin-top: 1px; }
.ri-foot { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.ri-foot .th-files { flex: 1; min-width: 0; }
.ri-del { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--pt-neg); background: transparent; color: var(--pt-neg); font-weight: 650; font-size: .76rem; padding: .28rem .7rem; border-radius: 9px; cursor: pointer; }
.ri-del:hover { background: var(--pt-neg); color: #fff; }
@media (max-width: 575.98px) { .ri-top { flex-wrap: wrap; } .ri-amount { margin-left: auto; } }

/* ── Request Invoice: the totals, and a block per year ────────────────── */
.ri-totals { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin: .2rem 1.2rem .4rem; padding: .75rem .9rem; border: 1px solid var(--pt-line); border-radius: 12px; background: var(--pt-box); }
.ri-total span { display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .05em; color: var(--pt-ink-3); }
.ri-total b { font-size: 1.35rem; color: var(--pt-ink); letter-spacing: -.01em; }
.ri-total.main b { color: var(--pt-pos); font-size: 1.55rem; }
.ri-total.pend b { color: var(--pt-warn); }
.ri-years { display: flex; flex-wrap: wrap; gap: .4rem; margin-left: auto; }
.ri-ychip { display: inline-flex; align-items: baseline; gap: 6px; padding: .3rem .75rem; border-radius: 999px; background: var(--pt-accent-soft); color: var(--pt-accent); font-size: .8rem; font-weight: 650; }
.ri-ychip i { font-style: normal; font-weight: 700; color: var(--pt-ink); }
.ri-year + .ri-year { margin-top: .6rem; }
.ri-year { display: flex; flex-direction: column; gap: .75rem; }
.ri-year-head { display: flex; align-items: baseline; gap: .8rem; margin: .3rem 0 -.1rem; }
.ri-year-head b { font-size: 1.1rem; color: var(--pt-accent); }
.ri-year-head span { font-size: .8rem; color: var(--pt-ink-3); }

.ri-ychip { border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s; }
.ri-ychip:hover { border-color: var(--pt-accent); }
.ri-ychip.active { background: var(--pt-accent); color: #fff; }
.ri-ychip.active i { color: #fff; }
html[data-pt-theme="dark"] .ri-ychip.active, html[data-pt-theme="dark"] .ri-ychip.active i { color: #0b1020; }

/* the payment date and the invoice file sit on the card's top block, no rows of their own */
.ri-item { gap: .5rem; }
.ri-title b { white-space: normal; }
.ri-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: .45rem; }
.ri-meta .th-file { margin: 0; }
.ri-paid { display: inline-flex; align-items: center; gap: 4px; padding: .22rem .65rem; border-radius: 999px; background: var(--pt-pos-bg); color: var(--pt-pos); font-size: .76rem; font-weight: 650; }
.ri-paid i { font-size: .95rem; }
.ri-paid { flex: 0 0 auto; white-space: nowrap; font-size: .68rem; padding: .15rem .55rem; }
.ri-paid i { font-size: .82rem; }
.ri-pay-top { display: flex; align-items: center; gap: .85rem; }
.ri-pay { display: flex; flex-direction: column; align-items: flex-end; gap: .4rem; }
.ri-title small.ri-dated { white-space: nowrap; }

/* the invoice date follows the invoice number on the same line; the month is already in the tile */
.ri-title b.ri-num { display: inline; }
.ri-title small.ri-dated { display: inline; margin-left: 4px; }

/* Mobility: a month's files are shown on its row, no dropdown */
.mo-month-top { cursor: default; }
.mo-chips { flex: 0 1 55%; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; min-width: 0; }
.mo-chip { display: inline-flex; align-items: center; max-width: 100%; border-radius: 999px; background: var(--pt-accent-soft); border: 1px solid var(--pt-line); }
.mo-chip a { display: inline-flex; align-items: center; gap: 5px; min-width: 0; padding: .28rem .7rem; color: var(--pt-accent); font-size: .78rem; font-weight: 600; text-decoration: none; }
.mo-chip a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.mo-chip a:hover { text-decoration: underline; }
.mo-chip .delete_monthly_rent { display: grid; place-items: center; width: 22px; height: 22px; margin-right: 4px; border-radius: 50%; cursor: pointer; color: var(--pt-neg); }
.mo-chip .delete_monthly_rent:hover { background: var(--pt-neg-bg); }
@media (max-width: 575.98px) { .mo-month-top { flex-wrap: wrap; } .mo-chips { flex-basis: 100%; justify-content: flex-start; } }

/* a day with worked hours and leave that add up to more than 8 hours */
.tf-day.clash { box-shadow: inset 0 0 0 2px var(--pt-warn); }
.tf-clash { display: none; gap: 8px; align-items: flex-start; padding: .75rem 1rem; border-radius: 12px; background: var(--pt-warn-bg); border: 1px solid var(--pt-warn); color: var(--pt-warn); font-weight: 650; font-size: .85rem; }
.tf-clash.on { display: flex; }
.tf-clash i { font-size: 1.2rem; }
