:root {
  --bg: var(--pt-bg, #f4f6f9);
  --surface: var(--pt-surface, #fff);
  --surface-soft: #f8fafc;
  --surface-blue: #edf5f7;
  --line: var(--pt-line, #d9e2eb);
  --line-soft: #e8edf2;
  --text: var(--pt-text, #202938);
  --muted: var(--pt-muted, #4e6075);
  --muted-light: #5b6b7c;
  --blue: var(--pt-accent, #195d77);
  --blue-dark: var(--pt-accent-dark, #12465c);
  --blue-soft: var(--pt-accent-soft, #e9f3f6);
  --primary: var(--blue);
  --radius-lg: var(--pt-radius, 12px);
  --shadow: 0 1px 3px #172b4010;
  --sidebar-width: 226px;
}

body { font-family: var(--pt-font, Inter, 'Segoe UI', system-ui, sans-serif); font-size: 14px; }
body::before { display: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }

.sidebar { height: 100dvh; padding: 14px 11px 12px; color: var(--text); background: #fff; border-right: 1px solid var(--line); box-shadow: none; }
.sidebar > .brand { margin: 0 4px 16px; color: var(--text); }
.brand-mark, .login-brand-mark { background: var(--blue-dark); color: #fff; border: 0; border-radius: 10px; box-shadow: none; }
.brand-copy small { color: var(--muted); font-size: 11px; font-weight: 560; letter-spacing: 0; text-transform: none; }
.workspace-switch { margin: 0 3px 12px; padding: 9px 30px 9px 10px; color: var(--blue-dark); background: var(--surface-blue); border-color: var(--line); }
.workspace-switch:hover { transform: none; border-color: var(--blue); background: var(--blue-soft); }
.workspace-switch strong { font-size: 13px; }
.workspace-switch-arrow { display: flex; color: var(--blue); }
.main-nav, .admin-nav, .nav-group-links { display: grid; gap: 3px; overflow: visible; }
.admin-nav:not([open]) > .nav-group-links { display: none; }
.nav-caption { margin: 8px 8px 4px; color: var(--muted); font-size: 11px; font-weight: 640; letter-spacing: 0; text-transform: none; }
.nav-item { min-height: 37px; padding: 0 8px; gap: 8px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 590; }
.nav-item::before { display: none; }
.nav-item:hover, .nav-item.active { transform: none; color: var(--blue-dark); background: var(--blue-soft); border-color: transparent; }
.nav-item.active { box-shadow: inset 3px 0 var(--blue); font-weight: 680; }
.nav-icon { flex-basis: 19px; width: 19px; color: var(--blue); font-size: 16px; }
.nav-badge { background: var(--warning-soft); color: var(--warning); }
.nav-group-toggle { display: flex; min-height: 37px; align-items: center; justify-content: space-between; margin-top: 7px; padding: 6px 8px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 12px; font-weight: 650; cursor: pointer; }
.nav-group-toggle::after { content: ''; width: 7px; height: 7px; margin-right: 3px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.admin-nav[open] .nav-group-toggle::after { transform: rotate(225deg); }
.nav-group-links { padding-inline-start: 5px; }
.sidebar-profile { padding: 12px 3px 0; border-color: var(--line); }
.main-nav { min-height: 0; margin: 0 -3px 12px; padding: 2px 3px; overflow-y: auto; scrollbar-width: thin; overscroll-behavior: contain; }
.sidebar > .brand, .sidebar > .workspace-switch, .sidebar-profile { flex-shrink: 0; }
.avatar { color: var(--blue-dark); background: var(--blue-soft); border-color: var(--line); }
.sidebar-profile-copy strong { color: var(--text); font-size: 12px; }
.sidebar-profile-copy small { color: var(--muted); font-size: 11px; }
.sidebar-close, .sidebar-backdrop { display: none; }
.sidebar-collapsed { grid-template-columns: minmax(0,1fr); }
.sidebar-collapsed > .sidebar { display: none; }

.topbar { min-height: 68px; padding: 10px 24px; gap: 12px; justify-content: flex-start; background: #fff; border-color: var(--line); backdrop-filter: none; }
.topbar-title { flex: 1 1 auto; }
.topbar-title h1 { width: fit-content; max-width: 100%; margin: 2px 0; font-size: 23px; font-weight: 690; }
.topbar-title .eyebrow { font-size: 11px; text-transform: none; letter-spacing: 0; color: var(--muted); }
.topbar-actions { flex-wrap: wrap; justify-content: flex-end; }
.topbar-actions:empty { display: none; }
.password-reminder-wrap { max-width: 1560px; margin: 16px auto 0; padding-inline: 24px; }
.password-reminder { justify-content: space-between; align-items: center; gap: 10px 16px; }
.password-reminder .button { flex: none; }
.menu-toggle { flex: 0 0 38px; width: 38px; height: 38px; }
.menu-toggle-icon { width: 16px; height: 12px; border: solid currentColor; border-width: 1.5px 0; position: relative; }
.menu-toggle-icon::after { content: ''; position: absolute; inset: 4px 0 auto; border-top: 1.5px solid currentColor; }
.page-content { max-width: 1560px; padding: 20px 24px 48px; }
.page-content > *, .page-grid > *, .stack > *, .card-header > div, .payslip-admin-layout > *, .profile-layout-v2 > * { min-width: 0; }
.card-header { align-items: center; padding: 14px 16px; }
.card-header h2, .card-header h3, .dashboard-section-header h2 { font-size: 16px; font-weight: 680; }
.card-header p, .profile-page-v2 .card-header p { font-size: 12px; }
.card-body { padding: 15px 16px; }
.field > span, .field-label { color: var(--text); font-size: 13px; font-weight: 650; }
.field-help, .notice-copy p { font-size: 12px; }
.button { min-height: 38px; border-radius: 8px; font-size: 13px; font-weight: 650; box-shadow: none; }
.button:hover { transform: none; }
.button-primary, .button-primary:hover { border-color: var(--blue); background: var(--blue); color: #fff; }
.button-primary:hover { background: var(--blue-dark); }
.button-secondary { color: var(--blue-dark); border-color: var(--line); background: var(--surface-blue); }
.button-secondary:hover { border-color: var(--blue); background: var(--blue-soft); }
.button-small { min-height: 33px; font-size: 12px; }
.button:disabled { opacity: .64; }
.compact-select { font-size: 12px; font-weight: 630; text-transform: none; letter-spacing: 0; }
.compact-select select { font-size: 13px; }
.status-pill { font-size: 11px; }
.empty-state p { font-size: 13px; }

.table-shell { min-width: 0; max-width: 100%; border-radius: 10px; scrollbar-width: auto; }
.table-shell table { font-size: 13px; }
.table-shell th { color: var(--muted); background: var(--surface-soft); text-transform: none; font-size: 12px; letter-spacing: 0; }
.table-shell td { vertical-align: middle; }
.table-shell td:first-child { overflow-wrap: anywhere; }
.table-shell .table-muted { font-size: 11px; }
.table-shell tbody tr:hover { background: #eef5f8; }
.employee-modal-open { overflow: hidden; }
.modal-root, .modal-header { backdrop-filter: none; }
.modal-root { background: #17293870; }
.modal { border-radius: 12px; animation: none; }
.modal-header { background: #fff; }
.modal-header p { font-size: 12px; }
.toast p { font-size: 12px; }

.dashboard-greeting h2 { margin: 0 0 3px; font-size: 24px; font-weight: 680; }
.dashboard-greeting p { font-size: 13px; }
.dashboard-greeting p::first-letter, .sheet-summary h2::first-letter { text-transform: uppercase; }
.dashboard-quiet-status { display: flex; align-items: center; gap: 6px; }
.dashboard-quiet-status span { color: var(--success); font-weight: 750; }
.dashboard-attention-card .card-header { padding-block: 11px 0; border-bottom: 0; }
.dashboard-attention-card .dashboard-attention-list { padding-block: 4px 7px; }
.dashboard-attention-card .dashboard-attention-item { padding-block: 7px; }
.dashboard-attention-copy strong, .dashboard-compact-empty strong, .dashboard-event-copy strong { font-size: 13px; }
.dashboard-attention-copy p, .dashboard-compact-empty p, .dashboard-event-copy small, .dashboard-payslip-meta, .dashboard-muted-state, .dashboard-progress-head { font-size: 12px; }
.dashboard-fact-row span, .dashboard-fact-row strong { font-size: 12px; }
.dashboard-event-value { font-size: 14px; }
.employee-dashboard-v2 .dashboard-main-grid { grid-template-columns: minmax(0,1.25fr) minmax(290px,1fr); }
.dashboard-section-header { flex-wrap: wrap; gap: 8px 12px; }
.employee-dashboard-v2 .dashboard-period-item { grid-template-columns: minmax(0,1fr) auto; }
.employee-dashboard-v2 .dashboard-vacation-card .progress-track { height: 5px; margin-block: 0 10px; }
.employee-dashboard-v2 .dashboard-muted-state { margin-block: 0; }
.dashboard-payslip-period { font-size: 17px; text-transform: none; }
.dashboard-payslip-period::first-letter { text-transform: uppercase; }

.profile-summary-card { border-color: var(--line); }
.profile-summary-body { padding: 16px 18px; }
.profile-summary-person .profile-avatar { flex-basis: 48px; height: 48px; border-radius: 10px; background: var(--blue-soft); color: var(--blue-dark); box-shadow: none; font-size: 15px; }
.profile-summary-person .profile-heading h2 { font-size: 19px; }
.profile-summary-person .eyebrow { color: var(--muted); text-transform: none; letter-spacing: 0; }
.profile-sections { display: flex; flex-wrap: wrap; gap: 5px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: #fff; width: fit-content; }
.profile-sections button { min-height: 36px; padding: 7px 10px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.profile-sections button:hover { border-color: var(--line); }
.profile-sections button[aria-selected='true'] { background: var(--blue-soft); color: var(--blue-dark); font-weight: 700; }
.profile-form-result { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.profile-form-status { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.profile-form-status.is-error { color: var(--danger); }
.profile-layout-v2 { grid-template-columns: minmax(0,1fr) minmax(290px,.75fr); }
.profile-contact-grid { grid-template-columns: minmax(0,1fr) minmax(130px,.6fr); }
.profile-facts-v2 > div { display: grid; grid-template-columns: minmax(100px, .8fr) minmax(0,1.2fr); align-items: baseline; gap: 5px 12px; padding-block: 8px; }
.profile-facts-v2 dt, .profile-facts-v2 dd small { font-size: 12px; }
.profile-facts-v2 dd { overflow-wrap: anywhere; }
.profile-security-card { max-width: 540px; }
.profile-payroll-preview { border-top: 0; }
.profile-payroll-preview .payroll-explainer { padding-top: 0; }
.profile-payroll-body { gap: 0; }

.employee-vacations-v2 .card { box-shadow: var(--shadow); }
.campaign-banner { min-width: 0; padding: 15px 17px; background: var(--surface); border-color: var(--line); }
.campaign-banner h2 { font-size: 18px; }
.vacation-campaign-head { min-height: 0; background: var(--surface); border-color: var(--line); border-radius: var(--radius-lg); }
.vacation-campaign-head p, .vacation-state-copy p, .vacation-readiness-item strong, .vacation-readiness-item small, .vacation-calendar-legend, .vacation-selection-panel .mini-hint, .vacation-period-item .period-copy small { font-size: 12px; }
.vacation-campaign-head .eyebrow, .vacation-status-pill, .vacation-ready-badge { font-size: 11px; }
.vacation-colleague-control > span, .vacation-deadline-compact span { font-size: 11px; text-transform: none; }
.vacation-deadline-compact strong { font-size: 13px; }
.vacation-readiness-list { grid-template-columns: repeat(3,minmax(0,1fr)); }
.vacation-selection-panel { top: 76px; box-shadow: none; }
.vacation-year-calendar .month-card h4 { font-size: 13px; }
.vacation-year-calendar .month-grid .calendar-day, .vacation-year-calendar .month-grid .calendar-day-empty { min-height: 26px; }
.vacation-year-calendar .month-grid button.calendar-day, .vacation-year-calendar .month-grid span.calendar-day { font-size: 11px; }
.vacation-year-calendar .month-grid .day-weekend:not(.day-vacation):not(.day-confirmed) { color: #875359; }
.payslip-file-icon { background: var(--blue-soft); color: var(--blue-dark); box-shadow: none; }
.payslip-card-main { padding: 14px 16px; }
.payslip-card-copy h2 { font-size: 16px; }
.payslip-meta, .payslip-batch-item small { font-size: 12px; }
.payslip-admin-layout > main { min-width: 0; }
.employee-directory .search-field { flex: 1 1 270px; max-width: 390px; }
.employee-directory .table-actions { min-width: 190px; }
.employee-management > summary { padding: 12px 16px; color: var(--blue-dark); font-weight: 650; cursor: pointer; }
.employee-management-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; border-top: 1px solid var(--line-soft); }
.employee-management-controls .field { flex: 0 1 345px; }


.sheet-controls { flex-wrap: wrap; justify-content: flex-start; gap: 12px 22px; }
.sheet-controls .field { flex: 0 1 360px; }
.sheet-controls .period-controls { margin-left: 0; }
.sheet-controls select { min-height: 40px; }
.sheet-period-selection { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; }
.sheet-period-buttons { display: flex; gap: 5px; }
.sheet-period-buttons .button { width: 37px; height: 40px; padding: 0; font-size: 23px; line-height: 1; }
.sheet-summary, .sheet-actions, .sheet-actions-buttons { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sheet-summary { justify-content: space-between; }
.sheet-summary h2 { margin: 0; font-size: 17px; }
.sheet-summary span { color: var(--muted); font-size: 12px; }
.sheet-summary-status { display: flex; gap: 10px; align-items: center; }
.sheet-summary-status strong { min-width: 55px; color: var(--blue-dark); text-align: end; font-variant-numeric: tabular-nums; }
.sheet-summary-status .status-confirmed { color: var(--success); }
.sheet-calendar-warning, .sheet-blocker { margin: 10px 0; }
.sheet-calendar-warning { display: block; font-size: 12px; }
.sheet-help { margin: 12px 0; color: var(--muted); font-size: 12px; }
.sheet-help summary, .sheet-extra-actions summary { width: fit-content; color: var(--blue-dark); cursor: pointer; }
.sheet-help p { max-width: 76ch; margin: 6px 0 0; }
.sheet-actions { position: relative; justify-content: space-between; margin-bottom: 9px; }
.sheet-actions-buttons { margin-inline-start: auto; }
.sheet-save-status { margin: 0; font-size: 12px; color: var(--muted); }
.sheet-save-status:empty { display: none; }
.sheet-save-status.is-dirty { color: #895200; font-weight: 680; }
.sheet-extra-actions { position: relative; align-self: center; }
.sheet-extra-actions summary { padding: 8px 7px; font-size: 12px; }
.sheet-extra-actions > div { position: absolute; z-index: 5; right: 0; display: grid; gap: 4px; min-width: 218px; padding: 7px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); box-shadow: 0 8px 22px #172b4022; }
.sheet-extra-actions .button { justify-content: start; text-align: start; }
.sheet-table { max-height: max(300px, calc(100dvh - 300px)); }
.sheet-table table { min-width: 685px; font-variant-numeric: tabular-nums; }
.sheet-date-col { width: 96px; }
.sheet-plan-col { width: 82px; }
.sheet-kind-col { width: 222px; }
.sheet-fact-col { width: 86px; }
.sheet-table th, .sheet-table td { padding: 5px 8px; }
.sheet-table thead th { z-index: 3; padding-block: 9px; background: #eef4f7; }
.sheet-table tr > :first-child { position: sticky; left: 0; }
.sheet-table thead th:first-child { z-index: 4; }
.sheet-table tbody th { top: auto; z-index: 1; background: #fff; color: var(--text); font-size: 13px; }
.sheet-table tbody th small { color: var(--muted); font-size: 11px; font-weight: 500; }
.sheet-table tbody tr:nth-child(even) th { background: #fbfcfd; }
.sheet-table tbody tr.sheet-weekend, .sheet-table tbody tr.sheet-weekend th, .sheet-table tbody tr.sheet-not_employed, .sheet-table tbody tr.sheet-not_employed th { background: #f1f4f7; }
.sheet-table tbody tr.sheet-vacation, .sheet-table tbody tr.sheet-vacation th { background: #edf7f2; }
.sheet-table tbody tr.sheet-holiday_work, .sheet-table tbody tr.sheet-holiday_work th { background: #fff7e7; }
.sheet-table tbody tr.sheet-changed th { box-shadow: inset 3px 0 var(--blue); }
.sheet-table input, .sheet-table select { min-height: 33px; }
.sheet-table input[name=hours] { width: 68px; }
.sheet-table input[name=note] { min-width: 170px; }
.sheet-mobile-label { display: none; }
.sheet-compare { display: grid; gap: 10px; }
.sheet-compare-day { min-width: 0; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.sheet-compare-day legend { padding: 0 5px; font-weight: 650; }
.sheet-compare-values { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.sheet-compare-values > div { min-width: 0; padding: 8px 10px; border-radius: 8px; background: var(--surface-soft); }
.sheet-compare-values p { margin: 3px 0 0; overflow-wrap: anywhere; }
.sheet-compare-note { white-space: pre-wrap; }
.sheet-compare-options { display: flex; flex-wrap: wrap; gap: 5px 18px; margin-top: 8px; }
.sheet-compare-options label { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; }
.sheet-compare-options p { flex-basis: 100%; margin: 0; }
.sheet-compare .form-actions { margin-top: 4px; }

.login-page-minimal { background: var(--bg); }
.login-minimal-card { padding: 28px; border-color: var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.login-brand { margin-bottom: 23px; }
.login-minimal-heading h1 { margin: 0 0 20px; font-size: 25px; }
.login-minimal-card .field input, .login-minimal-card .button-wide { min-height: 44px; }
.login-page-minimal .password-field button { min-height: 36px; padding-inline: 6px; }

@media (max-width: 900px) {
  .sidebar { width: min(300px, calc(100vw - 52px)); box-shadow: none; visibility: hidden; transition: none; }
  .sidebar.open { visibility: visible; }
  .sidebar > .brand { margin-right: 40px; }
  .sidebar-close { display: grid; position: absolute; top: 13px; right: 10px; }
  .sidebar-backdrop:not([hidden]) { display: block; position: fixed; z-index: 35; inset: 0; border: 0; border-radius: 0; background: #17293860; }
  .employee-menu-open { overflow: hidden; }
  .sidebar-profile { padding-bottom: 8px; }
  .nav-item { min-height: 42px; }
  .topbar { padding-inline: 16px; }
  .page-content { padding-inline: 16px; }
  .password-reminder-wrap { padding-inline: 16px; }
  .employee-dashboard-v2 .dashboard-main-grid, .profile-layout-v2 { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 700px) {
  .topbar { min-height: 62px; padding: 8px 12px; align-items: center; gap: 9px; }
  .topbar-title h1 { font-size: 19px; overflow-wrap: anywhere; }
  .topbar-title .eyebrow { font-size: 10px; }
  .topbar-actions { flex: 1 1 100%; justify-content: flex-start; }
  .topbar:has(.topbar-actions:not(:empty)) { flex-wrap: wrap; }
  .topbar-actions .button span.hide-mobile { display: inline; }
  .topbar-actions .button { min-height: 35px; }
  .page-content { padding: 13px 12px 34px; }
  .password-reminder-wrap { margin-top: 12px; padding-inline: 12px; }
  .password-reminder { flex-wrap: wrap; }
  .button-small { min-height: 36px; }
  .employee-directory .search-field { flex-basis: 100%; }
  .dashboard-greeting h2 { font-size: 20px; }
  .employee-dashboard-v2 .dashboard-greeting { align-items: flex-start; flex-wrap: wrap; gap: 5px 12px; }
  .vacation-readiness-list, .profile-contact-grid { grid-template-columns: minmax(0,1fr); }
  .card-header { flex-wrap: wrap; gap: 8px; }
  .card-body, .card-header { padding-inline: 12px; }
  .profile-summary-body { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; }
  .profile-sections { width: 100%; }
  .profile-sections button { font-size: 12px; }
  .sheet-actions { align-items: flex-start; flex-direction: column; }
  .sheet-actions-buttons { margin-inline-start: 0; }
  .sheet-controls .field { flex: 1 1 100%; }
  .sheet-controls { gap: 8px; }
  .sheet-controls .period-controls { flex-wrap: nowrap; }
  .sheet-extra-actions > div { right: auto; left: 0; }
  .sheet-table table { min-width: 545px; }
  .sheet-date-col { width: 72px; }
  .sheet-plan-col { width: 59px; }
  .sheet-kind-col { width: 118px; }
  .sheet-fact-col { width: 70px; }
  .sheet-table th, .sheet-table td { padding-inline: 5px; }
  .sheet-table input[name=hours] { width: 59px; }
}
@media screen and (max-width: 600px) {
  .sheet-table { max-height: max(275px, 58dvh); }
  .sheet-table table, .sheet-table tbody { display: block; min-width: 0; }
  .sheet-table colgroup { display: none; }
  .sheet-table thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
  .sheet-table tbody tr { display: grid; grid-template-columns: minmax(0,1fr) minmax(61px, .38fr); gap: 8px 10px; padding: 10px; border-bottom: 1px solid var(--line); }
  .sheet-table tbody tr:last-child { border-bottom: 0; }
  .sheet-table tbody tr.sheet-changed { box-shadow: inset 3px 0 var(--blue); }
  .sheet-table tbody tr th, .sheet-table tbody tr td { position: static; min-width: 0; padding: 0; border: 0; background: transparent; }
  .sheet-table tbody tr.sheet-changed th { box-shadow: none; }
  .sheet-table tbody th { align-self: start; }
  .sheet-table .sheet-plan { justify-self: end; text-align: end; }
  .sheet-table .sheet-note { grid-column: 1 / -1; overflow-wrap: anywhere; }
  .sheet-table input, .sheet-table select { min-height: 37px; }
  .sheet-table input[name=hours], .sheet-table input[name=note], .sheet-table select { width: 100%; min-width: 0; max-width: none; }
  .sheet-mobile-label { display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; font-weight: 650; }
  .sheet-calendar-warning { padding: 8px 10px; margin-block: 9px; }
  .sheet-help { margin-block: 8px; }
}
@media (max-width: 380px) {
  .sheet-extra-actions > div { max-width: calc(100vw - 52px); }
  .profile-facts-v2 > div { grid-template-columns: minmax(0,1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@media print {
  .portal-skip-link, .sidebar-backdrop { display: none !important; }
  .sheet-table { max-height: none; overflow: visible; }
  .sheet-table thead th, .sheet-table tbody th { position: static; }
}
