[hidden]{display:none!important}
#notice:empty{display:none}
#notice{line-height:1.5}
#google-login{max-width:25rem}
[data-view]{max-width:65rem}
[data-view]+[data-view]:not([hidden]){margin-top:1rem}
#punch{max-width:42rem}
#punch h2{color:#0b2347}
label{display:grid;gap:.4rem;margin-bottom:1rem}
input[type=file]{max-width:100%}
ul{list-style:none;margin:0;padding:0}
li{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;font-size:.93rem;line-height:1.5;padding:.75rem 0;overflow-wrap:anywhere;border-bottom:1px solid #2a3c50}
li:last-child{border:0;padding-bottom:0}
body.employee-mode li{border-color:#e2e6eb}
#employee-rows button{overflow-wrap:anywhere;text-align:left}
#team-status,#employee-search,#calendar-type{max-width:25rem}
.calendar-controls{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem}
.calendar-controls button{min-width:2.65rem;font-size:1.2rem}
.calendar-month-grid{background:#fff;color:#111827;color-scheme:light}
.calendar-week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px;text-align:center;font-size:.85rem}
#calendar-days{margin-top:.5rem}
.calendar-day{touch-action:manipulation;min-width:0;min-height:3.75rem;display:flex;flex-direction:column;align-items:center;gap:.15rem;border-radius:4px;padding:.35rem .1rem;font-variant-numeric:tabular-nums}
#calendar-days .calendar-day{background:#fff;color:#0b2347;border-color:#cbd5e1;text-align:center}
#calendar-days .calendar-day.adjacent-month{background:#f8f9fb;color:#657382;border-color:#e6eaf0;font-size:.8rem;font-weight:400}
#calendar-days .calendar-day.adjacent-month:hover{background:#edf1f5;border-color:#cbd5e1}
#calendar-days .calendar-day[aria-pressed=true]{background:#e6eefb;outline:2px solid #0b2347;outline-offset:-2px;font-weight:750}
.calendar-day:focus-visible{outline:3px solid currentColor;outline-offset:-4px}
[data-tone=approved]{--day-bg:#c5f1d5;--day-fg:#0c512e;--day-border:#60b783}
[data-tone=missing],[data-tone=rejected]{--day-bg:#fbd5d5;--day-fg:#81202c;--day-border:#d98088}
[data-tone=leave]{--day-bg:#ffe599;--day-fg:#694500;--day-border:#c49b32}
[data-tone=unpaid]{--day-bg:#FECACA;--day-fg:#991B1B;--day-border:#EF4444}
[data-tone=missing]{--day-bg:#991B1B;--day-fg:#FFFFFF;--day-border:#7F1D1D}
#calendar-days .calendar-day[data-tone]{background:var(--day-bg);color:var(--day-fg);border-color:var(--day-border)}
#calendar-days .calendar-day[data-tone][aria-pressed=true]{outline-color:var(--day-fg)}
#calendar-days .calendar-day[data-leave-type=unpaid]{background:#FECACA;color:#991B1B;border-color:#EF4444}
#calendar-days .calendar-day[data-tone=missing] .calendar-markers{color:#FFFFFF}
.calendar-markers{font-size:.72rem;line-height:1.2}
.fulltime-clock{display:inline-flex;align-items:center;gap:.25em}
.fulltime-clock::before{
  content:"";display:inline-block;width:1em;height:1em;box-sizing:border-box;flex:none;
  border:1.5px solid currentColor;border-radius:50%;
  background:linear-gradient(currentColor,currentColor) 50% 25% / 1.5px 40% no-repeat,
             linear-gradient(currentColor,currentColor) 72% 50% / 36% 1.5px no-repeat;
}
.calendar-legend{display:flex;gap:.5rem 1rem;flex-wrap:wrap;font-size:.85rem;margin:1rem 0}
.calendar-legend span{display:inline-flex;align-items:center;gap:.35rem}
.calendar-legend i{display:inline-block;width:.9rem;height:.9rem;border-radius:3px;background:var(--day-bg);border:1px solid var(--day-border)}
#calendar-leave{margin:1rem 0 0;padding:0;border:0;display:flex;flex-wrap:wrap;gap:.45rem}
#calendar-leave legend{font-weight:650;margin-bottom:.4rem}
#calendar-leave button[aria-pressed=true]{outline:2px solid currentColor;outline-offset:-2px}
#evidence-dialog{max-width:min(42rem,92vw);max-height:92vh;overflow:auto;background:#111f31;color:#edf4ff;border:1px solid #45648b;border-radius:15px;padding:18px}
#evidence-dialog::backdrop{background:#09111ec9}
#evidence-image{display:block;max-width:100%;max-height:65vh;margin:0 auto 1rem;object-fit:contain}
#calendar-title{overflow-wrap:anywhere}
@media(max-width:740px){.top .btn{font-size:.8rem}.calendar-day{min-height:3.2rem}}

.review-filters,.assignment{display:flex;flex-wrap:wrap;align-items:end;gap:.65rem 1rem}
.review-filters label,.assignment label{margin:0;min-width:0}
.review-filters{margin-bottom:1rem}
.assignment{width:100%}
.assignment input,.assignment select{max-width:100%}
@media(max-width:740px){.assignment label,.review-filters label{flex:1 1 10rem}}


/* Unified calendar and per-shift details. All evidence stays tied to its event. */
.calendar-gesture{font-size:.85rem;line-height:1.5;margin:.7rem 0}
#calendar-type{min-height:44px}
#calendar-days .leave-paid,.calendar-legend .leave-paid,.day-leave-card .leave-paid{color:#16A34A;font-weight:850}
#calendar-days .leave-unpaid,.calendar-legend .leave-unpaid,.day-leave-card .leave-unpaid{color:#DC2626;font-weight:850}
#calendar-days .leave-paid,#calendar-days .leave-unpaid{font-size:.9rem}
[data-tone=test]{--day-bg:#e8edf7;--day-fg:#334968;--day-border:#9babca}
.test-label{font-size:.66rem;letter-spacing:.03em;font-weight:750}
.day-summary{display:grid;gap:.65rem}
.day-summary-button{display:flex;align-items:center;gap:.75rem;width:100%;padding:1rem;text-align:left;min-height:72px}
.day-summary-copy{display:grid;gap:.35rem;flex:1;min-width:0;overflow-wrap:anywhere}
.day-summary-copy small{font-size:.8rem;font-weight:400;line-height:1.6;opacity:.78}
.day-summary-arrow{font-size:1.6rem;line-height:1;flex:none}
.attendance-badge{display:inline-flex;align-items:center;justify-content:center;gap:.3rem;font-size:.75rem;font-weight:750;line-height:1.4;border-radius:50px;padding:.4rem .65rem;max-width:100%;text-align:center;white-space:normal;overflow-wrap:anywhere}
.attendance-badge[data-status=approved]{background:#e2f4e9;color:#166534}
.attendance-badge[data-status=pending]{background:#fff3d3;color:#83560c}
.attendance-badge[data-status=rejected]{background:#fee8e7;color:#a31d26}
.attendance-badge[data-status=exception]{background:#fff0df;color:#9a4b13}
.attendance-badge[data-status=test]{background:#e8edf7;color:#334968}
.day-leave-card{display:flex;gap:.65rem;align-items:center;flex-wrap:wrap;background:#fff4c8;color:#694500!important;border:1px solid #e2c66a;border-radius:12px;padding:1rem;margin:0 0 1rem;font-size:.88rem}
.day-leave-card>strong,.day-leave-card>b{font-size:1rem}
.day-leave-card[data-leave-type=unpaid]{background:#FECACA;color:#991B1B!important;border-color:#EF4444}
#day-detail-dialog{width:min(76rem,calc(100vw - 48px));max-width:none;max-height:92dvh;margin:auto;padding:0;background:#f5f7fb;color:#13243d;border:1px solid #d8e0eb;border-radius:20px;box-shadow:0 30px 90px #04142b4d;color-scheme:light;overflow:auto;overscroll-behavior:contain}
#day-detail-dialog::backdrop{background:#07152bcc;backdrop-filter:blur(3px)}
.day-dialog-header{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:1rem;background:#fff;border-bottom:1px solid #e1e7ef;padding:12px 24px}
.day-dialog-header form{margin:0}
#day-detail-dialog .back-to-calendar{border-color:#d3dce8;background:white;color:#0b2347;min-height:44px;font-weight:700}
.day-dialog-brand{font-size:.78rem;font-weight:700;letter-spacing:.04em;color:#65748a}
.day-dialog-heading{padding:24px 28px 0}
#day-detail-date{font-size:.85rem;font-weight:650;margin:0 0 8px;color:#58708d}
#day-detail-title{font-size:1.65rem;line-height:1.3;margin:0;overflow-wrap:anywhere;color:#0b2347}
#day-detail-dialog .day-timezone{font-size:.75rem;color:#708097;margin:8px 0 0}
#day-detail-content{display:grid;gap:20px;padding:24px 28px 28px}
.shift-card{min-width:0;border:1px solid #e0e6ef;border-radius:16px;background:#fff;padding:22px;box-shadow:0 3px 12px #0b234705}
.shift-card-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;flex-wrap:wrap}
.shift-card-heading>div{flex:1;min-width:0}
#day-detail-dialog .shift-kind{text-transform:uppercase;letter-spacing:.1em;font-size:.68rem;font-weight:800;color:#60748e;margin:0 0 7px}
.shift-card h3{font-size:1.28rem;margin:0;line-height:1.4;color:#0b2347;overflow-wrap:anywhere}
.shift-times{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:20px 0 14px}
.shift-time{display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:14px 16px;background:#f6f8fb;border:1px solid #e5eaf1;border-radius:12px}
.shift-time>span:first-child{font-size:.75rem;font-weight:650;color:#60728b}
.shift-time>strong{font-size:1.7rem;line-height:1.3;letter-spacing:-.04em;color:#0b2347;font-variant-numeric:tabular-nums}
.shift-time>small{font-size:.72rem;color:#63748c}
#day-detail-dialog .credit-note{font-size:.8rem;line-height:1.6;color:#627189;background:#f7f9fc;border-radius:9px;padding:10px 12px;margin:0 0 22px}
#day-detail-dialog .credit-note.test-note{color:#334968;background:#edf1f8}
#day-detail-dialog .credit-note.hold-note{color:#864318;background:#fff2e5;border:1px solid #f6d2ac}
.shift-detail-grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(260px,.9fr);gap:24px;align-items:start}
.detail-section{min-width:0}
.detail-section h4{font-size:.95rem;color:#0b2347;margin:0 0 14px;font-weight:750}
#day-detail-dialog .section-hint{font-size:.75rem;color:#6c7c91;margin:-6px 0 14px}
.photo-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.event-photo{display:grid;align-content:start;gap:8px;min-width:0}
.event-photo-label{font-size:.8rem;color:#415672}
#day-detail-dialog .photo-thumbnail{display:block;position:relative;width:100%;padding:0;overflow:hidden;border:1px solid #dbe3ee;border-radius:12px;background:#eff3f8;color:#50617a;aspect-ratio:3/4;min-height:150px}
.photo-thumbnail img{display:block;width:100%;height:100%;object-fit:cover}
.photo-placeholder{display:flex;align-items:center;justify-content:center;text-align:center;min-height:150px;aspect-ratio:3/4;width:100%;height:100%;padding:16px;background:#f0f3f8;color:#66758a;border-radius:12px;font-size:.78rem;line-height:1.6}
.photo-open{position:absolute;bottom:8px;right:8px;background:#0b2347d9;color:white;border-radius:6px;font-size:.66rem;padding:5px 7px}
.photo-caption{font-size:.71rem;color:#64758b;line-height:1.5}
.detail-side{display:grid;gap:22px;min-width:0}
.event-location{padding:14px;border:1px solid #e1e7f0;border-radius:12px;margin-top:10px;background:#fbfcfe}
.location-event-heading{font-size:.75rem;color:#566d89;padding-bottom:10px;border-bottom:1px solid #e5ebf3;margin-bottom:12px;font-weight:700}
.location-place{font-size:.92rem;line-height:1.5;display:block;color:#0b2347}
#day-detail-dialog .location-address{font-size:.8rem;line-height:1.6;color:#4d607a;margin:5px 0 9px;overflow-wrap:anywhere}
#day-detail-dialog .gps-coordinates{font-size:.71rem;line-height:1.5;color:#657991;margin:8px 0 4px;font-variant-numeric:tabular-nums}
#day-detail-dialog .gps-accuracy{font-size:.72rem;color:#657991;margin:4px 0 12px}
.maps-link{display:flex;align-items:center;justify-content:center;min-height:44px;padding:10px 12px;border-radius:9px;background:#0b2347;color:#fff!important;text-decoration:none;font-weight:700;font-size:.78rem;gap:8px;text-align:center}
.maps-link:hover{background:#153963}
#day-detail-dialog .location-note{font-size:.68rem;line-height:1.6;color:#738197;margin:9px 0 0}
.review-section{border-top:1px solid #e1e7ef;padding-top:18px}
.review-event{padding:10px 0;border-top:1px solid #edf1f6}
.review-event-heading{display:flex;justify-content:space-between;gap:10px;align-items:center;font-size:.8rem}
#day-detail-dialog .review-event p{font-size:.77rem;line-height:1.6;color:#5b6f89;margin:8px 0 0;overflow-wrap:anywhere}
#day-detail-dialog .review-event .review-time{font-size:.7rem;color:#748299}
.day-decision-summary{display:grid;gap:6px;background:#f7f9fd;border-radius:10px;padding:12px;margin-bottom:12px;font-size:.8rem}
#day-detail-dialog .day-decision-summary p{margin:0;color:#53677f;line-height:1.6}
.day-decision-summary small{color:#637891;font-size:.72rem}
#day-detail-dialog .edit-leave-link{justify-self:start;background:#fff;border-color:#cdd7e6;color:#0b2347;min-height:44px}
.detail-empty{font-size:.9rem;line-height:1.6;padding:.5rem 0}
#day-detail-dialog .detail-empty{color:#667992}
#evidence-dialog{width:min(50rem,94vw);max-width:94vw;background:#0b2347;color:white;padding:20px}
#evidence-dialog p,#evidence-dialog h2{color:#e5edf8}
#evidence-dialog .link{display:inline-block;padding:8px 0;color:#9ccaff}
#evidence-dialog canvas{border-radius:10px;max-height:70dvh}
#evidence-dialog button{min-height:44px}
.attendance-warning{display:flex;flex-direction:column;gap:5px;border:1px solid #d9a64c;background:#fff4d8;color:#7b4e09;padding:14px 16px;border-radius:12px;margin:0 0 18px;line-height:1.6;font-size:.85rem}
.attendance-warning[data-tone=rejected]{border-color:#e3a0a5;background:#ffedef;color:#9e2934}
.attendance-warning[data-tone=exception]{border-color:#e6b381;background:#fff0e2;color:#8a4715}
.attendance-warning strong{font-size:.92rem}
.director-decision-form{display:grid;width:100%;gap:10px;padding:14px;border:1px solid #ab6e37;border-radius:12px;margin-top:10px}
.director-decision-form label{margin:0}
.director-decision-actions{display:flex;flex-wrap:wrap;gap:8px}
.director-decision-actions button{min-height:44px}
@media(max-width:900px){.shift-detail-grid{grid-template-columns:1fr}.photo-thumbnail{max-height:380px}}
@media(max-width:740px){
  .calendar-legend{font-size:.74rem;gap:.6rem .8rem;line-height:1.5}
  .calendar-day{min-height:3.8rem}
  .calendar-markers{font-size:.65rem}
  .calendar-gesture{font-size:.8rem}
  .day-summary-button{padding:12px;gap:8px;flex-wrap:wrap}
  .day-summary-copy{flex-basis:calc(100% - 30px)}
  .day-summary-button .attendance-badge{order:3;font-size:.7rem}
  .day-summary-arrow{margin-left:auto}
  #day-detail-dialog{width:100vw;height:100dvh;max-height:100dvh;max-width:100vw;border:0;border-radius:0;inset:0;margin:0}
  .day-dialog-header{padding:10px 16px;padding-top:max(10px,env(safe-area-inset-top))}
  .day-dialog-heading{padding:22px 18px 0}
  #day-detail-title{font-size:1.35rem}
  #day-detail-content{padding:18px 14px max(28px,env(safe-area-inset-bottom));gap:16px}
  .shift-card{padding:16px;border-radius:14px}
  .shift-card h3{font-size:1.16rem}
  .shift-card-heading{gap:10px}
  .shift-card-heading>div{flex-basis:100%}
  .shift-card-heading>.attendance-badge{font-size:.72rem}
  .shift-times{gap:10px;margin:16px 0 12px}
  .shift-time{padding:12px}
  .shift-time>strong{font-size:1.5rem}
  .shift-detail-grid{gap:22px}
  .photo-grid{gap:10px}
  .photo-caption{font-size:.65rem}
  #day-detail-dialog .photo-thumbnail,.photo-placeholder{min-height:160px;aspect-ratio:3/4}
  .photo-open{font-size:.6rem;padding:4px 6px;bottom:6px;right:6px}
  .event-location{padding:12px}
  .maps-link{min-height:46px;font-size:.82rem}
  #calendar-leave button{min-height:44px}
  #evidence-dialog{padding:15px;width:96vw;max-width:96vw;max-height:96dvh}
  .director-decision-actions{display:grid;grid-template-columns:1fr;width:100%}
}
@media(prefers-reduced-motion:no-preference){#day-detail-dialog[open]{animation:day-appear .15s ease-out}@keyframes day-appear{from{opacity:.7;transform:translateY(8px)}to{opacity:1;transform:none}}}

/* Leave type remains visible while held days retain zero effective leave credit. */
[data-tone=suspended]{--day-bg:#fff0df;--day-fg:#88420c;--day-border:#e0a365}
.calendar-hold-marker{display:inline-flex;align-items:center;justify-content:center;border:1px solid #a44719;border-radius:50%;width:1.2em;height:1.2em;color:#9a3412!important;background:#fff4e8;font-weight:850}
.day-leave-label{display:flex;align-items:center;gap:.6rem}
.leave-credit-line{flex-basis:100%;font-size:.8rem;line-height:1.6;color:#765322}

.external-link-icon{display:inline-block;flex:none;vertical-align:middle}
.photo-open{display:inline-flex;align-items:center;gap:4px}.photo-open .external-link-icon{width:12px;height:12px}

/* Workday units: a half unit is 0.5 công, independent of Saturday hours. */
[data-tone=off]{--day-bg:#f2f4f7;--day-fg:#6b7787;--day-border:#dce2e9}
.scheduled-credit{font-weight:650;opacity:.85}
.calendar-policy-note{font-size:.76rem;line-height:1.65;margin:1rem 0;color:#67778d}
#calendar-leave .leave-duration-label{flex-basis:100%;max-width:15rem;margin-bottom:.2rem}
#calendar-leave-duration{min-height:44px}
.day-credit-card{border:1px solid #dce4ef;background:#fff;border-radius:14px;padding:18px}
.day-credit-card h3{color:#0b2347;font-size:1rem;margin:0 0 10px}
#day-detail-dialog .day-credit-cap{color:#5b718c;font-size:.8rem;margin:0 0 14px}
.day-credit-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.day-credit-grid>div{padding:12px 8px;background:#f3f6fb;border-radius:8px;display:grid;gap:8px;min-width:0}
.day-credit-grid span{font-size:.7rem;color:#61758f;line-height:1.5}
.day-credit-grid strong{font-size:.95rem;color:#0b2347;line-height:1.4}
#day-detail-dialog .day-credit-note{font-size:.75rem;line-height:1.6;margin:12px 0 0;color:#6b7e96}
#day-detail-dialog .day-credit-card .hold-note{font-size:.8rem;color:#9a4b13;line-height:1.6}
.top-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex:none}
@media(max-width:740px){.top-actions{gap:6px;flex-wrap:wrap;max-width:140px}.day-credit-grid strong{font-size:.86rem}.day-credit-card{padding:14px}.calendar-policy-note{font-size:.72rem}}

.location-type{display:inline-block;background:#e8eef7;color:#3e5777;padding:4px 7px;border-radius:6px;font-size:.68rem;font-weight:700;margin:0 0 10px}

/* Personal month totals come from the server's day-level summary. */
.calendar-kpis{margin:0 0 22px;min-width:0}
.calendar-kpi-period{font-size:.76rem;font-weight:750;color:#576c89;margin:0 0 10px;letter-spacing:.02em}
.calendar-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.calendar-kpi{display:flex;flex-direction:column;gap:5px;min-width:0;background:#f8faff;border:1px solid #dce5f1;border-top:3px solid #537cae;border-radius:12px;padding:14px 12px}
.calendar-kpi .calendar-kpi-label{color:#3d587b;margin:0;font-size:.79rem;font-weight:650;line-height:1.45}
.calendar-kpi-value{font-size:1.65rem;line-height:1.25;color:#0b2347;font-weight:800;letter-spacing:-.02em;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.calendar-kpi-unit{font-size:.7rem;line-height:1.5;color:#5a6e88}
.calendar-kpi .calendar-kpi-note{font-size:.66rem;line-height:1.5;color:#6a7b91;margin:4px 0 0}
.calendar-kpi[data-kind=show]{border-top-color:#348c9b;background:#f4fafb}
.calendar-kpi[data-kind=leave]{border-top-color:#d6b75b;background:#fffcf4}
.calendar-kpi-explanation{font-size:.68rem;line-height:1.6;color:#748198;margin:10px 0 0}
.calendar-day .calendar-planned-show-marker,.calendar-legend .calendar-planned-show-marker{display:inline-flex;align-items:center;gap:3px;max-width:100%;box-sizing:border-box;padding:2px 5px;border:1px solid #83b8d3;border-radius:5px;background:#e8f5fc;color:#075985!important;font-size:.7rem;font-weight:800;line-height:1.3}
.planned-show-section{background:#f6fbfe;color:#173a50;border:1px solid #bbd8e8;border-radius:12px;padding:16px;margin:0 0 14px;min-width:0;overflow-wrap:anywhere}
.planned-show-section h3{color:#075985;font-size:.96rem;margin:0 0 8px}
.planned-show-help{color:#57738a;font-size:.76rem;line-height:1.6;margin:0 0 12px}
.planned-show-list{display:grid;gap:10px}
.planned-show-card{background:white;border:1px solid #d8e7f0;border-radius:9px;padding:12px;min-width:0}
.planned-show-card .planned-show-name{display:block;font-size:.9rem;color:#173a50;line-height:1.5}
.planned-show-card p{margin:6px 0 0;font-size:.78rem;line-height:1.6}
.planned-show-card .planned-show-time{color:#B91C1C;font-weight:800}
.planned-show-card .planned-show-setup{color:#15803D;font-weight:700}
.planned-show-card .planned-show-venue,.planned-show-card .planned-show-address{color:#526f83}
.planned-show-warning{font-size:.78rem;line-height:1.6;color:#9a5a1a;overflow-wrap:anywhere}
.calendar-day .calendar-credit-unknown{font-size:.62rem;background:#fff2c6;border:1px solid #d2ac51;border-radius:4px;padding:1px 3px;color:#784b05!important;line-height:1.3}
.day-credit-card .credit-reconciliation-action{min-height:44px;background:#0b2347;color:#fff;border:1px solid #0b2347;border-radius:9px;padding:11px 14px;margin-top:12px;font-weight:700;font-size:.8rem}
.day-credit-card .credit-reconciliation-action:focus-visible{outline:3px solid #6399dc;outline-offset:3px}
.day-credit-card .credit-reconciliation-confirmed{font-size:.8rem;line-height:1.6;color:#166534;font-weight:700;margin:12px 0 0}
.calendar-show-tooltip{position:fixed;z-index:1200;width:min(360px,calc(100vw - 16px));max-height:min(350px,calc(100dvh - 24px));overflow:auto;overscroll-behavior:contain;border:1px solid #9cc5dc;border-radius:12px;background:#f6fbfe;color:#173a50;box-shadow:0 8px 28px #071d3d38}
.calendar-show-tooltip .planned-show-section{border:0;margin:0;padding:12px;border-radius:0}
.calendar-show-tooltip .planned-show-card{padding:10px}
.calendar-show-tooltip .planned-show-card p{font-size:.75rem}
@media(max-width:740px){.calendar-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.calendar-kpi{padding:13px 11px}.calendar-kpi-value{font-size:1.55rem}.calendar-kpi .calendar-kpi-label{font-size:.78rem}}

/* Clear day states, source-specific credit and compact evidence viewing. */
.show-calendar-icon{display:inline-block;width:20px;height:20px;object-fit:contain;vertical-align:middle;flex:none}
.calendar-show-marker{display:inline-flex;gap:3px;align-items:center}
.calendar-wfh-marker{font-weight:800;letter-spacing:.02em}
.calendar-manual-marker{max-width:100%;font-weight:750;overflow-wrap:anywhere;font-size:.62rem}
.calendar-day .calendar-credit-unknown{max-width:100%;font-size:.58rem;overflow-wrap:anywhere}
.calendar-kpi[data-kind=wfh]{border-top-color:#25828a;background:#f3fbfb}
.calendar-kpi[data-kind=meals],.calendar-kpi[data-kind=meal-money]{border-top-color:#269358;background:#f3faf5}
.calendar-kpi[data-kind=meal-money] .calendar-kpi-value{font-size:1.4rem}
.manual-day-card{padding:16px;border:1px solid #a8d8b9;border-radius:12px;background:#f0faf4;color:#214b34;min-width:0;overflow-wrap:anywhere}
.manual-day-card h3{font-size:.92rem;color:#165c32;margin:0 0 10px}
.manual-day-card p{font-size:.81rem;line-height:1.65;margin:10px 0 0}
.manual-day-card .manual-day-audit{font-size:.73rem;color:#52715d}
.evidence-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.evidence-dialog-header h2{font-size:1rem;margin:0}
.evidence-dialog-header form,.day-dialog-header form{margin:0}
.dialog-close{font-size:1.4rem;line-height:1;min-width:40px;min-height:40px;padding:4px 10px;border-radius:50%;flex:none}
#evidence-dialog{max-height:92dvh;padding:16px;width:min(48rem,94vw)}
#evidence-dialog .dialog-close{color:white;background:#234263;border-color:#517299}
#evidence-dialog p{font-size:.78rem;line-height:1.5;margin:6px 0}
#evidence-dialog canvas{max-height:64dvh;margin:12px auto 0}
#evidence-dialog #evidence-accuracy{font-size:.69rem;opacity:.8}
#evidence-dialog #evidence-location .link{padding:2px 0}
.day-dialog-header .dialog-close{color:#34516f;background:#fff;border-color:#cbd7e5}
@media(max-width:740px){.calendar-day .show-calendar-icon{width:18px;height:18px}.calendar-kpi[data-kind=meal-money] .calendar-kpi-value{font-size:1.25rem}.calendar-day .calendar-credit-unknown{font-size:.52rem}.day-dialog-header .day-dialog-brand{font-size:.75rem}#evidence-dialog{padding:12px}#evidence-dialog canvas{max-height:60dvh}}

.calendar-kpi[data-kind=meals] .calendar-kpi-value{color:#219653}
@media(min-width:741px) and (max-width:1050px){.calendar-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Manager attendance review */
[data-view="review"] { max-width: 76rem; }
#team-attendance { container-type: inline-size; padding: clamp(14px, 2vw, 26px); }
.review-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.review-heading h2 { margin: 0; font-size: 1.25rem; letter-spacing: -.025em; }
#review-scope { margin: .35rem 0 0; color: #a7b8cc; font-size: .85rem; }
#team-count { color: #a7b8cc; font-size: .8rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
#team-attendance .review-filters { display: grid; grid-template-columns: minmax(11rem, 1.5fr) minmax(9rem, 1fr) minmax(10rem, 1fr) auto; align-items: end; gap: .75rem; margin: 1.25rem 0; }
.review-filters label { color: #b6c6d9; font-weight: 550; font-size: .76rem; }
.review-filters input, .review-filters select, #team-refresh { min-width: 0; width: 100%; height: 40px; font-size: .86rem; padding: 0 .7rem; }
.review-filters input::placeholder { color: #91a5bb; }
#team-status { max-width: none; }
.review-table { width: 100%; min-width: 0; table-layout: fixed; }
.review-table thead th { padding: .65rem .5rem; color: #b3c3d6; font-size: .73rem; font-weight: 650; }
.review-table th:first-child { width: 31%; }
.review-table th:nth-child(2) { width: 16%; }
.review-table th:nth-child(3) { width: 24%; }
.review-table th:last-child { width: 29%; text-align: right; }
.team-date td { padding: .45rem .55rem; background: #192b40; color: #c6d5e7; font-size: .73rem; font-weight: 650; letter-spacing: .015em; }
.team-event td { padding: .75rem .5rem; vertical-align: middle; overflow-wrap: anywhere; }
.team-event:last-child td { border-bottom: 0; }
.team-event strong { display: block; font-size: .86rem; font-weight: 625; line-height: 1.4; }
.team-punch strong { font-variant-numeric: tabular-nums; }
.team-event small { display: block; margin-top: .2rem; color: #aabbce; font-size: .75rem; line-height: 1.4; }
.team-event .team-flags { color: #e8bb78; }
.team-state .attendance-badge { border-radius: 5px; padding: .18rem .5rem; font-size: .73rem; font-weight: 650; }
.team-state [data-status=approved] { color: #87e5b3; background: #153b32; }
.team-state [data-status=rejected] { color: #ffacb5; background: #472831; }
.team-state [data-status=pending], .team-state [data-status=exception] { color: #f5cd89; background: #3c3223; }
.team-state [data-status=test] { color: #c3d1e4; background: #29394e; }
.team-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .35rem; }
.team-actions button { min-height: 34px; border-radius: 7px; padding: .32rem .52rem; font-size: .76rem; font-weight: 650; }
.team-actions .evidence-button { background: transparent; color: #c1d2e6; border-color: transparent; text-decoration: underline; text-underline-offset: .2em; }
.team-decision[data-decision=approved] { background: #133d32; border-color: #36674f; color: #9aefbd; }
.team-decision[data-decision=rejected] { background: #39232d; border-color: #74434c; color: #ffb3ba; }
.team-actions button:hover, .director-decision-actions button:hover { filter: brightness(1.18); }
.team-empty td { text-align: center; padding: 2rem 1rem; color: #abbdd2; }
#team-decision-dialog { max-width: min(31rem, 92vw); width: 100%; padding: 1.25rem; background: #112035; color: #edf4fc; border: 1px solid #39516d; border-radius: 15px; }
#team-decision-dialog::backdrop { background: #050e1bc9; }
#team-decision-dialog header { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
#team-decision-dialog h2 { margin: 0; }
#team-decision-dialog header button { min-width: 40px; min-height: 40px; }
#team-decision-person { overflow-wrap: anywhere; }
#team-decision-dialog .director-decision-form { margin: 1rem 0 0; padding: 0; border: 0; }
#team-decision-message:empty { display: none; }
@container (max-width: 46rem) {
  #team-attendance .review-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-table, .review-table tbody { display: block; }
  .review-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .team-date, .team-date td, .team-empty, .team-empty td { display: block; }
  .team-event { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .55rem .8rem; padding: .8rem 0; border-bottom: 1px solid #2a3c50; }
  .team-event td { display: block; border: 0; padding: 0; }
  .team-punch { text-align: right; }
  .team-event .team-state { align-self: center; }
  .team-actions button { min-height: 40px; }
}
@container (max-width: 25rem) {
  .team-event { grid-template-columns: minmax(0, 1fr) 5.5rem; }
  .team-event .team-state, .team-event .team-action-cell { grid-column: 1 / -1; }
  .team-event .team-state { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .5rem; }
  .team-state small { margin: 0; }
  .team-state .team-review-by { flex-basis: 100%; }
  .team-actions { justify-content: flex-start; }
  .team-actions button, #team-refresh, .review-filters input, .review-filters select { min-height: 44px; }
}
@container (max-width: 25rem) {
  #team-attendance .review-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-areas: "search search search refresh" "month month status status";
  }
  .review-search { grid-area: search; }
  .review-filters label:has(#team-month) { grid-area: month; }
  .review-filters label:has(#team-status) { grid-area: status; }
  #team-refresh { grid-area: refresh; padding-inline: .2rem; }
  .team-event:has(.evidence-button:only-child) .team-state { grid-column: 1; }
  .team-event:has(.evidence-button:only-child) .team-action-cell { grid-column: 2; justify-self: end; }
}

.day-management-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.day-management-actions button { min-height: 44px; }
#day-detail-dialog .team-decision[data-decision=approved], .work-dialog button[data-decision=approved] {
  color: #fff; background: #16613c; border-color: #16613c;
}
#day-detail-dialog .team-decision[data-decision=rejected] { color: #922332; background: #fff0f1; border-color: #d58a94; }
#day-detail-dialog .review-event .team-actions { justify-content: flex-start; margin-top: .5rem; }

.top > div:first-child { min-width: 0; }
#employee-profiles { max-width: 48rem; }
#employee-profiles fieldset { border: 0; margin: 1.5rem 0 .4rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 0 1rem; min-width: 0; }
#employee-profiles legend { font-weight: 700; margin-bottom: 1rem; }
#employee-profiles input, #employee-profiles select { min-width: 0; width: 100%; }
#employee-profiles [role=status]:empty { display: none; }

#employee-profiles .profile-photo { min-width: 0; margin-bottom: 1rem; }
#employee-profiles .profile-photo img { display: block; max-width: 100%; max-height: 13rem; object-fit: contain; border-radius: .5rem; margin-bottom: .5rem; }
#employee-profiles .profile-photo label { margin-bottom: .5rem; }

#employee-profiles .avatar-frame {
  position: relative; display: grid; place-items: center; width: 9rem; max-width: 100%; aspect-ratio: 3 / 4;
  overflow: hidden; border: 1px solid #58718e; border-radius: .65rem; background: #0d2035; color: #d6e3f2;
}
#employee-profiles .avatar-frame:hover { border-color: #8bbcff; }
#employee-profiles .avatar-frame:focus-within { outline: 3px solid #8bbcff; outline-offset: 3px; }
#employee-profiles .avatar-frame input {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; margin: 0;
}
#employee-profiles .avatar-frame img {
  position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; object-fit: cover; margin: 0; border-radius: 0;
}
.avatar-placeholder { display: grid; justify-items: center; gap: .65rem; font-size: .85rem; }
.avatar-frame img:not([hidden]) + .avatar-placeholder { display: none; }
.avatar-camera {
  position: absolute; bottom: .45rem; right: .45rem; display: grid; place-items: center; width: 1.75rem; height: 1.75rem;
  border-radius: 50%; color: white; background: #1d5396; border: 1px solid #98b8dc;
}

#employee-profiles .profile-star { color: #ff959b; font-weight: 700; }
#employee-profiles .profile-required-note { font-size: .875rem; margin: .5rem 0; }
#employee-profiles .id-photo-pair {
  grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(.4rem, 2vw, 1rem);
}
#employee-profiles .id-photo-pair label > span { height: 2.7em; line-height: 1.35; align-content: end; }
#employee-profiles .id-photo-pair input { overflow: hidden; }
@media (min-width: 640px) { #employee-profiles .id-photo-pair label > span { height: 1.35em; } }

#calendar-days .calendar-day.adjacent-month[data-leave-type] { background:#f8f9fb; border-color:#e6eaf0; color:#657382; }
#calendar-days .adjacent-month .calendar-markers { color:#516477; }
#calendar-days .adjacent-month .adjacent-event {
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  max-width:100%; overflow-wrap:anywhere; font-weight:600; font-size:.69rem; line-height:1.25;
}

.calendar-kpi .meal-day-result {
  display:block; width:100%; min-height:28px; margin:0; padding:3px 0;
  border:0; border-radius:3px; background:transparent; box-shadow:none; color:inherit;
  font:inherit; font-size:.76rem; line-height:1.45; text-align:left; cursor:pointer;
}
.meal-day-date { font-weight:700; text-decoration:underline; text-underline-offset:2px; }
.calendar-kpi .meal-day-result:focus-visible { outline:2px solid currentColor; outline-offset:2px; }
.calendar-kpi .meal-day-list { font-size:.76rem; }
.calendar-kpi .meal-day-list summary { cursor:pointer; }
.calendar-meal-marker { font-size:.65rem; font-weight:700; }
