/* BenTrack V7.9 mobile-first visual refresh. */
:root{--app-ink:#173642;--app-muted:#657e88;--app-teal:#117f97;--app-green:#218e70;--app-bg:#f0f5f6;--app-line:#d9e4e7;--app-soft:#e5f2f4;--app-paper:#fff}
body{background:var(--app-bg);color:var(--app-ink)}
.wrap{max-width:1180px;padding:clamp(10px,2.6vw,28px)}
.top{margin-bottom:18px}.brand h1{letter-spacing:-.025em}.nav{gap:8px;margin:16px 0 20px}.nav button{min-height:44px;font-weight:600}.nav button.on{background:var(--app-ink)}
.app-card{border:1px solid var(--app-line);border-radius:22px;box-shadow:0 8px 24px rgba(23,54,66,.055);padding:clamp(16px,2.5vw,24px);margin-bottom:14px}
.eyebrow{font-size:12px;letter-spacing:.06em;color:var(--app-muted);font-weight:650}
.attendance-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.attendance-heading h2{margin:4px 0 8px}.attendance-status{border-radius:20px;background:#e7f5ef;color:#1d765e;padding:8px 12px;font-size:13px;font-weight:650;white-space:nowrap}
.attendance-panel #attendanceTodaySummary{font-size:14px;line-height:1.4}.attendance-actions{display:grid;grid-template-columns:1.5fr 1fr 1fr;gap:9px;margin-top:14px}.attendance-actions .big,.attendance-actions .pill{min-height:48px;margin:0}.attendance-actions .app-primary,.app-primary{background:var(--app-teal);color:#fff}.correction-shortcut{grid-column:1/-1;justify-self:start}
.period-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;padding:4px;background:var(--app-soft);border-radius:14px;margin-bottom:12px}.period-tab{min-height:42px;border:0;border-radius:11px;background:transparent;color:var(--app-muted);font-weight:650}.period-tab.on{background:var(--app-teal);color:#fff}
.period-heading{display:grid;grid-template-columns:44px 1fr 44px;align-items:center;text-align:center;margin:4px 0 14px}.period-heading h2{font-size:19px;margin:0}.period-heading .muted{font-size:13px;margin-top:2px}.period-arrow{width:44px;height:44px;border:1px solid var(--app-line);border-radius:13px;background:var(--app-paper);color:var(--app-ink);font-size:27px;line-height:1}.period-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.period-stat{min-width:0;border-radius:16px;background:#f5f8f9;padding:13px}.period-stat span,.period-stat small{display:block;color:var(--app-muted);font-size:13px}.period-stat strong{display:block;font-size:22px;letter-spacing:-.02em;margin:3px 0;line-height:1.2;overflow-wrap:anywhere}.period-stat small{font-size:11px}.period-goal{margin-top:12px}.period-goal .row{justify-content:space-between;font-size:13px}.period-goal .progress{height:8px;margin-top:7px}.period-goal .progress i{background:var(--app-green)}
.time-account-panel{margin-top:14px}.time-account-head{align-items:center}.time-account-balance{font-size:27px;margin:3px 0}.time-account-panel .big{min-height:44px;padding:12px 14px}.time-account-details{margin-top:9px}.time-account-details summary{min-height:40px;display:flex;align-items:center;color:var(--app-muted);font-weight:600;cursor:pointer}.time-account-details .table-scroll{max-width:100%;overflow:auto}
.calendar-title-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:16px}.calendar-title-row h2{margin:0}.calendar-month-control{display:flex;align-items:center;gap:9px}.calendar-month-control strong{text-align:center;min-width:126px}.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}.calendar-weekday{text-align:center;color:var(--app-muted);font-size:12px;padding:5px 0}.calendar-day{position:relative;min-width:0;min-height:54px;border:1px solid transparent;border-radius:13px;background:#f3f7f8;color:var(--app-ink);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px}.calendar-day:disabled{background:transparent}.calendar-day.selected{border-color:var(--app-teal);background:var(--app-soft);font-weight:700}.calendar-day.today .calendar-number{color:var(--app-teal);font-weight:750}.calendar-markers{height:6px;display:flex;gap:3px}.calendar-markers i,.legend-dot{width:6px;height:6px;border-radius:50%;display:inline-block;background:var(--app-teal)}.calendar-markers .stamp-dot,.legend-dot.stamp-dot{background:#218e70}.calendar-markers .hotel-dot,.legend-dot.hotel-dot{background:#c4455b}.calendar-legend{display:flex;gap:16px;flex-wrap:wrap;margin:13px 0 18px;color:var(--app-muted);font-size:13px}.calendar-legend span{display:flex;align-items:center;gap:6px}.calendar-selected{padding-top:14px;border-top:1px solid var(--app-line)}.calendar-selected h3{margin:0 0 10px}.calendar-selected>.big{width:100%;min-height:50px;margin-top:10px}
.calendar-report{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid var(--app-line)}.calendar-report:last-child{border-bottom:0}.calendar-report-main{min-width:0}.calendar-report-main strong,.calendar-report-main span{display:block;overflow-wrap:anywhere}.calendar-report-main span{font-size:13px;color:var(--app-muted);margin-top:2px}.calendar-report-actions{display:flex;gap:6px;flex:0 0 auto}.calendar-report-actions .pill{padding:9px 11px;min-height:42px}
.capture-title-row{display:flex;align-items:center;gap:14px;margin-bottom:12px}.capture-title-row h2{margin:2px 0}.capture-title-row>div:last-child{min-width:0}.capture-panel .capture-form>.formgrid{display:block}.capture-panel .field{min-height:48px;border-color:var(--app-line);background:#f2f6f7;border-radius:13px;padding:12px 14px}.capture-panel textarea.field{min-height:96px}.capture-panel label{display:block;font-size:14px;color:var(--app-muted);font-weight:550}.entry-section{margin:0 0 12px;padding:16px;border-radius:18px;border:1px solid var(--app-line);background:var(--app-paper)}.entry-section>summary{font-size:17px;font-weight:700;cursor:pointer;list-style:none}.entry-section>summary::-webkit-details-marker{display:none}.entry-section>summary:after{content:'⌄';float:right;color:var(--app-teal)}.entry-section[open]>summary{margin-bottom:14px}.entry-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.entry-fields>.wide{grid-column:1/-1}.entry-field{display:grid;gap:6px;min-width:0}.entry-date-card{padding:14px 0;border-top:1px solid var(--app-line)}.entry-date-card:first-child{border-top:0}.entry-date-card h3{font-size:15px;margin:0 0 12px}.entry-travel-label{grid-column:1/-1;margin:8px 0 -2px;font-size:13px;font-weight:700;color:var(--app-ink)}.entry-total{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;padding:12px;border-radius:13px;background:var(--app-soft);font-weight:600}
.signature-pad{display:block;width:100%;height:150px;border:1px solid var(--app-line);border-radius:14px;background:#fff;touch-action:none}.signature-actions{display:flex;justify-content:flex-end;margin-top:6px}.signature-actions button{min-height:40px}.capture-files{display:grid;gap:8px}.capture-files input[type=file]{display:block;width:100%;font-size:14px}.pending-files{display:grid;gap:5px;color:var(--app-muted);font-size:13px}.capture-save{width:100%;min-height:52px;margin-top:8px}.capture-form .big{border-radius:14px}
.attachment-archive{display:grid;gap:10px;margin-top:18px}.attachment-group{padding:13px 0;border-top:1px solid var(--app-line)}.attachment-group h3{font-size:15px;margin:0 0 8px}.attachment-row{display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px;padding:8px 0}.attachment-row-main{min-width:0}.attachment-row-main strong,.attachment-row-main span{display:block;overflow-wrap:anywhere}.attachment-row-main span{color:var(--app-muted);font-size:13px}.attachment-row-actions{display:flex;gap:6px;align-items:center}.attachment-row-actions button{min-height:42px}.attachment-toggle{font-size:12px;display:flex;align-items:center;gap:4px;color:var(--app-muted)}.attachment-preview{max-width:min(100%,480px);max-height:72vh;object-fit:contain;border-radius:12px}.attachment-modal{position:fixed;inset:0;z-index:2500;background:#0f2730cc;display:grid;place-items:center;padding:18px}.attachment-modal-content{background:var(--app-paper);color:var(--app-ink);padding:16px;border-radius:18px;max-width:min(94vw,600px);max-height:90vh;overflow:auto}.attachment-modal-content .pill{margin-top:10px}
.report-attachments{margin-top:14px;padding-top:10px;border-top:1px solid #777}.report-attachments h3{margin:2mm 0;background:transparent}.report-attachments img{max-width:100%;max-height:210mm;object-fit:contain;display:block;margin:4mm auto}.attachment-appendix{break-before:page;page-break-before:always;break-inside:avoid;page-break-inside:avoid;text-align:center;padding-top:8mm}.attachment-appendix figcaption{font-size:10pt;margin:0 0 4mm}.report-signature{display:block;max-width:65mm;max-height:22mm;margin:0 auto 3mm;object-fit:contain}
.correction-panel h2{margin:0 0 6px}.attendance-session-row{padding:12px 0;border-top:1px solid var(--app-line)}.attendance-session-row:first-child{border-top:0}.attendance-session-row .row{justify-content:space-between;align-items:center}.attendance-session-actions{display:flex;gap:6px}.attendance-session-actions button{min-height:42px}
.mobile-nav{background:rgba(255,255,255,.98);backdrop-filter:blur(12px);border-top:1px solid var(--app-line);box-shadow:0 -5px 18px rgba(23,54,66,.08)}.mobile-nav button{min-height:48px}.mobile-more-menu{bottom:calc(74px + env(safe-area-inset-bottom));border-radius:18px;padding:9px}
.formgrid{gap:12px}.field{min-height:46px}.card h2{letter-spacing:-.02em}
@media(max-width:700px){.wrap{padding:9px 10px 18px}.attendance-heading{display:block}.attendance-status{display:inline-block;margin:2px 0 9px}.attendance-actions{grid-template-columns:1fr 1fr}.attendance-actions .app-primary{grid-column:1/-1}.correction-shortcut{grid-column:1/-1}.time-account-head{flex-direction:row!important;align-items:center!important}.time-account-head .big{max-width:148px;font-size:13px}.time-account-summary{font-size:12px}.calendar-day{min-height:45px;border-radius:10px;font-size:14px}.entry-fields{grid-template-columns:1fr}.entry-fields>.wide{grid-column:auto}.entry-travel-label{grid-column:auto}.capture-title-row{align-items:flex-start;flex-direction:column}.calendar-report{align-items:flex-start}.calendar-report-actions{flex-direction:column}.period-stat strong{font-size:21px}}
@media(max-width:360px){.period-stat{padding:10px}.period-stat strong{font-size:19px}.period-stat small{font-size:10px}.calendar-grid{gap:3px}.calendar-day{min-height:41px}.calendar-month-control strong{min-width:110px;font-size:14px}.calendar-report-actions .pill{padding:7px}.time-account-head .big{max-width:120px;padding:9px;font-size:12px}}
/* V7.9 capture media, calendar report cards and attendance correction controls. */
.calendar-day{cursor:pointer}.calendar-day>span{line-height:1}.calendar-report{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center}.calendar-report>div:first-child{min-width:0;overflow-wrap:anywhere}.calendar-attachments{grid-column:1/-1;display:flex;gap:10px;flex-wrap:wrap}.attachment-capture{border:1px solid var(--app-line);border-radius:17px;padding:15px;margin-top:12px;background:#fbfdfd}.attachment-capture h3{margin:0 0 6px}.file-picker{display:grid;gap:7px}.attachment-preview{display:flex;gap:7px;flex-wrap:wrap;margin:8px 0}.file-chip{background:var(--app-soft);border-radius:30px;padding:7px 11px;font-size:13px}.signature-box{margin-top:16px;display:grid;gap:7px}.signature-box canvas{width:100%;height:120px;display:block;border:1px solid var(--app-line);border-radius:13px;background:#fff;touch-action:none}.archive-upload{padding-top:10px}.archive-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;padding:12px 0;border-bottom:1px solid var(--app-line)}.archive-item>div:first-child{min-width:0;overflow-wrap:anywhere}.archive-item .row{justify-content:flex-end}.correction-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px;align-items:center;padding:10px 0;border-top:1px solid var(--app-line)}.correction-row>div{display:flex;flex-direction:column;gap:3px}.correction-editor{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;border-top:1px solid var(--app-line);padding-top:15px;margin-top:14px}.correction-editor h4,.correction-editor .wide{grid-column:1/-1}.correction-editor label{display:grid;gap:5px}.attachment-print-page{break-before:page;page-break-before:always;break-inside:avoid;page-break-inside:avoid;text-align:center;padding:6mm;color:#111;background:#fff}.attachment-print-page h2{border-bottom:1px solid #777;padding-bottom:3mm}.attachment-print-page img{max-width:100%;max-height:245mm;object-fit:contain}.work-report .attachment-print-page{min-height:250mm}
@media(max-width:600px){.archive-item{grid-template-columns:1fr}.archive-item .row{justify-content:flex-start}.correction-row{grid-template-columns:1fr auto auto}.correction-row>div{grid-column:1/-1}.correction-editor{grid-template-columns:1fr}.correction-editor h4,.correction-editor .wide{grid-column:auto}.calendar-report{grid-template-columns:1fr}.calendar-report>.row{justify-content:flex-start}.calendar-attachments{grid-column:auto}}
@media print{.attachment-print-page{break-before:page!important;page-break-before:always!important}.attachment-print-page img{max-height:245mm}}
@media print{html,body{height:auto!important;min-height:0!important;overflow:visible!important}body:has(#printReport.work-report) #printReport.work-report{position:static!important;left:auto!important;top:auto!important;break-after:auto!important;page-break-after:auto!important;margin:0!important}body:has(#printReport.work-report) #reports,body:has(#printReport.work-report) #reports>.card,body:has(#printReport.work-report) #reportOut{height:auto!important;min-height:0!important;overflow:visible!important}.work-report footer{break-inside:avoid;page-break-inside:avoid}}
.attendance-actions{grid-template-columns:minmax(0,1.6fr) minmax(150px,.8fr)}.attendance-actions .correction-shortcut{grid-column:1/-1}.attendance-notice,.attendance-feedback{margin:10px 0 0;padding:10px 12px;border-radius:12px;background:#e7f5ef;color:#1d765e;font-size:14px}.attendance-feedback[hidden],.attendance-notice[hidden]{display:none}.attendance-notice.error,.attendance-feedback.error{background:#fff0f0;color:#a53b3b}.attendance-notice.success{background:#e7f5ef;color:#1d765e}.attendance-pause-editor{border-top:1px solid var(--app-line);padding-top:10px}.attendance-pause-row{display:grid;grid-template-columns:1fr 1fr auto;gap:9px;align-items:end;margin:9px 0;padding:10px;border:1px solid var(--app-line);border-radius:13px;background:#f8fbfb}.attendance-pause-row label{display:grid;gap:5px}.attendance-pause-row button{min-height:44px}.attendance-actions button:disabled{opacity:.6;cursor:wait}
@media(max-width:600px){.attendance-actions{grid-template-columns:1fr 1fr}.attendance-actions .app-primary{grid-column:1/-1}.attendance-pause-row{grid-template-columns:1fr 1fr}.attendance-pause-row button{grid-column:1/-1;justify-self:start}}
.calendar-stamp-section{padding:13px 14px;margin:8px 0 14px;border:1px solid #cce7dc;border-radius:15px;background:#f0faf5}.calendar-stamp-section h3,.calendar-customer-reports h3{margin:0 0 8px;font-size:16px}.calendar-stamp-entry{padding:8px 0;border-top:1px solid #d7ece2}.calendar-stamp-entry:first-of-type{border-top:0}.calendar-stamp-entry strong{color:#1c765c}.calendar-customer-reports{margin-top:12px}

/* V7.9.4 server refresh feedback and logo affordance */
#app .brand img[role="button"]{cursor:pointer;touch-action:manipulation}#app .brand img[role="button"]:focus-visible{outline:3px solid var(--app-teal);outline-offset:3px;border-radius:50%}#app .brand img.refreshing{animation:ben-refresh-spin .8s linear infinite}@keyframes ben-refresh-spin{to{transform:rotate(360deg)}}.server-refresh-notice{position:fixed;z-index:3000;top:calc(12px + env(safe-area-inset-top));left:50%;transform:translate(-50%,-12px);opacity:0;pointer-events:none;background:#173d4d;color:#fff;padding:10px 16px;border-radius:999px;box-shadow:0 5px 20px #1233;font-size:14px;transition:opacity .18s,transform .18s;max-width:min(92vw,460px);text-align:center}.server-refresh-notice.shown{opacity:1;transform:translate(-50%,0)}.server-refresh-notice.success{background:#1d765e}.server-refresh-notice.error,.server-refresh-notice.warning{background:#9a4a24}.server-refresh-notice.busy{background:#173d4d}

.text-suggestions-title{padding:8px 10px 4px;color:#657983;font-size:12px;font-weight:700}.text-suggestion{font-size:14px;line-height:1.35;white-space:normal}

/* V7.9.5: make calendar attendance edits easy to reach and tap on phones. */
.calendar-stamp-entry{display:flex;justify-content:space-between;align-items:center;gap:12px}.calendar-stamp-info{min-width:0}.calendar-stamp-edit{min-height:44px;flex:0 0 auto}.correction-editor{scroll-margin-bottom:120px}
@media(max-width:600px){.calendar-stamp-entry{align-items:flex-start;flex-direction:column}.calendar-stamp-edit{width:100%;min-height:46px}.correction-panel{scroll-margin-top:16px}}

/* V7.9.6 camera capture and gallery/file picker */
.image-source-actions{display:flex;gap:9px;flex-wrap:wrap;margin:10px 0}.image-source-actions button{min-height:46px}.visually-hidden-input{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.image-camera-modal{display:none;position:fixed;inset:0;z-index:10000;background:#07151de8;align-items:center;justify-content:center;padding:16px}.image-camera-modal.shown{display:flex}.image-camera-dialog{width:min(100%,760px);max-height:94dvh;overflow:auto;background:#fff;border-radius:18px;padding:16px;box-shadow:0 12px 50px #0008}.image-camera-dialog h3{margin:0 auto 0 0}.image-camera-dialog video{display:block;width:100%;max-height:70dvh;object-fit:contain;background:#101820;border-radius:12px}.image-camera-dialog .row:last-child{margin-top:10px}
@media(max-width:600px){.image-source-actions{display:grid;grid-template-columns:1fr}.image-camera-modal{padding:10px}.image-camera-dialog{padding:12px;border-radius:15px}.image-camera-dialog .row .big{flex:1}}
