:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#183039;background:#f3f6f6;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}a{color:#147b70}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(1.55rem,3vw,2.25rem);letter-spacing:-.04em;margin-bottom:9px}h2{font-size:1.16rem;letter-spacing:-.02em}p{line-height:1.55}.muted{color:#6c7a7e}.small{font-size:.83rem}.eyebrow{text-transform:uppercase;color:#6f8a8c;font-size:.72rem;letter-spacing:.13em;font-weight:800}.app-shell{display:grid;grid-template-columns:252px minmax(0,1fr);min-height:100vh}.sidebar{background:#292621;color:#d7e6e5;padding:27px 18px;position:sticky;top:0;height:100vh;display:flex;flex-direction:column;overflow-y:auto}.brand{display:flex;flex-direction:column;align-items:center;gap:10px;font-size:1.3rem;font-weight:850;letter-spacing:-.035em;padding:0 12px 30px;color:white}.mark{background:#B8B8B8;color:#132d34;border-radius:10px;padding:7px 9px;font-size:1rem}.nav-button{border:0;background:transparent;color:#c9dbdc;display:flex;align-items:center;gap:11px;width:100%;text-align:left;border-radius:10px;padding:13px 14px;margin:4px 0;font-weight:600}.nav-button.active,.nav-button:hover{background:#26434b;color:white}.nav-foot{position:absolute;bottom:24px;left:18px;right:18px;font-size:.78rem;color:#97b3b5}.content{padding:33px clamp(18px,4vw,58px);max-width:1500px;width:100%;margin:auto}.topline{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:24px}.btn{display:inline-flex;justify-content:center;align-items:center;gap:8px;border:1px solid #cbdad9;background:#fff;padding:11px 16px;border-radius:10px;color:#1c393e;font-weight:750;text-decoration:none}.btn:hover{filter:brightness(.97)}.btn.primary{background:#292621;border-color:#292621;color:white}.btn.accent{background:#B8B8B8;border-color:#B8B8B8;color:#183235}.btn.danger{color:#b34436}.btn:disabled{opacity:.5;cursor:not-allowed}.btn.small{padding:8px 11px;font-size:.79rem}.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.stats{display:grid;min-width:0;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:22px 0}.stat,.panel,.site-card{background:white;border:1px solid #e1e8e7;border-radius:16px;padding:20px;box-shadow:0 5px 21px rgba(32,63,68,.025)}.stat b{display:block;font-size:2rem;margin-top:8px;letter-spacing:-.04em}.site-card{min-height:200px;display:flex;flex-direction:column;justify-content:space-between;cursor:pointer;transition:transform .15s,border .15s}.site-card:hover{transform:translateY(-2px);border-color:#74b7aa}.site-card h3{font-size:1.25rem;margin:9px 0 5px}.site-icon{display:inline-flex;background:#eaf3ef;border-radius:12px;padding:12px;color:#26786a;width:max-content;font-size:1.3rem}.badge{font-size:.74rem;padding:5px 9px;background:#e9f7ee;color:#227456;font-weight:800;border-radius:50px}.metrics{display:flex;gap:15px;color:#60777b;font-size:.78rem;margin-top:24px;flex-wrap:wrap}.tabs{display:flex;gap:8px;overflow:auto;border-bottom:1px solid #e2e9e8;margin:23px 0}.tab{border:0;background:transparent;padding:12px 15px;white-space:nowrap;font-weight:750;color:#688084;border-bottom:3px solid transparent}.tab.selected{border-bottom-color:#B8B8B8;color:#292621}.stack{display:grid;gap:15px}.split{display:grid;grid-template-columns:1fr 1fr;gap:18px}.field{display:grid;gap:7px;margin-bottom:15px}.field label{font-weight:700;font-size:.85rem}.field input,.field select,.field textarea{border:1px solid #cbd7d5;background:#fff;border-radius:10px;padding:12px 13px;color:#193238;width:100%;min-width:0}.field textarea{min-height:82px;resize:vertical}.field input:focus,.field select:focus,.field textarea:focus{outline:2px solid #6fb5a7;outline-offset:1px}.hint{font-size:.77rem;color:#697c7e}.asset-card{border:1px solid #e1e8e7;border-radius:13px;padding:14px;background:#fff;display:grid;grid-template-columns:110px 1fr;gap:15px;align-items:start}.asset-thumb{height:95px;border-radius:10px;object-fit:cover;width:110px;background:#e5ecea;display:grid;place-items:center;font-size:2rem}.asset-card h3{font-size:1rem;margin:0 0 6px;overflow-wrap:anywhere}.asset-card p{font-size:.8rem;margin-bottom:9px}.asset-card video{width:110px;height:95px;object-fit:cover;border-radius:10px}.section-header{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:14px 0}.table-wrap{overflow:auto;background:white;border:1px solid #e1e8e7;border-radius:15px}table{width:100%;border-collapse:collapse;text-align:left}th,td{padding:14px 15px;border-bottom:1px solid #edf1f0;font-size:.86rem;white-space:nowrap}th{background:#f9fbfb;color:#62777b;font-size:.73rem;text-transform:uppercase;letter-spacing:.07em}tr:last-child td{border-bottom:0}.empty{text-align:center;padding:58px 18px;color:#718488;border:1px dashed #cbdad9;border-radius:14px;background:white}.modal-backdrop{position:fixed;inset:0;background:#102a30aa;display:flex;justify-content:center;align-items:center;padding:15px;z-index:30}.modal{background:white;padding:25px;border-radius:18px;max-width:520px;width:100%;max-height:90vh;overflow:auto}.modal-head{display:flex;justify-content:space-between;align-items:start;gap:15px;margin-bottom:20px}.close{border:0;background:#edf3f1;border-radius:7px;padding:7px 12px}.loading{padding:48px;text-align:center;color:#718488}#toast{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);border-radius:11px;background:#18373f;color:white;padding:13px 18px;z-index:50;display:none;max-width:90vw}.public{min-height:100vh;background:#eff4f1;padding:17px}.public-card{width:min(100%,540px);margin:20px auto;background:white;border:1px solid #dae5df;border-radius:19px;overflow:hidden;box-shadow:0 12px 45px #143b3212}.public-header{background:#112f35;color:#fff;padding:26px}.public-header h1{margin-top:9px}.public-body{padding:25px}.choice-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:24px}.choice{padding:13px;border-radius:10px;border:1px solid #d4e0de;background:#f8fbfa;font-weight:800}.choice.selected{background:#e5f4d8;border:2px solid #419279}.sign-pad{width:100%;height:165px;border:2px dashed #aac7bf;border-radius:13px;display:block;background:#fbfdfc;touch-action:none;cursor:crosshair}.check-row{display:flex;gap:10px;align-items:flex-start;margin:12px 0 19px;font-size:.85rem;line-height:1.55}.check-row input{margin-top:5px}.success-icon{font-size:3rem;background:#e4f7de;border-radius:100%;display:inline-grid;place-items:center;width:77px;height:77px;color:#237b5c;margin-bottom:18px}.code-box{background:#f1f6f3;padding:20px;border-radius:12px;border:1px dashed #91b2aa;text-align:center;margin:20px 0}.code-box strong{font-size:2.2rem;letter-spacing:.13em}.notice{border-left:4px solid #c99f44;background:#fff9e9;padding:12px 15px;border-radius:6px;color:#72571f;font-size:.85rem}.toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.qrimg{width:235px;max-width:100%;image-rendering:pixelated;border:1px solid #e5eeea;border-radius:12px}.logo-inline{font-weight:900;letter-spacing:-.03em;color:#292621}.phone-nav{display:none}.progress-line{height:4px;background:#B8B8B8;width:50%;border-radius:2px}.actions{display:flex;flex-wrap:wrap;gap:9px}.role-note{border-radius:10px;background:#f3f7f5;padding:13px;color:#45676b;font-size:.82rem}.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.signature-preview{width:170px;max-width:100%;border:1px solid #dde6e3;border-radius:8px}.public-footer{text-align:center;color:#849795;font-size:.75rem;margin:15px}
@media(max-width:900px){.app-shell{grid-template-columns:1fr}.sidebar{display:none}.content{padding:22px 15px 96px;min-width:0}.grid{grid-template-columns:repeat(2,1fr)}.phone-nav{display:flex;position:fixed;bottom:0;left:0;right:0;background:#112b36;padding:8px;justify-content:space-around;z-index:10}.phone-nav button{background:transparent;border:0;color:#e1eded;padding:9px 10px;font-size:.72rem}.phone-nav span{display:block;font-size:1.3rem;margin-bottom:3px}}@media(max-width:560px){.grid,.split{grid-template-columns:1fr}.tabs{flex-wrap:wrap;overflow:visible}.stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.stat{padding:13px}.stat b{font-size:1.45rem}.site-card{min-height:160px}.asset-card{grid-template-columns:86px 1fr}.asset-thumb,.asset-card video{width:86px;height:78px}.topline{align-items:start}.public-card{margin:5px auto}.public-body{padding:20px}.public-header{padding:22px}}

.manager-login-header {
  padding: clamp(18px, 4.5vw, 22px);
}
.manager-login-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -.04em;
}
.manager-login-mark {
  position: relative;
  flex: 0 0 34px;
  height: 34px;
  border-radius: 6px;
  color: #112f35;
  background:
    linear-gradient(currentColor, currentColor) 22% 60% / 2px 73% no-repeat,
    linear-gradient(currentColor, currentColor) 42% 77% / 74% 2px no-repeat,
    #9cebd6;
}
.manager-login-mark::after {
  position: absolute;
  inset: 0;
  background: currentColor;
  clip-path: polygon(30% 49%, 39% 40%, 50% 51%, 80% 16%, 89% 25%, 50% 69%);
  content: "";
}
.manager-login-header h1 {
  margin: 10px 0 6px;
  color: #fff;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.025em;
}
.manager-login-header p {
  margin: 0;
  color: #b4cac8;
  font-size: 15px;
  line-height: 1.4;
}

:root { --dashboard-sidebar-color: #112f35; }
.sidebar {
  background: var(--dashboard-sidebar-color);
}
.sidebar .brand {
  align-items: flex-start;
  padding-inline: 0;
}
.sidebar .company-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100px;
  object-fit: contain;
  border-radius: 0;
  box-shadow: 0 2px 6px rgb(0 0 0 / 24%);
}
.sidebar .dashboard-wordmark {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.25;
}
.sidebar .dashboard-wordmark img {
  display: block;
  object-fit: contain;
}
.sidebar .nav-button {
  border-radius: 0;
}
.sidebar .nav-button.active {
  background: #1b3b42;
  color: #fff;
  box-shadow: inset 2px 0 #a8f0d8;
}
.sidebar .nav-foot {
  overflow-wrap: anywhere;
}

.pdf-list {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.pdf-list .btn {
  text-align: left;
  overflow-wrap: anywhere;
}
.pdf-viewer {
  margin-bottom: 14px;
}
.pdf-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.pdf-viewer img:not([hidden]) {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #dae5df;
}

.attendance-privacy { margin: 0 0 18px; }
.attendance-privacy p { margin: 0; }
.attendance-privacy details, .attendance-privacy details p { margin-top: 8px; }
.attendance-privacy summary { cursor: pointer; font-weight: 700; }

/* Accident Book */
.accident-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.accident-field { display: block; }
.accident-field > span { display: block; margin-bottom: 6px; font-weight: 700; }
.accident-field > :is(input, select, textarea) { width: 100%; }
.accident-facts > div { padding: 8px 0; border-bottom: 1px solid #dae5df; break-inside: avoid; }
.accident-facts dt { font-weight: 700; }
.accident-facts dd { margin: 3px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.accident-history { margin: 16px 0; }
.accident-history summary { cursor: pointer; padding: 6px 0; font-weight: 700; }
.accident-signatures { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); }
.accident-signatures figure { margin: 0; padding: 8px; border: 1px solid #dae5df; break-inside: avoid; }
.accident-signatures img { display: block; width: 100%; max-height: 100px; object-fit: contain; }
#accident-print-report { display: none; }
@media print {
  body.accident-printing > :not(#accident-print-report) { display: none !important; }
  body.accident-printing { margin: 0; background: #fff; color: #000; }
  body.accident-printing #accident-print-report {
    display: block;
    font-size: 10pt;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }
  #accident-print-report h1 {
    margin: 0 0 4pt;
    font-size: 14pt;
    line-height: 1.2;
    letter-spacing: normal;
  }
  #accident-print-report h2,
  #accident-print-report h3 {
    margin: 8pt 0 3pt;
    font-size: 12pt;
    line-height: 1.2;
    page-break-after: avoid;
    break-after: avoid-page;
  }
  #accident-print-report p,
  #accident-print-report dl,
  #accident-print-report ul { margin: 0 0 4pt; }
  #accident-print-report p { line-height: inherit; orphans: 2; widows: 2; }
  #accident-print-report ul { padding-left: 15pt; }
  #accident-print-report li { margin-bottom: 2pt; }
  #accident-print-report .accident-facts > div { padding: 2pt 0; break-inside: auto; }
  #accident-print-report dd { margin-top: 1pt; orphans: 2; widows: 2; }
  #accident-print-report dt { page-break-after: avoid; break-after: avoid-page; }
  #accident-print-report .accident-signatures {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6pt;
    margin: 5pt 0;
  }
  #accident-print-report figure { padding: 4pt; }
  #accident-print-report figure p { margin-bottom: 0; }
  #accident-print-report .accident-signatures img { max-height: 53pt; }
  #accident-print-report .accident-print-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10pt;
    margin-bottom: 3pt;
    page-break-inside: avoid;
  }
  #accident-print-report .accident-print-company-logo {
    display: block;
    max-width: 42mm;
    max-height: 14mm;
    width: auto;
    height: auto;
    object-fit: contain;
  }
  #accident-print-report .accident-print-credit {
    margin: 5pt 0 0;
    padding-top: 3pt;
    border-top: .5pt solid #d9e3e3;
    color: var(--dashboard-sidebar-color);
    font-size: 9pt;
    text-align: right;
  }
  #accident-print-report .accident-print-section-start {
    page-break-inside: avoid;
    break-inside: avoid-page;
  }
}

.sidebar .nav-foot {
  position: static;
  margin-top: auto;
  padding-top: 24px;
}
.sidebar-settings {
  display: grid;
  gap: 2px;
  border-bottom: 1px solid #315057;
  padding-bottom: 12px;
  margin-bottom: 15px;
}
.sidebar-settings .nav-button {
  margin: 0;
  padding: 9px 8px;
  color: #e1eded;
  font-size: .875rem;
  line-height: 1.25;
}
.sidebar-settings .nav-button:hover { background: #1b3b42; }
.sidebar-settings .nav-button:focus-visible { outline: 2px solid #a8f0d8; outline-offset: -2px; }
.dashboard-settings-menu { display: grid; gap: 8px; }
.dashboard-settings-menu .btn { width: 100%; text-align: left; }

.accident-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 16px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #d9e3e3;
  border-radius: 12px;
}
.accident-row-summary { display: grid; gap: 4px; overflow-wrap: anywhere; }
.accident-row-summary span { color: #516970; font-size: .875rem; }
.timeline-incident {
  padding: 14px 16px;
  border: 1px solid #d9e3e3;
  border-radius: 12px;
  background: #fff;
}
.timeline-incident h3 { margin: 0 0 4px; font-size: 1rem; }
.timeline-incident time { font-size: .875rem; }
@media (max-width: 560px) {
  .accident-row { grid-template-columns: minmax(0, 1fr); }
}

.accident-review-row { grid-template-columns: minmax(0, 1fr); }

.dashboard-overview-action-stack {
  display: contents;
}

.dashboard-mobile-company-logo {
  display: none;
}

@media (max-width: 900px) {
  .dashboard-overview {
    align-items: flex-start;
  }

  .dashboard-overview-copy {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .dashboard-overview-actions {
    display: grid;
    flex: 0 0 152px;
    max-width: 44%;
    justify-items: center;
  }

  .dashboard-overview-action-stack {
    display: grid;
    justify-items: end;
    max-width: 100%;
    gap: 8px;
  }

  .dashboard-mobile-company-logo {
    display: block;
    width: auto;
    height: 49px;
    max-width: 100%;
    object-fit: contain;
    object-position: right center;
    box-shadow: 0 2px 6px rgb(0 0 0 / 20%);
  }

  .dashboard-overview-action-stack > .btn {
    width: 100px;
    max-width: 100%;
    min-height: 36px;
    padding: 0 3px;
    border-radius: 9px;
    font-size: 13px;
    line-height: 1.2;
    text-align: center;
  }
}
