/* Crewbook: view-specific styles. */

/* ---------- dashboard ---------- */
.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.d-trend { grid-column: span 8; }
.d-side { grid-column: span 4; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.d-third { grid-column: span 4; }
.d-full { grid-column: 1 / -1; }
@media (max-width: 1279.98px) {
  .d-trend { grid-column: 1 / -1; }
  .d-side { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .d-third { grid-column: span 6; }
  .d-third:last-of-type { grid-column: 1 / -1; }
}
@media (max-width: 767.98px) {
  .d-side { grid-template-columns: minmax(0, 1fr); }
  .d-third, .d-third:last-of-type { grid-column: 1 / -1; }
}
.clock-card { display: flex; flex-direction: column; }
.clock-card .card-head { margin-bottom: 10px; }
.clock-body { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.clock-status { display: flex; gap: 6px; flex-wrap: wrap; }
.clock-figure { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.clock-time { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.clock-label { color: var(--text-3); font-weight: 600; font-size: 13px; }
.clock-foot { font-size: 12.5px; color: var(--text-3); }
.clock-card .btn-block { margin-top: auto; }
.qa-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.qa {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2);
  text-align: left; min-height: 56px; transition: border-color .12s, background .12s;
}
.qa:hover { border-color: var(--accent-soft-2); background: var(--accent-soft); }
.qa-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--surface); color: var(--accent-text); display: inline-flex; align-items: center; justify-content: center; flex: none; border: 1px solid var(--border); }
.qa-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.qa-label { font-weight: 700; }
.qa-sub { font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pend-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.pend-row:last-child { border-bottom: 0; }
.pend-row > .person-link { flex: 1 1 200px; }
.pend-actions { display: flex; gap: 6px; margin-left: auto; }
.scroll-list { max-height: 420px; overflow-y: auto; margin-right: -8px; padding-right: 8px; }
.away-list .chip { flex: none; }
.up-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.up-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.up-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; min-width: 0; }
.date-badge { width: 44px; height: 46px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); display: inline-flex; flex-direction: column; align-items: center; justify-content: center; flex: none; line-height: 1.1; }
.db-day { font-weight: 800; font-size: 16px; }
.db-mon { font-size: 11px; color: var(--text-3); font-weight: 700; text-transform: uppercase; }
@media (max-width: 899.98px) { .up-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; } }

/* ---------- employees ---------- */
.emp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.emp-card {
  display: flex; flex-direction: column; gap: 4px; width: 100%; height: 100%; padding: 16px; text-align: left; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: border-color .12s, box-shadow .12s, transform .12s; min-width: 0;
}
.emp-card:hover { border-color: var(--accent-soft-2); box-shadow: var(--shadow); }
.emp-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.emp-name { font-weight: 750; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emp-role { color: var(--text-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emp-meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--text-3); font-size: 12.5px; margin-top: 4px; }
.emp-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.emp-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-3); font-weight: 600; }
.emp-foot > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 639.98px) {
  .emp-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .emp-card { padding: 14px; }
  .emp-card .avatar-lg { --av: 40px; }
  .emp-card-top { margin-bottom: 4px; }
  .emp-foot { margin-top: 8px; padding-top: 8px; }
}

/* profile drawer */
.drawer-content { padding: 24px 24px 32px; }
.profile-head { display: flex; gap: 16px; align-items: center; padding-right: 48px; }
.profile-titles { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.profile-name { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.profile-role { color: var(--text-2); }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 6px; }
.drawer-tabs { position: sticky; top: 0; background: var(--surface); z-index: 1; margin: 0 -24px; padding: 0 24px; }
.drawer-tabs .tabs { margin-bottom: 0; }
.tab-panel { min-width: 0; }
.drawer-content .tab-panel { padding-top: 18px; }
.sec-title { font-size: 13px; font-weight: 750; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; margin: 18px 0 10px; }
.tab-panel > .sec-title:first-child { margin-top: 0; }
.sec-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
.sec-row .sec-title { margin: 0; }
.sec-row .meter { flex: 1 1 120px; max-width: 200px; }
.report-line { position: relative; display: flex; flex-direction: column; gap: 2px; }
.rl-item { position: relative; display: flex; align-items: center; gap: 10px; padding: 4px 0 4px 22px; min-width: 0; }
.rl-item::before { content: ""; position: absolute; left: 5px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.rl-item:first-child::before { top: 50%; }
.rl-item:last-child::before { bottom: 50%; }
.rl-dot { position: absolute; left: 0; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border-strong); }
.rl-self .rl-dot { border-color: var(--accent); background: var(--accent); }
.rl-root { min-height: 44px; }
.mini-people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; }
.mini-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.mini-stat { position: relative; display: flex; flex-direction: column; padding: 10px 10px 8px; border: 1px solid var(--border); border-radius: 10px; min-width: 0; }
.ms-key { position: absolute; top: 10px; right: 10px; width: 8px; height: 8px; border-radius: 50%; }
.ms-key.tone-good { background: var(--good); } .ms-key.tone-warn { background: var(--warn); } .ms-key.tone-wfh { background: var(--wfh); }
.ms-key.tone-leave { background: var(--leave); } .ms-key.tone-crit { background: var(--crit); } .ms-key.tone-serious { background: var(--serious); }
.ms-value { font-size: 19px; font-weight: 800; }
.ms-label { font-size: 12px; color: var(--text-3); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-cal { display: flex; flex-direction: column; gap: 4px; }
.mc-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.mc-head span { text-align: center; font-size: 11.5px; font-weight: 700; color: var(--text-3); }
.mc-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 46px; border-radius: 8px; background: var(--surface-2); border: 1px solid transparent; }
.mc-empty { background: transparent; }
.mc-num { font-size: 11px; color: var(--text-3); font-weight: 600; }
.mc-code { font-size: 12px; font-weight: 800; }
.mc-cell.is-today { border-color: var(--accent); }
.today-punch { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.bal-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.bal-card { padding: 14px; border: 1px solid var(--border); border-radius: 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bal-name { font-weight: 700; font-size: 13px; color: var(--text-2); }
.bal-avail { font-size: 22px; font-weight: 800; }
.bal-avail span { font-size: 13px; font-weight: 600; color: var(--text-3); }
.bal-meta { font-size: 12px; color: var(--text-3); }
.hist-list, .doc-list, .slip-list { display: flex; flex-direction: column; }
.hist-row, .doc-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.hist-row:last-child, .doc-row:last-child { border-bottom: 0; }
.hist-main, .doc-main { flex: 1; min-width: 0; }
.hist-title, .doc-name { font-weight: 650; }
.hist-sub, .doc-sub { font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); color: var(--text-3); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.doc-row { flex-wrap: wrap; }
.ctc-hero { padding: 16px; border-radius: 12px; background: var(--accent-soft); margin-bottom: 4px; }
.ctc-value { font-size: 28px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.breakup .row-strong th, .breakup .row-strong td { font-weight: 800; background: var(--surface-2); }
.slip-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); margin-bottom: 8px; text-align: left; min-height: 52px; }
.slip-btn:hover { border-color: var(--accent-soft-2); background: var(--accent-soft); }
.slip-btn .person-text { flex: 1; }
.slip-btn > .icon:first-child { color: var(--accent-text); }
@media (max-width: 639.98px) {
  .drawer-content { padding: 18px 16px 28px; }
  .drawer-tabs { margin: 0 -16px; padding: 0 16px; }
  .profile-head { padding-right: 44px; }
  .mini-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mini-people { grid-template-columns: minmax(0, 1fr); }
  .mc-cell { min-height: 40px; }
  .doc-row .btn { margin-left: 48px; }
}
@media (max-width: 379.98px) { .bal-cards { grid-template-columns: minmax(0, 1fr); } }

/* add employee */
.ctc-preview { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 13px; color: var(--text-2); font-weight: 600; }

/* ---------- attendance ---------- */
.toolbar-date { justify-content: space-between; }
.date-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.date-input { width: auto; }
.date-label { font-weight: 700; font-size: 15px; }
.sum-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.sum-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  font-weight: 650; min-height: 40px; color: var(--text);
}
.sum-chip:hover { border-color: var(--border-strong); }
.sum-chip[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft-2); }
.sum-ico { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.sum-chip.tone-good .sum-ico { background: var(--good-soft); color: var(--good-text); }
.sum-chip.tone-warn .sum-ico { background: var(--warn-soft); color: var(--warn-text); }
.sum-chip.tone-crit .sum-ico { background: var(--crit-soft); color: var(--crit-text); }
.sum-chip.tone-leave .sum-ico { background: var(--leave-soft); color: var(--leave-text); }
.sum-chip.tone-wfh .sum-ico { background: var(--wfh-soft); color: var(--wfh-text); }
.sum-chip.tone-neutral .sum-ico { background: var(--neutral-soft); color: var(--neutral-text); }
.sum-chip.tone-accent .sum-ico { background: var(--accent-soft); color: var(--accent-text); }
.sum-chip { background: var(--surface); }
.sum-n { font-size: 16px; font-weight: 800; }
.sum-l { color: var(--text-2); font-size: 13px; }
.shift-tag { display: inline-flex; align-items: center; gap: 5px; font-weight: 650; }
.lock-note { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--text-3); font-weight: 600; }
.notice { display: flex; gap: 14px; align-items: flex-start; }
.notice-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.notice-title { font-weight: 750; font-size: 15px; margin-bottom: 2px; }
.day-list { margin-top: 12px; }
.day-list .table thead th { border-top: 1px solid var(--border); }
.day-cards, .req-cards, .pay-cards, .bal-list { padding: 8px 16px 12px; }
.day-card, .req-card, .bal-item { padding: 12px 0; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.day-card:last-child, .req-card:last-child, .bal-item:last-child { border-bottom: 0; }
.dc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.dc-top > .person-link { flex: 1 1 auto; }
.dc-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--text-3); }

/* register */
.reg-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 12px; font-size: 12.5px; color: var(--text-2); font-weight: 600; align-items: center; }
.reg-legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend-note { color: var(--text-3); font-weight: 500; flex-basis: 100%; }
.register-wrap { overflow: auto; max-height: min(68vh, 760px); position: relative; outline: none; }
.register-wrap:focus-visible { box-shadow: inset 0 0 0 2px var(--focus); }
.register { border-collapse: separate; border-spacing: 0; font-size: 12px; min-width: 100%; }
.register th, .register td { border-bottom: 1px solid var(--border); padding: 0; background: var(--surface); }
.register thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); height: 44px; border-bottom: 1px solid var(--border-strong); }
.register .rg-name { position: sticky; left: 0; z-index: 1; min-width: 190px; max-width: 190px; text-align: left; border-right: 1px solid var(--border-strong); }
.register thead .rg-name { z-index: 3; padding: 0 14px; font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.rg-person { display: flex; flex-direction: column; width: 100%; padding: 6px 14px; border: 0; background: none; text-align: left; min-height: 40px; justify-content: center; }
.rg-person:hover .rg-pname { color: var(--accent-text); text-decoration: underline; }
.rg-pname { font-weight: 650; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-pcode { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.rg-day { min-width: 38px; text-align: center; font-weight: 700; }
.rg-day .rg-dnum { display: block; font-size: 12.5px; color: var(--text); line-height: 1.1; }
.rg-day .rg-dw { display: block; font-size: 10.5px; color: var(--text-3); font-weight: 600; }
.register thead th.is-off { background: var(--off-bg); }
.register thead th.is-today { box-shadow: inset 0 -3px 0 var(--accent); }
.register thead th.is-today .rg-dnum { color: var(--accent-text); }
.rg-cell { text-align: center; padding: 3px 2px !important; }
.rg-cell.is-off { background: var(--off-bg); }
.rg-cell.is-today { background: color-mix(in srgb, var(--accent-soft) 60%, var(--surface)); }
.rg-tot { min-width: 64px; text-align: center; font-weight: 750; font-variant-numeric: tabular-nums; padding: 0 8px !important; }
.register thead .rg-tot { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .03em; }
.rg-tot-first { border-left: 1px solid var(--border-strong); }
.register tbody tr:hover th, .register tbody tr:hover td:not(.is-off) { background: var(--hover); }
.register tbody tr:hover th.rg-name { background: var(--hover); }
.rc {
  display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 28px; padding: 0 3px; border-radius: 6px; border: 1px solid transparent;
  font-size: 11px; font-weight: 800; letter-spacing: .01em; background: transparent; color: var(--text-3); line-height: 1;
}
button.rc { cursor: pointer; }
button.rc:hover { border-color: var(--text-3); }
.rc-P { background: var(--good-soft); color: var(--good-text); }
.rc-WFH { background: var(--wfh-soft); color: var(--wfh-text); font-size: 10px; }
.rc-HD { background: var(--serious-soft); color: var(--serious-text); }
.rc-A { background: var(--crit-soft); color: var(--crit-text); }
.rc-L { background: var(--leave-soft); color: var(--leave-text); }
.rc-H { background: transparent; color: var(--text-3); }
.rc-WO { background: transparent; color: var(--text-3); font-size: 10px; font-weight: 700; }
.rc-empty { color: var(--text-3); }
button.rc-empty { border: 1px dashed var(--border-strong); }
.rc.is-planned { background: transparent; border: 1px dashed var(--leave); }
.rc.is-late { box-shadow: inset 0 -3px 0 var(--warn); }
.rc.is-edited { outline: 2px solid var(--accent-soft-2); outline-offset: -2px; }
.reg-legend .rc { min-width: 30px; height: 24px; }
.reg-foot { margin-top: 8px; }
.cell-pop .pop-cur { font-size: 13px; margin-bottom: 10px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pop-codes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.pop-code { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-size: 11.5px; font-weight: 650; color: var(--text-2); min-height: 58px; }
.pop-code:hover { border-color: var(--border-strong); background: var(--hover); }
.pop-code.is-current { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft-2); }
.pop-types { margin-bottom: 8px; }
.pop-type-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.pop-lock { display: flex; gap: 8px; align-items: flex-start; padding: 10px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); font-size: 13px; }
@media (max-width: 639.98px) {
  .register .rg-name { min-width: 128px; max-width: 128px; }
  .rg-person { padding: 6px 10px; }
  .rg-pname { font-size: 12.5px; }
  .register-wrap { max-height: 64vh; }
  .reg-toolbar .seg { width: 100%; }
  .reg-toolbar .seg-btn { flex: 1 1 0; justify-content: center; }
  .reg-toolbar .search { flex: 1 1 150px; }
  .reg-toolbar > select.input { flex: 0 1 150px; }
  .reg-legend:not(.cal-legend) { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none; margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 2px; }
  .reg-legend:not(.cal-legend)::-webkit-scrollbar { display: none; }
  .date-input { flex: 1 1 140px; }
  .toolbar-date .date-nav { width: 100%; }
}

/* ---------- leaves ---------- */
.type-tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; background: var(--leave-soft); color: var(--leave-text); white-space: nowrap; }
.type-SL { background: var(--wfh-soft); color: var(--wfh-text); }
.type-EL { background: var(--good-soft); color: var(--good-text); }
.type-CO { background: var(--neutral-soft); color: var(--neutral-text); }
.reason { max-width: 280px; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-actions { display: flex; gap: 6px; justify-content: flex-start; flex-wrap: nowrap; }
.acted { min-width: 0; max-width: 240px; }
.comment { white-space: normal !important; display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.is-new th, .is-new td, .req-card.is-new { animation: flash 2.4s ease; }
@keyframes flash { 0%, 40% { background: var(--accent-soft); } 100% { background: transparent; } }
.req-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-weight: 600; font-size: 13.5px; }
.req-reason { color: var(--text-2); font-size: 13.5px; }
.req-card .row-actions .btn { flex: 1 1 0; }
.decision { display: flex; flex-direction: column; gap: 14px; }
.dec-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.dec-bal { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text-2); }
.dec-bal .icon { color: var(--accent-text); margin-top: 1px; }
.dec-bal.is-warn .icon { color: var(--crit-text); }
.apply-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.apply-form .card-sub { margin-bottom: 18px; }
.half-row { display: flex; gap: 10px; align-items: center; }
.half-row select { flex: 1; min-width: 0; }
.apply-summary { position: sticky; top: calc(var(--topbar-h) + 16px); display: flex; flex-direction: column; gap: 12px; }
.calc-hero { display: flex; align-items: baseline; gap: 8px; }
.calc-num { font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.calc-lbl { color: var(--text-3); font-weight: 650; }
.calc-lines { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
.calc-lines li { display: flex; gap: 8px; align-items: flex-start; }
.calc-lines .icon { color: var(--text-3); margin-top: 1px; }
.apply-summary .sec-title { margin: 6px 0 0; }
.bal-after { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 12px; background: var(--leave-soft); }
.bal-after > div { display: flex; flex-direction: column; }
.bal-after.is-over { background: var(--crit-soft); }
.ba-num { font-size: 22px; font-weight: 800; }
.ba-lbl { font-size: 12px; color: var(--text-2); font-weight: 600; }
.calc-inline { display: none; }
@media (max-width: 899.98px) {
  .calc-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: var(--leave-soft); font-size: 13px; font-weight: 650; color: var(--text); }
  .calc-inline.is-over { background: var(--crit-soft); color: var(--crit-text); }
}
.calc-warn, .calc-ok { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; font-weight: 650; }
.calc-warn { color: var(--crit-text); }
.calc-ok { color: var(--good-text); }
@media (max-width: 899.98px) { .apply-layout { grid-template-columns: minmax(0, 1fr); } .apply-summary { position: static; } }
.bal-table td { min-width: 150px; }
.sticky-col { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.table thead .sticky-col { background: var(--surface-2); z-index: 2; }
.bal-cell { display: flex; flex-direction: column; gap: 4px; max-width: 170px; }
.bc-used { font-weight: 800; }
.bal-cell.is-none .bc-top { color: var(--text-3); font-weight: 600; font-size: 12.5px; }
.bc-left { font-size: 12px; color: var(--text-3); font-weight: 600; }
.bal-item-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.bi-type { font-size: 12px; font-weight: 700; color: var(--text-2); }

/* calendar */
.cal-month { font-weight: 800; font-size: 16px; min-width: 128px; text-align: center; }
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.cal-card { padding: 12px; }
.cal-grid { display: flex; flex-direction: column; gap: 6px; }
.cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-hd { text-align: center; font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; padding: 2px 0 4px; }
.cal-cell { min-height: 112px; border: 1px solid var(--border); border-radius: 10px; padding: 4px; display: flex; flex-direction: column; gap: 4px; min-width: 0; background: var(--surface); }
.cal-pad { background: transparent; border-color: transparent; }
.cal-cell.is-weekend { background: var(--off-bg); }
.cal-cell.is-holiday { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.cal-cell.is-today .cal-num { background: var(--accent); color: var(--on-accent); }
.cal-cell.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft-2); }
.cal-day { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0; background: none; padding: 2px; border-radius: 7px; min-height: 30px; }
.cal-day:hover { background: var(--hover); }
.cal-num { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 750; font-size: 13px; }
.cal-count { display: none; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--leave); color: var(--on-leave); font-size: 11px; font-weight: 800; align-items: center; justify-content: center; }
.cal-hol { display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--warn-text); padding: 0 2px; min-width: 0; }
.cal-hol span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-chips { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-chip { display: flex; align-items: center; gap: 5px; padding: 2px 6px 2px 2px; border-radius: 999px; background: var(--leave-soft); color: var(--leave-text); font-size: 11.5px; font-weight: 700; min-width: 0; border: 1px solid transparent; }
.cal-chip.is-pending { background: transparent; border: 1px dashed var(--leave); color: var(--text-2); }
.cal-ini { width: 18px; height: 18px; border-radius: 50%; background: var(--surface); color: var(--leave-text); font-size: 9px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.cal-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-more { border: 0; background: none; color: var(--accent-text); font-weight: 700; font-size: 11.5px; padding: 2px 4px; text-align: left; min-height: 24px; }
.cal-more:hover { text-decoration: underline; }
.cal-legend { margin: 12px 4px 2px; }
.chip-stack { display: inline-flex; gap: 4px; flex: none; flex-direction: column; align-items: flex-end; }
.cal-detail .person-row > .person-link { min-width: 0; }
@media (max-width: 1279.98px) { .cal-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 899.98px) { .cal-cell { min-height: 92px; } .cal-chip .cal-nm { display: none; } .cal-chip { padding: 2px; align-self: flex-start; } .cal-chips { flex-direction: row; flex-wrap: wrap; } }
@media (max-width: 639.98px) {
  .cal-card { padding: 8px; }
  .cal-row { gap: 3px; }
  .cal-grid { gap: 3px; }
  .cal-cell { min-height: 54px; padding: 2px; border-radius: 8px; }
  .cal-chips, .cal-cell .cal-hol span, .cal-more { display: none; }
  .cal-hol { justify-content: center; }
  .cal-day { flex-direction: column; gap: 2px; justify-content: flex-start; min-height: 48px; height: 100%; }
  .cal-count { display: inline-flex; }
  .cal-num { width: 24px; height: 24px; font-size: 12.5px; }
}

/* ---------- payroll ---------- */
.run-card { margin-bottom: 18px; }
.stepper { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 6px 0 16px; }
.step { position: relative; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; min-width: 0; }
.step::after { content: ""; position: absolute; top: 15px; left: 42px; right: -4px; height: 2px; border-radius: 2px; background: var(--border); }
.step:last-child::after { display: none; }
.step.is-done::after { background: var(--accent); }
.step-dot { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; background: var(--surface); border: 2px solid var(--border-strong); color: var(--text-3); }
.step.is-done .step-dot { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.step.is-current .step-dot { border-color: var(--accent); color: var(--accent-text); box-shadow: 0 0 0 4px var(--accent-soft); }
.step-text { display: flex; flex-direction: column; min-width: 0; padding-right: 8px; }
.step-name { font-weight: 750; font-size: 13.5px; }
.step.is-todo .step-name { color: var(--text-3); }
.step-meta { font-size: 12px; color: var(--text-3); }
.run-actions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 10px; border-top: 1px solid var(--border); padding-top: 14px; }
.run-actions .step-done { margin-right: auto; }
.step-done { display: inline-flex; align-items: center; gap: 8px; color: var(--good-text); font-weight: 700; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; margin-bottom: 18px; }
.kpi-static { box-shadow: var(--shadow-sm); }
.pay-card { display: flex; flex-direction: column; gap: 10px; width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--border); background: none; text-align: left; }
.pay-cards li:last-child .pay-card { border-bottom: 0; }
.pay-card .person-link.as-static { pointer-events: none; }
.pay-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; font-size: 13px; font-variant-numeric: tabular-nums; }
.pay-card-grid > span { display: flex; flex-direction: column; min-width: 0; }
.pay-card-grid .muted { font-size: 11.5px; font-weight: 600; }
.pay-card-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--text-3); align-items: center; }
@media (max-width: 1023.98px) {
  .two-col { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767.98px) {
  .stepper { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .step { flex-direction: row; gap: 12px; padding-bottom: 16px; }
  .step-text { padding-top: 4px; }
  .step::after { top: 36px; bottom: 4px; left: 15px; right: auto; width: 2px; height: auto; }
  .step:last-child { padding-bottom: 0; }
  .run-actions .btn { flex: 1 1 auto; }
}

/* payslip */
.payslip-modal .dlg-body { background: var(--surface-2); }
.payslip { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.ps-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 2px solid var(--text); }
.ps-co { display: flex; gap: 12px; align-items: flex-start; min-width: 0; flex: 1 1 260px; }
.ps-co-mark { width: 40px; height: 40px; border-radius: 10px; background: #1d3b4f; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex: none; letter-spacing: .02em; }
.ps-co-name { font-weight: 800; font-size: 16px; }
.ps-co-addr { font-size: 12px; color: var(--text-3); }
.ps-title { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ps-kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); font-weight: 700; }
.ps-month { font-size: 18px; font-weight: 800; }
.ps-emp { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 16px; }
.ps-emp .kv dd { font-size: 13px; }
.ps-tables { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.ps-table { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; border-collapse: separate; border-spacing: 0; }
.ps-table tbody th { font-weight: 500; color: var(--text-2); }
.ps-net { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 12px; background: var(--accent-soft); flex-wrap: wrap; }
.ps-net > div { min-width: 0; flex: 1 1 260px; }
.ps-net-label { font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-text); }
.ps-net-words { font-weight: 650; color: var(--text-2); margin-top: 2px; }
.ps-net-value { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.ps-foot { font-size: 11.5px; color: var(--text-3); }
@media (max-width: 767.98px) { .ps-emp { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ps-tables { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 639.98px) { .payslip { padding: 14px; } .ps-title { align-items: flex-start; text-align: left; } .ps-net-value { font-size: 24px; } .payslip-modal .dlg-body { padding: 10px; } }

/* ---------- settings ---------- */
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px; align-items: start; }
.settings-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.hol-list { display: flex; flex-direction: column; }
.hol-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.hol-row:last-child { border-bottom: 0; }
.hol-row .person-text { flex: 1; }
.hol-row.is-past .person-name { color: var(--text-2); font-weight: 600; }
.hol-row.is-past .date-badge { background: transparent; }
.hol-row.is-next .date-badge { border-color: var(--accent); background: var(--accent-soft); }
.shift-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.shift-card { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; min-width: 0; }
.shift-card > div { min-width: 0; }
.shift-card .person-name, .shift-card .person-sub { white-space: normal; }
.shift-time { font-weight: 800; font-size: 16px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.settings-row > div:first-child { min-width: 0; flex: 1 1 240px; }
.settings-row .person-sub { white-space: normal; }
@media (max-width: 1199.98px) { .settings-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 479.98px) { .shift-grid { grid-template-columns: minmax(0, 1fr); } }

.hc-foot { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.hc-split { display: flex; flex-direction: column; gap: 6px; }
.hc-split-head { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.hc-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; gap: 2px; background: var(--surface); }
.hc-bar > span { display: block; height: 100%; }
.hc-keys { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--text-2); }
.hc-keys li { display: inline-flex; align-items: center; gap: 6px; }
.hc-keys strong { color: var(--text); font-variant-numeric: tabular-nums; }
.pre-join { color: var(--text-3); font-weight: 500; font-size: 12px; }
