:root { color: #202521; background: #f2f3ef; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, select, a { font: inherit; }
button, .button { min-height: 48px; }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 3px solid #b68b52; outline-offset: 3px; }
.brand { margin: 0; color: #263b31; font-family: Georgia, serif; font-size: 1.7rem; font-weight: 700; letter-spacing: .02em; }
.subtitle { margin: .25rem 0 0; color: #69716b; font-size: .88rem; letter-spacing: .1em; text-transform: uppercase; }
.login-page, .startup { display: grid; min-height: 100vh; place-items: center; padding: 1.25rem; }
.login-card { width: min(100%, 430px); padding: clamp(1.5rem, 6vw, 3rem); border: 1px solid #dedfd9; border-radius: 20px; background: #fff; box-shadow: 0 20px 50px rgba(29, 43, 35, .08); }
.login-header { padding-bottom: 2rem; border-bottom: 1px solid #e7e8e3; }
.login-actions h1 { margin: 2rem 0 1.25rem; font-size: 1.35rem; }
.button { display: inline-flex; width: 100%; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 10px; padding: .75rem 1rem; cursor: pointer; font-weight: 650; text-decoration: none; }
.button:disabled { cursor: not-allowed; opacity: .5; }
.primary { background: #294a3b; color: #fff; }
.primary:hover { background: #203d31; }
.secondary, .telegram-link { margin-top: .75rem; border-color: #aeb8b1; background: #fff; color: #294a3b; }
.text-button { margin-top: .5rem; background: transparent; color: #53625a; font-weight: 550; }
.telegram-fallback { display: block; margin: .65rem auto .25rem; color: #53625a; font-size: .88rem; text-align: center; text-underline-offset: .18em; }
.onboarding-prompt { margin: .8rem 0 0; color: #69716b; font-size: .9rem; text-align: center; }
.onboarding-link { min-height: 0; border: 0; padding: .25rem .1rem; background: transparent; color: #315f4b; cursor: pointer; font-weight: 650; text-decoration: underline; text-underline-offset: .18em; }
.onboarding-link:hover { color: #203d31; text-decoration-thickness: 2px; }
.onboarding-link:disabled { cursor: not-allowed; opacity: .5; }
.status { min-height: 1.5rem; color: #59635d; line-height: 1.5; }
.status.error { color: #8b352d; }
.status.success { color: #267044; }
.secure-note { margin-top: 1.5rem; color: #69716b; font-size: .86rem; }
.language-label { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.25rem; color: #59635d; font-size: .85rem; }
.language-select { width: auto; min-width: 7.5rem; min-height: 42px; border: 1px solid #aeb8b1; border-radius: 9px; appearance: none; background-color: #fff; background-image: linear-gradient(45deg, transparent 50%, #53625a 50%), linear-gradient(135deg, #53625a 50%, transparent 50%); background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-repeat: no-repeat; background-size: 5px 5px, 5px 5px; padding: .55rem 2rem .55rem .75rem; color: #294a3b; font-size: .9rem; font-weight: 600; line-height: 1.2; cursor: pointer; }
.language-select:hover { border-color: #718078; background-color: #fafbf9; }
.shell { min-height: 100vh; }
.sidebar { display: flex; flex-direction: column; padding: 1.2rem; background: #23352c; color: #f7f5ef; }
.sidebar .brand { color: #fff; }.sidebar .subtitle { color: #b9c5bd; }
.nav { display: flex; gap: .4rem; margin: 1.2rem 0; overflow-x: auto; }
.nav-item { min-height: 44px; border: 0; border-radius: 8px; padding: .65rem .8rem; background: transparent; color: #d9dfdb; text-align: left; white-space: nowrap; }
.nav-item:not(:disabled):not(.active):hover { background: #30483b; color: #fff; }
.nav-item.active { background: #f7f5ef; box-shadow: inset 4px 0 #b68b52; color: #23352c; font-weight: 750; }
.nav-item:disabled:not(.active) { opacity: .55; }
.profile { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .15rem 1rem; }
.profile span { color: #bdc7c1; font-size: .85rem; }.profile .logout { grid-column: 2; grid-row: 1 / span 2; width: auto; min-height: 42px; background: transparent; border-color: #68786f; color: #fff; }
.content { padding: clamp(1.25rem, 5vw, 3.5rem); outline: none; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; margin-bottom: 2.25rem; }
.page-header > * { min-width: 0; }
.page-header h1 { margin: 0; font: 700 clamp(1.8rem, 4vw, 2.5rem) Georgia, serif; color: #263b31; }
.date { margin: .5rem 0 0; color: #667069; font-size: .9rem; }
.page-header .language-label { flex: 0 0 auto; margin: 0; font-size: 0; }
.dashboard-section { margin-bottom: 2.2rem; }.dashboard-section h2 { margin: 0 0 .85rem; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: #657069; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .8rem; }
.stat-card { min-height: 125px; padding: 1.2rem; border: 1px solid #dedfd9; border-radius: 14px; background: #fff; }
.stat-card.attention { border-color: #d7b69a; background: #fffaf5; }
.stat-label { margin: 0; color: #59635d; }.stat-value { margin: .7rem 0 0; color: #263b31; font-size: 2rem; font-weight: 750; }
.settings-section { max-width: 760px; }.settings-section h2 { font-size: 1.35rem; }
.settings-tabs { display: flex; flex-wrap: wrap; gap: .25rem .5rem; margin: -1rem 0 1.5rem; border-bottom: 1px solid #d8ddd8; }
.settings-tab { min-width: 0; min-height: 44px; border: 0; border-bottom: 3px solid transparent; padding: .6rem .9rem; overflow-wrap: anywhere; background: transparent; color: #53625a; cursor: pointer; }
.settings-tab.active { border-bottom-color: #315f4b; color: #203d31; font-weight: 750; }
.access-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.access-grid { display: grid; gap: 1rem; margin-top: 1rem; }
.access-card { min-width: 0; padding: 1.2rem; overflow-wrap: anywhere; border: 1px solid #dedfd9; border-radius: 14px; background: #fff; }
.access-card h3 { margin: 0; }.access-role { margin: .2rem 0 1rem; color: #657069; text-transform: capitalize; }
.access-details { display: grid; grid-template-columns: minmax(130px, 1fr) 1fr; gap: .45rem 1rem; }
.access-details dt { min-width: 0; color: #657069; }.access-details dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-weight: 650; }
.access-state { margin: 1rem 0; padding: .65rem; border-radius: 8px; background: #f1f4f1; font-weight: 700; }
.access-state.ready { color: #267044; }.access-state.awaiting_first_passkey { color: #856111; background: #fff8df; }
.access-actions { display: flex; align-items: stretch; flex-wrap: wrap; gap: .7rem; min-width: 0; }
.access-actions > .button { white-space: normal; }
.access-actions small { flex: 1 0 100%; color: #6e625e; }.access-confirmation { flex: 1 1 100%; min-width: 0; padding: .8rem; border-left: 3px solid #b68b52; background: #fffaf2; }
.passkey-list { display: grid; gap: .8rem; margin: 1.25rem 0; }
.passkey-card { display: grid; gap: .55rem; padding: 1.2rem; border: 1px solid #dedfd9; border-radius: 14px; background: #fff; color: #59635d; }
.passkey-card strong { overflow-wrap: anywhere; color: #263b31; font-size: 1.1rem; }.passkey-kind { color: #35634e; font-weight: 650; }
.passkey-controls { min-width: 0; }.edit-label { display: grid; gap: .35rem; margin-top: .5rem; font-weight: 650; }.passkey-label { width: 100%; min-width: 0; min-height: 44px; border: 1px solid #cbd0cb; border-radius: 8px; padding: .55rem .7rem; }
.compact { flex: 0 0 auto; width: max-content; max-width: 100%; margin: 0; }.save-row { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-top: .65rem; }.rename-passkey { min-height: 40px; padding: .5rem .75rem; }
.action-feedback { min-height: 1.5rem; margin: 0; color: #59635d; line-height: 1.5; }
.action-feedback.success { color: #267044; font-weight: 650; }.action-feedback.error { color: #8b352d; font-weight: 650; }
.action-feedback.progress { color: #465c50; font-weight: 600; }
.add-passkey { width: max-content; }.add-passkey-controls { margin-top: .5rem; }.passkey-continuation { max-width: 330px; margin-top: .75rem; }.add-passkey-controls > .action-feedback { margin-top: .65rem; }
.revoke-controls { display: grid; justify-items: start; gap: .45rem; margin-top: .3rem; }
.button.danger { color: #9b2929; border-color: #d8aaaa; background: #fffafa; }
.button.danger:hover:not(:disabled) { background: #faeaea; }.button.danger:disabled { opacity: .55; }
.revoke-confirmation { display: grid; gap: .45rem; padding: .8rem; border-left: 3px solid #b54141; background: #fff8f8; }
.revoke-confirmation strong { color: #762222; }.last-passkey-note { color: #6e625e; }
@media (min-width: 850px) {
  .shell { display: grid; grid-template-columns: 245px 1fr; }.sidebar { position: sticky; top: 0; height: 100vh; padding: 2rem 1.4rem; }
  .nav { flex: 1; flex-direction: column; margin-top: 3rem; overflow: visible; }.profile { display: flex; align-items: stretch; flex-direction: column; }.profile .logout { margin-top: 1rem; }
}
@media (max-width: 480px) {
  .content { padding-inline: 1rem; }
  .page-header { align-items: flex-start; flex-direction: column; margin-bottom: 1.75rem; }
  .page-header .language-label, .page-header .language-select { width: 100%; }
  .settings-tabs { margin-top: -.5rem; }
  .settings-tab { flex: 1 1 10rem; }
  .access-heading { align-items: stretch; flex-direction: column; }
  .access-heading .button { width: 100%; }
  .access-card { padding: 1rem; }
  .access-details { grid-template-columns: minmax(0, 1fr); gap: .2rem; }
  .access-details dd { margin-bottom: .55rem; }
  .access-actions > .button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }

/* Low-frequency, owner-only access revocation flow. */
.danger-zone { max-width: 760px; margin-top: 2rem; padding: clamp(1rem, 3vw, 1.5rem); border: 1px solid #d8bcbc; border-radius: 14px; background: #faf6f4; }
.danger-zone h2 { margin: .2rem 0 .5rem; color: #542d2d; }
.danger-eyebrow { margin: 0; color: #9b2929; font-size: .78rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.danger-description { max-width: 65ch; margin: 0 0 1.25rem; color: #5f625e; line-height: 1.55; }
.revocation-mode { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; border: 0; padding: 0; }
.revocation-mode legend { width: 100%; margin-bottom: .35rem; color: #4e5952; font-weight: 700; }
.revocation-mode label { position: relative; flex: 1 1 145px; cursor: pointer; }
.revocation-mode input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.revocation-mode span { display: flex; min-height: 48px; align-items: center; justify-content: center; border: 1px solid #b9c2bc; border-radius: 10px; padding: .65rem; background: #fff; color: #315f4b; font-weight: 700; text-align: center; }
.revocation-mode input:checked + span { border-color: #315f4b; box-shadow: inset 0 0 0 2px #315f4b; background: #eef3f0; }
.revocation-mode input:focus-visible + span, .revocation-candidate input:focus-visible + .candidate-copy { outline: 3px solid #b68b52; outline-offset: 3px; }
.revocation-search { display: block; margin-bottom: .85rem; }.revocation-search input, .confirmation-phrase { width: 100%; min-height: 48px; border: 1px solid #bbc3bd; border-radius: 10px; padding: .7rem .85rem; background: #fff; font: inherit; }
.revocation-candidate-list { display: grid; gap: .65rem; }
.revocation-candidate { position: relative; display: grid; grid-template-columns: auto 1fr; gap: .8rem; align-items: center; min-width: 0; border: 1px solid #d7dbd7; border-radius: 12px; padding: .9rem; background: #fff; cursor: pointer; }
.revocation-candidate:has(input:checked) { border-color: #315f4b; box-shadow: inset 0 0 0 2px #315f4b; background: #f1f6f3; }
.revocation-candidate.revoked { background: #f1f1ee; color: #6f746f; cursor: not-allowed; opacity: .78; }
.revocation-candidate input { width: 20px; height: 20px; accent-color: #315f4b; }.candidate-copy { display: grid; min-width: 0; gap: .16rem; }.candidate-copy strong { color: #263b31; overflow-wrap: anywhere; }.candidate-copy span, .candidate-copy small { color: #657069; }.candidate-copy .already-revoked { color: #762222; font-weight: 750; }
.revocation-info { margin: 1rem 0; border-left: 3px solid #b68b52; border-radius: 8px; padding: .8rem 1rem; background: #fffaf2; color: #625b51; line-height: 1.5; }
.revocation-review { display: grid; gap: 1rem; margin-top: 1rem; padding: 1rem; border: 1px solid #d8c7b1; border-radius: 12px; background: #fff; }.revocation-review h3, .revocation-result h3 { margin: 0; }
.review-summary { display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; margin: 0; }.review-summary dt { color: #657069; }.review-summary dd { margin: 0; font-weight: 750; }.review-targets { display: grid; gap: .4rem; margin: 0; padding: 0; list-style: none; }.review-targets li { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid #e3e5e1; padding: .5rem 0; }.review-targets span { color: #657069; }
.button.danger.destructive { border-color: #9b2929; background: #9b2929; color: #fff; }.button.danger.destructive:hover:not(:disabled) { background: #7e2020; }
.revocation-result { display: grid; gap: .75rem; }.revocation-result.partial { border-left: 4px solid #b68b52; padding-left: 1rem; }.cleanup-status { display: grid; gap: .6rem; border-radius: 10px; padding: 1rem; background: #f2f3ef; }.cleanup-status h4 { margin: 0; }.cleanup-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: .3rem 0 0; }.cleanup-metrics div { border-radius: 8px; padding: .7rem; background: #fff; }.cleanup-metrics dt { color: #657069; font-size: .85rem; }.cleanup-metrics dd { margin: .2rem 0 0; font-size: 1.2rem; font-weight: 750; }.authorized-incomplete { color: #795a1d; font-weight: 700; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 480px) { .danger-zone { padding: 1rem; }.revocation-mode { flex-direction: column; }.revocation-mode label { flex-basis: auto; }.revocation-candidate-list, .revocation-candidate, .revocation-continue, .revocation-review .button { width: 100%; }.cleanup-metrics { grid-template-columns: 1fr; }.review-targets li { align-items: flex-start; flex-direction: column; gap: .2rem; } }

/* Compact, owner-only personnel governance. */
.personnel-policy-page { display: grid; gap: 1.25rem; width: min(1080px, 100%); }
.policy-section { min-width: 0; border: 1px solid #dcdfda; border-radius: 14px; padding: clamp(1rem, 2.5vw, 1.5rem); background: #fff; }
.policy-section > h2 { margin: 0 0 .35rem; color: #294a3b; font: 700 1.35rem Georgia, serif; }
.section-intro { max-width: 70ch; margin: 0 0 1.25rem; color: #657069; line-height: 1.5; }
.group-heading { margin: 0 0 .65rem; color: #4f5c55; font-size: .78rem; letter-spacing: .09em; text-transform: uppercase; }
.personnel-list, .relationship-list { display: grid; gap: .55rem; }
.employee-create-form { display:grid; gap:1rem; padding:1rem; border:1px solid #d8ded9; border-radius:11px; background:#fff; }
.employee-create-header h3,.employee-create-header p { margin:0; }.employee-create-header h3 { color:#294a3b; }.employee-create-header p { margin-top:.3rem; color:#68726c; font-size:.88rem; }
.employee-create-content { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:1rem; min-width:0; }
.employee-create-column { display:grid; align-content:start; gap:1rem; min-width:0; }
.employee-create-section { display:grid; align-content:start; gap:.75rem; min-width:0; border-radius:9px; padding:.85rem; background:#f8f8f5; }
.employee-create-section h4 { margin:0; color:#294a3b; font-size:.9rem; }
.employee-create-form input:not([type="checkbox"]),.employee-create-form select { box-sizing:border-box; width:100%; min-width:0; height:42px; border:1px solid #b8c1bb; border-radius:8px; padding:.5rem; background:white; font:inherit; }
.employee-create-form .compensation-checkboxes label { min-height:36px; cursor:pointer; }
.telegram-onboarding { display:flex; flex-direction:column; align-items:flex-start; gap:.5rem; }
.telegram-status { display:inline-flex; width:fit-content; max-width:100%; align-items:center; gap:.45rem; border:1px solid #cbd2cc; border-radius:999px; padding:.25rem .55rem; background:#fff; color:#45544c; font-size:.85rem; font-weight:650; }
.telegram-status::before { width:.55rem; height:.55rem; flex:none; border:2px solid currentColor; border-radius:50%; content:""; }
.telegram-status.connected { border-color:#a9c8b7; background:#edf7f0; color:#286344; }
.telegram-status.connected::before { background:currentColor; }
.telegram-status.pending { border-color:#d6c292; background:#fff8e6; color:#765a16; }
.telegram-status.pending::before { border-right-color:transparent; }
.telegram-status.disconnected { color:#59635d; }
.telegram-invite-link { box-sizing:border-box; width:100%; min-width:0; }
.telegram-invite-actions { display:flex; flex-wrap:wrap; gap:.5rem; }
.personnel-row { display: grid; grid-template-columns: minmax(180px, 1.3fr) minmax(170px, 1fr) minmax(220px, 1.25fr); gap: .8rem 1.15rem; align-items: start; min-width: 0; border: 1px solid #e0e3de; border-radius: 11px; padding: .75rem .9rem; background: #fdfdfb; }
.personnel-row.inactive { border-style: dashed; background: #f2f3ef; color: #6c736e; opacity: .82; }
.personnel-identity { align-self: center; min-width: 0; }.personnel-identity h3 { margin: 0; overflow-wrap: anywhere; color: #263b31; font-size: 1rem; }
.personnel-identity p { margin: .2rem 0 0; color: #68726c; font-size: .85rem; }
.policy-field { display: grid; min-width: 0; gap: .3rem; color: #4f5c55; font-weight: 650; }
.field-label { font-size: .78rem; }.field-control { display: flex; align-items: center; min-width: 0; gap: .45rem; }
.field-control .language-select, .relationship-add-panel .language-select { width: 100%; min-width: 0; }
.field-feedback { flex: 0 0 auto; min-width: 5.8rem; min-height: 1.2em; color: #59635d; font-size: .78rem; font-weight: 650; }
.field-feedback.success { color: #267044; }.field-feedback.error { color: #8b352d; }.field-feedback.progress { color: #59635d; }
.finance-help { color: #68726c; font-size: .72rem; font-weight: 400; line-height: 1.35; }.finance-help.confidential { color: #655d50; }
.inactive-disclosure, .history-disclosure { margin-top: 1rem; border-top: 1px solid #e1e3df; padding-top: .8rem; }
.inactive-disclosure summary, .history-disclosure summary { min-height: 44px; padding: .7rem .2rem; color: #59635d; font-weight: 700; cursor: pointer; }
.empty-state { margin: 0; border: 1px dashed #d5dad5; border-radius: 10px; padding: 1rem; color: #68726c; background: #f8f8f5; text-align: center; }
.conflicts-section > .button { margin-top: 1rem; }
.relationship-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem; align-items: center; border: 1px solid #e0e3de; border-radius: 11px; padding: .8rem .9rem; background: #fdfdfb; }
.relationship-row h4, .relationship-row p { margin: 0; }.relationship-row p, .relationship-row small { color: #68726c; }
.relationship-row > :last-child:not(:first-child) { grid-column: 1 / -1; }.relationship-row.historical { opacity: .75; }
.button.secondary-danger { border: 1px solid #cda9a5; background: #fff; color: #8b352d; }.button.secondary-danger:hover:not(:disabled) { background: #fff5f4; }
.relationship-add-panel, .relationship-review, .revoke-review { display: grid; gap: .85rem; margin-top: 1rem; border: 1px solid #d8c7b1; border-radius: 12px; padding: 1rem; background: #fffaf2; }
.relationship-add-panel:empty { display: none; }.relationship-add-panel h3, .relationship-review h3, .revoke-review h4 { margin: 0; color: #294a3b; }
.panel-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem; }.relationship-review > p, .revoke-review > p { margin: 0; color: #625f59; }
select:focus-visible, .policy-section button:focus-visible, .inactive-disclosure summary:focus-visible, .history-disclosure summary:focus-visible { outline: 3px solid #b68b52; outline-offset: 2px; }
@media (max-width: 640px) {
  .personnel-row { grid-template-columns: minmax(0, 1fr); gap: .7rem; padding: 1rem; }
  .field-feedback { min-width: 5.4rem; }.relationship-row { align-items: stretch; }
}
@media (max-width: 480px) {
  .policy-section { padding: 1rem; }.field-control { align-items: stretch; flex-direction: column; gap: .2rem; }
  .field-control .language-select, .relationship-add-panel .language-select, .panel-actions .button, .conflicts-section > .button { width: 100%; min-height: 48px; }
  .field-feedback { min-width: 0; min-height: 1.1rem; }.relationship-row { grid-template-columns: minmax(0, 1fr); }
  .relationship-row > .button { width: 100%; min-height: 48px; }.panel-actions { flex-direction: column-reverse; }
}

/* Operational personnel overview. */
.personnel-overview { display:grid; gap:1.25rem; min-width:0; }
.personnel-overview .page-header { margin-bottom:0; }
.personnel-controls { display:grid; gap:.75rem; }
.personnel-period-controls,.personnel-filters{display:flex;gap:.65rem;align-items:center;flex-wrap:wrap}
.personnel-period-controls{justify-content:space-between}.personnel-filters input[type=search]{flex:1 1 280px}.personnel-filters select{flex:0 1 240px}
.period-nav strong{white-space:nowrap;min-width:min(13rem,35vw);text-align:center}
.segments,.period-nav { display:flex; align-items:center; gap:.3rem; }
.segment { min-height:44px; border:1px solid #b8c1bb; padding:.55rem .75rem; background:#fff; color:#315f4b; }
.segment:first-child { border-radius:9px 0 0 9px }.segment:last-child { border-radius:0 9px 9px 0 }.segment.active { background:#315f4b; color:#fff; }
.personnel-controls input[type=search],.personnel-controls select { min-width:0; min-height:44px; border:1px solid #b8c1bb; border-radius:9px; padding:.6rem .75rem; background:#fff; }
.attention-filter { display:flex; min-width:0; min-height:44px; align-items:center; gap:.625rem; white-space:normal; cursor:pointer; }
.attention-filter input[type=checkbox] { flex:0 0 auto; width:22px; height:22px; margin:0; accent-color:#315f4b; }
.attention-filter input[type=checkbox]:focus-visible { outline:3px solid #b68b52; outline-offset:3px; }
.personnel-summary .stat-card { min-height:100px; padding:1rem }.personnel-summary .stat-value { font-size:1.35rem }
.overview-workers { display:grid; gap:.55rem }.overview-worker { border:1px solid #d9ddd8; border-radius:12px; background:#fff; overflow:hidden }
.overview-worker summary { display:grid; grid-template-columns:minmax(160px,1.5fr) minmax(130px,1fr) minmax(180px,1fr); gap:.8rem; align-items:center; min-height:58px; padding:.8rem 1rem; cursor:pointer }.worker-name{font-weight:750;color:#263b31}
.lifecycle-marker{display:inline-block;margin-left:.45rem;padding:.08rem .4rem;border:1px solid #c8cec9;border-radius:999px;color:#667069;font-size:.72rem;line-height:1.35;vertical-align:middle;white-space:nowrap}
.live-status { width:max-content; border-radius:99px; padding:.25rem .55rem; background:#edf1ee; font-size:.82rem; font-weight:700 }.status-WORKING,.status-ON_BREAK{color:#235e3e;background:#eaf4ed}.status-MISSING_CHECKIN{color:#7b4f12;background:#fff4df}
.worker-identity{display:flex;flex-direction:column}.worker-identity small{color:#6b746e;font-weight:400;margin-top:.2rem}.worker-metrics { display:grid; grid-template-columns:repeat(3,1fr); gap:.5rem; padding:.8rem 1rem; background:#f7f7f3 }.worker-metrics p{margin:0}.attention-list{display:flex;min-width:0;flex-wrap:wrap;gap:.5rem;padding:.8rem 1rem}.attention-list span,.attention-chip{max-width:100%;border:0;border-radius:6px;padding:.3rem .5rem;overflow-wrap:break-word;background:#f1f2ef}.attention-chip{cursor:pointer;font:inherit}.attention-warning,.attention-critical{color:#79392f;background:#fff2ec!important}.difference.positive{color:#276044}.difference.negative{color:#8a4438}.finance-secondary,.owner-finance{margin:.5rem 1rem 1rem;color:#5b625d}.owner-finance{border-left:3px solid #b68b52;padding:.7rem 1rem;background:#fffaf2}.owner-finance summary{cursor:pointer;font-weight:700}.finance-rows{display:grid;gap:.25rem;max-width:34rem}.finance-rows p{display:flex;min-width:0;justify-content:space-between;gap:1rem;margin:.15rem 0}.finance-rows p span{min-width:0}.finance-rows p strong{flex:0 0 auto;white-space:nowrap}.finance-rows .finance-primary{margin-bottom:.45rem;border-bottom:1px solid #d9ddd8;padding-bottom:.45rem;font-size:1.08rem;color:#294a3b}.days-toggle{width:auto;min-height:44px;margin:.65rem;border:1px solid #718078;border-radius:9px;padding:.55rem .8rem;background:#fff;color:#315f4b}.days-toggle:hover{border-color:#315f4b;background:#f1f6f3}.updated{margin:0;color:#6b746e;font-size:.82rem;text-align:right}
@media(max-width:720px){.personnel-period-controls,.personnel-filters{flex-direction:column;align-items:stretch}.segments,.period-nav{justify-content:center}.personnel-filters input[type=search],.personnel-filters select{flex-basis:auto}.overview-worker summary{grid-template-columns:1fr 1fr}.worker-metrics{grid-template-columns:1fr}.personnel-summary{grid-template-columns:repeat(2,1fr)}}
@media(max-width:480px){.segments .segment{flex:1;min-height:48px}.period-nav{justify-content:space-between}.period-nav strong{min-width:0}.overview-worker summary{grid-template-columns:1fr;min-height:48px}.personnel-summary{grid-template-columns:1fr 1fr}.personnel-filters input[type=search],.personnel-filters select{width:100%;min-height:48px}.attention-filter{width:100%;min-height:48px}.overview-worker summary,.worker-metrics,.attention-list{padding-block:.65rem}.attendance-detail{overflow-wrap:break-word;line-height:1.45}.finance-rows p{align-items:flex-start}.days-toggle{max-width:calc(100% - 1.3rem)}}
.attendance-detail { margin:.2rem 1rem .8rem; color:#4f5c55; font-weight:650; }
.worker-days { margin:.25rem 1rem 1rem; overflow:hidden; border:1px solid #e0e3de; border-radius:9px; }
.day-row { display:grid; grid-template-columns:.75fr repeat(5,1fr) 1.4fr; gap:.45rem; padding:.5rem .65rem; border-top:1px solid #eceeeb; font-size:.82rem; }
.day-card{width:100%;border:0;background:#fff;color:inherit;text-align:left;cursor:pointer;font:inherit}.day-card:hover{background:#f8faf7}.day-card:focus-visible{outline:3px solid #b68b52;outline-offset:-3px}
.day-row:first-child { border-top:0 }.day-heading { background:#f3f4f0; color:#59635d; }
.top-tasks { margin:.5rem 1rem 1rem; }.top-tasks h4 { margin:0 0 .45rem; color:#294a3b }.top-tasks p { margin:.25rem 0; color:#59635d; }
.refresh-state { display:flex; align-items:center; justify-content:flex-end; gap:.6rem; min-height:1.5rem; color:#8b4d37; font-size:.85rem; }
@media(max-width:720px){.day-heading{display:none}.day-row{grid-template-columns:repeat(2,1fr);gap:.35rem}.day-row span{display:grid;grid-template-columns:minmax(5.5rem,auto) 1fr;gap:.35rem}.day-row span::before{content:attr(data-label);color:#68726c;font-weight:600}.day-row span:first-child{grid-column:1/-1;font-weight:750}.worker-days{border:0}.day-row{margin:.45rem 0;border:1px solid #e0e3de;border-radius:8px}.refresh-state{align-items:stretch;flex-direction:column}.period-nav{flex-wrap:wrap}}
@media(max-width:480px){
  .worker-days{min-width:0;margin:.25rem .65rem .75rem}
  .day-row.day-heading{display:none}
  .day-row{display:block;min-width:0;margin:.5rem 0;padding:.65rem .75rem;font-size:.86rem}
  .day-row>span{display:grid;grid-template-columns:minmax(0,42%) minmax(0,58%);gap:.65rem;padding:.3rem 0;line-height:1.35}
  .day-row>span::before{min-width:0}
  .day-row>span:first-child{display:block;margin-bottom:.25rem;border-bottom:1px solid #eceeeb;padding:0 0 .5rem;font-size:1rem;font-weight:750}
  .day-row>span:first-child::before{content:none}
  .day-row>span:not(:last-child){white-space:normal;word-break:normal;overflow-wrap:normal}
  .day-row>span:last-child{overflow-wrap:break-word}
  .finance-secondary,.owner-finance{min-width:0;margin-inline:.65rem}
  .finance-rows p{gap:.65rem}
  .finance-subrow{padding-left:.65rem}
}
.attendance-review-overlay{position:fixed;inset:0;z-index:1000;display:flex;justify-content:flex-end;background:rgba(25,35,30,.42)}
.attendance-review-panel{width:min(560px,100%);height:100%;overflow:auto;background:#fff;padding:1rem;box-shadow:-5px 0 24px rgba(0,0,0,.16)}
.review-header{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start}.review-header h2,.review-header p{margin:.15rem 0}.review-metrics,.review-items{display:grid;gap:.55rem;margin:1rem 0}.review-metrics p{display:flex;justify-content:space-between;margin:0;border-bottom:1px solid #eceeeb;padding:.45rem}.review-timeline{border-radius:9px;background:#f6f7f3;padding:.8rem}.review-timeline h3,.review-items h3{margin:.2rem 0 .65rem}.review-timeline p{margin:.4rem 0}.review-item{display:grid;gap:.6rem;border:1px solid #dedfda;border-radius:10px;padding:.8rem}.review-reviewed{border-left:4px solid #5f826c}.review-excused{border-left:4px solid #8a8060;background:#fcfbf5}.review-item-heading{display:flex;justify-content:space-between;gap:.7rem}.review-item textarea{box-sizing:border-box;width:100%;min-height:76px;border:1px solid #aeb8b1;border-radius:8px;padding:.55rem;font:inherit}.review-actions{display:flex;flex-wrap:wrap;gap:.45rem}
@media(max-width:480px){.attendance-review-panel{padding:.75rem}.review-actions .button{flex:1 1 100%;min-height:44px}}
.review-feedback{min-height:1.2em;margin:0;color:#79392f;font-size:.88rem}.review-feedback:empty{display:none}

/* Compact Team employee accordion. */
.personnel-directory { display:grid; gap:1rem; }
.team-toolbar { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:.35rem; }
.team-toolbar .group-heading { margin:0; }
.team-toolbar .button { flex:0 0 auto; width:auto; }
.employee-create-slot:empty { display:none; }
.employee-create-actions { display:flex; align-items:center; justify-content:flex-end; gap:.6rem; }
.employee-card-header { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:1rem; width:100%; border:0; padding:.85rem 1rem; background:transparent; color:inherit; text-align:left; cursor:pointer; }
.employee-card-header:hover { background:#f7f8f4; }
.employee-card-header:focus-visible { outline:3px solid #b68b52; outline-offset:-3px; }
.employee-card-summary { display:grid; gap:.25rem; min-width:0; }
.employee-name-line { display:flex; align-items:baseline; justify-content:space-between; gap:1rem; color:#263b31; }
.employee-name-line strong { overflow-wrap:anywhere; }
.employee-id { color:#778079; font-size:.78rem; font-weight:650; white-space:nowrap; }
.employee-meta,.employee-configuration { color:#68726c; font-size:.85rem; line-height:1.35; }
.employee-chevron { align-self:center; color:#59635d; font-size:1.35rem; transition:transform .18s ease; }
.employee-card-header[aria-expanded="true"] .employee-chevron { transform:rotate(180deg); }
.personnel-row { display:block; overflow:hidden; padding:0; }
.personnel-row.inactive { opacity:.9; }
.employee-card-body { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:1rem; border-top:1px solid #e0e3de; padding:1rem; background:#fff; }
.employee-card-body[hidden] { display:none; }
.employee-edit-column { display:grid; align-content:start; gap:1rem; min-width:0; }
.employee-edit-section { display:grid; align-content:start; gap:.75rem; min-width:0; border-radius:9px; padding:.85rem; background:#f8f8f5; }
.employee-edit-section h4 { margin:0; color:#294a3b; font-size:.9rem; }
.employee-expanded-facts { margin:0; color:#68726c; font-size:.85rem; }
.compensation-checkboxes { display:grid; gap:.55rem; min-width:0; margin:0; border:0; padding:0; color:#4f5c55; }
.compensation-checkboxes legend { margin-bottom:.35rem; padding:0; font-size:.78rem; font-weight:650; }
.compensation-checkboxes label { display:flex; align-items:center; gap:.5rem; font-weight:500; }
@media(max-width:640px){
  .employee-card-body{grid-template-columns:1fr}
  .employee-create-content{grid-template-columns:1fr}
  .employee-name-line{align-items:flex-start}
}
@media(max-width:480px){.team-toolbar{align-items:stretch;flex-direction:column}.team-toolbar .button{width:100%;min-height:48px}.employee-create-actions{align-items:stretch;flex-direction:column-reverse}.employee-create-actions .button{width:100%;min-height:48px}.employee-card-header{padding:.85rem}.employee-meta,.employee-configuration{overflow-wrap:anywhere}}

/* Neutral factual attendance session detail; attention chips retain warning semantics. */
.worker-sessions { min-width:0; margin:1.75rem 0 0; }
.worker-sessions h4 { margin:0 .75rem .875rem; color:#294a3b; }
.attendance-sessions { display:grid; gap:.5rem; padding:0 .75rem .8rem; }
.attendance-session { display:grid; grid-template-columns:minmax(7rem,auto) 1fr auto; gap:.5rem 1rem; align-items:center; padding:.65rem .75rem; border-radius:.65rem; background:rgba(127,127,127,.07); font-size:.875rem; }
.session-linkage { color:#667085; }
@media (max-width:700px) { .attendance-session { grid-template-columns:1fr; gap:.2rem; } }
@media (max-width:480px) { .worker-sessions { margin-top:0; } }
.leave-form {display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:.75rem;margin:1rem 0;padding:1rem;background:var(--surface,#fff);border-radius:12px}
.leave-form textarea {min-height:2.5rem}.leave-group{margin:1.25rem 0}.leave-card{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem;padding:1rem;margin:.5rem 0;background:var(--surface,#fff);border-radius:10px;border:1px solid #e6e1da}.leave-card small{flex-basis:100%}.leave-actions{display:flex;gap:.5rem;margin-left:auto}.leave-status{font-weight:700}.leave-status.approved{color:#26734d}.leave-status.rejected,.leave-status.cancelled{color:#8a3d32}

/* Production leave management: calendar facts stay prominent and controls retain DOM order. */
.leave-page{display:grid;gap:1.25rem;min-width:0}.leave-page .page-header{margin-bottom:0}
.leave-form{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem;margin:0;padding:1.25rem;border:1px solid #dcdfda;border-radius:14px;background:#fff}
.leave-field{display:grid;min-width:0;gap:.35rem;color:#4f5c55;font-size:.82rem;font-weight:700}.leave-field select,.leave-field input,.leave-field textarea{box-sizing:border-box;width:100%;min-width:0;min-height:44px;border:1px solid #b8c1bb;border-radius:9px;padding:.6rem .7rem;background:#fff;font:inherit;color:#263b31}.leave-note{grid-column:1/4}.leave-note textarea{min-height:76px;resize:vertical}.leave-submit-area{display:grid;align-content:end;gap:.25rem}.leave-submit{width:100%}.leave-feedback{min-height:1.25rem;margin:0;color:#8b352d;font-size:.82rem;line-height:1.35}
.leave-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,11rem),1fr));gap:.65rem;align-items:end;padding:1rem;border-radius:12px;background:#f5f6f2}.leave-filters .button{width:auto;min-height:44px}.leave-sections{display:grid;gap:1.5rem}.leave-group{margin:0}.leave-group h2{margin:0 0 .7rem;color:#294a3b;font:700 1.3rem Georgia,serif}
.leave-card{display:grid;gap:.75rem;margin:.55rem 0;border:1px solid #dce1dc;border-radius:12px;padding:1rem;background:#fff}.leave-card-header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}.leave-card-header h3{margin:0;color:#263b31;font-size:1.05rem}.leave-kind{display:block;margin-top:.18rem;color:#68726c;font-size:.86rem}.leave-status{display:inline-flex;flex:none;border:1px solid #c7cec9;border-radius:999px;padding:.25rem .6rem;background:#f1f3f0;color:#47544d;font-size:.78rem;font-weight:750}.leave-status.approved{border-color:#a9c8b7;background:#edf7f0;color:#286344}.leave-status.rejected,.leave-status.cancelled{border-color:#d5b5b0;background:#fff3f1;color:#81382f}.leave-status.requested{border-color:#d6c292;background:#fff8e6;color:#765a16}.leave-period{display:flex;align-items:baseline;gap:.65rem}.leave-period span{color:#68726c;font-size:.85rem}.leave-card-note{margin:0;padding:.65rem .75rem;border-radius:8px;background:#f7f7f4;color:#4f5c55;overflow-wrap:anywhere}.leave-conflict{width:fit-content;margin:0;border:1px solid #dfc58f;border-radius:999px;padding:.25rem .6rem;background:#fff8e6;color:#704f0d;font-size:.82rem;font-weight:700}.leave-metadata{display:flex;flex-wrap:wrap;gap:.25rem 1rem;color:#6b746e;font-size:.78rem}.leave-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin:0}.leave-actions .button{width:auto;min-height:40px;padding:.5rem .8rem}.leave-action.approve{background:#315f4b;color:#fff}.leave-action.reject{border-color:#cda9a5;background:#fff;color:#8b352d}.leave-action.cancel{border-color:#9b2929;background:#fffafa;color:#9b2929}.history-card{gap:.45rem;padding:.75rem 1rem;background:#fafaf8}.history-card .leave-card-note{padding:.4rem .6rem}.history-card .leave-actions{display:none}
@media(max-width:800px){.leave-form{grid-template-columns:repeat(2,minmax(0,1fr))}.leave-note{grid-column:1/2}.leave-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.leave-filters .button{width:100%}}
@media(max-width:520px){.leave-form,.leave-filters{grid-template-columns:minmax(0,1fr);padding:1rem}.leave-note{grid-column:auto}.leave-field select,.leave-field input{min-height:48px}.leave-card-header,.leave-period{align-items:flex-start;flex-direction:column;gap:.45rem}.leave-actions{display:grid;grid-template-columns:1fr;width:100%}.leave-actions .button{width:100%;min-height:48px}.leave-metadata{display:grid;gap:.25rem}.leave-conflict{max-width:100%;box-sizing:border-box}.leave-page{overflow-wrap:anywhere}}
.leave-view-switch{display:flex;gap:.5rem}.leave-view-switch .selected{background:#294a3b;color:#fff;border-color:#294a3b}
.leave-calendar-view{display:grid;gap:1rem;min-width:0}.leave-calendar-header{display:flex;align-items:center;justify-content:space-between;gap:1rem}.leave-calendar-header h2{margin:0;text-transform:capitalize}.leave-month-actions{display:flex;flex-wrap:wrap;gap:.5rem}.leave-weekdays,.leave-calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.leave-weekdays span{padding:.55rem;text-align:center;font-weight:700}.leave-calendar{border-left:1px solid #dce1dc;border-top:1px solid #dce1dc}.leave-calendar-day{min-height:8rem;padding:.5rem;border-right:1px solid #dce1dc;border-bottom:1px solid #dce1dc;min-width:0}.leave-calendar-day.outside-month{background:#f4f5f7;color:#68726c}.leave-calendar-day.current-day{box-shadow:inset 0 0 0 2px #b68b52}.leave-calendar-date{display:flex;align-items:center;justify-content:space-between;gap:.3rem;margin:0 0 .35rem;font-size:.9rem}.today-label{font-size:.7rem;font-weight:700}.mobile-full-date{display:none}.leave-day-summary{margin:.2rem 0;font-size:.75rem}.leave-calendar-event{display:grid;gap:.1rem;margin:.35rem 0;padding:.4rem;border-left:4px solid #4675bf;border-radius:.25rem;background:#eaf1fb;font-size:.75rem;overflow-wrap:anywhere}.leave-calendar-event.requested{border-left-style:dashed;border-left-color:#9a6700;background:#fff5d6}.leave-calendar-event .leave-conflict{margin-top:.15rem}.leave-calendar-empty{display:block}
@media(max-width:700px){.leave-calendar-header{align-items:flex-start;flex-direction:column}.leave-weekdays{display:none}.leave-calendar{display:block;border:0}.leave-calendar-day{display:none;min-height:0;border:1px solid #dce1dc;margin-bottom:.75rem;padding:.75rem}.leave-calendar-day.has-events:not(.outside-month){display:block}.desktop-day-number{display:none}.mobile-full-date{display:inline}}
.leave-balance{background:var(--surface,white);border:1px solid #d9dee7;border-radius:12px;padding:1rem;margin:.75rem 0}.leave-balance header{display:flex;gap:1rem;align-items:end;flex-wrap:wrap}.balance-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:.6rem}.balance-card{padding:.7rem;background:#f4f6f9;border-radius:8px;display:flex;flex-direction:column}.balance-card.negative{border:2px solid #a12622}.balance-card.negative strong::after{content:" (saldo negativo)";font-size:.7rem}.balance-basis,.balance-composition{color:#596273}.balance-note{white-space:pre-wrap;overflow-wrap:anywhere}.balance-warning{padding:.6rem;border-left:4px solid #9b6b00;background:#fff8df}
.balance-editor-overlay{position:fixed;inset:0;z-index:1000;background:#0008;display:grid;place-items:center;padding:1rem;overflow:auto}.balance-editor{background:var(--surface,white);border-radius:12px;padding:1.25rem;width:min(620px,100%);max-height:calc(100vh - 2rem);overflow:auto}.balance-editor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.balance-editor-field{display:flex;flex-direction:column;gap:.3rem;min-width:0}.balance-editor-field.full{grid-column:1/-1}.balance-editor-field input,.balance-editor-field textarea{box-sizing:border-box;width:100%}.balance-editor-field textarea{min-height:7rem;resize:vertical}.balance-editor-field small{color:#596273}.field-error,.balance-editor-feedback{color:#a12622;margin:.15rem 0;min-height:1.2em}.balance-editor-actions{display:flex;justify-content:flex-end;gap:.7rem;flex-wrap:wrap}@media(max-width:520px){.balance-editor-grid{grid-template-columns:1fr}.balance-editor-field.full{grid-column:auto}.balance-editor-actions .button{flex:1}}
.owner-edit-indicator{display:flex;flex-direction:column;gap:.45rem;max-width:100%;overflow-wrap:anywhere}.owner-edit-action{white-space:normal;width:100%}

.leave-policy-card{margin:1rem 0;padding:1rem;border:1px solid var(--border-color,#d8dee6);border-radius:.75rem}.leave-policy-card p{margin:.4rem 0}.leave-policy-card strong{font-size:1.2rem}
.policy-history ul{display:grid;gap:.5rem;padding-left:1.25rem}.policy-history li{display:grid;gap:.15rem}.policy-editor input[type="checkbox"]{width:auto;justify-self:start}
