:root{--bg:#f4f6f8;--panel:#fff;--text:#111827;--muted:#6b7280;--line:#d6dce3;--brand:#111827;--blue:#1d4ed8;--green:#047857;--red:#b91c1c;--amber:#92400e;--radius:6px;--shadow:0 10px 30px rgba(17,24,39,.08)}*{box-sizing:border-box}body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--text)}button,input,label{font:inherit}.app-shell{min-height:100vh}.topbar{height:auto;min-height:72px;background:var(--brand);color:white;display:flex;align-items:center;justify-content:space-between;padding:14px 24px;border-bottom:1px solid rgba(255,255,255,.08);gap:16px}.brand{display:flex;align-items:center;gap:12px}.brand img{width:42px;height:42px;object-fit:contain;background:#fff;border-radius:4px;padding:3px}.brand h1{font-size:22px;line-height:1;margin:0}.brand p{margin:5px 0 0;color:#cbd5e1;font-size:13px}.top-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.layout{display:grid;grid-template-columns:360px 1fr;grid-template-areas:"control summary" "control history";gap:16px;padding:18px;max-width:1260px;margin:0 auto}.panel{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:16px}.control-panel{grid-area:control}.summary-panel{grid-area:summary}.history-panel{grid-area:history}.section-title{display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:1px solid var(--line);padding-bottom:12px;margin-bottom:14px;font-weight:700}.badge{font-size:12px;padding:5px 8px;border-radius:4px}.badge.off{background:#e5e7eb;color:#374151}.badge.on{background:#dcfce7;color:#166534}.clock-card{border:1px solid var(--line);border-radius:var(--radius);padding:16px;background:#fafafa;margin-bottom:14px}.live-time{font-size:34px;font-weight:800;letter-spacing:-.04em}.muted{color:var(--muted);font-size:13px}.button-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:12px}button,.file-label{border:0;border-radius:4px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;min-height:42px;padding:10px 14px;font-weight:700}button:disabled{opacity:.45;cursor:not-allowed}.primary{background:var(--green);color:#fff}.danger{background:var(--red);color:#fff}.ghost{background:#fff;color:var(--text);border:1px solid var(--line)}.small{min-height:34px;padding:7px 10px;font-size:13px}.danger-text{color:var(--red)}.file-label input{display:none}.hint{font-size:13px;color:var(--muted);line-height:1.45;background:#f8fafc;border-left:3px solid #94a3b8;padding:10px;margin-bottom:12px}.info-box{border:1px solid var(--line);border-radius:var(--radius);padding:12px;margin-bottom:14px;background:#fff}.hidden{display:none}.info-line{display:flex;justify-content:space-between;padding:7px 0;border-bottom:1px solid #eef2f7;font-size:14px}.info-line:last-child{border-bottom:0}.map-link{display:block;margin-top:10px;color:var(--blue);font-weight:700;text-decoration:none}.settings-line{display:grid;gap:7px}.settings-line label{font-size:13px;color:var(--muted);font-weight:700}.settings-line input,.settings-line select{height:42px;border:1px solid var(--line);border-radius:4px;padding:0 10px;background:#fff}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.stat{border:1px solid var(--line);border-radius:var(--radius);padding:14px;background:#fafafa}.stat span{display:block;color:var(--muted);font-size:12px;margin-bottom:8px}.stat strong{font-size:20px}.smart-box{margin-top:14px;border:1px solid var(--line);border-radius:var(--radius);padding:14px;background:#fff}.smart-box h2{font-size:15px;margin:0 0 8px}.smart-box ul{margin:0;padding-left:18px;color:#374151}.smart-box li{margin:6px 0}.empty{padding:22px;border:1px dashed var(--line);border-radius:var(--radius);color:var(--muted);text-align:center;background:#fafafa}.shift-list{display:grid;gap:10px}.shift-card{border:1px solid var(--line);border-radius:var(--radius);background:#fff;padding:12px;display:grid;grid-template-columns:1.2fr .8fr .8fr auto;gap:10px;align-items:center}.shift-main strong{display:block;margin-bottom:4px}.shift-meta{font-size:13px;color:var(--muted);line-height:1.5}.shift-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.shift-actions a,.shift-actions button{min-height:32px;font-size:12px;padding:6px 8px}.warn{color:var(--amber);font-weight:700}.ok{color:var(--green);font-weight:700}@media (max-width:960px){.layout{grid-template-columns:1fr;grid-template-areas:"control" "summary" "history"}.stats-grid{grid-template-columns:repeat(2,1fr)}.shift-card{grid-template-columns:1fr 1fr}.shift-actions{justify-content:flex-start}}@media (max-width:640px){.topbar{align-items:flex-start;flex-direction:column;padding:14px}.top-actions{width:100%;display:grid;grid-template-columns:1fr 1fr 1fr}.layout{padding:10px;gap:10px}.panel{padding:12px;box-shadow:none}.button-row{grid-template-columns:1fr}.stats-grid{grid-template-columns:1fr 1fr}.live-time{font-size:30px}.shift-card{grid-template-columns:1fr}.shift-actions{display:grid;grid-template-columns:1fr 1fr}.shift-actions a,.shift-actions button{width:100%}}@media (max-width:380px){.stats-grid,.top-actions{grid-template-columns:1fr}.brand h1{font-size:20px}}
.away-alert{border:1px solid #f59e0b;background:#fffbeb;color:#78350f;border-radius:4px;padding:12px;margin-bottom:12px;display:grid;gap:8px}.away-alert strong{font-size:14px}.away-alert span{font-size:13px;line-height:1.4}.modal{position:fixed;inset:0;background:rgba(17,24,39,.55);display:grid;place-items:center;padding:18px;z-index:20}.modal.hidden{display:none}.modal-card{width:min(520px,100%);background:#fff;border:1px solid var(--line);border-radius:6px;box-shadow:0 18px 50px rgba(0,0,0,.2);padding:16px}.modal-copy{color:var(--muted);font-size:14px;margin:0 0 12px}.reason-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px}.reason-grid button{background:#fff;border:1px solid var(--line);color:var(--text);min-height:40px;border-radius:4px}.reason-grid button.selected{background:#111827;color:#fff;border-color:#111827}.note-label{display:block;color:var(--muted);font-size:13px;font-weight:700;margin:8px 0 6px}.modal textarea{width:100%;border:1px solid var(--line);border-radius:4px;padding:10px;resize:vertical;font:inherit}.full{width:100%;margin-top:12px}.reason-wrap{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}.reason-chip{font-size:12px;background:#eef2ff;color:#3730a3;border:1px solid #c7d2fe;border-radius:4px;padding:4px 6px}@media(max-width:640px){.reason-grid{grid-template-columns:1fr}.modal{align-items:end;padding:0}.modal-card{border-radius:8px 8px 0 0}}
.settings-panel{margin-top:14px;border:1px solid var(--line);border-radius:4px;background:#fff}.settings-panel summary{cursor:pointer;font-weight:700;padding:11px 12px;color:#111827}.settings-grid{display:grid;gap:10px;padding:0 12px 12px}.report-card{width:min(980px,100%);max-height:92vh;overflow:auto}.report-toolbar{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.report-preview{background:#fff;border:1px solid var(--line);border-radius:4px;padding:18px;overflow:auto}.work-report{font-family:Inter,Segoe UI,Arial,sans-serif;color:#111827;background:#fff}.report-head{display:flex;justify-content:space-between;gap:16px;border-bottom:2px solid #111827;padding-bottom:14px;margin-bottom:16px}.report-brand{display:flex;align-items:center;gap:12px}.report-brand img{width:54px;height:54px;object-fit:contain;background:#111827;border-radius:4px;padding:4px}.report-brand h2{margin:0;font-size:24px}.report-brand p{margin:4px 0 0;color:#475569;font-size:13px}.report-meta{text-align:right;font-size:13px;color:#334155;line-height:1.6}.report-section{margin-top:16px}.report-section h3{font-size:15px;margin:0 0 8px;color:#111827}.report-info{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.report-info div{border:1px solid #d6dce3;padding:10px;border-radius:4px}.report-info span{display:block;color:#64748b;font-size:12px}.report-info strong{font-size:16px}.report-table{width:100%;border-collapse:collapse;font-size:13px}.report-table th,.report-table td{border:1px solid #d6dce3;padding:8px;text-align:left;vertical-align:top}.report-table th{background:#f1f5f9}.report-footer{border-top:1px solid #d6dce3;margin-top:16px;padding-top:10px;color:#475569;font-size:12px;display:flex;justify-content:space-between;gap:10px}.map-mini{color:#1d4ed8;text-decoration:none;font-weight:700}@media(max-width:760px){.report-info{grid-template-columns:1fr 1fr}.report-head{flex-direction:column}.report-meta{text-align:left}.report-preview{padding:10px}.report-table{font-size:12px}.report-toolbar{display:grid;grid-template-columns:1fr 1fr}.report-footer{flex-direction:column}}@media print{body>*{display:none!important}.print-root{display:block!important}.work-report{display:block!important;padding:20px}.report-table th,.report-table td{font-size:11px}.map-mini{color:#111827;text-decoration:none}}


/* Store address fix */
.full-field{grid-column:1 / -1;}
#storeAddress{resize:vertical;min-height:52px;font-family:inherit;line-height:1.35;}
.field-status{display:block;margin-top:6px;color:#475569;font-size:12px;}
.settings-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;}
@media (max-width:640px){.settings-actions .small{width:100%;}}


/* Professional modal notifications - replaces browser alerts */
.message-card{max-width:430px;text-align:center;padding:22px;}
.message-icon{width:44px;height:44px;margin:0 auto 12px;display:grid;place-items:center;background:#dcfce7;color:#166534;border:1px solid #bbf7d0;border-radius:6px;font-weight:900;font-size:22px;}
.message-icon.warning{background:#fef3c7;color:#92400e;border-color:#fde68a;}
.message-card h2{font-size:18px;margin:0 0 8px;color:#111827;}
.message-card p{margin:0;color:#4b5563;line-height:1.5;font-size:14px;}
.message-actions{display:flex;justify-content:center;margin-top:18px;gap:10px;}
.message-actions button{min-width:104px;}
.message-actions.two{display:grid;grid-template-columns:1fr 1fr;}
@media(max-width:640px){.message-card{border-radius:8px 8px 0 0;max-width:100%;}.message-actions,.message-actions.two{grid-template-columns:1fr;display:grid}.message-actions button{width:100%;}}


/* Colored modal states */
.message-card.success{border-top:5px solid #16a34a;}
.message-card.error{border-top:5px solid #dc2626;}
.message-card.success .message-icon{background:#dcfce7;color:#166534;border-color:#86efac;}
.message-card.error .message-icon{background:#fee2e2;color:#b91c1c;border-color:#fecaca;}
.message-card.success h2{color:#166534;}
.message-card.error h2{color:#b91c1c;}


/* Final corporate polish */
:root{--brand:#0f172a;--accent:#0e7490;--soft:#f8fafc;--radius:5px;--shadow:0 6px 18px rgba(15,23,42,.07)}
body{background:#eef3f6}.topbar{min-height:64px;padding:10px 18px;background:linear-gradient(90deg,#0f172a,#155e75)}
.brand img{width:38px;height:38px;border-radius:3px;background:#020617;padding:0}.brand h1{font-size:21px}.brand p{font-size:12px;color:#e2e8f0}.app-menu{position:relative}.app-menu summary{list-style:none;cursor:pointer;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.22);padding:8px 12px;border-radius:4px;font-weight:700}.app-menu summary::-webkit-details-marker{display:none}.menu-list{position:absolute;right:0;top:42px;z-index:20;background:#fff;border:1px solid var(--line);box-shadow:var(--shadow);border-radius:6px;padding:8px;min-width:190px;display:grid;gap:6px}.menu-list .ghost,.menu-list .file-label{width:100%;justify-content:flex-start;color:#111827;background:#f8fafc;border:1px solid #e2e8f0}.panel{box-shadow:var(--shadow);border-radius:5px}.hint{font-size:13px;line-height:1.45;background:#f8fafc;border-left:3px solid #0e7490}.button-row button{min-height:48px;border-radius:5px}.clock-card{padding:12px}.live-time{font-size:30px}.info-box{font-size:14px}.info-line{gap:12px}.info-line strong{text-align:right;word-break:break-word}.shift-card{border-radius:5px;padding:12px}.shift-actions .ghost{padding:7px 9px}.smart-box h2{font-size:15px}.smart-box li{font-size:13px;margin-bottom:6px}.message-card{max-width:360px;padding:22px 20px;border-radius:7px;border-top:5px solid #0e7490}.message-card.success{border-top-color:#16a34a}.message-card.error{border-top-color:#dc2626}.message-icon{width:46px;height:46px;border-radius:7px;margin-bottom:10px;font-size:24px}.message-card.success .message-icon{background:#dcfce7;color:#166534;border:1px solid #86efac}.message-card.error .message-icon{background:#fee2e2;color:#b91c1c;border:1px solid #fecaca}.message-card.success h2{color:#166534}.message-card.error h2{color:#b91c1c}.message-card p{font-size:15px;line-height:1.55}.message-actions .primary{min-width:110px;background:#0f766e}.product-footer{text-align:center;padding:16px 12px 24px;font-size:13px}.product-footer a{color:#155e75;text-decoration:none;font-weight:600}.product-footer a:hover{text-decoration:underline}.report-card{max-width:1050px}.professional-report-head{background:#f8fafc;border:1px solid #dbe3ea;border-radius:6px;padding:16px}.report-brand h2{font-size:22px;margin-bottom:3px}.report-brand p{margin:2px 0}.report-meta{background:#fff;border:1px solid #e5e7eb;border-radius:5px;padding:12px;line-height:1.35}.report-info div{border-radius:5px;background:#fff}.report-table th{background:#0f172a;color:#fff}.report-table td,.report-table th{padding:9px 8px}.report-signature{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:18px;padding-top:16px;border-top:1px solid #dbe3ea;font-size:14px}.report-footer{margin-top:18px;padding-top:12px;border-top:1px solid #dbe3ea;color:#475569;font-size:12px;display:flex;justify-content:space-between;gap:12px}.report-toolbar{flex-wrap:wrap}.report-toolbar button{border-radius:4px}
@media (max-width: 760px){.topbar{position:sticky;top:0;z-index:10}.brand h1{font-size:20px}.brand p{max-width:210px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.layout{display:block;padding:10px}.panel{margin-bottom:10px;padding:12px}.section-title{font-size:15px}.button-row{position:sticky;top:64px;z-index:9;background:#fff;padding:8px 0;border-bottom:1px solid #e5e7eb}.button-row button{font-size:16px}.stats-grid{grid-template-columns:1fr 1fr}.shift-card{grid-template-columns:1fr;gap:8px}.shift-actions{display:flex;justify-content:flex-start;flex-wrap:wrap}.menu-list{right:0;min-width:210px}.modal-card{width:min(94vw,520px);padding:14px}.message-card{width:min(88vw,340px);padding:20px 16px}.report-head{display:block}.report-meta{margin-top:12px}.report-info{grid-template-columns:1fr 1fr}.report-table{font-size:12px}.report-preview{overflow-x:auto}.report-signature{grid-template-columns:1fr;gap:10px}.report-footer{display:block}.live-time{font-size:28px}}
@media print{.topbar,.layout,.product-footer,.report-toolbar,#closeReportBtn{display:none!important}.modal{position:static;background:white}.modal-card{box-shadow:none;border:none;width:100%;max-width:none}.report-card{display:block}.work-report{padding:0}.report-table{font-size:11px}.report-signature{page-break-inside:avoid}}
/* Final production polish */
.product-footer{display:grid;gap:6px;color:#64748b}
.product-footer span{display:block;color:#64748b;font-size:12px}
.shift-meta span{display:none!important}
.shift-card{box-shadow:none}
@media (max-width:760px){.shift-card{padding:10px}.shift-main strong{font-size:16px}.shift-meta{font-size:13px}.smart-box{display:none}.stats-grid .stat{padding:10px}.stat strong{font-size:18px}}

.smart-details{padding:0;background:#f8fafc}.smart-details summary{cursor:pointer;font-weight:700;padding:10px 12px;color:#334155}.smart-details ul{padding:0 18px 12px 30px}.smart-details h2{display:none}.product-footer a{word-break:break-word}

/* Final lightweight history polish */
.history-total{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  margin: -2px 0 10px;
  padding:8px 10px;
  background:#f8fafc;
  border:1px solid #e5e7eb;
  border-radius:4px;
  color:#334155;
  font-size:14px;
}

/* v63: compact dashboard pay summary */
html body .summary-panel .total-amount-card,
html body .total-amount-card{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:8px!important;
  align-items:stretch!important;
  margin:8px 0 12px!important;
  padding:8px!important;
  min-height:0!important;
  border:1px solid #cfe0f5!important;
  border-radius:7px!important;
  background:#f5f9ff!important;
  box-shadow:none!important;
  overflow:visible!important;
}

html body .summary-panel .total-amount-card > div:first-child,
html body .summary-panel .total-amount-meta > span,
html body .total-amount-card > div:first-child,
html body .total-amount-meta > span{
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:center!important;
  gap:4px!important;
  min-width:0!important;
  min-height:58px!important;
  padding:9px 10px!important;
  border:1px solid #d7e6f8!important;
  border-left:3px solid #1792d4!important;
  border-radius:5px!important;
  background:#fff!important;
  text-align:left!important;
  box-shadow:none!important;
}

html body .summary-panel .total-amount-meta,
html body .total-amount-meta{
  display:contents!important;
}

html body .summary-panel .total-amount-card span,
html body .summary-panel .total-amount-meta > span,
html body .total-amount-card span,
html body .total-amount-meta > span{
  margin:0!important;
  color:#53657a!important;
  font-size:10px!important;
  line-height:1.1!important;
  font-weight:900!important;
  text-transform:uppercase!important;
  letter-spacing:.02em!important;
}

html body .summary-panel .total-amount-card strong,
html body .summary-panel .total-amount-meta strong,
html body .total-amount-card strong,
html body .total-amount-meta strong{
  display:block!important;
  margin:0!important;
  color:#081b33!important;
  font-size:19px!important;
  line-height:1!important;
  font-weight:900!important;
  letter-spacing:0!important;
  text-transform:none!important;
}

html body .summary-panel .total-amount-meta > span:nth-child(2),
html body .total-amount-meta > span:nth-child(2){
  border-left-color:#0f766e!important;
}

html body .summary-panel .total-amount-meta > span:nth-child(3),
html body .total-amount-meta > span:nth-child(3){
  border-left-color:#b45309!important;
}

html body .summary-panel .history-total,
html body .history-total{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:6px!important;
  margin:0 0 8px!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
}

html body .history-total .history-total-item{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  min-width:0!important;
  padding:7px 9px!important;
  border:1px solid #d7e6f8!important;
  border-left:3px solid #1792d4!important;
  border-radius:5px!important;
  background:#fff!important;
  color:#53657a!important;
  font-size:10px!important;
  line-height:1.1!important;
  font-weight:900!important;
  text-transform:uppercase!important;
}

html body .history-total .history-total-item strong{
  color:#081b33!important;
  font-size:16px!important;
  line-height:1!important;
  text-transform:none!important;
}

@media(max-width:760px){
  html body .summary-panel .total-amount-card,
  html body .total-amount-card{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
    margin:7px 0 10px!important;
    padding:6px!important;
  }

  html body .summary-panel .total-amount-card > div:first-child,
  html body .summary-panel .total-amount-meta > span,
  html body .total-amount-card > div:first-child,
  html body .total-amount-meta > span{
    min-height:50px!important;
    padding:8px 9px!important;
  }

  html body .summary-panel .total-amount-card strong,
  html body .summary-panel .total-amount-meta strong,
  html body .total-amount-card strong,
  html body .total-amount-meta strong{
    font-size:18px!important;
  }
}

@media(max-width:360px){
  html body .summary-panel .total-amount-card,
  html body .total-amount-card,
  html body .summary-panel .history-total,
  html body .history-total{
    grid-template-columns:1fr!important;
  }
}

/* v60: clean address suggestion panel and readable mobile report preview */
html body #addressSearchResults.address-suggestion-panel{
  display:block!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:260px!important;
  margin-top:8px!important;
  padding:0!important;
  border:1px solid #b9cbe0!important;
  border-radius:8px!important;
  background:#fff!important;
  color:#0f172a!important;
  box-shadow:0 12px 28px rgba(15,23,42,.16)!important;
  overflow:auto!important;
  z-index:3200!important;
}

html body #addressSearchResults.address-suggestion-panel[hidden]{
  display:none!important;
}

.address-suggestion-head{
  position:sticky;
  top:0;
  z-index:1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-bottom:1px solid #dbe6f2;
  background:#f8fbff;
}

.address-suggestion-head strong{
  font-size:13px;
  color:#0f2f55;
}

.address-suggestion-close{
  min-height:28px;
  padding:4px 9px;
  border:1px solid #cbd5e1;
  border-radius:5px;
  background:#fff;
  color:#0f2f55;
  font-size:12px;
  font-weight:800;
}

.address-suggestion-list{
  display:grid;
  gap:0;
}

.address-suggestion-option{
  display:grid;
  justify-content:stretch;
  width:100%;
  min-height:0;
  padding:10px 12px;
  border:0;
  border-bottom:1px solid #edf2f7;
  border-radius:0;
  background:#fff;
  color:#111827;
  text-align:left;
}

.address-suggestion-option:last-child{
  border-bottom:0;
}

.address-suggestion-option:hover,
.address-suggestion-option:focus{
  background:#eef6ff;
  outline:2px solid #93c5fd;
  outline-offset:-2px;
}

.address-suggestion-option strong{
  display:block;
  font-size:13px;
  line-height:1.25;
  color:#0f172a;
}

.address-suggestion-option span,
.address-suggestion-note{
  display:block;
  margin:3px 0 0;
  color:#526174;
  font-size:12px;
  font-weight:600;
  line-height:1.3;
}

.address-suggestion-note{
  padding:12px;
}

@media(max-width:640px){
  html body #addressSearchResults.address-suggestion-panel{
    position:fixed!important;
    left:10px!important;
    right:10px!important;
    bottom:12px!important;
    width:auto!important;
    max-height:62vh!important;
    margin:0!important;
    border-radius:10px!important;
    box-shadow:0 18px 50px rgba(15,23,42,.28)!important;
  }

  html body #reportModal .report-preview{
    overflow-x:hidden!important;
    padding:8px!important;
  }

  html body #reportPreview .work-report.clean-work-report .professional-report-head{
    display:block!important;
    padding:10px!important;
  }

  html body #reportPreview .work-report.clean-work-report .report-brand{
    display:grid!important;
    grid-template-columns:48px minmax(0,1fr)!important;
    align-items:center!important;
    gap:9px!important;
  }

  html body #reportPreview .work-report.clean-work-report .report-brand img{
    width:46px!important;
    height:46px!important;
  }

  html body #reportPreview .report-title-clean{
    font-size:22px!important;
    line-height:1.05!important;
    white-space:normal!important;
    overflow:visible!important;
  }

  html body #reportPreview .work-report.clean-work-report .report-brand p{
    font-size:11px!important;
    white-space:normal!important;
  }

  html body #reportPreview .report-meta-clean{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:6px!important;
    width:100%!important;
    margin-top:10px!important;
  }

  html body #reportPreview .report-meta-clean > div{
    width:100%!important;
    min-width:0!important;
    padding:8px 9px!important;
    text-align:left!important;
  }

  html body #reportPreview .report-meta-clean strong{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
    overflow-wrap:break-word!important;
    word-break:normal!important;
    font-size:12px!important;
    line-height:1.25!important;
  }

  html body #reportPreview .report-meta-clean .period-card strong{
    font-size:13px!important;
  }

  html body #reportModal #reportPreview .work-report.clean-work-report.detailed-one-page-report .report-head.professional-report-head .report-meta.report-meta-clean{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:6px!important;
    text-align:left!important;
  }

  html body #reportModal #reportPreview .work-report.clean-work-report.detailed-one-page-report .report-head.professional-report-head .report-meta.report-meta-clean > div{
    width:100%!important;
    min-width:0!important;
    padding:8px 9px!important;
    border:1px solid #dbe6f2!important;
    background:#fff!important;
    text-align:left!important;
  }

  html body #reportModal #reportPreview .work-report.clean-work-report.detailed-one-page-report .report-head.professional-report-head .report-meta.report-meta-clean strong{
    display:block!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
    overflow-wrap:break-word!important;
    font-size:12px!important;
    line-height:1.25!important;
  }
}
.compact-shift{
  display:grid;
  grid-template-columns:1.15fr 1fr 1fr auto;
  gap:12px;
  align-items:center;
  padding:10px 12px;
  border-radius:4px;
  border-color:#dbe3ea;
}
.compact-shift .shift-main strong{font-size:18px;display:block;margin-bottom:2px}
.compact-shift .shift-meta{font-size:13px;color:#475569}
.shift-location{font-size:14px;color:#334155;line-height:1.4;min-width:0}
.shift-location b{display:block;color:#64748b;font-size:12px;text-transform:uppercase;letter-spacing:.02em;margin-bottom:2px}
.shift-location span{display:block;white-space:normal;overflow:hidden;text-overflow:ellipsis}
.compact-shift .shift-actions{display:flex;gap:6px;align-items:center;justify-content:flex-end;white-space:nowrap}
.compact-shift .shift-actions .ghost{padding:6px 8px;border-radius:3px;font-size:13px;background:#fff}
.report-info div:nth-child(4){background:#ecfdf5;border-color:#bbf7d0}
.report-info div:nth-child(4) strong{color:#166534}
.report-table small{color:#475569;line-height:1.35}
@media(max-width:900px){
  .compact-shift{grid-template-columns:1fr 1fr;align-items:start}
  .compact-shift .shift-actions{justify-content:flex-start}
}
@media(max-width:620px){
  .history-total{font-size:13px;display:block;line-height:1.7}
  .compact-shift{grid-template-columns:1fr;padding:10px;gap:8px}
  .compact-shift .shift-main strong{font-size:16px}
  .shift-location{font-size:13px;border-top:1px solid #eef2f7;padding-top:6px}
  .compact-shift .shift-actions .ghost{min-height:34px}
}


/* Hourly rate report option */
.toggle-line{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:700;color:#374151;border:1px solid var(--line);border-radius:4px;padding:10px;background:#f8fafc;}
.toggle-line input{width:16px;height:16px;accent-color:#0f766e;}
@media(max-width:640px){.toggle-line{grid-column:1/-1}.settings-grid{gap:9px}.report-info{grid-template-columns:1fr!important}.report-table{min-width:760px}.report-preview{overflow-x:auto}}

/* Mobile/tablet optimization patch: keep existing text and features intact */
html, body { max-width: 100%; overflow-x: hidden; }
img, svg { max-width: 100%; }
button, a, input, textarea { max-width: 100%; }

/* Professional hamburger menu behavior */
.app-menu summary {
  min-width: 44px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.app-menu summary::before {
  content: "☰";
  font-size: 20px;
  line-height: 1;
}

@media (min-width: 761px) {
  .topbar { position: sticky; top: 0; z-index: 12; }
  .app-menu summary::before { content: "☰"; }
}

@media (max-width: 760px) {
  body { background: #f6f8fa; }
  .app-shell { width: 100%; }

  .topbar {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between;
    gap: 10px;
    min-height: 58px;
    padding: 8px 10px;
  }

  .brand {
    min-width: 0;
    flex: 1;
    gap: 8px;
  }
  .brand img {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
  }
  .brand > div { min-width: 0; }
  .brand h1 {
    font-size: 18px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .brand p {
    font-size: 11px;
    line-height: 1.2;
    max-width: 70vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .top-actions {
    width: auto !important;
    display: flex !important;
    flex: 0 0 auto;
  }
  .app-menu summary {
    width: 42px;
    height: 38px;
    padding: 0;
    font-size: 0;
    border-radius: 4px;
  }
  .app-menu summary::before {
    font-size: 22px;
    color: #fff;
  }
  .menu-list {
    position: fixed;
    right: 10px;
    left: 10px;
    top: 58px;
    width: auto;
    min-width: 0;
    max-height: calc(100vh - 76px);
    overflow: auto;
    border-radius: 6px;
    z-index: 30;
  }
  .menu-list .ghost,
  .menu-list .file-label {
    min-height: 42px;
    justify-content: center;
  }

  .layout {
    width: 100%;
    padding: 8px;
    gap: 8px;
  }
  .panel {
    width: 100%;
    margin-bottom: 8px;
    padding: 10px;
    border-radius: 4px;
  }
  .section-title {
    font-size: 14px;
    margin-bottom: 10px;
    padding-bottom: 9px;
  }

  .clock-card {
    padding: 10px;
    margin-bottom: 10px;
  }
  .live-time { font-size: 26px; }
  .muted { font-size: 12px; }

  .button-row {
    position: sticky;
    top: 58px;
    z-index: 8;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px;
    margin: 0 0 10px;
    padding: 8px 0;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
  }
  .button-row button {
    min-height: 46px;
    padding: 10px 8px;
    font-size: 15px;
    border-radius: 4px;
  }

  .info-box { padding: 10px; margin-bottom: 10px; }
  .info-line {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 8px;
    font-size: 13px;
    align-items: start;
  }
  .info-line strong {
    text-align: left;
    overflow-wrap: anywhere;
  }

  .settings-panel summary,
  .smart-details summary { padding: 10px; }
  .settings-grid { padding: 0 10px 10px; }
  .settings-line input,
  #storeAddress { width: 100%; }
  .settings-actions { display: grid; grid-template-columns: 1fr; }

  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px;
  }
  .stat {
    padding: 10px;
    min-width: 0;
  }
  .stat span { font-size: 11px; margin-bottom: 5px; }
  .stat strong { font-size: 16px; overflow-wrap: anywhere; }

  .history-panel .section-title {
    align-items: center;
  }
  .history-panel .section-title .ghost {
    min-height: 34px;
    font-size: 12px;
    padding: 6px 8px;
  }
  .history-total {
    padding: 8px;
    font-size: 13px;
    line-height: 1.45;
  }
  .shift-list { gap: 8px; }
  .compact-shift,
  .shift-card {
    grid-template-columns: 1fr !important;
    gap: 7px;
    padding: 10px;
    border-radius: 4px;
    overflow: hidden;
  }
  .compact-shift .shift-main strong,
  .shift-main strong {
    font-size: 16px;
    line-height: 1.25;
  }
  .shift-meta,
  .shift-location {
    font-size: 12.5px;
    line-height: 1.35;
  }
  .shift-location span,
  .shift-meta {
    overflow-wrap: anywhere;
  }
  .compact-shift .shift-actions,
  .shift-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    width: 100%;
    justify-content: stretch;
  }
  .compact-shift .shift-actions .ghost,
  .shift-actions a,
  .shift-actions button {
    width: 100%;
    min-height: 34px;
    font-size: 12px;
    padding: 6px;
    text-align: center;
  }

  .away-alert { padding: 10px; }
  .modal { padding: 10px; align-items: center; }
  .modal-card,
  .message-card {
    width: min(94vw, 520px);
    max-height: 88vh;
    overflow: auto;
    border-radius: 6px;
  }
  .report-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .report-toolbar button { width: 100%; }
  .report-preview { padding: 8px; }
  .report-table { min-width: 720px; }
  .product-footer {
    padding: 12px 10px calc(14px + env(safe-area-inset-bottom));
    font-size: 12px;
  }
}

/* Final modal/report overrides kept at the end so older responsive rules cannot hide actions. */
@media (max-width: 520px){
  html body #reportModal .report-toolbar{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
  }

  html body #reportModal .report-toolbar button{
    width:auto !important;
    min-width:0 !important;
  }

  html body #reportModal .report-layout-controls{
    display:grid !important;
    grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
  }

  html body #reportModal .report-layout-controls label{
    width:auto !important;
    min-width:0 !important;
  }

  html body #reportModal .report-layout-controls select{
    width:100% !important;
    min-width:0 !important;
    padding-left:6px !important;
    padding-right:18px !important;
  }
}

#reportModal .report-card{
  display:flex !important;
  flex-direction:column !important;
  overflow:hidden !important;
}

#reportModal .report-toolbar{
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  gap:8px !important;
  padding:8px 10px !important;
  margin:0 !important;
  border:1px solid #d7e2f1 !important;
  border-radius:6px !important;
  background:#f8fbff !important;
}

#reportModal .report-toolbar button{
  flex:1 1 120px !important;
  justify-content:center !important;
  text-align:center !important;
}

#reportModal .report-layout-controls{
  flex:0 0 auto !important;
  margin:8px 0 !important;
}

#reportModal .report-preview,
#reportPreview{
  flex:1 1 auto !important;
  min-height:0 !important;
  overflow:auto !important;
  -webkit-overflow-scrolling:touch !important;
}

#reportPreview .work-report.clean-work-report{
  max-width:1100px !important;
  margin:0 auto !important;
}

#reportPreview .grid-report-wrap{
  width:100% !important;
  max-width:100% !important;
  overflow-x:auto !important;
  border:1px solid #d8e4f2 !important;
  border-radius:8px !important;
  background:#fff !important;
}

#reportPreview .grid-report-table{
  min-width:min(1000px, 100%) !important;
}

.report-settings-card,
.pay-settings-card,
.manual-shift-center-card,
#editManualShiftModalBackdrop .shift-modal,
#editShiftModal .modal-card,
#reasonModal .modal-card,
#gpsFailModal .modal-card,
#termsModal .modal-card,
#messageModal .modal-card,
#confirmModal .modal-card,
#reportRangeModal .modal-card{
  display:flex !important;
  flex-direction:column !important;
  overflow:hidden !important;
}

.settings-modal-body{
  flex:1 1 auto !important;
  min-height:0 !important;
  overflow:auto !important;
  -webkit-overflow-scrolling:touch !important;
}

.report-settings-card .settings-modal-head,
#reportModal .section-title,
.manual-shift-center-card .manual-modal-head{
  flex:0 0 auto !important;
}

.report-settings-card .settings-actions,
.pay-settings-card .settings-actions,
.manual-shift-center-card .modal-actions,
#editManualShiftModalBackdrop .modal-actions,
#editShiftModal #saveEditBtn,
#reasonModal #saveReasonBtn,
#gpsFailModal .message-actions,
#termsModal #termsOkBtn,
#messageModal .message-actions,
#confirmModal .message-actions,
#reportRangeModal .message-actions{
  position:sticky !important;
  bottom:0 !important;
  z-index:6 !important;
  margin-top:12px !important;
  padding-top:10px !important;
  padding-bottom:2px !important;
  background:linear-gradient(180deg, rgba(255,255,255,.9), #fff 38%) !important;
  border-top:1px solid #e1eaf5 !important;
}

.pay-settings-card .settings-actions{
  display:flex !important;
  justify-content:flex-end !important;
}

@media (max-width: 900px){
  #reportRangeModal,
  #reportModal,
  #editShiftModal,
  #gpsFailModal,
  #reasonModal,
  #termsModal,
  #messageModal,
  #confirmModal,
  #reportSettingsPanel,
  #paySettingsPanel,
  .modal-backdrop:not([hidden]){
    align-items:flex-start !important;
    place-items:flex-start center !important;
    justify-content:center !important;
    padding:10px !important;
    overflow-y:auto !important;
    overscroll-behavior:contain !important;
  }

  .modal-card,
  .report-card,
  .message-card,
  .terms-card,
  .report-range-card,
  .report-settings-card,
  .manual-shift-center-card,
  #editManualShiftModalBackdrop .shift-modal{
    width:100% !important;
    max-width:calc(100vw - 20px) !important;
    max-height:calc(100dvh - 20px) !important;
  }

  #reportSettingsPanel .report-settings-card,
  #paySettingsPanel .report-settings-card,
  #manualShiftModalBackdrop .manual-shift-center-card,
  #editManualShiftModalBackdrop .shift-modal{
    height:calc(100dvh - 20px) !important;
  }

  #reportModal .report-card{
    width:100vw !important;
    max-width:100vw !important;
    height:100dvh !important;
    max-height:100dvh !important;
    border-radius:0 !important;
  }

  #reportModal .section-title,
  .report-settings-card .settings-modal-head{
    position:sticky !important;
    top:0 !important;
    z-index:8 !important;
    background:#fff !important;
    border-bottom:1px solid #e1eaf5 !important;
  }

  #reportModal .report-toolbar,
  #reportModal .report-layout-controls{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:8px !important;
  }

  #reportModal .report-layout-note{
    grid-column:1 / -1 !important;
  }

  #reportPreview{
    padding:10px !important;
  }

  #reportPreview .grid-report-table{
    min-width:760px !important;
  }
}

@media (max-width: 520px){
  #reportModal .report-toolbar,
  #reportModal .report-layout-controls{
    grid-template-columns:1fr !important;
  }

  #reportModal .report-toolbar button,
  #reportModal .report-layout-controls select,
  .pay-settings-card .settings-actions button,
  .report-settings-card .settings-actions button{
    width:100% !important;
  }
}

/* Absolute final overrides: visible backup button and excluded automatic shift UI. */
html body #termsModal #termsOkBtn,
html body .terms-card #termsOkBtn,
html body .final-backup-notice-card #termsOkBtn{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:100% !important;
  min-height:52px !important;
  margin-top:16px !important;
  border:0 !important;
  border-radius:12px !important;
  background:#087f5b !important;
  background-color:#087f5b !important;
  color:#ffffff !important;
  font-size:16px !important;
  font-weight:900 !important;
  line-height:1.2 !important;
  text-align:center !important;
  opacity:1 !important;
}

html body #termsModal #termsOkBtn::before,
html body #termsModal #termsOkBtn::after{
  content:none !important;
  display:none !important;
}

html body .auto-exclude-check{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  min-height:46px !important;
  padding:10px 12px !important;
  border:1px solid #d8e2ef !important;
  border-radius:10px !important;
  background:#f8fafc !important;
  color:#0f172a !important;
  font-weight:800 !important;
}

html body .auto-exclude-check input{
  width:18px !important;
  height:18px !important;
  accent-color:#b45309 !important;
}

html body .shift-card.auto-excluded-shift{
  border-color:#f6c66d !important;
  background:#fffbeb !important;
}

html body .shift-card.auto-excluded-shift .shift-main strong,
html body .shift-card.auto-excluded-shift .shift-main .meta-chip,
html body .shift-card.auto-excluded-shift .history-shift-pay .strike-text{
  text-decoration:line-through !important;
  text-decoration-thickness:2px !important;
  text-decoration-color:rgba(71,85,105,.75) !important;
  color:#64748b !important;
}

html body .shift-card.auto-excluded-shift .history-shift-pay{
  display:grid !important;
  gap:2px !important;
  justify-items:end !important;
}

html body .shift-card.auto-excluded-shift .history-shift-pay small{
  color:#92400e !important;
  font-size:11px !important;
  font-weight:900 !important;
}

html body .work-report .auto-excluded-row .strike-text{
  text-decoration:line-through !important;
  text-decoration-thickness:1.5px !important;
  text-decoration-color:rgba(71,85,105,.7) !important;
  color:#64748b !important;
}

html body .work-report .auto-excluded-row{
  background:#fff8e1 !important;
}

html body .work-report .report-excluded-row,
html body .report-export-shell .report-excluded-row{
  background:#fff8e1 !important;
  border-left:4px solid #f59e0b !important;
}

html body .work-report .report-excluded-row .strike-text,
html body .report-export-shell .report-excluded-row .strike-text{
  text-decoration-line:line-through !important;
  text-decoration-thickness:2px !important;
  text-decoration-color:rgba(15,23,42,.78) !important;
  color:#64748b !important;
}

html body .work-report .report-excluded-row small,
html body .report-export-shell .report-excluded-row small,
html body .work-report .report-zero-counted,
html body .report-export-shell .report-zero-counted{
  color:#92400e !important;
  font-weight:900 !important;
}

html body .work-report .report-excluded-row,
html body .report-export-shell .report-excluded-row{
  background:#fff8e1 !important;
  border-left:4px solid #f59e0b !important;
}

html body .work-report .report-excluded-row .strike-text,
html body .report-export-shell .report-excluded-row .strike-text{
  text-decoration-line:line-through !important;
  text-decoration-thickness:2px !important;
  text-decoration-color:rgba(15,23,42,.78) !important;
  color:#64748b !important;
}

html body .work-report .report-excluded-row small,
html body .report-export-shell .report-excluded-row small,
html body .work-report .report-zero-counted,
html body .report-export-shell .report-zero-counted{
  color:#92400e !important;
  font-weight:900 !important;
}

/* Final edit-shift fix: keep Save visible and make excluded punch records visibly crossed out. */
html body #editShiftModal{
  align-items:center !important;
  justify-content:center !important;
  padding:10px !important;
}

html body #editShiftModal .edit-card,
html body #editShiftModal .modal-card{
  display:flex !important;
  flex-direction:column !important;
  width:min(94vw, 560px) !important;
  max-height:calc(100dvh - 20px) !important;
  overflow:hidden !important;
  padding:16px !important;
}

html body #editShiftModal .section-title,
html body #editShiftModal .modal-copy{
  flex:0 0 auto !important;
}

html body #editShiftModal .edit-grid{
  flex:1 1 auto !important;
  min-height:0 !important;
  overflow-y:auto !important;
  padding-right:2px !important;
  padding-bottom:10px !important;
}

html body #editShiftModal #saveEditBtn{
  position:sticky !important;
  bottom:0 !important;
  z-index:10 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:100% !important;
  min-height:50px !important;
  margin-top:12px !important;
  padding:12px 16px !important;
  border:0 !important;
  border-radius:10px !important;
  background:#087f5b !important;
  background-color:#087f5b !important;
  color:#fff !important;
  font-size:16px !important;
  font-weight:900 !important;
  opacity:1 !important;
}

html body #editShiftModal #saveEditBtn::before,
html body #editShiftModal #saveEditBtn::after{
  content:none !important;
  display:none !important;
}

html body .shift-card.auto-excluded-shift.excluded-from-total,
html body .shift-card.auto-excluded-shift{
  border-color:#f59e0b !important;
  background:#fff7ed !important;
}

html body .shift-card.auto-excluded-shift .shift-main strong,
html body .shift-card.auto-excluded-shift .shift-main span,
html body .shift-card.auto-excluded-shift .shift-meta,
html body .shift-card.auto-excluded-shift .shift-meta span,
html body .shift-card.auto-excluded-shift .history-shift-pay .strike-text,
html body .shift-card.auto-excluded-shift .shift-location span{
  text-decoration-line:line-through !important;
  text-decoration-thickness:2px !important;
  text-decoration-color:rgba(71,85,105,.8) !important;
  color:#64748b !important;
}

html body .shift-card.auto-excluded-shift .strike-badge,
html body .shift-card.auto-excluded-shift .view-details,
html body .shift-card.auto-excluded-shift button,
html body .shift-card.auto-excluded-shift a,
html body .shift-card.auto-excluded-shift .history-shift-pay small{
  text-decoration:none !important;
}

@supports not (height: 100dvh){
  html body #editShiftModal .edit-card,
  html body #editShiftModal .modal-card{
    max-height:calc(100vh - 20px) !important;
  }
}

html body .report-export-toolbar{
  justify-content:center !important;
  gap:8px !important;
  padding:8px 10px !important;
  background:#ffffff !important;
}

html body .report-export-toolbar button{
  min-width:94px !important;
  height:40px !important;
  border-radius:0 !important;
  font-weight:900 !important;
}

html body .report-export-toolbar .primary-export-btn{
  min-width:72px !important;
  background:#087f5b !important;
  border-color:#087f5b !important;
  color:#fff !important;
}

/* Final report modal cleanup: remove view controls and keep report content inside the page. */
html body #reportModal .report-layout-controls{
  display:none !important;
}

html body #reportModal .report-card{
  width:min(1120px, calc(100vw - 16px)) !important;
  max-width:calc(100vw - 16px) !important;
  height:min(92vh, 820px) !important;
  max-height:92vh !important;
  overflow:hidden !important;
}

html body #reportModal .report-toolbar{
  display:flex !important;
  justify-content:flex-start !important;
  gap:8px !important;
  margin:0 0 10px !important;
}

html body #reportModal .report-toolbar button{
  width:auto !important;
  min-width:0 !important;
  padding-left:18px !important;
  padding-right:18px !important;
}

html body #reportPreview{
  padding:10px !important;
  overflow:auto !important;
  background:#f8fbff !important;
}

html body #reportPreview .work-report.clean-work-report{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
}

html body #reportPreview .work-report.clean-work-report .professional-report-head{
  display:grid !important;
  grid-template-columns:minmax(220px, 280px) minmax(0, 1fr) !important;
  gap:12px !important;
  align-items:start !important;
}

html body #reportPreview .work-report.clean-work-report .report-brand{
  min-width:0 !important;
}

html body #reportPreview .work-report.clean-work-report .report-title-clean{
  font-size:23px !important;
  line-height:1.05 !important;
}

html body #reportPreview .work-report.clean-work-report .report-meta-clean{
  display:grid !important;
  grid-template-columns:repeat(4, minmax(0, 1fr)) !important;
  gap:6px !important;
  min-width:0 !important;
}

html body #reportPreview .work-report.clean-work-report .report-meta-clean > div,
html body #reportPreview .work-report.clean-work-report .combined-total-card > div,
html body #reportPreview .work-report.clean-work-report .report-source-summary > div{
  min-width:0 !important;
  overflow:hidden !important;
}

html body #reportPreview .work-report.clean-work-report .report-meta-clean strong,
html body #reportPreview .work-report.clean-work-report .report-meta-clean span,
html body #reportPreview .work-report.clean-work-report .mini-address,
html body #reportPreview .grid-report-cell{
  overflow-wrap:anywhere !important;
  word-break:normal !important;
}

html body #reportPreview .grid-report-wrap{
  width:100% !important;
  max-width:100% !important;
  overflow-x:hidden !important;
}

html body #reportPreview .grid-report-table{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  font-size:11px !important;
}

html body #reportPreview .grid-report-cell{
  min-width:0 !important;
  padding:7px 8px !important;
  line-height:1.25 !important;
}

html body #reportPreview .grid-report-head{
  font-size:11px !important;
  letter-spacing:0 !important;
}

html body #reportPreview .grid-report-resize-handle{
  display:block !important;
  position:absolute !important;
  top:0 !important;
  right:-7px !important;
  width:16px !important;
  height:100% !important;
  cursor:col-resize !important;
  touch-action:none !important;
  z-index:3 !important;
}

html body #reportPreview .grid-report-resize-handle::before{
  content:"" !important;
  position:absolute !important;
  top:18% !important;
  right:7px !important;
  width:3px !important;
  height:64% !important;
  border-radius:999px !important;
  background:#8aa1bd !important;
}

html body #reportPreview .grid-report-head{
  position:relative !important;
}

html body #reportPreview .report-table-wrap{
  max-width:100% !important;
  overflow-x:hidden !important;
}

html body #reportPreview .unified-report-table{
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  table-layout:fixed !important;
}

html body #reportPreview .unified-report-table th,
html body #reportPreview .unified-report-table td{
  overflow-wrap:anywhere !important;
  white-space:normal !important;
}

html body #reportPreview .unified-report-table th:last-child,
html body #reportPreview .unified-report-table td:last-child{
  display:none !important;
}

@media (max-width: 760px){
  html body #reportModal .report-card{
    width:100vw !important;
    max-width:100vw !important;
    height:100dvh !important;
    max-height:100dvh !important;
  }

  html body #reportModal .report-toolbar{
    grid-template-columns:1fr 1fr !important;
  }

  html body #reportPreview .work-report.clean-work-report .professional-report-head{
    grid-template-columns:1fr !important;
  }

  html body #reportPreview .work-report.clean-work-report .report-meta-clean,
  html body #reportPreview .work-report.clean-work-report .combined-total-card,
  html body #reportPreview .work-report.clean-work-report .report-source-summary{
    grid-template-columns:1fr 1fr !important;
  }

  html body #reportPreview .grid-report-table{
    font-size:10px !important;
  }

  html body #reportPreview .grid-report-cell{
    padding:6px !important;
  }
}

/* Final backup notice button and automatic shift exclude polish. */
#termsModal #termsOkBtn,
.terms-card #termsOkBtn,
.final-backup-notice-card #termsOkBtn{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:100% !important;
  min-height:52px !important;
  margin-top:16px !important;
  border:0 !important;
  border-radius:12px !important;
  background:#087f5b !important;
  color:#fff !important;
  font-size:16px !important;
  font-weight:900 !important;
  line-height:1.2 !important;
  text-align:center !important;
  opacity:1 !important;
}

#termsModal #termsOkBtn::before,
#termsModal #termsOkBtn::after{
  content:none !important;
  display:none !important;
}

.auto-exclude-check{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  min-height:46px !important;
  padding:10px 12px !important;
  border:1px solid #d8e2ef !important;
  border-radius:10px !important;
  background:#f8fafc !important;
  color:#0f172a !important;
  font-weight:800 !important;
}

.auto-exclude-check input{
  width:18px !important;
  height:18px !important;
  accent-color:#b45309 !important;
}

.shift-card.auto-excluded-shift{
  border-color:#f6c66d !important;
  background:#fffbeb !important;
}

.shift-card.auto-excluded-shift .shift-main strong,
.shift-card.auto-excluded-shift .shift-main .meta-chip,
.shift-card.auto-excluded-shift .history-shift-pay .strike-text{
  text-decoration:line-through !important;
  text-decoration-thickness:2px !important;
  text-decoration-color:rgba(71,85,105,.75) !important;
  color:#64748b !important;
}

.shift-card.auto-excluded-shift .history-shift-pay{
  display:grid !important;
  gap:2px !important;
  justify-items:end !important;
}

.shift-card.auto-excluded-shift .history-shift-pay small{
  color:#92400e !important;
  font-size:11px !important;
  font-weight:900 !important;
}

.shift-card.auto-excluded-shift .shift-actions button,
.shift-card.auto-excluded-shift .view-details,
.shift-card.auto-excluded-shift .strike-badge{
  text-decoration:none !important;
}

.work-report .auto-excluded-row .strike-text{
  text-decoration:line-through !important;
  text-decoration-thickness:1.5px !important;
  text-decoration-color:rgba(71,85,105,.7) !important;
  color:#64748b !important;
}

.work-report .auto-excluded-row{
  background:#fff8e1 !important;
}

@media (max-width: 520px){
  #reportModal .report-toolbar{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
  }

  #reportModal .report-toolbar button{
    width:auto !important;
    min-width:0 !important;
  }

  #reportModal .report-layout-controls{
    display:grid !important;
    grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
  }

  #reportModal .report-layout-controls label{
    width:auto !important;
    min-width:0 !important;
  }

  #reportModal .report-layout-controls select{
    width:100% !important;
    min-width:0 !important;
    padding-left:6px !important;
    padding-right:18px !important;
  }

  #reportModal .report-layout-note{
    grid-column:1 / -1 !important;
  }
}

@media (max-width: 520px){
  #reportModal .report-toolbar{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
  }

  #reportModal .report-toolbar button{
    width:auto !important;
    min-width:0 !important;
  }

  #reportModal .report-layout-controls{
    display:grid !important;
    grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
  }

  #reportModal .report-layout-controls label{
    width:auto !important;
    min-width:0 !important;
  }

  #reportModal .report-layout-controls select{
    width:100% !important;
    min-width:0 !important;
    padding-left:6px !important;
    padding-right:18px !important;
  }

  #reportModal .report-layout-note{
    grid-column:1 / -1 !important;
  }
}

#reportRangeModal,
#reportModal,
#editShiftModal,
#gpsFailModal,
#reasonModal,
#termsModal,
#messageModal,
#confirmModal,
#reportSettingsPanel,
#paySettingsPanel,
.modal-backdrop:not([hidden]){
  z-index:1000 !important;
}

.report-settings-card .settings-modal-head,
.pay-settings-card .settings-modal-head{
  background:#fff !important;
  color:#061a3a !important;
}

.report-settings-card .settings-modal-head *,
.pay-settings-card .settings-modal-head *{
  color:#061a3a !important;
}

.report-settings-card .settings-modal-head .ghost,
.pay-settings-card .settings-modal-head .ghost{
  background:#eef5ff !important;
  border:1px solid #cbdcf0 !important;
  color:#073260 !important;
}

@media (max-width: 520px){
  #reportModal .report-toolbar{
    grid-template-columns:1fr 1fr !important;
  }

  #reportModal .report-layout-controls{
    grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
  }

  #reportModal .report-layout-controls label{
    min-width:0 !important;
  }

  #reportModal .report-layout-controls select{
    min-width:0 !important;
    width:100% !important;
    padding-left:6px !important;
    padding-right:18px !important;
  }

  #reportModal .report-layout-note{
    grid-column:1 / -1 !important;
  }
}

/* Final modal and report readability pass: sticky actions, better small-screen scrolling, cleaner print preview. */
#reportModal .report-card{
  display:flex !important;
  flex-direction:column !important;
  overflow:hidden !important;
}

#reportModal .section-title,
.report-settings-card .settings-modal-head,
.manual-shift-center-card .manual-modal-head,
#editManualShiftModalBackdrop .shift-modal > h3,
#editShiftModal .section-title,
#reasonModal .section-title{
  flex:0 0 auto !important;
}

#reportModal .report-toolbar,
#reportModal .report-layout-controls{
  flex:0 0 auto !important;
}

#reportModal .report-preview,
#reportPreview{
  flex:1 1 auto !important;
  min-height:0 !important;
  overflow:auto !important;
  -webkit-overflow-scrolling:touch !important;
}

#reportModal .report-toolbar{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  padding:8px 10px !important;
  margin:0 !important;
  border:1px solid #d7e2f1 !important;
  border-radius:6px !important;
  background:#f8fbff !important;
}

#reportModal .report-toolbar button{
  flex:1 1 120px !important;
  justify-content:center !important;
  text-align:center !important;
}

#reportModal .report-layout-controls{
  margin:8px 0 !important;
}

#reportPreview.grid-report-preview{
  background:#f8fbff !important;
}

#reportPreview .grid-report-wrap{
  width:100% !important;
  max-width:100% !important;
  overflow-x:auto !important;
  border:1px solid #d8e4f2 !important;
  border-radius:8px !important;
  background:#fff !important;
}

#reportPreview .grid-report-table{
  min-width:min(1000px, 100%) !important;
}

#reportPreview .work-report.clean-work-report{
  max-width:1100px !important;
  margin:0 auto !important;
}

.report-settings-card,
.pay-settings-card,
.manual-shift-center-card,
#editManualShiftModalBackdrop .shift-modal,
#editShiftModal .modal-card,
#reasonModal .modal-card,
#gpsFailModal .modal-card,
#termsModal .modal-card,
#messageModal .modal-card,
#confirmModal .modal-card,
#reportRangeModal .modal-card{
  display:flex !important;
  flex-direction:column !important;
  overflow:hidden !important;
}

.settings-modal-body{
  flex:1 1 auto !important;
  min-height:0 !important;
  overflow:auto !important;
  -webkit-overflow-scrolling:touch !important;
}

.report-settings-card .settings-actions,
.pay-settings-card .settings-actions,
.manual-shift-center-card .modal-actions,
#editManualShiftModalBackdrop .modal-actions,
#editShiftModal #saveEditBtn,
#reasonModal #saveReasonBtn,
#gpsFailModal .message-actions,
#termsModal #termsOkBtn,
#messageModal .message-actions,
#confirmModal .message-actions,
#reportRangeModal .message-actions{
  position:sticky !important;
  bottom:0 !important;
  z-index:6 !important;
  margin-top:12px !important;
  padding-top:10px !important;
  padding-bottom:2px !important;
  background:linear-gradient(180deg, rgba(255,255,255,.88), #fff 38%) !important;
  border-top:1px solid #e1eaf5 !important;
}

.pay-settings-card .settings-actions{
  display:flex !important;
  justify-content:flex-end !important;
}

.pay-settings-card .settings-actions button,
.report-settings-card .settings-actions button{
  min-height:42px !important;
  justify-content:center !important;
  text-align:center !important;
}

@media (max-width: 900px){
  #reportRangeModal,
  #reportModal,
  #editShiftModal,
  #gpsFailModal,
  #reasonModal,
  #termsModal,
  #messageModal,
  #confirmModal,
  #reportSettingsPanel,
  #paySettingsPanel,
  .modal-backdrop:not([hidden]){
    align-items:flex-start !important;
    place-items:flex-start center !important;
    justify-content:center !important;
    padding:10px !important;
    overflow-y:auto !important;
    overscroll-behavior:contain !important;
  }

  .modal-card,
  .report-card,
  .message-card,
  .terms-card,
  .report-range-card,
  .report-settings-card,
  .manual-shift-center-card,
  #editManualShiftModalBackdrop .shift-modal{
    width:100% !important;
    max-width:calc(100vw - 20px) !important;
    max-height:calc(100dvh - 20px) !important;
    margin:auto 0 !important;
  }

  #reportSettingsPanel .report-settings-card,
  #paySettingsPanel .report-settings-card,
  #manualShiftModalBackdrop .manual-shift-center-card,
  #editManualShiftModalBackdrop .shift-modal{
    height:calc(100dvh - 20px) !important;
  }

  #reportModal .report-card{
    height:100dvh !important;
    max-height:100dvh !important;
    max-width:100vw !important;
  }

  #reportModal .section-title,
  .report-settings-card .settings-modal-head{
    position:sticky !important;
    top:0 !important;
    z-index:8 !important;
    background:#fff !important;
    border-bottom:1px solid #e1eaf5 !important;
  }

  #reportModal .report-toolbar,
  #reportModal .report-layout-controls{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:8px !important;
  }

  #reportModal .report-layout-note{
    grid-column:1 / -1 !important;
  }

  #reportPreview{
    padding:10px !important;
  }

  #reportPreview .grid-report-table{
    min-width:760px !important;
  }

  .settings-modal-body,
  .manual-shift-center-card,
  #editManualShiftModalBackdrop .shift-modal{
    scrollbar-gutter:stable !important;
  }
}

@media (max-width: 520px){
  #reportModal .report-toolbar,
  #reportModal .report-layout-controls{
    grid-template-columns:1fr !important;
  }

  #reportModal .report-toolbar button,
  #reportModal .report-layout-controls select,
  .pay-settings-card .settings-actions button,
  .report-settings-card .settings-actions button{
    width:100% !important;
  }
}

@supports not (height: 100dvh){
  @media (max-width: 900px){
    #reportSettingsPanel .report-settings-card,
    #paySettingsPanel .report-settings-card,
    #manualShiftModalBackdrop .manual-shift-center-card,
    #editManualShiftModalBackdrop .shift-modal{
      height:calc(100vh - 20px) !important;
    }
  }
}

@media (max-width: 380px) {
  .brand p { max-width: 58vw; }
  .button-row button { font-size: 14px; }
  .stats-grid { grid-template-columns: 1fr !important; }
  .compact-shift .shift-actions,
  .shift-actions { grid-template-columns: 1fr; }
  .report-toolbar { grid-template-columns: 1fr; }
}

@media (min-width: 761px) and (max-width: 1100px) {
  .layout {
    grid-template-columns: 320px 1fr;
    padding: 14px;
  }
  .compact-shift {
    grid-template-columns: 1fr 1fr;
  }
  .compact-shift .shift-actions { justify-content: flex-start; }
}


/* Backup notice modal */
.terms-card{max-width:440px;text-align:left;padding:20px;border-top:5px solid #92400e;}
.terms-card h2{margin:0 0 10px;font-size:20px;color:#111827;text-align:center;}
.terms-card p{margin:8px 0;color:#4b5563;line-height:1.5;font-size:14px;}
.terms-icon{width:42px;height:42px;margin:0 auto 10px;display:grid;place-items:center;border-radius:6px;background:#fef3c7;color:#92400e;border:1px solid #fde68a;font-weight:900;font-size:22px;}
@media(max-width:640px){.terms-card{width:min(92vw,420px);padding:18px 16px}.terms-card h2{font-size:18px}.terms-card p{font-size:13.5px}}

/* Mobile compact UX: tap to view details, less scrolling, cleaner header/menu */
.shift-toggle{
  display:block;
  padding:0;
  overflow:hidden;
}
.shift-toggle summary{list-style:none;cursor:pointer;}
.shift-toggle summary::-webkit-details-marker{display:none;}
.shift-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
}
.view-details{
  flex:0 0 auto;
  font-size:12px;
  font-weight:700;
  color:#155e75;
  border:1px solid #dbe3ea;
  border-radius:3px;
  padding:5px 7px;
  background:#f8fafc;
}
.shift-toggle[open] .view-details::after{content:" ▲";font-size:10px;}
.shift-toggle:not([open]) .view-details::after{content:" ▼";font-size:10px;}
.shift-detail-grid{
  display:grid;
  grid-template-columns:1fr 1fr auto;
  gap:10px;
  align-items:start;
  padding:0 12px 12px;
  border-top:1px solid #eef2f7;
}
.full-row{grid-column:1/-1;}

@media(max-width:760px){
  .topbar{
    min-height:54px;
    padding:7px 9px;
    background:#0f172a;
    box-shadow:0 2px 10px rgba(15,23,42,.14);
  }
  .brand img{width:31px;height:31px;flex-basis:31px;background:#fff;padding:2px;}
  .brand h1{font-size:17px;letter-spacing:-.01em;}
  .brand p{display:none;}
  .app-menu summary{
    width:38px;height:36px;border:1px solid rgba(255,255,255,.18);
    background:rgba(255,255,255,.08);border-radius:3px;
  }
  .app-menu summary::before{font-size:21px;}
  .menu-list{top:54px;border-radius:4px;box-shadow:0 16px 35px rgba(15,23,42,.18);}
  .layout{padding:7px;}
  .panel{padding:9px;margin-bottom:7px;}
  .clock-card{display:none;}
  .section-title{margin-bottom:8px;padding-bottom:8px;}
  .button-row{top:54px;margin-bottom:8px;padding:6px 0;}
  .button-row button{min-height:44px;}
  .info-box{padding:8px;margin-bottom:8px;}
  .info-line{padding:5px 0;grid-template-columns:70px minmax(0,1fr);}
  .stats-grid{gap:6px;}
  .stat{padding:8px;}
  .history-panel .section-title{margin-bottom:7px;}
  .history-total{margin-bottom:7px;padding:7px 8px;}
  .shift-list{gap:7px;}
  .shift-summary{padding:9px;}
  .shift-detail-grid{grid-template-columns:1fr;padding:0 9px 9px;gap:7px;}
  .shift-location{border-top:0;padding-top:0;}
  .shift-actions{display:grid!important;grid-template-columns:1fr 1fr!important;width:100%;gap:6px;}
  .view-details{font-size:11px;padding:5px 6px;}
}

@media(min-width:761px){
  .shift-toggle .shift-summary{cursor:default;}
  .shift-toggle .view-details{display:none;}
  .shift-detail-grid{grid-template-columns:1fr 1fr auto;}
}

/* Final customer-friendly fixes */
.away-alert.hidden{display:none!important;}
.away-alert{padding:10px 12px;border-color:#f59e0b;background:#fff7ed;grid-template-columns:1fr auto;align-items:center;gap:8px;}
.away-alert strong{font-size:13px;}
.away-alert span{font-size:12px;color:#7c2d12;}
.away-alert button{min-height:32px;white-space:nowrap;}
.logo-settings{border:1px solid #e5e7eb;background:#f8fafc;padding:10px;border-radius:4px;}
.logo-preview-row{display:flex;align-items:center;gap:10px;font-size:13px;font-weight:700;color:#334155;}
.logo-preview-row img{width:46px;height:34px;object-fit:contain;background:#fff;border:1px solid #e5e7eb;border-radius:4px;padding:3px;}
.preset-row{display:flex;gap:6px;flex-wrap:wrap;}
.preset-row .ghost,.preset-row .file-label{min-height:32px;}
.report-brand img{background:#fff!important;border:1px solid #e5e7eb;}
@media(max-width:760px){
  .away-alert{grid-template-columns:1fr;}
  .away-alert button{width:100%;}
  .preset-row{display:grid;grid-template-columns:1fr 1fr;}
  .preset-row .ghost,.preset-row .file-label{width:100%;}
}

/* Store brand selector for report logo */
.brand-picker{display:grid;grid-template-columns:minmax(160px,1fr) auto;gap:8px;align-items:end;margin-top:8px;}
.brand-picker label:first-child{display:block;font-size:12px;font-weight:700;color:#475569;margin-bottom:3px;}
.brand-picker select{width:100%;min-height:34px;border:1px solid #cbd5e1;border-radius:4px;background:#fff;padding:6px 8px;font-size:13px;color:#0f172a;}
.upload-logo-btn{min-height:34px;display:flex!important;align-items:center;justify-content:center;white-space:nowrap;}
@media(max-width:760px){
  .brand-picker{grid-template-columns:1fr;}
  .upload-logo-btn{width:100%;}
}

/* Address search + professional report footer polish */
.address-search-box{display:grid;grid-template-columns:1fr;gap:6px;margin-top:8px;}
.address-search-box input,.address-results{width:100%;min-height:38px;border:1px solid #cbd5e1;border-radius:4px;background:#fff;padding:7px 9px;font-size:13px;color:#0f172a;}
.address-results{min-height:36px;}
.report-footer-branded{align-items:center;}
.report-footer-logo{display:flex;align-items:center;gap:8px;min-width:0;}
.report-footer-logo img{width:28px;height:28px;object-fit:contain;background:#fff;border:1px solid #e5e7eb;border-radius:3px;padding:2px;flex:0 0 auto;}
.report-footer-logo span{min-width:0;}
@media(max-width:760px){
  .address-search-box input,.address-results{font-size:13px;min-height:40px;}
  .report-footer-branded{display:grid!important;gap:8px;}
  .report-footer-logo{align-items:flex-start;}
}
@media print{
  .report-footer-logo img{width:24px;height:24px;}
}

/* Active-shift recovery + edit trail polish */
.edit-card{max-width:560px;}
.edit-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:12px 0;}
.edit-grid label{display:grid;gap:6px;font-weight:700;color:#374151;font-size:13px;}
.edit-grid input,.edit-grid textarea{width:100%;border:1px solid #dbe3ea;border-radius:4px;padding:10px;font:inherit;background:#fff;}
.edit-grid .full-field{grid-column:1/-1;}
.edit-chip{background:#fff7ed!important;border-color:#fed7aa!important;color:#9a3412!important;}
.shift-actions button.ghost{cursor:pointer;}
@media(max-width:640px){.edit-grid{grid-template-columns:1fr}.edit-card{width:min(94vw,520px)}}
@media print{.edit-chip{border:1px solid #fed7aa!important;color:#9a3412!important;background:#fff7ed!important}}

.address-results:not([hidden]){display:block;margin-top:6px;min-height:42px;height:42px;overflow:hidden;}
.address-results option{padding:7px;}
.report-info{grid-template-columns:repeat(5,1fr);}
@media(max-width:900px){.report-info{grid-template-columns:repeat(2,1fr);}}

/* Compact pay options */
.pay-options-panel {
  border: 1px solid #e5e7eb;
  padding: 10px 12px;
  background: #ffffff;
}
.pay-options-panel summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  color: #111827;
}
.pay-options-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.report-info.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.pay-breakdown h3 {
  margin-bottom: 10px;
}
@media (max-width: 760px) {
  .pay-options-grid, .report-info.compact { grid-template-columns: 1fr; }
  .pay-options-panel { padding: 9px; }
}


/* Full report period controls */
.report-instructions{background:#f8fafc;border:1px solid #e5e7eb;border-radius:4px;padding:10px;line-height:1.45;}
.report-instructions strong{display:block;margin-bottom:4px;color:#111827;}
.report-instructions small{color:#475569;}
@media(max-width:640px){#customReportStart,#customReportEnd{min-height:42px;}}


/* === SAFE FINAL POLISH: logos, menu settings, quick search, mobile === */

.brand img.app-logo,
.app-logo {
  width: 44px !important;
  height: 44px !important;
  object-fit: cover !important;
  background: transparent !important;
  border-radius: 10px !important;
  padding: 0 !important;
}

.location-notice {
  max-width: 1260px;
  margin: 10px auto 0;
  padding: 10px 14px;
  background: #fff8e7;
  border: 1px solid #f1d28d;
  color: #7a5200;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.45;
}

.menu-controlled-settings {
  display: none;
}

.menu-controlled-settings.is-open {
  display: block;
}

.app-menu summary {
  list-style: none;
}

.app-menu summary::-webkit-details-marker {
  display: none;
}

.app-menu summary {
  min-height: 38px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 800;
  background: rgba(255,255,255,.08);
  color: #fff;
}

.menu-list {
  z-index: 1000;
}

.address-search-box {
  display: grid !important;
  gap: 6px !important;
  width: 100% !important;
}

#addressSearchInput {
  display: none !important;
  width: 100% !important;
  min-height: 42px !important;
  border: 1px solid var(--line) !important;
  border-radius: 6px !important;
  padding: 10px 12px !important;
  background: #ffffff !important;
}

#addressSearchResults {
  display: block;
  width: 100%;
  height: 42px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #ffffff;
  color:#0f172a;
  font-size:13px;
  overflow: hidden;
}

#addressSearchResults[hidden] {
  display: none !important;
}

.compact-brand-footer {
  margin: 16px auto 0 !important;
  padding: 10px 14px !important;
  border-top: 1px solid var(--line);
  background: #fff;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: left;
}

.footer-brand-logo {
  width: 34px !important;
  height: 34px !important;
  object-fit: cover !important;
  border-radius: 8px !important;
  flex: 0 0 auto;
}

.footer-brand-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: #475569;
  font-size: 12px;
  line-height: 1.35;
}

.footer-brand-copy a {
  color: #0f766e;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 900px) {
  .topbar {
    padding: 12px 14px !important;
    gap: 10px !important;
  }

  .brand {
    min-width: 0;
  }

  .brand h1 {
    font-size: 20px !important;
  }

  .brand p {
    max-width: 230px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 11.5px !important;
  }

  .top-actions {
    flex: 0 0 auto;
  }

  .layout {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "control"
      "summary"
      "history" !important;
    padding: 12px !important;
    gap: 12px !important;
  }

  .panel {
    padding: 13px !important;
    border-radius: 7px !important;
  }

  .live-time {
    font-size: clamp(28px, 10vw, 36px) !important;
  }

  .button-row {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .settings-grid,
  .pay-options-grid,
  .report-period-grid {
    grid-template-columns: 1fr !important;
  }

  .summary-grid {
    grid-template-columns: 1fr !important;
  }

  .shift-item,
  .shift-card,
  .history-row {
    max-width: 100% !important;
  }

  .location-notice {
    margin: 8px 12px 0;
    font-size: 12px;
  }

  .compact-brand-footer {
    text-align: center;
    flex-direction: column;
    gap: 6px;
    padding: 10px !important;
  }

  .footer-brand-copy {
    justify-content: center;
    gap: 5px;
    font-size: 11.5px;
  }
}

@media (max-width: 430px) {
  .brand img.app-logo,
  .app-logo {
    width: 40px !important;
    height: 40px !important;
  }

  .brand h1 {
    font-size: 18px !important;
  }

  .brand p {
    max-width: 170px;
  }

  .app-menu summary {
    padding: 8px 10px;
    font-size: 13px;
  }
}



/* === Production-safe Shift Management additions === */
.shift-management-panel {
  margin-bottom: 14px;
}

.shift-management-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line, #d7e0e7);
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.shift-management-head h2 {
  margin: 0 0 3px;
  font-size: 20px;
}

.active-shift-box {
  border: 1px solid var(--line, #d7e0e7);
  background: #f8fafc;
  border-radius: 8px;
  padding: 12px;
}

.active-shift-grid {
  display: grid;
  grid-template-columns: 1.2fr .85fr .9fr auto;
  gap: 10px;
  align-items: center;
}

.active-shift-grid strong,
.shift-record-item strong {
  display: block;
  color: #0f172a;
}

.active-shift-grid span,
.shift-record-meta {
  color: #64748b;
  font-size: 12px;
}

.shift-records-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.shift-record-item {
  display: grid;
  grid-template-columns: 1.1fr .85fr .9fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line, #d7e0e7);
  background: #ffffff;
  border-radius: 8px;
  padding: 11px;
}

.shift-record-item:nth-child(even) {
  background: #f8fafc;
}

.shift-record-title {
  font-weight: 800;
  color: #0f172a;
}

.shift-audit-note {
  margin-top: 8px;
  padding: 8px;
  border-left: 3px solid #0f766e;
  background: #f0fdfa;
  border-radius: 6px;
  font-size: 12px;
  color: #334155;
}

.shift-modal {
  width: min(430px, 94vw);
  text-align: left;
}

.shift-modal h3 {
  margin: 0 0 12px;
}

.form-field {
  display: grid;
  gap: 6px;
  margin-bottom: 11px;
  font-size: 13px;
  font-weight: 800;
  color: #334155;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--line, #d7e0e7);
  border-radius: 7px;
  padding: 10px 11px;
  font: inherit;
  background: #fff;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.shift-report-section {
  margin-top: 18px;
  border-top: 2px solid #0f766e;
  padding-top: 12px;
}

.shift-report-section h2 {
  margin-bottom: 4px;
}

.shift-report-card {
  border: 1px solid #d7e0e7;
  border-radius: 8px;
  padding: 12px;
  margin: 10px 0;
  background: #fff;
  break-inside: avoid;
}

.shift-report-card h3 {
  margin: 0 0 6px;
}

.shift-report-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.shift-report-table th,
.shift-report-table td {
  border: 1px solid #d7e0e7;
  padding: 8px;
  text-align: left;
  font-size: 12px;
  vertical-align: top;
}

.shift-report-table th {
  background: #f1f5f9;
  font-weight: 800;
}

.shift-report-edit {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 6px;
  padding: 8px;
  margin-top: 8px;
  font-size: 12px;
}

@media (max-width: 768px) {
  .shift-management-head {
    align-items: stretch;
    flex-direction: column;
  }

  .active-shift-grid,
  .shift-record-item {
    grid-template-columns: 1fr;
  }

  .modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .shift-report-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* === Final working-hour correction and header icon cleanup === */
.brand img,
.brand img.app-logo,
.app-logo,
.header-logo {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  object-fit: cover !important;
}

.shift-management-head h2::after {
  content: "";
}

@media (max-width: 768px) {
  .shift-modal {
    width: 94vw !important;
  }
}

/* === Manual Shift UI near Punch controls === */
.shift-inline-btn {
  width: 100%;
  margin-top: 8px;
  border-radius: 7px;
  background: linear-gradient(135deg, #2563eb, #0f766e);
  border: 1px solid rgba(37, 99, 235, .35);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(15, 118, 110, .18);
}
.shift-inline-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #0f766e);
  transform: translateY(-1px);
}

.compact-shift-entry {
  margin-bottom: 12px;
}

.manual-shift-quick-summary {
  margin-top: 8px;
  color: #64748b;
  font-size: 12px;
}

.manual-shift-list-panel {
  margin-top: 12px;
}

.manual-shift-list {
  display: grid;
  gap: 8px;
}

.manual-shift-card {
  display: grid;
  grid-template-columns: 1.4fr .7fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line, #d7e0e7);
  background: #fff;
  border-radius: 8px;
  padding: 10px;
}

.manual-shift-card span {
  display: block;
  color: #64748b;
  font-size: 12px;
  margin-top: 3px;
}

@media (max-width: 768px) {
  .manual-shift-card {
    grid-template-columns: 1fr;
  }
}

/* === Final clean combined report layout: automatic + manual shifts === */
.clean-work-report .combined-total-card{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:10px;
  background:linear-gradient(180deg,#f8fafc,#eef6ff);
  border:1px solid #cbd5e1;
  border-radius:8px;
  padding:12px;
}
.clean-work-report .combined-total-card>div{
  background:#fff;
  border:1px solid #dbe3ea;
  border-radius:6px;
  padding:12px;
}
.clean-work-report .combined-total-card span,
.clean-work-report .report-source-summary small,
.clean-work-report .combined-total-card small{
  display:block;
  color:#64748b;
  font-size:12px;
  line-height:1.35;
}
.clean-work-report .combined-total-card strong{
  display:block;
  margin:5px 0 3px;
  color:#0f172a;
  font-size:22px;
  letter-spacing:-.02em;
}
.clean-work-report .report-source-summary div{
  min-height:82px;
}
.clean-work-report .shift-detail-block{
  border:1px solid #dbe3ea;
  border-radius:8px;
  padding:14px;
  background:#fff;
}
.clean-work-report .shift-detail-block>h3{
  font-size:18px;
  border-bottom:1px solid #e5e7eb;
  padding-bottom:10px;
  margin-bottom:12px;
}
.clean-work-report .report-subsection-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:6px;
  padding:10px 12px;
  margin:12px 0 8px;
}
.clean-work-report .report-subsection-title span{
  font-weight:800;
  color:#0f172a;
}
.clean-work-report .report-subsection-title small{
  color:#475569;
  font-weight:700;
}
.clean-work-report .manual-under-shift-title{
  background:#ecfdf5;
  border-color:#bbf7d0;
}
.clean-work-report .clean-report-table th{
  white-space:nowrap;
}
.clean-work-report .manual-report-table th{
  background:#065f46;
}
.clean-work-report .manual-edit-details{
  margin-top:12px;
  border:1px solid #e2e8f0;
  border-radius:6px;
  padding:10px 12px;
  background:#f8fafc;
}
.clean-work-report .manual-edit-details summary{
  cursor:pointer;
  font-weight:800;
  color:#0f172a;
}
.clean-work-report .final-combined-summary{
  border:1px solid #bfdbfe;
  border-radius:8px;
  padding:14px;
  background:#eff6ff;
}
.clean-work-report .final-combined-summary h3{
  font-size:18px;
  margin-bottom:10px;
}
@media(max-width:900px){
  .clean-work-report .combined-total-card{grid-template-columns:1fr 1fr;}
}
@media(max-width:640px){
  .clean-work-report .combined-total-card{grid-template-columns:1fr;}
  .clean-work-report .report-subsection-title{display:block;}
  .clean-work-report .report-subsection-title small{margin-top:4px;display:block;}
}
@media print{
  .clean-work-report .combined-total-card{grid-template-columns:repeat(4,1fr)!important;}
  .clean-work-report .manual-edit-details{break-inside:avoid;}
}


/* === GPS failure punch-out fallback === */
.gps-fail-btn{
  grid-column:1 / -1;
  background:#fff7ed;
  border-color:#fed7aa;
  color:#9a3412;
  font-weight:800;
}
.gps-fail-btn:hover{background:#ffedd5;}
.system-note-box{
  margin:12px 0;
  padding:12px 14px;
  border:1px solid #fed7aa;
  border-radius:8px;
  background:#fff7ed;
  color:#7c2d12;
}
.system-note-box span{
  display:block;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.06em;
  font-weight:800;
  opacity:.78;
  margin-bottom:4px;
}
.system-note-box strong{
  display:block;
  line-height:1.35;
}
.gps-fail-card textarea{
  width:100%;
  border:1px solid var(--line,#d6dce3);
  border-radius:6px;
  padding:10px;
  resize:vertical;
  margin:8px 0 14px;
}
.gps-report-warning{
  display:inline-block;
  color:#9a3412;
  background:#fff7ed;
  border:1px solid #fed7aa;
  border-radius:4px;
  padding:2px 6px;
  font-weight:700;
}
@media(max-width:640px){.gps-fail-btn{grid-column:auto;}}


.gps-mini-note{
  font-size:12px;
  line-height:1.4;
  background:#fff8e1;
  border-left:3px solid #f0b429;
  padding:6px 8px;
  margin:4px 0;
  border-radius:6px;
  color:#444;
}
.gps-mini-note small{
  color:#666;
}

/* === Unified Shift History: automatic + manual in one panel === */
.history-subhead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin:12px 0 8px;
  padding:8px 10px;
  border:1px solid #e5eaf0;
  border-radius:6px;
  background:#f8fafc;
  font-weight:800;
  color:#1f2937;
}
.history-subhead small{
  color:#64748b;
  font-size:12px;
  font-weight:700;
  text-align:right;
}
.auto-subhead{
  border-left:4px solid #2563eb;
}
.manual-subhead{
  border-left:4px solid #0f766e;
  margin-top:16px;
}
.manual-history-note{
  margin:0 0 8px;
  font-size:12px;
}
.manual-shifts-inside-history{
  margin-bottom:2px;
}
.manual-shifts-inside-history .muted{
  border:1px dashed #d7e0e7;
  background:#fafafa;
  border-radius:6px;
  padding:14px;
  text-align:center;
}
.history-panel .legacy-manual-history,
.history-panel .manual-shifts-inside-history{
  display:none!important;
}
.history-date-group{
  display:grid;
  gap:8px;
  margin:10px 0 14px;
}
.history-date-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:8px 10px;
  border:1px solid #dbeafe;
  background:#f8fbff;
  border-radius:7px;
}
.history-date-title strong{
  color:#0f172a;
  font-size:14px;
  line-height:1.2;
}
.history-date-title span{
  color:#475569;
  font-size:12px;
  font-weight:800;
}
.history-date-records{
  display:grid;
  gap:8px;
}
.main-history-table-wrap{
  width:100%;
  overflow-x:auto;
  border:1px solid #d7e3f0;
  border-radius:8px;
  background:#fff;
  box-shadow:0 1px 0 rgba(15,23,42,.03);
}
.main-history-table{
  width:100%;
  min-width:980px;
  border-collapse:collapse;
  table-layout:fixed;
  font-size:12px;
  color:#0f172a;
}
.main-history-table th,
.main-history-table td{
  border:1px solid #d7e3f0;
  padding:7px 8px;
  vertical-align:top;
  line-height:1.25;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:normal;
}
.main-history-table th{
  background:#eef4fa;
  color:#0f172a;
  font-size:11px;
  font-weight:900;
  text-align:left;
  text-transform:uppercase;
}
.main-history-table th:nth-child(1),
.main-history-table td:nth-child(1){width:34px;text-align:center;}
.main-history-table th:nth-child(2),
.main-history-table td:nth-child(2){width:92px;}
.main-history-table th:nth-child(3),
.main-history-table td:nth-child(3){width:86px;}
.main-history-table th:nth-child(4),
.main-history-table td:nth-child(4){width:130px;}
.main-history-table th:nth-child(5),
.main-history-table td:nth-child(5){width:auto;}
.main-history-table th:nth-child(6),
.main-history-table td:nth-child(6){width:96px;}
.main-history-table th:nth-child(7),
.main-history-table td:nth-child(7){width:88px;}
.main-history-table th:nth-child(8),
.main-history-table td:nth-child(8){width:170px;}
.main-history-table th:nth-child(9),
.main-history-table td:nth-child(9){width:144px;}
.main-history-row.manual-record td{
  background:#fbfffd;
}
.main-history-row.excluded-from-total td{
  background:#fff8e1;
}
.main-history-index{
  color:#334155;
  font-weight:800;
}
.main-history-location span{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:start;
  gap:6px;
  margin:0 0 3px;
  min-width:0;
}
.main-history-location b{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:26px;
  padding:1px 5px;
  border-radius:4px;
  background:#dff7f0;
  color:#0f766e;
  font-size:10px;
  line-height:1.3;
  text-transform:uppercase;
}
.main-history-location span:nth-child(2) b{
  background:#ecfdf5;
  color:#15803d;
}
.main-history-worked,
.main-history-pay{
  font-weight:900;
}
.main-history-worked small,
.main-history-pay small{
  display:block;
  margin-top:2px;
  color:#9a3412;
  font-size:11px;
  line-height:1.2;
}
.main-history-pay{
  color:#047857;
}
.main-history-notes{
  color:#334155;
}
.main-history-actions{
  display:flex;
  gap:5px;
  flex-wrap:wrap;
  align-items:flex-start;
}
.main-history-actions .ghost{
  min-height:28px;
  padding:5px 7px;
  font-size:11px;
  line-height:1;
  white-space:nowrap;
}
.record-title-line{
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
  margin-bottom:3px;
}
.record-type-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:20px;
  padding:3px 7px;
  border-radius:999px;
  font-size:10px;
  line-height:1;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.02em;
}
.record-type-pill.auto{
  color:#1d4ed8;
  background:#eff6ff;
  border:1px solid #bfdbfe;
}
.record-type-pill.manual{
  color:#0f766e;
  background:#ecfdf5;
  border:1px solid #a7f3d0;
}
.combined-record-card.automatic-record{
  border-left:4px solid #2563eb;
}
.combined-record-card.manual-record{
  border-left:4px solid #0f766e;
}
.manual-shift-card{
  border-radius:6px;
  box-shadow:none;
}
@media(max-width:640px){
  .history-subhead{align-items:flex-start;flex-direction:column;gap:3px;}
  .history-subhead small{text-align:left;}
  .history-date-title{align-items:flex-start;flex-direction:column;gap:3px;}
  .record-title-line{gap:5px;}
  .main-history-table-wrap{
    overflow:visible;
    border:0;
    background:transparent;
    box-shadow:none;
  }
  .main-history-table,
  .main-history-table thead,
  .main-history-table tbody,
  .main-history-table tr,
  .main-history-table td{
    display:block;
    width:100%;
    min-width:0;
  }
  .main-history-table{
    border:0;
    background:transparent;
    font-size:13px;
  }
  .main-history-table thead{
    display:none;
  }
  .main-history-table tr{
    margin:0 0 9px;
    border:1px solid #d7e3f0;
    border-left:4px solid #2563eb;
    border-radius:8px;
    background:#fff;
    overflow:hidden;
  }
  .main-history-table tr.manual-record{
    border-left-color:#0f766e;
  }
  .main-history-table tr.excluded-from-total{
    border-left-color:#f59e0b;
  }
  .main-history-table td{
    display:grid;
    grid-template-columns:88px minmax(0,1fr);
    gap:8px;
    border:0;
    border-bottom:1px solid #edf2f7;
    padding:8px 10px;
  }
  .main-history-table td::before{
    content:attr(data-label);
    color:#64748b;
    font-size:10px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.02em;
  }
  .main-history-table td:last-child{
    border-bottom:0;
  }
  .main-history-table td[data-label="#"]{
    display:none;
  }
  .main-history-actions{
    justify-content:flex-start;
  }
}

/* Professional combined total amount summary in main body */
.total-amount-card{
  margin-top:10px;
  border:1px solid #bfdbfe;
  background:linear-gradient(180deg,#eff6ff,#ffffff);
  border-radius:8px;
  padding:12px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  box-shadow:0 8px 20px rgba(29,78,216,.08);
}
.total-amount-card span{display:block;color:#475569;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.03em;margin-bottom:4px;}
.total-amount-card strong{font-size:24px;color:#0f172a;line-height:1;}
.total-amount-meta{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end;}
.total-amount-meta span{background:#fff;border:1px solid #dbeafe;border-radius:999px;padding:6px 9px;margin:0;text-transform:none;letter-spacing:0;font-weight:700;color:#334155;}
.total-amount-meta strong{font-size:13px;color:#1d4ed8;}
@media (max-width:760px){
  .total-amount-card{display:block;padding:11px;margin-top:8px;}
  .total-amount-card strong{font-size:22px;}
  .total-amount-meta{justify-content:flex-start;margin-top:10px;gap:6px;}
  .total-amount-meta span{font-size:11px;padding:5px 8px;}
}

/* Report-only marker / deduction feature */
.adjustment-subhead{background:#fff7ed;border-color:#fed7aa;color:#9a3412;}
.adjustment-actions{display:flex;justify-content:flex-start;margin:8px 0 10px;}
.deduction-btn{background:#fff7ed!important;border-color:#fdba74!important;color:#9a3412!important;font-weight:800;}
.report-adjustment-card{border-left:4px solid #f97316;background:#fffaf4;}
.report-adjustment-card .center-line-preview{display:block;text-align:center;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:#9a3412;letter-spacing:.02em;}
.report-adjustment-list{margin-top:8px;}
.report-center-line{display:block;text-align:center;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-weight:800;color:#9a3412;background:#fff7ed;border:1px dashed #fdba74;border-radius:4px;padding:6px 8px;white-space:normal;word-break:break-word;}
.report-adjustment-note{margin-top:5px;font-size:12px;color:#475569;text-align:center;}
.adjustment-report-table th{background:#7c2d12!important;color:#fff!important;}
.report-adjustment-row td{background:#fffaf4;vertical-align:middle;}
.total-amount-meta{gap:6px;}
.total-amount-meta span:last-child strong{color:#b45309;}
@media(max-width:640px){
  .adjustment-actions{display:block;}
  .deduction-btn{width:100%;}
  .report-center-line{font-size:11px;padding:5px;}
}

/* Strikethrough / excluded manual shift feature */
.strike-check{
  display:flex;
  align-items:center;
  gap:9px;
  margin:8px 0 2px;
  padding:9px 10px;
  border:1px solid #e2e8f0;
  border-radius:6px;
  background:#f8fafc;
  font-weight:700;
  color:#334155;
}
.strike-check input{width:16px;height:16px;accent-color:#b45309;}
.strike-help{font-size:12px;margin:2px 0 10px!important;line-height:1.35;}
.manual-shift-card.is-struck{
  background:#fff7ed;
  border-color:#fed7aa;
  opacity:.92;
}
.manual-shift-card.is-struck strong,
.manual-shift-card.is-struck span:first-of-type{
  text-decoration:line-through;
  text-decoration-thickness:2px;
  text-decoration-color:#b45309;
}
.manual-struck-row td{
  background:#fff7ed!important;
  color:#7c2d12;
}
.strike-text{
  text-decoration:line-through;
  text-decoration-thickness:2px;
  text-decoration-color:#b45309;
  color:#7c2d12;
}
.strike-badge{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:2px 7px;
  border-radius:999px;
  background:#ffedd5;
  color:#9a3412;
  border:1px solid #fed7aa;
  font-size:11px;
  font-weight:800;
  line-height:1.2;
  white-space:nowrap;
}

/* Final unified report cleanup */
.unified-report-table{
  table-layout: fixed;
  width: 100%;
  font-size: 12px;
}
.unified-report-table th,
.unified-report-table td{
  padding: 6px 7px!important;
  line-height: 1.25;
  vertical-align: top;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.unified-report-table th:nth-child(1){width:38px}
.unified-report-table th:nth-child(2){width:72px}
.unified-report-table th:nth-child(3){width:92px}
.unified-report-table th:nth-child(4){width:118px}
.unified-report-table th:nth-child(6){width:72px}
.unified-report-table th:nth-last-child(3){width:78px}
.unified-report-table th:nth-last-child(2){width:150px}
.unified-report-table th:last-child{width:58px}
.type-pill,
.gps-status-badge,
.ok-badge,
.edit-badge,
.strike-badge{
  display:inline-flex;
  align-items:center;
  gap:3px;
  border-radius:999px;
  padding:2px 7px;
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
  margin:1px 2px 1px 0;
}
.auto-pill{background:#e0f2fe;color:#075985;border:1px solid #7dd3fc}
.manual-pill{background:#f3e8ff;color:#6b21a8;border:1px solid #d8b4fe}
.gps-badge-in{background:#fef3c7;color:#92400e;border:1px solid #fcd34d}
.gps-badge-out{background:#fee2e2;color:#991b1b;border:1px solid #fecaca}
.ok-badge{background:#dcfce7;color:#166534;border:1px solid #86efac}
.edit-badge{background:#f1f5f9;color:#334155;border:1px solid #cbd5e1}
.location-issue-text{color:#991b1b;font-weight:800;font-size:11px;text-transform:uppercase;letter-spacing:.02em}
.compact-user-note{display:block;color:#475569;font-size:11px;margin-top:2px;line-height:1.2}
.compact-notes-cell{max-width:160px}
.mini-address{font-size:11px;line-height:1.25;margin:0 0 2px}
.mini-address b{font-size:10px;color:#334155;margin-right:3px}
.money-inline{color:#166534;font-weight:900;white-space:nowrap}
.unified-report-title{border-left:3px solid #0f766e;padding-left:8px;margin-bottom:8px}
@media(max-width:760px){
  .unified-report-table{min-width:900px;font-size:11px}
  .unified-report-table th,.unified-report-table td{padding:5px!important}
}

/* Compact professional punch status messages */
.message-card{
  max-width:360px!important;
  padding:16px 18px!important;
  border-radius:8px!important;
  text-align:left!important;
  display:grid!important;
  grid-template-columns:38px 1fr!important;
  column-gap:12px!important;
  align-items:center!important;
}
.message-icon{
  width:34px!important;
  height:34px!important;
  margin:0!important;
  border-radius:999px!important;
  font-size:18px!important;
}
.message-card h2{font-size:15px!important;margin:0 0 2px!important;}
.message-card p{font-size:13px!important;line-height:1.35!important;margin:0!important;}
.message-actions{grid-column:1 / -1;margin-top:12px!important;justify-content:flex-end!important;}
.message-actions button{min-height:34px!important;min-width:82px!important;padding:7px 12px!important;font-size:13px!important;}
.message-card.success{border-top:0!important;border-left:4px solid #16a34a!important;}
.message-card.error{border-top:0!important;border-left:4px solid #f59e0b!important;}
.message-card.error .message-icon{background:#fef3c7!important;color:#92400e!important;border-color:#fde68a!important;}
.message-card.error h2{color:#92400e!important;}

/* === Polished report cleanup: compact, no overflow, no bulky GPS text === */
.report-card{width:min(1120px,96vw)!important;}
.report-preview{padding:14px!important;overflow:auto!important;}
.clean-work-report{max-width:100%;overflow:hidden;}
.clean-work-report .professional-report-head{display:grid!important;grid-template-columns:1.1fr .9fr;gap:14px;align-items:start;}
.clean-work-report .report-meta{font-size:12px!important;word-break:break-word;}
.clean-work-report .combined-total-card{gap:8px!important;padding:10px!important;}
.clean-work-report .combined-total-card>div{padding:9px 10px!important;min-width:0;}
.clean-work-report .combined-total-card strong{font-size:19px!important;}
.clean-work-report .report-source-summary{grid-template-columns:repeat(3,1fr)!important;gap:7px!important;}
.clean-work-report .report-source-summary div{min-height:auto!important;padding:8px!important;}
.clean-work-report .pay-breakdown .report-info{grid-template-columns:repeat(4,1fr)!important;}
.clean-work-report .shift-detail-block{padding:10px!important;overflow:hidden;}
.clean-work-report .shift-detail-block>h3{font-size:16px!important;margin-bottom:8px!important;padding-bottom:7px!important;}
.clean-work-report .report-subsection-title{padding:7px 9px!important;margin:8px 0 7px!important;}
.report-table-wrap{width:100%;overflow-x:auto;overflow-y:hidden;border:1px solid #dbe3ea;border-radius:7px;background:#fff;}
.report-table-wrap .report-table{border:0!important;margin:0!important;}
.unified-report-table{table-layout:fixed!important;width:100%!important;min-width:980px!important;font-size:11px!important;}
.unified-report-table th,.unified-report-table td{padding:5px 6px!important;line-height:1.18!important;vertical-align:middle!important;}
.unified-report-table th{font-size:10px!important;text-transform:uppercase;letter-spacing:.02em;}
.unified-report-table td:nth-child(1),.unified-report-table th:nth-child(1){width:32px!important;text-align:center;}
.unified-report-table td:nth-child(2),.unified-report-table th:nth-child(2){width:62px!important;}
.unified-report-table td:nth-child(3),.unified-report-table th:nth-child(3){width:82px!important;}
.unified-report-table td:nth-child(4),.unified-report-table th:nth-child(4){width:104px!important;}
.unified-report-table td:nth-child(5),.unified-report-table th:nth-child(5){width:250px!important;}
.unified-report-table td:nth-child(6),.unified-report-table th:nth-child(6){width:62px!important;}
.unified-report-table td:nth-child(7),.unified-report-table th:nth-child(7){width:72px!important;}
.unified-report-table td:nth-child(8),.unified-report-table th:nth-child(8){width:70px!important;}
.unified-report-table td:nth-child(9),.unified-report-table th:nth-child(9){width:145px!important;}
.unified-report-table td:nth-child(10),.unified-report-table th:nth-child(10){width:64px!important;}
.mini-address{font-size:10.5px!important;line-height:1.2!important;margin:1px 0!important;display:block;max-width:100%;}
.mini-address b{display:inline-flex;align-items:center;justify-content:center;min-width:28px;padding:1px 4px;border-radius:999px;background:#e0f2fe;color:#075985;font-size:9px!important;margin-right:4px;}
.mini-address:nth-child(2) b{background:#ffedd5;color:#9a3412;}
.compact-notes-cell{max-width:145px!important;white-space:normal!important;overflow:hidden!important;}
.gps-status-badge,.ok-badge,.type-pill,.edit-badge,.strike-badge{font-size:10px!important;padding:2px 6px!important;line-height:1.15!important;max-width:100%;white-space:normal!important;}
.gps-status-badge{display:inline-flex!important;max-width:132px!important;}
.compact-user-note{font-size:10px!important;margin-top:2px!important;line-height:1.15!important;display:block!important;color:#64748b!important;}
.location-issue-text{font-size:10px!important;letter-spacing:0!important;text-transform:none!important;color:#b45309!important;background:#fff7ed;border:1px solid #fed7aa;border-radius:999px;padding:1px 5px;display:inline-block;}
.map-mini{display:inline-flex!important;align-items:center;justify-content:center;margin:1px 2px 1px 0;padding:2px 6px;border-radius:999px;background:#eef2ff;border:1px solid #c7d2fe;color:#3730a3!important;font-size:10px!important;white-space:nowrap;text-decoration:none!important;}
.final-combined-summary{padding:10px!important;}
.report-signature{gap:10px!important;font-size:12px!important;}
.report-footer{font-size:11px!important;}
@media(max-width:900px){
  .clean-work-report .professional-report-head{grid-template-columns:1fr!important;}
  .clean-work-report .report-source-summary,.clean-work-report .pay-breakdown .report-info{grid-template-columns:1fr 1fr!important;}
}
@media(max-width:640px){
  .report-preview{padding:8px!important;}
  .clean-work-report .combined-total-card,.clean-work-report .report-source-summary,.clean-work-report .pay-breakdown .report-info{grid-template-columns:1fr!important;}
  .unified-report-table{min-width:900px!important;}
}
@media print{
  .report-table-wrap{overflow:visible!important;border:0!important;}
  .unified-report-table{min-width:0!important;width:100%!important;font-size:8.5px!important;}
  .unified-report-table th,.unified-report-table td{padding:3px!important;}
  .gps-status-badge,.ok-badge,.type-pill,.edit-badge,.strike-badge,.map-mini{font-size:8px!important;padding:1px 3px!important;}
  .mini-address{font-size:8px!important;}
  .clean-work-report .combined-total-card strong{font-size:14px!important;}
}


/* === Ultra compact verified report cleanup === */
.report-preview{padding:8px!important;}
.clean-work-report .report-section{margin-top:8px!important;}
.clean-work-report .professional-report-head{padding:10px!important;gap:10px!important;}
.clean-work-report .report-brand img{width:42px!important;height:42px!important;}
.clean-work-report .report-brand h2{font-size:18px!important;margin:0!important;}
.clean-work-report .report-brand p{font-size:11px!important;margin:1px 0!important;}
.clean-work-report .report-meta{padding:8px!important;line-height:1.22!important;font-size:11px!important;}
.clean-work-report .combined-total-card{grid-template-columns:repeat(4,1fr)!important;padding:0!important;background:transparent!important;border:0!important;gap:6px!important;}
.clean-work-report .combined-total-card>div{padding:7px 8px!important;border-radius:5px!important;}
.clean-work-report .combined-total-card span{font-size:10px!important;}
.clean-work-report .combined-total-card strong{font-size:16px!important;}
.clean-work-report .combined-total-card small{display:none!important;}
.clean-work-report .report-source-summary{grid-template-columns:repeat(3,1fr)!important;gap:6px!important;}
.clean-work-report .report-source-summary div,.clean-work-report .report-info.compact div{padding:6px 7px!important;border-radius:4px!important;}
.clean-work-report .report-info span{font-size:10px!important;}
.clean-work-report .report-info strong{font-size:13px!important;}
.clean-work-report .report-info small{display:none!important;}
.clean-work-report .pay-breakdown h3,.clean-work-report .shift-detail-block>h3,.clean-work-report .final-combined-summary h3{font-size:14px!important;margin:0 0 6px!important;padding:0!important;border:0!important;}
.clean-work-report .pay-breakdown,.clean-work-report .shift-detail-block,.clean-work-report .final-combined-summary{padding:8px!important;border-radius:5px!important;}
.clean-work-report .report-subsection-title{padding:5px 7px!important;margin:4px 0 6px!important;font-size:12px!important;}
.clean-work-report .report-subsection-title small{font-size:10px!important;}
.report-table-wrap{border-radius:4px!important;overflow-x:auto!important;}
.unified-report-table{min-width:820px!important;font-size:10px!important;}
.unified-report-table th,.unified-report-table td{padding:4px 4px!important;line-height:1.12!important;}
.unified-report-table th{font-size:9px!important;}
.unified-report-table td:nth-child(1),.unified-report-table th:nth-child(1){width:28px!important;}
.unified-report-table td:nth-child(2),.unified-report-table th:nth-child(2){width:52px!important;}
.unified-report-table td:nth-child(3),.unified-report-table th:nth-child(3){width:72px!important;}
.unified-report-table td:nth-child(4),.unified-report-table th:nth-child(4){width:88px!important;}
.unified-report-table td:nth-child(5),.unified-report-table th:nth-child(5){width:205px!important;}
.unified-report-table td:nth-child(6),.unified-report-table th:nth-child(6){width:54px!important;}
.unified-report-table td:nth-child(7),.unified-report-table th:nth-child(7){width:62px!important;}
.unified-report-table td:nth-child(8),.unified-report-table th:nth-child(8){width:58px!important;}
.unified-report-table td:nth-child(9),.unified-report-table th:nth-child(9){width:92px!important;}
.unified-report-table td:nth-child(10),.unified-report-table th:nth-child(10){width:48px!important;}
.mini-address{font-size:9.5px!important;line-height:1.08!important;margin:0!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.mini-address b{min-width:24px!important;padding:0 4px!important;font-size:8px!important;}
.location-issue-text{font-size:9px!important;padding:0 4px!important;}
.compact-notes-cell{max-width:92px!important;}
.gps-status-badge,.ok-badge,.type-pill,.edit-badge,.strike-badge{font-size:9px!important;padding:1px 5px!important;line-height:1.05!important;white-space:nowrap!important;max-width:88px!important;overflow:hidden;text-overflow:ellipsis;}
.ok-badge{max-width:42px!important;}
.map-mini{font-size:9px!important;padding:1px 4px!important;}
.report-signature{margin-top:8px!important;padding-top:8px!important;font-size:11px!important;gap:8px!important;}
.compact-footer-line{display:block!important;text-align:center!important;margin-top:8px!important;padding-top:7px!important;font-size:10.5px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.compact-footer-line span{display:block!important;text-align:center!important;}
.manual-edit-details{margin-top:6px!important;}
.manual-edit-details summary{font-size:11px!important;padding:5px 7px!important;}
@media(max-width:760px){.clean-work-report .combined-total-card,.clean-work-report .report-source-summary{grid-template-columns:1fr 1fr!important}.unified-report-table{min-width:820px!important}}
@media print{.report-preview{padding:0!important}.work-report{padding:0!important}.unified-report-table{min-width:0!important;font-size:7.6px!important}.unified-report-table th,.unified-report-table td{padding:2px!important}.compact-footer-line{white-space:normal!important}}


/* === One-page generated report + centered branded footer === */
.clean-work-report.one-page-report,
.clean-work-report{max-width:100%;}
.clean-work-report .professional-report-head{
  grid-template-columns:1fr 1.05fr!important;
  margin-bottom:6px!important;
}
.clean-work-report .report-meta br{display:none!important;}
.clean-work-report .report-meta strong{display:inline-block!important;min-width:86px!important;margin-right:4px!important;}
.clean-work-report .report-meta{font-size:10px!important;line-height:1.25!important;}
.clean-work-report .combined-total-card{margin-top:5px!important;}
.clean-work-report .report-source-summary{display:none!important;}
.clean-work-report .pay-breakdown{display:none!important;}
.manual-edit-details{display:none!important;}
.clean-work-report .final-combined-summary{display:none!important;}
.clean-work-report .report-signature{margin-top:6px!important;padding-top:6px!important;font-size:10px!important;}
.unified-report-title small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.unified-report-table{table-layout:fixed!important;width:100%!important;min-width:0!important;}
.unified-report-table th,.unified-report-table td{overflow:hidden!important;word-break:normal!important;}
.unified-report-table td:nth-child(1),.unified-report-table th:nth-child(1){width:4%!important;}
.unified-report-table td:nth-child(2),.unified-report-table th:nth-child(2){width:7%!important;}
.unified-report-table td:nth-child(3),.unified-report-table th:nth-child(3){width:10%!important;}
.unified-report-table td:nth-child(4),.unified-report-table th:nth-child(4){width:14%!important;}
.unified-report-table td:nth-child(5),.unified-report-table th:nth-child(5){width:26%!important;}
.unified-report-table td:nth-child(6),.unified-report-table th:nth-child(6){width:8%!important;}
.unified-report-table td:nth-child(7),.unified-report-table th:nth-child(7){width:9%!important;}
.unified-report-table td:nth-child(8),.unified-report-table th:nth-child(8){width:8%!important;}
.unified-report-table td:nth-child(9),.unified-report-table th:nth-child(9){width:10%!important;}
.unified-report-table td:nth-child(10),.unified-report-table th:nth-child(10){width:4%!important;}
.mini-address{max-width:100%!important;display:block!important;}
.compact-footer-line{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  width:100%!important;
  text-align:center!important;
  white-space:nowrap!important;
}
.compact-footer-line img{
  width:20px!important;
  height:20px!important;
  object-fit:contain!important;
  display:inline-block!important;
  flex:0 0 auto!important;
}
.compact-footer-line span{display:inline-block!important;text-align:center!important;}
@media print{
  @page{size:letter portrait;margin:0.25in;}
  html,body{width:100%!important;background:#fff!important;}
  .print-root{display:block!important;width:100%!important;}
  .clean-work-report{font-size:8.2px!important;line-height:1.1!important;}
  .clean-work-report .professional-report-head{padding:5px!important;gap:5px!important;margin-bottom:4px!important;border-bottom-width:1px!important;}
  .clean-work-report .report-brand img{width:30px!important;height:30px!important;}
  .clean-work-report .report-brand h2{font-size:13px!important;}
  .clean-work-report .report-brand p{font-size:8px!important;margin:0!important;}
  .clean-work-report .report-meta{font-size:7.8px!important;padding:4px!important;line-height:1.1!important;}
  .clean-work-report .report-meta strong{min-width:62px!important;}
  .clean-work-report .report-section{margin-top:4px!important;}
  .clean-work-report .combined-total-card{gap:3px!important;}
  .clean-work-report .combined-total-card>div{padding:3px 4px!important;}
  .clean-work-report .combined-total-card span{font-size:7px!important;}
  .clean-work-report .combined-total-card strong{font-size:10.5px!important;}
  .clean-work-report .shift-detail-block{padding:4px!important;}
  .clean-work-report .shift-detail-block>h3{font-size:10px!important;margin-bottom:3px!important;}
  .clean-work-report .report-subsection-title{padding:3px 4px!important;margin:2px 0 3px!important;font-size:8px!important;}
  .clean-work-report .report-subsection-title small{font-size:7px!important;}
  .unified-report-table{font-size:6.6px!important;line-height:1.05!important;}
  .unified-report-table th,.unified-report-table td{padding:1.5px 2px!important;}
  .mini-address{font-size:6.5px!important;line-height:1.05!important;}
  .mini-address b{min-width:16px!important;padding:0 2px!important;font-size:5.8px!important;margin-right:2px!important;}
  .gps-status-badge,.ok-badge,.type-pill,.edit-badge,.strike-badge,.map-mini{font-size:6px!important;padding:0 2px!important;max-width:54px!important;}
  .location-issue-text{font-size:6px!important;padding:0 2px!important;}
  .report-signature{font-size:7px!important;margin-top:4px!important;padding-top:4px!important;}
  .compact-footer-line{font-size:7px!important;margin-top:4px!important;padding-top:3px!important;gap:4px!important;}
  .compact-footer-line img{width:12px!important;height:12px!important;}
}


/* === Detailed one-page report v2: more information, still compact/print safe === */
.detailed-one-page-report .report-source-summary{
  display:grid!important;
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:4px!important;
  margin-top:6px!important;
}
.detailed-one-page-report .report-source-summary div{
  padding:5px 6px!important;
  min-height:0!important;
}
.detailed-one-page-report .report-source-summary span{font-size:9.5px!important;line-height:1.1!important;}
.detailed-one-page-report .report-source-summary strong{font-size:12px!important;line-height:1.1!important;}
.detailed-one-page-report .report-source-summary small{font-size:8.5px!important;line-height:1.05!important;margin-top:1px!important;display:block!important;}
.detailed-one-page-report .pay-breakdown{
  display:block!important;
  margin-top:6px!important;
}
.detailed-one-page-report .pay-breakdown h3{font-size:11px!important;margin:0 0 4px!important;}
.detailed-one-page-report .pay-breakdown .report-info.compact{
  display:grid!important;
  grid-template-columns:repeat(7,minmax(0,1fr))!important;
  gap:4px!important;
}
.detailed-one-page-report .pay-breakdown .report-info.compact div{padding:4px 5px!important;}
.detailed-one-page-report .pay-breakdown .report-info.compact span{font-size:8.5px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.detailed-one-page-report .pay-breakdown .report-info.compact strong{font-size:10.5px!important;}
.detailed-one-page-report .one-page-period-line{
  margin:0 0 4px!important;
  color:#475569!important;
  font-size:10.5px!important;
  line-height:1.15!important;
}
.detailed-one-page-report .report-meta{padding:7px!important;}
.detailed-one-page-report .combined-total-card>div{padding:6px 7px!important;}
.detailed-one-page-report .combined-total-card strong{font-size:15px!important;}
.detailed-one-page-report .report-signature{display:grid!important;grid-template-columns:1fr 1fr!important;}
@media(max-width:760px){
  .detailed-one-page-report .report-source-summary{grid-template-columns:1fr 1fr!important;}
  .detailed-one-page-report .pay-breakdown .report-info.compact{grid-template-columns:1fr 1fr!important;}
}
@media print{
  @page{size:letter portrait;margin:0.18in;}
  .detailed-one-page-report{font-size:7.8px!important;line-height:1.04!important;max-height:10.55in!important;overflow:hidden!important;}
  .detailed-one-page-report .professional-report-head{padding:4px!important;margin-bottom:3px!important;}
  .detailed-one-page-report .report-meta{font-size:7.2px!important;padding:3px!important;line-height:1.03!important;}
  .detailed-one-page-report .combined-total-card{gap:2px!important;margin-top:3px!important;}
  .detailed-one-page-report .combined-total-card>div{padding:2px 3px!important;}
  .detailed-one-page-report .combined-total-card span{font-size:6.5px!important;}
  .detailed-one-page-report .combined-total-card strong{font-size:9px!important;}
  .detailed-one-page-report .combined-total-card small{font-size:6px!important;}
  .detailed-one-page-report .report-source-summary{display:grid!important;grid-template-columns:repeat(6,1fr)!important;gap:2px!important;margin-top:3px!important;}
  .detailed-one-page-report .report-source-summary div{padding:2px 3px!important;}
  .detailed-one-page-report .report-source-summary span{font-size:6.2px!important;}
  .detailed-one-page-report .report-source-summary strong{font-size:7.4px!important;}
  .detailed-one-page-report .report-source-summary small{font-size:5.6px!important;}
  .detailed-one-page-report .pay-breakdown{display:block!important;margin-top:3px!important;}
  .detailed-one-page-report .pay-breakdown h3{font-size:7.5px!important;margin-bottom:2px!important;}
  .detailed-one-page-report .pay-breakdown .report-info.compact{display:grid!important;grid-template-columns:repeat(7,1fr)!important;gap:2px!important;}
  .detailed-one-page-report .pay-breakdown .report-info.compact div{padding:2px!important;}
  .detailed-one-page-report .pay-breakdown .report-info.compact span{font-size:5.6px!important;}
  .detailed-one-page-report .pay-breakdown .report-info.compact strong{font-size:6.6px!important;}
  .detailed-one-page-report .one-page-period-line{font-size:6.5px!important;margin-bottom:2px!important;}
  .detailed-one-page-report .shift-detail-block{padding:3px!important;margin-top:3px!important;}
  .detailed-one-page-report .shift-detail-block>h3{font-size:8px!important;margin-bottom:1px!important;}
  .detailed-one-page-report .report-subsection-title{padding:2px 3px!important;margin:1px 0 2px!important;}
  .detailed-one-page-report .unified-report-table{font-size:5.9px!important;line-height:1!important;}
  .detailed-one-page-report .unified-report-table th,.detailed-one-page-report .unified-report-table td{padding:1px 1.5px!important;}
  .detailed-one-page-report .mini-address{font-size:5.8px!important;line-height:1!important;}
  .detailed-one-page-report .mini-address b{font-size:5px!important;min-width:13px!important;}
  .detailed-one-page-report .report-signature{font-size:6.2px!important;margin-top:3px!important;padding-top:3px!important;}
  .detailed-one-page-report .compact-footer-line{font-size:6.2px!important;margin-top:3px!important;padding-top:2px!important;}
  .detailed-one-page-report .compact-footer-line img{width:11px!important;height:11px!important;}
}

/* Report range selector modal: keeps main screen clean */
.report-range-card{max-width:520px;padding:18px;}
.compact-title{margin-bottom:8px;}
.compact-copy{margin:0 0 12px;color:#64748b;font-size:.9rem;}
.report-range-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:10px 0 16px;}
.report-range-grid label{display:flex;flex-direction:column;gap:6px;font-size:.82rem;font-weight:700;color:#334155;}
.report-range-grid input,.report-range-grid select{width:100%;min-height:40px;border:1px solid #d8e0ea;border-radius:10px;padding:8px 10px;background:#fff;color:#0f172a;}
@media(max-width:640px){.report-range-grid{grid-template-columns:1fr}.report-range-card{width:min(94vw,520px);padding:16px}}
@media print{#reportRangeModal{display:none!important}}


/* === First-load saved/restored notification readability fix only === */
#messageModal:not(.hidden){
  background: rgba(15,23,42,.18) !important;
  place-items: start center !important;
  padding-top: 18px !important;
  z-index: 9999 !important;
}
#messageModal .message-card{
  width: min(420px, calc(100vw - 24px)) !important;
  max-width: 420px !important;
  background: #ffffff !important;
  color: #111827 !important;
  border: 1px solid #dbe3ea !important;
  border-left: 5px solid #16a34a !important;
  box-shadow: 0 18px 45px rgba(15,23,42,.22) !important;
  padding: 14px 16px !important;
  border-radius: 10px !important;
  display: grid !important;
  grid-template-columns: 36px 1fr !important;
  gap: 10px 12px !important;
  align-items: center !important;
  text-align: left !important;
}
#messageModal .message-icon{
  width: 34px !important;
  height: 34px !important;
  border-radius: 999px !important;
  display: inline-grid !important;
  place-items: center !important;
  background: #dcfce7 !important;
  color: #166534 !important;
  border: 1px solid #86efac !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  margin: 0 !important;
}
#messageModal #messageTitle{
  color: #0f172a !important;
  font-size: 15px !important;
  line-height: 1.15 !important;
  margin: 0 0 3px !important;
  font-weight: 900 !important;
}
#messageModal #messageText{
  color: #334155 !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
  margin: 0 !important;
  font-weight: 600 !important;
}
#messageModal .message-actions{
  grid-column: 1 / -1 !important;
  margin-top: 4px !important;
  display: flex !important;
  justify-content: flex-end !important;
}
#messageModal .message-actions button{
  min-height: 30px !important;
  padding: 5px 12px !important;
  font-size: 12px !important;
  border-radius: 6px !important;
  background: #0f766e !important;
  color: #fff !important;
}
#messageModal .message-card.error{
  border-left-color: #f59e0b !important;
}
#messageModal .message-card.error .message-icon{
  background: #fef3c7 !important;
  color: #92400e !important;
  border-color: #fde68a !important;
}
@media(max-width:640px){
  #messageModal:not(.hidden){padding: 12px !important; align-items: start !important;}
  #messageModal .message-card{width: 100% !important; border-radius: 9px !important;}
}

/* === FINAL FIX: readable saved/restored popup + new app logo sizing === */
.brand img,
.report-brand img,
#reportLogoPreview,
.app-logo,
.logo-preview img{
  object-fit: contain !important;
}
#messageModal:not(.hidden){
  display: grid !important;
  place-items: center !important;
  align-items: center !important;
  justify-items: center !important;
  padding: 16px !important;
  background: rgba(15,23,42,.28) !important;
  z-index: 99999 !important;
}
#messageModal .message-card{
  width: min(440px, calc(100vw - 28px)) !important;
  max-width: 440px !important;
  min-width: 300px !important;
  background: #fff !important;
  color: #0f172a !important;
  border: 1px solid #dbe3ea !important;
  border-left: 5px solid #22c55e !important;
  border-top: 0 !important;
  border-radius: 12px !important;
  box-shadow: 0 22px 60px rgba(15,23,42,.28) !important;
  padding: 16px !important;
  display: grid !important;
  grid-template-columns: 40px minmax(0,1fr) !important;
  grid-template-areas:
    "icon title"
    "icon text"
    "actions actions" !important;
  column-gap: 12px !important;
  row-gap: 4px !important;
  align-items: start !important;
  text-align: left !important;
}
#messageModal .message-icon{
  grid-area: icon !important;
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  border-radius: 999px !important;
  display: grid !important;
  place-items: center !important;
  background: #dcfce7 !important;
  color: #15803d !important;
  border: 1px solid #86efac !important;
  font-size: 20px !important;
  font-weight: 900 !important;
  margin: 0 !important;
}
#messageModal #messageTitle{
  grid-area: title !important;
  margin: 1px 0 2px !important;
  color: #0f172a !important;
  font-size: 16px !important;
  line-height: 1.25 !important;
  font-weight: 900 !important;
  white-space: normal !important;
  word-break: normal !important;
}
#messageModal #messageText{
  grid-area: text !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  color: #334155 !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
  font-weight: 600 !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
}
#messageModal .message-actions{
  grid-area: actions !important;
  margin-top: 12px !important;
  display: flex !important;
  justify-content: flex-end !important;
  width: 100% !important;
}
#messageModal .message-actions button{
  min-width: 84px !important;
  min-height: 34px !important;
  padding: 7px 16px !important;
  border-radius: 7px !important;
  background: #0f766e !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}
#messageModal .message-card.error,
#messageModal .message-card.warning{
  border-left-color: #f59e0b !important;
}
#messageModal .message-card.error .message-icon,
#messageModal .message-card.warning .message-icon{
  background: #fef3c7 !important;
  color: #92400e !important;
  border-color: #fde68a !important;
}
@media(max-width:480px){
  #messageModal:not(.hidden){padding: 10px !important;}
  #messageModal .message-card{
    width: calc(100vw - 20px) !important;
    min-width: 0 !important;
    padding: 14px !important;
    grid-template-columns: 36px minmax(0,1fr) !important;
    column-gap: 10px !important;
  }
  #messageModal .message-icon{width:34px!important;height:34px!important;min-width:34px!important;font-size:18px!important;}
  #messageModal #messageTitle{font-size:15px!important;}
  #messageModal #messageText{font-size:13px!important;line-height:1.4!important;}
}


/* === Report Date Range Modal UX/UI polish - fixed header overlap === */
#reportRangeModal{
  padding:16px !important;
  align-items:center !important;
  justify-items:center !important;
}
#reportRangeModal .report-range-card{
  width:min(94vw,560px) !important;
  max-width:560px !important;
  padding:0 !important;
  border-radius:14px !important;
  overflow:hidden !important;
  box-shadow:0 24px 70px rgba(15,23,42,.28) !important;
  border:1px solid #dbe5ef !important;
}
#reportRangeModal .compact-title{
  display:grid !important;
  grid-template-columns:1fr 36px !important;
  align-items:start !important;
  gap:12px !important;
  padding:18px 20px 12px !important;
  margin:0 !important;
  border-bottom:1px solid #e5edf5 !important;
}
#reportRangeModal #reportRangeTitle{
  display:block !important;
  font-size:20px !important;
  line-height:1.18 !important;
  font-weight:900 !important;
  color:#0f172a !important;
  white-space:normal !important;
  max-width:100% !important;
  overflow:visible !important;
}
#reportRangeModal .modal-x{
  width:34px !important;
  height:34px !important;
  min-width:34px !important;
  padding:0 !important;
  display:inline-grid !important;
  place-items:center !important;
  border:1px solid #dbe5ef !important;
  border-radius:10px !important;
  background:#f8fafc !important;
  color:#334155 !important;
  font-size:22px !important;
  line-height:1 !important;
  font-weight:800 !important;
  cursor:pointer !important;
}
#reportRangeModal .modal-x:hover{background:#eef6ff !important;color:#0f766e !important;}
#reportRangeModal .compact-copy{
  margin:0 !important;
  padding:12px 20px 2px !important;
  color:#475569 !important;
  font-size:14px !important;
  line-height:1.45 !important;
}
#reportRangeModal .report-range-grid{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:14px !important;
  padding:14px 20px 16px !important;
  margin:0 !important;
}
#reportRangeModal .report-range-grid label{
  display:flex !important;
  flex-direction:column !important;
  gap:7px !important;
  color:#1f2937 !important;
  font-size:13px !important;
  font-weight:800 !important;
}
#reportRangeModal .report-range-grid input,
#reportRangeModal .report-range-grid select{
  width:100% !important;
  min-height:44px !important;
  border:1px solid #d6e0ea !important;
  border-radius:11px !important;
  padding:9px 12px !important;
  background:#fff !important;
  color:#0f172a !important;
  font-size:14px !important;
  box-sizing:border-box !important;
}
#reportRangeModal .message-actions.two{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:10px !important;
  padding:14px 20px 18px !important;
  margin:0 !important;
  border-top:1px solid #edf2f7 !important;
  background:#fbfdff !important;
}
#reportRangeModal .message-actions.two button{
  min-height:44px !important;
  border-radius:10px !important;
  font-weight:900 !important;
  font-size:14px !important;
  width:100% !important;
}
@media(max-width:520px){
  #reportRangeModal{padding:10px !important;align-items:center !important;}
  #reportRangeModal .report-range-card{width:100% !important;border-radius:12px !important;}
  #reportRangeModal .compact-title{grid-template-columns:1fr 34px !important;padding:16px 16px 10px !important;}
  #reportRangeModal #reportRangeTitle{font-size:18px !important;}
  #reportRangeModal .compact-copy{padding:10px 16px 0 !important;font-size:13px !important;}
  #reportRangeModal .report-range-grid{grid-template-columns:1fr !important;gap:11px !important;padding:12px 16px 14px !important;}
  #reportRangeModal .message-actions.two{grid-template-columns:1fr !important;padding:12px 16px 16px !important;}
}



/* === FINAL FIX: Report Range Modal UX - screenshot overlap fix === */
#reportRangeModal.modal:not(.hidden){
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:18px !important;
  overflow:auto !important;
}

#reportRangeModal .report-range-card{
  width:min(92vw, 560px) !important;
  max-width:560px !important;
  min-width:0 !important;
  padding:0 !important;
  border-radius:14px !important;
  overflow:hidden !important;
  background:#ffffff !important;
  border:1px solid #d9e3ee !important;
  box-shadow:0 22px 60px rgba(15,23,42,.26) !important;
  display:block !important;
  text-align:left !important;
}

#reportRangeModal .report-range-header{
  display:flex !important;
  align-items:flex-start !important;
  justify-content:space-between !important;
  gap:14px !important;
  padding:18px 20px 14px !important;
  margin:0 !important;
  border-bottom:1px solid #e6edf5 !important;
  background:linear-gradient(180deg,#ffffff,#f8fbff) !important;
  min-width:0 !important;
}

#reportRangeModal .report-range-title-wrap{
  min-width:0 !important;
  flex:1 1 auto !important;
}

#reportRangeModal #reportRangeTitle{
  display:block !important;
  margin:0 !important;
  padding:0 !important;
  font-size:20px !important;
  line-height:1.2 !important;
  font-weight:900 !important;
  color:#0f172a !important;
  letter-spacing:-.02em !important;
  white-space:normal !important;
  overflow-wrap:normal !important;
  word-break:normal !important;
}

#reportRangeModal .report-range-subtitle{
  margin:5px 0 0 !important;
  padding:0 !important;
  color:#64748b !important;
  font-size:13px !important;
  line-height:1.35 !important;
  font-weight:500 !important;
  max-width:420px !important;
}

#reportRangeModal .compact-title,
#reportRangeModal .section-title.compact-title{
  display:none !important;
}

#reportRangeModal .compact-copy{
  display:none !important;
}

#reportRangeModal .modal-x{
  position:static !important;
  flex:0 0 34px !important;
  width:34px !important;
  height:34px !important;
  min-width:34px !important;
  max-width:34px !important;
  min-height:34px !important;
  padding:0 !important;
  margin:0 !important;
  display:grid !important;
  place-items:center !important;
  border:1px solid #d8e3ee !important;
  border-radius:10px !important;
  background:#ffffff !important;
  color:#334155 !important;
  font-size:22px !important;
  font-weight:800 !important;
  line-height:1 !important;
  box-shadow:0 2px 8px rgba(15,23,42,.06) !important;
}

#reportRangeModal .modal-x:hover{
  background:#eef6ff !important;
  color:#0f766e !important;
}

#reportRangeModal .report-range-grid{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:14px !important;
  margin:0 !important;
  padding:16px 20px 18px !important;
}

#reportRangeModal .report-range-grid label{
  display:flex !important;
  flex-direction:column !important;
  gap:7px !important;
  min-width:0 !important;
  color:#334155 !important;
  font-size:13px !important;
  font-weight:800 !important;
}

#reportRangeModal .report-range-grid input,
#reportRangeModal .report-range-grid select{
  width:100% !important;
  min-width:0 !important;
  height:44px !important;
  min-height:44px !important;
  border:1px solid #d4deea !important;
  border-radius:11px !important;
  padding:9px 12px !important;
  background:#ffffff !important;
  color:#0f172a !important;
  font-size:14px !important;
  font-weight:650 !important;
  box-sizing:border-box !important;
}

#reportRangeModal .message-actions.two{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:10px !important;
  padding:14px 20px 18px !important;
  margin:0 !important;
  border-top:1px solid #edf2f7 !important;
  background:#fbfdff !important;
}

#reportRangeModal .message-actions.two button{
  width:100% !important;
  min-height:44px !important;
  border-radius:10px !important;
  font-size:14px !important;
  font-weight:900 !important;
  padding:10px 12px !important;
}

#reportRangeModal #cancelReportRangeBtn{
  background:#ffffff !important;
  border:1px solid #d4deea !important;
  color:#0f172a !important;
}

#reportRangeModal #generateRangeReportBtn{
  background:#0f766e !important;
  color:#ffffff !important;
  border:1px solid #0f766e !important;
}

@media (max-width:520px){
  #reportRangeModal.modal:not(.hidden){
    padding:10px !important;
    align-items:center !important;
  }
  #reportRangeModal .report-range-card{
    width:100% !important;
    max-width:100% !important;
    border-radius:12px !important;
  }
  #reportRangeModal .report-range-header{
    padding:16px 16px 12px !important;
    gap:12px !important;
  }
  #reportRangeModal #reportRangeTitle{
    font-size:18px !important;
  }
  #reportRangeModal .report-range-subtitle{
    font-size:12.5px !important;
    line-height:1.35 !important;
  }
  #reportRangeModal .modal-x{
    flex-basis:32px !important;
    width:32px !important;
    height:32px !important;
    min-width:32px !important;
    min-height:32px !important;
    font-size:20px !important;
  }
  #reportRangeModal .report-range-grid{
    grid-template-columns:1fr !important;
    gap:11px !important;
    padding:14px 16px 16px !important;
  }
  #reportRangeModal .message-actions.two{
    grid-template-columns:1fr 1fr !important;
    padding:12px 16px 16px !important;
  }
  #reportRangeModal .message-actions.two button{
    min-height:42px !important;
    font-size:13px !important;
  }
}

@media (max-width:360px){
  #reportRangeModal .message-actions.two{
    grid-template-columns:1fr !important;
  }
}



/* === FINAL: Detailed one-page report + larger logo + per-shift pay === */
.work-report.detailed-one-page-report{
  max-width: 1040px !important;
  margin: 0 auto !important;
  padding: 14px !important;
  font-size: 12px !important;
  line-height: 1.28 !important;
  color: #0f172a !important;
}

.work-report.detailed-one-page-report .professional-report-head{
  display:grid !important;
  grid-template-columns: 1.05fr 1.35fr !important;
  gap:12px !important;
  align-items:center !important;
  padding:12px 14px !important;
  border-radius:14px !important;
  border:1px solid #dbe5ef !important;
  background:linear-gradient(180deg,#ffffff,#f8fbff) !important;
}

.work-report.detailed-one-page-report .report-brand{
  display:flex !important;
  align-items:center !important;
  gap:12px !important;
  min-width:0 !important;
}

.work-report.detailed-one-page-report .report-brand img{
  width:74px !important;
  height:74px !important;
  min-width:74px !important;
  object-fit:contain !important;
  border-radius:14px !important;
  border:1px solid #e2e8f0 !important;
  background:#fff !important;
  padding:4px !important;
}

.work-report.detailed-one-page-report .report-brand h2{
  margin:0 0 3px !important;
  font-size:22px !important;
  line-height:1.05 !important;
  font-weight:900 !important;
  letter-spacing:-.03em !important;
}

.work-report.detailed-one-page-report .report-brand p{
  margin:1px 0 !important;
  color:#475569 !important;
  font-size:11.5px !important;
}

.work-report.detailed-one-page-report .report-meta{
  columns:2 !important;
  column-gap:18px !important;
  font-size:11.3px !important;
  line-height:1.3 !important;
  color:#334155 !important;
  overflow-wrap:anywhere !important;
}

.work-report.detailed-one-page-report .report-section{
  margin-top:8px !important;
  padding:10px !important;
  border-radius:12px !important;
  border:1px solid #e1e8f0 !important;
  background:#fff !important;
}

.work-report.detailed-one-page-report .combined-total-card,
.work-report.detailed-one-page-report .report-info{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:8px !important;
}

.work-report.detailed-one-page-report .combined-total-card > div,
.work-report.detailed-one-page-report .report-info > div{
  padding:8px 9px !important;
  border-radius:10px !important;
  background:#f8fafc !important;
  border:1px solid #e5edf5 !important;
  min-width:0 !important;
}

.work-report.detailed-one-page-report .combined-total-card span,
.work-report.detailed-one-page-report .report-info span{
  display:block !important;
  font-size:10.3px !important;
  color:#64748b !important;
  font-weight:800 !important;
  text-transform:uppercase !important;
  letter-spacing:.02em !important;
}

.work-report.detailed-one-page-report .combined-total-card strong,
.work-report.detailed-one-page-report .report-info strong{
  display:block !important;
  margin-top:2px !important;
  font-size:15px !important;
  color:#0f172a !important;
}

.work-report.detailed-one-page-report .report-info small,
.work-report.detailed-one-page-report .combined-total-card small{
  display:block !important;
  margin-top:1px !important;
  font-size:10px !important;
  color:#64748b !important;
}

.work-report.detailed-one-page-report .shift-detail-block h3,
.work-report.detailed-one-page-report .final-combined-summary h3{
  margin:0 0 4px !important;
  font-size:15px !important;
  line-height:1.1 !important;
}

.work-report.detailed-one-page-report .one-page-period-line{
  margin:0 0 8px !important;
  font-size:11px !important;
  color:#475569 !important;
}

.work-report.detailed-one-page-report .unified-report-title{
  display:flex !important;
  justify-content:space-between !important;
  align-items:center !important;
  gap:8px !important;
  margin-bottom:6px !important;
  font-size:12px !important;
}

.work-report.detailed-one-page-report .unified-report-title span{
  font-weight:900 !important;
}

.work-report.detailed-one-page-report .unified-report-title small{
  color:#475569 !important;
  font-weight:700 !important;
  text-align:right !important;
}

.work-report.detailed-one-page-report .report-table-wrap{
  width:100% !important;
  overflow:hidden !important;
  border:1px solid #dfe7f0 !important;
  border-radius:10px !important;
}

.work-report.detailed-one-page-report .clean-report-table{
  width:100% !important;
  table-layout:fixed !important;
  border-collapse:collapse !important;
  font-size:10.8px !important;
}

.work-report.detailed-one-page-report .clean-report-table th,
.work-report.detailed-one-page-report .clean-report-table td{
  padding:5px 5px !important;
  vertical-align:top !important;
  border-bottom:1px solid #edf2f7 !important;
  overflow-wrap:anywhere !important;
  word-break:normal !important;
}

.work-report.detailed-one-page-report .clean-report-table th{
  background:#f1f5f9 !important;
  color:#334155 !important;
  font-size:10px !important;
  text-transform:uppercase !important;
  letter-spacing:.02em !important;
  white-space:nowrap !important;
}

.work-report.detailed-one-page-report .unified-report-table th:nth-child(1),
.work-report.detailed-one-page-report .unified-report-table td:nth-child(1){ width:28px !important; text-align:center !important; }
.work-report.detailed-one-page-report .unified-report-table th:nth-child(2),
.work-report.detailed-one-page-report .unified-report-table td:nth-child(2){ width:55px !important; }
.work-report.detailed-one-page-report .unified-report-table th:nth-child(3),
.work-report.detailed-one-page-report .unified-report-table td:nth-child(3){ width:78px !important; }
.work-report.detailed-one-page-report .unified-report-table th:nth-child(4),
.work-report.detailed-one-page-report .unified-report-table td:nth-child(4){ width:108px !important; }
.work-report.detailed-one-page-report .unified-report-table th:nth-child(5),
.work-report.detailed-one-page-report .unified-report-table td:nth-child(5){ width:auto !important; }
.work-report.detailed-one-page-report .unified-report-table th:nth-child(6),
.work-report.detailed-one-page-report .unified-report-table td:nth-child(6){ width:58px !important; }
.work-report.detailed-one-page-report .unified-report-table th:nth-child(7),
.work-report.detailed-one-page-report .unified-report-table td:nth-child(7){ width:68px !important; }
.work-report.detailed-one-page-report .unified-report-table th:nth-child(8),
.work-report.detailed-one-page-report .unified-report-table td:nth-child(8){ width:62px !important; }
.work-report.detailed-one-page-report .unified-report-table th:nth-child(9),
.work-report.detailed-one-page-report .unified-report-table td:nth-child(9){ width:82px !important; }
.work-report.detailed-one-page-report .unified-report-table th:nth-child(10),
.work-report.detailed-one-page-report .unified-report-table td:nth-child(10){ width:54px !important; }

.work-report.detailed-one-page-report .time-pay-cell{
  display:flex !important;
  flex-direction:column !important;
  gap:2px !important;
  line-height:1.15 !important;
  white-space:normal !important;
}

.work-report.detailed-one-page-report .time-pay-cell strong{
  display:inline-block !important;
  width:max-content !important;
  max-width:100% !important;
  padding:2px 6px !important;
  border-radius:999px !important;
  background:#ecfdf5 !important;
  border:1px solid #bbf7d0 !important;
  color:#047857 !important;
  font-size:10.4px !important;
  font-weight:900 !important;
}

.work-report.detailed-one-page-report .mini-address{
  line-height:1.18 !important;
  margin:0 !important;
  color:#334155 !important;
}

.work-report.detailed-one-page-report .mini-address b{
  color:#0f766e !important;
  font-size:10px !important;
}

.work-report.detailed-one-page-report .gps-status-badge,
.work-report.detailed-one-page-report .ok-badge,
.work-report.detailed-one-page-report .type-pill,
.work-report.detailed-one-page-report .strike-badge,
.work-report.detailed-one-page-report .edit-badge{
  display:inline-flex !important;
  align-items:center !important;
  max-width:100% !important;
  padding:2px 6px !important;
  border-radius:999px !important;
  font-size:9.8px !important;
  line-height:1.15 !important;
  font-weight:900 !important;
  white-space:nowrap !important;
  margin:1px 2px 1px 0 !important;
}

.work-report.detailed-one-page-report .gps-badge-out{
  background:#fff1f2 !important;
  color:#be123c !important;
  border:1px solid #fecdd3 !important;
}

.work-report.detailed-one-page-report .gps-badge-in{
  background:#fffbeb !important;
  color:#b45309 !important;
  border:1px solid #fde68a !important;
}

.work-report.detailed-one-page-report .ok-badge{
  background:#ecfdf5 !important;
  color:#047857 !important;
  border:1px solid #bbf7d0 !important;
}

.work-report.detailed-one-page-report .compact-user-note{
  display:block !important;
  margin-top:2px !important;
  color:#64748b !important;
  font-size:9.6px !important;
  line-height:1.15 !important;
}

.work-report.detailed-one-page-report .map-cell,
.work-report.detailed-one-page-report .map-mini{
  white-space:nowrap !important;
  font-size:10px !important;
}

.work-report.detailed-one-page-report .manual-edit-details{
  margin-top:6px !important;
  font-size:11px !important;
}

.work-report.detailed-one-page-report .report-signature{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:12px !important;
  margin-top:8px !important;
  font-size:11px !important;
}

.work-report.detailed-one-page-report .report-footer-branded{
  margin-top:8px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:8px !important;
  text-align:center !important;
  white-space:nowrap !important;
  font-size:10.5px !important;
  color:#475569 !important;
}

.work-report.detailed-one-page-report .report-footer-branded img{
  width:28px !important;
  height:28px !important;
  object-fit:contain !important;
}

@media print{
  @page{ size: letter portrait; margin: .28in; }
  body{ background:#fff !important; }
  .work-report.detailed-one-page-report{
    max-width:none !important;
    padding:0 !important;
    font-size:10.2px !important;
    transform-origin:top center !important;
  }
  .work-report.detailed-one-page-report .report-section{ margin-top:5px !important; padding:7px !important; }
  .work-report.detailed-one-page-report .professional-report-head{ padding:8px 10px !important; }
  .work-report.detailed-one-page-report .report-brand img{ width:58px !important; height:58px !important; min-width:58px !important; }
  .work-report.detailed-one-page-report .report-brand h2{ font-size:18px !important; }
  .work-report.detailed-one-page-report .clean-report-table{ font-size:8.8px !important; }
  .work-report.detailed-one-page-report .clean-report-table th,
  .work-report.detailed-one-page-report .clean-report-table td{ padding:3px 3px !important; }
  .work-report.detailed-one-page-report .combined-total-card,
  .work-report.detailed-one-page-report .report-info{ gap:5px !important; }
  .work-report.detailed-one-page-report .combined-total-card > div,
  .work-report.detailed-one-page-report .report-info > div{ padding:5px 6px !important; }
  .work-report.detailed-one-page-report .manual-edit-details{ display:none !important; }
  .work-report.detailed-one-page-report .report-footer-branded{ font-size:9px !important; margin-top:5px !important; }
}

@media (max-width:720px){
  .work-report.detailed-one-page-report .professional-report-head,
  .work-report.detailed-one-page-report .combined-total-card,
  .work-report.detailed-one-page-report .report-info{
    grid-template-columns:1fr 1fr !important;
  }
  .work-report.detailed-one-page-report .report-meta{
    columns:1 !important;
  }
  .work-report.detailed-one-page-report .report-table-wrap{
    overflow-x:auto !important;
  }
  .work-report.detailed-one-page-report .clean-report-table{
    min-width:780px !important;
  }
}


/* === FINAL HEADER + SHIFT HISTORY AMOUNT FIX === */
.work-report .report-dash-title{
  margin:0 0 4px !important;
  font-size:20px !important;
  line-height:1.1 !important;
  font-weight:900 !important;
  letter-spacing:-.02em !important;
  white-space:nowrap !important;
  color:#0f172a !important;
}

.shift-summary{
  gap:10px !important;
}

.history-shift-pay{
  margin-left:auto !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:4px 10px !important;
  border-radius:999px !important;
  background:#ecfdf5 !important;
  border:1px solid #bbf7d0 !important;
  color:#047857 !important;
  font-weight:900 !important;
  font-size:13px !important;
  white-space:nowrap !important;
}

.history-detail-pay{
  color:#047857 !important;
  font-weight:900 !important;
}

.manual-shift-card{
  grid-template-columns:minmax(0,1.4fr) auto auto auto !important;
  align-items:center !important;
}

.manual-shift-amount{
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-end !important;
  gap:2px !important;
}

.manual-shift-amount strong{
  color:#047857 !important;
  font-weight:900 !important;
}

.manual-shift-amount span{
  color:#64748b !important;
  font-size:11px !important;
}

.manual-shift-card.is-struck .manual-shift-amount strong{
  color:#94a3b8 !important;
  text-decoration:line-through !important;
}

@media (max-width:640px){
  .shift-summary{
    display:grid !important;
    grid-template-columns:1fr auto !important;
  }
  .shift-summary .view-details{
    grid-column:1 / -1 !important;
    justify-self:start !important;
  }
  .manual-shift-card{
    grid-template-columns:1fr !important;
  }
  .manual-shift-amount{
    align-items:flex-start !important;
  }
  .work-report .report-dash-title{
    white-space:normal !important;
    font-size:17px !important;
  }
}


/* === FINAL CLEAN FIX: report and shift history after user review === */
.work-report .report-title-clean{
  margin:0 0 4px !important;
  font-size:24px !important;
  line-height:1.05 !important;
  font-weight:900 !important;
  letter-spacing:-.03em !important;
  color:#0f172a !important;
}

.work-report .report-dash-title{ display:none !important; }

.work-report.detailed-one-page-report .professional-report-head{
  display:grid !important;
  grid-template-columns: 300px 1fr !important;
  gap:14px !important;
  align-items:center !important;
}

.work-report.detailed-one-page-report .report-brand img{
  width:78px !important;
  height:78px !important;
  min-width:78px !important;
}

.report-meta-clean{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:7px 12px !important;
  columns:auto !important;
  column-gap:0 !important;
  font-size:11px !important;
  line-height:1.2 !important;
}

.report-meta-clean div{
  padding:6px 8px !important;
  border:1px solid #e6edf5 !important;
  border-radius:8px !important;
  background:#f8fafc !important;
  min-width:0 !important;
}

.report-meta-clean span{
  display:block !important;
  font-size:9.5px !important;
  color:#64748b !important;
  font-weight:900 !important;
  text-transform:uppercase !important;
  letter-spacing:.03em !important;
  margin-bottom:2px !important;
}

.report-meta-clean strong{
  display:block !important;
  color:#0f172a !important;
  font-size:11px !important;
  font-weight:750 !important;
  overflow-wrap:anywhere !important;
}

.work-report.detailed-one-page-report .time-pay-cell strong{
  display:none !important;
}

.work-report.detailed-one-page-report .report-footer-branded,
.report-footer-branded.compact-footer-line{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:8px !important;
  margin:8px auto 0 !important;
  padding:6px 0 0 !important;
  border-top:1px solid #e6edf5 !important;
  text-align:center !important;
  white-space:nowrap !important;
  color:#475569 !important;
  font-size:10.5px !important;
  line-height:1.1 !important;
}

.work-report.detailed-one-page-report .report-footer-branded img,
.report-footer-branded.compact-footer-line img{
  width:24px !important;
  height:24px !important;
  object-fit:contain !important;
}

.work-report.detailed-one-page-report .clean-report-table{
  table-layout:fixed !important;
}

.work-report.detailed-one-page-report .clean-report-table th,
.work-report.detailed-one-page-report .clean-report-table td{
  overflow-wrap:anywhere !important;
  line-height:1.18 !important;
}

.work-report.detailed-one-page-report .unified-report-table td:nth-child(4){
  white-space:normal !important;
}

.work-report.detailed-one-page-report .mini-address{
  max-height:2.5em !important;
  overflow:hidden !important;
}

.gps-mini-chip{
  background:#fff7ed !important;
  color:#c2410c !important;
  border:1px solid #fed7aa !important;
  font-size:11px !important;
  padding:3px 8px !important;
  border-radius:999px !important;
}

.history-shift-pay{
  margin-left:auto !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:4px 10px !important;
  border-radius:999px !important;
  background:#ecfdf5 !important;
  border:1px solid #bbf7d0 !important;
  color:#047857 !important;
  font-weight:900 !important;
  font-size:13px !important;
  white-space:nowrap !important;
}

.history-detail-pay{
  color:#047857 !important;
  font-weight:900 !important;
}

.manual-shift-card{
  display:grid !important;
  grid-template-columns:minmax(0,1.4fr) auto auto auto !important;
  gap:10px !important;
  align-items:center !important;
}

.manual-shift-amount{
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-end !important;
  gap:2px !important;
}

.manual-shift-amount strong{
  color:#047857 !important;
  font-weight:900 !important;
}

.manual-shift-amount span{
  color:#64748b !important;
  font-size:11px !important;
}

.manual-shift-card.is-struck .manual-shift-amount strong{
  color:#94a3b8 !important;
  text-decoration:line-through !important;
}

@media (max-width:760px){
  .work-report.detailed-one-page-report .professional-report-head{
    grid-template-columns:1fr !important;
  }
  .report-meta-clean{
    grid-template-columns:1fr !important;
  }
  .shift-summary{
    display:grid !important;
    grid-template-columns:1fr auto !important;
    gap:8px !important;
  }
  .shift-summary .view-details{
    grid-column:1 / -1 !important;
    justify-self:start !important;
  }
  .manual-shift-card{
    grid-template-columns:1fr !important;
  }
  .manual-shift-amount{
    align-items:flex-start !important;
  }
  .report-footer-branded.compact-footer-line{
    white-space:normal !important;
    flex-wrap:wrap !important;
  }
}

@media print{
  .work-report.detailed-one-page-report .report-brand img{
    width:58px !important;
    height:58px !important;
    min-width:58px !important;
  }
  .work-report .report-title-clean{
    font-size:19px !important;
  }
  .report-meta-clean{
    gap:4px 6px !important;
  }
  .report-meta-clean div{
    padding:4px 5px !important;
  }
  .report-meta-clean strong{
    font-size:9px !important;
  }
}



/* === REPORT READABILITY FIX === */
.work-report,
.work-report *{
  box-sizing:border-box !important;
}

.work-report.detailed-one-page-report{
  font-size:13px !important;
  line-height:1.45 !important;
  color:#111827 !important;
}

.work-report.detailed-one-page-report .clean-report-table{
  table-layout:auto !important;
  width:100% !important;
  border-collapse:collapse !important;
}

.work-report.detailed-one-page-report .clean-report-table th{
  font-size:11px !important;
  padding:8px 7px !important;
  white-space:nowrap !important;
  background:#f3f6fa !important;
}

.work-report.detailed-one-page-report .clean-report-table td{
  padding:9px 7px !important;
  vertical-align:top !important;
  overflow-wrap:break-word !important;
  word-break:normal !important;
  line-height:1.38 !important;
}

.work-report.detailed-one-page-report .mini-address{
  max-height:none !important;
  overflow:visible !important;
  white-space:normal !important;
  line-height:1.35 !important;
}

.work-report.detailed-one-page-report .report-table-wrap{
  overflow-x:auto !important;
  border-radius:12px !important;
}

.work-report.detailed-one-page-report .compact-notes-cell{
  min-width:110px !important;
  line-height:1.35 !important;
}

.work-report.detailed-one-page-report .gps-status-badge,
.work-report.detailed-one-page-report .ok-badge,
.work-report.detailed-one-page-report .type-pill{
  font-size:10.5px !important;
  padding:4px 8px !important;
}

.work-report.detailed-one-page-report .report-meta-clean strong{
  font-size:12px !important;
  line-height:1.35 !important;
}

.work-report.detailed-one-page-report .report-info strong,
.work-report.detailed-one-page-report .combined-total-card strong{
  font-size:16px !important;
}

.work-report.detailed-one-page-report .report-footer-branded{
  white-space:normal !important;
  text-align:center !important;
  line-height:1.4 !important;
}

@media (max-width:900px){
  .work-report.detailed-one-page-report .clean-report-table{
    min-width:920px !important;
  }
}



/* === TRUE ONE PAGE REPORT FIT === */
@media print{

  @page{
    size: letter portrait;
    margin: 0.22in;
  }

  body{
    background:#fff !important;
  }

  .work-report.detailed-one-page-report{
    max-width:none !important;
    width:100% !important;
    padding:0 !important;
    margin:0 auto !important;
    font-size:9.4px !important;
    line-height:1.16 !important;
    transform:scale(.965) !important;
    transform-origin:top center !important;
  }

  .work-report.detailed-one-page-report *{
    line-height:1.12 !important;
  }

  .work-report.detailed-one-page-report .professional-report-head{
    gap:8px !important;
    padding:6px 8px !important;
    margin-bottom:4px !important;
  }

  .work-report.detailed-one-page-report .report-brand{
    gap:8px !important;
  }

  .work-report.detailed-one-page-report .report-brand img{
    width:46px !important;
    height:46px !important;
    min-width:46px !important;
    border-radius:8px !important;
    padding:2px !important;
  }

  .work-report .report-title-clean{
    font-size:15px !important;
    margin:0 0 2px !important;
    line-height:1 !important;
  }

  .work-report.detailed-one-page-report .report-brand p{
    font-size:8.5px !important;
    margin:0 !important;
  }

  .report-meta-clean{
    gap:3px 5px !important;
  }

  .report-meta-clean div{
    padding:3px 4px !important;
    border-radius:6px !important;
  }

  .report-meta-clean span{
    font-size:7.5px !important;
    margin-bottom:1px !important;
  }

  .report-meta-clean strong{
    font-size:8px !important;
    line-height:1.08 !important;
  }

  .work-report.detailed-one-page-report .report-section{
    margin-top:4px !important;
    padding:5px !important;
    border-radius:8px !important;
  }

  .work-report.detailed-one-page-report .combined-total-card,
  .work-report.detailed-one-page-report .report-info{
    gap:4px !important;
  }

  .work-report.detailed-one-page-report .combined-total-card > div,
  .work-report.detailed-one-page-report .report-info > div{
    padding:4px 5px !important;
    border-radius:6px !important;
  }

  .work-report.detailed-one-page-report .combined-total-card span,
  .work-report.detailed-one-page-report .report-info span{
    font-size:7.2px !important;
  }

  .work-report.detailed-one-page-report .combined-total-card strong,
  .work-report.detailed-one-page-report .report-info strong{
    font-size:11px !important;
    margin-top:1px !important;
  }

  .work-report.detailed-one-page-report .combined-total-card small,
  .work-report.detailed-one-page-report .report-info small{
    font-size:6.9px !important;
    margin-top:0 !important;
  }

  .work-report.detailed-one-page-report .shift-detail-block h3,
  .work-report.detailed-one-page-report .final-combined-summary h3{
    font-size:11px !important;
    margin:0 0 2px !important;
  }

  .work-report.detailed-one-page-report .one-page-period-line{
    font-size:7.8px !important;
    margin:0 0 4px !important;
  }

  .work-report.detailed-one-page-report .unified-report-title{
    margin-bottom:3px !important;
    gap:5px !important;
  }

  .work-report.detailed-one-page-report .unified-report-title span{
    font-size:10px !important;
  }

  .work-report.detailed-one-page-report .unified-report-title small{
    font-size:7.5px !important;
  }

  .work-report.detailed-one-page-report .report-table-wrap{
    border-radius:7px !important;
  }

  .work-report.detailed-one-page-report .clean-report-table{
    font-size:7.4px !important;
    min-width:unset !important;
  }

  .work-report.detailed-one-page-report .clean-report-table th{
    padding:2px 2px !important;
    font-size:6.8px !important;
    line-height:1 !important;
  }

  .work-report.detailed-one-page-report .clean-report-table td{
    padding:2px 2px !important;
    line-height:1.03 !important;
  }

  .work-report.detailed-one-page-report .mini-address{
    line-height:1.02 !important;
  }

  .work-report.detailed-one-page-report .mini-address b{
    font-size:6.9px !important;
  }

  .work-report.detailed-one-page-report .gps-status-badge,
  .work-report.detailed-one-page-report .ok-badge,
  .work-report.detailed-one-page-report .type-pill,
  .gps-mini-chip{
    font-size:6.7px !important;
    padding:1px 4px !important;
    border-radius:999px !important;
  }

  .work-report.detailed-one-page-report .report-signature{
    margin-top:4px !important;
    gap:6px !important;
    font-size:7.5px !important;
  }

  .work-report.detailed-one-page-report .report-footer-branded{
    margin-top:4px !important;
    padding-top:4px !important;
    gap:4px !important;
    font-size:7.2px !important;
    line-height:1.05 !important;
    white-space:nowrap !important;
  }

  .work-report.detailed-one-page-report .report-footer-branded img{
    width:14px !important;
    height:14px !important;
  }

  .manual-edit-details{
    display:none !important;
  }

  .compact-user-note{
    display:none !important;
  }

  .work-report.detailed-one-page-report .clean-report-table tr{
    page-break-inside:avoid !important;
  }

  .work-report.detailed-one-page-report{
    overflow:hidden !important;
  }
}



/* === FINAL FIX: GPS modal readability + full report address === */

/* GPS failure modal: prevent skinny text column and overlap */
#gpsFailModal.modal:not(.hidden){
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:14px !important;
  overflow:auto !important;
}

#gpsFailModal .message-card,
#gpsFailModal .modal-card{
  width:min(94vw, 560px) !important;
  max-width:560px !important;
  min-width:320px !important;
  padding:0 !important;
  border-radius:14px !important;
  overflow:hidden !important;
  background:#ffffff !important;
  border:1px solid #d9e3ee !important;
  box-shadow:0 24px 60px rgba(15,23,42,.28) !important;
}

#gpsFailModal .message-card > .status-icon,
#gpsFailModal .message-card > h3,
#gpsFailModal .message-card > p,
#gpsFailModal .message-card > div,
#gpsFailModal .message-card > label,
#gpsFailModal .message-card > textarea,
#gpsFailModal .message-card > .message-actions{
  max-width:none !important;
}

#gpsFailModal .message-card{
  display:grid !important;
  grid-template-columns:42px 1fr !important;
  column-gap:12px !important;
  row-gap:10px !important;
  align-items:start !important;
  text-align:left !important;
}

#gpsFailModal .status-icon{
  grid-column:1 !important;
  grid-row:1 / span 2 !important;
  width:34px !important;
  height:34px !important;
  margin:16px 0 0 16px !important;
  display:grid !important;
  place-items:center !important;
  flex:none !important;
}

#gpsFailModal h3{
  grid-column:2 !important;
  margin:17px 18px 0 0 !important;
  padding:0 !important;
  font-size:18px !important;
  line-height:1.2 !important;
  font-weight:900 !important;
  color:#0f172a !important;
  white-space:normal !important;
}

#gpsFailModal p{
  grid-column:2 !important;
  margin:0 18px 0 0 !important;
  padding:0 !important;
  font-size:13px !important;
  line-height:1.45 !important;
  color:#475569 !important;
  max-width:100% !important;
  white-space:normal !important;
  word-break:normal !important;
  overflow-wrap:break-word !important;
}

#gpsFailModal #gpsFailSystemMessage,
#gpsFailModal .system-note,
#gpsFailModal .locked-system-message{
  grid-column:1 / -1 !important;
  margin:2px 16px 0 !important;
  padding:12px 14px !important;
  width:auto !important;
  max-width:none !important;
  border-radius:10px !important;
  background:#fff7ed !important;
  border:1px solid #fed7aa !important;
  color:#7c2d12 !important;
  font-size:13px !important;
  line-height:1.38 !important;
  white-space:normal !important;
  word-break:normal !important;
  overflow-wrap:break-word !important;
}

#gpsFailModal #gpsFailSystemMessage strong,
#gpsFailModal .system-note strong,
#gpsFailModal .locked-system-message strong{
  display:block !important;
  margin-bottom:4px !important;
  font-size:11px !important;
  letter-spacing:.08em !important;
  text-transform:uppercase !important;
  color:#9a3412 !important;
}

#gpsFailModal label{
  grid-column:1 / -1 !important;
  margin:2px 16px 0 !important;
  padding:0 !important;
  font-size:13px !important;
  line-height:1.25 !important;
  font-weight:800 !important;
  color:#475569 !important;
}

#gpsFailModal textarea,
#gpsFailModal #gpsFailNote{
  grid-column:1 / -1 !important;
  width:auto !important;
  max-width:none !important;
  min-width:0 !important;
  margin:0 16px !important;
  padding:11px 12px !important;
  border:1px solid #d4deea !important;
  border-radius:10px !important;
  min-height:82px !important;
  resize:vertical !important;
  font-size:14px !important;
  line-height:1.4 !important;
  color:#0f172a !important;
  box-sizing:border-box !important;
}

#gpsFailModal .message-actions{
  grid-column:1 / -1 !important;
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:10px !important;
  margin:2px 16px 16px !important;
  padding:0 !important;
}

#gpsFailModal .message-actions button{
  width:100% !important;
  min-height:42px !important;
  border-radius:9px !important;
  font-size:13px !important;
  font-weight:900 !important;
  padding:9px 12px !important;
}

@media (max-width:430px){
  #gpsFailModal .message-card{
    grid-template-columns:36px 1fr !important;
    column-gap:10px !important;
  }
  #gpsFailModal .status-icon{
    margin-left:12px !important;
  }
  #gpsFailModal h3{
    margin-right:12px !important;
    font-size:17px !important;
  }
  #gpsFailModal p{
    margin-right:12px !important;
    font-size:12.5px !important;
  }
  #gpsFailModal #gpsFailSystemMessage,
  #gpsFailModal .system-note,
  #gpsFailModal .locked-system-message,
  #gpsFailModal label,
  #gpsFailModal textarea,
  #gpsFailModal #gpsFailNote,
  #gpsFailModal .message-actions{
    margin-left:12px !important;
    margin-right:12px !important;
  }
}

/* Report: show full address cleanly instead of cutting with ellipsis */
.work-report.detailed-one-page-report .mini-address{
  max-height:none !important;
  overflow:visible !important;
  white-space:normal !important;
  line-height:1.28 !important;
}

.work-report.detailed-one-page-report .unified-report-table th:nth-child(5),
.work-report.detailed-one-page-report .unified-report-table td:nth-child(5){
  width:28% !important;
  min-width:220px !important;
}

.work-report.detailed-one-page-report .unified-report-table td:nth-child(5){
  font-size:10px !important;
  color:#334155 !important;
}

.work-report.detailed-one-page-report .report-table-wrap{
  overflow-x:auto !important;
}

/* Keep one-page print mode, but allow address to wrap/read */
@media print{
  .work-report.detailed-one-page-report .mini-address{
    max-height:none !important;
    overflow:visible !important;
    line-height:1.08 !important;
  }
  .work-report.detailed-one-page-report .unified-report-table th:nth-child(5),
  .work-report.detailed-one-page-report .unified-report-table td:nth-child(5){
    width:30% !important;
    min-width:0 !important;
  }
  .work-report.detailed-one-page-report .unified-report-table td:nth-child(5){
    font-size:7px !important;
  }
  .work-report.detailed-one-page-report .clean-report-table td{
    vertical-align:top !important;
  }
}


/* === Simple excluded label polish === */
.strike-badge{
  background:#f1f5f9 !important;
  color:#475569 !important;
  border:1px solid #cbd5e1 !important;
  font-weight:800 !important;
}

.manual-struck-row,
.manual-shift-card.is-struck{
  opacity:.88 !important;
}



/* === FINAL FIX: manual row overflow + print footer position === */
.work-report.detailed-one-page-report .report-table-wrap{
  width:100% !important;
  overflow-x:auto !important;
  overflow-y:visible !important;
}

.work-report.detailed-one-page-report .unified-report-table{
  width:100% !important;
  table-layout:fixed !important;
}

.work-report.detailed-one-page-report .unified-report-table th,
.work-report.detailed-one-page-report .unified-report-table td{
  box-sizing:border-box !important;
  max-width:100% !important;
  overflow-wrap:anywhere !important;
  word-break:break-word !important;
  white-space:normal !important;
}

/* Better column balance so manual notes stay inside border */
.work-report.detailed-one-page-report .unified-report-table th:nth-child(1),
.work-report.detailed-one-page-report .unified-report-table td:nth-child(1){ width:28px !important; }

.work-report.detailed-one-page-report .unified-report-table th:nth-child(2),
.work-report.detailed-one-page-report .unified-report-table td:nth-child(2){ width:52px !important; }

.work-report.detailed-one-page-report .unified-report-table th:nth-child(3),
.work-report.detailed-one-page-report .unified-report-table td:nth-child(3){ width:76px !important; }

.work-report.detailed-one-page-report .unified-report-table th:nth-child(4),
.work-report.detailed-one-page-report .unified-report-table td:nth-child(4){ width:100px !important; }

.work-report.detailed-one-page-report .unified-report-table th:nth-child(5),
.work-report.detailed-one-page-report .unified-report-table td:nth-child(5){ width:auto !important; min-width:0 !important; }

.work-report.detailed-one-page-report .unified-report-table th:nth-child(6),
.work-report.detailed-one-page-report .unified-report-table td:nth-child(6){ width:55px !important; }

.work-report.detailed-one-page-report .unified-report-table th:nth-child(7),
.work-report.detailed-one-page-report .unified-report-table td:nth-child(7){ width:62px !important; }

.work-report.detailed-one-page-report .unified-report-table th:nth-child(8),
.work-report.detailed-one-page-report .unified-report-table td:nth-child(8){ width:58px !important; }

.work-report.detailed-one-page-report .unified-report-table th:nth-child(9),
.work-report.detailed-one-page-report .unified-report-table td:nth-child(9){ width:72px !important; }

.work-report.detailed-one-page-report .unified-report-table th:nth-child(10),
.work-report.detailed-one-page-report .unified-report-table td:nth-child(10){ width:42px !important; text-align:center !important; }

/* Keep excluded/manual cells compact */
.work-report.detailed-one-page-report .manual-report-row td{
  vertical-align:middle !important;
}

.work-report.detailed-one-page-report .manual-report-row td:nth-child(6),
.work-report.detailed-one-page-report .manual-report-row td:nth-child(8),
.work-report.detailed-one-page-report .manual-report-row td:nth-child(9){
  line-height:1.15 !important;
  font-size:10px !important;
}

.work-report.detailed-one-page-report .manual-report-row small{
  display:inline !important;
  font-size:9px !important;
  line-height:1 !important;
  margin:0 !important;
}

.work-report.detailed-one-page-report .strike-badge,
.work-report.detailed-one-page-report .edit-badge{
  display:inline-flex !important;
  max-width:100% !important;
  padding:2px 5px !important;
  font-size:9px !important;
  line-height:1.05 !important;
  white-space:nowrap !important;
  margin:0 2px 2px 0 !important;
}

.work-report.detailed-one-page-report .compact-notes-cell{
  max-width:72px !important;
  overflow:hidden !important;
}

/* Footer: same centered place in screen and print */
.work-report.detailed-one-page-report{
  position:relative !important;
}

.work-report.detailed-one-page-report .report-footer-branded,
.work-report.detailed-one-page-report .compact-footer-line{
  width:100% !important;
  max-width:100% !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:6px !important;
  text-align:center !important;
  margin:8px auto 0 !important;
  padding:6px 0 0 !important;
  border-top:1px solid #e2e8f0 !important;
  white-space:nowrap !important;
  clear:both !important;
}

@media print{
  @page{
    size: letter portrait;
    margin: 0.22in;
  }

  html, body{
    width:100% !important;
    margin:0 !important;
    padding:0 !important;
    background:#fff !important;
  }

  .print-root{
    width:100% !important;
    margin:0 auto !important;
    padding:0 !important;
  }

  .work-report.detailed-one-page-report{
    width:100% !important;
    max-width:100% !important;
    min-height:auto !important;
    margin:0 auto !important;
    padding:0 !important;
    box-shadow:none !important;
    overflow:visible !important;
    page-break-after:avoid !important;
    transform:none !important;
    font-size:8.8px !important;
  }

  .work-report.detailed-one-page-report .report-section{
    margin-top:3px !important;
    padding:4px !important;
  }

  .work-report.detailed-one-page-report .clean-report-table{
    width:100% !important;
    table-layout:fixed !important;
    font-size:7.1px !important;
  }

  .work-report.detailed-one-page-report .clean-report-table th,
  .work-report.detailed-one-page-report .clean-report-table td{
    padding:1.8px 2px !important;
    line-height:1.02 !important;
    overflow-wrap:anywhere !important;
    word-break:break-word !important;
  }

  .work-report.detailed-one-page-report .manual-report-row td:nth-child(9){
    font-size:6.8px !important;
  }

  .work-report.detailed-one-page-report .strike-badge,
  .work-report.detailed-one-page-report .edit-badge,
  .work-report.detailed-one-page-report .gps-status-badge,
  .work-report.detailed-one-page-report .ok-badge,
  .work-report.detailed-one-page-report .type-pill{
    font-size:6.2px !important;
    padding:1px 3px !important;
    line-height:1 !important;
  }

  .work-report.detailed-one-page-report .report-signature{
    margin-top:4px !important;
    font-size:7.3px !important;
  }

  .work-report.detailed-one-page-report .report-footer-branded,
  .work-report.detailed-one-page-report .compact-footer-line{
    position:static !important;
    display:flex !important;
    justify-content:center !important;
    align-items:center !important;
    width:100% !important;
    margin:4px auto 0 !important;
    padding-top:3px !important;
    font-size:7px !important;
    line-height:1 !important;
    white-space:nowrap !important;
    page-break-inside:avoid !important;
  }

  .work-report.detailed-one-page-report .report-footer-branded img{
    width:12px !important;
    height:12px !important;
    flex:0 0 12px !important;
  }
}


/* === GPS fallback is modal-only === */
/* Hide manual GPS issue buttons from the main screen. */
#gpsFailPunchOutBtn,
#gpsFailPunchInBtn,
button[id*="gpsFailPunch"],
.gps-fallback-btn,
.gps-issue-main-btn{
  display:none !important;
}

/* Keep modal action buttons visible when GPS actually fails. */
#gpsFailModal button,
#gpsFailModal .message-actions button,
#gpsFailModal #confirmGpsFailPunchOutBtn,
#gpsFailModal #confirmGpsFailPunchInBtn,
#gpsFailModal #cancelGpsFailBtn{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
}

/* Make GPS fallback feel built-in, not like a separate feature button. */
#gpsFailModal .message-actions{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
}


/* === Body UX fix: no visible strikethrough in main app body === */
/* Keep excluded/not-counted logic, but make body cards readable and not crossed out. */
.manual-shift-list .is-struck,
.manual-shift-list .excluded-from-total,
.manual-shift-card.is-struck,
.manual-shift-card.excluded-from-total{
  text-decoration:none !important;
}

.manual-shift-list .is-struck *,
.manual-shift-list .excluded-from-total *,
.manual-shift-card.is-struck *,
.manual-shift-card.excluded-from-total *{
  text-decoration:none !important;
}

.manual-shift-list .strike-text,
.manual-shift-card .strike-text{
  text-decoration:none !important;
  color:inherit !important;
}

.manual-shift-card.is-struck .manual-shift-amount strong{
  text-decoration:none !important;
  color:#64748b !important;
}

/* Keep report table clean too, but still show Excluded label. */
.work-report .manual-report-row .strike-text{
  text-decoration:none !important;
}

.work-report .manual-report-row.manual-struck-row{
  opacity:1 !important;
}


/* === Excluded wording + body/report consistency fix === */
/* Do not show the word strikethrough to users. Keep excluded items readable. */
.manual-shift-card.is-struck,
.manual-shift-card.excluded-from-total,
.manual-shift-card.is-struck *,
.manual-shift-card.excluded-from-total *{
  text-decoration:none !important;
}

.manual-shift-card.is-struck{
  border-color:#cbd5e1 !important;
  background:#f8fafc !important;
  opacity:1 !important;
}

.manual-shift-card.is-struck::before{
  content:"Excluded";
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:max-content;
  max-width:100%;
  padding:3px 8px;
  border-radius:999px;
  background:#f1f5f9;
  border:1px solid #cbd5e1;
  color:#475569;
  font-size:11px;
  font-weight:900;
  margin-bottom:4px;
}

.manual-shift-card.is-struck .manual-shift-amount strong{
  text-decoration:none !important;
  color:#64748b !important;
}

.strike-badge{
  background:#f1f5f9 !important;
  color:#475569 !important;
  border:1px solid #cbd5e1 !important;
}

.work-report .strike-text,
.work-report .manual-struck-row,
.work-report .manual-struck-row *{
  text-decoration:none !important;
}

.work-report .manual-struck-row{
  opacity:1 !important;
  background:#f8fafc !important;
}



/* === Restore excluded visual line without using the word strikethrough === */
.manual-shift-card.is-struck,
.manual-shift-card.excluded-from-total{
  position:relative !important;
}

.manual-shift-card.is-struck::after,
.manual-shift-card.excluded-from-total::after{
  content:"";
  position:absolute;
  left:14px;
  right:14px;
  top:50%;
  height:2px;
  background:rgba(100,116,139,.55);
  border-radius:999px;
  pointer-events:none;
}

.manual-shift-card.is-struck > *,
.manual-shift-card.excluded-from-total > *{
  position:relative;
  z-index:1;
}

.manual-shift-card.is-struck{
  background:#f8fafc !important;
  border:1px solid #cbd5e1 !important;
}

.manual-shift-card.is-struck strong,
.manual-shift-card.is-struck span{
  color:#64748b !important;
}

/* Keep report rows readable */
.work-report .manual-struck-row{
  position:relative;
}

.work-report .manual-struck-row::after{
  content:"";
  position:absolute;
  left:8px;
  right:8px;
  top:50%;
  height:1px;
  background:rgba(100,116,139,.45);
  pointer-events:none;
}



/* === FINAL: text-level excluded line, not separate overlay line === */
/* Remove the previous separate line overlay */
.manual-shift-card.is-struck::after,
.manual-shift-card.excluded-from-total::after,
.work-report .manual-struck-row::after{
  display:none !important;
  content:none !important;
}

/* Apply real text-level line-through to excluded manual shift body text */
.manual-shift-card.is-struck > div:first-child strong,
.manual-shift-card.is-struck > div:first-child span,
.manual-shift-card.is-struck > div:nth-child(2) strong,
.manual-shift-card.is-struck .manual-shift-amount strong,
.manual-shift-card.excluded-from-total > div:first-child strong,
.manual-shift-card.excluded-from-total > div:first-child span,
.manual-shift-card.excluded-from-total > div:nth-child(2) strong,
.manual-shift-card.excluded-from-total .manual-shift-amount strong{
  text-decoration:line-through !important;
  text-decoration-thickness:2px !important;
  text-decoration-color:rgba(71,85,105,.75) !important;
  color:#64748b !important;
}

/* Do not line-through the Excluded label or Edit button */
.manual-shift-card.is-struck::before,
.manual-shift-card.excluded-from-total::before,
.manual-shift-card.is-struck button,
.manual-shift-card.excluded-from-total button,
.manual-shift-card.is-struck .manual-shift-amount span,
.manual-shift-card.excluded-from-total .manual-shift-amount span{
  text-decoration:none !important;
}

/* Report table: line-through actual manual excluded values only */
.work-report .manual-struck-row td:nth-child(4),
.work-report .manual-struck-row td:nth-child(5),
.work-report .manual-struck-row td:nth-child(6),
.work-report .manual-struck-row td:nth-child(8){
  text-decoration:line-through !important;
  text-decoration-thickness:1.5px !important;
  text-decoration-color:rgba(71,85,105,.65) !important;
  color:#64748b !important;
}

/* Do not line-through status badge or map cell */
.work-report .manual-struck-row td:nth-child(9),
.work-report .manual-struck-row td:nth-child(10),
.work-report .manual-struck-row .strike-badge,
.work-report .manual-struck-row .edit-badge{
  text-decoration:none !important;
}


/* === Manual Shift Optional Current Location Feature === */
.manual-location-tools{
  border:1px solid #dbe5ef;
  background:#f8fafc;
  border-radius:12px;
  padding:10px;
  display:grid;
  gap:8px;
  margin:8px 0;
}

.manual-location-tools strong{
  display:block;
  color:#0f172a;
  font-size:13px;
  font-weight:900;
}

.manual-location-tools small{
  color:#64748b;
  font-size:12px;
}

.manual-location-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.manual-location-actions button{
  min-height:34px;
}

.manual-location-status{
  display:grid;
  gap:4px;
  color:#475569;
  font-size:12px;
}

.manual-location-chip{
  display:inline-flex;
  align-items:center;
  gap:4px;
  max-width:100%;
  margin:3px 4px 0 0;
  padding:3px 7px;
  border-radius:999px;
  border:1px solid #bfdbfe;
  background:#eff6ff;
  color:#1e3a8a;
  font-size:10.5px;
  line-height:1.2;
  font-weight:800;
  vertical-align:middle;
}

.manual-location-chip a{
  color:#0f766e;
  font-weight:900;
  text-decoration:none;
}

.manual-location-line{
  display:block;
  margin-top:4px;
}

.work-report .manual-location-chip{
  white-space:normal !important;
  overflow-wrap:anywhere !important;
  font-size:8.5px !important;
  padding:2px 5px !important;
}


/* === Required manual GPS location fix === */
.manual-location-tools{
  border-color:#93c5fd !important;
  background:#eff6ff !important;
}

.manual-location-tools strong::after{
  content:" *";
  color:#dc2626;
}

.manual-location-status span{
  display:block;
  padding:5px 7px;
  border-radius:8px;
  background:#ffffff;
  border:1px solid #bfdbfe;
  color:#1e3a8a;
  font-weight:800;
}

.manual-location-actions button:disabled{
  opacity:.7;
  cursor:wait;
}

/* === Manual GPS auto-capture status === */
.manual-location-tools,
.manual-location-actions{
  display:none !important;
}

.manual-auto-location-note{
  margin:8px 0;
  padding:9px 10px;
  border:1px solid #bfdbfe;
  background:#eff6ff;
  border-radius:10px;
  display:grid;
  gap:4px;
}

.manual-auto-location-note strong{
  color:#1e3a8a;
  font-size:13px;
  font-weight:900;
}

.manual-auto-location-note span{
  color:#334155;
  font-size:12px;
  line-height:1.35;
}



/* === Manual shift design matches automatic shift === */
.manual-shift-card{
  border:1px solid #dbe5ef !important;
  border-radius:16px !important;
  background:#ffffff !important;
  padding:14px !important;
  box-shadow:0 8px 24px rgba(15,23,42,.06) !important;
  gap:12px !important;
  transition:.2s ease !important;
}

.manual-shift-card:hover{
  border-color:#bfdbfe !important;
  box-shadow:0 10px 28px rgba(37,99,235,.10) !important;
}

.manual-shift-card > div:first-child{
  display:grid !important;
  gap:6px !important;
}

.manual-shift-card > div:first-child strong{
  font-size:15px !important;
  font-weight:900 !important;
  color:#0f172a !important;
}

.manual-shift-card > div:first-child > span{
  color:#475569 !important;
  font-size:13px !important;
  line-height:1.35 !important;
}

.manual-location-line{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:6px !important;
  margin-top:4px !important;
}

.manual-location-chip{
  display:inline-flex !important;
  align-items:center !important;
  gap:4px !important;
  padding:5px 10px !important;
  border-radius:999px !important;
  background:#eff6ff !important;
  border:1px solid #bfdbfe !important;
  color:#1d4ed8 !important;
  font-size:11px !important;
  font-weight:800 !important;
  line-height:1.2 !important;
}

.manual-location-chip a{
  color:#0f766e !important;
  font-weight:900 !important;
  text-decoration:none !important;
}

.manual-shift-card > div:nth-child(2){
  display:grid !important;
  gap:4px !important;
}

.manual-shift-card > div:nth-child(2) strong{
  font-size:15px !important;
  font-weight:900 !important;
  color:#0f172a !important;
}

.manual-shift-card > div:nth-child(2) span{
  display:inline-flex !important;
  align-items:center !important;
  width:max-content !important;
  padding:4px 9px !important;
  border-radius:999px !important;
  background:#f8fafc !important;
  border:1px solid #dbe5ef !important;
  color:#475569 !important;
  font-size:11px !important;
  font-weight:800 !important;
}

.manual-shift-amount{
  display:grid !important;
  gap:4px !important;
  justify-items:end !important;
}

.manual-shift-amount strong{
  font-size:18px !important;
  font-weight:900 !important;
  color:#047857 !important;
}

.manual-shift-amount span{
  display:inline-flex !important;
  align-items:center !important;
  padding:4px 9px !important;
  border-radius:999px !important;
  background:#ecfdf5 !important;
  border:1px solid #bbf7d0 !important;
  color:#047857 !important;
  font-size:11px !important;
  font-weight:800 !important;
}

.manual-shift-card button.ghost.small{
  min-height:40px !important;
  padding:10px 14px !important;
  border-radius:12px !important;
  font-weight:900 !important;
}

/* excluded manual shift still matches style */
.manual-shift-card.is-struck{
  background:#f8fafc !important;
  border-color:#cbd5e1 !important;
}

@media (max-width:760px){
  .manual-shift-card{
    grid-template-columns:1fr !important;
  }

  .manual-shift-amount{
    justify-items:start !important;
  }

  .manual-location-line{
    flex-direction:column !important;
    align-items:flex-start !important;
  }
}



/* === Manual Shifts: copy Automatic Shifts card style exactly === */
.manual-shift-list{
  display:grid !important;
  gap:10px !important;
}

.manual-shift-list .manual-auto-style{
  border:1px solid var(--border, #dbe5ef) !important;
  border-radius:16px !important;
  background:#ffffff !important;
  box-shadow:0 8px 24px rgba(15,23,42,.06) !important;
  overflow:hidden !important;
  padding:0 !important;
  display:block !important;
}

.manual-shift-list .manual-auto-style > summary.shift-summary{
  list-style:none !important;
  cursor:pointer !important;
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  padding:14px !important;
  border-radius:16px !important;
}

.manual-shift-list .manual-auto-style > summary.shift-summary::-webkit-details-marker{
  display:none !important;
}

.manual-shift-list .manual-auto-style .shift-main{
  display:grid !important;
  gap:4px !important;
  min-width:0 !important;
  flex:1 1 auto !important;
}

.manual-shift-list .manual-auto-style .shift-main strong{
  font-size:15px !important;
  font-weight:900 !important;
  color:#0f172a !important;
  text-decoration:none !important;
}

.manual-shift-list .manual-auto-style .shift-meta{
  font-size:13px !important;
  color:#475569 !important;
  line-height:1.35 !important;
  text-decoration:none !important;
}

.manual-shift-list .manual-auto-style .history-shift-pay{
  margin-left:auto !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:4px 10px !important;
  border-radius:999px !important;
  background:#ecfdf5 !important;
  border:1px solid #bbf7d0 !important;
  color:#047857 !important;
  font-weight:900 !important;
  font-size:13px !important;
  white-space:nowrap !important;
  text-decoration:none !important;
}

.manual-shift-list .manual-auto-style .view-details{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:4px 9px !important;
  border-radius:999px !important;
  border:1px solid #dbe5ef !important;
  color:#475569 !important;
  font-size:11px !important;
  font-weight:900 !important;
  background:#f8fafc !important;
}

.manual-shift-list .manual-auto-style .shift-detail-grid{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:10px !important;
  padding:0 14px 14px !important;
}

.manual-shift-list .manual-auto-style .full-row{
  grid-column:1 / -1 !important;
}

.manual-shift-list .manual-auto-style .shift-location{
  border:1px solid #e2e8f0 !important;
  background:#f8fafc !important;
  border-radius:12px !important;
  padding:10px !important;
  display:grid !important;
  gap:4px !important;
}

.manual-shift-list .manual-auto-style .shift-location b{
  color:#0f766e !important;
  font-size:11px !important;
  text-transform:uppercase !important;
  letter-spacing:.04em !important;
  font-weight:900 !important;
}

.manual-shift-list .manual-auto-style .shift-location span{
  color:#334155 !important;
  font-size:12.5px !important;
  line-height:1.35 !important;
  overflow-wrap:anywhere !important;
}

.manual-shift-list .manual-auto-style .shift-actions{
  grid-column:1 / -1 !important;
  display:flex !important;
  flex-wrap:wrap !important;
  gap:8px !important;
}

.manual-shift-list .manual-auto-style .shift-actions .ghost,
.manual-shift-list .manual-auto-style .shift-actions button.ghost{
  min-height:38px !important;
  padding:9px 12px !important;
  border-radius:12px !important;
  font-weight:900 !important;
}

/* Keep excluded as text-level line-through, not old grid/card format */
.manual-shift-list .manual-auto-style.is-struck .shift-main strong,
.manual-shift-list .manual-auto-style.is-struck .shift-main .shift-meta,
.manual-shift-list .manual-auto-style.is-struck .history-shift-pay,
.manual-shift-list .manual-auto-style.is-struck .shift-location span{
  text-decoration:line-through !important;
  text-decoration-thickness:2px !important;
  text-decoration-color:rgba(71,85,105,.75) !important;
  color:#64748b !important;
}

.manual-shift-list .manual-auto-style.is-struck::before,
.manual-shift-list .manual-auto-style.is-struck::after{
  display:none !important;
  content:none !important;
}

/* Override older manual card grid styles */
.manual-shift-card:not(.manual-auto-style){
  display:grid;
}

@media (max-width:760px){
  .manual-shift-list .manual-auto-style > summary.shift-summary{
    display:grid !important;
    grid-template-columns:1fr auto !important;
  }
  .manual-shift-list .manual-auto-style .view-details{
    grid-column:1 / -1 !important;
    justify-self:start !important;
  }
  .manual-shift-list .manual-auto-style .shift-detail-grid{
    grid-template-columns:1fr !important;
  }
}


/* === Fix manual shift modal/sidebar scrolling === */
.sidebar,
.sidebar-content,
.panel-body,
.modal-card,
.modal-content{
  overflow-y:auto !important;
  overscroll-behavior:contain !important;
}

body.modal-open{
  overflow:hidden;
}

#manualShiftModalBackdrop,
#editManualShiftModalBackdrop{
  position:fixed !important;
  inset:0 !important;
  overflow-y:auto !important;
  padding:20px 12px !important;
  z-index:9999 !important;
}

#manualShiftModalBackdrop .modal-card,
#editManualShiftModalBackdrop .modal-card{
  max-height:calc(100vh - 40px) !important;
  overflow-y:auto !important;
  margin:auto !important;
}

/* Keep report generator clickable */
#generateReportBtn,
.report-generator button,
button[onclick*="report"],
button[data-generate-report]{
  pointer-events:auto !important;
  position:relative !important;
  z-index:5 !important;
}



/* === New Manual Shift Center Modal === */
#manualShiftModalBackdrop{
  position:fixed !important;
  inset:0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:18px !important;
  background:rgba(15,23,42,.58) !important;
  backdrop-filter:blur(6px) !important;
  z-index:9999 !important;
  overflow-y:auto !important;
}

#manualShiftModalBackdrop[hidden]{
  display:none !important;
}

#manualShiftModalBackdrop .sidebar,
#manualShiftModalBackdrop .drawer,
#manualShiftModalBackdrop .panel,
#manualShiftModalBackdrop .modal-card{
  width:min(94vw, 640px) !important;
  max-width:640px !important;
  min-width:320px !important;
  max-height:calc(100vh - 36px) !important;
  overflow-y:auto !important;
  margin:auto !important;
  border-radius:22px !important;
  background:#ffffff !important;
  border:1px solid #dbe5ef !important;
  box-shadow:0 30px 80px rgba(15,23,42,.32) !important;
  position:relative !important;
  left:auto !important;
  right:auto !important;
  top:auto !important;
  bottom:auto !important;
  transform:none !important;
}

#manualShiftModalBackdrop .sidebar-header,
#manualShiftModalBackdrop .drawer-header,
#manualShiftModalBackdrop .panel-header,
#manualShiftModalBackdrop .modal-header{
  position:sticky !important;
  top:0 !important;
  z-index:2 !important;
  background:#ffffff !important;
  border-bottom:1px solid #e2e8f0 !important;
  padding:16px 18px !important;
  border-radius:22px 22px 0 0 !important;
}

#manualShiftModalBackdrop .sidebar-body,
#manualShiftModalBackdrop .drawer-body,
#manualShiftModalBackdrop .panel-body,
#manualShiftModalBackdrop .modal-body{
  padding:16px 18px 18px !important;
}

#manualShiftModalBackdrop .sidebar-footer,
#manualShiftModalBackdrop .drawer-footer,
#manualShiftModalBackdrop .panel-footer,
#manualShiftModalBackdrop .modal-footer{
  position:sticky !important;
  bottom:0 !important;
  background:#ffffff !important;
  border-top:1px solid #e2e8f0 !important;
  padding:14px 18px !important;
  border-radius:0 0 22px 22px !important;
}

#manualShiftModalBackdrop input,
#manualShiftModalBackdrop textarea,
#manualShiftModalBackdrop select{
  width:100% !important;
  min-height:46px !important;
  border-radius:12px !important;
}

#manualShiftModalBackdrop textarea{
  min-height:90px !important;
}

#manualShiftModalBackdrop button{
  min-height:44px !important;
  border-radius:12px !important;
}

@media (max-width:640px){
  #manualShiftModalBackdrop{
    align-items:flex-end !important;
    padding:0 !important;
  }

  #manualShiftModalBackdrop .sidebar,
  #manualShiftModalBackdrop .drawer,
  #manualShiftModalBackdrop .panel,
  #manualShiftModalBackdrop .modal-card{
    width:100vw !important;
    max-width:100vw !important;
    min-width:100vw !important;
    max-height:92vh !important;
    border-radius:22px 22px 0 0 !important;
  }

  #manualShiftModalBackdrop .sidebar-header,
  #manualShiftModalBackdrop .drawer-header,
  #manualShiftModalBackdrop .panel-header,
  #manualShiftModalBackdrop .modal-header{
    border-radius:22px 22px 0 0 !important;
  }

  #manualShiftModalBackdrop .sidebar-footer,
  #manualShiftModalBackdrop .drawer-footer,
  #manualShiftModalBackdrop .panel-footer,
  #manualShiftModalBackdrop .modal-footer{
    border-radius:0 !important;
  }
}



/* === FORCE New Manual Shift to be CENTER MODAL, not sidebar === */
#manualShiftModalBackdrop.manual-center-modal,
#manualShiftModalBackdrop{
  position:fixed !important;
  inset:0 !important;
  width:100vw !important;
  height:100vh !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:18px !important;
  background:rgba(15,23,42,.62) !important;
  backdrop-filter:blur(7px) !important;
  z-index:99999 !important;
  overflow:auto !important;
  transform:none !important;
}

#manualShiftModalBackdrop[hidden]{
  display:none !important;
}

#manualShiftModalBackdrop > .manual-shift-center-card,
#manualShiftModalBackdrop > .modal-card,
#manualShiftModalBackdrop > .shift-modal{
  position:relative !important;
  inset:auto !important;
  left:auto !important;
  right:auto !important;
  top:auto !important;
  bottom:auto !important;
  transform:none !important;
  margin:auto !important;
  width:min(94vw, 620px) !important;
  max-width:620px !important;
  min-width:320px !important;
  max-height:calc(100vh - 36px) !important;
  overflow-y:auto !important;
  background:#ffffff !important;
  border:1px solid #dbe5ef !important;
  border-radius:22px !important;
  box-shadow:0 32px 90px rgba(15,23,42,.38) !important;
  padding:0 !important;
  display:block !important;
}

/* override any side drawer classes accidentally applied */
#manualShiftModalBackdrop .drawer,
#manualShiftModalBackdrop .sidebar,
#manualShiftModalBackdrop aside,
#manualShiftModalBackdrop [class*="drawer"],
#manualShiftModalBackdrop [class*="sidebar"]{
  position:static !important;
  transform:none !important;
  width:auto !important;
  max-width:none !important;
}

/* Modal header */
#manualShiftModalBackdrop .manual-modal-head{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  padding:18px 20px 14px !important;
  border-bottom:1px solid #e2e8f0 !important;
  background:#ffffff !important;
  position:sticky !important;
  top:0 !important;
  z-index:3 !important;
  border-radius:22px 22px 0 0 !important;
}

#manualShiftModalBackdrop .manual-modal-head h3{
  margin:0 !important;
  font-size:20px !important;
  line-height:1.15 !important;
  font-weight:900 !important;
  color:#0f172a !important;
}

#manualShiftModalBackdrop .modal-x{
  width:36px !important;
  height:36px !important;
  min-width:36px !important;
  border-radius:10px !important;
  border:1px solid #dbe5ef !important;
  background:#f8fafc !important;
  color:#334155 !important;
  font-size:22px !important;
  font-weight:900 !important;
  line-height:1 !important;
  display:grid !important;
  place-items:center !important;
}

/* Modal body spacing */
#manualShiftModalBackdrop .form-field,
#manualShiftModalBackdrop .checkline,
#manualShiftModalBackdrop .strike-help,
#manualShiftModalBackdrop .manual-auto-location-note{
  margin-left:20px !important;
  margin-right:20px !important;
}

#manualShiftModalBackdrop .form-field:first-of-type{
  margin-top:16px !important;
}

#manualShiftModalBackdrop .modal-actions{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:10px !important;
  padding:16px 20px 20px !important;
  margin:0 !important;
  border-top:1px solid #e2e8f0 !important;
  background:#ffffff !important;
  position:sticky !important;
  bottom:0 !important;
  border-radius:0 0 22px 22px !important;
}

#manualShiftModalBackdrop .modal-actions button{
  width:100% !important;
  min-height:44px !important;
  border-radius:12px !important;
  font-weight:900 !important;
}

@media (max-width:640px){
  #manualShiftModalBackdrop{
    align-items:flex-end !important;
    padding:0 !important;
  }

  #manualShiftModalBackdrop > .manual-shift-center-card,
  #manualShiftModalBackdrop > .modal-card,
  #manualShiftModalBackdrop > .shift-modal{
    width:100vw !important;
    max-width:100vw !important;
    min-width:100vw !important;
    max-height:92vh !important;
    border-radius:22px 22px 0 0 !important;
  }
}



/* === Professional compact checkbox UX/UI for manual modal === */
#manualShiftModalBackdrop .checkline,
#editManualShiftModalBackdrop .checkline{
  display:flex !important;
  align-items:flex-start !important;
  gap:10px !important;
  padding:10px 12px !important;
  margin:10px 20px !important;
  border:1px solid #dbe5ef !important;
  border-radius:14px !important;
  background:#f8fafc !important;
  transition:.18s ease !important;
}

#manualShiftModalBackdrop .checkline:hover,
#editManualShiftModalBackdrop .checkline:hover{
  border-color:#bfdbfe !important;
  background:#f1f5f9 !important;
}

#manualShiftModalBackdrop .checkline input[type="checkbox"],
#editManualShiftModalBackdrop .checkline input[type="checkbox"]{
  appearance:none !important;
  -webkit-appearance:none !important;
  width:18px !important;
  height:18px !important;
  min-width:18px !important;
  margin-top:1px !important;
  border-radius:6px !important;
  border:2px solid #94a3b8 !important;
  background:#ffffff !important;
  display:grid !important;
  place-items:center !important;
  cursor:pointer !important;
  transition:.16s ease !important;
  box-shadow:none !important;
}

#manualShiftModalBackdrop .checkline input[type="checkbox"]::after,
#editManualShiftModalBackdrop .checkline input[type="checkbox"]::after{
  content:"";
  width:8px;
  height:8px;
  border-radius:2px;
  transform:scale(0);
  transition:.14s ease;
  background:#ffffff;
}

#manualShiftModalBackdrop .checkline input[type="checkbox"]:checked,
#editManualShiftModalBackdrop .checkline input[type="checkbox"]:checked{
  background:#2563eb !important;
  border-color:#2563eb !important;
}

#manualShiftModalBackdrop .checkline input[type="checkbox"]:checked::after,
#editManualShiftModalBackdrop .checkline input[type="checkbox"]:checked::after{
  transform:scale(1);
}

#manualShiftModalBackdrop .checkline span,
#editManualShiftModalBackdrop .checkline span{
  display:grid !important;
  gap:3px !important;
  color:#0f172a !important;
  font-size:13px !important;
  line-height:1.35 !important;
  font-weight:800 !important;
}

#manualShiftModalBackdrop .checkline small,
#editManualShiftModalBackdrop .checkline small,
#manualShiftModalBackdrop .strike-help,
#editManualShiftModalBackdrop .strike-help{
  display:block !important;
  margin-top:2px !important;
  color:#64748b !important;
  font-size:11px !important;
  line-height:1.35 !important;
  font-weight:600 !important;
}

/* Mobile */
@media (max-width:640px){
  #manualShiftModalBackdrop .checkline,
  #editManualShiftModalBackdrop .checkline{
    padding:9px 10px !important;
    margin:10px 16px !important;
  }

  #manualShiftModalBackdrop .checkline span,
  #editManualShiftModalBackdrop .checkline span{
    font-size:12.5px !important;
  }
}


/* === Final checkbox layout fix === */
#manualShiftModalBackdrop .checkline,
#editManualShiftModalBackdrop .checkline{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:12px !important;
  width:auto !important;
  min-height:auto !important;
  padding:10px 12px !important;
  box-sizing:border-box !important;
}

#manualShiftModalBackdrop .checkline input[type="checkbox"],
#editManualShiftModalBackdrop .checkline input[type="checkbox"]{
  flex:0 0 18px !important;
  width:18px !important;
  height:18px !important;
  margin:0 !important;
  align-self:center !important;
  vertical-align:middle !important;
}

#manualShiftModalBackdrop .checkline > span,
#editManualShiftModalBackdrop .checkline > span,
#manualShiftModalBackdrop .checkline label,
#editManualShiftModalBackdrop .checkline label{
  flex:1 1 auto !important;
  min-width:0 !important;
  margin:0 !important;
  padding:0 !important;
  display:block !important;
}

/* === Compact location detected modal === */
.compact-status-modal{
  position:fixed !important;
  inset:0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:18px !important;
  background:rgba(15,23,42,.42) !important;
  backdrop-filter:blur(4px) !important;
  z-index:100000 !important;
}

.compact-status-modal[hidden]{
  display:none !important;
}

.compact-status-card{
  width:min(92vw, 420px) !important;
  background:#ffffff !important;
  border:1px solid #dbe5ef !important;
  border-radius:18px !important;
  padding:18px !important;
  display:grid !important;
  grid-template-columns:48px 1fr auto !important;
  gap:14px !important;
  align-items:center !important;
  box-shadow:0 28px 80px rgba(15,23,42,.28) !important;
}

.compact-status-card .status-icon{
  width:44px !important;
  height:44px !important;
  border-radius:14px !important;
  display:grid !important;
  place-items:center !important;
  font-size:22px !important;
  font-weight:900 !important;
}

.compact-status-card .status-icon.success{
  background:#ecfdf5 !important;
  color:#047857 !important;
  border:1px solid #bbf7d0 !important;
}

.compact-status-content{
  display:grid !important;
  gap:4px !important;
}

.compact-status-content strong{
  color:#0f172a !important;
  font-size:15px !important;
  line-height:1.2 !important;
}

.compact-status-content span{
  color:#64748b !important;
  font-size:12px !important;
  line-height:1.4 !important;
}

.compact-status-close{
  min-height:40px !important;
  padding:9px 14px !important;
  border-radius:12px !important;
  border:1px solid #dbe5ef !important;
  background:#f8fafc !important;
  color:#334155 !important;
  font-weight:900 !important;
}

@media (max-width:640px){
  .compact-status-card{
    grid-template-columns:1fr !important;
    text-align:center !important;
    justify-items:center !important;
  }
}



/* === FINAL ONLY FIX: Exclude from totals checkbox alignment === */
#manualShiftModalBackdrop label.checkline,
#editManualShiftModalBackdrop label.checkline{
  display:grid !important;
  grid-template-columns:20px 1fr !important;
  align-items:center !important;
  column-gap:10px !important;
  width:auto !important;
  min-height:42px !important;
  margin:10px 20px !important;
  padding:10px 12px !important;
  border:1px solid #dbe5ef !important;
  border-radius:12px !important;
  background:#f8fafc !important;
  box-sizing:border-box !important;
  cursor:pointer !important;
}

#manualShiftModalBackdrop label.checkline input[type="checkbox"],
#editManualShiftModalBackdrop label.checkline input[type="checkbox"]{
  appearance:auto !important;
  -webkit-appearance:auto !important;
  position:static !important;
  display:block !important;
  width:18px !important;
  height:18px !important;
  min-width:18px !important;
  min-height:18px !important;
  max-width:18px !important;
  max-height:18px !important;
  margin:0 !important;
  padding:0 !important;
  transform:none !important;
  align-self:center !important;
  justify-self:center !important;
  opacity:1 !important;
  visibility:visible !important;
  pointer-events:auto !important;
  box-shadow:none !important;
}

#manualShiftModalBackdrop label.checkline span,
#editManualShiftModalBackdrop label.checkline span{
  display:block !important;
  margin:0 !important;
  padding:0 !important;
  color:#0f172a !important;
  font-size:13px !important;
  line-height:1.25 !important;
  font-weight:800 !important;
  text-align:left !important;
  white-space:normal !important;
}

#manualShiftModalBackdrop .strike-help,
#editManualShiftModalBackdrop .strike-help{
  margin:4px 20px 10px !important;
  padding:0 2px !important;
  color:#64748b !important;
  font-size:11.5px !important;
  line-height:1.35 !important;
}

/* Remove custom pseudo checkmark that was causing messy checkbox display */
#manualShiftModalBackdrop label.checkline input[type="checkbox"]::after,
#editManualShiftModalBackdrop label.checkline input[type="checkbox"]::after{
  content:none !important;
  display:none !important;
}

@media (max-width:640px){
  #manualShiftModalBackdrop label.checkline,
  #editManualShiftModalBackdrop label.checkline{
    margin:10px 16px !important;
    grid-template-columns:20px 1fr !important;
  }

  #manualShiftModalBackdrop .strike-help,
  #editManualShiftModalBackdrop .strike-help{
    margin-left:16px !important;
    margin-right:16px !important;
  }
}


/* === Restore report generator button interaction === */
#generateReportBtn,
[data-generate-report],
button[id*="report"],
button[onclick*="report"]{
  position:relative !important;
  z-index:50 !important;
  pointer-events:auto !important;
}

.report-generator,
.report-generator *{
  pointer-events:auto !important;
}


/* === REAL report generator interaction fix === */
#generateReportBtn,
#openReportBtn,
#reportBtn,
#generateRangeReportBtn,
#generateReportFromRangeBtn,
button{
  pointer-events:auto !important;
}

#reportRangeModal,
#reportModal{
  z-index:100001 !important;
}

#reportRangeModal.hidden,
#reportModal.hidden{
  display:none !important;
}

#reportRangeModal:not(.hidden),
#reportModal:not(.hidden){
  display:flex !important;
}


/* === Manual location chips in report/body === */
.manual-location-chip{
  display:inline-flex;
  align-items:center;
  gap:4px;
  max-width:100%;
  margin:2px 4px 2px 0;
  padding:3px 7px;
  border-radius:999px;
  background:#eff6ff;
  border:1px solid #bfdbfe;
  color:#1d4ed8;
  font-size:10px;
  line-height:1.2;
  font-weight:800;
  overflow-wrap:anywhere;
  white-space:normal;
}

.manual-location-chip a{
  color:#0f766e;
  font-weight:900;
  text-decoration:none;
}



/* === CLEAN CONSISTENT REPORT LAYOUT === */
.work-report,
.report-sheet,
.report-container{
  font-size:12px !important;
  line-height:1.32 !important;
  color:#0f172a !important;
}

/* compact top summary */
.report-summary-grid,
.report-top-grid{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:8px !important;
  margin:10px 0 12px !important;
}

.report-summary-card,
.report-stat-card{
  padding:8px 10px !important;
  border-radius:12px !important;
  border:1px solid #dbe5ef !important;
  background:#ffffff !important;
  box-shadow:none !important;
}

.report-summary-card strong,
.report-stat-card strong{
  font-size:15px !important;
  line-height:1.1 !important;
}

.report-summary-card span,
.report-stat-card span{
  font-size:10px !important;
  color:#64748b !important;
}

/* report table cleanup */
.work-report table{
  width:100% !important;
  border-collapse:collapse !important;
  table-layout:fixed !important;
  margin-top:8px !important;
}

.work-report th{
  background:#f8fafc !important;
  color:#334155 !important;
  font-size:10px !important;
  line-height:1.15 !important;
  font-weight:900 !important;
  text-transform:uppercase !important;
  letter-spacing:.02em !important;
  padding:7px 6px !important;
  border:1px solid #e2e8f0 !important;
  text-align:left !important;
}

.work-report td{
  vertical-align:top !important;
  padding:6px !important;
  border:1px solid #e2e8f0 !important;
  font-size:10.5px !important;
  line-height:1.25 !important;
  overflow-wrap:anywhere !important;
  word-break:break-word !important;
}

/* keep addresses readable */
.work-report td:nth-child(5){
  min-width:220px !important;
  white-space:normal !important;
}

/* cleaner location text */
.work-report .manual-location-chip{
  display:inline-flex !important;
  align-items:center !important;
  gap:3px !important;
  margin:2px 2px 2px 0 !important;
  padding:2px 5px !important;
  border-radius:999px !important;
  background:#eff6ff !important;
  border:1px solid #bfdbfe !important;
  color:#1d4ed8 !important;
  font-size:9px !important;
  line-height:1.15 !important;
  font-weight:800 !important;
}

.work-report .manual-location-chip a{
  font-size:9px !important;
}

/* compact report title */
.work-report h1,
.work-report h2,
.work-report h3{
  margin:4px 0 !important;
  line-height:1.15 !important;
}

.work-report .report-logo{
  max-height:42px !important;
  object-fit:contain !important;
}

/* compact rows */
.work-report tr{
  page-break-inside:avoid !important;
}

/* footer cleaner */
.work-report-footer,
.report-footer{
  margin-top:12px !important;
  padding-top:8px !important;
  border-top:1px solid #e2e8f0 !important;
  text-align:center !important;
  font-size:10px !important;
  line-height:1.25 !important;
  color:#64748b !important;
}

/* remove oversized spacing */
.work-report *{
  box-sizing:border-box !important;
}

.work-report p,
.work-report .section,
.work-report .block{
  margin-top:4px !important;
  margin-bottom:4px !important;
}

/* print optimization */
@media print{
  body{
    margin:0 !important;
    padding:0 !important;
  }

  .work-report,
  .report-sheet{
    width:100% !important;
    max-width:100% !important;
    margin:0 auto !important;
    padding:8px !important;
  }

  .work-report table{
    font-size:9.5px !important;
  }

  .work-report td,
  .work-report th{
    padding:4px !important;
  }

  .report-summary-grid,
  .report-top-grid{
    gap:5px !important;
  }
}

/* mobile readability */
@media (max-width:760px){
  .report-summary-grid,
  .report-top-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }

  .work-report{
    overflow-x:auto !important;
  }

  .work-report table{
    min-width:980px !important;
  }
}


/* === Refined Period line === */
.work-report .report-period,
.work-report .period-line,
.work-report .report-meta-period{
  display:flex !important;
  align-items:center !important;
  gap:6px !important;
  font-size:11px !important;
  line-height:1.2 !important;
  font-weight:700 !important;
  color:#475569 !important;
  margin-top:2px !important;
  margin-bottom:4px !important;
  padding-bottom:6px !important;
  border-bottom:1px solid #e2e8f0 !important;
}


/* === Actual Period line fix === */
.report-period,
.period-line,
.report-meta-period{
  white-space:nowrap !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:6px !important;
  font-size:11px !important;
  font-weight:800 !important;
  color:#334155 !important;
  border-bottom:1px solid #e2e8f0 !important;
  padding-bottom:5px !important;
}

.report-period *{
  white-space:nowrap !important;
}



/* === FULLSCREEN CLEAN REPORT + PRINT FIT FIX === */

/* Report modal should use full screen space instead of narrow popup */
#reportModal:not(.hidden){
  position:fixed !important;
  inset:0 !important;
  width:100vw !important;
  height:100vh !important;
  max-width:none !important;
  max-height:none !important;
  display:flex !important;
  align-items:stretch !important;
  justify-content:center !important;
  padding:12px !important;
  background:rgba(15,23,42,.55) !important;
  z-index:100001 !important;
}

#reportModal .modal-card,
#reportModal .report-modal,
#reportModal .report-card{
  width:min(100%, 1280px) !important;
  max-width:1280px !important;
  height:calc(100vh - 24px) !important;
  max-height:calc(100vh - 24px) !important;
  margin:0 auto !important;
  border-radius:14px !important;
  overflow:hidden !important;
  display:flex !important;
  flex-direction:column !important;
  background:#fff !important;
}

#reportModal .report-actions,
#reportModal .modal-actions{
  flex:0 0 auto !important;
}

#reportPreview,
#reportModal .report-preview,
#reportModal .modal-body{
  flex:1 1 auto !important;
  min-height:0 !important;
  overflow:auto !important;
  padding:14px !important;
}

/* Main report canvas fits wider */
.work-report.detailed-one-page-report,
.work-report.clean-work-report,
.work-report{
  width:100% !important;
  max-width:1180px !important;
  margin:0 auto !important;
  padding:14px !important;
  overflow:visible !important;
  box-sizing:border-box !important;
}

/* Header/meta cards: keep text inside border */
.work-report .professional-report-head{
  grid-template-columns:320px 1fr !important;
  gap:14px !important;
  align-items:stretch !important;
}

.work-report .report-meta-clean{
  display:grid !important;
  grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
  gap:10px !important;
  min-width:0 !important;
}

.work-report .report-meta-clean > div{
  min-width:0 !important;
  overflow:hidden !important;
  padding:10px 12px !important;
  border-radius:10px !important;
}

.work-report .report-meta-clean span{
  display:block !important;
  text-align:right !important;
  white-space:nowrap !important;
  font-size:10px !important;
}

.work-report .report-meta-clean strong{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  white-space:normal !important;
  overflow-wrap:anywhere !important;
  word-break:normal !important;
  text-align:right !important;
  line-height:1.25 !important;
  font-size:11.5px !important;
}

.work-report .report-meta-clean .period-card strong{
  white-space:nowrap !important;
  overflow-wrap:normal !important;
}

/* Table: clean readable, no overflow outside borders */
.work-report .report-table-wrap{
  width:100% !important;
  overflow:auto !important;
  border:1px solid #dbe5ef !important;
  border-radius:10px !important;
}

.work-report .unified-report-table,
.work-report table{
  width:100% !important;
  table-layout:fixed !important;
  border-collapse:collapse !important;
}

.work-report th,
.work-report td{
  box-sizing:border-box !important;
  overflow:hidden !important;
  overflow-wrap:anywhere !important;
  word-break:normal !important;
  white-space:normal !important;
  vertical-align:top !important;
}

/* Better report columns */
.work-report .unified-report-table th:nth-child(1),
.work-report .unified-report-table td:nth-child(1){ width:30px !important; text-align:center !important; }
.work-report .unified-report-table th:nth-child(2),
.work-report .unified-report-table td:nth-child(2){ width:62px !important; }
.work-report .unified-report-table th:nth-child(3),
.work-report .unified-report-table td:nth-child(3){ width:90px !important; }
.work-report .unified-report-table th:nth-child(4),
.work-report .unified-report-table td:nth-child(4){ width:126px !important; }
.work-report .unified-report-table th:nth-child(5),
.work-report .unified-report-table td:nth-child(5){ width:auto !important; min-width:260px !important; }
.work-report .unified-report-table th:nth-child(6),
.work-report .unified-report-table td:nth-child(6){ width:70px !important; }
.work-report .unified-report-table th:nth-child(7),
.work-report .unified-report-table td:nth-child(7){ width:76px !important; }
.work-report .unified-report-table th:nth-child(8),
.work-report .unified-report-table td:nth-child(8){ width:76px !important; }
.work-report .unified-report-table th:nth-child(9),
.work-report .unified-report-table td:nth-child(9){ width:86px !important; }
.work-report .unified-report-table th:nth-child(10),
.work-report .unified-report-table td:nth-child(10){ width:58px !important; text-align:center !important; }

/* Manual locations should look consistent with automatic IN/OUT lines */
.work-report .manual-location-chip{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  margin:2px 0 !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  color:#334155 !important;
  font-size:10.5px !important;
  line-height:1.25 !important;
  font-weight:700 !important;
  overflow-wrap:anywhere !important;
}

.work-report .manual-location-chip::first-letter{
  font-weight:900 !important;
}

.work-report .manual-location-chip a{
  display:inline-flex !important;
  margin-left:4px !important;
  padding:1px 5px !important;
  border-radius:999px !important;
  border:1px solid #dbe5ef !important;
  background:#f8fafc !important;
  color:#0f766e !important;
  font-size:9px !important;
  font-weight:900 !important;
  text-decoration:none !important;
}

/* Automatic location lines */
.work-report .mini-address{
  max-height:none !important;
  overflow:visible !important;
  white-space:normal !important;
  line-height:1.25 !important;
  font-size:10.5px !important;
}

.work-report .mini-address b{
  display:inline !important;
  margin-right:4px !important;
  color:#0f766e !important;
  font-weight:900 !important;
}

/* Prevent footer going odd places */
.work-report .report-footer-branded,
.work-report .compact-footer-line{
  width:100% !important;
  justify-content:center !important;
  text-align:center !important;
  white-space:normal !important;
  margin-top:10px !important;
  padding-top:8px !important;
  border-top:1px solid #e2e8f0 !important;
}

/* Print: fit nicely, no modal chrome, full width */
@media print{
  @page{
    size: letter landscape;
    margin:0.25in;
  }

  html, body{
    margin:0 !important;
    padding:0 !important;
    background:#fff !important;
    width:100% !important;
  }

  body *{
    visibility:hidden !important;
  }

  #reportPreview,
  #reportPreview *,
  .print-root,
  .print-root *{
    visibility:visible !important;
  }

  #reportModal{
    position:static !important;
    inset:auto !important;
    display:block !important;
    padding:0 !important;
    background:#fff !important;
    width:100% !important;
    height:auto !important;
  }

  #reportPreview{
    position:static !important;
    overflow:visible !important;
    padding:0 !important;
    width:100% !important;
  }

  .work-report.detailed-one-page-report,
  .work-report.clean-work-report,
  .work-report{
    width:100% !important;
    max-width:100% !important;
    margin:0 !important;
    padding:0 !important;
    font-size:8.2px !important;
    line-height:1.12 !important;
    transform:none !important;
  }

  .work-report .professional-report-head{
    grid-template-columns:260px 1fr !important;
    gap:6px !important;
    padding:6px !important;
  }

  .work-report .report-brand img{
    width:42px !important;
    height:42px !important;
    min-width:42px !important;
  }

  .work-report .report-title-clean{
    font-size:14px !important;
  }

  .work-report .report-meta-clean{
    gap:4px !important;
  }

  .work-report .report-meta-clean > div{
    padding:4px 5px !important;
  }

  .work-report .report-meta-clean span{
    font-size:6.8px !important;
  }

  .work-report .report-meta-clean strong{
    font-size:7.4px !important;
    line-height:1.05 !important;
  }

  .work-report .combined-total-card,
  .work-report .report-info{
    gap:4px !important;
  }

  .work-report .combined-total-card > div,
  .work-report .report-info > div{
    padding:4px 5px !important;
  }

  .work-report th{
    font-size:6.7px !important;
    padding:2px !important;
  }

  .work-report td{
    font-size:6.9px !important;
    padding:2px !important;
    line-height:1.04 !important;
  }

  .work-report .mini-address,
  .work-report .manual-location-chip{
    font-size:6.8px !important;
    line-height:1.04 !important;
  }

  .work-report .manual-location-chip a{
    display:none !important;
  }

  .work-report .report-section{
    margin-top:3px !important;
    padding:4px !important;
  }

  .work-report .report-signature{
    margin-top:4px !important;
    font-size:7px !important;
  }

  .work-report .report-footer-branded{
    margin-top:4px !important;
    font-size:6.8px !important;
    line-height:1 !important;
  }
}

@media (max-width:900px){
  #reportModal:not(.hidden){
    padding:0 !important;
  }

  #reportModal .modal-card,
  #reportModal .report-modal,
  #reportModal .report-card{
    height:100vh !important;
    max-height:100vh !important;
    border-radius:0 !important;
  }

  .work-report .professional-report-head{
    grid-template-columns:1fr !important;
  }

  .work-report .report-meta-clean{
    grid-template-columns:1fr !important;
  }

  .work-report .report-table-wrap{
    overflow-x:auto !important;
  }

  .work-report .unified-report-table{
    min-width:1050px !important;
  }
}


/* === Manual report map links === */
.work-report .map-cell{
  white-space:nowrap !important;
  text-align:center !important;
}

.work-report .map-cell .map-mini,
.work-report .map-mini{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-width:24px !important;
  margin:1px 2px !important;
  padding:2px 6px !important;
  border-radius:999px !important;
  border:1px solid #dbe5ef !important;
  background:#f8fafc !important;
  color:#0f766e !important;
  font-size:9px !important;
  font-weight:900 !important;
  text-decoration:none !important;
}


/* === Force manual report map links visible === */
.work-report .manual-report-row .map-cell{
  white-space:nowrap !important;
  text-align:center !important;
  min-width:54px !important;
}

.work-report .manual-report-row .map-cell .map-mini{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  margin:1px 2px !important;
  padding:2px 6px !important;
  border-radius:999px !important;
  border:1px solid #dbe5ef !important;
  background:#f8fafc !important;
  color:#0f766e !important;
  font-size:9px !important;
  font-weight:900 !important;
  text-decoration:none !important;
}


/* === Move GPS notice from body to modal === */
.gps-fixed-notice,
.location-fixed-notice,
.gps-notice-banner,
.location-notice-banner,
.notice-banner{
  display:none !important;
}

#gpsNoticeBtn{
  width:100%;
  text-align:left;
}

#gpsNoticeModal.compact-status-modal{
  position:fixed !important;
  inset:0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:18px !important;
  background:rgba(15,23,42,.45) !important;
  backdrop-filter:blur(4px) !important;
  z-index:100000 !important;
}

#gpsNoticeModal[hidden]{
  display:none !important;
}

#gpsNoticeModal .gps-notice-card{
  width:min(92vw, 460px) !important;
  grid-template-columns:48px 1fr auto !important;
}

#gpsNoticeModal .status-icon.info{
  background:#eff6ff !important;
  color:#2563eb !important;
  border:1px solid #bfdbfe !important;
}

@media (max-width:640px){
  #gpsNoticeModal .gps-notice-card{
    grid-template-columns:1fr !important;
    text-align:center !important;
    justify-items:center !important;
  }
}


/* === FORCE visible GPS modal button === */
.gps-notice-launch-wrap{
  padding:10px 14px !important;
}

#gpsNoticeBtn{
  width:100% !important;
  min-height:44px !important;
  border-radius:12px !important;
  border:1px solid #dbe5ef !important;
  background:#f8fafc !important;
  color:#0f172a !important;
  font-weight:900 !important;
  cursor:pointer !important;
}

/* === FORCE working modal === */
#gpsNoticeModal.gps-modal-backdrop,
.gps-modal-backdrop{
  position:fixed !important;
  inset:0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:18px !important;
  background:rgba(15,23,42,.55) !important;
  backdrop-filter:blur(5px) !important;
  z-index:100000 !important;
}

#gpsNoticeModal[hidden]{
  display:none !important;
}

.gps-modal-card{
  width:min(92vw, 460px) !important;
  background:#ffffff !important;
  border:1px solid #dbe5ef !important;
  border-radius:20px !important;
  padding:20px !important;
  display:grid !important;
  grid-template-columns:52px 1fr !important;
  gap:14px !important;
  box-shadow:0 30px 90px rgba(15,23,42,.30) !important;
}

.gps-modal-icon{
  width:48px !important;
  height:48px !important;
  border-radius:16px !important;
  background:#eff6ff !important;
  border:1px solid #bfdbfe !important;
  color:#2563eb !important;
  font-size:24px !important;
  font-weight:900 !important;
  display:grid !important;
  place-items:center !important;
}

.gps-modal-content h3{
  margin:0 0 6px !important;
  color:#0f172a !important;
  font-size:18px !important;
  line-height:1.2 !important;
}

.gps-modal-content p{
  margin:0 !important;
  color:#475569 !important;
  font-size:13px !important;
  line-height:1.5 !important;
}

#closeGpsNoticeModal{
  grid-column:1 / -1 !important;
  margin-top:6px !important;
  min-height:44px !important;
  border-radius:12px !important;
  border:1px solid #dbe5ef !important;
  background:#f8fafc !important;
  color:#0f172a !important;
  font-weight:900 !important;
}

@media (max-width:640px){
  .gps-modal-card{
    grid-template-columns:1fr !important;
    justify-items:center !important;
    text-align:center !important;
  }
}


/* === FINAL FIX: GPS notice modal + report settings GPS address button === */
#gpsNoticeBtn,
#useCurrentGpsAddressBtn,
#useCurrentGPSAddressBtn,
#useGpsAddressBtn,
#useCurrentAddressBtn,
#currentGpsAddressBtn,
#storeGpsBtn{
  pointer-events:auto !important;
  cursor:pointer !important;
}

#gpsNoticeModal.gps-modal-backdrop,
#gpsNoticeModal{
  position:fixed !important;
  inset:0 !important;
  align-items:center !important;
  justify-content:center !important;
  padding:18px !important;
  background:rgba(15,23,42,.55) !important;
  backdrop-filter:blur(5px) !important;
  z-index:100000 !important;
}

#gpsNoticeModal:not([hidden]),
#gpsNoticeModal.is-open{
  display:flex !important;
}

#gpsNoticeModal[hidden]{
  display:none !important;
}

#gpsNoticeModal .gps-modal-card{
  width:min(92vw, 460px) !important;
  background:#ffffff !important;
  border:1px solid #dbe5ef !important;
  border-radius:20px !important;
  padding:20px !important;
  display:grid !important;
  grid-template-columns:52px 1fr !important;
  gap:14px !important;
  box-shadow:0 30px 90px rgba(15,23,42,.30) !important;
}

#gpsNoticeModal .gps-modal-icon{
  width:48px !important;
  height:48px !important;
  border-radius:16px !important;
  background:#eff6ff !important;
  border:1px solid #bfdbfe !important;
  color:#2563eb !important;
  font-size:24px !important;
  font-weight:900 !important;
  display:grid !important;
  place-items:center !important;
}

#gpsNoticeModal .gps-modal-content h3{
  margin:0 0 6px !important;
  color:#0f172a !important;
  font-size:18px !important;
  line-height:1.2 !important;
}

#gpsNoticeModal .gps-modal-content p{
  margin:0 !important;
  color:#475569 !important;
  font-size:13px !important;
  line-height:1.5 !important;
}

#gpsNoticeModal #closeGpsNoticeModal{
  grid-column:1 / -1 !important;
  margin-top:6px !important;
  min-height:44px !important;
  border-radius:12px !important;
  border:1px solid #dbe5ef !important;
  background:#f8fafc !important;
  color:#0f172a !important;
  font-weight:900 !important;
}

@media (max-width:640px){
  #gpsNoticeModal .gps-modal-card{
    grid-template-columns:1fr !important;
    text-align:center !important;
    justify-items:center !important;
  }
}



/* === FINAL FIX: GPS failure modal UX/readability === */
#gpsFailModal:not(.hidden),
#gpsFailModal{
  position:fixed !important;
  inset:0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:18px !important;
  background:rgba(15,23,42,.55) !important;
  backdrop-filter:blur(5px) !important;
  z-index:100000 !important;
  overflow:auto !important;
}

#gpsFailModal.hidden{
  display:none !important;
}

#gpsFailModal .message-card,
#gpsFailModal .modal-card,
#gpsFailModal > div{
  width:min(94vw, 620px) !important;
  max-width:620px !important;
  min-width:320px !important;
  max-height:calc(100vh - 36px) !important;
  overflow-y:auto !important;
  background:#ffffff !important;
  border:1px solid #dbe5ef !important;
  border-radius:18px !important;
  box-shadow:0 30px 90px rgba(15,23,42,.32) !important;
  padding:18px !important;
  display:block !important;
  text-align:left !important;
  box-sizing:border-box !important;
}

/* prevent any old grid/sidebar rules from squeezing content */
#gpsFailModal .message-card *,
#gpsFailModal .modal-card *,
#gpsFailModal > div *{
  max-width:100% !important;
  box-sizing:border-box !important;
  writing-mode:horizontal-tb !important;
  text-orientation:mixed !important;
  word-break:normal !important;
  overflow-wrap:break-word !important;
  white-space:normal !important;
}

#gpsFailModal .status-icon{
  width:38px !important;
  height:38px !important;
  min-width:38px !important;
  border-radius:50% !important;
  display:grid !important;
  place-items:center !important;
  margin:0 0 10px 0 !important;
  float:none !important;
}

#gpsFailModal h3,
#gpsFailModal #gpsFailTitle{
  display:block !important;
  width:100% !important;
  margin:0 0 8px 0 !important;
  padding:0 !important;
  color:#0f172a !important;
  font-size:20px !important;
  line-height:1.2 !important;
  font-weight:900 !important;
}

#gpsFailModal p{
  display:block !important;
  width:100% !important;
  margin:0 0 12px 0 !important;
  padding:0 !important;
  color:#475569 !important;
  font-size:14px !important;
  line-height:1.45 !important;
}

#gpsFailModal #gpsFailSystemMessage,
#gpsFailModal .system-note,
#gpsFailModal .locked-system-message{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  margin:12px 0 14px 0 !important;
  padding:12px 14px !important;
  border-radius:12px !important;
  border:1px solid #fed7aa !important;
  background:#fff7ed !important;
  color:#7c2d12 !important;
  font-size:14px !important;
  line-height:1.4 !important;
  letter-spacing:normal !important;
  text-align:left !important;
}

#gpsFailModal #gpsFailSystemMessage strong,
#gpsFailModal .system-note strong,
#gpsFailModal .locked-system-message strong{
  display:block !important;
  width:100% !important;
  margin:0 0 6px 0 !important;
  font-size:11px !important;
  line-height:1.2 !important;
  letter-spacing:.08em !important;
  text-transform:uppercase !important;
  color:#9a3412 !important;
}

#gpsFailModal label{
  display:block !important;
  width:100% !important;
  margin:12px 0 8px 0 !important;
  color:#334155 !important;
  font-size:14px !important;
  line-height:1.3 !important;
  font-weight:800 !important;
}

#gpsFailModal textarea,
#gpsFailModal #gpsFailNote{
  display:block !important;
  width:100% !important;
  min-width:0 !important;
  min-height:82px !important;
  margin:0 0 12px 0 !important;
  padding:12px !important;
  border:1px solid #cbd5e1 !important;
  border-radius:12px !important;
  color:#0f172a !important;
  font-size:14px !important;
  line-height:1.45 !important;
  resize:vertical !important;
}

#gpsFailModal .message-actions,
#gpsFailModal .modal-actions{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:10px !important;
  width:100% !important;
  margin:12px 0 0 0 !important;
  padding:0 !important;
}

#gpsFailModal .message-actions button,
#gpsFailModal .modal-actions button,
#gpsFailModal button{
  min-height:44px !important;
  border-radius:12px !important;
  font-size:14px !important;
  font-weight:900 !important;
  padding:10px 14px !important;
  white-space:normal !important;
}

#gpsFailModal #confirmGpsFailPunchOutBtn,
#gpsFailModal .danger,
#gpsFailModal .primary.danger{
  background:#c81e1e !important;
  color:#ffffff !important;
}

@media (max-width:520px){
  #gpsFailModal{
    padding:10px !important;
  }

  #gpsFailModal .message-card,
  #gpsFailModal .modal-card,
  #gpsFailModal > div{
    width:100% !important;
    max-width:100% !important;
    padding:16px !important;
    border-radius:16px !important;
  }

  #gpsFailModal h3,
  #gpsFailModal #gpsFailTitle{
    font-size:18px !important;
  }

  #gpsFailModal .message-actions,
  #gpsFailModal .modal-actions{
    grid-template-columns:1fr !important;
  }
}


/* === Remove unwanted empty top bar === */
.gps-fixed-notice,
.location-fixed-notice,
.gps-notice-banner,
.location-notice-banner,
.notice-banner,
.top-warning-bar,
.empty-warning-bar{
  display:none !important;
  visibility:hidden !important;
  opacity:0 !important;
  height:0 !important;
  min-height:0 !important;
  max-height:0 !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
}

/* Hide accidental empty bordered bars */
div[style*="border"][style*="orange"]:empty,
div[style*="border-color"]:empty{
  display:none !important;
}

/* Force GPS modal visibility */
#gpsNoticeModal{
  position:fixed !important;
  inset:0 !important;
  align-items:center !important;
  justify-content:center !important;
  background:rgba(15,23,42,.55) !important;
  z-index:999999 !important;
}

#gpsNoticeModal[hidden]{
  display:none !important;
}

#gpsNoticeModal.is-open{
  display:flex !important;
}


/* === FINAL: remove actual empty top bar under header === */
header + div:empty,
.app-header + div:empty,
.topbar + div:empty,
main > div:empty:first-child,
body > div:empty{
  display:none !important;
  height:0 !important;
  min-height:0 !important;
  max-height:0 !important;
  padding:0 !important;
  margin:0 !important;
  border:0 !important;
  overflow:hidden !important;
}

/* Hide any empty bordered/notice element under header */
header ~ .notice:empty,
header ~ .warning:empty,
header ~ .alert:empty,
header ~ .gps-notice:empty,
header ~ .location-notice:empty,
header ~ .notice-banner:empty,
header ~ .gps-notice-banner:empty,
header ~ .location-notice-banner:empty,
header ~ .top-warning-bar:empty,
header ~ .empty-warning-bar:empty{
  display:none !important;
}

/* The visible issue is a thin empty yellow/orange bordered bar.
   Hide empty elements with only border and no content. */
div:empty{
  font-size:0 !important;
}

div:empty:not(#gpsNoticeModal):not(#reportModal):not(#reportRangeModal):not(#gpsFailModal):not([class*="modal"]){
  min-height:0 !important;
}

/* Specific safe cleanup for body-level empty bar */
body > .notice-banner,
body > .gps-notice-banner,
body > .location-notice-banner,
body > .top-warning-bar,
body > .empty-warning-bar,
main > .notice-banner,
main > .gps-notice-banner,
main > .location-notice-banner,
main > .top-warning-bar,
main > .empty-warning-bar{
  display:none !important;
  height:0 !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
}

/* If the bar is the old GPS message container, fully collapse it */
#gpsNoticeInline,
#locationNoticeInline,
#gpsInlineNotice,
#locationInlineNotice,
#gpsNoticeBar,
#locationNoticeBar{
  display:none !important;
  height:0 !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
}



/* === FINAL FIX: Confirm Action modal UX === */
.confirm-modal,
#confirmModal,
.modal-confirm{
  position:fixed !important;
  inset:0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:18px !important;
  background:rgba(15,23,42,.55) !important;
  backdrop-filter:blur(4px) !important;
  z-index:100000 !important;
}

.confirm-modal.hidden,
#confirmModal.hidden,
.modal-confirm.hidden{
  display:none !important;
}

.confirm-modal .message-card,
#confirmModal .message-card,
.modal-confirm .message-card,
.confirm-modal .modal-card,
#confirmModal .modal-card,
.modal-confirm .modal-card{
  width:min(92vw, 520px) !important;
  max-width:520px !important;
  min-width:320px !important;
  background:#ffffff !important;
  border:1px solid #dbe5ef !important;
  border-radius:18px !important;
  box-shadow:0 25px 80px rgba(15,23,42,.30) !important;
  padding:20px !important;
  display:block !important;
  overflow:hidden !important;
  box-sizing:border-box !important;
}

/* prevent vertical crushed text */
.confirm-modal *,
#confirmModal *,
.modal-confirm *{
  writing-mode:horizontal-tb !important;
  text-orientation:mixed !important;
  white-space:normal !important;
  overflow-wrap:break-word !important;
  word-break:normal !important;
  max-width:100% !important;
  box-sizing:border-box !important;
}

.confirm-modal .status-icon,
#confirmModal .status-icon,
.modal-confirm .status-icon{
  width:42px !important;
  height:42px !important;
  min-width:42px !important;
  border-radius:50% !important;
  display:grid !important;
  place-items:center !important;
  margin:0 0 12px 0 !important;
  float:none !important;
}

.confirm-modal h3,
#confirmModal h3,
.modal-confirm h3{
  margin:0 0 10px 0 !important;
  color:#0f172a !important;
  font-size:24px !important;
  line-height:1.2 !important;
  font-weight:900 !important;
}

.confirm-modal p,
#confirmModal p,
.modal-confirm p{
  display:block !important;
  width:100% !important;
  margin:0 0 18px 0 !important;
  color:#475569 !important;
  font-size:15px !important;
  line-height:1.5 !important;
  text-align:left !important;
}

.confirm-modal .message-actions,
#confirmModal .message-actions,
.modal-confirm .message-actions,
.confirm-modal .modal-actions,
#confirmModal .modal-actions,
.modal-confirm .modal-actions{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:12px !important;
  width:100% !important;
  margin-top:10px !important;
}

.confirm-modal button,
#confirmModal button,
.modal-confirm button{
  min-height:46px !important;
  border-radius:12px !important;
  font-size:15px !important;
  font-weight:900 !important;
  padding:10px 16px !important;
}

@media (max-width:520px){
  .confirm-modal .message-actions,
  #confirmModal .message-actions,
  .modal-confirm .message-actions,
  .confirm-modal .modal-actions,
  #confirmModal .modal-actions,
  .modal-confirm .modal-actions{
    grid-template-columns:1fr !important;
  }

  .confirm-modal .message-card,
  #confirmModal .message-card,
  .modal-confirm .message-card,
  .confirm-modal .modal-card,
  #confirmModal .modal-card,
  .modal-confirm .modal-card{
    padding:16px !important;
  }

  .confirm-modal h3,
  #confirmModal h3,
  .modal-confirm h3{
    font-size:20px !important;
  }
}

/* Main page report range selector */
.main-range-card{
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:#f8fafc;
  padding:12px;
  margin-bottom:12px;
}
.main-range-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin-bottom:10px;}
.main-range-head strong{display:block;font-size:14px;color:#111827;margin-bottom:3px;}
.main-range-head span{display:block;font-size:12px;color:var(--muted);line-height:1.35;}
.main-range-grid{display:grid;grid-template-columns:1fr 1fr auto;gap:10px;align-items:end;}
.main-range-grid label{display:grid;gap:5px;font-size:12px;font-weight:700;color:#475569;}
.main-range-grid input{height:42px;border:1px solid var(--line);border-radius:4px;padding:0 10px;background:#fff;color:#111827;}
.main-range-grid button{height:42px;white-space:nowrap;}
#mainRangeStatus{display:block;margin-top:8px;color:var(--muted);font-size:12px;}
@media(max-width:760px){
  .main-range-grid{grid-template-columns:1fr 1fr;}
  .main-range-grid button{grid-column:1 / -1;width:100%;}
}
@media(max-width:420px){.main-range-grid{grid-template-columns:1fr;}}


/* === Compact main report filter === */
.compact-range-card{padding:12px!important;margin-bottom:12px!important;}
.compact-main-range-grid{grid-template-columns:1.1fr 1fr 1fr auto!important;gap:8px!important;align-items:end!important;}
.compact-main-range-grid label{min-width:0!important;}
.compact-main-range-grid select,
.compact-main-range-grid input{height:38px!important;border:1px solid var(--line)!important;border-radius:4px!important;padding:0 9px!important;background:#fff!important;color:#111827!important;width:100%!important;}
.compact-main-range-grid button{height:38px!important;padding:0 14px!important;white-space:nowrap!important;}
.main-custom-date.hidden{display:none!important;}
@media(max-width:760px){.compact-main-range-grid{grid-template-columns:1fr auto!important}.compact-main-range-grid .main-custom-date{grid-column:1 / -1}.compact-main-range-grid button{width:100%!important}}
@media(max-width:420px){.compact-main-range-grid{grid-template-columns:1fr!important}.compact-main-range-grid button{grid-column:1 / -1!important}}


.main-report-confirm.hidden {
  display: none !important;
}

.main-report-confirm {
  margin-top: 12px;
}

.main-report-confirm-card {
  border: 1px solid rgba(37, 99, 235, 0.22);
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.main-report-confirm-card strong {
  display: block;
  color: #0f172a;
  margin-bottom: 4px;
}

.main-report-confirm-card p {
  margin: 0 0 10px;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.35;
}

.main-report-confirm-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Work Status Notes moved into Menu only */
.app-menu .menu-status-notes{
  width:100%;
  margin:6px 0;
  padding:8px 10px;
  border:1px solid rgba(148,163,184,.25);
  border-radius:10px;
  background:rgba(255,255,255,.72);
}
.app-menu .menu-status-notes summary{
  cursor:pointer;
  font-weight:700;
}
.app-menu .menu-status-notes ul{
  margin:8px 0 0;
  padding-left:18px;
}


.shift-history-range-status{
  display:block;
  margin:4px 0 12px;
  color:#64748b;
  font-size:.88rem;
}



/* === Clean menu fix === */
.app-menu .menu-list{
  padding:10px !important;
  gap:8px !important;
  min-width:190px;
}

.app-menu .menu-list button,
.app-menu .menu-list .file-label{
  width:100%;
  min-height:38px;
  border-radius:7px !important;
  border:1px solid #d6dee9 !important;
  background:#f8fafc !important;
  color:#0f172a !important;
  font-weight:700 !important;
  justify-content:flex-start;
  box-shadow:none !important;
}

.app-menu .menu-list button:hover,
.app-menu .menu-list .file-label:hover{
  background:#eef6ff !important;
  border-color:#b9cbe4 !important;
  color:#075fce !important;
}

.app-menu .menu-list button#reportBtn{
  background:#0b6ff2 !important;
  color:#fff !important;
  border-color:#0b6ff2 !important;
}

.hidden-smart-list{
  display:none !important;
}



/* === Keep original menu working but hidden === */
.topbar .app-menu{
  display:none !important;
}



/* === Safe Current Shift Quick Menu UI === */
.current-shift-safe-menu{
  margin:12px 0 16px;
  border:1px solid #d7e1ee;
  border-radius:12px;
  background:#ffffff;
  overflow:hidden;
  box-shadow:0 8px 18px rgba(15,23,42,.05);
}

.safe-menu-title{
  padding:11px 14px;
  background:linear-gradient(135deg,#eef6ff,#ffffff);
  border-bottom:1px solid #d7e1ee;
  color:#0f3b78;
  font-weight:800;
}

.safe-menu-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  padding:10px;
}

.safe-menu-grid button{
  min-height:40px;
  border-radius:8px;
  border:1px solid #d4deea;
  background:#f8fafc;
  color:#0f172a;
  font-weight:750;
  font-size:.88rem;
  text-align:center;
  padding:8px 10px;
  cursor:pointer;
}

.safe-menu-grid button:hover{
  background:#eef6ff;
  border-color:#b8cbe7;
  color:#075fce;
}

#safeGenerateReportBtn{
  grid-column:1 / -1;
  background:linear-gradient(135deg,#0b6ff2,#055fd2);
  color:#fff;
  border-color:#0b6ff2;
}

#safeWorkStatusBtn,
#safeTermsBtn{
  grid-column:1 / -1;
}

@media (max-width:520px){
  .safe-menu-grid{
    grid-template-columns:1fr;
  }
}







/* === Report badge + adjustable column polish === */

/* Remove the box/border behind Auto and Manual labels in reports */
.report-preview .type-pill,
.report-card .type-pill,
.print-root .type-pill,
.type-pill.auto-pill,
.type-pill.manual-pill,
.auto-pill,
.manual-pill{
  border:none !important;
  box-shadow:none !important;
  outline:none !important;
  background:transparent !important;
  padding:0 !important;
  border-radius:0 !important;
  font-weight:800 !important;
}

/* Keep simple text color only */
.type-pill.auto-pill,
.auto-pill{
  color:#0077b6 !important;
}

.type-pill.manual-pill,
.manual-pill{
  color:#7c3aed !important;
}

/* Make report table columns easier to adjust in browser */
.report-preview table,
.report-card table,
.print-root table,
.report-table{
  table-layout:fixed !important;
  width:100% !important;
}

/* Browser-supported drag resize for table headers */
.report-preview th,
.report-card th,
.print-root th,
.report-table th{
  resize:horizontal;
  overflow:auto;
  min-width:48px;
  max-width:520px;
  position:relative;
}

/* Visual hint that report columns can be resized */
.report-preview th::after,
.report-card th::after,
.print-root th::after,
.report-table th::after{
  content:"";
  position:absolute;
  right:3px;
  top:25%;
  width:3px;
  height:50%;
  border-right:1px solid rgba(15, 23, 42, .22);
  opacity:.45;
  pointer-events:none;
}

.report-preview th:hover::after,
.report-card th:hover::after,
.print-root th:hover::after,
.report-table th:hover::after{
  opacity:.9;
}

/* Better wrapping after columns are resized */
.report-preview td,
.report-card td,
.print-root td,
.report-table td{
  word-break:break-word;
  overflow-wrap:anywhere;
  vertical-align:top;
}

/* Prevent tiny badge cells from creating a visible box */
.report-preview td:first-child,
.report-card td:first-child,
.print-root td:first-child{
  background:transparent !important;
}

/* Slightly cleaner Auto/Manual cell */
.report-preview td .type-pill,
.report-card td .type-pill,
.print-root td .type-pill{
  display:inline !important;
  line-height:1.2 !important;
}



















/* === Grid report resize replacement CSS === */
.grid-report-preview,
#reportPreview{
  overflow-x:auto !important;
}

.grid-report-wrap{
  width:max-content;
  min-width:100%;
  overflow:visible;
}

.grid-report-table{
  display:grid;
  grid-template-columns:var(--report-grid-cols);
  width:max-content;
  min-width:100%;
  border:1px solid #d6e0ec;
  border-radius:10px;
  overflow:visible;
  background:#fff;
}

.grid-report-cell{
  min-height:42px;
  padding:8px 8px;
  border-right:1px solid #d6e0ec;
  border-bottom:1px solid #d6e0ec;
  overflow-wrap:anywhere;
  word-break:break-word;
  font-size:.82rem;
  line-height:1.25;
  background:#fff;
  position:relative;
}

.grid-report-head{
  background:#f1f5f9;
  color:#0f172a;
  font-weight:800;
  text-transform:uppercase;
  font-size:.78rem;
}

.grid-report-resize-handle{
  position:absolute;
  top:0;
  right:-7px;
  width:14px;
  height:100%;
  z-index:50;
  cursor:col-resize;
  background:transparent;
  user-select:none;
  touch-action:none;
}

.grid-report-resize-handle::before{
  content:"";
  position:absolute;
  top:16%;
  right:6px;
  width:2px;
  height:68%;
  background:#94a3b8;
  border-radius:999px;
}

.grid-report-resize-handle:hover{
  background:rgba(11,111,242,.12);
}

.grid-report-resize-handle:hover::before{
  background:#0b6ff2;
  width:3px;
}

.grid-report-resizing,
.grid-report-resizing *{
  cursor:col-resize !important;
  user-select:none !important;
}

/* Preserve plain Auto/Manual text style */
.grid-report-cell .type-pill,
.grid-report-cell .auto-pill,
.grid-report-cell .manual-pill{
  border:none !important;
  background:transparent !important;
  box-shadow:none !important;
  padding:0 !important;
  border-radius:0 !important;
}



/* === Compact GPS issue text in report === */
.gps-status-badge,
.gps-mini-chip,
.location-issue-text,
.grid-report-cell .gps-status-badge,
.grid-report-cell .gps-mini-chip{
  white-space:nowrap !important;
  display:inline-block !important;
  max-width:max-content !important;
  padding:2px 6px !important;
  font-size:.72rem !important;
  line-height:1.2 !important;
}

.compact-user-note,
.grid-report-cell .compact-user-note{
  display:block !important;
  margin-top:3px !important;
  font-size:.72rem !important;
  line-height:1.25 !important;
}



/* === Smart punch helper text === */
.safe-punch-help{
  display:block;
  color:#64748b;
  font-size:.82rem;
  line-height:1.35;
  margin-top:-4px;
  margin-bottom:2px;
}



/* === Live current shift counter UI === */
.safe-live-shift-counter{
  margin:10px 0 12px;
  border:1px solid #d8e2ee;
  border-radius:12px;
  background:#f8fafc;
  padding:10px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.safe-live-shift-counter .counter-label{
  color:#64748b;
  font-weight:750;
  font-size:.9rem;
}

.safe-live-shift-counter strong{
  font-size:1rem;
  font-weight:900;
}

.safe-live-shift-counter.on{
  background:#ecfdf5;
  border-color:#bbf7d0;
}

.safe-live-shift-counter.on strong{
  color:#047857;
}

.safe-live-shift-counter.off{
  background:#f8fafc;
  border-color:#d8e2ee;
}

.safe-live-shift-counter.off strong{
  color:#64748b;
}

@media (max-width:520px){
  .safe-live-shift-counter{
    align-items:flex-start;
    flex-direction:column;
    gap:4px;
  }
}



/* === Remove duplicate live counter label === */
.safe-live-shift-counter{
  justify-content:center !important;
  text-align:center !important;
}

.safe-live-shift-counter .counter-label{
  display:none !important;
}

.safe-live-shift-counter strong{
  width:100% !important;
  text-align:center !important;
}



/* === Live counter time only === */
.safe-live-shift-counter strong{
  font-size:1.05rem !important;
  letter-spacing:.01em !important;
}



/* === Restored two punch buttons === */
.button-row{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:10px !important;
  align-items:stretch !important;
  margin:14px 0 12px !important;
}

.button-row button{
  min-height:48px !important;
  border-radius:11px !important;
  font-weight:800 !important;
  font-size:.96rem !important;
  letter-spacing:.01em !important;
  border:1px solid transparent !important;
  box-shadow:0 8px 18px rgba(15,23,42,.08) !important;
  transition:
    background .18s ease,
    border-color .18s ease,
    color .18s ease,
    transform .18s ease,
    box-shadow .18s ease,
    opacity .18s ease !important;
}

.button-row button:hover:not(:disabled){
  transform:translateY(-1px) !important;
  box-shadow:0 10px 22px rgba(15,23,42,.14) !important;
}

.button-row button:active:not(:disabled){
  transform:translateY(0) !important;
  box-shadow:0 6px 14px rgba(15,23,42,.10) !important;
}

#punchInBtn{
  background:linear-gradient(135deg,#07845d,#07966c) !important;
  color:#fff !important;
  border-color:#07845d !important;
}

#punchOutBtn{
  background:linear-gradient(135deg,#dc6f73,#e58f92) !important;
  color:#fff !important;
  border-color:#dc6f73 !important;
}

#punchOutBtn:disabled,
#punchInBtn:disabled{
  opacity:.55 !important;
  cursor:not-allowed !important;
  transform:none !important;
  box-shadow:none !important;
}

#newManualShiftBtn{
  grid-column:1 / -1 !important;
  justify-self:start !important;
  min-width:190px !important;
  background:linear-gradient(135deg,#2563eb,#0f7d99) !important;
  color:#fff !important;
  border-color:#2563eb !important;
}

#gpsFailPunchOutBtn{
  grid-column:1 / -1 !important;
  background:#fff7ed !important;
  color:#9a3412 !important;
  border-color:#fed7aa !important;
}

@media (max-width:520px){
  .button-row{
    grid-template-columns:1fr 1fr !important;
  }
  #newManualShiftBtn{
    min-width:0 !important;
    width:100% !important;
  }
}



/* === Stronger Punch Out red button === */
#punchOutBtn{
  background:linear-gradient(135deg,#dc2626,#ef4444) !important;
  color:#fff !important;
  border-color:#dc2626 !important;
  box-shadow:0 8px 18px rgba(220,38,38,.22) !important;
}

#punchOutBtn:hover:not(:disabled){
  background:linear-gradient(135deg,#b91c1c,#dc2626) !important;
  border-color:#b91c1c !important;
  box-shadow:0 10px 22px rgba(220,38,38,.30) !important;
}

#punchOutBtn:active:not(:disabled){
  background:linear-gradient(135deg,#991b1b,#b91c1c) !important;
}

#punchOutBtn:disabled{
  background:linear-gradient(135deg,#f1a5a5,#f3b6b6) !important;
  color:#ffffff !important;
  border-color:#f1a5a5 !important;
  opacity:.72 !important;
}



/* === Individual action bars polish === */
.current-shift-safe-menu{
  margin:12px 0 16px !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  padding:0 !important;
  overflow:visible !important;
}

.safe-menu-grid{
  display:flex !important;
  flex-direction:column !important;
  gap:9px !important;
  padding:0 !important;
  align-items:stretch !important;
}

.safe-menu-grid button{
  position:relative !important;
  width:100% !important;
  min-height:44px !important;
  border-radius:12px !important;
  border:1px solid #d7e2ee !important;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%) !important;
  color:#102033 !important;
  font-weight:800 !important;
  font-size:.92rem !important;
  text-align:left !important;
  justify-content:flex-start !important;
  padding:11px 16px 11px 18px !important;
  cursor:pointer !important;
  box-shadow:0 6px 14px rgba(15,23,42,.045) !important;
  overflow:hidden !important;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease,
    background .18s ease,
    color .18s ease !important;
}

.safe-menu-grid button::before{
  content:"" !important;
  position:absolute !important;
  left:0 !important;
  top:0 !important;
  width:4px !important;
  height:100% !important;
  background:#2563eb !important;
  opacity:.75 !important;
  transition:width .18s ease, opacity .18s ease !important;
}

.safe-menu-grid button::after{
  content:"›" !important;
  position:absolute !important;
  right:14px !important;
  top:50% !important;
  transform:translateY(-50%) !important;
  color:#94a3b8 !important;
  font-size:1.2rem !important;
  font-weight:900 !important;
  transition:color .18s ease, transform .18s ease !important;
}

.safe-menu-grid button:hover{
  background:linear-gradient(180deg,#eef6ff 0%,#ffffff 100%) !important;
  border-color:#9fc0ef !important;
  color:#075fce !important;
  transform:translateX(3px) translateY(-1px) !important;
  box-shadow:0 10px 22px rgba(7,95,206,.12) !important;
}

.safe-menu-grid button:hover::before{
  width:7px !important;
  opacity:1 !important;
}

.safe-menu-grid button:hover::after{
  color:#075fce !important;
  transform:translateY(-50%) translateX(2px) !important;
}

.safe-menu-grid button:active{
  transform:translateX(2px) translateY(0) !important;
  box-shadow:0 5px 12px rgba(7,95,206,.10) !important;
}

.safe-menu-grid button:focus-visible{
  outline:2px solid #0b6ff2 !important;
  outline-offset:2px !important;
}

/* Give important actions a subtle matching accent without changing button structure */
#safeGenerateReportBtn::before{
  background:#0b6ff2 !important;
}

#safeReportSettingsBtn::before{
  background:#6366f1 !important;
}

#safeExportCsvBtn::before{
  background:#0891b2 !important;
}

#safeBackupBtn::before{
  background:#16a34a !important;
}

#safeNotificationsBtn::before{
  background:#f59e0b !important;
}

#safeWorkStatusBtn::before{
  background:#8b5cf6 !important;
}

#safeTermsBtn::before{
  background:#64748b !important;
}

#safeRestoreBtn::before{
  background:#ef4444 !important;
}



/* === Final mobile-friendly backup notice === */
.final-backup-notice-card,
.terms-card{
  max-width:560px !important;
  width:min(92vw, 560px) !important;
  padding:22px !important;
  border-radius:18px !important;
}

.final-backup-notice-card h2,
.terms-card h2{
  font-size:1.35rem !important;
  line-height:1.2 !important;
  margin-bottom:12px !important;
}

.final-backup-notice-card p,
.terms-card p{
  line-height:1.5 !important;
  margin:10px 0 !important;
}

.notice-list{
  display:grid;
  gap:10px;
  margin:14px 0;
}

.notice-list div{
  background:#f8fafc;
  border:1px solid #d8e2ee;
  border-radius:12px;
  padding:11px 12px;
  line-height:1.45;
  color:#0f172a;
}

.notice-list strong{
  color:#0f3b78;
}

.notice-final-line{
  background:#fff7ed;
  border:1px solid #fed7aa;
  border-radius:12px;
  padding:10px 12px;
  color:#7c2d12;
}

.final-backup-notice-card #termsOkBtn,
.terms-card #termsOkBtn{
  margin-top:14px !important;
  min-height:46px !important;
  border-radius:12px !important;
  font-weight:800 !important;
}

@media (max-width:520px){
  .final-backup-notice-card,
  .terms-card{
    width:94vw !important;
    padding:18px !important;
    border-radius:16px !important;
  }

  .final-backup-notice-card h2,
  .terms-card h2{
    font-size:1.18rem !important;
  }

  .notice-list div{
    padding:10px !important;
    font-size:.92rem !important;
  }
}



/* === Human friendly report filter text === */
.main-range-head strong{
  letter-spacing:.01em;
}

.main-range-head span{
  color:#64748b !important;
  font-size:.92rem !important;
  line-height:1.35 !important;
}

#mainRangeStatus{
  display:block !important;
  margin-top:10px !important;
  padding:9px 11px !important;
  border-radius:10px !important;
  background:#f8fafc !important;
  border:1px solid #d8e2ee !important;
  color:#0f3b78 !important;
  font-weight:750 !important;
  font-size:.9rem !important;
}

.stats-grid .stat span{
  line-height:1.25 !important;
}

/* Production header action menu */
.topbar .app-menu{
  display:block !important;
}

.topbar .top-actions{
  min-width:fit-content;
}

/* Clean nav-driven report settings */
.report-settings-modal{
  place-items:start center !important;
  overflow:auto !important;
  padding:28px 16px !important;
}

.report-settings-card{
  width:min(920px, 96vw) !important;
  max-height:none !important;
  padding:0 !important;
  overflow:hidden !important;
  border-radius:10px !important;
}

.settings-modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:18px 20px;
  background:#0f172a;
  color:#fff;
}

.settings-modal-head h2{
  margin:2px 0 0;
  font-size:22px;
  line-height:1.15;
}

.settings-kicker{
  margin:0;
  color:#bae6fd;
  font-size:12px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.settings-modal-head .ghost{
  background:rgba(255,255,255,.1) !important;
  border-color:rgba(255,255,255,.35) !important;
  color:#fff !important;
}

.settings-modal-body{
  display:grid;
  grid-template-columns:1.05fr .95fr;
  gap:0;
  background:#fff;
}

.settings-group{
  padding:18px 20px 20px;
}

.settings-group + .settings-group{
  border-left:1px solid #e2e8f0;
  background:#f8fafc;
}

.settings-group h3{
  margin:0 0 14px;
  color:#0f172a;
  font-size:15px;
}

.clean-settings-grid,
.clean-pay-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.clean-pay-grid .toggle-line{
  min-height:42px;
}

.clean-pay-grid .rate-field{
  grid-column:1 / -1;
}

.report-settings-card .settings-line{
  min-width:0;
}

.report-settings-card .settings-line input,
.report-settings-card .settings-line select,
.report-settings-card .settings-line textarea,
.report-settings-card #addressSearchInput{
  width:100%;
  min-height:42px;
  border:1px solid #cbd5e1;
  border-radius:7px;
  background:#fff;
}

.report-settings-card .settings-line textarea{
  min-height:68px;
  padding:10px;
}

.report-settings-card .field-status{
  color:#64748b;
}

.report-settings-card .toggle-line{
  border-color:#cbd5e1;
  border-radius:7px;
  background:#fff;
}

.report-settings-card .settings-actions{
  justify-content:flex-end;
  padding-top:2px;
}

.report-settings-card .settings-actions button{
  min-height:38px;
}

.report-settings-card .logo-preview-row{
  background:#fff;
  border:1px solid #cbd5e1;
  border-radius:7px;
}

.report-settings-card .brand-picker{
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px;
  align-items:end;
  margin-top:10px;
}

.report-settings-card .brand-picker > label:first-child{
  display:none;
}

.report-settings-card .upload-logo-btn{
  white-space:nowrap;
}

@media(max-width:820px){
  .report-settings-modal{
    padding:0 !important;
    place-items:end center !important;
  }

  .report-settings-card{
    width:100vw !important;
    max-height:92vh !important;
    overflow:auto !important;
    border-radius:14px 14px 0 0 !important;
  }

  .settings-modal-body{
    grid-template-columns:1fr;
  }

  .settings-group + .settings-group{
    border-left:0;
    border-top:1px solid #e2e8f0;
  }

  .clean-settings-grid,
  .clean-pay-grid{
    grid-template-columns:1fr;
  }

  .settings-modal-head{
    position:sticky;
    top:0;
    z-index:2;
  }
}

@media(max-width:520px){
  .settings-modal-head{
    padding:16px;
  }

  .settings-modal-head h2{
    font-size:19px;
  }

  .settings-group{
    padding:16px;
  }

  .report-settings-card .brand-picker{
    grid-template-columns:1fr;
  }

  .report-settings-card .settings-actions{
    display:grid;
    grid-template-columns:1fr;
  }
}

/* Final UX cleanup: one menu, lighter setup panels, separate app/brand icons */
.topbar{
  min-height:64px !important;
}

.topbar .brand img.app-logo{
  width:40px !important;
  height:40px !important;
  min-width:40px !important;
  background:#fff !important;
  border:1px solid rgba(255,255,255,.7) !important;
  border-radius:8px !important;
  padding:3px !important;
}

.topbar .brand h1{
  font-size:20px !important;
}

.topbar .brand p{
  font-size:12px !important;
}

.topbar .app-menu{
  display:block !important;
}

.app-menu summary{
  border-radius:8px !important;
}

.app-menu .menu-list{
  min-width:220px !important;
  border-radius:10px !important;
  padding:8px !important;
}

.app-menu .menu-list button,
.app-menu .menu-list .file-label{
  min-height:36px !important;
  border-radius:8px !important;
}

.current-shift-safe-menu{
  display:none !important;
}

.report-settings-card{
  width:min(760px, 94vw) !important;
  border-radius:12px !important;
}

.pay-settings-card{
  width:min(680px, 94vw) !important;
}

.settings-modal-head{
  padding:15px 18px !important;
  background:#111827 !important;
}

.settings-modal-head h2{
  font-size:20px !important;
}

.settings-modal-body,
.single-settings-body{
  grid-template-columns:1fr !important;
}

.settings-group{
  padding:16px 18px 18px !important;
}

.settings-group + .settings-group{
  border-left:0 !important;
  border-top:1px solid #e2e8f0 !important;
}

.clean-settings-grid{
  grid-template-columns:1fr 1fr !important;
  gap:10px !important;
}

.clean-pay-grid{
  grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
  gap:10px !important;
}

.clean-pay-grid .rate-field,
.clean-pay-grid .toggle-line,
.clean-pay-grid .full-field{
  grid-column:1 / -1 !important;
}

.report-settings-card .settings-line input,
.report-settings-card .settings-line select,
.report-settings-card .settings-line textarea,
.report-settings-card #addressSearchInput,
.report-settings-card .toggle-line{
  min-height:40px !important;
  border-radius:8px !important;
}

.report-settings-card .settings-line textarea{
  min-height:62px !important;
}

.report-settings-card .logo-preview-row{
  padding:8px !important;
}

.report-settings-card .logo-preview-row img{
  width:42px !important;
  height:42px !important;
  border-radius:8px !important;
  background:#fff !important;
}

.footer-brand-logo,
.report-footer-branded img{
  width:34px !important;
  height:34px !important;
  object-fit:contain !important;
  background:#fff !important;
  border:1px solid #e2e8f0 !important;
  border-radius:6px !important;
  padding:3px !important;
}

@media(max-width:760px){
  .topbar{
    gap:10px !important;
  }

  .top-actions{
    width:100% !important;
    display:flex !important;
    justify-content:flex-start !important;
  }

  .app-menu,
  .app-menu summary{
    width:100% !important;
  }

  .app-menu .menu-list{
    left:0 !important;
    right:auto !important;
    width:min(100%, 320px) !important;
  }

  .clean-settings-grid,
  .clean-pay-grid{
    grid-template-columns:1fr !important;
  }
}

/* Final navigation and mobile report optimization */
@media(min-width:901px){
  .topbar{
    align-items:center !important;
  }

  .top-actions{
    flex:1 1 auto !important;
    justify-content:flex-end !important;
  }

  .topbar .app-menu{
    width:auto !important;
  }

  .topbar .app-menu > summary{
    display:none !important;
  }

  .topbar .app-menu .menu-list{
    position:static !important;
    display:flex !important;
    align-items:center !important;
    justify-content:flex-end !important;
    flex-wrap:wrap !important;
    gap:7px !important;
    min-width:0 !important;
    padding:0 !important;
    border:0 !important;
    border-radius:0 !important;
    background:transparent !important;
    box-shadow:none !important;
  }

  .topbar .app-menu .menu-list button,
  .topbar .app-menu .menu-list .file-label{
    width:auto !important;
    min-height:34px !important;
    padding:7px 10px !important;
    border-color:rgba(255,255,255,.24) !important;
    background:rgba(255,255,255,.1) !important;
    color:#fff !important;
    justify-content:center !important;
  }

  .topbar .app-menu .menu-list button:hover,
  .topbar .app-menu .menu-list .file-label:hover{
    background:#fff !important;
    color:#0f172a !important;
    border-color:#fff !important;
  }

  .topbar .app-menu .menu-list #reportBtn{
    background:#fff !important;
    color:#0f172a !important;
    border-color:#fff !important;
  }
}

@media(max-width:900px){
  .topbar{
    align-items:flex-start !important;
    padding:12px !important;
  }

  .top-actions{
    width:100% !important;
  }

  .topbar .app-menu{
    width:100% !important;
  }

  .topbar .app-menu > summary{
    width:100% !important;
    justify-content:space-between !important;
  }

  .topbar .app-menu .menu-list{
    left:0 !important;
    right:auto !important;
    width:100% !important;
    min-width:0 !important;
    top:44px !important;
  }

  .topbar .app-menu:not([open]) .menu-list{
    display:none !important;
  }
}

#reportModal{
  padding:12px !important;
}

#reportModal .report-card{
  width:min(1180px, 98vw) !important;
  max-height:94vh !important;
  padding:14px !important;
  border-radius:12px !important;
}

#reportModal .section-title{
  margin-bottom:10px !important;
}

#reportModal .report-toolbar{
  display:flex !important;
  gap:8px !important;
  flex-wrap:wrap !important;
  padding:8px !important;
  margin-bottom:10px !important;
  background:#f8fafc !important;
  border:1px solid #e2e8f0 !important;
  border-radius:10px !important;
}

#reportModal .report-toolbar button{
  min-height:36px !important;
  border-radius:8px !important;
}

#reportModal .report-preview{
  padding:12px !important;
  border-radius:10px !important;
  background:#f8fafc !important;
}

.work-report.clean-work-report{
  background:#fff !important;
  border:1px solid #dbe3ea !important;
  border-radius:10px !important;
  padding:14px !important;
}

.work-report.clean-work-report .professional-report-head{
  border-radius:10px !important;
  border:1px solid #dbe3ea !important;
  background:#f8fafc !important;
}

.work-report.clean-work-report .combined-total-card{
  grid-template-columns:repeat(4, minmax(0, 1fr)) !important;
  gap:8px !important;
}

.work-report.clean-work-report .report-section{
  border-radius:10px !important;
}

.work-report.clean-work-report .report-table-wrap{
  border:1px solid #dbe3ea !important;
  border-radius:10px !important;
  overflow:auto !important;
  background:#fff !important;
  -webkit-overflow-scrolling:touch !important;
}

.work-report.clean-work-report .unified-report-table{
  min-width:980px !important;
}

@media(max-width:760px){
  body{
    background:#eef3f6 !important;
  }

  .layout{
    padding:8px !important;
    gap:8px !important;
  }

  .panel{
    border-radius:10px !important;
    padding:10px !important;
  }

  .button-row{
    top:0 !important;
    grid-template-columns:1fr 1fr !important;
    position:sticky !important;
    z-index:8 !important;
  }

  #gpsFailPunchOutBtn,
  #newManualShiftBtn{
    grid-column:1 / -1 !important;
  }

  .main-range-grid,
  .compact-main-range-grid{
    grid-template-columns:1fr !important;
  }

  .stats-grid{
    grid-template-columns:1fr 1fr !important;
  }

  #reportModal{
    padding:0 !important;
    align-items:end !important;
  }

  #reportModal .report-card{
    width:100vw !important;
    height:94vh !important;
    max-height:94vh !important;
    border-radius:16px 16px 0 0 !important;
    padding:10px !important;
  }

  #reportModal .section-title{
    position:sticky !important;
    top:0 !important;
    z-index:4 !important;
    background:#fff !important;
    padding:8px 0 !important;
  }

  #reportModal .report-toolbar{
    position:sticky !important;
    top:48px !important;
    z-index:3 !important;
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
  }

  #reportModal .report-toolbar button{
    width:100% !important;
    padding:8px !important;
  }

  #reportModal .report-preview{
    padding:8px !important;
    overflow:auto !important;
  }

  .work-report.clean-work-report{
    padding:10px !important;
    min-width:0 !important;
  }

  .work-report.clean-work-report .professional-report-head{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:8px !important;
  }

  .work-report.clean-work-report .report-meta{
    display:grid !important;
    grid-template-columns:1fr !important;
    text-align:left !important;
  }

  .work-report.clean-work-report .combined-total-card,
  .work-report.clean-work-report .report-source-summary,
  .work-report.clean-work-report .pay-breakdown .report-info,
  .work-report.clean-work-report .final-combined-summary .report-info{
    grid-template-columns:1fr 1fr !important;
  }

  .work-report.clean-work-report .report-table-wrap{
    overflow-x:auto !important;
  }

  .work-report.clean-work-report .unified-report-table{
    min-width:860px !important;
  }

  .report-signature{
    grid-template-columns:1fr !important;
  }
}

@media(max-width:430px){
  .stats-grid,
  .work-report.clean-work-report .combined-total-card,
  .work-report.clean-work-report .report-source-summary,
  .work-report.clean-work-report .pay-breakdown .report-info,
  .work-report.clean-work-report .final-combined-summary .report-info{
    grid-template-columns:1fr !important;
  }

  #reportModal .report-toolbar{
    grid-template-columns:1fr !important;
  }
}

/* Sidebar navigation and cleaner report preview */
.sidebar-toggle{
  min-height:40px !important;
  border-radius:10px !important;
  border:1px solid rgba(255,255,255,.28) !important;
  background:rgba(255,255,255,.12) !important;
  color:#fff !important;
  gap:8px !important;
  padding:8px 12px !important;
}

.sidebar-toggle:hover{
  background:#fff !important;
  color:#0f172a !important;
}

.sidebar-toggle-icon{
  font-size:18px;
  line-height:1;
}

.sidebar-backdrop{
  position:fixed;
  inset:0;
  z-index:60;
  background:rgba(15,23,42,.42);
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease;
}

.sidebar-backdrop.is-open{
  opacity:1;
  pointer-events:auto;
}

.sidebar-backdrop.hidden{
  display:block !important;
  opacity:0;
  pointer-events:none;
}

.app-sidebar{
  width:min(330px, 88vw);
  height:100%;
  background:#fff;
  border-right:1px solid #dbe3ea;
  box-shadow:18px 0 50px rgba(15,23,42,.2);
  transform:translateX(-104%);
  transition:transform .24s cubic-bezier(.2,.8,.2,1);
  display:flex;
  flex-direction:column;
}

.sidebar-backdrop.is-open .app-sidebar{
  transform:translateX(0);
}

.sidebar-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:16px;
  background:#0f172a;
  color:#fff;
}

.sidebar-head strong{
  display:block;
  font-size:20px;
  line-height:1.1;
}

.sidebar-kicker{
  display:block;
  color:#bae6fd;
  font-size:12px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
  margin-bottom:3px;
}

.sidebar-head .ghost{
  background:rgba(255,255,255,.12) !important;
  border-color:rgba(255,255,255,.32) !important;
  color:#fff !important;
}

.sidebar-menu-list{
  position:static !important;
  display:grid !important;
  gap:8px !important;
  min-width:0 !important;
  padding:14px !important;
  border:0 !important;
  border-radius:0 !important;
  background:#fff !important;
  box-shadow:none !important;
}

.sidebar-menu-list button,
.sidebar-menu-list .file-label{
  width:100% !important;
  min-height:42px !important;
  justify-content:flex-start !important;
  border-radius:10px !important;
  border:1px solid #dbe3ea !important;
  background:#f8fafc !important;
  color:#0f172a !important;
  box-shadow:none !important;
}

.sidebar-menu-list button:hover,
.sidebar-menu-list .file-label:hover{
  background:#eef6ff !important;
  border-color:#b7cbe8 !important;
  color:#075fce !important;
}

.sidebar-menu-list #reportBtn{
  background:#0f172a !important;
  border-color:#0f172a !important;
  color:#fff !important;
}

.topbar .app-menu,
.topbar .app-menu .menu-list{
  display:none !important;
}

#reportModal .report-card{
  width:min(1060px, 96vw) !important;
  padding:12px !important;
  background:#fff !important;
}

#reportModal .section-title{
  border-bottom:0 !important;
  padding-bottom:4px !important;
}

#reportModal .section-title span{
  font-size:18px !important;
}

#reportModal .report-toolbar{
  background:transparent !important;
  border:0 !important;
  padding:0 !important;
  justify-content:flex-end !important;
}

#reportModal .report-preview{
  background:#fff !important;
  border:1px solid #e2e8f0 !important;
  padding:10px !important;
}

.work-report.clean-work-report{
  border:0 !important;
  border-radius:0 !important;
  padding:8px !important;
}

.work-report.clean-work-report .report-source-summary,
.work-report.clean-work-report .pay-breakdown,
.work-report.clean-work-report .final-combined-summary,
.work-report.clean-work-report .manual-edit-details{
  display:none !important;
}

.work-report.clean-work-report .professional-report-head{
  padding:12px !important;
  margin-bottom:10px !important;
}

.work-report.clean-work-report .combined-total-card{
  margin-top:8px !important;
  padding:0 !important;
  background:transparent !important;
  border:0 !important;
}

.work-report.clean-work-report .combined-total-card > div{
  border:1px solid #dbe3ea !important;
  border-radius:10px !important;
  padding:10px !important;
  background:#f8fafc !important;
}

.work-report.clean-work-report .shift-detail-block{
  margin-top:10px !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
}

.work-report.clean-work-report .shift-detail-block > h3{
  font-size:15px !important;
  margin:0 0 6px !important;
}

.work-report.clean-work-report .one-page-period-line{
  margin:0 0 8px !important;
  color:#64748b !important;
}

.work-report.clean-work-report .report-subsection-title{
  display:none !important;
}

.work-report.clean-work-report .report-table-wrap{
  border-radius:10px !important;
}

@media(max-width:760px){
  .sidebar-backdrop{
    background:rgba(15,23,42,.5);
  }

  .app-sidebar{
    width:min(86vw, 320px);
  }

  #reportModal .report-card{
    padding:10px !important;
  }

  #reportModal .report-toolbar{
    grid-template-columns:1fr 1fr !important;
    background:#f8fafc !important;
    border:1px solid #e2e8f0 !important;
    padding:8px !important;
  }

  .work-report.clean-work-report .combined-total-card{
    grid-template-columns:1fr 1fr !important;
  }

  .work-report.clean-work-report .professional-report-head{
    padding:10px !important;
  }
}

@media(max-width:430px){
  .work-report.clean-work-report .combined-total-card{
    grid-template-columns:1fr !important;
  }
}

/* Current Shift action hub */
.top-actions{
  display:none !important;
}

.current-shift-safe-menu{
  display:block !important;
  margin:14px 0 0 !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}

.safe-menu-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding-bottom:8px;
  margin-bottom:9px;
  border-bottom:1px solid #e2e8f0;
}

.safe-menu-head strong{
  display:block;
  color:#0f172a;
  font-size:14px;
}

.safe-menu-head span{
  color:#64748b;
  font-size:11px;
  font-weight:700;
  text-align:right;
  text-transform:uppercase;
  letter-spacing:.03em;
}

.safe-menu-grid,
.safe-menu-list{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:7px !important;
}

.safe-menu-grid button,
.safe-menu-list button{
  position:relative !important;
  min-height:44px !important;
  padding:0 34px 0 20px !important;
  border:1px solid #d7e3f0 !important;
  border-radius:11px !important;
  background:#fff !important;
  color:#071327 !important;
  font-size:15px !important;
  font-weight:900 !important;
  box-shadow:0 6px 14px rgba(15,23,42,.035) !important;
  text-align:left !important;
  justify-content:flex-start !important;
  align-items:center !important;
  flex-direction:row !important;
  line-height:1.15 !important;
  white-space:normal !important;
  overflow:hidden !important;
  transition:transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease !important;
}

.safe-menu-list button::before{
  content:"" !important;
  position:absolute !important;
  left:0 !important;
  top:0 !important;
  bottom:0 !important;
  width:5px !important;
  background:#2f7dff !important;
}

.safe-menu-list button::after{
  content:"›" !important;
  position:absolute !important;
  right:14px !important;
  top:50% !important;
  transform:translateY(-50%) !important;
  color:#94a3b8 !important;
  font-size:24px !important;
  font-weight:900 !important;
  line-height:1 !important;
}

.safe-menu-grid button:hover,
.safe-menu-grid button:focus-visible,
.safe-menu-list button:hover,
.safe-menu-list button:focus-visible{
  transform:translateY(-1px) !important;
  background:#f8fbff !important;
  border-color:#bfd4ee !important;
  color:#071327 !important;
  box-shadow:0 14px 28px rgba(15,23,42,.08) !important;
}

#safeGenerateReportBtn{
  grid-column:auto !important;
  background:#fff !important;
  border-color:#d7e3f0 !important;
  color:#071327 !important;
}

#safeGenerateReportBtn:hover,
#safeGenerateReportBtn:focus-visible{
  background:#f8fbff !important;
  color:#071327 !important;
}

#safeGenerateReportBtn::before{background:#2f7dff !important;}
#safeReportSettingsBtn::before{background:#858bff !important;}
#safePaySettingsBtn::before{background:#14b8a6 !important;}
#safeExportCsvBtn::before{background:#32b8cf !important;}
#safeBackupBtn::before{background:#53d08f !important;}
#safeNotificationsBtn::before{background:#ffbe45 !important;}
#safeWorkStatusBtn::before{background:#9a7cff !important;}
#safeTermsBtn::before{background:#94a3b8 !important;}
#safeRestoreBtn::before{background:#ff6b6b !important;}

@media(max-width:760px){
  .current-shift-safe-menu{
    padding:0 !important;
    border-radius:0 !important;
  }

  .safe-menu-head{
    align-items:flex-start;
    flex-direction:column;
    gap:2px;
  }

  .safe-menu-head span{
    text-align:left;
  }

  .safe-menu-grid,
  .safe-menu-list{
    grid-template-columns:1fr !important;
    gap:14px !important;
  }

  #safeGenerateReportBtn{
    grid-column:1 / -1;
  }
}

@media(max-width:380px){
  .safe-menu-grid,
  .safe-menu-list{
    grid-template-columns:1fr !important;
  }

  #safeGenerateReportBtn{
    grid-column:auto;
  }
}

/* Human-readable report summary polish */
.summary-panel .section-title,
.history-panel .section-title{
  margin-bottom:12px !important;
}

.compact-range-card{
  padding:12px !important;
  border-radius:12px !important;
  background:#f8fafc !important;
  border:1px solid #dbe6f2 !important;
  box-shadow:none !important;
}

.main-range-head strong{
  font-size:16px !important;
  line-height:1.25 !important;
}

.main-range-head span,
.shift-history-range-status,
.manual-history-note{
  color:#64748b !important;
  font-size:13px !important;
  line-height:1.45 !important;
}

.stats-grid{
  gap:9px !important;
}

.stats-grid .stat{
  padding:11px !important;
  border-radius:12px !important;
  box-shadow:none !important;
}

.stats-grid .stat span,
.total-amount-card span,
.history-subhead small{
  text-transform:none !important;
  letter-spacing:0 !important;
}

.stats-grid .stat strong{
  font-size:20px !important;
}

.total-amount-card,
.history-total{
  border-radius:12px !important;
  box-shadow:none !important;
}

.history-total{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:4px 8px !important;
  align-items:center !important;
  padding:10px 12px !important;
  background:#f8fafc !important;
  border:1px solid #e2e8f0 !important;
  color:#334155 !important;
}

.history-subhead{
  margin-top:14px !important;
  padding:10px 0 7px !important;
  border-top:1px solid #e8eef5 !important;
}

.history-subhead span{
  font-size:15px !important;
}

.shift-card.compact-shift{
  border-radius:12px !important;
  box-shadow:none !important;
}

.shift-summary{
  min-height:52px !important;
}

.shift-meta{
  color:#64748b !important;
  font-size:13px !important;
}

.reason-chip.gps-mini-chip{
  text-transform:none !important;
  letter-spacing:0 !important;
}

@media(max-width:760px){
  .safe-menu-grid,
  .safe-menu-list{
    gap:8px !important;
  }

  .safe-menu-grid button,
  .safe-menu-list button{
    min-height:42px !important;
    border-radius:10px !important;
    font-size:14px !important;
    padding-left:16px !important;
  }

  .compact-main-range-grid{
    gap:8px !important;
  }

  .summary-panel,
  .history-panel{
    padding:14px !important;
  }
}

/* Compact professional report view */
#reportModal .report-card{
  width:min(940px, 96vw) !important;
  padding:12px !important;
}

#reportModal .section-title{
  margin-bottom:8px !important;
}

#reportModal .report-toolbar{
  margin-bottom:8px !important;
  padding:6px !important;
  gap:6px !important;
}

#reportModal .report-toolbar button{
  min-height:34px !important;
  padding:7px 10px !important;
  font-size:12px !important;
}

#reportModal .report-preview{
  padding:8px !important;
  border-radius:8px !important;
}

.work-report.clean-work-report{
  font-size:12px !important;
  line-height:1.25 !important;
}

.work-report.clean-work-report .professional-report-head{
  display:grid !important;
  grid-template-columns:260px 1fr !important;
  gap:8px !important;
  padding:8px !important;
  margin-bottom:8px !important;
  border-radius:8px !important;
  background:#fff !important;
}

.work-report.clean-work-report .report-brand{
  gap:8px !important;
}

.work-report.clean-work-report .report-brand img{
  width:34px !important;
  height:34px !important;
  padding:2px !important;
}

.work-report.clean-work-report .report-title-clean{
  font-size:16px !important;
  line-height:1.15 !important;
}

.work-report.clean-work-report .report-brand p{
  margin-top:1px !important;
  font-size:11px !important;
  color:#64748b !important;
  font-weight:700 !important;
}

.work-report.clean-work-report .report-meta-clean{
  display:grid !important;
  grid-template-columns:repeat(4, minmax(0, 1fr)) !important;
  gap:6px !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
}

.work-report.clean-work-report .report-meta-clean > div,
.work-report.clean-work-report .combined-total-card > div{
  padding:6px 7px !important;
  border:1px solid #e2e8f0 !important;
  border-radius:7px !important;
  background:#f8fafc !important;
}

.work-report.clean-work-report .report-meta-clean span,
.work-report.clean-work-report .combined-total-card span{
  font-size:9px !important;
  color:#64748b !important;
  text-transform:uppercase !important;
  letter-spacing:.03em !important;
}

.work-report.clean-work-report .report-meta-clean strong{
  display:block !important;
  margin-top:2px !important;
  font-size:11px !important;
  line-height:1.25 !important;
  max-height:42px !important;
  overflow:hidden !important;
}

.work-report.clean-work-report .combined-total-card{
  grid-template-columns:repeat(4, 1fr) !important;
  gap:6px !important;
  margin:0 0 8px !important;
  padding:0 !important;
}

.work-report.clean-work-report .break-summary-card{
  display:grid !important;
  grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
  gap:6px !important;
  margin:0 0 8px !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
}

.work-report.clean-work-report .break-summary-card > div{
  padding:6px 7px !important;
  border:1px solid #e2e8f0 !important;
  border-radius:7px !important;
  background:#fff !important;
}

.work-report.clean-work-report .break-summary-card span{
  display:block !important;
  color:#64748b !important;
  font-size:9px !important;
  font-weight:800 !important;
  text-transform:uppercase !important;
  letter-spacing:.03em !important;
}

.work-report.clean-work-report .break-summary-card strong{
  display:block !important;
  margin-top:2px !important;
  color:#0f172a !important;
  font-size:14px !important;
  line-height:1.15 !important;
}

.work-report.clean-work-report .break-summary-card small{
  display:block !important;
  margin-top:2px !important;
  color:#64748b !important;
  font-size:9px !important;
  line-height:1.2 !important;
}

.work-report.clean-work-report .combined-total-card strong{
  font-size:15px !important;
  line-height:1.15 !important;
}

.work-report.clean-work-report .combined-total-card small{
  display:block !important;
  margin-top:2px !important;
  font-size:9px !important;
  color:#64748b !important;
}

.work-report.clean-work-report .shift-detail-block{
  margin-top:6px !important;
  padding:0 !important;
}

.work-report.clean-work-report .shift-detail-block > h3{
  font-size:14px !important;
  margin:0 0 2px !important;
}

.work-report.clean-work-report .one-page-period-line{
  margin:0 0 6px !important;
  font-size:11px !important;
}

.work-report.clean-work-report .report-table-wrap{
  border-radius:7px !important;
}

.work-report.clean-work-report .unified-report-table{
  min-width:760px !important;
  font-size:10px !important;
}

.work-report.clean-work-report .unified-report-table th,
.work-report.clean-work-report .unified-report-table td{
  padding:4px 5px !important;
  line-height:1.18 !important;
}

.work-report.clean-work-report .unified-report-table th{
  font-size:9px !important;
}

.work-report.clean-work-report .type-pill,
.work-report.clean-work-report .gps-status-badge,
.work-report.clean-work-report .ok-badge{
  padding:2px 5px !important;
  border-radius:5px !important;
  font-size:9px !important;
  text-transform:none !important;
  letter-spacing:0 !important;
}

.work-report.clean-work-report .mini-address{
  margin:0 !important;
  line-height:1.2 !important;
}

.work-report.clean-work-report .mini-address b{
  min-width:22px !important;
  font-size:9px !important;
}

.work-report.clean-work-report .compact-notes-cell{
  max-width:90px !important;
}

.work-report.clean-work-report .report-signature{
  margin-top:8px !important;
  padding-top:8px !important;
  gap:10px !important;
  font-size:11px !important;
}

.work-report.clean-work-report .report-footer-branded{
  margin-top:8px !important;
  padding-top:6px !important;
  font-size:10px !important;
}

.work-report.clean-work-report .report-footer-branded img{
  width:18px !important;
  height:18px !important;
}

@media(max-width:760px){
  .work-report.clean-work-report .professional-report-head{
    grid-template-columns:1fr !important;
  }

  .work-report.clean-work-report .report-meta-clean,
  .work-report.clean-work-report .combined-total-card,
  .work-report.clean-work-report .break-summary-card{
    grid-template-columns:1fr 1fr !important;
  }

  .work-report.clean-work-report .unified-report-table{
    min-width:720px !important;
  }
}

/* Break button */
#breakBtn.break-btn{
  background:#fff7ed !important;
  border-color:#fed7aa !important;
  color:#9a3412 !important;
}

#breakBtn.break-btn.on-break{
  background:#0f172a !important;
  border-color:#0f172a !important;
  color:#fff !important;
  box-shadow:0 10px 22px rgba(15,23,42,.18) !important;
}

.badge.break{
  background:#fef3c7 !important;
  color:#92400e !important;
}

/* Final cleanup: left summary, calmer report, clearer pay setup */
@media(min-width:961px){
  .layout{
    grid-template-columns:360px minmax(0,1fr) !important;
    grid-template-areas:
      "control history"
      "summary history" !important;
    align-items:start !important;
  }

  .summary-panel{
    grid-area:summary !important;
  }

  .history-panel{
    grid-area:history !important;
  }
}

.summary-panel{
  box-shadow:none !important;
  border-color:#e2e8f0 !important;
}

.summary-panel .section-title span::before{
  content:"Work ";
  color:#64748b;
  font-weight:700;
}

.pay-help-line{
  padding:10px 12px !important;
  border:1px solid #e2e8f0 !important;
  border-radius:8px !important;
  background:#f8fafc !important;
}

.pay-help-line strong{
  font-size:13px !important;
  color:#0f172a !important;
}

.pay-help-line small{
  margin-top:2px !important;
}

.safe-live-shift-counter.break{
  border-color:#f59e0b !important;
  background:#fffbeb !important;
}

.safe-live-shift-counter.break strong::before{
  content:"On break ";
  color:#92400e;
  font-size:.72em;
  font-weight:900;
  text-transform:uppercase;
}

#reportModal .report-preview,
.work-report.clean-work-report,
.work-report.clean-work-report .professional-report-head,
.work-report.clean-work-report .report-meta-clean > div,
.work-report.clean-work-report .combined-total-card > div,
.work-report.clean-work-report .break-summary-card > div,
.work-report.clean-work-report .report-table-wrap{
  background:#fff !important;
  box-shadow:none !important;
}

.work-report.clean-work-report .professional-report-head{
  border:0 !important;
  padding:0 0 8px !important;
  margin-bottom:8px !important;
}

.work-report.clean-work-report .report-brand img{
  width:44px !important;
  height:44px !important;
  padding:0 !important;
  border:0 !important;
  border-radius:6px !important;
  background:transparent !important;
}

.work-report.clean-work-report .report-title-clean{
  font-size:18px !important;
  font-weight:900 !important;
}

.work-report.clean-work-report .report-meta-clean > div,
.work-report.clean-work-report .combined-total-card > div,
.work-report.clean-work-report .break-summary-card > div{
  border:0 !important;
  padding:4px 0 !important;
}

.work-report.clean-work-report .combined-total-card,
.work-report.clean-work-report .break-summary-card{
  border-top:1px solid #e5e7eb !important;
  border-bottom:1px solid #e5e7eb !important;
  padding:7px 0 !important;
}

.location-issue-text,
.work-report.clean-work-report .location-issue-text{
  color:#475569 !important;
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
  padding:0 !important;
  font-size:10px !important;
  font-weight:700 !important;
  text-transform:none !important;
}

.work-report.clean-work-report .gps-status-badge,
.work-report.clean-work-report .type-pill,
.work-report.clean-work-report .ok-badge,
.work-report.clean-work-report .edit-badge,
.work-report.clean-work-report .strike-badge{
  background:transparent !important;
  border:0 !important;
  color:#475569 !important;
  padding:0 !important;
  border-radius:0 !important;
  font-size:10px !important;
  font-weight:700 !important;
}

.work-report.clean-work-report .gps-status-badge{
  display:inline !important;
  max-width:none !important;
}

.work-report.clean-work-report .report-footer-branded,
.work-report.clean-work-report .compact-footer-line{
  font-size:12px !important;
  color:#334155 !important;
  border-top:1px solid #e5e7eb !important;
  padding-top:8px !important;
  align-items:center !important;
}

.work-report.clean-work-report .report-footer-branded img,
.work-report.clean-work-report .compact-footer-line img{
  width:28px !important;
  height:28px !important;
  border:0 !important;
  background:transparent !important;
  padding:0 !important;
}

.history-panel{
  box-shadow:none !important;
}

.history-subhead span{
  font-weight:900 !important;
}

.auto-subhead span::after{
  content:"";
  color:#64748b;
  font-size:12px;
  font-weight:700;
}

.manual-subhead span::after{
  content:"";
  color:#64748b;
  font-size:12px;
  font-weight:700;
}

/* Reference dashboard shell */
:root{
  --ref-blue:#075fc7;
  --ref-blue-dark:#004aa4;
  --ref-text:#070f1f;
  --ref-navy:#07306f;
  --ref-line:#d8dee8;
  --ref-soft:#f5f9ff;
}

body{
  background:#f5f7fb !important;
  color:var(--ref-text) !important;
}

.app-shell{
  min-height:100vh !important;
  background:#f7f9fc !important;
}

.topbar{
  height:54px !important;
  min-height:54px !important;
  padding:0 18px !important;
  background:linear-gradient(180deg,#0870d5,#0056b7) !important;
  border:0 !important;
  box-shadow:0 1px 0 rgba(0,0,0,.18) !important;
}

.topbar .brand{
  gap:10px !important;
}

.topbar .brand img.app-logo{
  width:30px !important;
  height:30px !important;
  padding:0 !important;
  background:transparent !important;
  border:0 !important;
  border-radius:4px !important;
}

.topbar .brand h1{
  font-size:22px !important;
  font-weight:700 !important;
  letter-spacing:0 !important;
}

.topbar .brand h1::before{
  content:"";
}

.topbar .brand h1{
  color:transparent !important;
  position:relative !important;
}

.topbar .brand h1::after{
  content:"Work Log Lite";
  color:#fff;
  position:absolute;
  left:0;
  top:0;
  white-space:nowrap;
}

.topbar .brand p,
.top-actions{
  display:none !important;
}

.topbar::after{
  content:"-    □    ×";
  margin-left:auto;
  color:#fff;
  font-size:22px;
  letter-spacing:22px;
  line-height:1;
}

.layout{
  max-width:none !important;
  margin:0 !important;
  display:grid !important;
  grid-template-columns:250px minmax(0,1fr) !important;
  grid-template-areas:
    "control summary"
    "control history" !important;
  gap:0 !important;
  padding:0 !important;
  min-height:calc(100vh - 54px) !important;
}

.panel{
  border-radius:0 !important;
  box-shadow:none !important;
}

.control-panel{
  grid-area:control !important;
  position:sticky !important;
  top:54px !important;
  height:calc(100vh - 54px) !important;
  overflow:auto !important;
  padding:28px 12px 16px !important;
  border:0 !important;
  border-right:1px solid #d7dde7 !important;
  background:linear-gradient(180deg,#ffffff,#f6f8fb) !important;
}

.desktop-sidebar-logo{
  display:block !important;
  margin:0 auto 16px !important;
  width:185px !important;
  height:185px !important;
  border-radius:5px !important;
  overflow:hidden !important;
  background:#0a86e8 !important;
  box-shadow:0 1px 2px rgba(15,23,42,.18) !important;
}

.desktop-sidebar-logo img{
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  display:block !important;
}

.control-panel > .section-title,
.clock-card,
.info-box,
.away-alert{
  display:none !important;
}

.button-row{
  position:static !important;
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:4px !important;
  margin:0 0 4px !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
}

.button-row button,
.safe-menu-list button,
.safe-menu-list .file-label{
  min-height:52px !important;
  width:100% !important;
  justify-content:flex-start !important;
  padding:0 16px 0 56px !important;
  border:0 !important;
  border-radius:6px !important;
  background:transparent !important;
  color:#111827 !important;
  box-shadow:none !important;
  font-size:16px !important;
  font-weight:500 !important;
  text-align:left !important;
  position:relative !important;
}

.button-row button:hover,
.safe-menu-list button:hover,
.button-row button:focus-visible,
.safe-menu-list button:focus-visible{
  background:#eaf2ff !important;
  color:#0049b7 !important;
  transform:none !important;
  box-shadow:none !important;
}

.button-row button::before,
.safe-menu-list button::before{
  position:absolute !important;
  left:20px !important;
  top:50% !important;
  transform:translateY(-50%) !important;
  width:auto !important;
  height:auto !important;
  background:transparent !important;
  color:#092a62 !important;
  font-size:23px !important;
  font-weight:400 !important;
  line-height:1 !important;
}

#punchInBtn::before{content:"◷" !important;}
#breakBtn::before{content:"Ⅱ" !important;}
#punchOutBtn::before{content:"◴" !important;}
#newManualShiftBtn::before{content:"＋" !important;}
#safeGenerateReportBtn::before{content:"▥" !important;}
#safeReportSettingsBtn::before{content:"⚙" !important;}
#safePaySettingsBtn::before{content:"$" !important;}
#safeExportCsvBtn::before{content:"⇩" !important;}
#safeBackupBtn::before{content:"☁" !important;}
#safeNotificationsBtn::before{content:"?" !important;}
#safeWorkStatusBtn::before{content:"▤" !important;}
#safeTermsBtn::before{content:"ⓘ" !important;}
#safeRestoreBtn::before{content:"⏻" !important;}

#punchInBtn::after{content:"Punch In / Out";}
#breakBtn::after{content:"Break";}
#punchOutBtn::after{content:"Punch Out";}
#newManualShiftBtn::after{content:"Manual Shift";}
#safeGenerateReportBtn::after{content:"Reports";}
#safeReportSettingsBtn::after{content:"Settings";}
#safePaySettingsBtn::after{content:"Pay Settings";}
#safeExportCsvBtn::after{content:"Export";}
#safeBackupBtn::after{content:"Backup / Restore";}
#safeNotificationsBtn::after{content:"Help";}
#safeWorkStatusBtn::after{content:"Work Status Notes";}
#safeTermsBtn::after{content:"About";}
#safeRestoreBtn::after{content:"Exit";}

.button-row button,
.safe-menu-list button{
  color:transparent !important;
}

.button-row button::after,
.safe-menu-list button::after{
  position:static !important;
  content:attr(data-label);
  color:#111827 !important;
  transform:none !important;
  font-size:16px !important;
  font-weight:500 !important;
}

#punchInBtn::after{content:"Punch In / Out" !important;}
#breakBtn::after{content:"Break" !important;}
#punchOutBtn::after{content:"Punch Out" !important;}
#newManualShiftBtn::after{content:"Manual Shift" !important;}
#safeGenerateReportBtn::after{content:"Reports" !important;}
#safeReportSettingsBtn::after{content:"Settings" !important;}
#safePaySettingsBtn::after{content:"Pay Settings" !important;}
#safeExportCsvBtn::after{content:"Export" !important;}
#safeBackupBtn::after{content:"Backup / Restore" !important;}
#safeNotificationsBtn::after{content:"Help" !important;}
#safeWorkStatusBtn::after{content:"Work Status Notes" !important;}
#safeTermsBtn::after{content:"About" !important;}
#safeRestoreBtn::after{content:"Exit" !important;}

.button-row button:disabled{
  opacity:1 !important;
  cursor:pointer !important;
}

#punchInBtn{
  background:#e8f1ff !important;
  color:transparent !important;
}

.current-shift-safe-menu{
  display:block !important;
  margin:0 !important;
}

.safe-menu-list{
  gap:4px !important;
}

.summary-panel{
  grid-area:summary !important;
  padding:22px 20px 0 !important;
  border:0 !important;
  background:#fff !important;
}

.summary-panel .section-title{
  border:0 !important;
  padding:0 !important;
  margin:0 0 18px !important;
}

.summary-panel .section-title span{
  font-size:22px !important;
  font-weight:800 !important;
  color:#000 !important;
}

.summary-panel .section-title span::before{
  content:"" !important;
}

.main-range-card.compact-range-card{
  border:1px solid var(--ref-line) !important;
  border-radius:6px !important;
  background:#fff !important;
  padding:18px 20px !important;
  margin:0 0 20px !important;
}

.main-range-head{
  margin-bottom:12px !important;
}

.main-range-head strong{
  color:#052b68 !important;
  font-size:16px !important;
  font-weight:800 !important;
}

.main-range-head span{
  display:none !important;
}

.compact-main-range-grid{
  display:grid !important;
  grid-template-columns:repeat(4, max-content) 145px 145px 112px !important;
  gap:18px !important;
  align-items:center !important;
}

.compact-main-range-grid label{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  margin:0 !important;
}

.compact-main-range-grid label span{
  color:#111827 !important;
  font-size:16px !important;
  font-weight:500 !important;
  margin:0 !important;
}

.compact-main-range-grid select{
  height:42px !important;
  min-width:150px !important;
  border:1px solid #cfd8e6 !important;
  border-radius:6px !important;
  background:#fff !important;
}

.compact-main-range-grid input[type="date"]{
  height:42px !important;
  border:1px solid #cfd8e6 !important;
  border-radius:6px !important;
  padding:0 10px !important;
}

#mainGenerateReportBtn{
  height:42px !important;
  min-height:42px !important;
  border-radius:6px !important;
  background:#f4f7fc !important;
  border:1px solid #b9c7dc !important;
  color:#063477 !important;
  font-weight:700 !important;
  padding:0 14px !important;
  box-shadow:none !important;
}

#mainRangeStatus{
  display:none !important;
}

.stats-grid{
  display:grid !important;
  grid-template-columns:repeat(5, minmax(0,1fr)) !important;
  gap:12px !important;
  margin-bottom:18px !important;
}

.stat{
  min-height:132px !important;
  border:1px solid var(--ref-line) !important;
  border-radius:6px !important;
  background:#fff !important;
  padding:28px 18px 20px 106px !important;
  box-shadow:0 6px 18px rgba(15,23,42,.04) !important;
  position:relative !important;
}

.stat::before{
  position:absolute;
  left:38px;
  top:42px;
  width:46px;
  height:46px;
  border:3px solid #0a6d98;
  border-radius:50%;
  display:grid;
  place-items:center;
  color:#0a6d98;
  font-size:28px;
  font-weight:500;
}

.stat:nth-child(1)::before{content:"◷";}
.stat:nth-child(2)::before{content:"▦"; color:#1374dc; border-color:#1374dc;}
.stat:nth-child(3)::before{content:"▤"; color:#1374dc; border-color:#1374dc; border-radius:6px;}
.stat:nth-child(4)::before{content:"$"; color:#078532; border-color:#078532;}
.stat:nth-child(5)::before{content:"▱"; color:#7b2fd6; border-color:#7b2fd6; border-radius:6px;}

.stat span{
  margin:0 0 12px !important;
  color:#111827 !important;
  font-size:16px !important;
  font-weight:700 !important;
  text-transform:none !important;
}

.stat strong{
  color:#000 !important;
  font-size:30px !important;
  font-weight:900 !important;
}

.total-amount-card{
  display:grid !important;
  grid-template-columns:repeat(4,1fr) !important;
  gap:0 !important;
  padding:18px 0 !important;
  margin:0 0 18px !important;
  border:1px solid #d9e7fb !important;
  border-radius:6px !important;
  background:#eaf4ff !important;
  box-shadow:none !important;
}

.total-amount-card > div:first-child{
  display:block !important;
  padding:0 22px !important;
  border-right:1px solid #a8bfdf !important;
}

.total-amount-meta{
  display:grid !important;
  grid-template-columns:repeat(3,1fr) !important;
  grid-column:2 / 5 !important;
}

.total-amount-meta > span{
  padding:0 22px !important;
  border-right:1px solid #a8bfdf !important;
}

.total-amount-meta > span:last-child{
  border-right:0 !important;
}

.total-amount-card span{
  display:block !important;
  text-align:center !important;
  color:#07306f !important;
  font-size:17px !important;
  font-weight:600 !important;
  text-transform:none !important;
  letter-spacing:0 !important;
}

.total-amount-card strong{
  display:block !important;
  margin-top:8px !important;
  color:#001735 !important;
  font-size:27px !important;
  font-weight:900 !important;
}

.total-amount-card > div:first-child{
  grid-column:auto !important;
}

.history-panel{
  grid-area:history !important;
  margin:0 20px 0 !important;
  padding:0 !important;
  border:1px solid var(--ref-line) !important;
  border-radius:6px !important;
  background:#fff !important;
  display:grid !important;
  grid-template-columns:minmax(0,1.25fr) minmax(330px,.75fr) !important;
  grid-template-areas:
    "head head"
    "total total"
    "autohead manualhead"
    "autolist manuallist" !important;
  overflow:hidden !important;
}

.history-panel > .section-title{
  grid-area:head !important;
  margin:0 !important;
  padding:18px 20px !important;
  border-bottom:1px solid var(--ref-line) !important;
}

.history-panel > .section-title span{
  color:#08377b !important;
  font-size:22px !important;
  font-weight:900 !important;
}

.history-panel > .section-title span::after{
  content:":";
}

#copySummaryBtn{
  min-height:40px !important;
  border:1px solid #bac8dc !important;
  border-radius:6px !important;
  background:#fff !important;
  color:#07306f !important;
  font-size:16px !important;
  font-weight:700 !important;
  padding:0 14px !important;
}

.history-total{
  grid-area:total !important;
  justify-content:flex-end !important;
  gap:14px !important;
  margin:0 !important;
  padding:16px 20px !important;
  border:0 !important;
  border-bottom:1px solid var(--ref-line) !important;
  border-radius:0 !important;
  background:#fff !important;
  color:#111827 !important;
  font-size:16px !important;
}

.shift-history-range-status{
  display:none !important;
}

.auto-subhead{
  grid-area:autohead !important;
  margin:0 !important;
  padding:18px 38px 0 !important;
  border:0 !important;
}

.manual-subhead{
  grid-area:manualhead !important;
  margin:0 !important;
  padding:38px 32px 0 !important;
  border:0 !important;
}

.history-subhead span{
  color:#07306f !important;
  font-size:20px !important;
  font-weight:900 !important;
}

.history-subhead small{
  display:none !important;
}

#emptyState,
#shiftList{
  grid-area:autolist !important;
  margin:18px 18px 20px !important;
}

#emptyState{
  align-self:start !important;
  max-width:615px !important;
  min-height:160px !important;
  padding:34px 76px !important;
  border:1px solid #f3d489 !important;
  border-radius:6px !important;
  background:#fff7da !important;
  color:#2a1808 !important;
  text-align:left !important;
  font-size:18px !important;
  line-height:1.6 !important;
}

#emptyState::before{
  content:"ⓘ  Punch in/out records";
  display:block;
  color:#381a09;
  font-weight:800;
  margin-bottom:12px;
}

.manual-history-note,
#manualShiftList{
  grid-area:manuallist !important;
  margin:18px 32px 20px !important;
}

.manual-history-note{
  color:#111827 !important;
  font-size:17px !important;
  line-height:1.5 !important;
}

#manualShiftList:empty::after{
  content:"Add or correct work shifts when needed. All edits appear in reports.";
  display:block;
  margin-top:8px;
  color:#111827;
  font-size:17px;
  line-height:1.5;
}

.shift-card.compact-shift,
.manual-shift-list .manual-auto-style{
  border:1px solid #e2e8f0 !important;
  border-radius:6px !important;
  background:#fff !important;
  box-shadow:none !important;
}

@media(max-width:1100px){
  .compact-main-range-grid{
    grid-template-columns:1fr 1fr !important;
  }

  .stats-grid{
    grid-template-columns:repeat(2, minmax(0,1fr)) !important;
  }

  .history-panel{
    grid-template-columns:1fr !important;
    grid-template-areas:
      "head"
      "total"
      "autohead"
      "autolist"
      "manualhead"
      "manuallist" !important;
  }
}

@media(max-width:760px){
  .topbar::after{
    display:none !important;
  }

  .layout{
    display:block !important;
    min-height:auto !important;
  }

  .control-panel{
    position:static !important;
    height:auto !important;
    border-right:0 !important;
    border-bottom:1px solid #d7dde7 !important;
  }

  .desktop-sidebar-logo{
    width:130px !important;
    height:130px !important;
  }

  .summary-panel{
    padding:18px 12px 0 !important;
  }

  .stats-grid{
    grid-template-columns:1fr !important;
  }

  .stats-grid::after{
    min-height:92px !important;
  }

  .total-amount-card{
    grid-template-columns:1fr !important;
    gap:12px !important;
  }

  .history-panel{
    margin:12px !important;
  }
}

/* Dashboard reference repair pass */
@media(min-width:961px){
  .layout{
    grid-template-columns:250px minmax(0,1fr) !important;
  }
}

.control-panel{
  padding-left:14px !important;
  padding-right:14px !important;
}

.desktop-sidebar-logo{
  width:186px !important;
  height:186px !important;
}

.button-row,
.safe-menu-list{
  gap:3px !important;
}

.button-row button,
.safe-menu-list button{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  width:100% !important;
  min-height:48px !important;
  padding:0 12px 0 54px !important;
  color:#111827 !important;
  font-size:15px !important;
  font-weight:500 !important;
  line-height:1.15 !important;
  white-space:normal !important;
  text-align:left !important;
  background:transparent !important;
  border:0 !important;
  border-radius:6px !important;
  box-shadow:none !important;
}

.button-row button::after,
.safe-menu-list button::after{
  content:none !important;
}

.button-row button::before,
.safe-menu-list button::before{
  left:20px !important;
  width:22px !important;
  text-align:center !important;
  color:#052b68 !important;
  font-size:18px !important;
  font-family:Arial, sans-serif !important;
}

#punchInBtn::before{content:"◷" !important;}
#breakBtn::before{content:"Ⅱ" !important;}
#punchOutBtn::before{content:"◴" !important;}
#newManualShiftBtn::before{content:"+" !important;}
#safeGenerateReportBtn::before{content:"▣" !important;}
#safeReportSettingsBtn::before{content:"⚙" !important;}
#safePaySettingsBtn::before{content:"$" !important;}
#safeExportCsvBtn::before{content:"⇩" !important;}
#safeBackupBtn::before{content:"☁" !important;}
#safeNotificationsBtn::before{content:"?" !important;}
#safeWorkStatusBtn::before{content:"▤" !important;}
#safeTermsBtn::before{content:"i" !important;}
#safeRestoreBtn::before{content:"⏻" !important;}

#punchInBtn{
  background:#eaf2ff !important;
  color:#0049b7 !important;
  font-weight:700 !important;
}

#breakBtn.on-break,
#breakBtn.break-btn.on-break{
  background:#fff4d7 !important;
  color:#8a5200 !important;
}

#punchOutBtn{
  color:#b43a40 !important;
}

.summary-panel{
  padding:18px 16px 0 !important;
}

.summary-panel .section-title{
  margin-bottom:14px !important;
}

.main-range-card.compact-range-card{
  min-height:86px !important;
  padding:14px 16px !important;
  margin-bottom:16px !important;
}

.main-range-head{
  margin-bottom:8px !important;
}

.compact-main-range-grid{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:10px 14px !important;
}

.compact-main-range-grid label{
  flex:0 0 auto !important;
}

.compact-main-range-grid select,
.compact-main-range-grid input[type="date"]{
  height:36px !important;
  min-width:140px !important;
  font-size:14px !important;
}

#mainGenerateReportBtn{
  height:36px !important;
  min-height:36px !important;
  font-size:14px !important;
}

.summary-panel .stats-grid{
  grid-template-columns:repeat(5, minmax(170px,1fr)) !important;
  gap:10px !important;
  margin-bottom:14px !important;
}

.summary-panel .stats-grid .stat{
  min-height:100px !important;
  padding:20px 16px 16px 94px !important;
  display:flex !important;
  flex-direction:column !important;
  justify-content:center !important;
  overflow:hidden !important;
}

.summary-panel .stats-grid .stat::before{
  left:34px !important;
  top:50% !important;
  transform:translateY(-50%) !important;
  width:42px !important;
  height:42px !important;
  font-size:22px !important;
  z-index:0 !important;
}

.summary-panel .stats-grid .stat span,
.summary-panel .stats-grid .stat strong{
  position:relative !important;
  z-index:1 !important;
}

.summary-panel .stats-grid .stat span{
  margin:0 0 8px !important;
  font-size:14px !important;
}

.summary-panel .stats-grid .stat strong{
  font-size:26px !important;
  line-height:1.05 !important;
  white-space:nowrap !important;
}

.total-amount-card{
  min-height:58px !important;
  padding:10px 0 !important;
  align-items:center !important;
}

.total-amount-card > div:first-child,
.total-amount-meta > span{
  padding:0 16px !important;
}

.total-amount-card span{
  font-size:14px !important;
}

.total-amount-card strong{
  margin-top:4px !important;
  font-size:22px !important;
  white-space:nowrap !important;
}

.history-panel{
  margin:0 16px 16px !important;
}

.history-panel > .section-title{
  padding:14px 16px !important;
}

.history-total{
  padding:10px 16px !important;
  font-size:14px !important;
}

.auto-subhead{
  padding:16px 26px 0 !important;
}

.manual-subhead{
  padding:16px 26px 0 !important;
}

#emptyState,
#shiftList{
  margin:12px 14px 16px !important;
}

.manual-history-note,
#manualShiftList{
  margin:12px 26px 16px !important;
}

.shift-card.compact-shift{
  padding:10px 12px !important;
}

@media(max-width:1280px){
  .summary-panel .stats-grid{
    grid-template-columns:repeat(2, minmax(0,1fr)) !important;
  }
}

/* Sidebar consistency and professional dashboard polish */
.button-row button,
.safe-menu-list button{
  color:transparent !important;
  overflow:hidden !important;
}

.button-row button > span,
.safe-menu-list button > span{
  display:block !important;
  color:#111827 !important;
  font-size:15px !important;
  font-weight:600 !important;
  line-height:1.15 !important;
  white-space:normal !important;
}

.button-row button:hover > span,
.safe-menu-list button:hover > span,
.button-row button:focus-visible > span,
.safe-menu-list button:focus-visible > span{
  color:#064db3 !important;
}

.button-row button::after,
.safe-menu-list button::after{
  content:none !important;
  display:none !important;
}

.button-row button::before,
.safe-menu-list button::before{
  display:grid !important;
  place-items:center !important;
  width:22px !important;
  height:22px !important;
  font-size:16px !important;
  color:#0b2f68 !important;
}

#punchInBtn,
#breakBtn,
#punchOutBtn,
#newManualShiftBtn,
.safe-menu-list button{
  margin:0 !important;
}

#punchInBtn{
  background:#eaf2ff !important;
  color:transparent !important;
}

#punchOutBtn{
  background:#f8d7da !important;
  color:transparent !important;
}

#punchOutBtn > span{
  color:#8f1d25 !important;
}

#breakBtn{
  background:#fff6e6 !important;
  color:transparent !important;
}

#breakBtn > span{
  color:#8a5200 !important;
}

#newManualShiftBtn{
  background:#0969d8 !important;
}

#newManualShiftBtn > span{
  color:#fff !important;
}

#newManualShiftBtn::before{
  color:#fff !important;
}

.safe-menu-list button:nth-child(1)::before{color:#0969d8 !important;}
.safe-menu-list button:nth-child(2)::before{color:#6b6ff0 !important;}
.safe-menu-list button:nth-child(3)::before{color:#009688 !important;}
.safe-menu-list button:nth-child(4)::before{color:#0ea5b7 !important;}
.safe-menu-list button:nth-child(5)::before{color:#16a34a !important;}
.safe-menu-list button:nth-child(6)::before{color:#d97706 !important;}
.safe-menu-list button:nth-child(7)::before{color:#6d5bd0 !important;}
.safe-menu-list button:nth-child(8)::before{color:#64748b !important;}
.safe-menu-list button:nth-child(9)::before{color:#ef4444 !important;}

.safe-menu-list button:hover,
.button-row button:hover{
  background:#eef5ff !important;
}

.summary-panel .stats-grid{
  align-items:stretch !important;
}

.summary-panel .stats-grid .stat{
  min-width:0 !important;
}

.summary-panel .stats-grid .stat span{
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

.summary-panel .stats-grid .stat strong{
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

.combined-stat span{
  white-space:normal !important;
}

.total-amount-card{
  overflow:hidden !important;
}

.total-amount-card span{
  line-height:1.2 !important;
}

.history-panel{
  min-height:0 !important;
}

.history-panel > .section-title{
  align-items:center !important;
}

.history-total{
  min-height:48px !important;
}

.shift-list{
  gap:10px !important;
}

.shift-card.compact-shift summary.shift-summary{
  min-height:54px !important;
  padding:0 !important;
}

.shift-card.compact-shift .shift-main strong{
  font-size:16px !important;
  color:#111827 !important;
}

.shift-card.compact-shift .shift-meta{
  font-size:12px !important;
  color:#64748b !important;
}

.history-shift-pay{
  background:#dcfce7 !important;
  color:#047857 !important;
  border:1px solid #86efac !important;
  border-radius:999px !important;
  padding:4px 9px !important;
  font-size:12px !important;
}

.reason-chip.gps-mini-chip{
  background:#fff7ed !important;
  color:#c2410c !important;
  border:1px solid #fed7aa !important;
  border-radius:999px !important;
  font-size:11px !important;
  padding:2px 7px !important;
}

.manual-history-note{
  display:none !important;
}

#manualShiftList{
  min-height:420px !important;
  border:1px dashed #d6dce8 !important;
  border-radius:6px !important;
  padding:24px !important;
  background:#fff !important;
}

#manualShiftList:empty::before{
  content:"No manual corrections for this date range.";
  display:block;
  color:#64748b;
  text-align:center;
  font-size:13px;
}

@media(min-width:1281px){
  .summary-panel .stats-grid{
    grid-template-columns:repeat(5, minmax(0,1fr)) !important;
  }
}

/* Final sidebar/header match to provided screenshots */
.topbar{
  height:54px !important;
  min-height:54px !important;
  padding:0 18px !important;
  background:#0867c9 !important;
  display:flex !important;
  align-items:center !important;
}

.topbar .brand{
  min-width:0 !important;
}

.topbar .brand h1{
  color:#fff !important;
  position:static !important;
  font-size:18px !important;
  line-height:1 !important;
}

.topbar .brand h1::after{
  content:none !important;
}

.topbar .brand p{
  display:block !important;
  margin:3px 0 0 !important;
  color:#eaf3ff !important;
  font-size:12px !important;
  font-weight:500 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  max-width:760px !important;
}

.topbar .brand img.app-logo{
  width:28px !important;
  height:28px !important;
}

.topbar::after{
  content:none !important;
  display:none !important;
}

@media(min-width:961px){
  .layout{
    grid-template-columns:266px minmax(0,1fr) !important;
  }
}

.control-panel{
  padding:18px 8px 18px !important;
  background:#f7f9fc !important;
}

.desktop-sidebar-logo{
  width:210px !important;
  height:210px !important;
  margin:0 auto 18px !important;
  border-radius:5px !important;
}

.button-row{
  gap:6px !important;
  margin-bottom:8px !important;
}

.button-row button,
.safe-menu-list button{
  min-height:52px !important;
  padding:0 14px 0 62px !important;
  border-radius:6px !important;
  font-size:17px !important;
  line-height:1.15 !important;
  white-space:nowrap !important;
}

.button-row button > span,
.safe-menu-list button > span{
  font-size:17px !important;
  font-weight:700 !important;
  white-space:nowrap !important;
}

.button-row button::before,
.safe-menu-list button::before{
  left:30px !important;
  width:20px !important;
  height:20px !important;
  font-size:18px !important;
}

#punchInBtn{
  background:#eaf2ff !important;
  color:transparent !important;
}

#punchInBtn > span{
  color:#1762c8 !important;
}

#breakBtn{
  background:#fff5e8 !important;
}

#breakBtn > span{
  color:#9a3f00 !important;
}

#punchOutBtn{
  background:#f3bfc3 !important;
  opacity:1 !important;
}

#punchOutBtn > span{
  color:#fff !important;
}

#newManualShiftBtn{
  min-height:54px !important;
  background:#0969d8 !important;
  border-radius:6px !important;
}

#newManualShiftBtn > span{
  color:#fff !important;
}

#safeGenerateReportBtn,
#safeReportSettingsBtn,
#safePaySettingsBtn,
#safeExportCsvBtn,
#safeBackupBtn,
#safeNotificationsBtn,
#safeWorkStatusBtn,
#safeTermsBtn,
#safeRestoreBtn{
  background:transparent !important;
}

#safeGenerateReportBtn:hover,
#safeReportSettingsBtn:hover,
#safePaySettingsBtn:hover,
#safeExportCsvBtn:hover,
#safeBackupBtn:hover,
#safeNotificationsBtn:hover,
#safeWorkStatusBtn:hover,
#safeTermsBtn:hover,
#safeRestoreBtn:hover{
  background:#edf4ff !important;
}

.safe-menu-list{
  gap:3px !important;
}

.safe-menu-list button > span{
  color:#0b1220 !important;
}

#safeGenerateReportBtn::before{content:"▣" !important; color:#236ee8 !important;}
#safeReportSettingsBtn::before{content:"⚙" !important; color:#7d7bf3 !important;}
#safePaySettingsBtn::before{content:"$" !important; color:#009f8e !important;}
#safeExportCsvBtn::before{content:"⇩" !important; color:#20a8bd !important;}
#safeBackupBtn::before{content:"☁" !important; color:#18a957 !important;}
#safeNotificationsBtn::before{content:"?" !important; color:#e7971a !important;}
#safeWorkStatusBtn::before{content:"▤" !important; color:#7c5eea !important;}
#safeTermsBtn::before{content:"i" !important; color:#7f93ad !important;}
#safeRestoreBtn::before{content:"▢" !important; color:#ef4b5a !important;}

#safeGenerateReportBtn,
#safeReportSettingsBtn,
#safePaySettingsBtn,
#safeExportCsvBtn,
#safeBackupBtn,
#safeNotificationsBtn,
#safeWorkStatusBtn,
#safeTermsBtn,
#safeRestoreBtn{
  min-height:50px !important;
}

.safe-live-shift-counter{
  display:grid !important;
  gap:4px !important;
  margin:0 0 10px !important;
  padding:12px 14px !important;
  border:1px solid #d8e4f5 !important;
  border-radius:8px !important;
  background:#eaf2ff !important;
  box-shadow:none !important;
  text-align:left !important;
}

.safe-live-shift-counter span{
  color:#064db3 !important;
  font-size:12px !important;
  font-weight:800 !important;
  text-transform:uppercase !important;
  letter-spacing:.04em !important;
}

.safe-live-shift-counter strong{
  color:#06142c !important;
  font-size:24px !important;
  font-weight:900 !important;
  line-height:1 !important;
}

.safe-live-shift-counter small{
  color:#475569 !important;
  font-size:13px !important;
  font-weight:700 !important;
}

.safe-live-shift-counter.off strong{
  font-size:18px !important;
  color:#64748b !important;
}

.safe-live-shift-counter.break{
  background:#fff6e6 !important;
  border-color:#fed7aa !important;
}

.safe-live-shift-counter.break span{
  color:#9a3f00 !important;
}

#punchInBtn{
  min-height:58px !important;
  background:#0a8f68 !important;
  box-shadow:0 8px 18px rgba(10,143,104,.18) !important;
}

#punchInBtn > span,
#punchInBtn::before{
  color:#fff !important;
}

#breakBtn{
  min-height:58px !important;
  border:1px solid #fed7aa !important;
}

#punchOutBtn{
  min-height:58px !important;
  background:#e77880 !important;
  box-shadow:0 8px 18px rgba(231,120,128,.16) !important;
}

#newManualShiftBtn{
  min-height:58px !important;
}

.button-row button:disabled{
  cursor:not-allowed !important;
  box-shadow:none !important;
}

#punchInBtn:disabled{
  background:#e2e8f0 !important;
  color:#475569 !important;
}

#punchInBtn:disabled > span,
#punchInBtn:disabled::before{
  color:#475569 !important;
}

#breakBtn:disabled{
  background:#f8fafc !important;
  border-color:#e2e8f0 !important;
  color:#94a3b8 !important;
}

#breakBtn:disabled > span,
#breakBtn:disabled::before{
  color:#94a3b8 !important;
}

#punchOutBtn:disabled{
  background:#f8cfd3 !important;
  color:#fff !important;
}

#punchOutBtn:not(:disabled){
  background:#dc2626 !important;
}

#breakBtn:not(:disabled){
  background:#fff5e8 !important;
}

#breakBtn.on-break:not(:disabled){
  background:#0f172a !important;
  border-color:#0f172a !important;
}

#breakBtn.on-break:not(:disabled) > span,
#breakBtn.on-break:not(:disabled)::before{
  color:#fff !important;
}

@media(max-width:760px){
  .topbar{
    height:auto !important;
    min-height:58px !important;
  }

  .topbar .brand p{
    display:block !important;
    max-width:calc(100vw - 80px) !important;
    white-space:normal !important;
  }

  .desktop-sidebar-logo{
    width:210px !important;
    height:210px !important;
  }
}

/* Visibility and filter-row repair */
#punchInBtn,
#punchInBtn:disabled{
  color:#fff !important;
  background:#0a936b !important;
  opacity:1 !important;
}

#punchInBtn > span,
#punchInBtn::before{
  color:#fff !important;
}

#breakBtn,
#breakBtn:disabled{
  color:#9a3f00 !important;
  opacity:1 !important;
}

#breakBtn > span,
#breakBtn::before{
  color:#9a3f00 !important;
}

#punchOutBtn,
#punchOutBtn:disabled{
  color:#fff !important;
  background:#e6757d !important;
  opacity:1 !important;
}

#punchOutBtn > span,
#punchOutBtn::before{
  color:#fff !important;
}

#newManualShiftBtn,
#newManualShiftBtn:disabled{
  color:#fff !important;
  opacity:1 !important;
}

#newManualShiftBtn > span,
#newManualShiftBtn::before{
  color:#fff !important;
}

.button-row button{
  text-shadow:none !important;
}

.button-row button > span{
  pointer-events:none !important;
}

.main-range-card.compact-range-card{
  overflow:visible !important;
}

.compact-main-range-grid{
  display:flex !important;
  align-items:end !important;
  flex-wrap:wrap !important;
  gap:12px 16px !important;
}

.compact-main-range-grid label{
  display:grid !important;
  grid-template-columns:auto minmax(150px, 1fr) !important;
  align-items:center !important;
  gap:8px !important;
}

.compact-main-range-grid label span{
  white-space:nowrap !important;
  font-size:15px !important;
  font-weight:800 !important;
}

.compact-main-range-grid .main-custom-date{
  grid-template-columns:auto 176px !important;
}

.compact-main-range-grid select,
.compact-main-range-grid input[type="date"]{
  width:100% !important;
  min-width:0 !important;
  height:38px !important;
  font-size:15px !important;
}

#mainGenerateReportBtn{
  height:38px !important;
  min-height:38px !important;
  align-self:end !important;
}

.history-panel{
  margin-top:0 !important;
}

@media(max-width:900px){
  .compact-main-range-grid label,
  .compact-main-range-grid .main-custom-date{
    grid-template-columns:1fr !important;
    min-width:100% !important;
  }

  #mainGenerateReportBtn{
    width:100% !important;
  }
}

/* Adjustable report preview and print layout */
.report-layout-controls{
  display:flex !important;
  align-items:center !important;
  flex-wrap:wrap !important;
  gap:8px 10px !important;
  padding:7px 10px !important;
  margin:0 0 10px !important;
  border:1px solid #d7e2f1 !important;
  border-radius:6px !important;
  background:#fff !important;
}

.report-layout-controls label{
  display:flex !important;
  align-items:center !important;
  gap:6px !important;
  margin:0 !important;
  color:#0b2a55 !important;
  font-size:12px !important;
  font-weight:800 !important;
}

.report-layout-controls select{
  height:30px !important;
  min-width:102px !important;
  border:1px solid #c8d7ea !important;
  border-radius:5px !important;
  background:#fff !important;
  color:#061a3a !important;
  font-size:12px !important;
  font-weight:750 !important;
  padding:0 24px 0 8px !important;
}

.report-layout-note{
  color:#64748b !important;
  font-size:12px !important;
  font-weight:700 !important;
  margin-left:auto !important;
}

#reportPreview{
  --report-scale:.9;
}

#reportPreview .work-report{
  transform:scale(var(--report-scale)) !important;
  transform-origin:top center !important;
  width:calc(100% / var(--report-scale)) !important;
  margin:0 auto !important;
}

#reportPreview[data-align="left"] .work-report{
  transform-origin:top left !important;
  margin-left:0 !important;
  margin-right:auto !important;
}

#reportPreview[data-align="center"] .work-report{
  transform-origin:top center !important;
  margin-left:auto !important;
  margin-right:auto !important;
}

#reportPreview[data-align="wide"] .work-report{
  transform-origin:top left !important;
  max-width:none !important;
  width:calc(100% / var(--report-scale)) !important;
  margin-left:0 !important;
  margin-right:0 !important;
}

#reportPreview[data-fit="one-page"] .work-report{
  max-width:8.5in !important;
}

#reportPreview[data-fit="one-page"] .work-report.clean-work-report{
  font-size:10px !important;
}

#reportPreview[data-fit="one-page"] .work-report.clean-work-report .professional-report-head,
#reportPreview[data-fit="one-page"] .work-report.clean-work-report .report-section{
  padding:8px 10px !important;
  margin-bottom:7px !important;
}

#reportPreview[data-fit="one-page"] .work-report.clean-work-report .combined-total-card,
#reportPreview[data-fit="one-page"] .work-report.clean-work-report .break-summary-card{
  gap:6px !important;
}

#reportPreview[data-fit="one-page"] .work-report.clean-work-report th,
#reportPreview[data-fit="one-page"] .work-report.clean-work-report td{
  padding:5px 6px !important;
  font-size:9px !important;
  line-height:1.25 !important;
}

#reportPreview[data-fit="compact"] .work-report.clean-work-report .professional-report-head,
#reportPreview[data-fit="compact"] .work-report.clean-work-report .report-section{
  padding:10px 12px !important;
  margin-bottom:9px !important;
}

#reportPreview[data-fit="comfortable"] .work-report{
  max-width:9in !important;
}

.resizable-report-table th{
  position:relative !important;
}

.report-column-resizer{
  position:absolute !important;
  top:0 !important;
  right:-10px !important;
  z-index:5 !important;
  width:22px !important;
  height:100% !important;
  cursor:col-resize !important;
  user-select:none !important;
  touch-action:none !important;
}

.report-column-resizer::after{
  content:"" !important;
  position:absolute !important;
  right:9px !important;
  top:18% !important;
  width:3px !important;
  height:64% !important;
  border-radius:999px !important;
  background:#8ca1bb !important;
  opacity:.7 !important;
}

.report-column-resizer::before{
  content:"" !important;
  position:absolute !important;
  right:3px !important;
  top:0 !important;
  width:14px !important;
  height:100% !important;
  border-radius:6px !important;
  background:transparent !important;
}

.report-column-resizer:hover::before,
.is-resizing-columns .report-column-resizer::before{
  background:rgba(11,111,232,.08) !important;
}

.report-column-resizer:hover::after,
.is-resizing-columns .report-column-resizer::after{
  background:#0b6fe8 !important;
  opacity:1 !important;
  width:4px !important;
}

@media(max-width:760px){
  .report-layout-controls{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
  }

  .report-layout-controls label{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:5px !important;
  }

  .report-layout-controls select{
    width:100% !important;
  }

  .report-layout-note{
    grid-column:1 / -1 !important;
    margin-left:0 !important;
  }
}

/* Report modal should preview as one clean page with no horizontal scroll */
#reportModal .report-preview,
#reportPreview{
  overflow-x:hidden !important;
  overflow-y:auto !important;
  padding:14px 18px !important;
}

#reportPreview .work-report,
#reportPreview[data-fit] .work-report,
#reportPreview[data-align] .work-report{
  transform:none !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  margin:0 auto !important;
}

#reportPreview .report-table-wrap{
  overflow-x:auto !important;
  width:100% !important;
  max-width:100% !important;
  padding-bottom:8px !important;
  scrollbar-color:#8ea0b7 #eef3f8 !important;
  scrollbar-width:thin !important;
  background:
    linear-gradient(90deg, #fff 30%, rgba(255,255,255,0)) left center / 24px 100% no-repeat,
    linear-gradient(270deg, #fff 30%, rgba(255,255,255,0)) right center / 24px 100% no-repeat,
    linear-gradient(90deg, rgba(15,43,78,.16), rgba(15,43,78,0)) left center / 10px 100% no-repeat,
    linear-gradient(270deg, rgba(15,43,78,.16), rgba(15,43,78,0)) right center / 10px 100% no-repeat,
    #fff !important;
}

#reportPreview .unified-report-table{
  width:max-content !important;
  min-width:980px !important;
  max-width:none !important;
  table-layout:fixed !important;
}

#reportPreview .report-table-wrap::-webkit-scrollbar{
  height:12px !important;
}

#reportPreview .report-table-wrap::-webkit-scrollbar-track{
  background:#eef3f8 !important;
  border-radius:999px !important;
}

#reportPreview .report-table-wrap::-webkit-scrollbar-thumb{
  background:#8ea0b7 !important;
  border-radius:999px !important;
  border:2px solid #eef3f8 !important;
}

#reportPreview .unified-report-table th,
#reportPreview .unified-report-table td{
  white-space:normal !important;
  overflow:hidden !important;
  text-overflow:clip !important;
}

#reportPreview .unified-report-table th:nth-child(1),
#reportPreview .unified-report-table td:nth-child(1){width:4% !important;}
#reportPreview .unified-report-table th:nth-child(2),
#reportPreview .unified-report-table td:nth-child(2){width:6% !important;}
#reportPreview .unified-report-table th:nth-child(3),
#reportPreview .unified-report-table td:nth-child(3){width:8% !important;}
#reportPreview .unified-report-table th:nth-child(4),
#reportPreview .unified-report-table td:nth-child(4){width:12% !important;}
#reportPreview .unified-report-table th:nth-child(5),
#reportPreview .unified-report-table td:nth-child(5){width:30% !important;}
#reportPreview .unified-report-table th:nth-child(6),
#reportPreview .unified-report-table td:nth-child(6){width:7% !important;}
#reportPreview .unified-report-table th:nth-child(7),
#reportPreview .unified-report-table td:nth-child(7){width:7% !important;}
#reportPreview .unified-report-table th:nth-child(8),
#reportPreview .unified-report-table td:nth-child(8){width:10% !important;}
#reportPreview .unified-report-table th:nth-child(9),
#reportPreview .unified-report-table td:nth-child(9){width:8% !important;}

@media(max-width:900px){
  #reportModal .report-preview,
  #reportPreview{
    padding:10px !important;
  }

  #reportPreview .work-report.clean-work-report{
    font-size:9px !important;
  }

  #reportPreview .unified-report-table th,
  #reportPreview .unified-report-table td{
    padding:4px !important;
    font-size:8px !important;
  }
}

/* Final dashboard style pass based on the clean desktop reference */
:root{
  --app-blue:#0067c8;
  --app-blue-2:#0b72dc;
  --app-ink:#061a3a;
  --app-muted:#5d6f89;
  --app-line:#d8e2ef;
  --app-soft:#f5f8fc;
  --app-panel:#ffffff;
  --app-shadow:0 1px 3px rgba(15,43,78,.08);
}

body{
  background:#f4f7fb !important;
  color:var(--app-ink) !important;
}

.topbar{
  min-height:42px !important;
  height:42px !important;
  padding:0 14px !important;
  background:linear-gradient(180deg,#0574d8,#0067c8) !important;
  border:0 !important;
  box-shadow:0 1px 0 rgba(0,0,0,.12) !important;
}

.brand{
  gap:9px !important;
}

.brand img{
  width:24px !important;
  height:24px !important;
  border-radius:4px !important;
  background:#fff !important;
  padding:1px !important;
}

.brand h1{
  font-size:15px !important;
  line-height:1 !important;
  font-weight:800 !important;
}

.brand p{
  display:none !important;
}

.layout{
  max-width:none !important;
  width:100% !important;
  margin:0 !important;
  padding:0 !important;
  gap:0 !important;
  grid-template-columns:250px minmax(0,1fr) !important;
  grid-template-areas:
    "control summary"
    "control history" !important;
  align-items:start !important;
}

.panel{
  box-shadow:none !important;
  border-radius:0 !important;
}

.control-panel{
  min-height:calc(100vh - 42px) !important;
  position:sticky !important;
  top:42px !important;
  align-self:start !important;
  padding:18px 12px !important;
  background:#f8fafd !important;
  border:0 !important;
  border-right:1px solid var(--app-line) !important;
}

.summary-panel,
.history-panel{
  margin:0 !important;
  padding:18px 20px !important;
  background:#f4f7fb !important;
  border:0 !important;
}

.desktop-sidebar-logo{
  width:190px !important;
  height:190px !important;
  margin:0 auto 16px !important;
  border-radius:4px !important;
  box-shadow:0 1px 3px rgba(15,43,78,.2) !important;
}

.desktop-sidebar-logo img{
  width:100% !important;
  height:100% !important;
  object-fit:contain !important;
}

.control-panel > .section-title{
  display:none !important;
}

.safe-live-shift-counter{
  border:1px solid #d8e8fb !important;
  background:#eaf4ff !important;
  border-radius:6px !important;
  padding:10px 12px !important;
  margin:0 0 10px !important;
  text-align:center !important;
}

.safe-live-shift-counter span{
  font-size:11px !important;
  letter-spacing:.04em !important;
  color:#0b4384 !important;
  text-transform:uppercase !important;
}

.safe-live-shift-counter strong{
  display:block !important;
  margin-top:3px !important;
  font-size:18px !important;
  line-height:1.1 !important;
}

.safe-live-shift-counter small{
  display:block !important;
  margin-top:3px !important;
  color:#52677f !important;
  font-weight:700 !important;
}

.clock-card{
  display:none !important;
}

.button-row{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:8px !important;
  margin:0 0 10px !important;
}

.button-row button{
  min-height:44px !important;
  border-radius:5px !important;
  font-size:14px !important;
  font-weight:800 !important;
  justify-content:center !important;
  gap:9px !important;
  box-shadow:none !important;
}

#punchInBtn{
  background:#0a936b !important;
  color:#fff !important;
}

#breakBtn{
  background:#fff6eb !important;
  border:1px solid #ffd6a6 !important;
  color:#9a3f00 !important;
}

#punchOutBtn{
  background:#e8767f !important;
  color:#fff !important;
}

#newManualShiftBtn{
  background:#0b6fe8 !important;
  color:#fff !important;
  border:0 !important;
}

.current-shift-safe-menu{
  margin:8px 0 0 !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}

.safe-menu-list{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:2px !important;
  padding:0 !important;
  background:transparent !important;
  border:0 !important;
  position:static !important;
  box-shadow:none !important;
}

.safe-menu-list button,
.safe-menu-list .file-label{
  min-height:42px !important;
  width:100% !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:12px !important;
  padding:8px 12px !important;
  border:0 !important;
  border-radius:5px !important;
  background:transparent !important;
  color:#172033 !important;
  font-size:14px !important;
  font-weight:650 !important;
}

.safe-menu-list button:hover,
.safe-menu-list button:focus-visible{
  background:#e8f2ff !important;
  color:#064fa3 !important;
  outline:none !important;
}

.safe-menu-list button::before{
  width:22px !important;
  height:22px !important;
  min-width:22px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  border-radius:4px !important;
  background:transparent !important;
  color:#0d2e5c !important;
  font-size:17px !important;
}

.safe-menu-list button::after,
.button-row button::after{
  display:none !important;
}

.summary-panel > .section-title,
.history-panel > .section-title{
  margin:0 0 12px !important;
  padding:0 !important;
  border:0 !important;
  color:#050b18 !important;
  font-size:18px !important;
  font-weight:850 !important;
}

.main-range-card.compact-range-card{
  padding:16px 18px !important;
  margin:0 0 16px !important;
  border:1px solid var(--app-line) !important;
  border-radius:5px !important;
  background:#fff !important;
  box-shadow:var(--app-shadow) !important;
}

.main-range-head{
  margin:0 0 12px !important;
}

.main-range-head strong{
  color:#0b2a55 !important;
  font-size:14px !important;
}

.main-range-head span{
  display:none !important;
}

.compact-main-range-grid{
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  gap:12px 18px !important;
}

.compact-main-range-grid label{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  min-width:0 !important;
}

.compact-main-range-grid label span{
  color:#111827 !important;
  font-size:13px !important;
  font-weight:750 !important;
  white-space:nowrap !important;
}

.compact-main-range-grid select,
.compact-main-range-grid input[type="date"]{
  height:38px !important;
  min-width:150px !important;
  border:1px solid #cbd7e6 !important;
  border-radius:4px !important;
  background:#fff !important;
  font-size:14px !important;
}

#mainGenerateReportBtn{
  height:38px !important;
  min-height:38px !important;
  border-radius:4px !important;
  background:#f5f9ff !important;
  border:1px solid #b9c9df !important;
  color:#0b3f88 !important;
  padding:0 15px !important;
}

.stats-grid{
  display:grid !important;
  grid-template-columns:repeat(5,minmax(150px,1fr)) !important;
  gap:12px !important;
  margin:0 0 14px !important;
}

.stat{
  min-height:112px !important;
  display:grid !important;
  grid-template-columns:56px 1fr !important;
  grid-template-rows:1fr auto 1fr !important;
  align-items:center !important;
  column-gap:16px !important;
  padding:18px 22px !important;
  border:1px solid var(--app-line) !important;
  border-radius:6px !important;
  background:#fff !important;
  box-shadow:var(--app-shadow) !important;
}

.stat::before{
  grid-row:1 / 4 !important;
  width:48px !important;
  height:48px !important;
  border:3px solid #0876bd !important;
  border-radius:50% !important;
  color:#0876bd !important;
  font-size:25px !important;
}

.stat span{
  color:#111827 !important;
  font-size:13px !important;
  font-weight:800 !important;
  margin:0 0 6px !important;
}

.stat strong{
  color:#050b18 !important;
  font-size:24px !important;
  line-height:1 !important;
  font-weight:900 !important;
}

.combined-stat::before{
  color:#8035d2 !important;
  border-color:#8035d2 !important;
}

.total-amount-card{
  display:grid !important;
  grid-template-columns:1.1fr 3fr !important;
  align-items:center !important;
  gap:12px !important;
  padding:12px 16px !important;
  margin:0 0 16px !important;
  border:1px solid #d4e6ff !important;
  border-radius:5px !important;
  background:#eaf4ff !important;
}

.total-amount-card span{
  color:#0b2a55 !important;
  font-weight:750 !important;
}

.total-amount-card strong{
  color:#061a3a !important;
  font-weight:900 !important;
}

.total-amount-meta{
  display:grid !important;
  grid-template-columns:repeat(3,1fr) !important;
  gap:0 !important;
}

.total-amount-meta span{
  min-height:44px !important;
  display:flex !important;
  flex-direction:column !important;
  justify-content:center !important;
  text-align:center !important;
  border-left:1px solid #9fc2ef !important;
}

.history-panel{
  padding-top:0 !important;
}

.history-panel > .section-title{
  min-height:54px !important;
  align-items:center !important;
  padding:0 16px !important;
  margin:0 !important;
  border:1px solid var(--app-line) !important;
  border-radius:5px 5px 0 0 !important;
  background:#fff !important;
}

#copySummaryBtn{
  min-height:34px !important;
  border:1px solid #b9c9df !important;
  color:#0b3f88 !important;
  background:#fff !important;
}

.history-total{
  min-height:42px !important;
  display:flex !important;
  justify-content:flex-end !important;
  align-items:center !important;
  gap:10px !important;
  margin:0 !important;
  padding:0 18px !important;
  border-left:1px solid var(--app-line) !important;
  border-right:1px solid var(--app-line) !important;
  border-bottom:1px solid var(--app-line) !important;
  background:#fff !important;
  font-size:14px !important;
}

.shift-history-range-status{
  margin:0 !important;
  padding:9px 18px !important;
  border-left:1px solid var(--app-line) !important;
  border-right:1px solid var(--app-line) !important;
  background:#fff !important;
}

.history-subhead{
  margin:0 !important;
  padding:14px 18px 10px !important;
  border-left:1px solid var(--app-line) !important;
  border-right:1px solid var(--app-line) !important;
  background:#fff !important;
}

.history-subhead span{
  color:#0b2a55 !important;
  font-size:16px !important;
  font-weight:850 !important;
}

.shift-list,
.manual-shift-list{
  padding:0 18px 18px !important;
  border-left:1px solid var(--app-line) !important;
  border-right:1px solid var(--app-line) !important;
  background:#fff !important;
}

.manual-shift-list{
  border-bottom:1px solid var(--app-line) !important;
  border-radius:0 0 5px 5px !important;
}

.shift-card,
.manual-shift-card{
  border:1px solid var(--app-line) !important;
  border-radius:5px !important;
  box-shadow:none !important;
}

.manual-history-note{
  margin:0 !important;
  padding:0 18px 12px !important;
  border-left:1px solid var(--app-line) !important;
  border-right:1px solid var(--app-line) !important;
  background:#fff !important;
}

@media(max-width:1180px){
  .stats-grid{
    grid-template-columns:repeat(2,minmax(180px,1fr)) !important;
  }

  .combined-stat{
    grid-column:auto !important;
  }
}

@media(max-width:900px){
  .topbar{
    height:auto !important;
    min-height:50px !important;
    padding:10px 12px !important;
  }

  .brand p{
    display:block !important;
    color:#e8f2ff !important;
    font-size:11px !important;
    margin-top:3px !important;
  }

  .layout{
    grid-template-columns:1fr !important;
    grid-template-areas:
      "control"
      "summary"
      "history" !important;
  }

  .control-panel{
    position:static !important;
    min-height:0 !important;
    border-right:0 !important;
    border-bottom:1px solid var(--app-line) !important;
  }

  .desktop-sidebar-logo{
    width:132px !important;
    height:132px !important;
  }

  .safe-menu-list{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:6px !important;
  }

  .summary-panel,
  .history-panel{
    padding:14px 12px !important;
  }

  .compact-main-range-grid{
    display:grid !important;
    grid-template-columns:1fr !important;
  }

  .compact-main-range-grid label{
    display:grid !important;
    grid-template-columns:1fr !important;
  }

  .compact-main-range-grid select,
  .compact-main-range-grid input[type="date"],
  #mainGenerateReportBtn{
    width:100% !important;
  }

  .stats-grid{
    grid-template-columns:1fr !important;
  }

  .total-amount-card,
  .total-amount-meta{
    grid-template-columns:1fr !important;
  }

  .total-amount-meta span{
    border-left:0 !important;
    border-top:1px solid #9fc2ef !important;
  }
}

@media(max-width:520px){
  .safe-menu-list{
    grid-template-columns:1fr !important;
  }

  .button-row button{
    min-height:48px !important;
  }

  .stat{
    grid-template-columns:48px 1fr !important;
    padding:14px !important;
  }

  .stat::before{
    width:40px !important;
    height:40px !important;
    font-size:21px !important;
  }
}

/* Header/logo cleanup: keep logo in header, remove oversized sidebar brand block */
.topbar{
  height:54px !important;
  min-height:54px !important;
  padding:0 18px !important;
  background:#0067c8 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
}

.brand{
  min-width:0 !important;
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
}

.brand img.app-logo{
  display:block !important;
  width:34px !important;
  height:34px !important;
  min-width:34px !important;
  border-radius:4px !important;
  padding:2px !important;
  background:#fff !important;
  object-fit:contain !important;
}

.brand h1{
  color:#fff !important;
  font-size:18px !important;
  line-height:1 !important;
  margin:0 !important;
  font-weight:800 !important;
}

.brand p{
  display:block !important;
  margin:3px 0 0 !important;
  color:#eaf4ff !important;
  font-size:12px !important;
  line-height:1.2 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

.desktop-sidebar-logo{
  display:none !important;
}

.control-panel{
  padding-top:14px !important;
}

.safe-live-shift-counter{
  margin-top:0 !important;
}

.layout{
  grid-template-columns:236px minmax(0,1fr) !important;
}

.safe-menu-list button,
.safe-menu-list .file-label{
  min-height:40px !important;
  padding:8px 12px !important;
  font-size:14px !important;
}

.summary-panel,
.history-panel{
  padding-left:18px !important;
  padding-right:18px !important;
}

@media(max-width:900px){
  .topbar{
    height:auto !important;
    min-height:56px !important;
    padding:10px 12px !important;
  }

  .brand{
    align-items:flex-start !important;
  }

  .brand p{
    white-space:normal !important;
    font-size:11px !important;
  }

  .layout{
    grid-template-columns:1fr !important;
  }

  .control-panel{
    padding-top:12px !important;
  }
}

@media(max-width:520px){
  .brand img.app-logo{
    width:30px !important;
    height:30px !important;
    min-width:30px !important;
  }

  .brand h1{
    font-size:16px !important;
  }

  .top-actions{
    flex:0 0 auto !important;
  }
}

/* Shift history header/tabs reference styling */
.history-panel > .section-title span{
  color:#0a3b7d !important;
  font-size:18px !important;
  font-weight:850 !important;
}

.history-panel > .section-title span::after{
  display:none !important;
}

.history-total{
  justify-content:flex-end !important;
  color:#111827 !important;
}

.history-total::before{
  content:"Total:" !important;
  margin-right:4px !important;
}

.history-total strong:first-of-type{
  margin-right:8px !important;
}

.shift-history-range-status{
  display:none !important;
}

.history-subhead.auto-subhead,
.history-subhead.manual-subhead{
  display:inline-flex !important;
  align-items:center !important;
  min-height:48px !important;
  padding:0 18px !important;
  border-top:0 !important;
  border-bottom:0 !important;
  width:auto !important;
}

.history-subhead.auto-subhead{
  margin-left:0 !important;
  border-left:1px solid var(--app-line) !important;
}

.history-subhead.manual-subhead{
  margin-left:0 !important;
  border-left:0 !important;
}

.history-subhead.auto-subhead span,
.history-subhead.manual-subhead span{
  font-size:15px !important;
  color:#111827 !important;
  font-weight:700 !important;
}

.history-subhead.auto-subhead span{
  color:#0a3b7d !important;
  font-weight:850 !important;
}

.history-subhead.auto-subhead::after{
  content:"" !important;
  position:absolute !important;
  left:18px !important;
  right:18px !important;
  bottom:0 !important;
  height:3px !important;
  background:#126dff !important;
  border-radius:999px 999px 0 0 !important;
}

.history-subhead small{
  display:none !important;
}

.history-panel{
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:stretch !important;
}

.history-panel > .section-title{
  flex:1 0 100% !important;
}

.history-total{
  flex:1 0 100% !important;
}

.history-subhead{
  position:relative !important;
}

#emptyState,
#shiftList{
  flex:1 0 100% !important;
}

.manual-history-note,
#manualShiftList{
  flex:1 0 100% !important;
}

@media(max-width:700px){
  .history-panel > .section-title{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:10px !important;
    min-height:auto !important;
    padding:12px !important;
  }

  #copySummaryBtn{
    width:100% !important;
  }

  .history-total{
    justify-content:flex-start !important;
    padding:10px 12px !important;
    flex-wrap:wrap !important;
  }

  .history-subhead.auto-subhead,
  .history-subhead.manual-subhead{
    flex:1 1 50% !important;
    justify-content:center !important;
    padding:0 10px !important;
  }
}

/* Final UX cleanup for sidebar/nav and dashboard spacing */
.control-panel{
  width:236px !important;
  overflow:hidden !important;
}

.safe-menu-list{
  gap:3px !important;
}

.safe-menu-list button,
.safe-menu-list .file-label{
  display:grid !important;
  grid-template-columns:28px minmax(0,1fr) !important;
  align-items:center !important;
  justify-content:stretch !important;
  gap:10px !important;
  min-height:42px !important;
  padding:8px 10px !important;
  border-radius:6px !important;
  font-size:14px !important;
  line-height:1.15 !important;
  text-align:left !important;
  overflow:hidden !important;
}

.safe-menu-list button::before,
.safe-menu-list .file-label::before{
  position:static !important;
  transform:none !important;
  margin:0 !important;
  width:24px !important;
  height:24px !important;
  min-width:24px !important;
  border-radius:5px !important;
  background:transparent !important;
  box-shadow:none !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  font-size:17px !important;
  line-height:1 !important;
}

.safe-menu-list button > span,
.safe-menu-list .file-label > span{
  position:static !important;
  transform:none !important;
  margin:0 !important;
  padding:0 !important;
  display:block !important;
  min-width:0 !important;
  color:#111827 !important;
  font-weight:750 !important;
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
}

.safe-menu-list button::after,
.safe-menu-list .file-label::after{
  display:none !important;
  content:none !important;
}

.safe-menu-list button:hover > span,
.safe-menu-list button:focus-visible > span{
  color:#064fa3 !important;
}

.summary-panel{
  padding-top:16px !important;
}

.summary-panel > .section-title{
  margin-bottom:14px !important;
  font-size:18px !important;
}

.main-range-card.compact-range-card{
  min-height:auto !important;
  padding:14px 16px !important;
}

.compact-main-range-grid{
  gap:10px 14px !important;
}

.compact-main-range-grid select,
.compact-main-range-grid input[type="date"]{
  min-width:160px !important;
  max-width:220px !important;
}

.stats-grid{
  gap:10px !important;
}

.stat{
  min-height:100px !important;
  padding:16px 18px !important;
  column-gap:14px !important;
}

.stat::before{
  width:44px !important;
  height:44px !important;
  font-size:23px !important;
}

.stat span{
  font-size:13px !important;
  line-height:1.2 !important;
}

.stat strong{
  font-size:24px !important;
}

.total-amount-card{
  min-height:66px !important;
  padding:10px 16px !important;
}

.history-panel > .section-title{
  min-height:50px !important;
}

.history-total::before{
  content:"" !important;
  display:none !important;
}

.history-total{
  min-height:40px !important;
  font-size:14px !important;
}

@media(max-width:900px){
  .control-panel{
    width:100% !important;
    overflow:visible !important;
  }

  .safe-menu-list button,
  .safe-menu-list .file-label{
    min-height:44px !important;
  }

  .compact-main-range-grid select,
  .compact-main-range-grid input[type="date"]{
    max-width:none !important;
  }
}

/* Clean, compact GPS/manual history cards */
.shift-list,
.manual-shift-list{
  display:grid !important;
  gap:10px !important;
}

.shift-card.compact-shift,
.manual-shift-list .manual-auto-style{
  display:block !important;
  width:100% !important;
  padding:0 !important;
  border:1px solid #d8e2ef !important;
  border-radius:6px !important;
  background:#fff !important;
  overflow:hidden !important;
  box-shadow:0 1px 2px rgba(15,43,78,.04) !important;
}

.shift-card.compact-shift > summary.shift-summary,
.manual-shift-list .manual-auto-style > summary.shift-summary{
  display:grid !important;
  grid-template-columns:minmax(180px,1fr) auto auto !important;
  gap:12px !important;
  align-items:center !important;
  min-height:54px !important;
  padding:10px 14px !important;
  list-style:none !important;
  cursor:pointer !important;
  background:#fff !important;
  border-bottom:1px solid #edf2f7 !important;
}

.shift-card.compact-shift > summary.shift-summary::-webkit-details-marker,
.manual-shift-list .manual-auto-style > summary.shift-summary::-webkit-details-marker{
  display:none !important;
}

.shift-main strong{
  display:block !important;
  margin:0 0 4px !important;
  color:#111827 !important;
  font-size:14px !important;
  font-weight:850 !important;
}

.shift-meta{
  display:block !important;
  color:#5d6f89 !important;
  font-size:12px !important;
  line-height:1.25 !important;
}

.shift-meta{
  max-width:100% !important;
  color:transparent !important;
  font-size:0 !important;
  line-height:0 !important;
}

.shift-meta::first-line{
  color:transparent !important;
}

.shift-meta{
  display:inline-flex !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  gap:6px !important;
}

.shift-meta::before{
  content:attr(data-clean-time) !important;
}

.shift-meta:not([data-clean-time])::before{
  content:"Time record" !important;
}

.shift-meta::before,
.shift-meta::after{
  display:inline-flex !important;
  align-items:center !important;
  min-height:21px !important;
  padding:3px 7px !important;
  border:1px solid #d7e2ef !important;
  background:#f8fbff !important;
  color:#344a63 !important;
  font-size:12px !important;
  line-height:1 !important;
  font-weight:750 !important;
}

.shift-toggle[open] .shift-meta::after{
  content:"Details open" !important;
  color:#0b3f88 !important;
  background:#eef6ff !important;
}

/* Readable shift time/status chips */
.shift-meta{
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  gap:6px !important;
  color:#5d6f89 !important;
  font-size:12px !important;
  line-height:1.2 !important;
}

.shift-meta::before,
.shift-meta::after{
  display:none !important;
  content:none !important;
}

.meta-chip{
  display:inline-flex !important;
  align-items:center !important;
  min-height:22px !important;
  padding:3px 7px !important;
  border:1px solid #d7e2ef !important;
  background:#f8fbff !important;
  color:#344a63 !important;
  font-size:12px !important;
  line-height:1 !important;
  font-weight:750 !important;
}

.meta-chip.active{
  border-color:#b7dfcc !important;
  background:#eefbf4 !important;
  color:#08703e !important;
}

.meta-chip.duration{
  border-color:#c8d7ea !important;
  background:#fff !important;
  color:#061a3a !important;
  font-weight:850 !important;
}

.history-shift-pay{
  min-width:68px !important;
  justify-self:end !important;
  padding:5px 9px !important;
  border-radius:999px !important;
  background:#dcfce7 !important;
  color:#08703e !important;
  font-size:12px !important;
  font-weight:900 !important;
  text-align:center !important;
}

.view-details{
  justify-self:end !important;
  padding:5px 8px !important;
  border:1px solid #cbd7e6 !important;
  border-radius:4px !important;
  color:#0b3f88 !important;
  background:#f8fbff !important;
  font-size:12px !important;
  font-weight:800 !important;
}

.shift-detail-grid{
  display:grid !important;
  grid-template-columns:1fr 1fr auto !important;
  gap:10px !important;
  align-items:stretch !important;
  padding:12px 14px !important;
  background:#fff !important;
}

.reason-wrap.full-row{
  grid-column:1 / -1 !important;
  display:flex !important;
  flex-wrap:wrap !important;
  gap:6px !important;
  margin:0 !important;
}

.shift-location{
  min-width:0 !important;
  display:grid !important;
  grid-template-columns:42px minmax(0,1fr) !important;
  align-items:start !important;
  gap:8px !important;
  padding:9px 10px !important;
  border:1px solid #e2eaf4 !important;
  border-radius:5px !important;
  background:#f8fbff !important;
}

.shift-location b{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  height:22px !important;
  border-radius:999px !important;
  background:#dff7f7 !important;
  color:#006d77 !important;
  font-size:11px !important;
  font-weight:900 !important;
  text-transform:uppercase !important;
}

.shift-location span{
  min-width:0 !important;
  color:#24364d !important;
  font-size:12px !important;
  line-height:1.3 !important;
  overflow-wrap:anywhere !important;
}

.shift-actions{
  display:flex !important;
  align-items:flex-end !important;
  justify-content:flex-end !important;
  gap:6px !important;
  flex-wrap:wrap !important;
  min-width:180px !important;
}

.shift-actions .ghost,
.shift-actions button.ghost,
.shift-actions a.ghost{
  min-height:30px !important;
  padding:5px 8px !important;
  border:1px solid #cbd7e6 !important;
  border-radius:4px !important;
  background:#fff !important;
  color:#0b3f88 !important;
  font-size:12px !important;
  font-weight:800 !important;
  text-decoration:none !important;
}

.reason-chip,
.gps-mini-chip,
.edit-chip{
  display:inline-flex !important;
  align-items:center !important;
  min-height:22px !important;
  padding:3px 7px !important;
  border-radius:999px !important;
  font-size:11px !important;
  font-weight:800 !important;
}

.gps-mini-chip{
  background:#fff7ed !important;
  color:#b45309 !important;
  border:1px solid #fed7aa !important;
}

.edit-chip{
  background:#eef2ff !important;
  color:#4338ca !important;
  border:1px solid #c7d2fe !important;
}

.manual-history-note{
  color:#5d6f89 !important;
  font-size:12px !important;
}

#manualShiftList:empty::before{
  display:block !important;
  padding:18px !important;
  border:1px dashed #d8e2ef !important;
  border-radius:6px !important;
  color:#5d6f89 !important;
  background:#fbfdff !important;
  text-align:center !important;
}

@media(max-width:900px){
  .shift-detail-grid{
    grid-template-columns:1fr !important;
  }

  .shift-actions{
    min-width:0 !important;
    justify-content:flex-start !important;
  }
}

@media(max-width:520px){
  .shift-card.compact-shift > summary.shift-summary,
  .manual-shift-list .manual-auto-style > summary.shift-summary{
    grid-template-columns:1fr !important;
    gap:8px !important;
  }

  .history-shift-pay,
  .view-details{
    justify-self:start !important;
  }
}

/* Final polish: cleaner header with app logo as the brand */
.topbar{
  height:58px !important;
  min-height:58px !important;
  padding:0 18px !important;
  background:linear-gradient(180deg,#0876d8 0%,#0067c8 100%) !important;
  box-shadow:0 1px 0 rgba(0,0,0,.16) !important;
}

.topbar .brand{
  height:100% !important;
  display:flex !important;
  align-items:center !important;
  gap:12px !important;
  min-width:0 !important;
}

.topbar .brand img.app-logo,
.topbar .brand img{
  display:block !important;
  width:40px !important;
  height:40px !important;
  min-width:40px !important;
  padding:2px !important;
  object-fit:contain !important;
  border-radius:6px !important;
  background:#fff !important;
  box-shadow:0 1px 3px rgba(0,0,0,.22) !important;
}

.topbar .brand h1{
  margin:0 !important;
  color:#fff !important;
  font-size:19px !important;
  line-height:1.05 !important;
  font-weight:850 !important;
  letter-spacing:0 !important;
}

.topbar .brand p{
  display:block !important;
  margin:3px 0 0 !important;
  color:#e8f3ff !important;
  font-size:12px !important;
  line-height:1.2 !important;
  max-width:min(620px, calc(100vw - 420px)) !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

.sidebar-toggle{
  min-height:34px !important;
  border-radius:5px !important;
  background:rgba(255,255,255,.12) !important;
  border:1px solid rgba(255,255,255,.24) !important;
  color:#fff !important;
}

.control-panel{
  background:#f7faff !important;
}

.safe-live-shift-counter{
  background:#edf6ff !important;
  border-color:#cfe3fb !important;
}

.button-row button{
  border-radius:6px !important;
}

.safe-menu-list button,
.safe-menu-list .file-label{
  border-radius:6px !important;
}

.summary-panel,
.history-panel{
  background:#f5f8fc !important;
}

.main-range-card.compact-range-card,
.stat,
.history-panel > .section-title,
.shift-card.compact-shift,
.manual-shift-list .manual-auto-style{
  border-color:#d9e3ef !important;
}

.shift-card.compact-shift > summary.shift-summary,
.manual-shift-list .manual-auto-style > summary.shift-summary{
  background:#fbfdff !important;
}

.shift-detail-grid{
  background:#fff !important;
}

@media(max-width:900px){
  .topbar{
    min-height:62px !important;
    height:auto !important;
    padding:10px 12px !important;
  }

  .topbar .brand img.app-logo,
  .topbar .brand img{
    width:36px !important;
    height:36px !important;
    min-width:36px !important;
  }

  .topbar .brand p{
    max-width:none !important;
    white-space:normal !important;
  }
}

@media(max-width:520px){
  .topbar{
    align-items:center !important;
    gap:10px !important;
  }

  .topbar .brand h1{
    font-size:16px !important;
  }

  .topbar .brand p{
    display:none !important;
  }
}

/* Sharp, consistent UI: remove rounded mixed styling */
.panel,
.main-range-card,
.compact-range-card,
.stat,
.total-amount-card,
.history-panel > .section-title,
.history-total,
.history-subhead,
.shift-list,
.manual-shift-list,
.shift-card,
.shift-card.compact-shift,
.manual-shift-list .manual-auto-style,
.shift-location,
.safe-live-shift-counter,
.button-row button,
.safe-menu-list button,
.safe-menu-list .file-label,
button,
.ghost,
.primary,
.danger,
input,
select,
textarea,
.badge,
.reason-chip,
.gps-mini-chip,
.edit-chip,
.history-shift-pay,
.view-details,
.report-preview,
.modal-card,
.message-card,
.terms-card,
.report-card,
.report-table-wrap,
.report-column-resizer::before,
.report-column-resizer::after{
  border-radius:0 !important;
}

.history-panel{
  display:block !important;
  background:#f5f8fc !important;
}

.history-panel > .section-title{
  min-height:44px !important;
  padding:0 12px !important;
  border:1px solid #d9e3ef !important;
  border-bottom:0 !important;
  background:#fff !important;
}

.history-total{
  min-height:34px !important;
  padding:0 12px !important;
  border:1px solid #d9e3ef !important;
  border-bottom:0 !important;
  background:#fff !important;
}

.history-subhead.auto-subhead,
.history-subhead.manual-subhead{
  min-height:36px !important;
  padding:0 12px !important;
  border:1px solid #d9e3ef !important;
  border-bottom:0 !important;
  background:#f8fbff !important;
}

.shift-list,
.manual-shift-list{
  padding:8px 12px 12px !important;
  border:1px solid #d9e3ef !important;
  border-top:0 !important;
  background:#fff !important;
  gap:8px !important;
}

.manual-history-note{
  padding:8px 12px !important;
  border-left:1px solid #d9e3ef !important;
  border-right:1px solid #d9e3ef !important;
  background:#fff !important;
}

.shift-card.compact-shift,
.manual-shift-list .manual-auto-style{
  border:1px solid #d9e3ef !important;
  background:#fff !important;
  box-shadow:none !important;
}

.shift-card.compact-shift > summary.shift-summary,
.manual-shift-list .manual-auto-style > summary.shift-summary{
  min-height:44px !important;
  padding:8px 10px !important;
  background:#fbfdff !important;
  border-bottom:1px solid #e5edf6 !important;
}

.shift-detail-grid{
  padding:8px 10px !important;
  gap:8px !important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto !important;
}

.shift-location{
  padding:7px 8px !important;
  border:1px solid #dfe8f3 !important;
  background:#f9fbfe !important;
}

.shift-location b{
  border-radius:0 !important;
  height:auto !important;
  min-height:18px !important;
  background:#e7f7f7 !important;
}

.history-shift-pay{
  border:1px solid #a7e4c2 !important;
  background:#e7fbef !important;
}

.shift-actions .ghost,
.shift-actions button.ghost,
.shift-actions a.ghost{
  border-radius:0 !important;
  min-height:28px !important;
}

@media(max-width:900px){
  .shift-detail-grid{
    grid-template-columns:1fr !important;
  }
}

/* Reduce visual noise: remove nested boxes and extra borders */
.history-panel,
.history-panel > .section-title,
.history-total,
.history-subhead.auto-subhead,
.history-subhead.manual-subhead,
.shift-list,
.manual-shift-list,
.manual-history-note{
  border-left:0 !important;
  border-right:0 !important;
}

.history-panel > .section-title{
  border-top:1px solid #d9e3ef !important;
  border-bottom:1px solid #d9e3ef !important;
  background:#fff !important;
}

.history-total{
  border:0 !important;
  border-bottom:1px solid #e5edf6 !important;
  background:#fff !important;
}

.history-subhead.auto-subhead,
.history-subhead.manual-subhead{
  border:0 !important;
  background:#fff !important;
}

.shift-list,
.manual-shift-list{
  border:0 !important;
  background:#fff !important;
}

.shift-card.compact-shift,
.manual-shift-list .manual-auto-style{
  border:0 !important;
  border-bottom:1px solid #e5edf6 !important;
  background:#fff !important;
}

.shift-card.compact-shift:last-child,
.manual-shift-list .manual-auto-style:last-child{
  border-bottom:0 !important;
}

.shift-card.compact-shift > summary.shift-summary,
.manual-shift-list .manual-auto-style > summary.shift-summary{
  border-bottom:0 !important;
  background:#fff !important;
}

.shift-detail-grid{
  border-top:1px solid #eef3f8 !important;
  background:#fff !important;
}

.shift-location{
  border:0 !important;
  border-left:3px solid #dbeafe !important;
  background:#f9fbfe !important;
}

.shift-actions .ghost,
.shift-actions button.ghost,
.shift-actions a.ghost{
  border:1px solid #d7e2ef !important;
  background:#fff !important;
}

.reason-chip,
.gps-mini-chip,
.edit-chip,
.history-shift-pay,
.view-details{
  box-shadow:none !important;
}

.manual-history-note{
  background:#fff !important;
}

/* Consistent combined total strip */
.total-amount-card{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:0 !important;
  align-items:stretch !important;
  min-height:74px !important;
  padding:0 !important;
  margin:0 0 16px !important;
  border:1px solid #d4e6ff !important;
  border-radius:5px !important;
  background:#eaf4ff !important;
  overflow:hidden !important;
}

.total-amount-card > div:first-child,
.total-amount-meta span{
  min-height:72px !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  gap:6px !important;
  padding:10px 14px !important;
  border-left:1px solid #a9c9ef !important;
  background:transparent !important;
  text-align:center !important;
}

.total-amount-card > div:first-child{
  border-left:0 !important;
}

.total-amount-card > div:first-child span,
.total-amount-meta span{
  color:#0b2a55 !important;
  font-size:14px !important;
  font-weight:800 !important;
  line-height:1.15 !important;
}

.total-amount-card > div:first-child strong,
.total-amount-meta span strong{
  display:block !important;
  margin:0 !important;
  color:#061a3a !important;
  font-size:22px !important;
  line-height:1 !important;
  font-weight:900 !important;
}

.total-amount-meta{
  display:contents !important;
}

@media(max-width:900px){
  .total-amount-card{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }

  .total-amount-card > div:first-child,
  .total-amount-meta span{
    border-top:1px solid #a9c9ef !important;
  }

  .total-amount-card > div:first-child,
  .total-amount-meta span:nth-child(1){
    border-top:0 !important;
  }
}

@media(max-width:520px){
  .total-amount-card{
    grid-template-columns:1fr !important;
  }

  .total-amount-card > div:first-child,
  .total-amount-meta span{
    border-left:0 !important;
    border-top:1px solid #a9c9ef !important;
  }

  .total-amount-card > div:first-child{
    border-top:0 !important;
  }
}

/* Flatten combined total strip into a clean bar */
.total-amount-card,
.summary-panel .total-amount-card{
  border-radius:4px !important;
  background:#eaf4ff !important;
}

.total-amount-card > div:first-child,
.total-amount-card .total-amount-meta span,
.total-amount-meta span,
.summary-panel .total-amount-card > div,
.summary-panel .total-amount-meta span{
  border-radius:0 !important;
  box-shadow:none !important;
  background:transparent !important;
  outline:0 !important;
}

.total-amount-card > div:first-child,
.total-amount-meta span{
  border-left:1px solid #9fc2ef !important;
}

.total-amount-card > div:first-child{
  border-left:0 !important;
}

.total-amount-meta span::before,
.total-amount-meta span::after,
.total-amount-card > div:first-child::before,
.total-amount-card > div:first-child::after{
  display:none !important;
  content:none !important;
}

/* Clear active-shift button states */
#punchInBtn:disabled{
  background:#e7eef7 !important;
  border:1px solid #c9d7e8 !important;
  color:#37526f !important;
  cursor:not-allowed !important;
  opacity:1 !important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.55) !important;
}

#punchInBtn:disabled > span{
  color:#37526f !important;
}

#punchInBtn:disabled::before{
  content:"✓" !important;
  color:#1b7f5d !important;
  border-color:#9fd8c3 !important;
  background:#f3fbf7 !important;
}

#punchInBtn:disabled:hover,
#punchInBtn:disabled:active{
  transform:none !important;
  filter:none !important;
}

#punchOutBtn:not(:disabled){
  box-shadow:0 6px 12px rgba(220,70,80,.18) !important;
}

#breakBtn:not(:disabled){
  box-shadow:0 6px 12px rgba(217,119,6,.12) !important;
}

#breakBtn:disabled,
#punchOutBtn:disabled{
  cursor:not-allowed !important;
  opacity:1 !important;
  filter:saturate(.75) !important;
}

/* === Mobile hardening pass === */
html{
  width:100%;
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}

body{
  width:100%;
  min-width:0;
  overflow-x:hidden;
}

.app-shell,
.layout,
.panel,
.topbar,
.modal,
.modal-backdrop,
.report-preview,
.report-table-wrap,
.shift-list,
.manual-shift-list{
  max-width:100%;
}

.brand,
.brand > div,
.topbar,
.layout,
.panel,
.stat,
.shift-card,
.shift-summary,
.shift-detail-grid,
.manual-shift-card,
.main-range-card,
.total-amount-card,
.report-settings-card,
.modal-card{
  min-width:0;
}

button,
.file-label,
input,
select,
textarea{
  min-width:0;
  max-width:100%;
}

@media (max-width: 900px){
  .topbar{
    position:sticky !important;
    top:0 !important;
    z-index:50 !important;
    display:grid !important;
    grid-template-columns:minmax(0, 1fr) auto !important;
    align-items:center !important;
    padding:10px 12px !important;
    min-height:58px !important;
  }

  .topbar .brand{
    width:100%;
    min-width:0;
    overflow:hidden;
  }

  .topbar .brand h1{
    font-size:18px !important;
    line-height:1.1 !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }

  .topbar .brand p{
    max-width:100% !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }

  .top-actions{
    display:flex !important;
    width:auto !important;
  }

  .sidebar-toggle{
    min-width:44px !important;
    min-height:44px !important;
    padding:8px 10px !important;
  }

  .layout{
    display:grid !important;
    grid-template-columns:1fr !important;
    grid-template-areas:
      "control"
      "summary"
      "history" !important;
    gap:10px !important;
    padding:10px !important;
  }

  .panel{
    width:100% !important;
    padding:12px !important;
    margin:0 !important;
    box-shadow:none !important;
  }

  .button-row{
    position:static !important;
    top:auto !important;
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:8px !important;
    padding:0 !important;
    margin:0 0 12px !important;
    border:0 !important;
    background:transparent !important;
  }

  .button-row button,
  .safe-menu-list button,
  .sidebar-menu-list button,
  .sidebar-menu-list .file-label,
  .report-toolbar button,
  .modal-actions button,
  .message-actions button{
    min-height:44px !important;
    white-space:normal !important;
    overflow-wrap:anywhere !important;
    line-height:1.2 !important;
  }

  #gpsFailPunchOutBtn,
  #newManualShiftBtn{
    grid-column:1 / -1 !important;
  }

  .main-range-grid,
  .compact-main-range-grid,
  .report-range-grid,
  .settings-modal-body,
  .clean-settings-grid,
  .clean-pay-grid,
  .pay-options-grid,
  .report-period-grid,
  .brand-picker,
  .report-settings-card .brand-picker{
    grid-template-columns:1fr !important;
  }

  .main-range-grid button,
  .compact-main-range-grid button{
    width:100% !important;
    grid-column:auto !important;
  }

  .stats-grid{
    grid-template-columns:1fr 1fr !important;
    gap:8px !important;
  }

  .stat{
    padding:10px !important;
  }

  .stat strong,
  .stats-grid .stat strong{
    font-size:18px !important;
    line-height:1.1 !important;
  }

  .total-amount-card{
    grid-template-columns:1fr 1fr !important;
    margin-bottom:12px !important;
  }

  .total-amount-card > div:first-child,
  .total-amount-meta span{
    min-height:64px !important;
    padding:9px !important;
  }

  .shift-card,
  .compact-shift,
  .manual-shift-card,
  .manual-shift-list .manual-auto-style{
    width:100% !important;
    display:block !important;
    overflow:hidden !important;
  }

  .shift-summary,
  .manual-shift-list .manual-auto-style > summary.shift-summary{
    display:grid !important;
    grid-template-columns:minmax(0, 1fr) auto !important;
    gap:8px !important;
    align-items:center !important;
  }

  .shift-detail-grid,
  .manual-shift-list .manual-auto-style .shift-detail-grid{
    display:grid !important;
    grid-template-columns:1fr !important;
  }

  .shift-location span,
  .shift-meta,
  .history-shift-pay,
  .gps-mini-chip,
  .reason-chip{
    overflow-wrap:anywhere !important;
    white-space:normal !important;
  }

  .shift-actions,
  .compact-shift .shift-actions,
  .manual-shift-list .manual-auto-style .shift-actions{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:8px !important;
    width:100% !important;
  }

  .shift-actions a,
  .shift-actions button{
    width:100% !important;
  }

  .report-settings-modal,
  .modal{
    padding:10px !important;
    align-items:center !important;
    place-items:center !important;
    overflow:auto !important;
  }

  .modal-card,
  .report-card,
  .message-card,
  .terms-card,
  .report-range-card,
  .report-settings-card{
    width:100% !important;
    max-width:calc(100vw - 20px) !important;
    max-height:calc(100dvh - 20px) !important;
    overflow:auto !important;
  }

  .modal-backdrop{
    padding:10px !important;
    overflow:auto !important;
  }

  .shift-modal,
  #manualShiftModalBackdrop > .manual-shift-center-card,
  #editManualShiftModalBackdrop .shift-modal{
    width:100% !important;
    max-width:calc(100vw - 20px) !important;
    max-height:calc(100dvh - 20px) !important;
    overflow:auto !important;
  }

  #reportModal{
    padding:0 !important;
    align-items:stretch !important;
    place-items:stretch !important;
  }

  #reportModal .report-card{
    width:100vw !important;
    max-width:100vw !important;
    height:100dvh !important;
    max-height:100dvh !important;
    border-radius:0 !important;
  }

  #reportModal .report-toolbar{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:8px !important;
  }

  .report-preview,
  .report-table-wrap{
    overflow-x:auto !important;
    -webkit-overflow-scrolling:touch;
  }

  .report-table,
  .unified-report-table,
  .work-report.clean-work-report .unified-report-table{
    min-width:720px !important;
  }
}

@media (max-width: 520px){
  .topbar{
    padding:8px 10px !important;
  }

  .topbar .brand img,
  .topbar .brand img.app-logo{
    width:34px !important;
    height:34px !important;
    min-width:34px !important;
    flex-basis:34px !important;
  }

  .topbar .brand p{
    display:none !important;
  }

  .layout{
    padding:8px !important;
    gap:8px !important;
  }

  .button-row,
  .stats-grid,
  .total-amount-card,
  .shift-actions,
  .compact-shift .shift-actions,
  .manual-shift-list .manual-auto-style .shift-actions,
  #reportModal .report-toolbar,
  .message-actions,
  .message-actions.two,
  .modal-actions{
    grid-template-columns:1fr !important;
  }

  .live-time{
    font-size:28px !important;
    letter-spacing:0 !important;
  }

  .section-title{
    flex-wrap:wrap !important;
    align-items:flex-start !important;
  }

  .section-title .ghost,
  .section-title button{
    width:100% !important;
  }

  .total-amount-card > div:first-child,
  .total-amount-meta span{
    border-left:0 !important;
    border-top:1px solid #9fc2ef !important;
  }

  .total-amount-card > div:first-child{
    border-top:0 !important;
  }

  .history-total{
    display:block !important;
    line-height:1.55 !important;
  }

  .safe-menu-list{
    gap:8px !important;
  }

  .safe-menu-list button{
    padding:10px 30px 10px 14px !important;
    font-size:14px !important;
  }

  .sidebar-backdrop.is-open .app-sidebar,
  .app-sidebar{
    width:min(92vw, 340px) !important;
  }
}

@supports not (height: 100dvh){
  @media (max-width: 900px){
    .modal-card,
    .report-card,
    .message-card,
    .terms-card,
    .report-range-card,
    .report-settings-card{
      max-height:calc(100vh - 20px) !important;
    }

    #reportModal .report-card{
      height:100vh !important;
      max-height:100vh !important;
    }
  }
}

/* === Mobile quick-log layout: buttons, date range, history === */
.mobile-range-pager{
  display:grid;
  grid-template-columns:auto minmax(0, 1fr) auto;
  gap:8px;
  align-items:center;
  margin-top:10px;
}

.mobile-range-pager span{
  display:block;
  min-width:0;
  color:#334155;
  font-size:13px;
  font-weight:800;
  line-height:1.3;
  text-align:center;
  overflow-wrap:anywhere;
}

@media (max-width: 900px){
  .sidebar-toggle{
    width:44px !important;
    min-width:44px !important;
    padding:0 !important;
    gap:0 !important;
    border-radius:8px !important;
  }

  .sidebar-toggle span:not(.sidebar-toggle-icon){
    display:none !important;
  }

  .sidebar-toggle-icon{
    font-size:22px !important;
  }

  .desktop-sidebar-logo,
  .clock-card,
  .current-shift-safe-menu,
  .summary-panel > .section-title,
  .summary-panel .stats-grid,
  .summary-panel .total-amount-card{
    display:none !important;
  }

  .control-panel{
    display:grid !important;
    gap:10px !important;
  }

  .control-panel .section-title{
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
  }

  .safe-live-shift-counter{
    margin:0 !important;
  }

  .button-row{
    margin:0 !important;
  }

  .button-row button{
    min-height:56px !important;
    font-size:16px !important;
    font-weight:900 !important;
  }

  .summary-panel{
    padding:10px !important;
  }

  .compact-range-card{
    padding:10px !important;
    margin:0 !important;
    border-radius:8px !important;
  }

  .main-range-head{
    margin-bottom:8px !important;
  }

  .main-range-head strong{
    font-size:15px !important;
  }

  .main-range-head span{
    display:none !important;
  }

  .compact-main-range-grid{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:8px !important;
  }

  .compact-main-range-grid label,
  .compact-main-range-grid button{
    grid-column:1 / -1 !important;
  }

  .compact-main-range-grid select,
  .compact-main-range-grid input,
  .compact-main-range-grid button{
    min-height:44px !important;
    height:44px !important;
    font-size:14px !important;
  }

  .main-custom-date.hidden{
    display:none !important;
  }

  .field-status,
  .shift-history-range-status,
  #mainRangeStatus{
    font-size:12.5px !important;
    line-height:1.35 !important;
  }

  .mobile-range-pager{
    grid-template-columns:1fr 1fr !important;
  }

  .mobile-range-pager span{
    grid-column:1 / -1;
    grid-row:1;
    padding:7px 8px;
    background:#eef6ff;
    border:1px solid #d7e7fb;
    border-radius:6px;
  }

  .mobile-range-pager button{
    grid-row:2;
    width:100% !important;
    min-height:42px !important;
  }

  .history-panel{
    padding:10px !important;
  }

  .history-panel > .section-title{
    margin:0 0 8px !important;
    padding:0 !important;
    border:0 !important;
    background:transparent !important;
  }

  .history-panel > .section-title > span{
    font-size:16px !important;
    line-height:1.2 !important;
  }

  #copySummaryBtn{
    display:none !important;
  }

  .history-total{
    margin:0 0 8px !important;
  }

  .history-panel .shift-history-range-status{
    display:block !important;
    margin:0 0 8px !important;
    padding:0 !important;
   }

  .manual-history-note{
    display:none !important;
  }
}

@media (max-width: 420px){
  .brand h1{
    font-size:17px !important;
  }

  .button-row button{
    min-height:54px !important;
  }
}

/* Final mobile button cleanup: no mini icons, centered labels */
.button-row button,
#punchInBtn,
#breakBtn,
#punchOutBtn,
#newManualShiftBtn{
  justify-content:center !important;
  align-items:center !important;
  text-align:center !important;
  gap:0 !important;
  padding-left:12px !important;
  padding-right:12px !important;
}

.button-row button > span,
#punchInBtn > span,
#breakBtn > span,
#punchOutBtn > span,
#newManualShiftBtn > span{
  display:block !important;
  width:100% !important;
  margin:0 !important;
  text-align:center !important;
  transform:none !important;
}

.button-row button::before,
.button-row button::after,
#punchInBtn::before,
#punchInBtn::after,
#breakBtn::before,
#breakBtn::after,
#punchOutBtn::before,
#punchOutBtn::after,
#newManualShiftBtn::before,
#newManualShiftBtn::after{
  display:none !important;
  content:none !important;
}

/* === Desktop layout repair === */
@media (min-width: 901px){
  body{
    overflow-x:hidden !important;
  }

  .topbar{
    position:sticky !important;
    top:0 !important;
    z-index:50 !important;
    min-height:58px !important;
    height:58px !important;
    padding:8px 18px !important;
  }

  .topbar .brand{
    min-width:0 !important;
    gap:10px !important;
  }

  .topbar .brand img.app-logo,
  .topbar .brand img{
    width:40px !important;
    height:40px !important;
    min-width:40px !important;
    flex:0 0 40px !important;
    object-fit:cover !important;
    object-position:center !important;
    background:#ffffff !important;
    border:1px solid rgba(255,255,255,.55) !important;
    border-radius:6px !important;
    padding:1px !important;
  }

  .topbar .brand h1{
    font-size:18px !important;
    line-height:1.08 !important;
    margin:0 !important;
  }

  .topbar .brand p{
    max-width:none !important;
    margin-top:3px !important;
    font-size:11px !important;
    line-height:1.25 !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }

  .layout{
    width:100% !important;
    max-width:none !important;
    min-height:calc(100dvh - 58px) !important;
    display:grid !important;
    grid-template-columns:300px minmax(0, 1fr) !important;
    grid-template-areas:
      "control summary"
      "control history" !important;
    gap:16px !important;
    padding:16px !important;
    align-items:start !important;
    margin:0 !important;
    overflow:visible !important;
  }

  .control-panel{
    grid-area:control !important;
    position:sticky !important;
    top:74px !important;
    width:100% !important;
    max-height:calc(100dvh - 90px) !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    padding:14px !important;
    scrollbar-gutter:stable !important;
  }

  .summary-panel{
    grid-area:summary !important;
    min-width:0 !important;
    width:100% !important;
    overflow:hidden !important;
  }

  .history-panel{
    grid-area:history !important;
    min-width:0 !important;
    width:100% !important;
    overflow:hidden !important;
  }

  .desktop-sidebar-logo{
    display:flex !important;
    justify-content:center !important;
    margin:0 0 12px !important;
    padding:0 !important;
    background:transparent !important;
    border:0 !important;
  }

  .desktop-sidebar-logo img{
    width:74px !important;
    height:74px !important;
    object-fit:cover !important;
    border-radius:10px !important;
    border:1px solid #d7e5f4 !important;
    background:#ffffff !important;
    padding:2px !important;
  }

  .control-panel .section-title{
    margin-bottom:10px !important;
  }

  .safe-live-shift-counter{
    margin-bottom:10px !important;
  }

  .button-row{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:8px !important;
    margin:0 0 12px !important;
  }

  .button-row button{
    min-height:46px !important;
    width:100% !important;
  }

  #gpsFailPunchOutBtn,
  #newManualShiftBtn{
    grid-column:auto !important;
  }

  .current-shift-safe-menu{
    display:block !important;
    margin-top:10px !important;
  }

  .safe-menu-list{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:7px !important;
  }

  .safe-menu-list button,
  .safe-menu-list .file-label{
    width:100% !important;
    min-height:38px !important;
    padding:8px 12px !important;
    justify-content:flex-start !important;
  }

  .main-range-card{
    padding:14px 16px !important;
    margin-bottom:16px !important;
    overflow:hidden !important;
  }

  .main-range-grid,
  .compact-main-range-grid{
    display:grid !important;
    grid-template-columns:220px 170px 170px minmax(150px, 1fr) !important;
    gap:12px !important;
    align-items:end !important;
  }

  .main-range-grid label,
  .compact-main-range-grid label{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:6px !important;
    align-items:start !important;
    min-width:0 !important;
  }

  .main-range-grid label span,
  .compact-main-range-grid label span{
    display:block !important;
    white-space:nowrap !important;
    line-height:1.1 !important;
  }

  .main-custom-date.hidden{
    display:none !important;
  }

  .compact-main-range-grid button,
  #mainGenerateReportBtn{
    width:auto !important;
    min-width:116px !important;
    height:38px !important;
    white-space:nowrap !important;
  }

  .mobile-range-pager{
    display:grid !important;
    grid-template-columns:140px minmax(0, 1fr) 140px !important;
    align-items:center !important;
    gap:12px !important;
    margin-top:10px !important;
  }

  .mobile-range-pager button{
    width:100% !important;
    min-height:34px !important;
  }

  .mobile-range-pager span{
    min-width:0 !important;
    text-align:center !important;
    white-space:normal !important;
  }

  .stats-grid{
    display:grid !important;
    grid-template-columns:repeat(5, minmax(150px, 1fr)) !important;
    gap:10px !important;
    width:100% !important;
    overflow:visible !important;
  }

  .stat{
    min-width:0 !important;
    width:100% !important;
    display:grid !important;
    grid-template-columns:46px minmax(0, 1fr) !important;
    grid-template-areas:
      "icon label"
      "icon value" !important;
    column-gap:10px !important;
    align-items:center !important;
    padding:14px !important;
    overflow:hidden !important;
  }

  .stats-grid .stat{
    display:grid !important;
    grid-template-columns:46px minmax(0, 1fr) !important;
    grid-template-areas:
      "icon label"
      "icon value" !important;
    align-items:center !important;
  }

  .stat::before{
    grid-area:icon !important;
    width:46px !important;
    height:46px !important;
    margin:0 !important;
    align-self:center !important;
    justify-self:center !important;
    flex:0 0 auto !important;
  }

  .stat span{
    grid-area:label !important;
    min-width:0 !important;
    margin:0 0 4px !important;
    white-space:normal !important;
    overflow:visible !important;
    text-overflow:clip !important;
    font-size:12px !important;
    line-height:1.15 !important;
  }

  .stats-grid .stat span{
    white-space:normal !important;
    overflow:visible !important;
    text-overflow:clip !important;
    word-break:normal !important;
  }

  .stat strong{
    grid-area:value !important;
    min-width:0 !important;
    font-size:24px !important;
    line-height:1.05 !important;
    overflow-wrap:anywhere !important;
  }

  .combined-stat span{
    font-size:11px !important;
  }

  .total-amount-card{
    width:100% !important;
    grid-template-columns:repeat(4, minmax(0, 1fr)) !important;
    margin-top:14px !important;
    overflow:hidden !important;
  }
}

@media (min-width: 901px) and (max-width: 1220px){
  .layout{
    grid-template-columns:280px minmax(0, 1fr) !important;
    gap:14px !important;
    padding:14px !important;
  }

  .stats-grid{
    grid-template-columns:repeat(3, minmax(180px, 1fr)) !important;
  }

  .main-range-grid,
  .compact-main-range-grid{
    grid-template-columns:minmax(160px, 1fr) auto !important;
  }

  .main-custom-date{
    grid-column:auto !important;
  }
}

/* Remove duplicate side-rail app icon; header keeps the app icon. */
.desktop-sidebar-logo{
  display:none !important;
}

@media (min-width: 901px){
  .summary-panel .compact-range-card .compact-main-range-grid label,
  .summary-panel .main-range-card .main-range-grid label{
    display:grid !important;
    grid-template-columns:1fr !important;
    grid-template-rows:auto 38px !important;
    gap:6px !important;
    align-items:stretch !important;
    min-width:0 !important;
  }

  .summary-panel .compact-range-card .compact-main-range-grid label span,
  .summary-panel .main-range-card .main-range-grid label span{
    position:static !important;
    display:block !important;
    width:auto !important;
    height:auto !important;
    margin:0 !important;
    padding:0 !important;
    white-space:nowrap !important;
    text-align:left !important;
  }

  .summary-panel .compact-range-card .compact-main-range-grid label input,
  .summary-panel .compact-range-card .compact-main-range-grid label select,
  .summary-panel .main-range-card .main-range-grid label input,
  .summary-panel .main-range-card .main-range-grid label select{
    width:100% !important;
    min-width:0 !important;
    height:38px !important;
  }

  .summary-panel .stats-grid .stat{
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
    justify-content:center !important;
    gap:8px !important;
    text-align:center !important;
    min-height:96px !important;
  }

  .summary-panel .stats-grid .stat::before{
    display:none !important;
    content:none !important;
  }

  .summary-panel .stats-grid .stat span{
    display:block !important;
    white-space:normal !important;
    overflow:visible !important;
    text-overflow:clip !important;
    word-break:normal !important;
    line-height:1.15 !important;
    text-align:center !important;
    width:100% !important;
    max-width:100% !important;
    margin:0 !important;
  }

  .summary-panel .stats-grid .stat strong{
    display:block !important;
    min-width:0 !important;
    width:auto !important;
    max-width:100% !important;
    text-align:center !important;
    margin:0 !important;
    overflow:visible !important;
    text-overflow:clip !important;
    white-space:nowrap !important;
    font-size:22px !important;
    line-height:1 !important;
  }
}

/* === Desktop cleanup: tighter dashboard, less empty space === */
@media (min-width: 901px){
  .layout{
    grid-template-rows:auto auto !important;
    row-gap:14px !important;
  }

  .summary-panel,
  .history-panel{
    height:auto !important;
    min-height:0 !important;
  }

  .summary-panel{
    padding:14px !important;
  }

  .summary-panel > .section-title{
    margin:0 0 12px !important;
    padding:0 !important;
    border:0 !important;
    background:transparent !important;
    min-height:0 !important;
  }

  .summary-panel > .section-title span{
    font-size:22px !important;
    line-height:1.1 !important;
  }

  .summary-panel .compact-range-card{
    margin:0 0 12px !important;
    padding:12px 14px !important;
    border-radius:8px !important;
    box-shadow:none !important;
  }

  .summary-panel .stats-grid{
    margin:0 !important;
    gap:8px !important;
  }

  .summary-panel .stats-grid .stat{
    min-height:76px !important;
    padding:10px 12px !important;
    gap:5px !important;
    border-radius:8px !important;
  }

  .summary-panel .stats-grid .stat span{
    font-size:12px !important;
    line-height:1.15 !important;
  }

  .summary-panel .stats-grid .stat strong{
    font-size:22px !important;
  }

  .summary-panel .total-amount-card{
    min-height:56px !important;
    margin:10px 0 0 !important;
    border-radius:8px !important;
  }

  .summary-panel .total-amount-card > div:first-child,
  .summary-panel .total-amount-meta span{
    min-height:54px !important;
    padding:8px 10px !important;
  }

  .summary-panel .total-amount-card strong,
  .summary-panel .total-amount-meta span strong{
    font-size:20px !important;
  }

  .history-panel{
    margin-top:0 !important;
    padding:12px 14px !important;
  }

  .history-panel > .section-title{
    margin:0 0 8px !important;
    min-height:40px !important;
  }

  .history-total{
    min-height:30px !important;
    padding:6px 10px !important;
    margin:0 0 8px !important;
  }

  .history-subhead.auto-subhead,
  .history-subhead.manual-subhead{
    min-height:30px !important;
    margin:8px 0 0 !important;
    padding:6px 0 !important;
  }

  #emptyState{
    max-width:620px !important;
    min-height:0 !important;
    padding:16px 18px !important;
    margin:6px 0 8px !important;
  }

  .manual-history-note{
    display:none !important;
  }

  .manual-shift-list{
    min-height:0 !important;
    padding:8px 0 0 !important;
    border:0 !important;
    background:transparent !important;
  }

  .manual-shift-list > .muted{
    min-height:0 !important;
    height:auto !important;
    padding:12px 14px !important;
    margin:0 !important;
    border:1px dashed #c8d8eb !important;
    background:#fff !important;
    text-align:center !important;
    font-size:12px !important;
    line-height:1.35 !important;
  }
}

@media (min-width: 901px){
  #manualShiftList.manual-shift-list,
  #manualShiftList.manual-shifts-inside-history{
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    padding:8px 0 0 !important;
  }

  #manualShiftList.manual-shift-list > .muted,
  #manualShiftList.manual-shifts-inside-history > .muted{
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    padding:12px 14px !important;
    margin:0 !important;
  }
}

/* Desktop rail cleanup: fit menu content without a tall empty scroll well. */
@media (min-width: 901px){
  .control-panel{
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    overflow:visible !important;
    align-self:start !important;
  }

  .control-panel .section-title{
    min-height:36px !important;
    margin-bottom:8px !important;
  }

  .safe-live-shift-counter{
    min-height:72px !important;
    padding:10px !important;
    margin-bottom:8px !important;
  }

  .button-row{
    gap:6px !important;
    margin-bottom:8px !important;
  }

  .button-row button{
    min-height:40px !important;
    height:40px !important;
  }

  .current-shift-safe-menu{
    margin-top:8px !important;
  }

  .safe-menu-list{
    gap:4px !important;
  }

  .safe-menu-list button,
  .safe-menu-list .file-label{
    min-height:32px !important;
    padding:6px 10px !important;
    font-size:13px !important;
  }
}

@media (min-width: 901px){
  .control-panel .button-row button,
  .control-panel #punchInBtn,
  .control-panel #breakBtn,
  .control-panel #punchOutBtn,
  .control-panel #newManualShiftBtn{
    height:42px !important;
    min-height:42px !important;
    padding-top:6px !important;
    padding-bottom:6px !important;
  }

  .control-panel .safe-menu-list button,
  .control-panel .safe-menu-list .file-label{
    height:34px !important;
    min-height:34px !important;
    padding:5px 10px !important;
    font-size:13px !important;
    line-height:1.1 !important;
  }

  .control-panel .safe-menu-list button::before,
  .control-panel .safe-menu-list .file-label::before{
    width:22px !important;
    height:22px !important;
    min-width:22px !important;
    font-size:12px !important;
  }

  .control-panel .safe-live-shift-counter{
    min-height:64px !important;
  }

  .control-panel{
    padding-bottom:10px !important;
  }

  .control-panel #safeGenerateReportBtn,
  .control-panel #safeReportSettingsBtn,
  .control-panel #safePaySettingsBtn,
  .control-panel #safeExportCsvBtn,
  .control-panel #safeBackupBtn,
  .control-panel #safeNotificationsBtn,
  .control-panel #safeWorkStatusBtn,
  .control-panel #safeTermsBtn,
  .control-panel #safeRestoreBtn{
    height:34px !important;
    min-height:34px !important;
    max-height:34px !important;
    padding:5px 10px !important;
    font-size:13px !important;
    line-height:1.1 !important;
  }
}

/* Final modal/report overrides kept at the actual end so older responsive rules cannot hide actions. */
#reportModal .report-card{
  display:flex !important;
  flex-direction:column !important;
  overflow:hidden !important;
}

#reportModal .report-toolbar{
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  gap:8px !important;
  padding:8px 10px !important;
  margin:0 !important;
  border:1px solid #d7e2f1 !important;
  border-radius:6px !important;
  background:#f8fbff !important;
}

#reportModal .report-toolbar button{
  flex:1 1 120px !important;
  justify-content:center !important;
  text-align:center !important;
}

#reportModal .report-layout-controls{
  flex:0 0 auto !important;
  margin:8px 0 !important;
}

#reportModal .report-preview,
#reportPreview{
  flex:1 1 auto !important;
  min-height:0 !important;
  overflow:auto !important;
  -webkit-overflow-scrolling:touch !important;
}

#reportPreview .work-report.clean-work-report{
  max-width:1100px !important;
  margin:0 auto !important;
}

#reportPreview .grid-report-wrap{
  width:100% !important;
  max-width:100% !important;
  overflow-x:auto !important;
  border:1px solid #d8e4f2 !important;
  border-radius:8px !important;
  background:#fff !important;
}

#reportPreview .grid-report-table{
  min-width:min(1000px, 100%) !important;
}

.report-settings-card,
.pay-settings-card,
.manual-shift-center-card,
#editManualShiftModalBackdrop .shift-modal,
#editShiftModal .modal-card,
#reasonModal .modal-card,
#gpsFailModal .modal-card,
#termsModal .modal-card,
#messageModal .modal-card,
#confirmModal .modal-card,
#reportRangeModal .modal-card{
  display:flex !important;
  flex-direction:column !important;
  overflow:hidden !important;
}

.settings-modal-body{
  flex:1 1 auto !important;
  min-height:0 !important;
  overflow:auto !important;
  -webkit-overflow-scrolling:touch !important;
}

.report-settings-card .settings-modal-head,
#reportModal .section-title,
.manual-shift-center-card .manual-modal-head{
  flex:0 0 auto !important;
}

.report-settings-card .settings-actions,
.pay-settings-card .settings-actions,
.manual-shift-center-card .modal-actions,
#editManualShiftModalBackdrop .modal-actions,
#editShiftModal #saveEditBtn,
#reasonModal #saveReasonBtn,
#gpsFailModal .message-actions,
#termsModal #termsOkBtn,
#messageModal .message-actions,
#confirmModal .message-actions,
#reportRangeModal .message-actions{
  position:sticky !important;
  bottom:0 !important;
  z-index:6 !important;
  margin-top:12px !important;
  padding-top:10px !important;
  padding-bottom:2px !important;
  background:linear-gradient(180deg, rgba(255,255,255,.9), #fff 38%) !important;
  border-top:1px solid #e1eaf5 !important;
}

.pay-settings-card .settings-actions{
  display:flex !important;
  justify-content:flex-end !important;
}

@media (max-width: 900px){
  #reportRangeModal,
  #reportModal,
  #editShiftModal,
  #gpsFailModal,
  #reasonModal,
  #termsModal,
  #messageModal,
  #confirmModal,
  #reportSettingsPanel,
  #paySettingsPanel,
  .modal-backdrop:not([hidden]){
    align-items:flex-start !important;
    place-items:flex-start center !important;
    justify-content:center !important;
    padding:10px !important;
    overflow-y:auto !important;
    overscroll-behavior:contain !important;
  }

  .modal-card,
  .report-card,
  .message-card,
  .terms-card,
  .report-range-card,
  .report-settings-card,
  .manual-shift-center-card,
  #editManualShiftModalBackdrop .shift-modal{
    width:100% !important;
    max-width:calc(100vw - 20px) !important;
    max-height:calc(100dvh - 20px) !important;
  }

  #reportSettingsPanel .report-settings-card,
  #paySettingsPanel .report-settings-card,
  #manualShiftModalBackdrop .manual-shift-center-card,
  #editManualShiftModalBackdrop .shift-modal{
    height:calc(100dvh - 20px) !important;
  }

  #reportModal .report-card{
    width:100vw !important;
    max-width:100vw !important;
    height:100dvh !important;
    max-height:100dvh !important;
    border-radius:0 !important;
  }

  #reportModal .section-title,
  .report-settings-card .settings-modal-head{
    position:sticky !important;
    top:0 !important;
    z-index:8 !important;
    background:#fff !important;
    border-bottom:1px solid #e1eaf5 !important;
  }

  #reportModal .report-toolbar,
  #reportModal .report-layout-controls{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:8px !important;
  }

  #reportModal .report-layout-note{
    grid-column:1 / -1 !important;
  }

  #reportPreview{
    padding:10px !important;
  }

  #reportPreview .grid-report-table{
    min-width:760px !important;
  }
}

@media (max-width: 520px){
  #reportModal .report-toolbar,
  #reportModal .report-layout-controls{
    grid-template-columns:1fr !important;
  }

  #reportModal .report-toolbar button,
  #reportModal .report-layout-controls select,
  .pay-settings-card .settings-actions button,
  .report-settings-card .settings-actions button{
    width:100% !important;
  }
}

/* Absolute final overrides: visible backup button and excluded automatic shift UI. */
html body #termsModal #termsOkBtn,
html body .terms-card #termsOkBtn,
html body .final-backup-notice-card #termsOkBtn{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:100% !important;
  min-height:52px !important;
  margin-top:16px !important;
  border:0 !important;
  border-radius:12px !important;
  background:#087f5b !important;
  background-color:#087f5b !important;
  color:#ffffff !important;
  font-size:16px !important;
  font-weight:900 !important;
  line-height:1.2 !important;
  text-align:center !important;
  opacity:1 !important;
}

html body #termsModal #termsOkBtn::before,
html body #termsModal #termsOkBtn::after{
  content:none !important;
  display:none !important;
}

html body .auto-exclude-check{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  min-height:46px !important;
  padding:10px 12px !important;
  border:1px solid #d8e2ef !important;
  border-radius:10px !important;
  background:#f8fafc !important;
  color:#0f172a !important;
  font-weight:800 !important;
}

html body .auto-exclude-check input{
  width:18px !important;
  height:18px !important;
  accent-color:#b45309 !important;
}

html body .shift-card.auto-excluded-shift{
  border-color:#f6c66d !important;
  background:#fffbeb !important;
}

html body .shift-card.auto-excluded-shift .shift-main strong,
html body .shift-card.auto-excluded-shift .shift-main .meta-chip,
html body .shift-card.auto-excluded-shift .history-shift-pay .strike-text{
  text-decoration:line-through !important;
  text-decoration-thickness:2px !important;
  text-decoration-color:rgba(71,85,105,.75) !important;
  color:#64748b !important;
}

html body .shift-card.auto-excluded-shift .history-shift-pay{
  display:grid !important;
  gap:2px !important;
  justify-items:end !important;
}

html body .shift-card.auto-excluded-shift .history-shift-pay small{
  color:#92400e !important;
  font-size:11px !important;
  font-weight:900 !important;
}

html body .work-report .auto-excluded-row .strike-text{
  text-decoration:line-through !important;
  text-decoration-thickness:1.5px !important;
  text-decoration-color:rgba(71,85,105,.7) !important;
  color:#64748b !important;
}

html body .work-report .auto-excluded-row{
  background:#fff8e1 !important;
}

/* Absolute final edit-save and excluded-line visibility fix. */
html body #editShiftModal .edit-card,
html body #editShiftModal .modal-card{
  display:flex !important;
  flex-direction:column !important;
  width:min(94vw, 560px) !important;
  max-height:calc(100dvh - 20px) !important;
  overflow:hidden !important;
}

html body #editShiftModal .section-title,
html body #editShiftModal .modal-copy{
  flex:0 0 auto !important;
}

html body #editShiftModal .edit-grid{
  flex:1 1 auto !important;
  min-height:0 !important;
  overflow-y:auto !important;
  padding-bottom:10px !important;
}

html body #editShiftModal #saveEditBtn{
  flex:0 0 auto !important;
  position:sticky !important;
  bottom:0 !important;
  z-index:20 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:100% !important;
  min-height:50px !important;
  margin-top:12px !important;
  border:0 !important;
  border-radius:10px !important;
  background:#087f5b !important;
  color:#fff !important;
  font-size:16px !important;
  font-weight:900 !important;
  opacity:1 !important;
}

html body .shift-excluded-line,
html body .shift-card.auto-excluded-shift .shift-excluded-line,
html body .shift-card.auto-excluded-shift .history-shift-pay .strike-text{
  text-decoration-line:line-through !important;
  text-decoration-thickness:2px !important;
  text-decoration-color:rgba(15,23,42,.85) !important;
  color:#64748b !important;
}

html body .edit-note-line{
  display:grid !important;
  grid-template-columns:auto minmax(0, 1fr) !important;
  gap:8px !important;
  align-items:start !important;
  padding:9px 10px !important;
  border:1px solid #dbe5f0 !important;
  border-radius:8px !important;
  background:#f8fafc !important;
  color:#334155 !important;
}

html body .edit-note-line b{
  color:#0f3767 !important;
  white-space:nowrap !important;
}

html body .edit-note-line span{
  overflow-wrap:anywhere !important;
}

/* Keep the restored week-start selector readable in the compact report filter. */
html body .compact-main-range-grid{
  grid-template-columns:1.05fr .9fr 1fr 1fr auto!important;
}

html body .compact-main-range-grid .main-week-start select{
  width:100%!important;
}

@media(max-width:900px){
  html body .compact-main-range-grid{
    grid-template-columns:1fr 1fr!important;
  }

  html body .compact-main-range-grid button{
    grid-column:1 / -1!important;
    width:100%!important;
  }
}

@media(max-width:520px){
html body .compact-main-range-grid{
  grid-template-columns:1fr!important;
  }
}

/* Final mobile report and shift-history readability pass. */
@media screen and (max-width:760px){
  html body{
    overflow-x:hidden!important;
  }

  html body .topbar{
    min-height:64px!important;
    padding:8px 10px!important;
    gap:8px!important;
  }

  html body .topbar .brand h1{
    font-size:17px!important;
    white-space:normal!important;
  }

  html body .topbar .brand p{
    display:none!important;
  }

  html body .topbar .brand img.app-logo{
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
  }

  html body .sidebar-toggle{
    min-width:48px!important;
    width:48px!important;
    height:48px!important;
    padding:0!important;
  }

  html body .layout{
    padding:10px!important;
    gap:12px!important;
  }

  html body .history-panel{
    padding:14px 12px!important;
    overflow:visible!important;
  }

  html body .history-total{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:6px!important;
    padding:10px 12px!important;
    font-size:15px!important;
  }

  html body .shift-card.compact-shift{
    border-radius:10px!important;
    overflow:hidden!important;
    margin-bottom:10px!important;
  }

  html body .shift-card.compact-shift > summary.shift-summary{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:10px!important;
    padding:13px 14px!important;
    min-height:0!important;
  }

  html body .shift-card.compact-shift .shift-main{
    min-width:0!important;
    display:grid!important;
    gap:7px!important;
  }

  html body .shift-card.compact-shift .shift-main strong{
    font-size:20px!important;
    line-height:1.15!important;
  }

  html body .shift-card.compact-shift .shift-meta{
    display:flex!important;
    flex-wrap:wrap!important;
    gap:6px!important;
    font-size:13px!important;
    line-height:1.2!important;
  }

  html body .shift-card.compact-shift .meta-chip{
    display:inline-flex!important;
    align-items:center!important;
    min-height:28px!important;
    padding:5px 8px!important;
    border:1px solid #d8e4f0!important;
    background:#f8fbff!important;
    color:#0f2747!important;
    font-weight:800!important;
    white-space:normal!important;
  }

  html body .shift-card.compact-shift .worked-duration{
    background:#ecfdf5!important;
    border-color:#b7e4ce!important;
    color:#065f46!important;
  }

  html body .shift-card.compact-shift .worked-duration b{
    margin-right:4px!important;
    color:#064e3b!important;
  }

  html body .history-shift-pay{
    grid-column:2!important;
    grid-row:1!important;
    align-self:start!important;
    min-width:104px!important;
    padding:9px 10px!important;
    font-size:15px!important;
    text-align:center!important;
  }

  html body .shift-card.compact-shift .view-details{
    grid-column:1 / -1!important;
    justify-self:start!important;
    margin-top:2px!important;
  }

  html body .shift-detail-grid{
    grid-template-columns:1fr!important;
    padding:12px 14px!important;
  }

  html body .shift-location{
    display:grid!important;
    grid-template-columns:78px minmax(0,1fr)!important;
    gap:8px!important;
    align-items:start!important;
  }

  html body .shift-location span{
    overflow-wrap:anywhere!important;
  }

  html body #reportModal .section-title{
    min-height:56px!important;
    padding:10px 12px!important;
  }

  html body #reportModal .section-title span{
    font-size:18px!important;
    line-height:1.2!important;
  }

  html body #reportPreview,
  html body .report-export-shell{
    width:100%!important;
    max-width:100%!important;
    padding:12px!important;
    overflow-x:hidden!important;
  }

  html body .report-export-toolbar{
    position:sticky!important;
    top:0!important;
    z-index:20!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
    width:100%!important;
    padding:10px!important;
    background:#fff!important;
    border-bottom:1px solid #dce6f2!important;
    box-shadow:0 4px 12px rgba(15,23,42,.08)!important;
  }

  html body .report-export-toolbar button{
    min-width:0!important;
    width:100%!important;
    min-height:42px!important;
    padding:8px 10px!important;
    font-size:14px!important;
    line-height:1.15!important;
    white-space:normal!important;
  }

  html body #reportPreview .work-report.clean-work-report,
  html body .report-export-shell .work-report.clean-work-report{
    max-width:100%!important;
    width:100%!important;
    margin:0!important;
    padding:0!important;
  }

  html body #reportPreview .professional-report-head,
  html body .report-export-shell .professional-report-head{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:14px!important;
    padding:4px 0 12px!important;
  }

  html body #reportPreview .report-brand,
  html body .report-export-shell .report-brand{
    display:grid!important;
    grid-template-columns:58px minmax(0,1fr)!important;
    gap:12px!important;
    align-items:center!important;
  }

  html body #reportPreview .report-brand img,
  html body .report-export-shell .report-brand img{
    width:58px!important;
    height:58px!important;
  }

  html body #reportPreview .report-title-clean,
  html body .report-export-shell .report-title-clean{
    font-size:25px!important;
    line-height:1.05!important;
    margin:0 0 4px!important;
    overflow-wrap:anywhere!important;
  }

  html body #reportPreview .report-meta-clean,
  html body .report-export-shell .report-meta-clean,
  html body #reportPreview .combined-total-card,
  html body .report-export-shell .combined-total-card,
  html body #reportPreview .report-info.compact,
  html body .report-export-shell .report-info.compact{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:10px!important;
  }

  html body #reportPreview .report-meta-clean > div,
  html body .report-export-shell .report-meta-clean > div,
  html body #reportPreview .combined-total-card > div,
  html body .report-export-shell .combined-total-card > div,
  html body #reportPreview .report-info.compact > div,
  html body .report-export-shell .report-info.compact > div{
    min-width:0!important;
    text-align:left!important;
    padding:10px!important;
    overflow-wrap:anywhere!important;
  }

  html body #reportPreview .report-table-wrap,
  html body .report-export-shell .report-table-wrap{
    overflow:visible!important;
    border:0!important;
    padding:0!important;
  }

  html body #reportPreview .unified-report-table,
  html body .report-export-shell .unified-report-table,
  html body #reportPreview .unified-report-table tbody,
  html body .report-export-shell .unified-report-table tbody,
  html body #reportPreview .unified-report-table tr,
  html body .report-export-shell .unified-report-table tr,
  html body #reportPreview .unified-report-table td,
  html body .report-export-shell .unified-report-table td{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }

  html body #reportPreview .unified-report-table,
  html body .report-export-shell .unified-report-table{
    border:0!important;
    table-layout:auto!important;
  }

  html body #reportPreview .unified-report-table colgroup,
  html body .report-export-shell .unified-report-table colgroup,
  html body #reportPreview .unified-report-table thead,
  html body .report-export-shell .unified-report-table thead{
    display:none!important;
  }

  html body #reportPreview .unified-report-table tr,
  html body .report-export-shell .unified-report-table tr{
    margin:0 0 12px!important;
    padding:12px!important;
    border:1px solid #d9e5f2!important;
    border-radius:10px!important;
    background:#fff!important;
    box-shadow:0 6px 16px rgba(15,23,42,.06)!important;
  }

  html body #reportPreview .unified-report-table td,
  html body .report-export-shell .unified-report-table td{
    display:grid!important;
    grid-template-columns:84px minmax(0,1fr)!important;
    gap:10px!important;
    align-items:start!important;
    padding:8px 0!important;
    border:0!important;
    border-bottom:1px solid #edf2f7!important;
    font-size:14px!important;
    line-height:1.32!important;
    white-space:normal!important;
    overflow:visible!important;
    overflow-wrap:anywhere!important;
  }

  html body #reportPreview .unified-report-table td:last-child,
  html body .report-export-shell .unified-report-table td:last-child{
    border-bottom:0!important;
  }

  html body #reportPreview .unified-report-table td::before,
  html body .report-export-shell .unified-report-table td::before{
    content:attr(data-label)!important;
    color:#64748b!important;
    font-size:11px!important;
    font-weight:900!important;
    text-transform:uppercase!important;
    letter-spacing:.02em!important;
  }

  html body #reportPreview .unified-report-table td:not([data-label]):nth-child(1)::before,
  html body .report-export-shell .unified-report-table td:not([data-label]):nth-child(1)::before{content:"#"!important;}
  html body #reportPreview .unified-report-table td:not([data-label]):nth-child(2)::before,
  html body .report-export-shell .unified-report-table td:not([data-label]):nth-child(2)::before{content:"Type"!important;}
  html body #reportPreview .unified-report-table td:not([data-label]):nth-child(3)::before,
  html body .report-export-shell .unified-report-table td:not([data-label]):nth-child(3)::before{content:"Date"!important;}
  html body #reportPreview .unified-report-table td:not([data-label]):nth-child(4)::before,
  html body .report-export-shell .unified-report-table td:not([data-label]):nth-child(4)::before{content:"Time"!important;}
  html body #reportPreview .unified-report-table td:not([data-label]):nth-child(5)::before,
  html body .report-export-shell .unified-report-table td:not([data-label]):nth-child(5)::before{content:"Location"!important;}
  html body #reportPreview .unified-report-table td:not([data-label]):nth-child(6)::before,
  html body .report-export-shell .unified-report-table td:not([data-label]):nth-child(6)::before{content:"Worked"!important;}
  html body #reportPreview .unified-report-table td:not([data-label]):nth-child(7)::before,
  html body .report-export-shell .unified-report-table td:not([data-label]):nth-child(7)::before{content:"Rate / Pay"!important;}
  html body #reportPreview .unified-report-table td:not([data-label]):nth-child(8)::before,
  html body .report-export-shell .unified-report-table td:not([data-label]):nth-child(8)::before{content:"Pay / Notes"!important;}
  html body #reportPreview .unified-report-table td:not([data-label]):nth-child(9)::before,
  html body .report-export-shell .unified-report-table td:not([data-label]):nth-child(9)::before{content:"Notes / Map"!important;}

  html body #reportPreview .mini-address,
  html body .report-export-shell .mini-address{
    margin:0 0 4px!important;
  }

  html body #reportPreview .report-signature,
  html body .report-export-shell .report-signature{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:12px!important;
    font-size:14px!important;
  }

  html body #reportPreview .report-footer-branded,
  html body .report-export-shell .report-footer-branded{
    display:flex!important;
    flex-wrap:wrap!important;
    justify-content:center!important;
    gap:8px!important;
    text-align:center!important;
    overflow-wrap:anywhere!important;
  }
}

@media screen and (max-width:430px){
  html body #reportPreview .report-meta-clean,
  html body .report-export-shell .report-meta-clean,
  html body #reportPreview .combined-total-card,
  html body .report-export-shell .combined-total-card,
  html body #reportPreview .report-info.compact,
  html body .report-export-shell .report-info.compact{
    grid-template-columns:1fr!important;
  }

  html body #reportPreview .unified-report-table td,
  html body .report-export-shell .unified-report-table td{
    grid-template-columns:76px minmax(0,1fr)!important;
  }
}

/* Final report exclusion guarantee: excluded shifts remain visible but do not count. */
html body .work-report .report-excluded-row,
html body .report-export-shell .report-excluded-row{
  background:#fff8e1!important;
  border-left:4px solid #f59e0b!important;
}

html body .work-report .report-excluded-row .strike-text,
html body .report-export-shell .report-excluded-row .strike-text{
  text-decoration-line:line-through!important;
  text-decoration-thickness:2px!important;
  text-decoration-color:rgba(15,23,42,.78)!important;
  color:#64748b!important;
}

html body .work-report .report-excluded-row small,
html body .report-export-shell .report-excluded-row small,
html body .work-report .report-zero-counted,
html body .report-export-shell .report-zero-counted{
  color:#92400e!important;
  font-weight:900!important;
}

/* Final compact report preview: shorter, readable on desktop and mobile. */
html body #reportModal{
  padding:10px!important;
  overflow:hidden!important;
}

html body #reportModal .report-card{
  width:min(1180px, calc(100vw - 20px))!important;
  height:calc(100dvh - 20px)!important;
  max-width:calc(100vw - 20px)!important;
  max-height:calc(100dvh - 20px)!important;
  display:grid!important;
  grid-template-rows:auto auto minmax(0, 1fr)!important;
  gap:8px!important;
  padding:10px!important;
  overflow:hidden!important;
}

html body #reportModal .section-title{
  min-height:40px!important;
  margin:0!important;
  padding:0 0 8px!important;
}

html body #reportModal .report-toolbar{
  margin:0!important;
  padding:8px!important;
  border-radius:6px!important;
}

html body #reportModal .report-toolbar button{
  min-height:34px!important;
  padding:6px 12px!important;
}

html body #reportPreview{
  min-height:0!important;
  height:100%!important;
  padding:10px!important;
  overflow:auto!important;
  background:#fff!important;
}

html body #reportPreview .work-report.clean-work-report,
html body .report-export-shell .work-report.clean-work-report{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  font-size:11px!important;
  line-height:1.25!important;
}

html body #reportPreview .professional-report-head,
html body .report-export-shell .professional-report-head{
  display:grid!important;
  grid-template-columns:minmax(260px, .95fr) minmax(0, 1.55fr)!important;
  gap:10px!important;
  align-items:center!important;
  margin:0 0 8px!important;
  padding:8px 10px!important;
  border-radius:8px!important;
}

html body #reportPreview .report-brand,
html body .report-export-shell .report-brand{
  display:grid!important;
  grid-template-columns:44px minmax(0,1fr)!important;
  gap:10px!important;
  align-items:center!important;
}

html body #reportPreview .report-brand img,
html body .report-export-shell .report-brand img{
  width:44px!important;
  height:44px!important;
}

html body #reportPreview .report-title-clean,
html body .report-export-shell .report-title-clean{
  font-size:21px!important;
  line-height:1.02!important;
  margin:0 0 2px!important;
}

html body #reportPreview .report-brand p,
html body .report-export-shell .report-brand p{
  margin:0!important;
  font-size:11px!important;
}

html body #reportPreview .report-meta-clean,
html body .report-export-shell .report-meta-clean{
  display:grid!important;
  grid-template-columns:repeat(4, minmax(0, 1fr))!important;
  gap:8px!important;
  text-align:center!important;
}

html body #reportPreview .report-meta-clean > div,
html body .report-export-shell .report-meta-clean > div{
  padding:0!important;
  border:0!important;
  background:transparent!important;
}

html body #reportPreview .report-meta-clean span,
html body .report-export-shell .report-meta-clean span{
  font-size:9px!important;
}

html body #reportPreview .report-meta-clean strong,
html body .report-export-shell .report-meta-clean strong{
  font-size:10px!important;
  line-height:1.22!important;
}

html body #reportPreview .combined-total-card,
html body .report-export-shell .combined-total-card{
  display:grid!important;
  grid-template-columns:repeat(4, minmax(0, 1fr))!important;
  gap:8px!important;
  margin:0 0 10px!important;
  padding:8px 10px!important;
}

html body #reportPreview .combined-total-card > div,
html body .report-export-shell .combined-total-card > div{
  padding:0!important;
  min-height:0!important;
}

html body #reportPreview .combined-total-card span,
html body .report-export-shell .combined-total-card span{
  font-size:9px!important;
}

html body #reportPreview .combined-total-card strong,
html body .report-export-shell .combined-total-card strong{
  font-size:15px!important;
}

html body #reportPreview .combined-total-card small,
html body .report-export-shell .combined-total-card small{
  font-size:9px!important;
}

html body #reportPreview .report-source-summary,
html body #reportPreview .final-combined-summary,
html body #reportPreview .manual-edit-details{
  display:none!important;
}

html body #reportPreview .report-section,
html body .report-export-shell .report-section{
  margin-top:8px!important;
}

html body #reportPreview .shift-detail-block h3,
html body .report-export-shell .shift-detail-block h3{
  margin:0!important;
  font-size:14px!important;
}

html body #reportPreview .one-page-period-line,
html body .report-export-shell .one-page-period-line,
html body #reportPreview .unified-report-title,
html body .report-export-shell .unified-report-title{
  display:none!important;
}

html body #reportPreview .report-table-wrap,
html body .report-export-shell .report-table-wrap{
  max-height:calc(100dvh - 255px)!important;
  overflow:auto!important;
  border:1px solid #d9e4f0!important;
  border-radius:8px!important;
}

html body #reportPreview .unified-report-table,
html body .report-export-shell .unified-report-table{
  width:100%!important;
  min-width:900px!important;
  table-layout:fixed!important;
  font-size:10px!important;
}

html body #reportPreview .unified-report-table th,
html body #reportPreview .unified-report-table td,
html body .report-export-shell .unified-report-table th,
html body .report-export-shell .unified-report-table td{
  padding:5px 6px!important;
  line-height:1.2!important;
  vertical-align:top!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}

html body #reportPreview .unified-report-table th,
html body .report-export-shell .unified-report-table th{
  position:sticky!important;
  top:0!important;
  z-index:2!important;
}

html body #reportPreview .report-signature,
html body #reportPreview .report-footer-branded{
  margin-top:8px!important;
  padding-top:8px!important;
  font-size:11px!important;
}

html body #reportPreview .report-footer-branded img{
  width:24px!important;
  height:24px!important;
}

@media screen and (max-width:760px){
  html body #reportModal{
    padding:0!important;
  }

  html body #reportModal .report-card{
    width:100vw!important;
    height:100dvh!important;
    max-width:100vw!important;
    max-height:100dvh!important;
    border-radius:0!important;
    padding:8px!important;
    gap:7px!important;
  }

  html body #reportModal .section-title{
    min-height:42px!important;
    padding:0 0 6px!important;
  }

  html body #reportModal .report-toolbar{
    padding:6px!important;
  }

  html body #reportModal .report-toolbar button{
    min-height:36px!important;
  }

  html body #reportPreview{
    padding:8px!important;
  }

  html body #reportPreview .professional-report-head,
  html body .report-export-shell .professional-report-head{
    grid-template-columns:1fr!important;
    gap:8px!important;
    padding:8px!important;
    margin-bottom:8px!important;
  }

  html body #reportPreview .report-brand,
  html body .report-export-shell .report-brand{
    grid-template-columns:40px minmax(0,1fr)!important;
  }

  html body #reportPreview .report-brand img,
  html body .report-export-shell .report-brand img{
    width:40px!important;
    height:40px!important;
  }

  html body #reportPreview .report-title-clean,
  html body .report-export-shell .report-title-clean{
    font-size:20px!important;
  }

  html body #reportPreview .report-meta-clean,
  html body .report-export-shell .report-meta-clean,
  html body #reportPreview .combined-total-card,
  html body .report-export-shell .combined-total-card{
    grid-template-columns:1fr 1fr!important;
    gap:6px!important;
  }

  html body #reportPreview .report-meta-clean > div,
  html body .report-export-shell .report-meta-clean > div,
  html body #reportPreview .combined-total-card > div,
  html body .report-export-shell .combined-total-card > div{
    padding:6px!important;
    border:1px solid #e4edf6!important;
    border-radius:7px!important;
    background:#fbfdff!important;
  }

  html body #reportPreview .report-table-wrap,
  html body .report-export-shell .report-table-wrap{
    max-height:none!important;
    overflow:visible!important;
    border:0!important;
  }

  html body #reportPreview .unified-report-table,
  html body .report-export-shell .unified-report-table,
  html body #reportPreview .unified-report-table tbody,
  html body .report-export-shell .unified-report-table tbody,
  html body #reportPreview .unified-report-table tr,
  html body .report-export-shell .unified-report-table tr,
  html body #reportPreview .unified-report-table td,
  html body .report-export-shell .unified-report-table td{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }

  html body #reportPreview .unified-report-table thead,
  html body .report-export-shell .unified-report-table thead,
  html body #reportPreview .unified-report-table colgroup,
  html body .report-export-shell .unified-report-table colgroup{
    display:none!important;
  }

  html body #reportPreview .unified-report-table tr,
  html body .report-export-shell .unified-report-table tr{
    margin:0 0 8px!important;
    padding:9px 10px!important;
    border:1px solid #d9e5f2!important;
    border-radius:9px!important;
    box-shadow:none!important;
  }

  html body #reportPreview .unified-report-table td,
  html body .report-export-shell .unified-report-table td{
    display:grid!important;
    grid-template-columns:70px minmax(0,1fr)!important;
    gap:8px!important;
    padding:5px 0!important;
    border:0!important;
    border-bottom:1px solid #edf2f7!important;
    font-size:12px!important;
    line-height:1.25!important;
  }

  html body #reportPreview .unified-report-table td::before,
  html body .report-export-shell .unified-report-table td::before{
    content:attr(data-label)!important;
    font-size:10px!important;
    font-weight:900!important;
    color:#64748b!important;
    text-transform:uppercase!important;
  }

  html body #reportPreview .report-signature,
  html body #reportPreview .report-footer-branded{
    display:none!important;
  }
}

/* Final preview polish: small toolbar button and balanced desktop columns. */
html body #reportModal .report-toolbar{
  display:flex!important;
  justify-content:flex-end!important;
  align-items:center!important;
  padding:4px 0!important;
  margin:0!important;
  border:0!important;
  background:transparent!important;
}

html body #reportModal .report-toolbar #printReportBtn{
  flex:0 0 auto!important;
  width:auto!important;
  min-width:118px!important;
  max-width:160px!important;
  min-height:30px!important;
  padding:5px 12px!important;
  border-radius:6px!important;
  font-size:12px!important;
  line-height:1!important;
}

html body #reportPreview .report-table-wrap{
  max-height:calc(100dvh - 230px)!important;
}

html body #reportPreview .unified-report-table{
  min-width:0!important;
  width:100%!important;
}

html body #reportPreview .unified-report-table th:nth-child(1),
html body #reportPreview .unified-report-table td:nth-child(1){width:4%!important;}
html body #reportPreview .unified-report-table th:nth-child(2),
html body #reportPreview .unified-report-table td:nth-child(2){width:7%!important;}
html body #reportPreview .unified-report-table th:nth-child(3),
html body #reportPreview .unified-report-table td:nth-child(3){width:9%!important;}
html body #reportPreview .unified-report-table th:nth-child(4),
html body #reportPreview .unified-report-table td:nth-child(4){width:13%!important;}
html body #reportPreview .unified-report-table th:nth-child(5),
html body #reportPreview .unified-report-table td:nth-child(5){width:31%!important;}
html body #reportPreview .unified-report-table th:nth-child(6),
html body #reportPreview .unified-report-table td:nth-child(6){width:9%!important;}
html body #reportPreview .unified-report-table th:nth-child(7),
html body #reportPreview .unified-report-table td:nth-child(7){width:9%!important;}
html body #reportPreview .unified-report-table th:nth-child(8),
html body #reportPreview .unified-report-table td:nth-child(8){width:18%!important;}
html body #reportPreview .unified-report-table th:nth-child(9),
html body #reportPreview .unified-report-table td:nth-child(9){width:18%!important;}

html body #reportPreview .compact-notes-cell{
  font-size:10px!important;
  line-height:1.16!important;
}

html body #reportPreview .compact-notes-cell .strike-badge,
html body #reportPreview .compact-notes-cell .gps-status-badge,
html body #reportPreview .compact-notes-cell .edit-badge,
html body #reportPreview .compact-notes-cell .report-zero-counted{
  display:inline-flex!important;
  margin:0 3px 3px 0!important;
  padding:1px 4px!important;
  font-size:9px!important;
  line-height:1.1!important;
}

@media screen and (max-width:760px){
  html body #reportModal .report-toolbar{
    justify-content:flex-end!important;
    padding:2px 0!important;
  }

  html body #reportModal .report-toolbar #printReportBtn{
    min-width:108px!important;
    min-height:32px!important;
  }
}

/* Final report display audit: no logo overlap, compact toolbar, shareable plain text. */
html body #reportModal .report-card{
  grid-template-rows:auto auto auto minmax(0,1fr)!important;
}

html body #reportModal .report-toolbar{
  gap:8px!important;
}

html body #reportModal .report-toolbar #printReportBtn,
html body #reportModal .report-toolbar #plainReportBtn{
  flex:0 0 auto!important;
  width:auto!important;
  min-width:112px!important;
  max-width:150px!important;
  min-height:30px!important;
  padding:5px 12px!important;
  border-radius:6px!important;
  font-size:12px!important;
  line-height:1!important;
}

html body #reportPreview .report-brand,
html body #reportPreview .work-report.clean-work-report .report-brand,
html body .report-export-shell .report-brand{
  display:grid!important;
  grid-template-columns:52px minmax(0,1fr)!important;
  gap:12px!important;
  align-items:center!important;
  min-width:0!important;
  overflow:visible!important;
}

html body #reportPreview .report-brand img,
html body #reportPreview .work-report.clean-work-report .report-brand img,
html body .report-export-shell .report-brand img{
  grid-column:1!important;
  width:48px!important;
  height:48px!important;
  min-width:48px!important;
  max-width:48px!important;
  object-fit:contain!important;
  margin:0!important;
  position:static!important;
  transform:none!important;
}

html body #reportPreview .report-brand > div,
html body .report-export-shell .report-brand > div{
  grid-column:2!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  overflow-wrap:anywhere!important;
}

html body #reportPreview .report-title-clean,
html body .report-export-shell .report-title-clean{
  margin:0 0 3px!important;
  padding:0!important;
  max-width:100%!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}

html body .plain-report-panel{
  display:grid!important;
  gap:8px!important;
  padding:10px!important;
  border:1px solid #d8e4f2!important;
  border-radius:8px!important;
  background:#f8fbff!important;
}

html body .plain-report-panel.hidden{
  display:none!important;
}

html body .plain-report-head{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
}

html body .plain-report-head strong{
  color:#0f2747!important;
  font-size:14px!important;
}

html body #plainReportText{
  width:100%!important;
  min-height:190px!important;
  max-height:32dvh!important;
  resize:vertical!important;
  border:1px solid #cfdbe9!important;
  border-radius:7px!important;
  padding:10px!important;
  background:#fff!important;
  color:#111827!important;
  font:12px/1.45 Consolas, "Courier New", monospace!important;
  white-space:pre-wrap!important;
}

html body .plain-report-actions{
  display:flex!important;
  justify-content:flex-end!important;
  flex-wrap:wrap!important;
  gap:8px!important;
}

html body .plain-report-actions button{
  min-height:34px!important;
}

@media screen and (max-width:760px){
  html body #reportModal .report-card{
    grid-template-rows:auto auto auto minmax(0,1fr)!important;
  }

  html body #reportModal .report-toolbar{
    justify-content:flex-end!important;
    gap:6px!important;
  }

  html body #reportModal .report-toolbar #printReportBtn,
  html body #reportModal .report-toolbar #plainReportBtn{
    min-width:104px!important;
    max-width:none!important;
    min-height:32px!important;
    padding:5px 9px!important;
    font-size:11px!important;
  }

  html body #reportPreview .report-brand,
  html body .report-export-shell .report-brand{
    grid-template-columns:42px minmax(0,1fr)!important;
    gap:9px!important;
  }

  html body #reportPreview .report-brand img,
  html body .report-export-shell .report-brand img{
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
    max-width:40px!important;
  }

  html body #reportPreview .report-title-clean,
  html body .report-export-shell .report-title-clean{
    font-size:18px!important;
    line-height:1.08!important;
  }

  html body .plain-report-panel{
    padding:8px!important;
  }

  html body #plainReportText{
    min-height:170px!important;
    max-height:34dvh!important;
    font-size:11px!important;
  }

  html body .plain-report-actions{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
  }
}

/* Restore compact report map links without crowding notes. */
html body #reportPreview .unified-report-table th:nth-child(5),
html body #reportPreview .unified-report-table td:nth-child(5){width:29%!important;}
html body #reportPreview .unified-report-table th:nth-child(8),
html body #reportPreview .unified-report-table td:nth-child(8){width:17%!important;}
html body #reportPreview .unified-report-table th:nth-child(9),
html body #reportPreview .unified-report-table td:nth-child(9){width:5%!important;}
html body #reportPreview .unified-report-table th:nth-child(10),
html body #reportPreview .unified-report-table td:nth-child(10){width:5%!important;}

html body #reportPreview .map-cell,
html body .report-export-shell .map-cell{
  text-align:center!important;
  white-space:normal!important;
  font-size:10px!important;
}

html body #reportPreview .map-cell .map-mini,
html body .report-export-shell .map-cell .map-mini{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:22px!important;
  min-height:20px!important;
  margin:0 1px 3px!important;
  padding:2px 4px!important;
  border:1px solid #bcd3ed!important;
  border-radius:4px!important;
  background:#f8fbff!important;
  color:#0f4c81!important;
  font-size:9px!important;
  font-weight:900!important;
  text-decoration:none!important;
}

/* Live local-drive backup controls. */
.live-sync-card{
  margin:9px 0 12px;
  padding:0;
  border:1px solid #d7e0ea;
  background:#ffffff;
  border-radius:7px;
  overflow:hidden;
  box-shadow:0 1px 2px rgba(15,23,42,.05);
}
.live-sync-summary{
  cursor:default;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:10px 11px;
  background:#fbfdff;
}
.live-sync-summary:hover{
  background:#f4f8fb;
}
.live-sync-main{
  min-width:0;
  display:grid;
  gap:3px;
}
.live-sync-title{
  color:#0f172a;
  font-size:13px;
  line-height:1.2;
  font-weight:900;
}
.live-sync-summary-text{
  color:#64748b;
  font-size:11.5px;
  line-height:1.35;
  white-space:normal;
  overflow-wrap:anywhere;
}
.live-sync-manage{
  justify-self:end;
  align-self:center;
  min-height:28px;
  border:1px solid #b9d8cf;
  background:#eaf7f3;
  color:#0f766e;
  border-radius:999px;
  padding:5px 10px;
  font-size:10.5px;
  line-height:1;
  font-weight:900;
  cursor:pointer;
}
.live-sync-manage:hover{
  background:#dcf3ec;
  border-color:#94cabb;
}
.live-sync-menu{
  border-top:1px solid #e2e8f0;
  padding:10px;
  display:grid;
  gap:9px;
}
.live-sync-menu p{
  margin:0;
  color:#475569;
  font-size:12px;
  line-height:1.4;
}
.live-sync-interval{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:center;
  gap:8px;
}
.live-sync-interval span{
  color:#0f172a;
  font-size:12px;
  font-weight:900;
}
.live-sync-interval select{
  width:100%;
  min-height:36px;
  border:1px solid #cbd5e1;
  border-radius:4px;
  background:#fff;
  color:#0f172a;
  font-size:13px;
  font-weight:700;
  padding:6px 8px;
}
.live-sync-actions{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:6px;
}
.live-sync-actions button{
  width:100%;
  min-height:36px;
  padding:7px 8px;
  border-radius:4px;
  font-size:12px;
  line-height:1.15;
}
.live-sync-modal-card{
  width:min(94vw,620px);
  max-height:88dvh;
  overflow:auto;
}
.live-sync-modal-head{
  margin-bottom:12px;
}
.live-sync-modal-body{
  display:grid;
  gap:12px;
}
.live-sync-status-panel{
  border:1px solid #cfe0ee;
  background:#f8fbff;
  border-radius:7px;
  padding:12px;
}
.live-sync-status-panel strong{
  display:block;
  color:#0f172a;
  font-size:13px;
  margin-bottom:5px;
}
.live-sync-status-panel p{
  margin:0;
  color:#475569;
  font-size:13px;
  line-height:1.45;
}
.live-sync-explain-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.live-sync-info-card{
  border:1px solid #dbe5ef;
  background:#ffffff;
  border-radius:7px;
  padding:11px;
}
.live-sync-info-card span{
  display:block;
  color:#0f172a;
  font-size:12px;
  line-height:1.2;
  font-weight:900;
  margin-bottom:6px;
}
.live-sync-info-card p{
  margin:0;
  color:#526174;
  font-size:12px;
  line-height:1.45;
}
@media (max-width:760px){
  .live-sync-card{
    margin-top:8px;
  }
  .live-sync-summary{
    grid-template-columns:minmax(0,1fr) auto;
    gap:8px;
    padding:10px;
  }
  .live-sync-interval{
    grid-template-columns:1fr;
  }
  .live-sync-actions{
    grid-template-columns:1fr;
  }
  .live-sync-actions button{
    min-height:42px;
    font-size:14px;
  }
  .live-sync-explain-grid{
    grid-template-columns:1fr;
  }
  html body #liveSyncModal{
    align-items:end!important;
    place-items:end center!important;
    padding:0!important;
  }
  html body #liveSyncModal .live-sync-modal-card{
    width:100vw!important;
    max-width:100vw!important;
    max-height:92dvh!important;
    border-radius:14px 14px 0 0!important;
    padding:0!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
  }
  html body #liveSyncModal .live-sync-modal-head{
    position:sticky;
    top:0;
    z-index:2;
    margin:0;
    padding:14px;
    background:#fff;
    border-bottom:1px solid #e2e8f0;
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:10px;
  }
  html body #liveSyncModal .live-sync-modal-head h2{
    margin:2px 0 0;
    font-size:18px;
    line-height:1.15;
  }
  html body #liveSyncModal .live-sync-modal-head .settings-kicker{
    margin:0;
    font-size:11px;
  }
  html body #liveSyncModal #closeLiveSyncModal{
    flex:0 0 auto;
    min-width:72px;
  }
  html body #liveSyncModal .live-sync-modal-body{
    padding:12px 14px 16px;
    overflow:auto;
    gap:10px;
  }
  html body #liveSyncModal .live-sync-status-panel,
  html body #liveSyncModal .live-sync-info-card{
    padding:10px;
    border-radius:7px;
  }
  html body #liveSyncModal .live-sync-status-panel p,
  html body #liveSyncModal .live-sync-info-card p{
    font-size:12px;
    line-height:1.45;
  }
  html body #liveSyncModal .live-sync-interval{
    gap:6px;
  }
  html body #liveSyncModal .live-sync-interval select{
    min-height:44px;
    font-size:14px;
  }
  html body #liveSyncModal .live-sync-actions{
    grid-template-columns:1fr;
    gap:8px;
  }
  html body #liveSyncModal .live-sync-actions button{
    min-height:44px;
    font-size:14px;
  }
}
@media (max-width:380px){
  .live-sync-summary{
    grid-template-columns:1fr;
    align-items:start;
  }
  .live-sync-manage{
    justify-self:start;
    width:auto;
  }
}

/* Final Data Backup modal layering and readability fix. */
html body #liveSyncModal{
  z-index:1000005!important;
  background:rgba(15,23,42,.68)!important;
}
html body #liveSyncModal .live-sync-modal-card{
  width:min(94vw,680px)!important;
  border:1px solid #dbe5ef!important;
  border-radius:10px!important;
  box-shadow:0 24px 70px rgba(15,23,42,.34)!important;
  padding:0!important;
  overflow:hidden!important;
}
html body #liveSyncModal .live-sync-modal-head{
  margin:0!important;
  padding:16px!important;
  background:#ffffff!important;
  color:#0f172a!important;
  border-bottom:1px solid #e2e8f0!important;
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:12px!important;
}
html body #liveSyncModal .live-sync-modal-head h2{
  margin:2px 0 0!important;
  color:#0f172a!important;
  font-size:22px!important;
  line-height:1.12!important;
}
html body #liveSyncModal .live-sync-modal-head .settings-kicker{
  margin:0!important;
  color:#0f766e!important;
  font-size:11px!important;
  font-weight:900!important;
}
html body #liveSyncModal .live-sync-modal-body{
  padding:14px 16px 16px!important;
}
html body #liveSyncModal .live-sync-status-panel p{
  overflow-wrap:anywhere!important;
  word-break:normal!important;
}
html body #liveSyncModal .live-sync-explain-grid{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
@media (max-width:760px){
  html body #liveSyncModal{
    z-index:1000005!important;
    align-items:end!important;
    place-items:end center!important;
  }
  html body #liveSyncModal .live-sync-modal-card{
    width:100vw!important;
    max-width:100vw!important;
    max-height:92dvh!important;
    border-radius:14px 14px 0 0!important;
    display:flex!important;
    flex-direction:column!important;
  }
  html body #liveSyncModal .live-sync-modal-body{
    overflow:auto!important;
  }
html body #liveSyncModal .live-sync-explain-grid{
    grid-template-columns:1fr!important;
  }
}

/* Final history/report overflow guard: keep long notes inside their borders. */
html body #reportPreview .report-table-wrap,
html body .report-export-shell .report-table-wrap{
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
}

html body #reportPreview .unified-report-table,
html body .report-export-shell .unified-report-table{
  table-layout:fixed!important;
  width:100%!important;
  max-width:100%!important;
}

html body #reportPreview .unified-report-table th,
html body #reportPreview .unified-report-table td,
html body .report-export-shell .unified-report-table th,
html body .report-export-shell .unified-report-table td{
  box-sizing:border-box!important;
  min-width:0!important;
  max-width:100%!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:break-word!important;
  overflow:hidden!important;
}

html body #reportPreview .compact-notes-cell,
html body .report-export-shell .compact-notes-cell,
html body #reportPreview .compact-notes-cell *,
html body .report-export-shell .compact-notes-cell *,
html body #reportPreview .money-inline,
html body .report-export-shell .money-inline{
  max-width:100%!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:break-word!important;
}

html body #reportPreview .compact-notes-cell .strike-badge,
html body #reportPreview .compact-notes-cell .gps-status-badge,
html body #reportPreview .compact-notes-cell .edit-badge,
html body #reportPreview .compact-notes-cell .report-zero-counted,
html body .report-export-shell .compact-notes-cell .strike-badge,
html body .report-export-shell .compact-notes-cell .gps-status-badge,
html body .report-export-shell .compact-notes-cell .edit-badge,
html body .report-export-shell .compact-notes-cell .report-zero-counted{
  display:inline!important;
  padding:1px 3px!important;
  border-radius:4px!important;
  font-size:9px!important;
  line-height:1.25!important;
}

html body #reportPreview .unified-report-table td:nth-child(7),
html body #reportPreview .unified-report-table td:nth-child(8),
html body #reportPreview .unified-report-table td:nth-child(9),
html body .report-export-shell .unified-report-table td:nth-child(7),
html body .report-export-shell .unified-report-table td:nth-child(8),
html body .report-export-shell .unified-report-table td:nth-child(9){
  font-size:10px!important;
  line-height:1.18!important;
}

/* Final dashboard history polish: compact report-style records without the bulky report width. */
html body .history-panel{
  padding:12px 16px!important;
  background:#f8fbff!important;
}

html body .history-panel > .section-title{
  min-height:36px!important;
  margin:0!important;
  padding:0 0 8px!important;
  border-bottom:1px solid #dbe5ef!important;
}

html body .history-total{
  min-height:0!important;
  margin:0 0 10px!important;
  padding:8px 0!important;
  border:0!important;
  background:transparent!important;
  text-align:right!important;
  color:#0f172a!important;
  font-size:13px!important;
}

html body .history-subhead.auto-subhead.combined-subhead{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  min-height:0!important;
  width:100%!important;
  margin:0 0 10px!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
}

html body .history-subhead.auto-subhead.combined-subhead span{
  position:relative!important;
  display:inline-flex!important;
  align-items:center!important;
  min-height:32px!important;
  color:#0a3b7d!important;
  font-size:16px!important;
  font-weight:900!important;
}

html body .history-subhead.auto-subhead.combined-subhead span::after{
  content:""!important;
  position:absolute!important;
  left:0!important;
  right:0!important;
  bottom:0!important;
  height:4px!important;
  border-radius:999px!important;
  background:#0b7ee8!important;
}

html body .history-subhead.auto-subhead.combined-subhead small{
  color:#475569!important;
  font-size:12px!important;
  font-weight:800!important;
  text-align:right!important;
}

html body .history-panel .legacy-manual-history,
html body .history-panel .manual-shifts-inside-history,
html body .history-panel #manualShiftList.manual-shifts-inside-history{
  display:none!important;
}

html body .history-date-group{
  gap:0!important;
  margin:0 0 12px!important;
  padding:0!important;
  background:#fff!important;
  border:1px solid #d7e3f0!important;
  border-radius:8px!important;
  overflow:hidden!important;
}

html body .history-date-title{
  min-height:34px!important;
  padding:8px 10px!important;
  border:0!important;
  border-bottom:1px solid #d7e3f0!important;
  border-radius:0!important;
  background:#fbfdff!important;
}

html body .history-date-title strong{
  font-size:14px!important;
  font-weight:900!important;
}

html body .history-date-title span{
  color:#334155!important;
  font-size:12px!important;
  font-weight:900!important;
}

html body .main-history-table-wrap{
  border:0!important;
  border-radius:0!important;
  background:#fff!important;
  overflow-x:auto!important;
  box-shadow:none!important;
}

html body .main-history-table{
  min-width:760px!important;
  width:100%!important;
  table-layout:fixed!important;
  border-collapse:collapse!important;
  font-size:11px!important;
}

html body .main-history-table th,
html body .main-history-table td{
  padding:6px 8px!important;
  border-color:#d7e3f0!important;
  line-height:1.2!important;
  vertical-align:top!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
}

html body .main-history-table th{
  background:#eef4fa!important;
  font-size:10px!important;
  letter-spacing:0!important;
}

html body .main-history-table th:nth-child(1),
html body .main-history-table td:nth-child(1){width:34px!important;text-align:center!important;}
html body .main-history-table th:nth-child(2),
html body .main-history-table td:nth-child(2){width:60px!important;}
html body .main-history-table th:nth-child(3),
html body .main-history-table td:nth-child(3){width:120px!important;}
html body .main-history-table th:nth-child(4),
html body .main-history-table td:nth-child(4){width:auto!important;}
html body .main-history-table th:nth-child(5),
html body .main-history-table td:nth-child(5){width:92px!important;}
html body .main-history-table th:nth-child(6),
html body .main-history-table td:nth-child(6){width:78px!important;}
html body .main-history-table th:nth-child(7),
html body .main-history-table td:nth-child(7){width:145px!important;}
html body .main-history-table th:nth-child(8),
html body .main-history-table td:nth-child(8){width:100px!important;}

html body .main-history-row.excluded-from-total td{
  background:#fff8e1!important;
}

html body .record-type-pill{
  min-height:18px!important;
  padding:2px 6px!important;
  border-radius:999px!important;
  font-size:10px!important;
  line-height:1!important;
  letter-spacing:0!important;
  white-space:nowrap!important;
}

html body .main-history-location{
  font-size:11px!important;
}

html body .main-history-location span{
  grid-template-columns:28px minmax(0,1fr)!important;
  gap:6px!important;
  margin:0 0 3px!important;
}

html body .main-history-location b{
  min-width:26px!important;
  padding:1px 4px!important;
  font-size:9px!important;
}

html body .main-history-worked,
html body .main-history-pay{
  font-size:12px!important;
  line-height:1.2!important;
}

html body .main-history-notes{
  font-size:11px!important;
  line-height:1.25!important;
}

html body .main-history-actions{
  gap:4px!important;
}

html body .main-history-actions .ghost{
  min-height:25px!important;
  min-width:0!important;
  padding:4px 7px!important;
  font-size:11px!important;
  line-height:1!important;
  text-align:center!important;
}

@media (max-width:760px){
  html body .history-panel{
    padding:12px!important;
  }

  html body .history-total{
    text-align:left!important;
    font-size:13px!important;
  }

  html body .history-subhead.auto-subhead.combined-subhead{
    align-items:flex-start!important;
    gap:4px!important;
  }

  html body .history-subhead.auto-subhead.combined-subhead small{
    text-align:left!important;
  }

  html body .history-date-group{
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    overflow:visible!important;
  }

  html body .history-date-title{
    border:1px solid #d7e3f0!important;
    border-radius:8px!important;
    margin-bottom:8px!important;
    background:#fff!important;
  }

  html body .main-history-table-wrap{
    overflow:visible!important;
    background:transparent!important;
  }

  html body .main-history-table{
    min-width:0!important;
    font-size:13px!important;
  }

  html body .main-history-table th,
  html body .main-history-table td{
    padding:8px 10px!important;
  }

  html body .main-history-table td{
    grid-template-columns:82px minmax(0,1fr)!important;
  }
}

/* Final compact UX pass: cleaner dashboard and denser work records. */
html body .layout{
  gap:10px!important;
  padding:12px!important;
}

html body .summary-panel,
html body .history-panel{
  padding:10px 12px!important;
  border-radius:4px!important;
  box-shadow:none!important;
  border-color:#d7e3f0!important;
  background:#f8fbff!important;
}

html body .summary-panel > .section-title,
html body .history-panel > .section-title{
  min-height:28px!important;
  margin:0 0 8px!important;
  padding:0 0 6px!important;
  border-bottom:2px solid #0b7ee8!important;
  font-size:15px!important;
}

html body .summary-panel > .section-title span::before,
html body .history-panel > .section-title span::before{
  display:none!important;
}

html body .summary-panel .compact-range-card,
html body .summary-panel .main-range-card{
  margin:0 0 8px!important;
  padding:8px!important;
  border-radius:4px!important;
  border-color:#d7e3f0!important;
  background:#fff!important;
  box-shadow:none!important;
}

html body .main-range-head{
  min-height:0!important;
  margin:0 0 6px!important;
  padding:0!important;
}

html body .main-range-head strong{
  font-size:13px!important;
  line-height:1.1!important;
}

html body .main-range-head span{
  display:none!important;
}

html body .compact-main-range-grid{
  grid-template-columns:minmax(105px,.8fr) minmax(105px,.8fr) minmax(130px,1fr) minmax(130px,1fr) auto!important;
  gap:6px!important;
  align-items:end!important;
}

html body .compact-main-range-grid label{
  gap:3px!important;
}

html body .compact-main-range-grid label span{
  font-size:10px!important;
  line-height:1!important;
  margin:0!important;
}

html body .compact-main-range-grid select,
html body .compact-main-range-grid input[type="date"],
html body .compact-main-range-grid button{
  height:32px!important;
  min-height:32px!important;
  border-radius:4px!important;
  padding:0 8px!important;
  font-size:12px!important;
}

html body .compact-main-range-grid button{
  padding:0 12px!important;
  white-space:nowrap!important;
}

html body #mainRangeStatus{
  display:block!important;
  margin:4px 0 0!important;
  font-size:11px!important;
  line-height:1.2!important;
}

html body .mobile-range-pager{
  margin-top:6px!important;
  gap:6px!important;
}

html body .mobile-range-pager button{
  min-height:30px!important;
  padding:5px 8px!important;
  border-radius:4px!important;
  font-size:12px!important;
}

html body .stats-grid{
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:6px!important;
  margin:0 0 8px!important;
}

html body .stat,
html body .summary-panel .stats-grid .stat{
  min-height:52px!important;
  padding:7px 9px!important;
  border-radius:4px!important;
  border-color:#d7e3f0!important;
  background:#fff!important;
  box-shadow:none!important;
}

html body .stat::before,
html body .summary-panel .stats-grid .stat::before{
  display:none!important;
}

html body .stat span,
html body .summary-panel .stats-grid .stat span{
  margin:0 0 3px!important;
  color:#475569!important;
  font-size:10px!important;
  line-height:1.1!important;
  font-weight:900!important;
}

html body .stat strong,
html body .summary-panel .stats-grid .stat strong{
  font-size:18px!important;
  line-height:1.05!important;
}

html body .summary-panel .total-amount-card{
  margin:0!important;
  padding:8px!important;
  border-radius:4px!important;
  border-color:#bfdbfe!important;
  background:#eef6ff!important;
  box-shadow:none!important;
  gap:8px!important;
}

html body .summary-panel .total-amount-card > div:first-child{
  min-width:150px!important;
}

html body .summary-panel .total-amount-card span{
  margin:0 0 3px!important;
  font-size:10px!important;
  line-height:1.1!important;
}

html body .summary-panel .total-amount-card strong{
  font-size:18px!important;
  line-height:1.05!important;
}

html body .summary-panel .total-amount-meta{
  gap:5px!important;
}

html body .summary-panel .total-amount-meta span{
  padding:4px 6px!important;
  border-radius:4px!important;
  background:#fff!important;
  font-size:11px!important;
}

html body .history-panel{
  padding:10px 12px!important;
}

html body .history-total{
  margin:0 0 7px!important;
  padding:0!important;
  font-size:12px!important;
  line-height:1.25!important;
}

html body .history-subhead.auto-subhead.combined-subhead{
  margin:0 0 7px!important;
}

html body .history-subhead.auto-subhead.combined-subhead span{
  min-height:25px!important;
  font-size:15px!important;
}

html body .history-subhead.auto-subhead.combined-subhead span::after{
  height:3px!important;
  border-radius:0!important;
}

html body .history-subhead.auto-subhead.combined-subhead small{
  font-size:11px!important;
}

html body .history-date-group{
  margin:0 0 8px!important;
  border-radius:4px!important;
}

html body .history-date-title{
  min-height:29px!important;
  padding:6px 8px!important;
}

html body .history-date-title strong{
  font-size:13px!important;
}

html body .history-date-title span{
  font-size:11px!important;
}

html body .main-history-table{
  min-width:700px!important;
  font-size:11px!important;
}

html body .main-history-table th,
html body .main-history-table td{
  padding:5px 7px!important;
  line-height:1.15!important;
}

html body .main-history-table th{
  font-size:9.5px!important;
}

html body .main-history-table th:nth-child(1),
html body .main-history-table td:nth-child(1){width:30px!important;}
html body .main-history-table th:nth-child(2),
html body .main-history-table td:nth-child(2){width:52px!important;}
html body .main-history-table th:nth-child(3),
html body .main-history-table td:nth-child(3){width:108px!important;}
html body .main-history-table th:nth-child(5),
html body .main-history-table td:nth-child(5){width:82px!important;}
html body .main-history-table th:nth-child(6),
html body .main-history-table td:nth-child(6){width:70px!important;}
html body .main-history-table th:nth-child(7),
html body .main-history-table td:nth-child(7){width:125px!important;}
html body .main-history-table th:nth-child(8),
html body .main-history-table td:nth-child(8){width:82px!important;}

html body .record-type-pill{
  min-height:16px!important;
  padding:1px 5px!important;
  border-radius:4px!important;
  font-size:9px!important;
}

html body .main-history-location{
  font-size:10.5px!important;
}

html body .main-history-location span{
  grid-template-columns:24px minmax(0,1fr)!important;
  gap:5px!important;
  margin:0 0 2px!important;
}

html body .main-history-location b{
  min-width:22px!important;
  padding:1px 3px!important;
  border-radius:3px!important;
  font-size:8px!important;
}

html body .main-history-worked,
html body .main-history-pay{
  font-size:11.5px!important;
}

html body .main-history-worked small,
html body .main-history-pay small{
  margin-top:1px!important;
  font-size:10px!important;
}

html body .main-history-notes{
  font-size:10.5px!important;
}

html body .main-history-actions{
  gap:3px!important;
}

html body .main-history-actions .ghost{
  min-height:23px!important;
  padding:3px 6px!important;
  border-radius:3px!important;
  font-size:10.5px!important;
}

@media (max-width:900px){
  html body .layout{
    padding:8px!important;
    gap:8px!important;
  }

  html body .summary-panel,
  html body .history-panel{
    padding:8px!important;
  }

  html body .compact-main-range-grid{
    grid-template-columns:1fr 1fr!important;
  }

  html body .compact-main-range-grid button{
    grid-column:1 / -1!important;
    width:100%!important;
  }

  html body .stats-grid{
    grid-template-columns:1fr 1fr!important;
  }

  html body .stats-grid .combined-stat{
    grid-column:1 / -1!important;
  }

  html body .summary-panel .total-amount-card{
    display:grid!important;
    grid-template-columns:1fr!important;
  }

  html body .summary-panel .total-amount-meta{
    display:grid!important;
    grid-template-columns:1fr!important;
  }
}

@media (max-width:760px){
  html body .summary-panel > .section-title,
  html body .history-panel > .section-title{
    min-height:26px!important;
    margin-bottom:7px!important;
    padding-bottom:5px!important;
    font-size:14px!important;
  }

  html body .compact-main-range-grid select,
  html body .compact-main-range-grid input[type="date"],
  html body .compact-main-range-grid button{
    height:34px!important;
    min-height:34px!important;
    font-size:12px!important;
  }

  html body .stat,
  html body .summary-panel .stats-grid .stat{
    min-height:48px!important;
    padding:7px!important;
  }

  html body .stat strong,
  html body .summary-panel .stats-grid .stat strong{
    font-size:17px!important;
  }

  html body .history-total{
    margin-bottom:6px!important;
  }

  html body .history-subhead.auto-subhead.combined-subhead{
    display:flex!important;
    flex-direction:column!important;
    margin-bottom:7px!important;
  }

  html body .history-date-title{
    min-height:28px!important;
    padding:6px 8px!important;
    border-radius:4px!important;
  }

  html body .main-history-table,
  html body .main-history-table thead,
  html body .main-history-table tbody,
  html body .main-history-table tr,
  html body .main-history-table td{
    display:block!important;
    width:100%!important;
    min-width:0!important;
  }

  html body .main-history-table thead{
    display:none!important;
  }

  html body .main-history-table tr{
    margin:0 0 6px!important;
    border:1px solid #d7e3f0!important;
    border-left:3px solid #0b7ee8!important;
    border-radius:4px!important;
    background:#fff!important;
    overflow:hidden!important;
  }

  html body .main-history-table tr.manual-record{
    border-left-color:#0f766e!important;
  }

  html body .main-history-table tr.excluded-from-total{
    border-left-color:#f59e0b!important;
  }

  html body .main-history-table td{
    display:grid!important;
    grid-template-columns:68px minmax(0,1fr)!important;
    gap:6px!important;
    padding:6px 8px!important;
    border:0!important;
    border-bottom:1px solid #edf2f7!important;
    font-size:12px!important;
  }

  html body .main-history-table td::before{
    content:attr(data-label)!important;
    color:#64748b!important;
    font-size:9px!important;
    font-weight:900!important;
    text-transform:uppercase!important;
  }

  html body .main-history-table td:last-child{
    border-bottom:0!important;
  }

  html body .main-history-table td[data-label="#"]{
    display:none!important;
  }

  html body .main-history-actions{
    display:flex!important;
    justify-content:flex-start!important;
  }
}

@media (max-width:420px){
  html body .layout{
    padding:6px!important;
  }

  html body .compact-main-range-grid,
  html body .stats-grid{
    grid-template-columns:1fr!important;
  }

  html body .history-date-title{
    align-items:flex-start!important;
  }

  html body .main-history-table td{
    grid-template-columns:62px minmax(0,1fr)!important;
    padding:6px!important;
  }
}

/* Final Work Records alignment: keep actions inside the border and readable. */
html body .history-date-group{
  border:1px solid #c8d8ea!important;
  overflow:hidden!important;
}

html body .main-history-table,
html body .main-history-table *{
  box-sizing:border-box!important;
}

html body .main-history-table-wrap{
  max-width:100%!important;
  overflow-x:auto!important;
}

html body .main-history-table{
  min-width:820px!important;
  border:0!important;
}

html body .main-history-table th,
html body .main-history-table td{
  overflow:hidden!important;
}

html body .main-history-table th:nth-child(4),
html body .main-history-table td:nth-child(4){width:auto!important;}
html body .main-history-table th:nth-child(2),
html body .main-history-table td:nth-child(2){width:64px!important;}
html body .main-history-table th:nth-child(7),
html body .main-history-table td:nth-child(7){width:112px!important;}
html body .main-history-table th:nth-child(8),
html body .main-history-table td:nth-child(8){width:54px!important;}
html body .main-history-table th:nth-child(9),
html body .main-history-table td:nth-child(9){width:62px!important;}

html body .main-history-table th:nth-child(2),
html body .main-history-table td:nth-child(2){
  text-align:center!important;
  vertical-align:middle!important;
}

html body .main-history-table th:nth-child(8),
html body .main-history-table th:nth-child(9){
  text-align:center!important;
  text-decoration:none!important;
}

html body .main-history-table td:nth-child(2){
  overflow:visible!important;
}

html body .record-type-pill,
html body .record-type-pill.auto,
html body .record-type-pill.manual{
  display:inline!important;
  min-height:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  font-size:10px!important;
  line-height:1.2!important;
  font-weight:900!important;
  letter-spacing:0!important;
  white-space:nowrap!important;
}

html body .record-type-pill.auto{
  color:#1d4ed8!important;
}

html body .record-type-pill.manual{
  color:#047857!important;
}

html body .main-history-actions{
  display:flex!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  gap:4px!important;
  white-space:nowrap!important;
}

html body .main-history-actions .ghost{
  flex:0 0 auto!important;
  min-width:0!important;
  padding-left:5px!important;
  padding-right:5px!important;
  white-space:nowrap!important;
  text-decoration:none!important;
}

html body .main-history-actions a.ghost{
  color:#0f4c81!important;
  background:#f8fbff!important;
  border-color:#bfd4ea!important;
}

html body .main-history-edit-cell{
  text-align:center!important;
  vertical-align:middle!important;
}

html body .main-history-edit-cell .ghost{
  min-height:23px!important;
  padding:3px 6px!important;
  border-radius:3px!important;
  font-size:10.5px!important;
  line-height:1!important;
}

html body .main-history-map-links{
  text-align:center!important;
  vertical-align:middle!important;
  white-space:nowrap!important;
}

html body .main-history-map-links a{
  display:inline!important;
  margin:0 3px!important;
  padding:0!important;
  min-height:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  color:#0f4c81!important;
  font-size:11px!important;
  font-weight:800!important;
  line-height:1.2!important;
  text-decoration:none!important;
}

html body .main-history-map-links a:hover{
  text-decoration:underline!important;
}

html body .control-panel:has(#liveSyncModal:not(.hidden)){
  z-index:1000010!important;
  overflow:visible!important;
}

html body #liveSyncModal{
  position:fixed!important;
  inset:0!important;
  z-index:1000011!important;
  width:100vw!important;
  height:100dvh!important;
  max-width:none!important;
  display:grid!important;
  place-items:center!important;
  padding:14px!important;
}

html body #liveSyncModal.hidden{
  display:none!important;
}

html body #liveSyncModal .live-sync-modal-card{
  position:relative!important;
  z-index:1000012!important;
  width:min(680px, calc(100vw - 28px))!important;
  max-height:calc(100dvh - 28px)!important;
  overflow:auto!important;
}

html body #liveSyncModal .live-sync-explain-grid{
  align-items:stretch!important;
}

html body #prevRangePageBtn,
html body #nextRangePageBtn{
  background:#eef6ff!important;
  border-color:#b9d8ff!important;
  color:#0a3b7d!important;
  font-weight:900!important;
  box-shadow:inset 0 0 0 1px rgba(11,126,232,.08)!important;
}

html body #prevRangePageBtn:hover,
html body #nextRangePageBtn:hover{
  background:#dceeff!important;
  border-color:#7db8f5!important;
}

html body .mobile-range-pager #visibleRangeLabel{
  color:#334155!important;
  background:#f8fbff!important;
  border:1px solid #d7e3f0!important;
  border-radius:4px!important;
  padding:5px 8px!important;
}

@media (max-width:760px){
  html body .main-history-table{
    min-width:0!important;
  }

  html body .main-history-table th,
  html body .main-history-table td{
    overflow:visible!important;
  }

  html body .main-history-actions{
    flex-wrap:wrap!important;
  }

  html body .main-history-table th:nth-child(2),
  html body .main-history-table td:nth-child(2){
    text-align:left!important;
  }

  html body .main-history-edit-cell,
  html body .main-history-map-links{
    text-align:left!important;
  }

  html body #liveSyncModal{
    align-items:end!important;
    place-items:end center!important;
    padding:0!important;
  }

  html body #liveSyncModal .live-sync-modal-card{
    width:100vw!important;
    max-width:100vw!important;
    max-height:92dvh!important;
    border-radius:8px 8px 0 0!important;
  }

  html body #prevRangePageBtn,
  html body #nextRangePageBtn{
    width:100%!important;
  }
}

/* Final range filter cleanup: show the range once, between Previous and Next. */
html body #mainRangeStatus{
  display:none!important;
}

html body .mobile-range-pager{
  display:grid!important;
  grid-template-columns:minmax(118px,140px) minmax(0,1fr) minmax(118px,140px)!important;
  align-items:center!important;
  gap:6px!important;
}

html body .mobile-range-pager #visibleRangeLabel{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:32px!important;
  text-align:center!important;
  font-weight:900!important;
}

@media (max-width:560px){
  html body .mobile-range-pager{
    grid-template-columns:1fr 1fr!important;
  }

  html body .mobile-range-pager #visibleRangeLabel{
    grid-column:1 / -1!important;
    grid-row:1!important;
  }
}

/* Final Shift History header polish. */
html body .history-panel > .section-title{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  min-height:34px!important;
  padding:0 0 8px!important;
  margin:0 0 8px!important;
  border:0!important;
  border-bottom:2px solid #0b7ee8!important;
  background:transparent!important;
}

html body .history-panel > .section-title > span{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  min-width:0!important;
  color:#0f172a!important;
  font-size:16px!important;
  font-weight:900!important;
  line-height:1.2!important;
}

html body .history-panel .history-title-label{
  display:inline!important;
  color:#0f172a!important;
  font-size:16px!important;
  font-weight:900!important;
  line-height:1.2!important;
}

html body .history-panel .history-title-range{
  display:inline-flex!important;
  align-items:center!important;
  min-height:22px!important;
  padding:3px 8px!important;
  border:1px solid #b9d8ff!important;
  border-radius:999px!important;
  background:#eef6ff!important;
  color:#0a3b7d!important;
  font-size:12px!important;
  font-weight:900!important;
  line-height:1!important;
  white-space:nowrap!important;
}

html body #copySummaryBtn{
  min-height:30px!important;
  padding:5px 10px!important;
  border:1px solid #b9d8ff!important;
  border-radius:4px!important;
  background:#f8fbff!important;
  color:#0a3b7d!important;
  font-size:12px!important;
  font-weight:900!important;
  box-shadow:none!important;
}

html body #copySummaryBtn:hover{
  background:#eef6ff!important;
}

@media (max-width:560px){
  html body .history-panel > .section-title{
    align-items:flex-start!important;
  }

  html body .history-panel > .section-title > span{
    flex-wrap:wrap!important;
    gap:6px!important;
  }

  html body #copySummaryBtn{
    flex:0 0 auto!important;
  }
}

/* Final mobile Work Records hard fix: full-width readable cards. */
@media (max-width:900px){
  html body .history-panel,
  html body #shiftList,
  html body .shift-list,
  html body .history-date-group,
  html body .main-history-table-wrap{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow:visible!important;
  }

  html body .main-history-table,
  html body .main-history-table thead,
  html body .main-history-table tbody,
  html body .main-history-table tr,
  html body .main-history-table th,
  html body .main-history-table td{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }

  html body .main-history-table{
    display:block!important;
    table-layout:auto!important;
    border-collapse:separate!important;
    border-spacing:0!important;
    background:transparent!important;
  }

  html body .main-history-table thead{
    display:none!important;
  }

  html body .main-history-table tbody{
    display:block!important;
  }

  html body .main-history-table tr{
    display:block!important;
    margin:0 0 8px!important;
    border:1px solid #d7e3f0!important;
    border-left:4px solid #0b7ee8!important;
    border-radius:6px!important;
    background:#fff!important;
    overflow:hidden!important;
  }

  html body .main-history-table tr.manual-record{
    border-left-color:#0f766e!important;
  }

  html body .main-history-table tr.excluded-from-total{
    border-left-color:#f59e0b!important;
  }

  html body .main-history-table th:nth-child(n),
  html body .main-history-table td:nth-child(n){
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }

  html body .main-history-table td{
    display:grid!important;
    grid-template-columns:86px minmax(0,1fr)!important;
    align-items:start!important;
    gap:8px!important;
    padding:8px 10px!important;
    border:0!important;
    border-bottom:1px solid #edf2f7!important;
    font-size:13px!important;
    line-height:1.25!important;
    overflow:visible!important;
    white-space:normal!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }

  html body .main-history-table td::before{
    content:attr(data-label)!important;
    color:#64748b!important;
    font-size:10px!important;
    font-weight:900!important;
    line-height:1.2!important;
    text-transform:uppercase!important;
  }

  html body .main-history-table td:last-child{
    border-bottom:0!important;
  }

  html body .main-history-table td[data-label="#"]{
    display:none!important;
  }

  html body .main-history-location,
  html body .main-history-worked,
  html body .main-history-pay,
  html body .main-history-notes,
  html body .main-history-edit-cell,
  html body .main-history-map-links{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    text-align:left!important;
    white-space:normal!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }

  html body .main-history-location span{
    display:grid!important;
    grid-template-columns:38px minmax(0,1fr)!important;
    gap:6px!important;
    margin:0 0 4px!important;
    width:100%!important;
    max-width:100%!important;
    white-space:normal!important;
    overflow-wrap:break-word!important;
    word-break:normal!important;
  }

  html body .main-history-location b{
    min-width:30px!important;
    font-size:9px!important;
  }

  html body .main-history-worked,
  html body .main-history-pay{
    font-size:13px!important;
    line-height:1.25!important;
  }

  html body .main-history-edit-cell .ghost{
    min-width:54px!important;
    min-height:30px!important;
    padding:5px 8px!important;
    font-size:12px!important;
  }

  html body .main-history-map-links a{
    display:inline-block!important;
    margin:0 10px 0 0!important;
    font-size:13px!important;
  }
}

@media (max-width:420px){
  html body .main-history-table td{
    grid-template-columns:76px minmax(0,1fr)!important;
    gap:7px!important;
    padding:7px 8px!important;
  }
}

/* Mobile Work Records final alignment: keep every value in the wide column. */
@media (max-width:900px){
  html body .main-history-table td::before{
    grid-column:1!important;
    grid-row:1 / -1!important;
  }

  html body .main-history-table td > *{
    grid-column:2!important;
    min-width:0!important;
    max-width:100%!important;
  }

  html body .main-history-location > span{
    grid-column:2!important;
    display:flex!important;
    align-items:flex-start!important;
    justify-content:flex-start!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0 0 5px!important;
    text-align:left!important;
    white-space:normal!important;
    overflow-wrap:break-word!important;
    word-break:normal!important;
  }

  html body .main-history-location > span:last-child{
    margin-bottom:0!important;
  }

  html body .main-history-location > span b{
    flex:0 0 34px!important;
    min-width:34px!important;
    max-width:34px!important;
    text-align:center!important;
  }

  html body .main-history-map-links{
    align-items:center!important;
  }

  html body .main-history-map-links > a{
    grid-column:2!important;
    justify-self:start!important;
    width:auto!important;
    min-width:0!important;
    margin:0 12px 4px 0!important;
    white-space:nowrap!important;
  }

  html body .main-history-edit-cell .ghost{
    justify-self:start!important;
    width:auto!important;
    min-width:72px!important;
  }
}

/* Mobile Work Records scan layout: fewer rows, wider text, clearer buttons. */
@media (max-width:760px){
  html body .history-panel{
    padding:10px!important;
  }

  html body .history-total{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
    margin:8px 0!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;
  }

  html body .history-total .history-total-item{
    display:block!important;
    min-width:0!important;
    padding:8px 9px!important;
    border:1px solid #d7e3f0!important;
    border-left:3px solid #0b7ee8!important;
    border-radius:5px!important;
    background:#fff!important;
    color:#64748b!important;
    font-size:11px!important;
    font-weight:900!important;
    line-height:1.2!important;
    text-transform:uppercase!important;
  }

  html body .history-total .history-total-item strong{
    display:block!important;
    margin-top:3px!important;
    color:#0f172a!important;
    font-size:17px!important;
    line-height:1.15!important;
    text-transform:none!important;
  }

  html body .shift-history-range-status{
    display:block!important;
    margin:8px 0 10px!important;
    padding:7px 9px!important;
    border:1px solid #d7e3f0!important;
    border-radius:5px!important;
    background:#f8fbff!important;
    color:#475569!important;
    font-size:12px!important;
    line-height:1.3!important;
    white-space:normal!important;
  }

  html body .history-subhead.combined-subhead{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:8px!important;
    margin:10px 0 8px!important;
    padding:0 0 6px!important;
    border-bottom:2px solid #0b7ee8!important;
    background:transparent!important;
  }

  html body .history-subhead.combined-subhead span{
    color:#0a3b7d!important;
    font-size:17px!important;
    font-weight:900!important;
    line-height:1.15!important;
  }

  html body .history-subhead.combined-subhead small{
    color:#64748b!important;
    font-size:11px!important;
    font-weight:800!important;
    text-align:right!important;
  }

  html body .history-date-group{
    margin:0 0 10px!important;
    padding:0!important;
    border:1px solid #d7e3f0!important;
    border-radius:6px!important;
    background:#fff!important;
    overflow:hidden!important;
  }

  html body .history-date-title{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:10px!important;
    padding:9px 10px!important;
    border-bottom:1px solid #d7e3f0!important;
    background:#f8fbff!important;
  }

  html body .history-date-title strong{
    font-size:16px!important;
    line-height:1.2!important;
  }

  html body .history-date-title span{
    color:#0a3b7d!important;
    font-size:12px!important;
    font-weight:900!important;
    white-space:nowrap!important;
  }

  html body .main-history-table-wrap{
    padding:0!important;
  }

  html body .main-history-table tr{
    display:grid!important;
    grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)!important;
    margin:0!important;
    border:0!important;
    border-left:4px solid #0b7ee8!important;
    border-radius:0!important;
    box-shadow:none!important;
  }

  html body .main-history-table tr + tr{
    border-top:8px solid #f3f6fa!important;
  }

  html body .main-history-table tr.manual-record{
    border-left-color:#0f766e!important;
  }

  html body .main-history-table tr.excluded-from-total{
    border-left-color:#f59e0b!important;
  }

  html body .main-history-table td{
    display:block!important;
    min-width:0!important;
    max-width:100%!important;
    padding:8px 10px!important;
    border:0!important;
    border-bottom:1px solid #edf2f7!important;
    font-size:14px!important;
    line-height:1.25!important;
    overflow:visible!important;
    white-space:normal!important;
    overflow-wrap:break-word!important;
    word-break:normal!important;
  }

  html body .main-history-table td::before{
    display:block!important;
    margin:0 0 4px!important;
    color:#64748b!important;
    font-size:10px!important;
    font-weight:900!important;
    line-height:1!important;
    letter-spacing:0!important;
    text-transform:uppercase!important;
  }

  html body .main-history-table td[data-label="#"]{
    display:none!important;
  }

  html body .main-history-table td:nth-child(2){grid-column:1!important;}
  html body .main-history-table td:nth-child(3){grid-column:2!important;}
  html body .main-history-table td:nth-child(4){grid-column:1 / -1!important;background:#fcfdff!important;}
  html body .main-history-table td:nth-child(5){grid-column:1!important;background:#fff!important;}
  html body .main-history-table td:nth-child(6){grid-column:2!important;background:#fff!important;}
  html body .main-history-table td:nth-child(7){grid-column:1 / -1!important;}
  html body .main-history-table td:nth-child(8){grid-column:1!important;border-bottom:0!important;}
  html body .main-history-table td:nth-child(9){grid-column:2!important;border-bottom:0!important;}

  html body .record-type-pill{
    display:inline-flex!important;
    align-items:center!important;
    min-height:22px!important;
    padding:3px 8px!important;
    border-radius:999px!important;
    font-size:11px!important;
    line-height:1!important;
  }

  html body .main-history-location > span{
    display:grid!important;
    grid-template-columns:44px minmax(0,1fr)!important;
    align-items:start!important;
    gap:8px!important;
    width:100%!important;
    margin:0 0 7px!important;
    padding:0!important;
  }

  html body .main-history-location > span:last-child{
    margin-bottom:0!important;
  }

  html body .main-history-location > span b{
    width:38px!important;
    min-width:38px!important;
    max-width:38px!important;
    height:20px!important;
    padding:4px 0!important;
    border-radius:4px!important;
    text-align:center!important;
    font-size:10px!important;
    line-height:1!important;
  }

  html body .main-history-worked,
  html body .main-history-pay{
    font-size:16px!important;
    font-weight:900!important;
  }

  html body .main-history-pay{
    color:#047857!important;
  }

  html body .main-history-notes{
    color:#334155!important;
  }

  html body .main-history-edit-cell .ghost{
    width:100%!important;
    min-height:38px!important;
    max-width:none!important;
    border-radius:5px!important;
    font-size:14px!important;
  }

  html body .main-history-map-links{
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    flex-wrap:wrap!important;
  }

  html body .main-history-map-links a{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:56px!important;
    min-height:38px!important;
    margin:0!important;
    padding:8px 10px!important;
    border:1px solid #b9d8ff!important;
    border-radius:5px!important;
    background:#eef6ff!important;
    color:#0a3b7d!important;
    font-size:14px!important;
    font-weight:900!important;
    text-decoration:none!important;
  }
}

@media (max-width:380px){
  html body .main-history-table tr{
    grid-template-columns:1fr!important;
  }

  html body .main-history-table td:nth-child(n){
    grid-column:1!important;
  }

  html body .history-total{
    grid-template-columns:1fr!important;
  }
}

/* Mobile Work Records compact polish: cleaner, shorter, easier to scan. */
@media (max-width:760px){
  html body .history-date-group{
    margin:0 0 8px!important;
    border-radius:5px!important;
  }

  html body .history-date-title{
    padding:7px 9px!important;
  }

  html body .history-date-title strong{
    font-size:15px!important;
  }

  html body .history-date-title span{
    font-size:11px!important;
  }

  html body .main-history-table tr{
    grid-template-columns:minmax(96px,.72fr) minmax(0,1.28fr)!important;
    border-left-width:3px!important;
  }

  html body .main-history-table tr + tr{
    border-top:5px solid #f3f6fa!important;
  }

  html body .main-history-table td{
    padding:6px 8px!important;
    font-size:13px!important;
    line-height:1.22!important;
  }

  html body .main-history-table td::before{
    margin:0 0 3px!important;
    font-size:9px!important;
    color:#64748b!important;
  }

  html body .main-history-table td:nth-child(2),
  html body .main-history-table td:nth-child(3){
    padding-top:7px!important;
    padding-bottom:7px!important;
    background:#fff!important;
  }

  html body .main-history-table td:nth-child(2)::before,
  html body .main-history-table td:nth-child(3)::before{
    display:none!important;
  }

  html body .main-history-table td:nth-child(3){
    color:#0f172a!important;
    font-size:14px!important;
    font-weight:800!important;
  }

  html body .record-type-pill{
    min-height:19px!important;
    padding:2px 7px!important;
    font-size:10px!important;
  }

  html body .main-history-table td:nth-child(4){
    padding-top:6px!important;
    padding-bottom:6px!important;
  }

  html body .main-history-location{
    font-size:13px!important;
    line-height:1.22!important;
  }

  html body .main-history-location > span{
    grid-template-columns:36px minmax(0,1fr)!important;
    gap:7px!important;
    margin:0 0 4px!important;
  }

  html body .main-history-location > span b{
    width:32px!important;
    min-width:32px!important;
    max-width:32px!important;
    height:18px!important;
    padding:3px 0!important;
    font-size:9px!important;
  }

  html body .main-history-table td:nth-child(5),
  html body .main-history-table td:nth-child(6){
    display:flex!important;
    align-items:baseline!important;
    justify-content:space-between!important;
    gap:8px!important;
  }

  html body .main-history-table td:nth-child(5)::before,
  html body .main-history-table td:nth-child(6)::before{
    margin:0!important;
    flex:0 0 auto!important;
  }

  html body .main-history-worked,
  html body .main-history-pay{
    font-size:15px!important;
    line-height:1.15!important;
  }

  html body .main-history-notes{
    padding-top:6px!important;
    padding-bottom:6px!important;
    font-size:13px!important;
  }

  html body .main-history-table td:nth-child(8),
  html body .main-history-table td:nth-child(9){
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    padding-top:7px!important;
    padding-bottom:7px!important;
  }

  html body .main-history-table td:nth-child(8)::before,
  html body .main-history-table td:nth-child(9)::before{
    margin:0!important;
    flex:0 0 34px!important;
  }

  html body .main-history-edit-cell .ghost{
    width:auto!important;
    min-width:64px!important;
    min-height:30px!important;
    padding:5px 12px!important;
    border-radius:4px!important;
    font-size:12px!important;
  }

  html body .main-history-map-links{
    flex-wrap:wrap!important;
  }

  html body .main-history-map-links a{
    min-width:42px!important;
    min-height:30px!important;
    padding:5px 8px!important;
    border-radius:4px!important;
    font-size:12px!important;
  }
}

/* Mobile edge cleanup: remove the extra left/right gutter around Work Records. */
@media (max-width:760px){
  html,
  body,
  html body .app-shell{
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
    padding:0!important;
    overflow-x:hidden!important;
  }

  html body .layout{
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
    padding-left:0!important;
    padding-right:0!important;
  }

  html body .summary-panel,
  html body .history-panel{
    width:100%!important;
    max-width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
    border-left:0!important;
    border-right:0!important;
    border-radius:0!important;
  }

  html body .history-panel{
    padding-left:4px!important;
    padding-right:4px!important;
  }

  html body .history-panel > .section-title,
  html body .history-total,
  html body .shift-history-range-status,
  html body .history-subhead.combined-subhead,
  html body #shiftList,
  html body .shift-list,
  html body .history-date-group{
    margin-left:0!important;
    margin-right:0!important;
    max-width:100%!important;
  }
}

@media (max-width:420px){
  html body .history-panel{
    padding-left:2px!important;
    padding-right:2px!important;
  }
}

/* Mobile Work Records final compact pass: less height, clearer range strip. */
@media (max-width:760px){
  html body .history-panel > .section-title{
    min-height:28px!important;
    margin:0 0 6px!important;
    padding:0 4px 6px!important;
  }

  html body .history-panel .history-title-label{
    font-size:21px!important;
    line-height:1.05!important;
  }

  html body .history-panel .history-title-range{
    min-height:24px!important;
    padding:3px 9px!important;
    font-size:13px!important;
  }

  html body .history-total{
    gap:5px!important;
    margin:5px 0 5px!important;
  }

  html body .history-total .history-total-item{
    padding:6px 7px!important;
    border-left-width:3px!important;
    font-size:10px!important;
  }

  html body .history-total .history-total-item strong{
    margin-top:2px!important;
    font-size:18px!important;
    line-height:1.05!important;
  }

  html body .shift-history-range-status{
    margin:5px 0 7px!important;
    padding:7px 8px!important;
    border:1px solid #8ec5ff!important;
    border-left:4px solid #0b7ee8!important;
    border-radius:4px!important;
    background:#eef7ff!important;
    color:#073b78!important;
    font-size:12px!important;
    font-weight:900!important;
    line-height:1.25!important;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.5)!important;
  }

  html body .history-subhead.combined-subhead{
    margin:7px 0 6px!important;
    padding:0 4px 5px!important;
  }

  html body .history-subhead.combined-subhead span{
    font-size:21px!important;
    line-height:1.05!important;
  }

  html body .history-subhead.combined-subhead small{
    display:none!important;
  }

  html body .history-date-group{
    margin:0 0 6px!important;
  }

  html body .history-date-title{
    flex-direction:row!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:8px!important;
    padding:6px 8px!important;
    text-align:left!important;
  }

  html body .history-date-title strong{
    font-size:15px!important;
    line-height:1.1!important;
  }

  html body .history-date-title span{
    font-size:11px!important;
    line-height:1.1!important;
  }

  html body .main-history-table tr{
    grid-template-columns:minmax(86px,.58fr) minmax(0,1.42fr)!important;
    border-left-width:3px!important;
  }

  html body .main-history-table tr + tr{
    border-top:4px solid #f2f5f8!important;
  }

  html body .main-history-table td{
    padding:5px 7px!important;
    font-size:12px!important;
    line-height:1.18!important;
  }

  html body .main-history-table td::before{
    font-size:8px!important;
    margin:0 0 2px!important;
  }

  html body .main-history-table td:nth-child(2),
  html body .main-history-table td:nth-child(3){
    padding-top:6px!important;
    padding-bottom:6px!important;
  }

  html body .main-history-table td:nth-child(3){
    font-size:13px!important;
    line-height:1.15!important;
    white-space:nowrap!important;
  }

  html body .record-type-pill{
    min-height:18px!important;
    padding:2px 6px!important;
    font-size:10px!important;
  }

  html body .main-history-location{
    font-size:12px!important;
    line-height:1.18!important;
  }

  html body .main-history-location > span{
    grid-template-columns:32px minmax(0,1fr)!important;
    gap:6px!important;
    margin:0 0 3px!important;
  }

  html body .main-history-location > span b{
    width:28px!important;
    min-width:28px!important;
    max-width:28px!important;
    height:17px!important;
    padding:3px 0!important;
    font-size:8px!important;
  }

  html body .main-history-table td:nth-child(5),
  html body .main-history-table td:nth-child(6){
    padding-top:5px!important;
    padding-bottom:5px!important;
    justify-content:flex-start!important;
    gap:6px!important;
  }

  html body .main-history-worked,
  html body .main-history-pay{
    font-size:13px!important;
    line-height:1.1!important;
    white-space:nowrap!important;
  }

  html body .main-history-notes{
    padding-top:5px!important;
    padding-bottom:5px!important;
    font-size:12px!important;
  }

  html body .main-history-table td:nth-child(8),
  html body .main-history-table td:nth-child(9){
    padding-top:6px!important;
    padding-bottom:6px!important;
    gap:6px!important;
  }

  html body .main-history-table td:nth-child(8)::before,
  html body .main-history-table td:nth-child(9)::before{
    flex-basis:28px!important;
  }

  html body .main-history-edit-cell .ghost,
  html body .main-history-map-links a{
    min-height:28px!important;
    padding:4px 9px!important;
    font-size:12px!important;
  }
}

@media (max-width:420px){
  html body .history-panel .history-title-label,
  html body .history-subhead.combined-subhead span{
    font-size:19px!important;
  }

  html body .history-total .history-total-item strong{
    font-size:17px!important;
  }

  html body .main-history-table td:nth-child(3){
    font-size:12px!important;
  }
}

/* Mobile Work Records ultra compact: no range box, denser shift rows. */
@media (max-width:760px){
  html body .shift-history-range-status{
    display:none!important;
  }

  html body .history-total{
    display:flex!important;
    align-items:center!important;
    gap:6px!important;
    margin:4px 0 6px!important;
    padding:0 4px!important;
  }

  html body .history-total .history-total-item{
    display:flex!important;
    align-items:baseline!important;
    justify-content:space-between!important;
    gap:6px!important;
    flex:1 1 0!important;
    min-width:0!important;
    padding:5px 6px!important;
    border:1px solid #d7e3f0!important;
    border-left:3px solid #0b7ee8!important;
    border-radius:4px!important;
    background:#fff!important;
    font-size:9px!important;
    line-height:1!important;
  }

  html body .history-total .history-total-item strong{
    display:inline!important;
    margin:0!important;
    font-size:15px!important;
    line-height:1!important;
    white-space:nowrap!important;
  }

  html body .history-date-group{
    border-radius:4px!important;
    margin-bottom:5px!important;
  }

  html body .history-date-title{
    min-height:0!important;
    padding:5px 7px!important;
    background:#fff!important;
  }

  html body .history-date-title strong{
    font-size:14px!important;
  }

  html body .history-date-title span{
    font-size:10px!important;
  }

  html body .main-history-table tr{
    display:grid!important;
    grid-template-columns:44px minmax(0,1fr) auto auto!important;
    border-left-width:3px!important;
  }

  html body .main-history-table tr + tr{
    border-top:3px solid #edf3f8!important;
  }

  html body .main-history-table td{
    padding:4px 6px!important;
    font-size:12px!important;
    line-height:1.15!important;
  }

  html body .main-history-table td::before{
    font-size:8px!important;
    margin:0 0 2px!important;
  }

  html body .main-history-table td:nth-child(2){
    grid-column:1!important;
    display:flex!important;
    align-items:center!important;
    border-bottom:1px solid #edf2f7!important;
  }

  html body .main-history-table td:nth-child(3){
    grid-column:2 / -1!important;
    display:flex!important;
    align-items:center!important;
    border-bottom:1px solid #edf2f7!important;
    font-size:13px!important;
    font-weight:900!important;
    white-space:nowrap!important;
  }

  html body .main-history-table td:nth-child(2)::before,
  html body .main-history-table td:nth-child(3)::before{
    display:none!important;
  }

  html body .record-type-pill{
    min-height:17px!important;
    padding:2px 4px!important;
    border:0!important;
    background:transparent!important;
    font-size:10px!important;
  }

  html body .main-history-table td:nth-child(4){
    grid-column:1 / -1!important;
    padding-top:5px!important;
    padding-bottom:5px!important;
  }

  html body .main-history-location{
    font-size:12px!important;
  }

  html body .main-history-location > span{
    grid-template-columns:28px minmax(0,1fr)!important;
    gap:6px!important;
    margin-bottom:3px!important;
  }

  html body .main-history-location > span b{
    width:25px!important;
    min-width:25px!important;
    max-width:25px!important;
    height:16px!important;
    font-size:8px!important;
  }

  html body .main-history-table td:nth-child(5){
    grid-column:1 / 3!important;
  }

  html body .main-history-table td:nth-child(6){
    grid-column:3 / -1!important;
  }

  html body .main-history-table td:nth-child(5),
  html body .main-history-table td:nth-child(6){
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:5px!important;
    padding-top:4px!important;
    padding-bottom:4px!important;
  }

  html body .main-history-worked,
  html body .main-history-pay{
    font-size:13px!important;
    line-height:1!important;
    white-space:nowrap!important;
  }

  html body .main-history-notes.is-ok-note,
  html body .main-history-notes.is-default-note{
    display:none!important;
  }

  html body .main-history-table td:nth-child(7){
    grid-column:1 / -1!important;
    padding-top:4px!important;
    padding-bottom:4px!important;
  }

  html body .main-history-table td:nth-child(8){
    grid-column:1 / 3!important;
  }

  html body .main-history-table td:nth-child(9){
    grid-column:3 / -1!important;
  }

  html body .main-history-table td:nth-child(8),
  html body .main-history-table td:nth-child(9){
    display:flex!important;
    align-items:center!important;
    gap:5px!important;
    padding-top:5px!important;
    padding-bottom:5px!important;
    border-bottom:0!important;
  }

  html body .main-history-table td:nth-child(8)::before,
  html body .main-history-table td:nth-child(9)::before{
    display:none!important;
  }

  html body .main-history-edit-cell .ghost{
    min-width:54px!important;
    min-height:26px!important;
    padding:3px 9px!important;
    font-size:11px!important;
  }

  html body .main-history-map-links{
    justify-content:flex-end!important;
    gap:5px!important;
  }

  html body .main-history-map-links a{
    min-width:36px!important;
    min-height:26px!important;
    padding:3px 7px!important;
    font-size:11px!important;
  }
}

/* Mobile report cleanup: readable card preview instead of a cramped table. */
@media (max-width:760px){
  html body #reportModal{
    padding:0!important;
    align-items:stretch!important;
    place-items:stretch!important;
  }

  html body #reportModal .report-card{
    width:100vw!important;
    max-width:100vw!important;
    height:100dvh!important;
    max-height:100dvh!important;
    border-radius:0!important;
    padding:7px!important;
    overflow:auto!important;
  }

  html body #reportModal .section-title{
    position:sticky!important;
    top:0!important;
    z-index:5!important;
    margin:0 0 6px!important;
    padding:5px 0 7px!important;
    background:#fff!important;
  }

  html body #reportModal .report-toolbar{
    position:sticky!important;
    top:42px!important;
    z-index:4!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:6px!important;
    margin:0 0 7px!important;
    padding:6px 0!important;
    background:#fff!important;
  }

  html body #reportModal .report-toolbar button{
    min-height:34px!important;
    padding:7px 8px!important;
    font-size:12px!important;
    border-radius:4px!important;
  }

  html body #reportPreview{
    padding:5px!important;
    overflow:visible!important;
    border-radius:5px!important;
  }

  html body #reportPreview .work-report.clean-work-report{
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
    padding:7px!important;
    font-size:12px!important;
    line-height:1.2!important;
  }

  html body #reportPreview .professional-report-head{
    display:block!important;
    padding:7px!important;
    margin:0 0 7px!important;
  }

  html body #reportPreview .report-brand{
    gap:7px!important;
    margin-bottom:7px!important;
  }

  html body #reportPreview .report-brand img{
    width:34px!important;
    height:34px!important;
  }

  html body #reportPreview .report-title-clean{
    font-size:17px!important;
    line-height:1.05!important;
  }

  html body #reportPreview .report-meta-clean,
  html body #reportPreview .combined-total-card,
  html body #reportPreview .report-source-summary{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:5px!important;
    margin:0 0 7px!important;
  }

  html body #reportPreview .report-meta-clean > div,
  html body #reportPreview .combined-total-card > div,
  html body #reportPreview .report-source-summary > div{
    padding:6px!important;
    border-radius:4px!important;
  }

  html body #reportPreview .report-meta-clean span,
  html body #reportPreview .combined-total-card span,
  html body #reportPreview .report-source-summary span{
    font-size:9px!important;
  }

  html body #reportPreview .report-meta-clean strong,
  html body #reportPreview .combined-total-card strong,
  html body #reportPreview .report-source-summary strong{
    font-size:12px!important;
    line-height:1.15!important;
  }

  html body #reportPreview .report-subsection-title small,
  html body #reportPreview .one-page-period-line,
  html body #reportPreview .manual-edit-details{
    display:none!important;
  }

  html body #reportPreview .report-table-wrap{
    overflow:visible!important;
    border:0!important;
  }

  html body #reportPreview .unified-report-table,
  html body #reportPreview .unified-report-table tbody,
  html body #reportPreview .unified-report-table tr,
  html body #reportPreview .unified-report-table td{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }

  html body #reportPreview .unified-report-table thead,
  html body #reportPreview .unified-report-table colgroup{
    display:none!important;
  }

  html body #reportPreview .unified-report-table tr{
    display:grid!important;
    grid-template-columns:62px minmax(0,1fr)!important;
    margin:0 0 6px!important;
    border:1px solid #d7e3f0!important;
    border-left:3px solid #0b7ee8!important;
    border-radius:5px!important;
    overflow:hidden!important;
    background:#fff!important;
  }

  html body #reportPreview .unified-report-table td{
    padding:5px 7px!important;
    border:0!important;
    border-bottom:1px solid #eef2f7!important;
    font-size:11px!important;
    line-height:1.18!important;
    white-space:normal!important;
    overflow-wrap:break-word!important;
  }

  html body #reportPreview .unified-report-table td::before{
    content:attr(data-label)!important;
    display:block!important;
    margin-bottom:2px!important;
    color:#64748b!important;
    font-size:8px!important;
    font-weight:900!important;
    text-transform:uppercase!important;
  }

  html body #reportPreview .unified-report-table td[data-label="#"],
  html body #reportPreview .unified-report-table td:nth-child(1){
    display:none!important;
  }

  html body #reportPreview .unified-report-table td[data-label="Type"],
  html body #reportPreview .unified-report-table td:nth-child(2){
    grid-column:1!important;
  }

  html body #reportPreview .unified-report-table td[data-label="Date"],
  html body #reportPreview .unified-report-table td:nth-child(3){
    grid-column:2!important;
  }

  html body #reportPreview .unified-report-table td[data-label="Time"],
  html body #reportPreview .unified-report-table td[data-label="Location"],
  html body #reportPreview .unified-report-table td[data-label="Notes"],
  html body #reportPreview .unified-report-table td[data-label="Map"],
  html body #reportPreview .unified-report-table td:nth-child(4),
  html body #reportPreview .unified-report-table td:nth-child(5),
  html body #reportPreview .unified-report-table td:nth-child(8),
  html body #reportPreview .unified-report-table td:nth-child(9),
  html body #reportPreview .unified-report-table td:nth-child(10){
    grid-column:1 / -1!important;
  }

  html body #reportPreview .unified-report-table td[data-label="Worked"],
  html body #reportPreview .unified-report-table td:nth-child(6){
    grid-column:1!important;
  }

  html body #reportPreview .unified-report-table td[data-label="Pay"],
  html body #reportPreview .unified-report-table td:nth-child(7){
    grid-column:2!important;
  }

  html body #reportPreview .unified-report-table td[data-label="Rate"]{
    display:none!important;
  }

  html body #reportPreview .map-mini{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-height:24px!important;
    min-width:34px!important;
    padding:3px 7px!important;
    border:1px solid #b9d8ff!important;
    border-radius:4px!important;
    background:#eef6ff!important;
    text-decoration:none!important;
  }
}

/* Remove duplicate Shift History date-range status line. */
html body #shiftHistoryRangeStatus,
html body .shift-history-range-status{
  display:none!important;
}

/* Final report preview reset: stable desktop table and clean mobile cards. */
html body #reportModal{
  padding:12px!important;
}

html body #reportModal .report-card{
  width:min(1120px, calc(100vw - 24px))!important;
  max-width:1120px!important;
  max-height:92vh!important;
  padding:10px!important;
  border-radius:6px!important;
  overflow:auto!important;
  background:#fff!important;
}

html body #reportModal .section-title{
  margin:0 0 8px!important;
  padding:0 0 8px!important;
  border-bottom:1px solid #d7e3f0!important;
  background:#fff!important;
}

html body #reportModal .report-toolbar{
  display:flex!important;
  justify-content:flex-end!important;
  gap:8px!important;
  margin:0 0 8px!important;
  padding:0!important;
  background:#fff!important;
}

html body #reportModal .report-toolbar button{
  min-height:32px!important;
  padding:6px 12px!important;
  border-radius:4px!important;
  font-size:12px!important;
}

html body #reportPreview{
  width:100%!important;
  max-width:100%!important;
  padding:8px!important;
  border:1px solid #d7e3f0!important;
  border-radius:5px!important;
  background:#fff!important;
  overflow:auto!important;
}

html body #reportPreview .work-report.clean-work-report{
  width:100%!important;
  max-width:100%!important;
  margin:0!important;
  padding:10px!important;
  font-size:11px!important;
  line-height:1.25!important;
  background:#fff!important;
  transform:none!important;
  zoom:1!important;
}

html body #reportPreview .professional-report-head{
  display:grid!important;
  grid-template-columns:minmax(260px,1fr) minmax(420px,1.5fr)!important;
  gap:10px!important;
  align-items:start!important;
  padding:10px!important;
  margin:0 0 8px!important;
  border:1px solid #d7e3f0!important;
  border-radius:5px!important;
  background:#f8fbff!important;
}

html body #reportPreview .report-brand{
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
  min-width:0!important;
}

html body #reportPreview .report-brand img{
  width:42px!important;
  height:42px!important;
  flex:0 0 42px!important;
  object-fit:contain!important;
}

html body #reportPreview .report-title-clean{
  margin:0!important;
  font-size:19px!important;
  line-height:1.05!important;
}

html body #reportPreview .report-meta-clean,
html body #reportPreview .combined-total-card,
html body #reportPreview .report-source-summary{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:6px!important;
  margin:0 0 8px!important;
}

html body #reportPreview .report-meta-clean > div,
html body #reportPreview .combined-total-card > div,
html body #reportPreview .report-source-summary > div{
  min-width:0!important;
  padding:7px!important;
  border:1px solid #d7e3f0!important;
  border-radius:4px!important;
  background:#fff!important;
  overflow:hidden!important;
}

html body #reportPreview .report-meta-clean span,
html body #reportPreview .combined-total-card span,
html body #reportPreview .report-source-summary span{
  display:block!important;
  color:#64748b!important;
  font-size:9px!important;
  font-weight:900!important;
  line-height:1.1!important;
  text-transform:uppercase!important;
}

html body #reportPreview .report-meta-clean strong,
html body #reportPreview .combined-total-card strong,
html body #reportPreview .report-source-summary strong{
  display:block!important;
  margin-top:3px!important;
  color:#0f172a!important;
  font-size:12px!important;
  line-height:1.15!important;
  overflow-wrap:break-word!important;
}

html body #reportPreview .shift-detail-block{
  margin-top:8px!important;
}

html body #reportPreview .shift-detail-block h3{
  margin:0 0 4px!important;
  font-size:14px!important;
}

html body #reportPreview .one-page-period-line{
  margin:0 0 6px!important;
  color:#64748b!important;
  font-size:10px!important;
}

html body #reportPreview .report-subsection-title{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  margin:0 0 6px!important;
  padding:6px 8px!important;
  border:1px solid #d7e3f0!important;
  border-radius:4px!important;
  background:#f8fbff!important;
}

html body #reportPreview .report-subsection-title span{
  font-size:12px!important;
  font-weight:900!important;
}

html body #reportPreview .report-subsection-title small{
  color:#64748b!important;
  font-size:9px!important;
  font-weight:800!important;
}

html body #reportPreview .report-table-wrap{
  width:100%!important;
  max-width:100%!important;
  overflow:auto!important;
  border:1px solid #d7e3f0!important;
  border-radius:5px!important;
}

html body #reportPreview .unified-report-table{
  width:100%!important;
  min-width:900px!important;
  table-layout:fixed!important;
  border-collapse:collapse!important;
  font-size:10px!important;
  line-height:1.18!important;
}

html body #reportPreview .unified-report-table th,
html body #reportPreview .unified-report-table td{
  padding:5px 6px!important;
  border:1px solid #d7e3f0!important;
  vertical-align:top!important;
  white-space:normal!important;
  overflow-wrap:break-word!important;
  word-break:normal!important;
}

html body #reportPreview .unified-report-table th{
  background:#eef4fb!important;
  color:#0f172a!important;
  font-size:9px!important;
  font-weight:900!important;
  text-transform:uppercase!important;
}

html body #reportPreview .unified-report-table .mini-address{
  display:grid!important;
  grid-template-columns:26px minmax(0,1fr)!important;
  gap:4px!important;
  margin:0 0 3px!important;
}

html body #reportPreview .unified-report-table .mini-address b,
html body #reportPreview .manual-location-chip{
  font-size:8px!important;
  line-height:1.15!important;
}

html body #reportPreview .compact-notes-cell{
  max-width:none!important;
}

html body #reportPreview .report-signature{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:12px!important;
  margin-top:8px!important;
  padding-top:8px!important;
  border-top:1px solid #d7e3f0!important;
  font-size:10px!important;
}

html body #reportPreview .report-footer-branded{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  margin-top:8px!important;
  padding-top:6px!important;
  border-top:1px solid #d7e3f0!important;
  color:#475569!important;
  font-size:9px!important;
  text-align:center!important;
}

html body #reportPreview .report-footer-branded img{
  width:22px!important;
  height:22px!important;
}

@media (max-width:760px){
  html body #reportModal{
    padding:0!important;
    align-items:stretch!important;
    place-items:stretch!important;
  }

  html body #reportModal .report-card{
    width:100vw!important;
    max-width:100vw!important;
    height:100dvh!important;
    max-height:100dvh!important;
    padding:7px!important;
    border-radius:0!important;
  }

  html body #reportModal .section-title{
    position:sticky!important;
    top:0!important;
    z-index:6!important;
    min-height:36px!important;
    margin:0!important;
    padding:4px 0 6px!important;
  }

  html body #reportModal .report-toolbar{
    position:sticky!important;
    top:36px!important;
    z-index:5!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:6px!important;
    margin:0 0 6px!important;
    padding:6px 0!important;
  }

  html body #reportModal .report-toolbar button{
    width:100%!important;
    min-height:32px!important;
  }

  html body #reportPreview{
    padding:5px!important;
    overflow:visible!important;
  }

  html body #reportPreview .work-report.clean-work-report{
    padding:6px!important;
    font-size:11px!important;
  }

  html body #reportPreview .professional-report-head{
    display:block!important;
    padding:7px!important;
  }

  html body #reportPreview .report-brand img{
    width:34px!important;
    height:34px!important;
    flex-basis:34px!important;
  }

  html body #reportPreview .report-title-clean{
    font-size:16px!important;
  }

  html body #reportPreview .report-meta-clean,
  html body #reportPreview .combined-total-card,
  html body #reportPreview .report-source-summary{
    grid-template-columns:1fr 1fr!important;
    gap:5px!important;
  }

  html body #reportPreview .report-meta-clean > div,
  html body #reportPreview .combined-total-card > div,
  html body #reportPreview .report-source-summary > div{
    padding:6px!important;
  }

  html body #reportPreview .report-subsection-title{
    display:block!important;
    padding:5px 6px!important;
  }

  html body #reportPreview .report-subsection-title small,
  html body #reportPreview .one-page-period-line,
  html body #reportPreview .manual-edit-details{
    display:none!important;
  }

  html body #reportPreview .report-table-wrap{
    overflow:visible!important;
    border:0!important;
  }

  html body #reportPreview .unified-report-table,
  html body #reportPreview .unified-report-table tbody,
  html body #reportPreview .unified-report-table tr,
  html body #reportPreview .unified-report-table td{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }

  html body #reportPreview .unified-report-table thead,
  html body #reportPreview .unified-report-table colgroup{
    display:none!important;
  }

  html body #reportPreview .unified-report-table tr{
    display:grid!important;
    grid-template-columns:54px minmax(0,1fr)!important;
    margin:0 0 6px!important;
    border:1px solid #d7e3f0!important;
    border-left:3px solid #0b7ee8!important;
    border-radius:5px!important;
    background:#fff!important;
    overflow:hidden!important;
  }

  html body #reportPreview .unified-report-table td{
    padding:5px 7px!important;
    border:0!important;
    border-bottom:1px solid #eef2f7!important;
    font-size:11px!important;
    line-height:1.18!important;
  }

  html body #reportPreview .unified-report-table td::before{
    content:attr(data-label)!important;
    display:block!important;
    margin-bottom:2px!important;
    color:#64748b!important;
    font-size:8px!important;
    font-weight:900!important;
    text-transform:uppercase!important;
  }

  html body #reportPreview .unified-report-table td:nth-child(1),
  html body #reportPreview .unified-report-table td[data-label="#"]{
    display:none!important;
  }

  html body #reportPreview .unified-report-table td:not([data-label]):nth-child(2)::before{content:"Type"!important;}
  html body #reportPreview .unified-report-table td:not([data-label]):nth-child(3)::before{content:"Date"!important;}
  html body #reportPreview .unified-report-table td:not([data-label]):nth-child(4)::before{content:"Time"!important;}
  html body #reportPreview .unified-report-table td:not([data-label]):nth-child(5)::before{content:"Location"!important;}
  html body #reportPreview .unified-report-table td:not([data-label]):nth-child(6)::before{content:"Worked"!important;}
  html body #reportPreview .unified-report-table td:not([data-label]):nth-child(7)::before{content:"Rate / Pay"!important;}
  html body #reportPreview .unified-report-table td:not([data-label]):nth-child(8)::before{content:"Pay / Notes"!important;}
  html body #reportPreview .unified-report-table td:not([data-label]):nth-child(9)::before{content:"Notes / Map"!important;}
  html body #reportPreview .unified-report-table td:not([data-label]):nth-child(10)::before{content:"Map"!important;}

  html body #reportPreview .unified-report-table td:nth-child(2){
    grid-column:1!important;
  }

  html body #reportPreview .unified-report-table td:nth-child(3){
    grid-column:2!important;
  }

  html body #reportPreview .unified-report-table td:nth-child(4),
  html body #reportPreview .unified-report-table td:nth-child(5),
  html body #reportPreview .unified-report-table td:nth-child(8),
  html body #reportPreview .unified-report-table td:nth-child(9),
  html body #reportPreview .unified-report-table td:nth-child(10){
    grid-column:1 / -1!important;
  }

  html body #reportPreview .unified-report-table td:nth-child(6){
    grid-column:1!important;
  }

  html body #reportPreview .unified-report-table td:nth-child(7){
    grid-column:2!important;
  }

  html body #reportPreview .map-mini{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:34px!important;
    min-height:24px!important;
    padding:3px 7px!important;
    margin:2px 4px 2px 0!important;
    border:1px solid #b9d8ff!important;
    border-radius:4px!important;
    background:#eef6ff!important;
    color:#0a3b7d!important;
    font-weight:900!important;
    text-decoration:none!important;
  }

  html body #reportPreview .report-signature{
    grid-template-columns:1fr!important;
    gap:6px!important;
  }

  html body #reportPreview .report-footer-branded{
    flex-direction:column!important;
    gap:4px!important;
  }
}

/* V53 report hard reset: remove squeezed mobile columns completely. */
html body #reportModal .section-title{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
}

html body #reportModal #closeReportBtn{
  width:auto!important;
  min-width:64px!important;
  flex:0 0 auto!important;
}

html body #reportModal .report-toolbar{
  align-items:center!important;
}

html body #reportPreview .unified-report-table td,
html body #reportPreview .unified-report-table th{
  word-break:normal!important;
  overflow-wrap:break-word!important;
}

@media (max-width:760px){
  html body #reportModal{
    inset:0!important;
    width:100vw!important;
    height:100dvh!important;
    padding:0!important;
    background:#f3f6fa!important;
  }

  html body #reportModal .report-card{
    width:100vw!important;
    max-width:100vw!important;
    height:100dvh!important;
    max-height:100dvh!important;
    margin:0!important;
    padding:8px!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    background:#f3f6fa!important;
    overflow:auto!important;
  }

  html body #reportModal .section-title{
    position:sticky!important;
    top:0!important;
    z-index:20!important;
    min-height:38px!important;
    margin:0 0 6px!important;
    padding:0 0 6px!important;
    border-bottom:1px solid #d7e3f0!important;
    background:#f3f6fa!important;
  }

  html body #reportModal .section-title span{
    font-size:15px!important;
    font-weight:900!important;
  }

  html body #reportModal #closeReportBtn{
    width:auto!important;
    min-width:58px!important;
    min-height:30px!important;
    padding:5px 9px!important;
    font-size:12px!important;
  }

  html body #reportModal .report-toolbar{
    position:sticky!important;
    top:38px!important;
    z-index:19!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:6px!important;
    margin:0 0 6px!important;
    padding:6px 0!important;
    background:#f3f6fa!important;
  }

  html body #reportModal .report-toolbar button{
    width:100%!important;
    min-height:32px!important;
    padding:6px 8px!important;
    border-radius:4px!important;
    font-size:12px!important;
  }

  html body #reportPreview{
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    overflow:visible!important;
  }

  html body #reportPreview .work-report.clean-work-report{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
    transform:none!important;
    zoom:1!important;
    font-size:12px!important;
    line-height:1.25!important;
  }

  html body #reportPreview .professional-report-head{
    display:block!important;
    margin:0 0 6px!important;
    padding:8px!important;
    border:1px solid #d7e3f0!important;
    border-radius:5px!important;
    background:#fff!important;
  }

  html body #reportPreview .report-brand{
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    margin:0 0 7px!important;
  }

  html body #reportPreview .report-brand img{
    width:34px!important;
    height:34px!important;
    flex:0 0 34px!important;
  }

  html body #reportPreview .report-title-clean{
    margin:0!important;
    font-size:16px!important;
    line-height:1.05!important;
  }

  html body #reportPreview .report-brand p{
    margin:2px 0 0!important;
    font-size:11px!important;
    color:#64748b!important;
  }

  html body #reportPreview .report-meta-clean,
  html body #reportPreview .combined-total-card,
  html body #reportPreview .report-source-summary,
  html body #reportPreview .break-summary-card{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:5px!important;
    margin:0 0 6px!important;
  }

  html body #reportPreview .report-meta-clean > div,
  html body #reportPreview .combined-total-card > div,
  html body #reportPreview .report-source-summary > div,
  html body #reportPreview .break-summary-card > div{
    min-width:0!important;
    padding:6px!important;
    border:1px solid #d7e3f0!important;
    border-radius:4px!important;
    background:#fff!important;
  }

  html body #reportPreview .report-meta-clean span,
  html body #reportPreview .combined-total-card span,
  html body #reportPreview .report-source-summary span,
  html body #reportPreview .break-summary-card span{
    display:block!important;
    margin:0 0 2px!important;
    color:#64748b!important;
    font-size:8px!important;
    font-weight:900!important;
    line-height:1.1!important;
    text-transform:uppercase!important;
  }

  html body #reportPreview .report-meta-clean strong,
  html body #reportPreview .combined-total-card strong,
  html body #reportPreview .report-source-summary strong,
  html body #reportPreview .break-summary-card strong{
    display:block!important;
    color:#0f172a!important;
    font-size:12px!important;
    line-height:1.15!important;
    overflow-wrap:break-word!important;
  }

  html body #reportPreview .shift-detail-block{
    margin:0!important;
    padding:0!important;
  }

  html body #reportPreview .shift-detail-block h3{
    display:none!important;
  }

  html body #reportPreview .one-page-period-line,
  html body #reportPreview .report-subsection-title small,
  html body #reportPreview .manual-edit-details{
    display:none!important;
  }

  html body #reportPreview .report-subsection-title{
    display:block!important;
    margin:0 0 5px!important;
    padding:6px 8px!important;
    border:1px solid #d7e3f0!important;
    border-radius:4px!important;
    background:#fff!important;
  }

  html body #reportPreview .report-subsection-title span{
    display:block!important;
    font-size:13px!important;
    line-height:1.1!important;
    font-weight:900!important;
  }

  html body #reportPreview .report-table-wrap{
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    overflow:visible!important;
    background:transparent!important;
  }

  html body #reportPreview .unified-report-table,
  html body #reportPreview .unified-report-table tbody{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    table-layout:auto!important;
    border-collapse:separate!important;
    border-spacing:0!important;
    background:transparent!important;
  }

  html body #reportPreview .unified-report-table colgroup,
  html body #reportPreview .unified-report-table thead{
    display:none!important;
  }

  html body #reportPreview .unified-report-table tr{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0 0 6px!important;
    border:1px solid #d7e3f0!important;
    border-left:3px solid #0b7ee8!important;
    border-radius:5px!important;
    background:#fff!important;
    overflow:hidden!important;
  }

  html body #reportPreview .unified-report-table tr.manual-report-row{
    border-left-color:#0f766e!important;
  }

  html body #reportPreview .unified-report-table tr.report-excluded-row,
  html body #reportPreview .unified-report-table tr.manual-excluded-row{
    border-left-color:#f59e0b!important;
  }

  html body #reportPreview .unified-report-table td,
  html body #reportPreview .unified-report-table td:nth-child(n){
    display:grid!important;
    grid-template-columns:74px minmax(0,1fr)!important;
    grid-column:auto!important;
    align-items:start!important;
    gap:7px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    padding:6px 8px!important;
    border:0!important;
    border-bottom:1px solid #edf2f7!important;
    font-size:12px!important;
    line-height:1.2!important;
    text-align:left!important;
    white-space:normal!important;
    overflow-wrap:break-word!important;
    word-break:normal!important;
  }

  html body #reportPreview .unified-report-table td:last-child{
    border-bottom:0!important;
  }

  html body #reportPreview .unified-report-table td[data-label="#"],
  html body #reportPreview .unified-report-table td:nth-child(1){
    display:none!important;
  }

  html body #reportPreview .unified-report-table td::before{
    content:attr(data-label)!important;
    grid-column:1!important;
    grid-row:1 / -1!important;
    display:block!important;
    margin:0!important;
    color:#64748b!important;
    font-size:9px!important;
    font-weight:900!important;
    line-height:1.1!important;
    text-transform:uppercase!important;
    letter-spacing:0!important;
  }

  html body #reportPreview .unified-report-table td:not([data-label]):nth-child(2)::before{content:"Type"!important;}
  html body #reportPreview .unified-report-table td:not([data-label]):nth-child(3)::before{content:"Date"!important;}
  html body #reportPreview .unified-report-table td:not([data-label]):nth-child(4)::before{content:"Time"!important;}
  html body #reportPreview .unified-report-table td:not([data-label]):nth-child(5)::before{content:"Location"!important;}
  html body #reportPreview .unified-report-table td:not([data-label]):nth-child(6)::before{content:"Worked"!important;}
  html body #reportPreview .unified-report-table td:not([data-label]):nth-child(7)::before{content:"Rate / Pay"!important;}
  html body #reportPreview .unified-report-table td:not([data-label]):nth-child(8)::before{content:"Pay / Notes"!important;}
  html body #reportPreview .unified-report-table td:not([data-label]):nth-child(9)::before{content:"Notes / Map"!important;}
  html body #reportPreview .unified-report-table td:not([data-label]):nth-child(10)::before{content:"Map"!important;}

  html body #reportPreview .unified-report-table td > *{
    grid-column:2!important;
    min-width:0!important;
    max-width:100%!important;
  }

  html body #reportPreview .unified-report-table td[data-label="Type"],
  html body #reportPreview .unified-report-table td[data-label="Date"],
  html body #reportPreview .unified-report-table td[data-label="Time"],
  html body #reportPreview .unified-report-table td[data-label="Worked"],
  html body #reportPreview .unified-report-table td[data-label="Pay"]{
    align-items:center!important;
  }

  html body #reportPreview .unified-report-table .type-pill,
  html body #reportPreview .unified-report-table .auto-pill,
  html body #reportPreview .unified-report-table .manual-pill{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:auto!important;
    min-width:0!important;
    max-width:max-content!important;
    padding:2px 6px!important;
    border-radius:999px!important;
    white-space:nowrap!important;
    word-break:normal!important;
    overflow-wrap:normal!important;
    font-size:10px!important;
    line-height:1!important;
  }

  html body #reportPreview .unified-report-table .mini-address,
  html body #reportPreview .manual-location-chip{
    grid-column:2!important;
    display:grid!important;
    grid-template-columns:30px minmax(0,1fr)!important;
    gap:5px!important;
    margin:0 0 3px!important;
    width:100%!important;
    max-width:100%!important;
    white-space:normal!important;
    overflow-wrap:break-word!important;
    word-break:normal!important;
  }

  html body #reportPreview .unified-report-table .mini-address b{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:26px!important;
    min-width:26px!important;
    height:16px!important;
    border-radius:4px!important;
    font-size:8px!important;
    line-height:1!important;
  }

  html body #reportPreview .compact-notes-cell{
    max-width:100%!important;
    white-space:normal!important;
    overflow-wrap:break-word!important;
  }

  html body #reportPreview .ok-badge{
    display:inline-flex!important;
    width:auto!important;
    max-width:max-content!important;
    white-space:nowrap!important;
  }

  html body #reportPreview .map-mini{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:auto!important;
    min-width:34px!important;
    min-height:24px!important;
    margin:0 5px 3px 0!important;
    padding:3px 8px!important;
    border:1px solid #b9d8ff!important;
    border-radius:4px!important;
    background:#eef6ff!important;
    color:#0a3b7d!important;
    font-weight:900!important;
    text-decoration:none!important;
    white-space:nowrap!important;
  }

  html body #reportPreview .final-combined-summary{
    display:none!important;
  }

  html body #reportPreview .report-signature{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:5px!important;
    margin-top:6px!important;
    padding-top:6px!important;
    font-size:10px!important;
  }

  html body #reportPreview .report-footer-branded{
    display:flex!important;
    flex-direction:column!important;
    gap:3px!important;
    margin-top:6px!important;
    padding-top:6px!important;
    font-size:9px!important;
  }

  html body #reportPreview .report-footer-branded img{
    width:22px!important;
    height:22px!important;
  }
}

/* v60 final override: address suggestions are app cards, report preview metadata wraps on phones */
html body #addressSearchResults.address-suggestion-panel{
  display:block!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:260px!important;
  margin-top:8px!important;
  padding:0!important;
  border:1px solid #b9cbe0!important;
  border-radius:8px!important;
  background:#fff!important;
  color:#0f172a!important;
  box-shadow:0 12px 28px rgba(15,23,42,.16)!important;
  overflow:auto!important;
  z-index:3200!important;
}

html body #addressSearchResults.address-suggestion-panel[hidden]{
  display:none!important;
}

@media(max-width:640px){
  html body #addressSearchResults.address-suggestion-panel{
    position:fixed!important;
    left:10px!important;
    right:10px!important;
    bottom:12px!important;
    width:auto!important;
    max-height:62vh!important;
    margin:0!important;
    border-radius:10px!important;
    box-shadow:0 18px 50px rgba(15,23,42,.28)!important;
  }

  html body #reportModal .report-preview{
    overflow-x:hidden!important;
    padding:8px!important;
  }

  html body #reportPreview .work-report.clean-work-report .professional-report-head{
    display:block!important;
    padding:10px!important;
  }

  html body #reportPreview .work-report.clean-work-report .report-brand{
    display:grid!important;
    grid-template-columns:48px minmax(0,1fr)!important;
    align-items:center!important;
    gap:9px!important;
  }

  html body #reportPreview .work-report.clean-work-report .report-brand img{
    width:46px!important;
    height:46px!important;
  }

  html body #reportPreview .report-title-clean{
    font-size:22px!important;
    line-height:1.05!important;
    white-space:normal!important;
    overflow:visible!important;
  }

  html body #reportPreview .work-report.clean-work-report .report-brand p{
    font-size:11px!important;
    white-space:normal!important;
  }

  html body #reportPreview .report-meta-clean{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:6px!important;
    width:100%!important;
    margin-top:10px!important;
  }

  html body #reportPreview .report-meta-clean > div{
    width:100%!important;
    min-width:0!important;
    padding:8px 9px!important;
    text-align:left!important;
  }

  html body #reportPreview .report-meta-clean strong{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
    overflow-wrap:break-word!important;
    word-break:normal!important;
    font-size:12px!important;
    line-height:1.25!important;
  }

  html body #reportPreview .report-meta-clean .period-card strong{
    font-size:13px!important;
  }
}

/* v63 final override: compact dashboard pay summary */
html body .summary-panel .total-amount-card,
html body .total-amount-card{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:8px!important;
  align-items:stretch!important;
  margin:8px 0 12px!important;
  padding:8px!important;
  min-height:0!important;
  border:1px solid #cfe0f5!important;
  border-radius:7px!important;
  background:#f5f9ff!important;
  box-shadow:none!important;
  overflow:visible!important;
}

html body .summary-panel .total-amount-card > div:first-child,
html body .summary-panel .total-amount-meta > span,
html body .total-amount-card > div:first-child,
html body .total-amount-meta > span{
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:center!important;
  gap:4px!important;
  min-width:0!important;
  min-height:58px!important;
  padding:9px 10px!important;
  border:1px solid #d7e6f8!important;
  border-left:3px solid #1792d4!important;
  border-radius:5px!important;
  background:#fff!important;
  text-align:left!important;
  box-shadow:none!important;
}

html body .summary-panel .total-amount-meta,
html body .total-amount-meta{
  display:contents!important;
}

html body .summary-panel .total-amount-card span,
html body .summary-panel .total-amount-meta > span,
html body .total-amount-card span,
html body .total-amount-meta > span{
  margin:0!important;
  color:#53657a!important;
  font-size:10px!important;
  line-height:1.1!important;
  font-weight:900!important;
  text-transform:uppercase!important;
  letter-spacing:.02em!important;
}

html body .summary-panel .total-amount-card strong,
html body .summary-panel .total-amount-meta strong,
html body .total-amount-card strong,
html body .total-amount-meta strong{
  display:block!important;
  margin:0!important;
  color:#081b33!important;
  font-size:19px!important;
  line-height:1!important;
  font-weight:900!important;
  letter-spacing:0!important;
  text-transform:none!important;
}

html body .summary-panel .total-amount-meta > span:nth-child(2),
html body .total-amount-meta > span:nth-child(2){
  border-left-color:#0f766e!important;
}

html body .summary-panel .total-amount-meta > span:nth-child(3),
html body .total-amount-meta > span:nth-child(3){
  border-left-color:#b45309!important;
}

html body .history-total{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:6px!important;
  margin:0 0 8px!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
}

html body .history-total .history-total-item{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  min-width:0!important;
  padding:7px 9px!important;
  border:1px solid #d7e6f8!important;
  border-left:3px solid #1792d4!important;
  border-radius:5px!important;
  background:#fff!important;
  color:#53657a!important;
  font-size:10px!important;
  line-height:1.1!important;
  font-weight:900!important;
  text-transform:uppercase!important;
}

html body .history-total .history-total-item strong{
  color:#081b33!important;
  font-size:16px!important;
  line-height:1!important;
  text-transform:none!important;
}

@media(max-width:760px){
  html body .summary-panel .total-amount-card,
  html body .total-amount-card{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
    margin:7px 0 10px!important;
    padding:6px!important;
  }

  html body .summary-panel .total-amount-card > div:first-child,
  html body .summary-panel .total-amount-meta > span,
  html body .total-amount-card > div:first-child,
  html body .total-amount-meta > span{
    min-height:50px!important;
    padding:8px 9px!important;
  }

  html body .summary-panel .total-amount-card strong,
  html body .summary-panel .total-amount-meta strong,
  html body .total-amount-card strong,
  html body .total-amount-meta strong{
    font-size:18px!important;
  }
}

@media(max-width:360px){
  html body .summary-panel .total-amount-card,
  html body .total-amount-card,
  html body .history-total{
    grid-template-columns:1fr!important;
  }
}

html body #reportModal .report-toolbar{
  display:grid!important;
  grid-template-columns:1.25fr 1.25fr 1fr!important;
  gap:8px!important;
  margin:8px 0 10px!important;
  padding:0!important;
}

html body #reportModal .report-toolbar button{
  width:100%!important;
  min-height:38px!important;
  padding:8px 10px!important;
  border-radius:4px!important;
  font-size:13px!important;
  line-height:1.1!important;
  white-space:normal!important;
}

@media(max-width:560px){
  html body #reportModal .report-toolbar{
    grid-template-columns:1fr 1fr!important;
  }

  html body #reportModal .report-toolbar #printReportBtn{
    grid-column:1/-1!important;
  }
}

/* v66: separate report actions and keep address search inside the form */
html body #reportModal .report-toolbar{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:7px!important;
  margin:8px 0 10px!important;
  padding:0!important;
}

html body #reportModal .report-toolbar button,
html body #reportModal .report-toolbar #printReportBtn{
  grid-column:auto!important;
  width:100%!important;
  min-width:0!important;
  min-height:36px!important;
  padding:7px 8px!important;
  border-radius:4px!important;
  font-size:12px!important;
  line-height:1.1!important;
  white-space:normal!important;
}

html body .address-search-box{
  position:relative!important;
  display:block!important;
  width:100%!important;
  margin-top:7px!important;
}

html body #addressSearchResults.address-suggestion-panel{
  position:static!important;
  inset:auto!important;
  left:auto!important;
  right:auto!important;
  bottom:auto!important;
  top:auto!important;
  transform:none!important;
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:230px!important;
  margin:6px 0 0!important;
  padding:0!important;
  border:1px solid #b9cbe0!important;
  border-radius:6px!important;
  background:#fff!important;
  box-shadow:0 8px 22px rgba(15,23,42,.12)!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
}

html body #addressSearchResults.address-suggestion-panel[hidden]{
  display:none!important;
}

@media(max-width:640px){
  html body #reportModal .report-toolbar{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
  }

  html body #addressSearchResults.address-suggestion-panel{
    position:static!important;
    left:auto!important;
    right:auto!important;
    bottom:auto!important;
    width:100%!important;
    max-height:38vh!important;
    margin-top:6px!important;
    border-radius:6px!important;
    box-shadow:0 8px 20px rgba(15,23,42,.14)!important;
  }

  html body .address-suggestion-option{
    padding:9px 10px!important;
  }
}

/* v69: clean shareable report preview and printable layout */
html body #reportPreview .final-share-report,
html body .report-export-shell .final-share-report{
  width:100%!important;
  max-width:920px!important;
  margin:0 auto!important;
  padding:16px!important;
  border:1px solid #d7e3f0!important;
  border-radius:7px!important;
  background:#fff!important;
  color:#0f172a!important;
  box-shadow:none!important;
  overflow:hidden!important;
}

html body #reportPreview .final-report-header,
html body .report-export-shell .final-report-header{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:14px!important;
  padding-bottom:12px!important;
  margin-bottom:12px!important;
  border-bottom:2px solid #0b7ee8!important;
}

html body #reportPreview .final-report-brand,
html body .report-export-shell .final-report-brand{
  display:grid!important;
  grid-template-columns:56px minmax(0,1fr)!important;
  gap:12px!important;
  align-items:center!important;
  min-width:0!important;
}

html body #reportPreview .final-report-brand img,
html body .report-export-shell .final-report-brand img{
  width:54px!important;
  height:54px!important;
  object-fit:contain!important;
  border:1px solid #d7e3f0!important;
  border-radius:6px!important;
  background:#fff!important;
  padding:4px!important;
}

html body #reportPreview .final-report-brand h2,
html body .report-export-shell .final-report-brand h2{
  margin:0!important;
  color:#061a3a!important;
  font-size:26px!important;
  line-height:1.02!important;
  font-weight:900!important;
}

html body #reportPreview .final-report-brand p,
html body .report-export-shell .final-report-brand p,
html body #reportPreview .final-report-generated span,
html body .report-export-shell .final-report-generated span,
html body #reportPreview .final-report-identity span,
html body .report-export-shell .final-report-identity span,
html body #reportPreview .final-report-summary span,
html body .report-export-shell .final-report-summary span,
html body #reportPreview .final-report-pay-details span,
html body .report-export-shell .final-report-pay-details span,
html body #reportPreview .final-report-shift-bottom span,
html body .report-export-shell .final-report-shift-bottom span{
  color:#64748b!important;
  font-size:10px!important;
  line-height:1.1!important;
  font-weight:900!important;
  text-transform:uppercase!important;
  letter-spacing:0!important;
}

html body #reportPreview .final-report-generated,
html body .report-export-shell .final-report-generated{
  min-width:150px!important;
  text-align:right!important;
}

html body #reportPreview .final-report-generated strong,
html body .report-export-shell .final-report-generated strong{
  display:block!important;
  margin-top:4px!important;
  font-size:13px!important;
  line-height:1.2!important;
}

html body #reportPreview .final-report-identity,
html body .report-export-shell .final-report-identity{
  display:grid!important;
  grid-template-columns:1fr 2fr 1fr 1.3fr!important;
  gap:8px!important;
  margin-bottom:10px!important;
}

html body #reportPreview .final-report-identity > div,
html body .report-export-shell .final-report-identity > div,
html body #reportPreview .final-report-summary > div,
html body .report-export-shell .final-report-summary > div,
html body #reportPreview .final-report-pay-details > div,
html body .report-export-shell .final-report-pay-details > div{
  min-width:0!important;
  padding:8px 10px!important;
  border:1px solid #d7e3f0!important;
  border-left:3px solid #0b7ee8!important;
  border-radius:5px!important;
  background:#f8fbff!important;
}

html body #reportPreview .final-report-identity strong,
html body .report-export-shell .final-report-identity strong{
  display:block!important;
  margin-top:4px!important;
  font-size:12px!important;
  line-height:1.22!important;
  word-break:normal!important;
  overflow-wrap:break-word!important;
}

html body #reportPreview .final-report-summary,
html body .report-export-shell .final-report-summary,
html body #reportPreview .final-report-pay-details,
html body .report-export-shell .final-report-pay-details{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:8px!important;
  margin:0 0 14px!important;
}

html body #reportPreview .final-report-detail-grid,
html body .report-export-shell .final-report-detail-grid{
  margin:0 0 14px!important;
  padding:10px!important;
  border:1px solid #d7e3f0!important;
  border-radius:6px!important;
  background:#f8fbff!important;
}

html body #reportPreview .final-report-detail-grid h3,
html body .report-export-shell .final-report-detail-grid h3{
  margin:0 0 8px!important;
  color:#073763!important;
  font-size:15px!important;
  line-height:1.1!important;
  font-weight:900!important;
}

html body #reportPreview .final-report-detail-grid > div,
html body .report-export-shell .final-report-detail-grid > div{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:7px!important;
}

html body #reportPreview .final-report-detail-grid > div > div,
html body .report-export-shell .final-report-detail-grid > div > div{
  min-width:0!important;
  padding:7px 8px!important;
  border:1px solid #e1eaf5!important;
  border-left:3px solid #0f766e!important;
  border-radius:5px!important;
  background:#fff!important;
}

html body #reportPreview .final-report-detail-grid span,
html body .report-export-shell .final-report-detail-grid span{
  display:block!important;
  color:#64748b!important;
  font-size:9px!important;
  line-height:1.1!important;
  font-weight:900!important;
  text-transform:uppercase!important;
}

html body #reportPreview .final-report-detail-grid strong,
html body .report-export-shell .final-report-detail-grid strong{
  display:block!important;
  margin-top:3px!important;
  color:#0f172a!important;
  font-size:12px!important;
  line-height:1.15!important;
  font-weight:900!important;
  overflow-wrap:break-word!important;
}

html body #reportPreview .final-report-summary strong,
html body .report-export-shell .final-report-summary strong,
html body #reportPreview .final-report-pay-details strong,
html body .report-export-shell .final-report-pay-details strong{
  display:block!important;
  margin-top:4px!important;
  color:#07172d!important;
  font-size:19px!important;
  line-height:1!important;
  font-weight:900!important;
}

html body #reportPreview .final-report-summary small,
html body .report-export-shell .final-report-summary small,
html body #reportPreview .final-report-shift-bottom small,
html body .report-export-shell .final-report-shift-bottom small{
  display:block!important;
  margin-top:3px!important;
  color:#92400e!important;
  font-size:10px!important;
  line-height:1.15!important;
  font-weight:800!important;
}

html body #reportPreview .final-report-records h3,
html body .report-export-shell .final-report-records h3{
  margin:12px 0 8px!important;
  padding-bottom:6px!important;
  border-bottom:2px solid #0b7ee8!important;
  color:#073763!important;
  font-size:18px!important;
  line-height:1.1!important;
}

html body #reportPreview .final-report-date-group,
html body .report-export-shell .final-report-date-group{
  margin:0 0 12px!important;
  border:1px solid #d7e3f0!important;
  border-radius:6px!important;
  background:#fff!important;
  overflow:hidden!important;
}

html body #reportPreview .final-report-date-group > header,
html body .report-export-shell .final-report-date-group > header{
  display:flex!important;
  justify-content:space-between!important;
  gap:10px!important;
  padding:9px 12px!important;
  border-bottom:1px solid #d7e3f0!important;
  background:#f6faff!important;
}

html body #reportPreview .final-report-date-group > header strong,
html body .report-export-shell .final-report-date-group > header strong{
  font-size:16px!important;
  line-height:1.1!important;
}

html body #reportPreview .final-report-date-group > header span,
html body .report-export-shell .final-report-date-group > header span{
  color:#073763!important;
  font-size:12px!important;
  font-weight:900!important;
}

html body #reportPreview .final-report-shift-card,
html body .report-export-shell .final-report-shift-card{
  margin:0!important;
  padding:10px 12px!important;
  border-bottom:1px solid #e7edf5!important;
  border-left:5px solid #0b7ee8!important;
  background:#fff!important;
}

html body #reportPreview .final-report-shift-card.manual,
html body .report-export-shell .final-report-shift-card.manual{
  border-left-color:#0f766e!important;
}

html body #reportPreview .final-report-shift-card.is-excluded,
html body .report-export-shell .final-report-shift-card.is-excluded{
  border-left-color:#f59e0b!important;
  background:#fff8e1!important;
}

html body #reportPreview .final-report-shift-card.is-excluded .final-report-shift-top strong,
html body .report-export-shell .final-report-shift-card.is-excluded .final-report-shift-top strong,
html body #reportPreview .final-report-shift-card.is-excluded .final-report-location p,
html body .report-export-shell .final-report-shift-card.is-excluded .final-report-location p{
  text-decoration:line-through!important;
  color:#64748b!important;
}

html body #reportPreview .final-report-shift-top,
html body .report-export-shell .final-report-shift-top{
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr) auto!important;
  gap:10px!important;
  align-items:center!important;
  margin-bottom:8px!important;
}

html body #reportPreview .final-report-type,
html body .report-export-shell .final-report-type{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:22px!important;
  padding:3px 8px!important;
  border:1px solid #b9d8ff!important;
  border-radius:999px!important;
  background:#eef6ff!important;
  color:#0a4aa0!important;
  font-size:11px!important;
  line-height:1!important;
  font-weight:900!important;
}

html body #reportPreview .manual .final-report-type,
html body .report-export-shell .manual .final-report-type{
  border-color:#a7f3d0!important;
  background:#ecfdf5!important;
  color:#047857!important;
}

html body #reportPreview .final-report-shift-top strong,
html body .report-export-shell .final-report-shift-top strong{
  font-size:15px!important;
  line-height:1.15!important;
}

html body #reportPreview .final-report-row-number,
html body .report-export-shell .final-report-row-number{
  color:#64748b!important;
  font-size:11px!important;
  font-weight:800!important;
}

html body #reportPreview .final-report-location,
html body .report-export-shell .final-report-location{
  display:grid!important;
  gap:5px!important;
  margin:0 0 8px!important;
}

html body #reportPreview .final-report-location > div,
html body .report-export-shell .final-report-location > div{
  display:grid!important;
  grid-template-columns:42px minmax(0,1fr)!important;
  gap:8px!important;
  align-items:start!important;
}

html body #reportPreview .final-report-location span,
html body .report-export-shell .final-report-location span{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:20px!important;
  border-radius:5px!important;
  background:#e4fbf3!important;
  color:#047857!important;
  font-size:10px!important;
  font-weight:900!important;
  text-transform:uppercase!important;
}

html body #reportPreview .final-report-location p,
html body .report-export-shell .final-report-location p{
  margin:0!important;
  color:#102033!important;
  font-size:13px!important;
  line-height:1.25!important;
  overflow-wrap:break-word!important;
}

html body #reportPreview .final-report-shift-bottom,
html body .report-export-shell .final-report-shift-bottom{
  display:grid!important;
  grid-template-columns:120px 110px minmax(0,1fr) auto!important;
  gap:8px!important;
  align-items:start!important;
  padding-top:8px!important;
  border-top:1px solid #eef2f7!important;
}

html body #reportPreview .final-report-shift-bottom strong,
html body .report-export-shell .final-report-shift-bottom strong{
  display:block!important;
  margin-top:3px!important;
  color:#061a3a!important;
  font-size:15px!important;
  line-height:1.1!important;
  font-weight:900!important;
}

html body #reportPreview .final-report-shift-bottom > div:nth-child(2) strong,
html body .report-export-shell .final-report-shift-bottom > div:nth-child(2) strong{
  color:#047857!important;
}

html body #reportPreview .final-report-notes p,
html body .report-export-shell .final-report-notes p,
html body #reportPreview .final-report-links p,
html body .report-export-shell .final-report-links p{
  margin:3px 0 0!important;
  color:#334155!important;
  font-size:12px!important;
  line-height:1.25!important;
  overflow-wrap:break-word!important;
}

html body #reportPreview .final-report-notes p span,
html body .report-export-shell .final-report-notes p span{
  display:inline!important;
  margin-right:6px!important;
}

html body #reportPreview .final-report-map-link,
html body .report-export-shell .final-report-map-link{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:24px!important;
  min-width:38px!important;
  margin:0 4px 4px 0!important;
  padding:3px 8px!important;
  border:1px solid #b9d8ff!important;
  border-radius:4px!important;
  background:#eef6ff!important;
  color:#0a3b7d!important;
  font-size:12px!important;
  font-weight:900!important;
  text-decoration:none!important;
}

html body #reportPreview .final-report-extra-details,
html body .report-export-shell .final-report-extra-details{
  margin-top:8px!important;
  padding-top:7px!important;
  border-top:1px solid #e7edf5!important;
}

html body #reportPreview .final-report-extra-details summary,
html body .report-export-shell .final-report-extra-details summary{
  cursor:pointer!important;
  color:#073763!important;
  font-size:12px!important;
  font-weight:900!important;
}

html body #reportPreview .final-report-extra-details ul,
html body .report-export-shell .final-report-extra-details ul,
html body #reportPreview .final-report-adjustments ul,
html body .report-export-shell .final-report-adjustments ul{
  margin:7px 0 0!important;
  padding-left:18px!important;
}

html body #reportPreview .final-report-extra-details li,
html body .report-export-shell .final-report-extra-details li,
html body #reportPreview .final-report-adjustments li,
html body .report-export-shell .final-report-adjustments li{
  margin:0 0 4px!important;
  color:#334155!important;
  font-size:11px!important;
  line-height:1.25!important;
  overflow-wrap:break-word!important;
}

html body #reportPreview .final-report-adjustments,
html body .report-export-shell .final-report-adjustments{
  margin:0 0 14px!important;
  padding:10px!important;
  border:1px solid #d7e3f0!important;
  border-radius:6px!important;
  background:#fffdf3!important;
}

html body #reportPreview .final-report-adjustments h3,
html body .report-export-shell .final-report-adjustments h3{
  margin:0 0 8px!important;
  color:#92400e!important;
  font-size:15px!important;
  line-height:1.1!important;
  font-weight:900!important;
}

html body #reportPreview .final-report-signature,
html body .report-export-shell .final-report-signature{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:20px!important;
  margin-top:14px!important;
  padding-top:10px!important;
  border-top:1px solid #d7e3f0!important;
  color:#334155!important;
  font-size:12px!important;
}

html body #reportPreview .final-report-footer,
html body .report-export-shell .final-report-footer{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  margin-top:10px!important;
  padding-top:10px!important;
  border-top:1px solid #e2e8f0!important;
  color:#64748b!important;
  font-size:12px!important;
}

html body #reportPreview .final-report-footer img,
html body .report-export-shell .final-report-footer img{
  width:28px!important;
  height:28px!important;
  object-fit:contain!important;
  border-radius:5px!important;
}

@media(max-width:720px){
  html body #reportModal .report-card{
    width:calc(100vw - 12px)!important;
    max-height:calc(100dvh - 12px)!important;
    padding:6px!important;
  }

  html body #reportPreview{
    padding:6px!important;
    overflow-x:hidden!important;
  }

  html body #reportPreview .final-share-report{
    padding:10px!important;
    border-radius:6px!important;
  }

  html body #reportPreview .final-report-header{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:7px!important;
    margin-bottom:9px!important;
    padding-bottom:9px!important;
  }

  html body #reportPreview .final-report-brand{
    grid-template-columns:44px minmax(0,1fr)!important;
    gap:9px!important;
  }

  html body #reportPreview .final-report-brand img{
    width:42px!important;
    height:42px!important;
  }

  html body #reportPreview .final-report-brand h2{
    font-size:21px!important;
  }

  html body #reportPreview .final-report-generated{
    min-width:0!important;
    text-align:left!important;
  }

  html body #reportPreview .final-report-identity{
    grid-template-columns:1fr!important;
    gap:6px!important;
  }

  html body #reportPreview .final-report-summary,
  html body #reportPreview .final-report-pay-details,
  html body #reportPreview .final-report-detail-grid > div{
    grid-template-columns:1fr 1fr!important;
    gap:6px!important;
    margin-bottom:10px!important;
  }

  html body #reportPreview .final-report-summary > div,
  html body #reportPreview .final-report-pay-details > div,
  html body #reportPreview .final-report-detail-grid > div > div,
  html body #reportPreview .final-report-identity > div{
    padding:7px 8px!important;
  }

  html body #reportPreview .final-report-summary strong,
  html body #reportPreview .final-report-pay-details strong{
    font-size:17px!important;
  }

  html body #reportPreview .final-report-records h3{
    font-size:17px!important;
    margin-top:10px!important;
  }

  html body #reportPreview .final-report-date-group > header{
    padding:8px 9px!important;
  }

  html body #reportPreview .final-report-shift-card{
    padding:8px 9px!important;
  }

  html body #reportPreview .final-report-shift-top{
    grid-template-columns:auto minmax(0,1fr) auto!important;
    gap:7px!important;
  }

  html body #reportPreview .final-report-shift-top strong{
    font-size:14px!important;
  }

  html body #reportPreview .final-report-location > div{
    grid-template-columns:38px minmax(0,1fr)!important;
    gap:7px!important;
  }

  html body #reportPreview .final-report-location p{
    font-size:12.5px!important;
  }

  html body #reportPreview .final-report-shift-bottom{
    grid-template-columns:1fr 1fr!important;
    gap:7px!important;
  }

  html body #reportPreview .final-report-notes,
  html body #reportPreview .final-report-links{
    grid-column:1/-1!important;
  }

  html body #reportPreview .final-report-signature,
  html body #reportPreview .final-report-footer{
    grid-template-columns:1fr!important;
    font-size:11px!important;
  }
}

@media(max-width:380px){
  html body #reportPreview .final-report-summary,
  html body #reportPreview .final-report-pay-details,
  html body #reportPreview .final-report-detail-grid > div,
  html body #reportPreview .final-report-shift-bottom{
    grid-template-columns:1fr!important;
  }
}

/* v72: Soft, lightweight Shift History and Work Records polish. */
html body .history-panel{
  background:#fff!important;
  border:1px solid #e3eaf3!important;
  border-radius:16px!important;
  box-shadow:0 18px 45px rgba(15,23,42,.06)!important;
  padding:22px!important;
}

html body .history-panel > .section-title{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
  margin:0 0 18px!important;
  padding:0 0 16px!important;
  border:0!important;
  border-bottom:1px solid #e7edf5!important;
  background:transparent!important;
}

html body .history-panel > .section-title > span{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
  flex:1 1 auto!important;
  min-width:0!important;
}

html body .history-panel .history-title-label{
  color:#061a33!important;
  font-size:34px!important;
  line-height:1.05!important;
  font-weight:900!important;
  letter-spacing:0!important;
}

html body .history-panel .history-title-range{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:38px!important;
  padding:8px 18px!important;
  border:1px solid #d8e8fb!important;
  border-radius:12px!important;
  background:#f0f7ff!important;
  color:#0b5ed7!important;
  font-size:18px!important;
  line-height:1!important;
  font-weight:900!important;
  white-space:nowrap!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85)!important;
}

html body #copySummaryBtn{
  min-height:34px!important;
  padding:7px 11px!important;
  border:1px solid #d8e2ee!important;
  border-radius:7px!important;
  background:#fff!important;
  color:#16436f!important;
  font-size:12px!important;
  font-weight:800!important;
  box-shadow:none!important;
}

html body #copySummaryBtn:hover{
  background:#f5f9fd!important;
}

html body .history-total{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:16px!important;
  margin:0 0 18px!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
}

html body .history-total .history-total-item{
  display:block!important;
  min-height:104px!important;
  padding:22px!important;
  border:1px solid #e0e7ef!important;
  border-radius:14px!important;
  background:linear-gradient(180deg,#fff,#fbfdff)!important;
  color:#657386!important;
  font-size:15px!important;
  line-height:1.2!important;
  font-weight:900!important;
  text-transform:uppercase!important;
  letter-spacing:0!important;
  box-shadow:0 10px 24px rgba(15,23,42,.035)!important;
}

html body .history-total .history-total-item strong{
  display:block!important;
  margin-top:14px!important;
  color:#061a33!important;
  font-size:42px!important;
  line-height:1!important;
  font-weight:900!important;
  text-transform:none!important;
  letter-spacing:0!important;
  white-space:nowrap!important;
}

html body .history-subhead.combined-subhead{
  display:flex!important;
  align-items:flex-end!important;
  justify-content:space-between!important;
  gap:12px!important;
  margin:8px 0 14px!important;
  padding:16px 0 0!important;
  border:0!important;
  border-top:1px solid #e7edf5!important;
  background:transparent!important;
}

html body .history-subhead.combined-subhead span{
  color:#1266dc!important;
  font-size:26px!important;
  line-height:1.1!important;
  font-weight:900!important;
  letter-spacing:0!important;
}

html body .history-subhead.combined-subhead small{
  color:#7a8797!important;
  font-size:12px!important;
  line-height:1.25!important;
  font-weight:700!important;
  text-align:right!important;
}

html body #shiftList{
  display:grid!important;
  gap:14px!important;
}

html body .history-date-group{
  margin:0!important;
  padding:0!important;
  border:1px solid #dde8f2!important;
  border-radius:12px!important;
  background:#fff!important;
  box-shadow:0 8px 20px rgba(15,23,42,.025)!important;
  overflow:hidden!important;
}

html body .history-date-title{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  min-height:0!important;
  padding:11px 14px!important;
  border:0!important;
  border-bottom:1px solid #e7edf5!important;
  background:#f8fbff!important;
}

html body .history-date-title strong{
  color:#07172d!important;
  font-size:17px!important;
  line-height:1.15!important;
  font-weight:900!important;
}

html body .history-date-title span{
  color:#17466f!important;
  font-size:12px!important;
  line-height:1.15!important;
  font-weight:900!important;
  white-space:nowrap!important;
}

html body .main-history-table-wrap{
  overflow-x:auto!important;
  overflow-y:hidden!important;
  border:0!important;
  border-radius:0!important;
  background:#fff!important;
}

html body .main-history-table{
  width:100%!important;
  min-width:900px!important;
  border-collapse:collapse!important;
  table-layout:fixed!important;
  background:#fff!important;
}

html body .main-history-table th,
html body .main-history-table td{
  padding:9px 10px!important;
  border:0!important;
  border-right:1px solid #e2ebf4!important;
  border-bottom:1px solid #e7edf5!important;
  background:#fff!important;
  color:#102033!important;
  font-size:12px!important;
  line-height:1.25!important;
  vertical-align:top!important;
  word-break:normal!important;
  overflow-wrap:break-word!important;
}

html body .main-history-table th{
  background:#f3f8fc!important;
  color:#0b2342!important;
  font-size:11px!important;
  line-height:1.1!important;
  font-weight:900!important;
  text-transform:uppercase!important;
}

html body .main-history-table th:last-child,
html body .main-history-table td:last-child{
  border-right:0!important;
}

html body .main-history-table tr:last-child td{
  border-bottom:0!important;
}

html body .main-history-table tr.excluded-from-total td{
  background:#fff8e6!important;
  color:#7c2d12!important;
}

html body .record-type-pill{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:19px!important;
  padding:2px 7px!important;
  border:1px solid #cfe0f7!important;
  border-radius:7px!important;
  background:#f5f9ff!important;
  color:#1455bc!important;
  font-size:10px!important;
  line-height:1!important;
  font-weight:900!important;
  letter-spacing:0!important;
}

html body .record-type-pill.manual{
  border-color:#c9eadf!important;
  background:#f2fbf7!important;
  color:#047857!important;
}

html body .main-history-location > span{
  display:grid!important;
  grid-template-columns:34px minmax(0,1fr)!important;
  gap:7px!important;
  align-items:start!important;
  margin:0 0 4px!important;
}

html body .main-history-location > span b{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:28px!important;
  min-width:28px!important;
  min-height:17px!important;
  padding:2px 4px!important;
  border-radius:5px!important;
  background:#e4fbf3!important;
  color:#047857!important;
  font-size:9px!important;
  line-height:1!important;
  font-weight:900!important;
  text-transform:uppercase!important;
}

html body .main-history-worked,
html body .main-history-pay{
  color:#061a33!important;
  font-size:13px!important;
  line-height:1.15!important;
  font-weight:900!important;
  white-space:nowrap!important;
}

html body .main-history-pay{
  color:#047857!important;
}

html body .main-history-edit-cell .ghost,
html body .main-history-map-links a{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:28px!important;
  min-width:42px!important;
  padding:4px 8px!important;
  border:1px solid #cfddeb!important;
  border-radius:5px!important;
  background:#fff!important;
  color:#0a3b7d!important;
  font-size:11px!important;
  line-height:1!important;
  font-weight:900!important;
  text-decoration:none!important;
}

html body .main-history-map-links{
  display:flex!important;
  align-items:center!important;
  gap:5px!important;
  flex-wrap:wrap!important;
}

@media (max-width:900px){
  html body .layout{
    padding-left:8px!important;
    padding-right:8px!important;
  }

  html body .history-panel{
    border-radius:14px!important;
    padding:12px!important;
    box-shadow:0 10px 25px rgba(15,23,42,.045)!important;
  }

  html body .history-panel > .section-title{
    gap:8px!important;
    margin:0 0 10px!important;
    padding:0 0 10px!important;
  }

  html body .history-panel > .section-title > span{
    gap:8px!important;
    justify-content:flex-start!important;
  }

  html body .history-panel .history-title-label{
    font-size:26px!important;
  }

  html body .history-panel .history-title-range{
    min-height:30px!important;
    padding:6px 12px!important;
    border-radius:999px!important;
    font-size:16px!important;
  }

  html body #copySummaryBtn{
    min-height:30px!important;
    padding:5px 8px!important;
    font-size:11px!important;
  }

  html body .history-total{
    gap:8px!important;
    margin:0 0 10px!important;
  }

  html body .history-total .history-total-item{
    min-height:68px!important;
    padding:11px 12px!important;
    border-radius:10px!important;
    font-size:11px!important;
  }

  html body .history-total .history-total-item strong{
    margin-top:6px!important;
    font-size:24px!important;
  }

  html body .history-subhead.combined-subhead{
    margin:4px 0 10px!important;
    padding-top:10px!important;
  }

  html body .history-subhead.combined-subhead span{
    font-size:22px!important;
  }

  html body .history-subhead.combined-subhead small{
    display:none!important;
  }

  html body #shiftList{
    gap:10px!important;
  }

  html body .history-date-group{
    border-radius:12px!important;
    box-shadow:none!important;
  }

  html body .history-date-title{
    padding:9px 11px!important;
    background:#f9fbfe!important;
  }

  html body .history-date-title strong{
    font-size:18px!important;
  }

  html body .history-date-title span{
    font-size:12px!important;
  }

  html body .main-history-table,
  html body .main-history-table thead,
  html body .main-history-table tbody,
  html body .main-history-table tr,
  html body .main-history-table th,
  html body .main-history-table td{
    min-width:0!important;
    width:100%!important;
    max-width:100%!important;
  }

  html body .main-history-table{
    display:block!important;
    table-layout:auto!important;
    background:transparent!important;
  }

  html body .main-history-table thead{
    display:none!important;
  }

  html body .main-history-table tbody{
    display:block!important;
  }

  html body .main-history-table tr{
    display:grid!important;
    grid-template-columns:minmax(58px,.45fr) minmax(0,1fr)!important;
    margin:0!important;
    border:0!important;
    border-left:3px solid #1792d4!important;
    border-radius:0!important;
    background:#fff!important;
    overflow:hidden!important;
  }

  html body .main-history-table tr + tr{
    border-top:7px solid #f3f7fb!important;
  }

  html body .main-history-table tr.manual-record{
    border-left-color:#0f8a72!important;
  }

  html body .main-history-table tr.excluded-from-total{
    border-left-color:#f59e0b!important;
  }

  html body .main-history-table th:nth-child(n),
  html body .main-history-table td:nth-child(n){
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }

  html body .main-history-table td{
    display:grid!important;
    grid-template-columns:minmax(76px,.34fr) minmax(0,1fr)!important;
    gap:7px!important;
    align-items:start!important;
    padding:8px 10px!important;
    border:0!important;
    border-bottom:1px solid #eef2f7!important;
    font-size:13px!important;
    line-height:1.25!important;
    background:#fff!important;
    white-space:normal!important;
    overflow:visible!important;
    word-break:normal!important;
    overflow-wrap:break-word!important;
  }

  html body .main-history-table td::before{
    content:attr(data-label)!important;
    grid-column:1!important;
    color:#66768a!important;
    font-size:11px!important;
    line-height:1.1!important;
    font-weight:900!important;
    text-transform:uppercase!important;
    letter-spacing:0!important;
  }

  html body .main-history-table td > *{
    grid-column:2!important;
    min-width:0!important;
  }

  html body .main-history-table td[data-label="#"]{
    display:none!important;
  }

  html body .main-history-table td:nth-child(2){
    grid-column:1!important;
    display:flex!important;
    align-items:center!important;
    padding:9px 10px 8px!important;
    border-bottom:1px solid #eef2f7!important;
  }

  html body .main-history-table td:nth-child(3){
    grid-column:2!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    padding:9px 10px 8px!important;
    border-bottom:1px solid #eef2f7!important;
    color:#07172d!important;
    font-size:16px!important;
    font-weight:900!important;
    line-height:1.15!important;
    white-space:nowrap!important;
    overflow-wrap:normal!important;
  }

  html body .main-history-table td:nth-child(2)::before,
  html body .main-history-table td:nth-child(3)::before{
    display:none!important;
  }

  html body .main-history-table td:nth-child(4){
    grid-column:1 / -1!important;
    background:#fcfdff!important;
  }

  html body .main-history-table td:nth-child(5){
    grid-column:1!important;
  }

  html body .main-history-table td:nth-child(6){
    grid-column:2!important;
  }

  html body .main-history-table td:nth-child(5),
  html body .main-history-table td:nth-child(6){
    display:grid!important;
    grid-template-columns:minmax(76px,.34fr) minmax(0,1fr)!important;
    align-items:center!important;
    padding-top:8px!important;
    padding-bottom:8px!important;
  }

  html body .main-history-table td:nth-child(7){
    grid-column:1 / -1!important;
  }

  html body .main-history-table td:nth-child(8),
  html body .main-history-table td:nth-child(9){
    grid-column:1 / -1!important;
    display:grid!important;
    grid-template-columns:minmax(76px,.34fr) minmax(0,1fr)!important;
    align-items:center!important;
  }

  html body .main-history-table td:nth-child(8){
    border-bottom:1px solid #eef2f7!important;
  }

  html body .main-history-table td:nth-child(9){
    border-bottom:0!important;
  }

  html body .record-type-pill{
    border:0!important;
    background:transparent!important;
    padding:0!important;
    color:#1455bc!important;
    font-size:13px!important;
  }

  html body .record-type-pill.manual{
    color:#047857!important;
  }

  html body .main-history-location{
    width:100%!important;
    min-width:0!important;
    font-size:14px!important;
    line-height:1.25!important;
  }

  html body .main-history-location > span{
    display:grid!important;
    grid-template-columns:40px minmax(0,1fr)!important;
    gap:8px!important;
    align-items:start!important;
    width:100%!important;
    max-width:100%!important;
    margin:0 0 6px!important;
  }

  html body .main-history-location > span b{
    width:36px!important;
    min-width:36px!important;
    min-height:22px!important;
    font-size:10px!important;
  }

  html body .main-history-worked,
  html body .main-history-pay{
    font-size:16px!important;
    line-height:1.1!important;
    white-space:nowrap!important;
  }

  html body .main-history-notes{
    color:#102033!important;
    font-size:14px!important;
  }

  html body .main-history-notes.is-ok-note,
  html body .main-history-notes.is-default-note{
    display:none!important;
  }

  html body .main-history-edit-cell .ghost,
  html body .main-history-map-links a{
    min-height:34px!important;
    min-width:64px!important;
    padding:6px 12px!important;
    border-radius:8px!important;
    background:#f8fbff!important;
    font-size:14px!important;
  }

  html body .main-history-map-links{
    justify-content:flex-start!important;
    gap:8px!important;
  }
}

@media (max-width:560px){
  html body .layout{
    padding-left:4px!important;
    padding-right:4px!important;
  }

  html body .history-panel{
    margin-left:0!important;
    margin-right:0!important;
    padding:10px 6px!important;
    border-left:0!important;
    border-right:0!important;
    border-radius:0!important;
    box-shadow:none!important;
  }

  html body .history-panel > .section-title{
    padding-left:2px!important;
    padding-right:2px!important;
  }

  html body .history-panel > .section-title > span{
    flex-wrap:wrap!important;
  }

  html body .history-panel .history-title-label{
    font-size:22px!important;
  }

  html body .history-panel .history-title-range{
    min-height:28px!important;
    padding:5px 10px!important;
    font-size:14px!important;
  }

  html body #copySummaryBtn{
    display:inline-flex!important;
    min-height:28px!important;
    padding:4px 7px!important;
    border-radius:7px!important;
    font-size:10px!important;
    white-space:nowrap!important;
  }

  html body .history-total{
    gap:6px!important;
    margin-bottom:10px!important;
  }

  html body .history-total .history-total-item{
    min-height:56px!important;
    padding:9px 10px!important;
    border-radius:9px!important;
    font-size:10px!important;
  }

  html body .history-total .history-total-item strong{
    margin-top:4px!important;
    font-size:19px!important;
  }

  html body .history-subhead.combined-subhead{
    padding-left:2px!important;
    padding-right:2px!important;
  }

  html body .history-subhead.combined-subhead span{
    font-size:21px!important;
  }

  html body .history-date-group{
    border-radius:10px!important;
  }

  html body .history-date-title{
    padding:8px 10px!important;
  }

  html body .history-date-title strong{
    font-size:17px!important;
  }

  html body .main-history-table tr{
    grid-template-columns:minmax(52px,.36fr) minmax(0,1fr)!important;
  }

  html body .main-history-table tr + tr{
    border-top-width:5px!important;
  }

  html body .main-history-table td{
    grid-template-columns:72px minmax(0,1fr)!important;
    padding:7px 9px!important;
    gap:6px!important;
  }

  html body .main-history-table td::before{
    font-size:10px!important;
  }

  html body .main-history-table td:nth-child(2),
  html body .main-history-table td:nth-child(3){
    padding-top:8px!important;
    padding-bottom:8px!important;
  }

  html body .main-history-table td:nth-child(3){
    font-size:15px!important;
  }

  html body .record-type-pill{
    font-size:12px!important;
  }

  html body .main-history-location{
    font-size:13px!important;
  }

  html body .main-history-location > span{
    grid-template-columns:36px minmax(0,1fr)!important;
    gap:7px!important;
    margin-bottom:5px!important;
  }

  html body .main-history-location > span b{
    width:32px!important;
    min-width:32px!important;
    min-height:20px!important;
    font-size:9px!important;
  }

  html body .main-history-worked,
  html body .main-history-pay{
    font-size:15px!important;
  }

  html body .main-history-edit-cell .ghost,
  html body .main-history-map-links a{
    min-height:32px!important;
    min-width:58px!important;
    padding:5px 10px!important;
    font-size:13px!important;
  }
}

@media (max-width:380px){
  html body .history-panel{
    padding-left:4px!important;
    padding-right:4px!important;
  }

  html body .history-total{
    grid-template-columns:1fr 1fr!important;
  }

  html body .history-total .history-total-item strong{
    font-size:17px!important;
  }

  html body .main-history-table td{
    grid-template-columns:66px minmax(0,1fr)!important;
    padding-left:7px!important;
    padding-right:7px!important;
  }
}

/* v74: Soft-delete shift audit actions. */
html body .main-history-edit-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:6px!important;
  flex-wrap:wrap!important;
}

html body .shift-delete-btn{
  border-color:#fed7d7!important;
  background:#fff7f7!important;
  color:#b42318!important;
}

html body .shift-delete-btn:hover{
  background:#fee4e2!important;
}

html body .shift-restore-btn{
  border-color:#bbf7d0!important;
  background:#f0fdf4!important;
  color:#047857!important;
}

html body .shift-restore-btn:hover{
  background:#dcfce7!important;
}

html body .main-history-row.deleted-from-history td{
  background:#fff7ed!important;
}

html body .main-history-row.deleted-from-history .record-type-pill,
html body .final-report-shift-card.is-deleted .final-report-type{
  border-color:#fed7aa!important;
  background:#fff7ed!important;
  color:#c2410c!important;
}

html body .final-report-shift-card.is-deleted{
  border-left-color:#f97316!important;
  background:#fffaf4!important;
}

@media(max-width:900px){
  html body .main-history-edit-actions{
    grid-column:2!important;
  }
}

/* v77: lighter, clearer dashboard pay/time summary */
html body .summary-panel .total-amount-card,
html body .total-amount-card{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:6px!important;
  align-items:stretch!important;
  margin:8px 0 10px!important;
  padding:0!important;
  min-height:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}

html body .summary-panel .total-amount-meta,
html body .total-amount-meta{
  display:contents!important;
}

html body .summary-panel .total-amount-card > div:first-child,
html body .summary-panel .total-amount-meta > span,
html body .total-amount-card > div:first-child,
html body .total-amount-meta > span{
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:center!important;
  gap:4px!important;
  min-width:0!important;
  min-height:48px!important;
  padding:8px 10px!important;
  border:1px solid #dde7f1!important;
  border-left:2px solid #8ac4f0!important;
  border-radius:6px!important;
  background:#ffffff!important;
  text-align:left!important;
  box-shadow:none!important;
}

html body .summary-panel .total-amount-card span,
html body .summary-panel .total-amount-meta > span,
html body .total-amount-card span,
html body .total-amount-meta > span{
  margin:0!important;
  color:#65758b!important;
  font-size:10.5px!important;
  line-height:1.15!important;
  font-weight:800!important;
  text-transform:none!important;
  letter-spacing:0!important;
}

html body .summary-panel .total-amount-card strong,
html body .summary-panel .total-amount-meta strong,
html body .total-amount-card strong,
html body .total-amount-meta strong{
  display:block!important;
  margin:0!important;
  color:#07172b!important;
  font-size:18px!important;
  line-height:1.05!important;
  font-weight:850!important;
  letter-spacing:0!important;
  text-transform:none!important;
  white-space:nowrap!important;
}

html body .summary-panel .total-amount-meta > span:nth-child(2),
html body .total-amount-meta > span:nth-child(2){
  border-left-color:#76c6b1!important;
}

html body .summary-panel .total-amount-meta > span:nth-child(3),
html body .total-amount-meta > span:nth-child(3){
  border-left-color:#f2c27c!important;
}

@media(max-width:760px){
  html body .summary-panel .total-amount-card,
  html body .total-amount-card{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
    margin:7px 0 9px!important;
  }

  html body .summary-panel .total-amount-card > div:first-child,
  html body .summary-panel .total-amount-meta > span,
  html body .total-amount-card > div:first-child,
  html body .total-amount-meta > span{
    min-height:46px!important;
    padding:7px 9px!important;
  }

  html body .summary-panel .total-amount-card strong,
  html body .summary-panel .total-amount-meta strong,
  html body .total-amount-card strong,
  html body .total-amount-meta strong{
    font-size:17px!important;
  }
}

@media(max-width:330px){
  html body .summary-panel .total-amount-card,
  html body .total-amount-card{
    grid-template-columns:1fr!important;
  }
}

/* v78: compact mobile work records */
@media(max-width:760px){
  html body .history-panel{
    padding-top:8px!important;
    padding-bottom:8px!important;
  }

  html body .history-subhead.auto-subhead.combined-subhead{
    margin:0 0 5px!important;
    padding:3px 0!important;
  }

  html body .history-date-group{
    margin:0 0 8px!important;
    border-radius:7px!important;
    overflow:hidden!important;
  }

  html body .history-date-title{
    min-height:32px!important;
    padding:6px 9px!important;
    border-radius:0!important;
  }

  html body .history-date-title strong{
    font-size:16px!important;
    line-height:1.05!important;
  }

  html body .history-date-title span{
    font-size:11px!important;
  }

  html body .main-history-table,
  html body .main-history-table tbody{
    display:block!important;
    width:100%!important;
  }

  html body .main-history-table tr{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:0!important;
    margin:0!important;
    border:0!important;
    border-left:3px solid #1595e8!important;
    border-radius:0!important;
    background:#fff!important;
    box-shadow:none!important;
    overflow:hidden!important;
  }

  html body .main-history-table tr + tr{
    border-top:5px solid #f3f7fb!important;
  }

  html body .main-history-table td{
    display:grid!important;
    grid-template-columns:72px minmax(0,1fr)!important;
    align-items:center!important;
    gap:6px!important;
    min-height:0!important;
    width:auto!important;
    max-width:100%!important;
    padding:5px 8px!important;
    border:0!important;
    border-bottom:1px solid #edf2f7!important;
    background:#fff!important;
    color:#0f172a!important;
    font-size:12px!important;
    line-height:1.2!important;
    white-space:normal!important;
    overflow:visible!important;
  }

  html body .main-history-table td::before{
    content:attr(data-label)!important;
    color:#64748b!important;
    font-size:9px!important;
    line-height:1.05!important;
    font-weight:850!important;
    text-transform:uppercase!important;
    letter-spacing:0!important;
  }

  html body .main-history-table td[data-label="#"]{
    display:none!important;
  }

  html body .main-history-table td:nth-child(2){
    grid-column:1!important;
    grid-row:1!important;
    display:flex!important;
    align-items:center!important;
    padding:7px 8px 4px!important;
    border-bottom:1px solid #edf2f7!important;
  }

  html body .main-history-table td:nth-child(3){
    grid-column:2!important;
    grid-row:1!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    padding:7px 8px 4px!important;
    border-bottom:1px solid #edf2f7!important;
    font-size:14px!important;
    font-weight:850!important;
    line-height:1.1!important;
    white-space:nowrap!important;
  }

  html body .main-history-table td:nth-child(2)::before,
  html body .main-history-table td:nth-child(3)::before{
    display:none!important;
  }

  html body .record-type-pill{
    min-height:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    padding:0!important;
    color:#155bd6!important;
    font-size:11px!important;
    line-height:1.1!important;
    font-weight:850!important;
  }

  html body .record-type-pill.manual{
    color:#047857!important;
  }

  html body .main-history-table td:nth-child(4){
    grid-column:1 / -1!important;
    grid-row:2!important;
    padding-top:5px!important;
    padding-bottom:5px!important;
    background:#fcfdff!important;
  }

  html body .main-history-location{
    font-size:12px!important;
    line-height:1.18!important;
  }

  html body .main-history-location > span{
    display:grid!important;
    grid-template-columns:34px minmax(0,1fr)!important;
    gap:7px!important;
    align-items:center!important;
    margin:0 0 3px!important;
  }

  html body .main-history-location > span:last-child{
    margin-bottom:0!important;
  }

  html body .main-history-location > span b{
    width:30px!important;
    min-width:30px!important;
    min-height:18px!important;
    padding:1px 4px!important;
    border-radius:4px!important;
    font-size:8px!important;
    line-height:1!important;
  }

  html body .main-history-table td:nth-child(5),
  html body .main-history-table td:nth-child(6){
    grid-row:3!important;
    display:flex!important;
    align-items:center!important;
    gap:7px!important;
    padding-top:6px!important;
    padding-bottom:6px!important;
    font-size:13px!important;
    line-height:1.1!important;
  }

  html body .main-history-table td:nth-child(5){
    grid-column:1!important;
    padding-right:4px!important;
  }

  html body .main-history-table td:nth-child(6){
    grid-column:2!important;
    padding-left:4px!important;
  }

  html body .main-history-table td:nth-child(5)::before,
  html body .main-history-table td:nth-child(6)::before{
    flex:0 0 auto!important;
    min-width:auto!important;
  }

  html body .main-history-worked,
  html body .main-history-pay{
    font-size:13px!important;
    font-weight:850!important;
    white-space:nowrap!important;
  }

  html body .main-history-worked small,
  html body .main-history-pay small{
    display:block!important;
    margin-top:1px!important;
    font-size:9px!important;
    line-height:1!important;
  }

  html body .main-history-table td:nth-child(7){
    grid-column:1 / -1!important;
    grid-row:4!important;
    display:flex!important;
    align-items:flex-start!important;
    gap:10px!important;
    padding-top:6px!important;
    padding-bottom:6px!important;
  }

  html body .main-history-notes{
    font-size:12px!important;
    line-height:1.2!important;
  }

  html body .main-history-notes.is-ok-note,
  html body .main-history-notes.is-default-note{
    display:none!important;
  }

  html body .main-history-table td:nth-child(8),
  html body .main-history-table td:nth-child(9){
    grid-row:5!important;
    display:flex!important;
    align-items:center!important;
    gap:7px!important;
    padding-top:6px!important;
    padding-bottom:7px!important;
    border-bottom:0!important;
  }

  html body .main-history-table td:nth-child(8){
    grid-column:1 / 2!important;
  }

  html body .main-history-table td:nth-child(9){
    grid-column:2 / -1!important;
  }

  html body .main-history-map-links:empty{
    display:none!important;
  }

  html body .main-history-edit-actions{
    grid-column:auto!important;
    gap:5px!important;
  }

  html body .main-history-edit-cell .ghost,
  html body .main-history-map-links a{
    min-height:28px!important;
    min-width:48px!important;
    padding:4px 9px!important;
    border-radius:6px!important;
    font-size:12px!important;
    line-height:1.1!important;
  }
}

@media(max-width:420px){
  html body .main-history-table tr{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  html body .main-history-table td{
    grid-template-columns:64px minmax(0,1fr)!important;
    padding-left:7px!important;
    padding-right:7px!important;
  }

  html body .main-history-table td:nth-child(3){
    font-size:13px!important;
  }

  html body .main-history-worked,
  html body .main-history-pay{
    font-size:12px!important;
  }
}

/* v79: clearer three-card dashboard summary */
html body .summary-panel .total-amount-card,
html body .total-amount-card{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}

html body .summary-panel .total-amount-card > div:first-child,
html body .summary-panel .total-amount-meta > span,
html body .total-amount-card > div:first-child,
html body .total-amount-meta > span{
  min-height:44px!important;
  padding:7px 9px!important;
}

html body .summary-panel .total-amount-card span,
html body .summary-panel .total-amount-meta > span,
html body .total-amount-card span,
html body .total-amount-meta > span{
  font-size:10px!important;
}

html body .summary-panel .total-amount-card strong,
html body .summary-panel .total-amount-meta strong,
html body .total-amount-card strong,
html body .total-amount-meta strong{
  font-size:16px!important;
}

html body .summary-panel .total-amount-meta > span:nth-child(2),
html body .total-amount-meta > span:nth-child(2){
  border-left-color:#f2c27c!important;
}

@media(max-width:760px){
  html body .summary-panel .total-amount-card,
  html body .total-amount-card{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:5px!important;
  }
}

@media(max-width:360px){
  html body .summary-panel .total-amount-card,
  html body .total-amount-card{
    grid-template-columns:1fr!important;
  }
}

/* v82: compact footer with slightly larger brand icon */
html body .product-footer.compact-brand-footer{
  margin:8px auto 0!important;
  padding:6px 10px 8px!important;
  min-height:0!important;
  border-top:1px solid #e6edf5!important;
  background:#fff!important;
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  text-align:left!important;
}

html body .product-footer.compact-brand-footer .footer-brand-logo,
html body .footer-brand-logo{
  width:28px!important;
  height:28px!important;
  min-width:28px!important;
  object-fit:contain!important;
  border-radius:5px!important;
  padding:2px!important;
}

html body .product-footer.compact-brand-footer .footer-brand-copy{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex-wrap:wrap!important;
  gap:2px 7px!important;
  color:#64748b!important;
  font-size:10.5px!important;
  line-height:1.15!important;
}

html body .product-footer.compact-brand-footer .footer-brand-copy strong,
html body .product-footer.compact-brand-footer .footer-brand-copy span,
html body .product-footer.compact-brand-footer .footer-brand-copy a{
  margin:0!important;
  font-size:10.5px!important;
  line-height:1.15!important;
}

html body .product-footer.compact-brand-footer .footer-brand-copy strong{
  color:#334155!important;
  font-weight:800!important;
}

@media(max-width:520px){
  html body .product-footer.compact-brand-footer{
    padding:5px 8px 7px!important;
    gap:6px!important;
  }

  html body .product-footer.compact-brand-footer .footer-brand-logo,
  html body .footer-brand-logo{
    width:26px!important;
    height:26px!important;
    min-width:26px!important;
  }

  html body .product-footer.compact-brand-footer .footer-brand-copy{
    justify-content:flex-start!important;
    gap:1px 6px!important;
    font-size:10px!important;
  }

  html body .product-footer.compact-brand-footer .footer-brand-copy strong,
  html body .product-footer.compact-brand-footer .footer-brand-copy span,
  html body .product-footer.compact-brand-footer .footer-brand-copy a{
    font-size:10px!important;
  }
}

/* v83: remove main copy button and return mobile records to compact scan cards */
html body #copySummaryBtn{
  display:none!important;
}

@media(max-width:760px){
  html body .history-panel{
    padding:7px 4px!important;
  }

  html body .history-panel > .section-title{
    margin:0 0 6px!important;
    padding:0 2px 7px!important;
  }

  html body .history-panel > .section-title > span{
    justify-content:flex-start!important;
    gap:9px!important;
  }

  html body .history-panel .history-title-label{
    font-size:22px!important;
    line-height:1!important;
  }

  html body .history-panel .history-title-range{
    min-height:26px!important;
    padding:4px 10px!important;
    border-radius:999px!important;
    font-size:14px!important;
  }

  html body .history-total{
    gap:5px!important;
    margin:3px 0 6px!important;
    padding:0 2px!important;
  }

  html body .history-total .history-total-item{
    min-height:34px!important;
    padding:5px 6px!important;
    border-radius:4px!important;
    font-size:9px!important;
  }

  html body .history-total .history-total-item strong{
    font-size:14px!important;
  }

  html body .history-subhead.combined-subhead{
    margin:7px 0 6px!important;
    padding:0 2px 5px!important;
    border-bottom:2px solid #188ee4!important;
  }

  html body .history-subhead.combined-subhead span{
    font-size:21px!important;
    line-height:1.05!important;
  }

  html body #shiftList{
    gap:7px!important;
  }

  html body .history-date-group{
    margin:0 0 7px!important;
    border:1px solid #dbe7f1!important;
    border-radius:5px!important;
    box-shadow:none!important;
  }

  html body .history-date-title{
    padding:5px 8px!important;
    background:#fbfdff!important;
  }

  html body .history-date-title strong{
    font-size:16px!important;
  }

  html body .history-date-title span{
    font-size:11px!important;
  }

  html body .main-history-table tr{
    display:grid!important;
    grid-template-columns:92px minmax(0,1fr)!important;
    border-left:3px solid #168fe3!important;
    background:#fff!important;
  }

  html body .main-history-table tr + tr{
    border-top:4px solid #eef4f9!important;
  }

  html body .main-history-table td{
    padding:5px 8px!important;
    min-height:0!important;
    font-size:12px!important;
    line-height:1.16!important;
  }

  html body .main-history-table td::before{
    color:#64748b!important;
    font-size:9px!important;
    line-height:1!important;
    font-weight:900!important;
  }

  html body .main-history-table td[data-label="#"]{
    display:none!important;
  }

  html body .main-history-table td:nth-child(2){
    grid-column:1!important;
    grid-row:1!important;
    display:flex!important;
    align-items:center!important;
    border-bottom:1px solid #edf2f7!important;
  }

  html body .main-history-table td:nth-child(3){
    grid-column:2!important;
    grid-row:1!important;
    display:flex!important;
    align-items:center!important;
    border-bottom:1px solid #edf2f7!important;
    font-size:15px!important;
    font-weight:900!important;
    white-space:nowrap!important;
  }

  html body .main-history-table td:nth-child(2)::before,
  html body .main-history-table td:nth-child(3)::before{
    display:none!important;
  }

  html body .record-type-pill{
    border:0!important;
    background:transparent!important;
    padding:0!important;
    color:#155bd6!important;
    font-size:12px!important;
    font-weight:900!important;
  }

  html body .record-type-pill.manual{
    color:#047857!important;
  }

  html body .main-history-table td:nth-child(4){
    grid-column:1 / -1!important;
    grid-row:2!important;
    padding-top:5px!important;
    padding-bottom:5px!important;
    background:#fcfdff!important;
  }

  html body .main-history-location{
    font-size:12px!important;
    line-height:1.18!important;
  }

  html body .main-history-location > span{
    display:grid!important;
    grid-template-columns:34px minmax(0,1fr)!important;
    gap:7px!important;
    align-items:center!important;
    margin:0 0 3px!important;
  }

  html body .main-history-location > span b{
    width:30px!important;
    min-width:30px!important;
    min-height:18px!important;
    padding:2px 4px!important;
    border-radius:4px!important;
    font-size:8px!important;
  }

  html body .main-history-table td:nth-child(5),
  html body .main-history-table td:nth-child(6){
    grid-row:3!important;
    display:flex!important;
    align-items:center!important;
    gap:6px!important;
    padding-top:5px!important;
    padding-bottom:5px!important;
  }

  html body .main-history-table td:nth-child(5){
    grid-column:1!important;
  }

  html body .main-history-table td:nth-child(6){
    grid-column:2!important;
    justify-content:flex-end!important;
  }

  html body .main-history-worked,
  html body .main-history-pay{
    font-size:13px!important;
    font-weight:900!important;
    line-height:1!important;
    white-space:nowrap!important;
  }

  html body .main-history-notes.is-ok-note,
  html body .main-history-notes.is-default-note{
    display:none!important;
  }

  html body .main-history-table td:nth-child(7){
    grid-column:1 / -1!important;
    grid-row:4!important;
    padding-top:5px!important;
    padding-bottom:5px!important;
  }

  html body .main-history-table td:nth-child(8),
  html body .main-history-table td:nth-child(9){
    grid-row:5!important;
    display:flex!important;
    align-items:center!important;
    gap:5px!important;
    padding-top:5px!important;
    padding-bottom:6px!important;
    border-bottom:0!important;
  }

  html body .main-history-table td:nth-child(8){
    grid-column:1!important;
  }

  html body .main-history-table td:nth-child(9){
    grid-column:2!important;
    justify-content:flex-end!important;
  }

  html body .main-history-table td:nth-child(8)::before,
  html body .main-history-table td:nth-child(9)::before{
    display:none!important;
  }

  html body .main-history-edit-actions{
    gap:4px!important;
    flex-wrap:nowrap!important;
  }

  html body .main-history-edit-cell .ghost,
  html body .main-history-map-links a{
    min-height:27px!important;
    min-width:44px!important;
    padding:4px 8px!important;
    border-radius:5px!important;
    font-size:12px!important;
    line-height:1!important;
  }

  html body .shift-delete-btn{
    min-width:50px!important;
  }

  html body .main-history-map-links{
    gap:5px!important;
    flex-wrap:nowrap!important;
  }
}

@media(max-width:380px){
  html body .main-history-table tr{
    grid-template-columns:84px minmax(0,1fr)!important;
  }

  html body .main-history-table td{
    padding-left:6px!important;
    padding-right:6px!important;
  }

  html body .main-history-table td:nth-child(3){
    font-size:13px!important;
  }

  html body .main-history-location{
    font-size:11px!important;
  }
}

/* v84: cleaner compact Work Records cards */
@media(max-width:760px){
  html body .history-panel{
    padding:8px 6px!important;
    background:#fff!important;
  }

  html body .history-subhead.combined-subhead{
    margin:8px 0 7px!important;
    padding:0 0 5px!important;
    border-bottom:2px solid #1b8fe6!important;
  }

  html body .history-subhead.combined-subhead span{
    font-size:18px!important;
    color:#073b78!important;
  }

  html body #shiftList{
    gap:8px!important;
  }

  html body .history-date-group{
    border:1px solid #dce8f2!important;
    border-radius:6px!important;
    background:#fff!important;
    overflow:hidden!important;
  }

  html body .history-date-title{
    padding:7px 9px!important;
    border-bottom:1px solid #e6edf5!important;
    background:#fbfdff!important;
  }

  html body .history-date-title strong{
    font-size:16px!important;
    line-height:1.1!important;
  }

  html body .history-date-title span{
    font-size:11px!important;
    color:#0c4477!important;
  }

  html body .main-history-table tr{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    border-left:3px solid #1595e8!important;
    background:#fff!important;
  }

  html body .main-history-table tr.manual-record{
    border-left-color:#0f8a72!important;
  }

  html body .main-history-table tr + tr{
    border-top:5px solid #f2f6fa!important;
  }

  html body .main-history-table td{
    min-width:0!important;
    padding:6px 9px!important;
    border-bottom:1px solid #edf2f7!important;
    background:#fff!important;
    font-size:13px!important;
    line-height:1.2!important;
  }

  html body .main-history-table td::before{
    display:block!important;
    margin:0 0 3px!important;
    color:#68778b!important;
    font-size:9px!important;
    line-height:1!important;
    font-weight:900!important;
    text-transform:uppercase!important;
  }

  html body .main-history-table td[data-label="#"]{
    display:none!important;
  }

  html body .main-history-table td:nth-child(2),
  html body .main-history-table td:nth-child(3){
    grid-row:1!important;
    display:flex!important;
    align-items:center!important;
    min-height:36px!important;
    padding-top:7px!important;
    padding-bottom:7px!important;
  }

  html body .main-history-table td:nth-child(2){
    grid-column:1!important;
  }

  html body .main-history-table td:nth-child(3){
    grid-column:2!important;
    justify-content:flex-start!important;
    color:#07172d!important;
    font-size:15px!important;
    font-weight:900!important;
    white-space:nowrap!important;
  }

  html body .main-history-table td:nth-child(2)::before,
  html body .main-history-table td:nth-child(3)::before{
    display:none!important;
  }

  html body .record-type-pill{
    border:0!important;
    background:transparent!important;
    padding:0!important;
    color:#155bd6!important;
    font-size:12px!important;
    font-weight:900!important;
  }

  html body .record-type-pill.manual{
    color:#047857!important;
  }

  html body .main-history-table td:nth-child(4){
    grid-column:1 / -1!important;
    grid-row:2!important;
    padding-top:6px!important;
    padding-bottom:6px!important;
    background:#fcfdff!important;
  }

  html body .main-history-location{
    font-size:13px!important;
    line-height:1.2!important;
  }

  html body .main-history-location > span{
    display:grid!important;
    grid-template-columns:34px minmax(0,1fr)!important;
    gap:7px!important;
    align-items:center!important;
    margin:0 0 4px!important;
  }

  html body .main-history-location > span:last-child{
    margin-bottom:0!important;
  }

  html body .main-history-location > span b{
    width:30px!important;
    min-width:30px!important;
    min-height:18px!important;
    padding:2px 4px!important;
    border-radius:4px!important;
    background:#e8fbf5!important;
    color:#047857!important;
    font-size:8px!important;
    line-height:1!important;
  }

  html body .main-history-table td:nth-child(5),
  html body .main-history-table td:nth-child(6){
    grid-row:3!important;
    display:flex!important;
    align-items:baseline!important;
    gap:7px!important;
    min-height:35px!important;
    padding-top:7px!important;
    padding-bottom:7px!important;
  }

  html body .main-history-table td:nth-child(5){
    grid-column:1!important;
  }

  html body .main-history-table td:nth-child(6){
    grid-column:2!important;
    justify-content:flex-end!important;
  }

  html body .main-history-table td:nth-child(5)::before,
  html body .main-history-table td:nth-child(6)::before{
    margin:0!important;
    flex:0 0 auto!important;
  }

  html body .main-history-worked,
  html body .main-history-pay{
    font-size:15px!important;
    font-weight:900!important;
    line-height:1!important;
    white-space:nowrap!important;
  }

  html body .main-history-pay{
    color:#047857!important;
  }

  html body .main-history-notes.is-ok-note,
  html body .main-history-notes.is-default-note{
    display:none!important;
  }

  html body .main-history-table td:nth-child(7){
    grid-column:1 / -1!important;
    grid-row:4!important;
    padding-top:6px!important;
    padding-bottom:6px!important;
    color:#334155!important;
    font-size:12px!important;
  }

  html body .main-history-table td:nth-child(7):empty{
    display:none!important;
  }

  html body .main-history-table td:nth-child(8),
  html body .main-history-table td:nth-child(9){
    grid-row:5!important;
    display:flex!important;
    align-items:center!important;
    gap:6px!important;
    min-height:38px!important;
    padding-top:6px!important;
    padding-bottom:7px!important;
    border-bottom:0!important;
  }

  html body .main-history-table td:nth-child(8){
    grid-column:1!important;
  }

  html body .main-history-table td:nth-child(9){
    grid-column:2!important;
    justify-content:flex-end!important;
  }

  html body .main-history-table td:nth-child(8)::before,
  html body .main-history-table td:nth-child(9)::before{
    display:none!important;
  }

  html body .main-history-edit-actions{
    display:flex!important;
    align-items:center!important;
    gap:6px!important;
    flex-wrap:nowrap!important;
  }

  html body .main-history-edit-cell .ghost,
  html body .main-history-map-links a{
    min-height:30px!important;
    min-width:52px!important;
    padding:5px 10px!important;
    border-radius:5px!important;
    font-size:12px!important;
    line-height:1!important;
    background:#fff!important;
  }

  html body .shift-delete-btn{
    min-width:58px!important;
  }

  html body .main-history-map-links{
    display:flex!important;
    justify-content:flex-end!important;
    gap:6px!important;
    flex-wrap:nowrap!important;
  }
}

@media(max-width:380px){
  html body .main-history-table td:nth-child(3){
    font-size:14px!important;
  }

  html body .main-history-worked,
  html body .main-history-pay{
    font-size:14px!important;
  }

  html body .main-history-edit-cell .ghost,
  html body .main-history-map-links a{
    min-width:48px!important;
    padding-left:8px!important;
    padding-right:8px!important;
  }

  html body .shift-delete-btn{
    min-width:54px!important;
  }
}

/* v85: match the preferred mobile Work Records reference */
@media(max-width:760px){
  html body .main-history-table td:nth-child(4){
    display:block!important;
    grid-column:1 / -1!important;
    grid-row:2!important;
    padding:7px 10px!important;
    background:#fcfdff!important;
  }

  html body .main-history-table td:nth-child(4)::before{
    display:block!important;
    margin:0 0 5px!important;
  }

  html body .main-history-location{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    font-size:13px!important;
    line-height:1.2!important;
  }

  html body .main-history-location > span{
    display:grid!important;
    grid-template-columns:44px minmax(0,1fr)!important;
    gap:8px!important;
    align-items:center!important;
    margin:0 0 4px!important;
  }

  html body .main-history-location > span b{
    width:34px!important;
    min-width:34px!important;
    min-height:20px!important;
  }

  html body .main-history-table td.main-history-notes.is-ok-note,
  html body .main-history-table td.main-history-notes.is-default-note{
    display:none!important;
  }

  html body .main-history-edit-actions .shift-delete-btn{
    display:none!important;
  }

  html body .main-history-table td:nth-child(8),
  html body .main-history-table td:nth-child(9){
    grid-row:4!important;
    min-height:44px!important;
    padding-top:8px!important;
    padding-bottom:9px!important;
  }

  html body .main-history-table td:nth-child(8){
    grid-column:1!important;
    justify-content:flex-start!important;
  }

  html body .main-history-table td:nth-child(9){
    grid-column:2!important;
    justify-content:flex-end!important;
  }

  html body .main-history-edit-cell .ghost,
  html body .main-history-map-links a{
    min-height:36px!important;
    min-width:64px!important;
    padding:7px 12px!important;
    border-radius:6px!important;
    font-size:13px!important;
  }
}

@media(max-width:380px){
  html body .main-history-location{
    font-size:12px!important;
  }

  html body .main-history-edit-cell .ghost,
  html body .main-history-map-links a{
    min-width:58px!important;
    padding-left:10px!important;
    padding-right:10px!important;
  }
}

/* v86: keep Delete available in the compact mobile card */
@media(max-width:760px){
  html body .main-history-edit-actions .shift-delete-btn{
    display:inline-flex!important;
    min-width:58px!important;
    border-color:#f5c2c7!important;
    background:#fff!important;
    color:#a61b1b!important;
  }

  html body .main-history-edit-actions .shift-delete-btn:hover{
    background:#fff5f5!important;
  }
}

@media(max-width:380px){
  html body .main-history-edit-actions .shift-delete-btn{
    min-width:54px!important;
  }
}

/* v87: clean single divider under Work Records on mobile */
@media(max-width:760px){
  html body .history-subhead.combined-subhead{
    display:block!important;
    margin:8px 0 8px!important;
    padding:0 0 7px!important;
    border:0!important;
    border-bottom:0!important;
    background:transparent!important;
    line-height:1!important;
  }

  html body .history-subhead.combined-subhead::after{
    content:""!important;
    display:block!important;
    width:100%!important;
    height:2px!important;
    margin-top:5px!important;
    border-radius:999px!important;
    background:#1589e8!important;
  }

  html body .history-subhead.combined-subhead span{
    display:block!important;
    margin:0!important;
    padding:0!important;
    color:#073b78!important;
    font-size:18px!important;
    line-height:1.05!important;
    font-weight:900!important;
  }

  html body .history-subhead.combined-subhead small{
    display:none!important;
  }
}

/* v88: remove old short title underline, keep only the long divider */
@media(max-width:760px){
  html body .history-subhead.auto-subhead.combined-subhead span::after,
  html body .history-subhead.combined-subhead span::after{
    content:none!important;
    display:none!important;
  }

  html body .history-subhead.auto-subhead.combined-subhead span,
  html body .history-subhead.combined-subhead span{
    border:0!important;
    border-bottom:0!important;
    box-shadow:none!important;
    text-decoration:none!important;
  }
}

/* v90: lighter report preview/print layout with visible brand footer */
html body #reportPreview .final-share-report,
html body .report-export-shell .final-share-report{
  background:#fff!important;
  border:1px solid #e3eaf3!important;
  border-radius:8px!important;
  box-shadow:0 10px 28px rgba(15,23,42,.06)!important;
  padding:14px!important;
}

html body #reportPreview .final-report-header,
html body .report-export-shell .final-report-header{
  margin-bottom:10px!important;
  padding-bottom:10px!important;
  border-bottom:1px solid #e7edf5!important;
}

html body #reportPreview .final-report-brand,
html body .report-export-shell .final-report-brand{
  grid-template-columns:42px minmax(0,1fr)!important;
  gap:10px!important;
}

html body #reportPreview .final-report-brand img,
html body .report-export-shell .final-report-brand img{
  width:40px!important;
  height:40px!important;
}

html body #reportPreview .final-report-brand h2,
html body .report-export-shell .final-report-brand h2{
  font-size:22px!important;
  line-height:1.02!important;
}

html body #reportPreview .final-report-identity,
html body #reportPreview .final-report-summary,
html body #reportPreview .final-report-pay-details,
html body #reportPreview .final-report-detail-grid > div,
html body .report-export-shell .final-report-identity,
html body .report-export-shell .final-report-summary,
html body .report-export-shell .final-report-pay-details,
html body .report-export-shell .final-report-detail-grid > div{
  gap:7px!important;
  margin-bottom:10px!important;
}

html body #reportPreview .final-report-identity > div,
html body #reportPreview .final-report-summary > div,
html body #reportPreview .final-report-pay-details > div,
html body #reportPreview .final-report-detail-grid > div > div,
html body .report-export-shell .final-report-identity > div,
html body .report-export-shell .final-report-summary > div,
html body .report-export-shell .final-report-pay-details > div,
html body .report-export-shell .final-report-detail-grid > div > div{
  padding:7px 8px!important;
  border-radius:6px!important;
  box-shadow:none!important;
}

html body #reportPreview .final-report-date-group,
html body .report-export-shell .final-report-date-group{
  margin-bottom:9px!important;
}

html body #reportPreview .final-report-date-group > header,
html body .report-export-shell .final-report-date-group > header{
  padding:7px 9px!important;
  border-radius:6px!important;
}

html body #reportPreview .final-report-shift-card,
html body .report-export-shell .final-report-shift-card{
  margin-bottom:6px!important;
  padding:7px 8px!important;
  border-radius:6px!important;
  box-shadow:none!important;
}

html body #reportPreview .final-report-footer,
html body .report-export-shell .final-report-footer{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  margin-top:7px!important;
  padding-top:6px!important;
  font-size:10px!important;
}

html body #reportPreview .final-report-footer img,
html body .report-export-shell .final-report-footer img{
  display:inline-block!important;
  visibility:visible!important;
  width:22px!important;
  height:22px!important;
  object-fit:contain!important;
}

html body #reportPreview .final-report-footer-copy,
html body .report-export-shell .final-report-footer-copy{
  display:block!important;
  text-align:left!important;
  line-height:1.05!important;
}

html body #reportPreview .final-report-footer-line,
html body .report-export-shell .final-report-footer-line{
  display:flex!important;
  align-items:baseline!important;
  gap:6px!important;
  flex-wrap:wrap!important;
  line-height:1.05!important;
}

html body #reportPreview .final-report-footer-copy strong,
html body .report-export-shell .final-report-footer-copy strong{
  color:#0f172a!important;
  font-size:9px!important;
  line-height:1.05!important;
  font-weight:900!important;
}

html body #reportPreview .final-report-footer-copy span,
html body .report-export-shell .final-report-footer-copy span{
  color:#334155!important;
  font-size:8px!important;
  line-height:1.05!important;
}

html body #reportPreview .final-report-footer-copy .footer-tm,
html body .report-export-shell .final-report-footer-copy .footer-tm{
  display:inline!important;
  color:inherit!important;
  font-size:.48em!important;
  font-weight:900!important;
  line-height:1!important;
  margin-left:1px!important;
  vertical-align:baseline!important;
  position:relative!important;
  top:-.08em!important;
}

html body #reportPreview .final-report-footer-site,
html body .report-export-shell .final-report-footer-site{
  display:block!important;
  color:#0f766e!important;
  font-weight:900!important;
  margin-top:1px!important;
}

@media print{
  html body .report-export-shell .final-share-report{
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    padding:0!important;
  }

  html body .report-export-shell .final-report-footer{
    break-inside:avoid!important;
    page-break-inside:avoid!important;
    margin-top:5px!important;
    padding-top:4px!important;
    font-size:7px!important;
    gap:4px!important;
  }

  html body .report-export-shell .final-report-footer img{
    width:16px!important;
    height:16px!important;
  }

  html body .report-export-shell .final-report-footer-copy strong{
    font-size:7px!important;
  }

  html body .report-export-shell .final-report-footer-copy span{
    font-size:6px!important;
  }

  html body .report-export-shell .final-report-footer-copy .footer-tm{
    font-size:.45em!important;
    top:-.05em!important;
  }
}

/* v91: compact printed report, keep normal two-week reports close to one page */
@media print{
  @page{
    size:letter landscape;
    margin:.22in;
  }

  html body .report-export-shell .final-report-extra-details,
  html body .report-export-shell .final-report-detail-grid,
  html body .report-export-shell .final-report-pay-details{
    display:none!important;
  }

  html body .report-export-shell .final-share-report{
    font-size:8px!important;
    line-height:1.08!important;
  }

  html body .report-export-shell .final-report-header{
    display:grid!important;
    grid-template-columns:1fr auto!important;
    gap:8px!important;
    margin-bottom:5px!important;
    padding-bottom:5px!important;
  }

  html body .report-export-shell .final-report-brand{
    grid-template-columns:28px minmax(0,1fr)!important;
    gap:7px!important;
  }

  html body .report-export-shell .final-report-brand img{
    width:28px!important;
    height:28px!important;
  }

  html body .report-export-shell .final-report-brand h2{
    font-size:16px!important;
    line-height:1!important;
  }

  html body .report-export-shell .final-report-brand p,
  html body .report-export-shell .final-report-generated span,
  html body .report-export-shell .final-report-generated strong{
    font-size:7px!important;
    line-height:1.05!important;
  }

  html body .report-export-shell .final-report-identity,
  html body .report-export-shell .final-report-summary{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:4px!important;
    margin-bottom:5px!important;
  }

  html body .report-export-shell .final-report-identity > div,
  html body .report-export-shell .final-report-summary > div{
    padding:3px 4px!important;
    min-height:0!important;
    border-radius:3px!important;
  }

  html body .report-export-shell .final-report-summary strong,
  html body .report-export-shell .final-report-identity strong{
    font-size:8px!important;
    line-height:1.05!important;
  }

  html body .report-export-shell .final-report-records h3{
    margin:3px 0 4px!important;
    font-size:10px!important;
  }

  html body .report-export-shell .final-report-date-group{
    margin-bottom:4px!important;
    break-inside:avoid!important;
    page-break-inside:avoid!important;
  }

  html body .report-export-shell .final-report-date-group > header{
    padding:3px 5px!important;
    font-size:8px!important;
    border-radius:3px!important;
  }

  html body .report-export-shell .final-report-shift-card{
    display:grid!important;
    grid-template-columns:130px minmax(0,1.6fr) minmax(0,1fr)!important;
    gap:3px 6px!important;
    margin-bottom:2px!important;
    padding:3px 5px!important;
    border-radius:3px!important;
    border-left-width:2px!important;
    break-inside:avoid!important;
    page-break-inside:avoid!important;
  }

  html body .report-export-shell .final-report-shift-top,
  html body .report-export-shell .final-report-location,
  html body .report-export-shell .final-report-shift-bottom{
    display:block!important;
    margin:0!important;
  }

  html body .report-export-shell .final-report-location > div,
  html body .report-export-shell .final-report-shift-bottom > div{
    display:block!important;
    margin:0 0 2px!important;
    padding:0!important;
  }

  html body .report-export-shell .final-report-location span,
  html body .report-export-shell .final-report-shift-bottom span,
  html body .report-export-shell .final-report-type,
  html body .report-export-shell .final-report-row-number{
    font-size:6px!important;
    line-height:1!important;
  }

  html body .report-export-shell .final-report-shift-top strong,
  html body .report-export-shell .final-report-location p,
  html body .report-export-shell .final-report-shift-bottom strong,
  html body .report-export-shell .final-report-notes p{
    font-size:7px!important;
    line-height:1.08!important;
  }

  html body .report-export-shell .final-report-links{
    display:none!important;
  }

  html body .report-export-shell .final-report-signature{
    margin-top:5px!important;
    padding-top:4px!important;
    font-size:7px!important;
  }
}

/* v99: keep one clear report action for mobile and desktop. */
html body #reportModal .report-toolbar{
  display:block!important;
  margin:4px 0 10px!important;
}

html body #reportModal .report-toolbar .report-share-print-btn{
  width:100%!important;
  min-height:36px!important;
  border-radius:4px!important;
  background:#0f8a63!important;
  border-color:#0f8a63!important;
  color:#fff!important;
  font-weight:800!important;
  text-align:center!important;
}

/* v100: group utility actions into one clean hamburger submenu. */
html body .sidebar-menu-list .sidebar-submenu{
  width:100%!important;
}

html body .sidebar-menu-list .sidebar-submenu summary{
  list-style:none!important;
  cursor:pointer!important;
  min-height:44px!important;
  padding:10px 14px!important;
  border:1px solid #d7e2ec!important;
  border-radius:8px!important;
  background:#f8fafc!important;
  color:#0f172a!important;
  font-weight:800!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
}

html body .sidebar-menu-list .sidebar-submenu summary::-webkit-details-marker{
  display:none!important;
}

html body .sidebar-menu-list .sidebar-submenu summary::after{
  content:"+"!important;
  font-size:18px!important;
  line-height:1!important;
  color:#0b2f55!important;
}

html body .sidebar-menu-list .sidebar-submenu[open] summary{
  background:#eef6ff!important;
  border-color:#b9d7f5!important;
}

html body .sidebar-menu-list .sidebar-submenu[open] summary::after{
  content:"-"!important;
}

html body .sidebar-menu-list .sidebar-submenu-list{
  display:grid!important;
  gap:6px!important;
  margin-top:6px!important;
  padding:6px!important;
  border:1px solid #e2e8f0!important;
  border-radius:8px!important;
  background:#ffffff!important;
}

html body .sidebar-menu-list .sidebar-submenu-list button,
html body .sidebar-menu-list .sidebar-submenu-list .file-label{
  min-height:38px!important;
  border-radius:6px!important;
  background:#ffffff!important;
  justify-content:flex-start!important;
}

/* v102: remove the visible box around the hamburger icon. */
html body .sidebar-toggle,
html body .sidebar-toggle:hover,
html body .sidebar-toggle:active{
  border:0!important;
  box-shadow:none!important;
  background:transparent!important;
}

html body .sidebar-toggle span:not(.sidebar-toggle-icon){
  display:none!important;
}

/* v103: softer, easier-to-read mobile dashboard and shift header. */
@media (max-width:760px){
  html body .summary-panel,
  html body .history-panel{
    background:#f8fbff!important;
    border-color:#e4edf7!important;
  }

  html body .summary-panel{
    padding:10px 8px!important;
  }

  html body .summary-panel .compact-range-card{
    padding:10px!important;
    margin:0 0 10px!important;
    border:1px solid #d9e6f3!important;
    border-radius:8px!important;
    background:#ffffff!important;
    box-shadow:0 1px 4px rgba(15,23,42,.04)!important;
  }

  html body .main-range-head{
    margin:0 0 8px!important;
  }

  html body .main-range-head strong{
    font-size:14px!important;
    color:#0b2f55!important;
    letter-spacing:0!important;
  }

  html body .compact-main-range-grid{
    gap:7px!important;
  }

  html body .compact-main-range-grid label{
    gap:4px!important;
  }

  html body .compact-main-range-grid label span{
    color:#334155!important;
    font-size:11px!important;
    font-weight:800!important;
  }

  html body .compact-main-range-grid select,
  html body .compact-main-range-grid input[type="date"]{
    min-height:34px!important;
    height:34px!important;
    border:1px solid #d5e2f0!important;
    border-radius:5px!important;
    background:#fbfdff!important;
    color:#0f172a!important;
    font-size:13px!important;
    box-shadow:none!important;
  }

  html body .compact-main-range-grid button{
    min-height:36px!important;
    height:36px!important;
    border:1px solid #bad6f5!important;
    border-radius:5px!important;
    background:#f4f9ff!important;
    color:#0b2f55!important;
    box-shadow:none!important;
  }

  html body .mobile-range-pager{
    gap:6px!important;
    margin-top:7px!important;
  }

  html body .mobile-range-pager #visibleRangeLabel{
    min-height:30px!important;
    padding:5px 7px!important;
    border:1px solid #d9e6f3!important;
    border-radius:5px!important;
    background:#f8fbff!important;
    color:#334155!important;
    font-size:11px!important;
    font-weight:800!important;
  }

  html body .mobile-range-pager button{
    min-height:34px!important;
    height:34px!important;
    border:1px solid #c9def5!important;
    border-radius:5px!important;
    background:#f4f9ff!important;
    color:#0b2f55!important;
    box-shadow:none!important;
  }

  html body .summary-panel .total-amount-card{
    gap:6px!important;
    padding:0!important;
    margin:7px 0 0!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }

  html body .summary-panel .total-amount-card > div:first-child,
  html body .summary-panel .total-amount-meta > span{
    min-height:47px!important;
    padding:6px 8px!important;
    border:1px solid #d9e6f3!important;
    border-radius:6px!important;
    background:#ffffff!important;
    box-shadow:0 1px 3px rgba(15,23,42,.035)!important;
  }

  html body .summary-panel .total-amount-card span,
  html body .summary-panel .total-amount-meta > span{
    color:#475569!important;
    font-size:9px!important;
    font-weight:800!important;
    letter-spacing:.02em!important;
  }

  html body .summary-panel .total-amount-card strong,
  html body .summary-panel .total-amount-meta strong{
    color:#0f172a!important;
    font-size:16px!important;
    line-height:1.05!important;
  }

  html body .history-panel{
    padding:10px 6px!important;
  }

  html body .history-panel > .section-title{
    padding:0 0 8px!important;
    margin:0 0 8px!important;
    border-bottom:1px solid #d9e6f3!important;
  }

  html body .history-panel .history-title-label{
    color:#0f172a!important;
    font-size:22px!important;
  }

  html body .history-panel .history-title-range{
    border-color:#cfe1f5!important;
    background:#f3f8ff!important;
    color:#0b2f55!important;
    box-shadow:none!important;
  }

  html body .history-total{
    gap:6px!important;
    margin:0 0 7px!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;
  }

  html body .history-total .history-total-item{
    border:1px solid #d9e6f3!important;
    border-radius:6px!important;
    background:#ffffff!important;
    box-shadow:0 1px 3px rgba(15,23,42,.035)!important;
  }
}

/* v104: clean DewanTech footer text in report preview, print, and shared PDF. */
html body #reportPreview .final-report-footer,
html body .report-export-shell .final-report-footer{
  align-items:center!important;
  justify-content:center!important;
  flex-wrap:nowrap!important;
  gap:7px!important;
  overflow:visible!important;
}

html body #reportPreview .final-report-footer-copy,
html body .report-export-shell .final-report-footer-copy{
  min-width:0!important;
  max-width:100%!important;
  line-height:1.16!important;
  overflow:visible!important;
}

html body #reportPreview .final-report-footer-line,
html body .report-export-shell .final-report-footer-line{
  align-items:center!important;
  column-gap:7px!important;
  row-gap:1px!important;
  flex-wrap:wrap!important;
  line-height:1.16!important;
  overflow:visible!important;
}

html body #reportPreview .final-report-footer-copy strong,
html body .report-export-shell .final-report-footer-copy strong{
  display:inline!important;
  white-space:nowrap!important;
  line-height:1.16!important;
}

html body #reportPreview .final-report-footer-copy .footer-tm,
html body .report-export-shell .final-report-footer-copy .footer-tm{
  display:inline!important;
  position:static!important;
  top:auto!important;
  transform:none!important;
  margin-left:0!important;
  color:inherit!important;
  font-size:.62em!important;
  font-weight:800!important;
  line-height:1!important;
  vertical-align:baseline!important;
  letter-spacing:0!important;
}

@media print{
  html body .report-export-shell .final-report-footer{
    gap:5px!important;
    overflow:visible!important;
  }

  html body .report-export-shell .final-report-footer-line{
    column-gap:5px!important;
    line-height:1.14!important;
  }

  html body .report-export-shell .final-report-footer-copy strong{
    font-size:7px!important;
    line-height:1.14!important;
  }

  html body .report-export-shell .final-report-footer-copy span{
    font-size:6.2px!important;
    line-height:1.14!important;
  }

  html body .report-export-shell .final-report-footer-copy .footer-tm{
    font-size:.62em!important;
    position:static!important;
    top:auto!important;
    vertical-align:baseline!important;
  }
}

/* v105: modern mobile-first Report Filter and Shift History polish. */
html body .summary-panel,
html body .history-panel{
  background:#f8fbff!important;
  border:1px solid #dce8f5!important;
  border-radius:16px!important;
  box-shadow:0 12px 32px rgba(15,23,42,.07)!important;
}

html body .summary-panel{
  display:grid!important;
  gap:12px!important;
}

html body .summary-panel > .section-title{
  margin:0!important;
  padding:0 0 4px!important;
  border:0!important;
}

html body .summary-panel > .section-title > span{
  color:#0f172a!important;
  font-size:18px!important;
  letter-spacing:0!important;
}

html body .summary-panel .main-range-card.compact-range-card{
  margin:0!important;
  padding:16px!important;
  border:1px solid #d9e6f3!important;
  border-radius:14px!important;
  background:#ffffff!important;
  box-shadow:0 8px 22px rgba(15,23,42,.055)!important;
}

html body .main-range-head{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:12px!important;
  margin:0 0 14px!important;
}

html body .main-range-head strong{
  color:#0b2f55!important;
  font-size:15px!important;
  font-weight:900!important;
  letter-spacing:0!important;
}

html body .main-range-head span{
  max-width:520px!important;
  color:#64748b!important;
  font-size:12px!important;
  line-height:1.4!important;
}

html body .compact-main-range-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(165px,1fr))!important;
  gap:10px!important;
  align-items:end!important;
}

html body .compact-main-range-grid label{
  display:grid!important;
  gap:5px!important;
  min-width:0!important;
}

html body .compact-main-range-grid label span{
  color:#536174!important;
  font-size:11px!important;
  font-weight:850!important;
  letter-spacing:.01em!important;
  text-transform:none!important;
}

html body .compact-main-range-grid select,
html body .compact-main-range-grid input[type="date"]{
  width:100%!important;
  height:40px!important;
  min-height:40px!important;
  padding:0 11px!important;
  border:1px solid #cfddeb!important;
  border-radius:9px!important;
  background:#fbfdff!important;
  color:#0f172a!important;
  font-size:13px!important;
  font-weight:650!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8)!important;
}

html body .compact-main-range-grid select:focus,
html body .compact-main-range-grid input[type="date"]:focus{
  border-color:#60a5fa!important;
  outline:2px solid rgba(96,165,250,.18)!important;
  outline-offset:1px!important;
}

html body .compact-main-range-grid #mainGenerateReportBtn{
  height:40px!important;
  min-height:40px!important;
  padding:0 16px!important;
  border:1px solid #0b6fb3!important;
  border-radius:9px!important;
  background:#0b7fc4!important;
  color:#ffffff!important;
  font-size:13px!important;
  font-weight:900!important;
  box-shadow:0 8px 16px rgba(14,116,184,.16)!important;
}

html body #mainRangeStatus{
  display:inline-flex!important;
  align-items:center!important;
  width:auto!important;
  max-width:100%!important;
  margin:12px 0 0!important;
  padding:6px 9px!important;
  border:1px solid #cfe0f1!important;
  border-radius:999px!important;
  background:#f5faff!important;
  color:#38536f!important;
  font-size:11px!important;
  font-weight:800!important;
  line-height:1.25!important;
  box-shadow:none!important;
}

html body .mobile-range-pager{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(180px,1.3fr) minmax(0,1fr)!important;
  gap:8px!important;
  align-items:center!important;
  margin:12px 0 0!important;
}

html body .mobile-range-pager button{
  height:39px!important;
  min-height:39px!important;
  padding:0 12px!important;
  border:1px solid #b9d6f4!important;
  border-radius:10px!important;
  background:#eef6ff!important;
  color:#0b3b66!important;
  font-size:12px!important;
  font-weight:900!important;
  box-shadow:0 6px 14px rgba(15,23,42,.05)!important;
}

html body .mobile-range-pager #visibleRangeLabel{
  min-height:39px!important;
  padding:8px 10px!important;
  border:1px solid #d7e5f3!important;
  border-radius:10px!important;
  background:#fbfdff!important;
  color:#334155!important;
  font-size:12px!important;
  font-weight:850!important;
  line-height:1.25!important;
  text-align:center!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
}

html body .summary-panel .total-amount-card{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:10px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}

html body .summary-panel .total-amount-meta{
  display:contents!important;
}

html body .summary-panel .total-amount-card > div:first-child,
html body .summary-panel .total-amount-meta > span{
  min-height:62px!important;
  padding:11px 12px!important;
  border:1px solid #dce8f5!important;
  border-radius:12px!important;
  background:#ffffff!important;
  box-shadow:0 7px 18px rgba(15,23,42,.045)!important;
}

html body .summary-panel .total-amount-card span,
html body .summary-panel .total-amount-meta > span{
  color:#607086!important;
  font-size:10px!important;
  font-weight:900!important;
  letter-spacing:.02em!important;
  line-height:1.2!important;
}

html body .summary-panel .total-amount-card strong,
html body .summary-panel .total-amount-meta strong{
  display:block!important;
  margin-top:5px!important;
  color:#0f172a!important;
  font-size:19px!important;
  line-height:1.05!important;
  letter-spacing:0!important;
}

html body .history-panel{
  display:grid!important;
  gap:10px!important;
}

html body .history-panel > .section-title{
  margin:0!important;
  padding:0 0 11px!important;
  border-bottom:1px solid #dbe7f3!important;
}

html body .history-panel > .section-title > span{
  width:100%!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:9px!important;
  flex-wrap:wrap!important;
  border:0!important;
}

html body .history-panel .history-title-label{
  color:#0f172a!important;
  font-size:24px!important;
  font-weight:950!important;
  line-height:1.05!important;
  letter-spacing:0!important;
}

html body .history-panel .history-title-range{
  display:inline-flex!important;
  align-items:center!important;
  min-height:30px!important;
  padding:5px 12px!important;
  border:1px solid #cfe0f4!important;
  border-radius:999px!important;
  background:#eef6ff!important;
  color:#0b4b7a!important;
  font-size:14px!important;
  font-weight:900!important;
  line-height:1!important;
  box-shadow:none!important;
}

html body .history-total{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}

html body .history-total .history-total-item{
  display:grid!important;
  gap:4px!important;
  min-height:58px!important;
  padding:10px 12px!important;
  border:1px solid #dce8f5!important;
  border-radius:12px!important;
  background:#ffffff!important;
  color:#607086!important;
  font-size:10px!important;
  font-weight:900!important;
  letter-spacing:.02em!important;
  box-shadow:0 7px 18px rgba(15,23,42,.045)!important;
}

html body .history-total .history-total-item strong{
  color:#0f172a!important;
  font-size:18px!important;
  line-height:1.05!important;
  letter-spacing:0!important;
}

html body .history-panel .shift-history-range-status{
  display:block!important;
  margin:-2px 0 0!important;
  padding:7px 9px!important;
  border:1px solid #d7e5f3!important;
  border-radius:10px!important;
  background:#ffffff!important;
  color:#536174!important;
  font-size:12px!important;
  font-weight:750!important;
  line-height:1.25!important;
}

html body .history-subhead.combined-subhead{
  margin:2px 0 0!important;
  padding:0 0 7px!important;
  border-bottom:2px solid #1e88d6!important;
  background:transparent!important;
}

html body .history-subhead.combined-subhead span{
  color:#0b4b7a!important;
  font-size:18px!important;
  font-weight:950!important;
}

@media (max-width:760px){
  html body .summary-panel,
  html body .history-panel{
    border-radius:14px!important;
    border-left:1px solid #dce8f5!important;
    border-right:1px solid #dce8f5!important;
    box-shadow:none!important;
  }

  html body .summary-panel{
    padding:12px 8px!important;
    gap:10px!important;
  }

  html body .summary-panel .main-range-card.compact-range-card{
    padding:12px!important;
    border-radius:12px!important;
  }

  html body .main-range-head{
    margin-bottom:10px!important;
  }

  html body .main-range-head span{
    display:none!important;
  }

  html body .compact-main-range-grid{
    grid-template-columns:1fr!important;
    gap:9px!important;
  }

  html body .compact-main-range-grid label,
  html body .compact-main-range-grid .main-custom-date,
  html body .compact-main-range-grid #mainGenerateReportBtn{
    grid-column:1 / -1!important;
    width:100%!important;
  }

  html body .compact-main-range-grid select,
  html body .compact-main-range-grid input[type="date"],
  html body .compact-main-range-grid #mainGenerateReportBtn{
    height:42px!important;
    min-height:42px!important;
    border-radius:10px!important;
  }

  html body #mainRangeStatus{
    display:flex!important;
    width:100%!important;
    justify-content:center!important;
    border-radius:10px!important;
    text-align:center!important;
  }

  html body .mobile-range-pager{
    grid-template-columns:1fr 1fr!important;
    gap:7px!important;
  }

  html body .mobile-range-pager #visibleRangeLabel{
    grid-column:1 / -1!important;
    grid-row:1!important;
    min-height:36px!important;
    order:-1!important;
  }

  html body .mobile-range-pager button{
    min-height:42px!important;
    height:42px!important;
  }

  html body .summary-panel .total-amount-card{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:7px!important;
  }

  html body .summary-panel .total-amount-card > div:first-child,
  html body .summary-panel .total-amount-meta > span{
    min-height:50px!important;
    padding:8px 9px!important;
    border-radius:8px!important;
  }

  html body .summary-panel .total-amount-card span,
  html body .summary-panel .total-amount-meta > span{
    font-size:9px!important;
  }

  html body .summary-panel .total-amount-card strong,
  html body .summary-panel .total-amount-meta strong{
    font-size:15px!important;
    margin-top:4px!important;
  }

  html body .history-panel{
    padding:12px 8px!important;
  }

  html body .history-panel > .section-title{
    padding-bottom:10px!important;
  }

  html body .history-panel .history-title-label{
    font-size:25px!important;
  }

  html body .history-panel .history-title-range{
    min-height:28px!important;
    padding:5px 11px!important;
    font-size:13px!important;
  }

  html body .history-total{
    gap:7px!important;
  }

  html body .history-total .history-total-item{
    min-height:50px!important;
    padding:8px 9px!important;
    border-radius:8px!important;
    font-size:9px!important;
  }

  html body .history-total .history-total-item strong{
    font-size:15px!important;
  }
}

@media (max-width:390px){
  html body .summary-panel .total-amount-card,
  html body .history-total{
    gap:6px!important;
  }

  html body .summary-panel .total-amount-card > div:first-child,
  html body .summary-panel .total-amount-meta > span,
  html body .history-total .history-total-item{
    padding:7px!important;
  }

  html body .summary-panel .total-amount-card strong,
  html body .summary-panel .total-amount-meta strong,
  html body .history-total .history-total-item strong{
    font-size:14px!important;
  }
}

/* v106: match the soft payroll dashboard reference for filter and history. */
html body{
  --v106-blue:#0d63df;
  --v106-blue-dark:#0b3f91;
  --v106-ink:#0b1b34;
  --v106-muted:#4d5b70;
  --v106-line:#d7e3f2;
  --v106-soft:#f5f9ff;
  --v106-green:#078a59;
  --v106-orange:#d85d00;
  --v106-filter-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%230d63df' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5h18l-7 8v5l-4 2v-7L3 5z'/%3E%3C/svg%3E");
  --v106-calendar-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2337465f' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v4M16 2v4M3 10h18M5 5h14a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2z'/%3E%3C/svg%3E");
  --v106-chevron-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%2337465f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --v106-refresh-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 0 1-15.5 6.2M3 12A9 9 0 0 1 18.5 5.8M18 3v5h-5M6 21v-5h5'/%3E%3C/svg%3E");
  --v106-clock-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 24 24' fill='none' stroke='%230d63df' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l4 2'/%3E%3C/svg%3E");
  --v106-wallet-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 24 24' fill='none' stroke='%23d85d00' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16v12H4z'/%3E%3Cpath d='M16 11h4v4h-4zM4 7l3-4h12'/%3E%3C/svg%3E");
}

html body .summary-panel{
  gap:18px!important;
  padding:22px!important;
  background:linear-gradient(180deg,#fbfdff 0%,#f4f9ff 100%)!important;
}

html body .summary-panel > .section-title{
  display:none!important;
}

html body .summary-panel .main-range-card.compact-range-card{
  order:1!important;
  padding:28px 32px!important;
  border:1px solid #e1eaf5!important;
  border-radius:22px!important;
  background:rgba(255,255,255,.92)!important;
  box-shadow:0 18px 44px rgba(15,23,42,.10)!important;
}

html body .main-range-head{
  display:grid!important;
  grid-template-columns:70px minmax(0,1fr)!important;
  align-items:center!important;
  gap:18px!important;
  margin:0 0 22px!important;
}

html body .main-range-head::before{
  content:""!important;
  width:66px!important;
  height:66px!important;
  border-radius:18px!important;
  background:#eaf2ff var(--v106-filter-icon) center / 32px 32px no-repeat!important;
  box-shadow:inset 0 0 0 1px rgba(13,99,223,.05)!important;
}

html body .main-range-head strong{
  color:var(--v106-ink)!important;
  font-size:34px!important;
  font-weight:900!important;
  line-height:1.05!important;
  letter-spacing:0!important;
}

html body .main-range-head span{
  display:none!important;
}

html body .compact-main-range-grid{
  grid-template-columns:1fr!important;
  gap:20px!important;
}

html body .compact-main-range-grid label{
  gap:10px!important;
}

html body .compact-main-range-grid label span{
  color:#42506a!important;
  font-size:20px!important;
  font-weight:750!important;
  letter-spacing:0!important;
}

html body .compact-main-range-grid select{
  height:64px!important;
  min-height:64px!important;
  padding:0 54px 0 78px!important;
  border:1px solid #c9d8eb!important;
  border-radius:13px!important;
  background-color:#ffffff!important;
  background-image:var(--v106-calendar-icon),var(--v106-chevron-icon)!important;
  background-position:28px center,calc(100% - 26px) center!important;
  background-size:25px 25px,22px 22px!important;
  background-repeat:no-repeat!important;
  color:var(--v106-ink)!important;
  font-size:23px!important;
  font-weight:650!important;
  appearance:none!important;
  box-shadow:0 3px 10px rgba(15,23,42,.025),inset 0 1px 0 rgba(255,255,255,.85)!important;
}

html body .compact-main-range-grid input[type="date"]{
  height:58px!important;
  min-height:58px!important;
  padding:0 18px!important;
  border:1px solid #c9d8eb!important;
  border-radius:13px!important;
  background:#ffffff!important;
  color:var(--v106-ink)!important;
  font-size:18px!important;
  font-weight:650!important;
}

html body .compact-main-range-grid #mainGenerateReportBtn{
  height:66px!important;
  min-height:66px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:14px!important;
  border:0!important;
  border-radius:13px!important;
  background:linear-gradient(135deg,#0b58df 0%,#0977ff 100%)!important;
  color:#ffffff!important;
  font-size:22px!important;
  font-weight:900!important;
  box-shadow:0 16px 26px rgba(13,99,223,.23)!important;
}

html body .compact-main-range-grid #mainGenerateReportBtn::before{
  content:""!important;
  width:25px!important;
  height:25px!important;
  flex:0 0 25px!important;
  background:var(--v106-refresh-icon) center / contain no-repeat!important;
}

html body #mainRangeStatus{
  position:relative!important;
  display:flex!important;
  align-items:center!important;
  width:100%!important;
  min-height:74px!important;
  margin:24px 0 0!important;
  padding:14px 18px 14px 84px!important;
  border:1px solid #d7e5f4!important;
  border-radius:15px!important;
  background:#fbfdff!important;
  color:#42506a!important;
  font-size:20px!important;
  font-weight:650!important;
  line-height:1.25!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85)!important;
}

html body #mainRangeStatus::before{
  content:""!important;
  position:absolute!important;
  left:26px!important;
  top:50%!important;
  width:44px!important;
  height:44px!important;
  transform:translateY(-50%)!important;
  border-radius:50%!important;
  background:#1f7cff var(--v106-calendar-icon) center / 24px 24px no-repeat!important;
  filter:saturate(1.15)!important;
}

html body .mobile-range-pager{
  grid-template-columns:1fr 1fr!important;
  gap:24px!important;
  margin:28px 0 0!important;
}

html body .mobile-range-pager #visibleRangeLabel{
  display:none!important;
}

html body .mobile-range-pager button{
  height:58px!important;
  min-height:58px!important;
  gap:12px!important;
  border:1px solid #c9d8eb!important;
  border-radius:12px!important;
  background:#ffffff!important;
  color:#0a55c7!important;
  font-size:18px!important;
  font-weight:850!important;
  box-shadow:0 8px 18px rgba(15,23,42,.045)!important;
}

html body #prevRangePageBtn::before{
  content:"<"!important;
  font-size:24px!important;
  line-height:1!important;
}

html body #nextRangePageBtn::after{
  content:">"!important;
  font-size:24px!important;
  line-height:1!important;
}

html body .summary-panel .total-amount-card{
  order:2!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:24px!important;
  margin:10px 0 0!important;
}

html body .summary-panel .total-amount-card > div:first-child,
html body .summary-panel .total-amount-meta > span{
  position:relative!important;
  display:grid!important;
  grid-template-columns:72px minmax(0,1fr)!important;
  grid-template-rows:auto auto!important;
  align-items:center!important;
  column-gap:18px!important;
  min-height:128px!important;
  padding:22px 24px!important;
  border-radius:18px!important;
  background:#ffffff!important;
  box-shadow:0 12px 30px rgba(15,23,42,.075)!important;
}

html body .summary-panel .total-amount-card > div:first-child{
  border-color:#bfe5d8!important;
}

html body .summary-panel .total-amount-meta > span:first-child{
  border-color:#cfe2fa!important;
}

html body .summary-panel .total-amount-meta > span:last-child{
  border-color:#ffd9ba!important;
}

html body .summary-panel .total-amount-card > div:first-child::before,
html body .summary-panel .total-amount-meta > span::before{
  content:""!important;
  grid-row:1 / span 2!important;
  width:62px!important;
  height:62px!important;
  border-radius:50%!important;
  align-self:center!important;
  justify-self:center!important;
}

html body .summary-panel .total-amount-card > div:first-child::before{
  content:"$"!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:#d9f4e9!important;
  color:var(--v106-green)!important;
  font-size:28px!important;
  font-weight:900!important;
}

html body .summary-panel .total-amount-meta > span:first-child::before{
  background:#e8f1ff var(--v106-clock-icon) center / 31px 31px no-repeat!important;
}

html body .summary-panel .total-amount-meta > span:last-child::before{
  background:#ffead7 var(--v106-wallet-icon) center / 31px 31px no-repeat!important;
}

html body .summary-panel .total-amount-card > div:first-child > span,
html body .summary-panel .total-amount-meta > span{
  color:#4d5b70!important;
  font-size:18px!important;
  font-weight:800!important;
  line-height:1.15!important;
  letter-spacing:0!important;
}

html body .summary-panel .total-amount-card > div:first-child > strong,
html body .summary-panel .total-amount-meta > span strong{
  grid-column:2!important;
  color:var(--v106-green)!important;
  font-size:30px!important;
  font-weight:900!important;
  line-height:1.05!important;
  margin:7px 0 0!important;
}

html body .summary-panel .total-amount-meta > span:first-child strong{
  color:#0b5ed7!important;
}

html body .summary-panel .total-amount-meta > span:last-child strong{
  color:var(--v106-orange)!important;
}

html body .summary-panel .stats-grid{
  order:3!important;
  margin-top:0!important;
}

html body .history-panel{
  padding:30px 34px!important;
  border-radius:22px!important;
  background:#ffffff!important;
  box-shadow:0 18px 44px rgba(15,23,42,.10)!important;
}

html body .history-panel > .section-title{
  padding:0 0 24px!important;
  border-bottom:1px solid #dfe7f0!important;
}

html body .history-panel > .section-title > span{
  justify-content:space-between!important;
  gap:16px!important;
}

html body .history-panel .history-title-label{
  color:var(--v106-ink)!important;
  font-size:34px!important;
  font-weight:900!important;
}

html body .history-panel .history-title-range{
  min-height:50px!important;
  padding:10px 20px 10px 54px!important;
  position:relative!important;
  border:0!important;
  border-radius:999px!important;
  background:#edf5ff!important;
  color:#0b5ed7!important;
  font-size:20px!important;
  font-weight:900!important;
}

html body .history-panel .history-title-range::before{
  content:""!important;
  position:absolute!important;
  left:20px!important;
  top:50%!important;
  width:23px!important;
  height:23px!important;
  transform:translateY(-50%)!important;
  background:var(--v106-calendar-icon) center / contain no-repeat!important;
}

html body .history-total{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:28px!important;
  margin:12px 0 0!important;
}

html body .history-total .history-total-item{
  position:relative!important;
  display:grid!important;
  grid-template-columns:78px minmax(0,1fr)!important;
  grid-template-rows:auto auto!important;
  align-items:center!important;
  column-gap:20px!important;
  min-height:128px!important;
  padding:26px 28px!important;
  border-radius:18px!important;
  background:#ffffff!important;
  box-shadow:0 12px 30px rgba(15,23,42,.06)!important;
  color:#4d5b70!important;
  font-size:19px!important;
  font-weight:800!important;
  letter-spacing:0!important;
}

html body .history-total .history-total-item:first-child{
  border-color:#c7eadc!important;
}

html body .history-total .history-total-item:last-child{
  border-color:#dfd1ff!important;
}

html body .history-total .history-total-item::before{
  content:""!important;
  grid-row:1 / span 2!important;
  width:68px!important;
  height:68px!important;
  border-radius:50%!important;
  align-self:center!important;
  justify-self:center!important;
}

html body .history-total .history-total-item:first-child::before{
  background:#daf4e9 var(--v106-clock-icon) center / 34px 34px no-repeat!important;
}

html body .history-total .history-total-item:last-child::before{
  content:"$"!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:#eadcff!important;
  color:#7a35d8!important;
  font-size:42px!important;
  font-weight:650!important;
}

html body .history-total .history-total-item strong{
  grid-column:2!important;
  margin-top:8px!important;
  color:var(--v106-green)!important;
  font-size:30px!important;
  font-weight:900!important;
}

html body .history-total .history-total-item:last-child strong{
  color:#7a35d8!important;
}

html body .history-panel .shift-history-range-status{
  border:0!important;
  background:transparent!important;
  color:#66768b!important;
  padding:0!important;
  margin:-2px 0 0!important;
  box-shadow:none!important;
}

@media (max-width:760px){
  html body .summary-panel{
    padding:10px 6px!important;
    gap:14px!important;
    background:#f6faff!important;
  }

  html body .summary-panel .main-range-card.compact-range-card{
    padding:20px 18px!important;
    border-radius:18px!important;
    box-shadow:0 12px 30px rgba(15,23,42,.08)!important;
  }

  html body .main-range-head{
    grid-template-columns:50px minmax(0,1fr)!important;
    gap:12px!important;
    margin-bottom:16px!important;
  }

  html body .main-range-head::before{
    width:50px!important;
    height:50px!important;
    border-radius:14px!important;
    background-size:26px 26px!important;
  }

  html body .main-range-head strong{
    font-size:28px!important;
  }

  html body .compact-main-range-grid{
    gap:14px!important;
  }

  html body .compact-main-range-grid label span{
    font-size:17px!important;
  }

  html body .compact-main-range-grid select{
    height:55px!important;
    min-height:55px!important;
    padding-left:60px!important;
    padding-right:46px!important;
    background-position:22px center,calc(100% - 18px) center!important;
    background-size:22px 22px,19px 19px!important;
    font-size:18px!important;
  }

  html body .compact-main-range-grid input[type="date"]{
    height:52px!important;
    min-height:52px!important;
    font-size:16px!important;
  }

  html body .compact-main-range-grid #mainGenerateReportBtn{
    height:56px!important;
    min-height:56px!important;
    font-size:18px!important;
  }

  html body #mainRangeStatus{
    min-height:58px!important;
    margin-top:18px!important;
    padding:11px 12px 11px 64px!important;
    border-radius:13px!important;
    font-size:14px!important;
  }

  html body #mainRangeStatus::before{
    left:16px!important;
    width:36px!important;
    height:36px!important;
    background-size:20px 20px!important;
  }

  html body .mobile-range-pager{
    gap:10px!important;
    margin-top:16px!important;
  }

  html body .mobile-range-pager button{
    min-height:48px!important;
    height:48px!important;
    font-size:14px!important;
  }

  html body .summary-panel .total-amount-card{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:9px!important;
    margin-top:0!important;
  }

  html body .summary-panel .total-amount-card > div:first-child,
  html body .summary-panel .total-amount-meta > span{
    min-height:78px!important;
    grid-template-columns:34px minmax(0,1fr)!important;
    column-gap:8px!important;
    padding:10px 8px!important;
    border-radius:12px!important;
  }

  html body .summary-panel .total-amount-card > div:first-child::before,
  html body .summary-panel .total-amount-meta > span::before{
    width:32px!important;
    height:32px!important;
    font-size:18px!important;
    background-size:18px 18px!important;
  }

  html body .summary-panel .total-amount-card > div:first-child > span,
  html body .summary-panel .total-amount-meta > span{
    font-size:10px!important;
  }

  html body .summary-panel .total-amount-card > div:first-child > strong,
  html body .summary-panel .total-amount-meta > span strong{
    font-size:18px!important;
    margin-top:4px!important;
  }

  html body .history-panel{
    padding:22px 18px!important;
    border-radius:18px!important;
    box-shadow:0 12px 30px rgba(15,23,42,.08)!important;
  }

  html body .history-panel > .section-title{
    padding-bottom:18px!important;
  }

  html body .history-panel .history-title-label{
    font-size:30px!important;
  }

  html body .history-panel .history-title-range{
    min-height:42px!important;
    padding:8px 14px 8px 42px!important;
    font-size:16px!important;
  }

  html body .history-panel .history-title-range::before{
    left:15px!important;
    width:20px!important;
    height:20px!important;
  }

  html body .history-total{
    gap:10px!important;
  }

  html body .history-total .history-total-item{
    min-height:88px!important;
    grid-template-columns:42px minmax(0,1fr)!important;
    column-gap:10px!important;
    padding:13px 11px!important;
    border-radius:13px!important;
    font-size:13px!important;
  }

  html body .history-total .history-total-item::before{
    width:38px!important;
    height:38px!important;
    background-size:21px 21px!important;
    font-size:25px!important;
  }

  html body .history-total .history-total-item strong{
    font-size:21px!important;
    margin-top:5px!important;
  }
}

@media (max-width:420px){
  html body .summary-panel .main-range-card.compact-range-card{
    padding:18px 14px!important;
  }

  html body .main-range-head strong{
    font-size:25px!important;
  }

  html body .mobile-range-pager{
    grid-template-columns:1fr!important;
  }

  html body .summary-panel .total-amount-card{
    gap:7px!important;
  }

  html body .summary-panel .total-amount-card > div:first-child,
  html body .summary-panel .total-amount-meta > span{
    grid-template-columns:1fr!important;
    grid-template-rows:auto auto auto!important;
    text-align:left!important;
  }

  html body .summary-panel .total-amount-card > div:first-child::before,
  html body .summary-panel .total-amount-meta > span::before{
    grid-row:1!important;
    justify-self:start!important;
    margin-bottom:3px!important;
  }

  html body .summary-panel .total-amount-card > div:first-child > span,
  html body .summary-panel .total-amount-card > div:first-child > strong,
  html body .summary-panel .total-amount-meta > span strong{
    grid-column:1!important;
  }
}

/* v107: slightly smaller version of the reference filter/history design. */
html body .summary-panel{
  gap:14px!important;
  padding:18px!important;
}

html body .summary-panel .main-range-card.compact-range-card{
  padding:22px 26px!important;
  border-radius:18px!important;
}

html body .main-range-head{
  grid-template-columns:58px minmax(0,1fr)!important;
  gap:14px!important;
  margin-bottom:18px!important;
}

html body .main-range-head::before{
  width:56px!important;
  height:56px!important;
  border-radius:16px!important;
  background-size:28px 28px!important;
}

html body .main-range-head strong{
  font-size:29px!important;
}

html body .compact-main-range-grid{
  gap:15px!important;
}

html body .compact-main-range-grid label{
  gap:8px!important;
}

html body .compact-main-range-grid label span{
  font-size:17px!important;
}

html body .compact-main-range-grid select{
  height:54px!important;
  min-height:54px!important;
  padding-left:66px!important;
  font-size:19px!important;
  background-position:24px center,calc(100% - 22px) center!important;
  background-size:22px 22px,19px 19px!important;
}

html body .compact-main-range-grid input[type="date"]{
  height:52px!important;
  min-height:52px!important;
  font-size:16px!important;
}

html body .compact-main-range-grid #mainGenerateReportBtn{
  height:56px!important;
  min-height:56px!important;
  gap:10px!important;
  font-size:18px!important;
}

html body .compact-main-range-grid #mainGenerateReportBtn::before{
  width:22px!important;
  height:22px!important;
  flex-basis:22px!important;
}

html body #mainRangeStatus{
  min-height:60px!important;
  margin-top:18px!important;
  padding:12px 16px 12px 70px!important;
  border-radius:13px!important;
  font-size:16px!important;
}

html body #mainRangeStatus::before{
  left:20px!important;
  width:38px!important;
  height:38px!important;
  background-size:21px 21px!important;
}

html body .mobile-range-pager{
  gap:16px!important;
  margin-top:20px!important;
}

html body .mobile-range-pager button{
  height:50px!important;
  min-height:50px!important;
  font-size:15px!important;
}

html body .summary-panel .total-amount-card{
  gap:16px!important;
  margin-top:4px!important;
}

html body .summary-panel .total-amount-card > div:first-child,
html body .summary-panel .total-amount-meta > span{
  grid-template-columns:56px minmax(0,1fr)!important;
  min-height:102px!important;
  column-gap:14px!important;
  padding:17px 18px!important;
  border-radius:15px!important;
}

html body .summary-panel .total-amount-card > div:first-child::before,
html body .summary-panel .total-amount-meta > span::before{
  width:50px!important;
  height:50px!important;
  font-size:24px!important;
  background-size:26px 26px!important;
}

html body .summary-panel .total-amount-card > div:first-child > span,
html body .summary-panel .total-amount-meta > span{
  font-size:15px!important;
}

html body .summary-panel .total-amount-card > div:first-child > strong,
html body .summary-panel .total-amount-meta > span strong{
  font-size:25px!important;
  margin-top:5px!important;
}

html body .history-panel{
  padding:24px 28px!important;
  border-radius:18px!important;
}

html body .history-panel > .section-title{
  padding-bottom:18px!important;
}

html body .history-panel .history-title-label{
  font-size:29px!important;
}

html body .history-panel .history-title-range{
  min-height:42px!important;
  padding:8px 17px 8px 46px!important;
  font-size:17px!important;
}

html body .history-panel .history-title-range::before{
  left:17px!important;
  width:20px!important;
  height:20px!important;
}

html body .history-total{
  gap:18px!important;
  margin-top:8px!important;
}

html body .history-total .history-total-item{
  grid-template-columns:60px minmax(0,1fr)!important;
  min-height:104px!important;
  column-gap:16px!important;
  padding:20px 22px!important;
  border-radius:15px!important;
  font-size:16px!important;
}

html body .history-total .history-total-item::before{
  width:52px!important;
  height:52px!important;
  font-size:34px!important;
  background-size:27px 27px!important;
}

html body .history-total .history-total-item strong{
  font-size:25px!important;
  margin-top:5px!important;
}

@media (max-width:760px){
  html body .summary-panel{
    padding:9px 6px!important;
    gap:11px!important;
  }

  html body .summary-panel .main-range-card.compact-range-card{
    padding:16px 14px!important;
    border-radius:15px!important;
  }

  html body .main-range-head{
    grid-template-columns:44px minmax(0,1fr)!important;
    gap:10px!important;
    margin-bottom:13px!important;
  }

  html body .main-range-head::before{
    width:44px!important;
    height:44px!important;
    border-radius:12px!important;
    background-size:22px 22px!important;
  }

  html body .main-range-head strong{
    font-size:23px!important;
  }

  html body .compact-main-range-grid{
    gap:10px!important;
  }

  html body .compact-main-range-grid label span{
    font-size:14px!important;
  }

  html body .compact-main-range-grid select{
    height:48px!important;
    min-height:48px!important;
    padding-left:52px!important;
    padding-right:40px!important;
    background-position:18px center,calc(100% - 16px) center!important;
    background-size:19px 19px,17px 17px!important;
    font-size:16px!important;
  }

  html body .compact-main-range-grid input[type="date"]{
    height:46px!important;
    min-height:46px!important;
    font-size:14px!important;
  }

  html body .compact-main-range-grid #mainGenerateReportBtn{
    height:50px!important;
    min-height:50px!important;
    font-size:16px!important;
  }

  html body #mainRangeStatus{
    min-height:50px!important;
    margin-top:13px!important;
    padding:9px 10px 9px 54px!important;
    font-size:12px!important;
  }

  html body #mainRangeStatus::before{
    left:13px!important;
    width:30px!important;
    height:30px!important;
    background-size:17px 17px!important;
  }

  html body .mobile-range-pager{
    gap:8px!important;
    margin-top:12px!important;
  }

  html body .mobile-range-pager button{
    min-height:42px!important;
    height:42px!important;
    font-size:13px!important;
  }

  html body .summary-panel .total-amount-card{
    gap:7px!important;
  }

  html body .summary-panel .total-amount-card > div:first-child,
  html body .summary-panel .total-amount-meta > span{
    min-height:66px!important;
    grid-template-columns:28px minmax(0,1fr)!important;
    column-gap:7px!important;
    padding:8px 7px!important;
    border-radius:10px!important;
  }

  html body .summary-panel .total-amount-card > div:first-child::before,
  html body .summary-panel .total-amount-meta > span::before{
    width:27px!important;
    height:27px!important;
    font-size:15px!important;
    background-size:16px 16px!important;
  }

  html body .summary-panel .total-amount-card > div:first-child > span,
  html body .summary-panel .total-amount-meta > span{
    font-size:9px!important;
  }

  html body .summary-panel .total-amount-card > div:first-child > strong,
  html body .summary-panel .total-amount-meta > span strong{
    font-size:16px!important;
    margin-top:3px!important;
  }

  html body .history-panel{
    padding:17px 14px!important;
    border-radius:15px!important;
  }

  html body .history-panel > .section-title{
    padding-bottom:13px!important;
  }

  html body .history-panel .history-title-label{
    font-size:25px!important;
  }

  html body .history-panel .history-title-range{
    min-height:36px!important;
    padding:7px 12px 7px 36px!important;
    font-size:14px!important;
  }

  html body .history-panel .history-title-range::before{
    left:13px!important;
    width:17px!important;
    height:17px!important;
  }

  html body .history-total{
    gap:8px!important;
  }

  html body .history-total .history-total-item{
    min-height:72px!important;
    grid-template-columns:34px minmax(0,1fr)!important;
    column-gap:8px!important;
    padding:10px 9px!important;
    font-size:11px!important;
  }

  html body .history-total .history-total-item::before{
    width:31px!important;
    height:31px!important;
    background-size:17px 17px!important;
    font-size:21px!important;
  }

  html body .history-total .history-total-item strong{
    font-size:18px!important;
    margin-top:4px!important;
  }
}

/* v108: center and normalize mobile filter/history card alignment. */
@media (max-width:760px){
  html body #mainRangeStatus{
    display:grid!important;
    grid-template-columns:30px minmax(0,1fr)!important;
    align-items:center!important;
    justify-content:center!important;
    column-gap:8px!important;
    padding:8px 12px!important;
    text-align:center!important;
  }

  html body #mainRangeStatus::before{
    position:static!important;
    transform:none!important;
    grid-column:1!important;
    justify-self:center!important;
  }

  html body .mobile-range-pager{
    grid-template-columns:1fr 1fr!important;
    align-items:center!important;
  }

  html body .mobile-range-pager button{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
    gap:8px!important;
    padding:0 10px!important;
    line-height:1.1!important;
  }

  html body .summary-panel .total-amount-card > div:first-child,
  html body .summary-panel .total-amount-meta > span{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:4px!important;
    min-height:82px!important;
    padding:9px 6px!important;
    text-align:center!important;
  }

  html body .summary-panel .total-amount-card > div:first-child::before,
  html body .summary-panel .total-amount-meta > span::before{
    flex:0 0 28px!important;
    width:28px!important;
    height:28px!important;
    margin:0!important;
    align-self:center!important;
    justify-self:center!important;
  }

  html body .summary-panel .total-amount-card > div:first-child > span,
  html body .summary-panel .total-amount-meta > span{
    text-align:center!important;
    line-height:1.08!important;
  }

  html body .summary-panel .total-amount-card > div:first-child > strong,
  html body .summary-panel .total-amount-meta > span strong{
    display:block!important;
    margin:1px 0 0!important;
    text-align:center!important;
    line-height:1.05!important;
  }

  html body .history-panel > .section-title > span{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:center!important;
  }

  html body .history-panel .history-title-label{
    line-height:1.05!important;
  }

  html body .history-panel .history-title-range{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
    white-space:nowrap!important;
  }

  html body .history-total .history-total-item{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:4px!important;
    min-height:82px!important;
    padding:10px 8px!important;
    text-align:center!important;
  }

  html body .history-total .history-total-item::before{
    flex:0 0 34px!important;
    width:34px!important;
    height:34px!important;
    margin:0!important;
  }

  html body .history-total .history-total-item strong{
    margin:0!important;
    text-align:center!important;
    line-height:1.05!important;
  }
}

/* v109: desktop-specific compact dashboard layout. Mobile v108 remains unchanged. */
@media (min-width:761px){
  html body .summary-panel{
    gap:12px!important;
    padding:16px!important;
  }

  html body .summary-panel .main-range-card.compact-range-card{
    padding:16px 18px!important;
    border-radius:16px!important;
    box-shadow:0 10px 24px rgba(15,23,42,.07)!important;
  }

  html body .main-range-head{
    grid-template-columns:44px minmax(0,1fr)!important;
    gap:12px!important;
    margin-bottom:12px!important;
  }

  html body .main-range-head::before{
    width:42px!important;
    height:42px!important;
    border-radius:12px!important;
    background-size:22px 22px!important;
  }

  html body .main-range-head strong{
    font-size:22px!important;
    line-height:1.1!important;
  }

  html body .compact-main-range-grid{
    grid-template-columns:minmax(150px,1.15fr) minmax(135px,1fr) minmax(140px,1fr) minmax(140px,1fr) minmax(130px,.8fr)!important;
    gap:9px!important;
    align-items:end!important;
  }

  html body .compact-main-range-grid label{
    gap:5px!important;
  }

  html body .compact-main-range-grid label span{
    font-size:11px!important;
    font-weight:850!important;
    color:#526176!important;
  }

  html body .compact-main-range-grid select{
    height:39px!important;
    min-height:39px!important;
    padding:0 34px 0 38px!important;
    border-radius:9px!important;
    background-position:11px center,calc(100% - 10px) center!important;
    background-size:17px 17px,15px 15px!important;
    font-size:13px!important;
  }

  html body .compact-main-range-grid input[type="date"]{
    height:39px!important;
    min-height:39px!important;
    padding:0 10px!important;
    border-radius:9px!important;
    font-size:13px!important;
  }

  html body .compact-main-range-grid #mainGenerateReportBtn{
    height:39px!important;
    min-height:39px!important;
    gap:7px!important;
    padding:0 12px!important;
    border-radius:9px!important;
    font-size:13px!important;
    box-shadow:0 8px 16px rgba(13,99,223,.16)!important;
  }

  html body .compact-main-range-grid #mainGenerateReportBtn::before{
    width:17px!important;
    height:17px!important;
    flex-basis:17px!important;
  }

  html body #mainRangeStatus{
    width:max-content!important;
    max-width:100%!important;
    min-height:34px!important;
    margin-top:10px!important;
    padding:7px 12px 7px 42px!important;
    border-radius:999px!important;
    font-size:12px!important;
    line-height:1.2!important;
  }

  html body #mainRangeStatus::before{
    left:9px!important;
    width:25px!important;
    height:25px!important;
    background-size:15px 15px!important;
  }

  html body .mobile-range-pager{
    grid-template-columns:minmax(140px,1fr) minmax(140px,1fr)!important;
    max-width:430px!important;
    gap:9px!important;
    margin-top:10px!important;
  }

  html body .mobile-range-pager button{
    height:38px!important;
    min-height:38px!important;
    border-radius:9px!important;
    font-size:13px!important;
    box-shadow:0 5px 12px rgba(15,23,42,.04)!important;
  }

  html body #prevRangePageBtn::before,
  html body #nextRangePageBtn::after{
    font-size:18px!important;
  }

  html body .summary-panel .total-amount-card{
    gap:10px!important;
    margin-top:0!important;
  }

  html body .summary-panel .total-amount-card > div:first-child,
  html body .summary-panel .total-amount-meta > span{
    grid-template-columns:42px minmax(0,1fr)!important;
    min-height:74px!important;
    column-gap:10px!important;
    padding:11px 12px!important;
    border-radius:12px!important;
    box-shadow:0 7px 16px rgba(15,23,42,.045)!important;
  }

  html body .summary-panel .total-amount-card > div:first-child::before,
  html body .summary-panel .total-amount-meta > span::before{
    width:36px!important;
    height:36px!important;
    font-size:18px!important;
    background-size:19px 19px!important;
  }

  html body .summary-panel .total-amount-card > div:first-child > span,
  html body .summary-panel .total-amount-meta > span{
    font-size:12px!important;
    line-height:1.12!important;
  }

  html body .summary-panel .total-amount-card > div:first-child > strong,
  html body .summary-panel .total-amount-meta > span strong{
    font-size:19px!important;
    margin-top:3px!important;
  }

  html body .summary-panel .stats-grid{
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:8px!important;
  }

  html body .summary-panel .stat{
    min-height:64px!important;
    padding:10px!important;
    border-radius:10px!important;
    box-shadow:none!important;
  }

  html body .summary-panel .stat span{
    font-size:10px!important;
    margin-bottom:5px!important;
  }

  html body .summary-panel .stat strong{
    font-size:18px!important;
  }

  html body .history-panel{
    padding:18px!important;
    border-radius:16px!important;
    box-shadow:0 10px 24px rgba(15,23,42,.07)!important;
  }

  html body .history-panel > .section-title{
    padding-bottom:12px!important;
  }

  html body .history-panel .history-title-label{
    font-size:25px!important;
  }

  html body .history-panel .history-title-range{
    min-height:34px!important;
    padding:7px 14px 7px 38px!important;
    font-size:14px!important;
  }

  html body .history-panel .history-title-range::before{
    left:13px!important;
    width:17px!important;
    height:17px!important;
  }

  html body .history-total{
    gap:10px!important;
    margin-top:5px!important;
  }

  html body .history-total .history-total-item{
    grid-template-columns:44px minmax(0,1fr)!important;
    min-height:76px!important;
    column-gap:10px!important;
    padding:12px!important;
    border-radius:12px!important;
    font-size:13px!important;
    box-shadow:0 7px 16px rgba(15,23,42,.045)!important;
  }

  html body .history-total .history-total-item::before{
    width:38px!important;
    height:38px!important;
    font-size:24px!important;
    background-size:20px 20px!important;
  }

  html body .history-total .history-total-item strong{
    font-size:20px!important;
    margin-top:3px!important;
  }
}

/* v110: fit desktop Work Records inside the card without horizontal clipping. */
@media (min-width:761px){
  html body #shiftList,
  html body .history-date-group,
  html body .main-history-table-wrap{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }

  html body .history-date-group{
    overflow:hidden!important;
  }

  html body .main-history-table-wrap{
    overflow-x:hidden!important;
    overflow-y:visible!important;
  }

  html body .main-history-table{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    table-layout:fixed!important;
  }

  html body .main-history-table th,
  html body .main-history-table td{
    padding:8px 7px!important;
    font-size:11.5px!important;
    line-height:1.2!important;
    white-space:normal!important;
    overflow:visible!important;
    overflow-wrap:break-word!important;
  }

  html body .main-history-table th{
    font-size:10px!important;
  }

  html body .main-history-table th:nth-child(1),
  html body .main-history-table td:nth-child(1){
    width:4%!important;
    text-align:center!important;
  }

  html body .main-history-table th:nth-child(2),
  html body .main-history-table td:nth-child(2){
    width:8%!important;
    text-align:center!important;
  }

  html body .main-history-table th:nth-child(3),
  html body .main-history-table td:nth-child(3){
    width:15%!important;
  }

  html body .main-history-table th:nth-child(4),
  html body .main-history-table td:nth-child(4){
    width:29%!important;
  }

  html body .main-history-table th:nth-child(5),
  html body .main-history-table td:nth-child(5){
    width:10%!important;
  }

  html body .main-history-table th:nth-child(6),
  html body .main-history-table td:nth-child(6){
    width:8%!important;
  }

  html body .main-history-table th:nth-child(7),
  html body .main-history-table td:nth-child(7){
    width:10%!important;
  }

  html body .main-history-table th:nth-child(8),
  html body .main-history-table td:nth-child(8){
    width:7%!important;
  }

  html body .main-history-table th:nth-child(9),
  html body .main-history-table td:nth-child(9){
    width:9%!important;
  }

  html body .main-history-location span{
    display:block!important;
    margin:0 0 4px!important;
    min-width:0!important;
  }

  html body .main-history-location span:last-child{
    margin-bottom:0!important;
  }

  html body .main-history-worked,
  html body .main-history-pay{
    font-size:12px!important;
    font-weight:900!important;
  }

  html body .main-history-edit-actions,
  html body .main-history-map-links{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:4px!important;
    flex-wrap:wrap!important;
  }

  html body .main-history-edit-actions button,
  html body .main-history-map-links a{
    min-height:26px!important;
    padding:4px 6px!important;
    border-radius:5px!important;
    font-size:11px!important;
    line-height:1!important;
    white-space:nowrap!important;
  }

  html body .record-type-pill{
    min-height:18px!important;
    padding:2px 5px!important;
    font-size:9px!important;
  }
}

/* v111: make desktop Work Records readable by giving Shift History the full row. */
@media (min-width:961px){
  html body .layout{
    grid-template-columns:minmax(280px,320px) minmax(0,1fr)!important;
    grid-template-areas:
      "control summary"
      "history history"!important;
    align-items:start!important;
  }

  html body .control-panel{
    grid-area:control!important;
  }

  html body .summary-panel{
    grid-area:summary!important;
  }

  html body .history-panel{
    grid-area:history!important;
    width:100%!important;
    max-width:100%!important;
  }

  html body .main-history-table-wrap{
    overflow-x:hidden!important;
  }

  html body .main-history-table th,
  html body .main-history-table td{
    padding:9px 10px!important;
    font-size:12px!important;
  }

  html body .main-history-table th{
    font-size:10.5px!important;
  }

  html body .main-history-table th:nth-child(3),
  html body .main-history-table td:nth-child(3){
    width:13%!important;
  }

  html body .main-history-table th:nth-child(4),
  html body .main-history-table td:nth-child(4){
    width:34%!important;
  }

  html body .main-history-table th:nth-child(5),
  html body .main-history-table td:nth-child(5){
    width:9%!important;
  }

  html body .main-history-table th:nth-child(7),
  html body .main-history-table td:nth-child(7){
    width:12%!important;
  }
}

/* v112: restore desktop Work Records position and avoid over-squeezed columns. */
@media (min-width:961px){
  html body .layout{
    grid-template-columns:minmax(280px,320px) minmax(0,1fr)!important;
    grid-template-areas:
      "control summary"
      "control history"!important;
    align-items:start!important;
  }

  html body .history-panel{
    grid-area:history!important;
  }

  html body .main-history-table-wrap{
    overflow-x:auto!important;
    overflow-y:hidden!important;
    border-bottom:1px solid #dbe7f3!important;
    scrollbar-width:thin!important;
  }

  html body .main-history-table{
    width:100%!important;
    min-width:980px!important;
    table-layout:fixed!important;
  }

  html body .main-history-table th,
  html body .main-history-table td{
    padding:8px 9px!important;
    font-size:11.5px!important;
    line-height:1.22!important;
  }

  html body .main-history-table th:nth-child(1),
  html body .main-history-table td:nth-child(1){
    width:42px!important;
  }

  html body .main-history-table th:nth-child(2),
  html body .main-history-table td:nth-child(2){
    width:70px!important;
  }

  html body .main-history-table th:nth-child(3),
  html body .main-history-table td:nth-child(3){
    width:130px!important;
  }

  html body .main-history-table th:nth-child(4),
  html body .main-history-table td:nth-child(4){
    width:auto!important;
  }

  html body .main-history-table th:nth-child(5),
  html body .main-history-table td:nth-child(5){
    width:96px!important;
  }

  html body .main-history-table th:nth-child(6),
  html body .main-history-table td:nth-child(6){
    width:82px!important;
  }

  html body .main-history-table th:nth-child(7),
  html body .main-history-table td:nth-child(7){
    width:118px!important;
  }

  html body .main-history-table th:nth-child(8),
  html body .main-history-table td:nth-child(8){
    width:76px!important;
  }

  html body .main-history-table th:nth-child(9),
  html body .main-history-table td:nth-child(9){
    width:82px!important;
  }

  html body .main-history-edit-actions,
  html body .main-history-map-links{
    justify-content:flex-start!important;
  }
}

/* v113: desktop Work Records as readable compact rows instead of a squeezed table. */
@media (min-width:761px){
  html body .history-date-group{
    overflow:hidden!important;
  }

  html body .main-history-table-wrap{
    overflow:visible!important;
    border-bottom:0!important;
  }

  html body .main-history-table,
  html body .main-history-table tbody{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    table-layout:auto!important;
    background:transparent!important;
  }

  html body .main-history-table thead{
    display:none!important;
  }

  html body .main-history-table tr{
    display:grid!important;
    grid-template-columns:36px 66px minmax(130px,1fr) minmax(80px,.45fr) minmax(72px,.4fr)!important;
    grid-template-areas:
      "num type time worked pay"
      "loc loc loc loc loc"
      "notes notes notes edit map"!important;
    align-items:stretch!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    border:0!important;
    border-bottom:1px solid #e5edf6!important;
    background:#ffffff!important;
  }

  html body .main-history-table tr:last-child{
    border-bottom:0!important;
  }

  html body .main-history-table td{
    display:block!important;
    width:auto!important;
    min-width:0!important;
    max-width:100%!important;
    padding:8px 9px!important;
    border:0!important;
    border-right:1px solid #e7eef7!important;
    border-bottom:1px solid #eef3f8!important;
    background:#ffffff!important;
    color:#102033!important;
    font-size:12px!important;
    line-height:1.24!important;
    white-space:normal!important;
    overflow:visible!important;
    overflow-wrap:break-word!important;
    word-break:normal!important;
  }

  html body .main-history-table td::before{
    display:none!important;
  }

  html body .main-history-table td:nth-child(1){
    grid-area:num!important;
    text-align:center!important;
    font-weight:900!important;
    background:#f8fbff!important;
  }

  html body .main-history-table td:nth-child(2){
    grid-area:type!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
  }

  html body .main-history-table td:nth-child(3){
    grid-area:time!important;
    font-weight:800!important;
  }

  html body .main-history-table td:nth-child(4){
    grid-area:loc!important;
    display:grid!important;
    grid-template-columns:72px minmax(0,1fr)!important;
    gap:8px!important;
    background:#fbfdff!important;
  }

  html body .main-history-table td:nth-child(4)::before{
    content:"Location"!important;
    display:block!important;
    color:#64748b!important;
    font-size:10px!important;
    font-weight:900!important;
    text-transform:uppercase!important;
  }

  html body .main-history-table td:nth-child(4) > *{
    grid-column:2!important;
  }

  html body .main-history-table td:nth-child(5){
    grid-area:worked!important;
    text-align:right!important;
    font-weight:900!important;
  }

  html body .main-history-table td:nth-child(6){
    grid-area:pay!important;
    text-align:right!important;
    font-weight:900!important;
  }

  html body .main-history-table td:nth-child(7){
    grid-area:notes!important;
    display:grid!important;
    grid-template-columns:72px minmax(0,1fr)!important;
    gap:8px!important;
    border-bottom:0!important;
    background:#ffffff!important;
  }

  html body .main-history-table td:nth-child(7)::before{
    content:"Notes"!important;
    display:block!important;
    color:#64748b!important;
    font-size:10px!important;
    font-weight:900!important;
    text-transform:uppercase!important;
  }

  html body .main-history-table td:nth-child(8){
    grid-area:edit!important;
    border-bottom:0!important;
  }

  html body .main-history-table td:nth-child(9){
    grid-area:map!important;
    border-right:0!important;
    border-bottom:0!important;
  }

  html body .main-history-location span{
    display:block!important;
    margin:0 0 3px!important;
  }

  html body .main-history-location span:last-child{
    margin-bottom:0!important;
  }

  html body .main-history-edit-actions,
  html body .main-history-map-links{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:5px!important;
    flex-wrap:wrap!important;
  }

  html body .main-history-edit-actions button,
  html body .main-history-map-links a{
    min-height:28px!important;
    padding:5px 8px!important;
    border-radius:6px!important;
    font-size:11px!important;
    line-height:1!important;
    white-space:nowrap!important;
  }
}

@media (min-width:1200px){
  html body .main-history-table tr{
    grid-template-columns:40px 76px minmax(150px,1fr) minmax(96px,.45fr) minmax(84px,.4fr)!important;
  }

  html body .main-history-table td{
    font-size:12.5px!important;
  }
}

/* v114: desktop Work Records use the full Shift History panel width. Mobile remains unchanged. */
@media (min-width:761px){
  html body .history-panel .history-subhead.combined-subhead,
  html body .history-panel #shiftList{
    flex:1 0 100%!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
  }

  html body .history-panel .history-subhead.combined-subhead{
    align-self:stretch!important;
  }

  html body .history-panel #shiftList{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    justify-items:stretch!important;
    align-items:stretch!important;
    margin:14px 0 0!important;
  }

  html body .history-panel .history-date-group,
  html body .history-panel .main-history-table-wrap,
  html body .history-panel .main-history-table,
  html body .history-panel .main-history-table tbody,
  html body .history-panel .main-history-table tr{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
  }

  html body .history-panel .history-date-group{
    justify-self:stretch!important;
    align-self:stretch!important;
  }

  html body .history-panel .main-history-table tr{
    grid-template-columns:42px 84px minmax(190px,1fr) minmax(112px,.34fr) minmax(96px,.28fr)!important;
  }
}

/* v115: desktop Work Records span both old desktop grid columns. Mobile remains unchanged. */
@media (min-width:761px){
  html body .history-panel .history-subhead.combined-subhead,
  html body .history-panel #emptyState,
  html body .history-panel #shiftList{
    grid-column:1 / -1!important;
    justify-self:stretch!important;
    width:100%!important;
    max-width:none!important;
  }

  html body .history-panel #shiftList{
    margin-left:0!important;
    margin-right:0!important;
  }
}

/* v118: desktop-only summary cards text alignment fix. Mobile remains unchanged. */
@media (min-width:761px){
  html body .summary-panel .total-amount-card{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:10px!important;
    align-items:stretch!important;
    margin-top:0!important;
  }

  html body .summary-panel .total-amount-meta{
    display:contents!important;
  }

  html body .summary-panel .total-amount-card > div:first-child,
  html body .summary-panel .total-amount-meta > span{
    display:grid!important;
    grid-template-columns:42px minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;
    align-content:center!important;
    align-items:center!important;
    column-gap:10px!important;
    min-height:74px!important;
    padding:11px 12px!important;
    overflow:hidden!important;
  }

  html body .summary-panel .total-amount-card > div:first-child::before,
  html body .summary-panel .total-amount-meta > span::before{
    grid-column:1!important;
    grid-row:1 / 3!important;
    align-self:center!important;
    justify-self:center!important;
    width:36px!important;
    height:36px!important;
  }

  html body .summary-panel .total-amount-card > div:first-child > span{
    grid-column:2!important;
    grid-row:1!important;
    display:block!important;
    min-width:0!important;
    margin:0!important;
    color:#4f5f75!important;
    font-size:11px!important;
    font-weight:900!important;
    line-height:1.08!important;
    text-align:left!important;
    white-space:normal!important;
  }

  html body .summary-panel .total-amount-meta > span{
    color:transparent!important;
    font-size:0!important;
  }

  html body .summary-panel .total-amount-meta > span::after{
    grid-column:2!important;
    grid-row:1!important;
    display:block!important;
    min-width:0!important;
    color:#4f5f75!important;
    font-size:11px!important;
    font-weight:900!important;
    line-height:1.08!important;
    text-align:left!important;
    white-space:normal!important;
  }

  html body .summary-panel .total-amount-meta > span:first-child::after{
    content:"Time Worked"!important;
  }

  html body .summary-panel .total-amount-meta > span:last-child::after{
    content:"Deductions"!important;
  }

  html body .summary-panel .total-amount-card > div:first-child > strong,
  html body .summary-panel .total-amount-meta > span strong{
    grid-column:2!important;
    grid-row:2!important;
    display:block!important;
    min-width:0!important;
    margin:3px 0 0!important;
    font-size:18px!important;
    line-height:1.05!important;
    text-align:left!important;
    white-space:nowrap!important;
  }
}

/* v119: desktop-only Work Records table restore. Mobile card layout remains unchanged. */
@media (min-width:761px){
  html body .history-panel .main-history-table-wrap{
    width:100%!important;
    max-width:100%!important;
    overflow-x:auto!important;
    overflow-y:visible!important;
    border:1px solid #d7e3f0!important;
    border-radius:12px!important;
    background:#ffffff!important;
  }

  html body .history-panel .main-history-table,
  html body .history-panel .main-history-table tbody,
  html body .history-panel .main-history-table thead,
  html body .history-panel .main-history-table tr,
  html body .history-panel .main-history-table th,
  html body .history-panel .main-history-table td{
    width:auto!important;
    max-width:none!important;
    min-height:0!important;
  }

  html body .history-panel .main-history-table{
    display:table!important;
    width:100%!important;
    min-width:1120px!important;
    table-layout:fixed!important;
    border-collapse:collapse!important;
    border-spacing:0!important;
    background:#ffffff!important;
  }

  html body .history-panel .main-history-table thead{
    display:table-header-group!important;
  }

  html body .history-panel .main-history-table tbody{
    display:table-row-group!important;
  }

  html body .history-panel .main-history-table tr{
    display:table-row!important;
    grid-template-columns:none!important;
    grid-template-areas:none!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    background:transparent!important;
  }

  html body .history-panel .main-history-table th,
  html body .history-panel .main-history-table td{
    display:table-cell!important;
    grid-area:auto!important;
    padding:8px 9px!important;
    border:1px solid #d7e3f0!important;
    vertical-align:top!important;
    font-size:12px!important;
    line-height:1.25!important;
    white-space:normal!important;
    word-break:normal!important;
    overflow-wrap:break-word!important;
    background:#ffffff!important;
  }

  html body .history-panel .main-history-table th{
    background:#eef4fa!important;
    color:#0f172a!important;
    font-size:10px!important;
    font-weight:900!important;
    text-transform:uppercase!important;
    letter-spacing:0!important;
  }

  html body .history-panel .main-history-table td::before,
  html body .history-panel .main-history-table th::before{
    display:none!important;
    content:none!important;
  }

  html body .history-panel .main-history-table tr.excluded-from-total td{
    background:#fff8e3!important;
  }

  html body .history-panel .main-history-table tr.deleted-from-history td{
    background:#fff1f2!important;
  }

  html body .history-panel .main-history-table th:nth-child(1),
  html body .history-panel .main-history-table td:nth-child(1){
    width:38px!important;
    text-align:center!important;
    font-weight:900!important;
  }

  html body .history-panel .main-history-table th:nth-child(2),
  html body .history-panel .main-history-table td:nth-child(2){
    width:70px!important;
    text-align:center!important;
  }

  html body .history-panel .main-history-table th:nth-child(3),
  html body .history-panel .main-history-table td:nth-child(3){
    width:140px!important;
    font-weight:800!important;
  }

  html body .history-panel .main-history-table th:nth-child(4),
  html body .history-panel .main-history-table td:nth-child(4){
    width:315px!important;
  }

  html body .history-panel .main-history-table th:nth-child(5),
  html body .history-panel .main-history-table td:nth-child(5){
    width:108px!important;
    text-align:right!important;
    font-weight:900!important;
  }

  html body .history-panel .main-history-table th:nth-child(6),
  html body .history-panel .main-history-table td:nth-child(6){
    width:96px!important;
    text-align:right!important;
    font-weight:900!important;
  }

  html body .history-panel .main-history-table th:nth-child(7),
  html body .history-panel .main-history-table td:nth-child(7){
    width:215px!important;
  }

  html body .history-panel .main-history-table th:nth-child(8),
  html body .history-panel .main-history-table td:nth-child(8){
    width:120px!important;
    text-align:center!important;
  }

  html body .history-panel .main-history-table th:nth-child(9),
  html body .history-panel .main-history-table td:nth-child(9){
    width:90px!important;
    text-align:center!important;
  }

  html body .history-panel .main-history-location{
    display:block!important;
  }

  html body .history-panel .main-history-location span{
    display:block!important;
    margin:0 0 4px!important;
  }

  html body .history-panel .main-history-notes{
    color:#334155!important;
    overflow-wrap:break-word!important;
    word-break:normal!important;
  }

  html body .history-panel .main-history-edit-actions,
  html body .history-panel .main-history-map-links{
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:center!important;
    gap:6px!important;
    flex-wrap:nowrap!important;
  }

  html body .history-panel .main-history-edit-actions button,
  html body .history-panel .main-history-map-links a{
    min-height:28px!important;
    padding:5px 8px!important;
    border-radius:6px!important;
    font-size:11px!important;
    line-height:1!important;
    white-space:nowrap!important;
  }
}
