.safety-page {
  max-width: 1280px;
  margin: 0 auto;
  color: #25353a;
}

.admin-safety-modal-open { overflow: hidden; }
.admin-safety-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  background: rgba(15, 36, 42, .72);
}
.admin-safety-modal {
  width: min(760px, 100%);
  max-height: min(90vh, 950px);
  overflow: auto;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .3);
}
.admin-safety-modal > header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid #dce7e7;
  background: #fff;
}
.admin-safety-modal > header h2 { margin: 0; font-size: 1.2rem; }
.admin-safety-close { border: 0; background: transparent; color: #25353a; font-size: 2rem; cursor: pointer; }
.admin-safety-modal-body { padding: 24px; }
.admin-safety-modal-body .safety-wizard { max-width: none; }
.admin-check-template { margin: 20px 0; }
@media (max-width: 600px) {
  .admin-safety-overlay { padding: 0; }
  .admin-safety-modal { max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .admin-safety-modal-body { padding: 16px; }
}

.safety-page-header,
.safety-dashboard-header,
.safety-wizard-heading,
.safety-detail-heading,
.safety-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.safety-page h2,
.safety-page h3,
.safety-page h4 { margin: 0; }
.safety-page-header p,
.safety-dashboard-header p,
.safety-help { color: #718184; line-height: 1.55; margin: 6px 0 0; }

.safety-loading-card,
.safety-setup-pending,
.safety-panel,
.safety-choice-card,
.safety-confirmation,
.safety-security-note {
  background: #fff;
  border: 1px solid #dce7e5;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(37, 53, 58, .05);
}

.safety-loading-card,
.safety-setup-pending,
.safety-security-note { padding: 22px; }
.safety-setup-pending { border-left: 5px solid #e6a84b; }
.safety-security-note { margin-top: 18px; background: #eef8f5; border-color: #b9ddd4; }

.safety-report-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.safety-choice-card {
  appearance: none;
  text-align: left;
  padding: 24px;
  cursor: pointer;
  color: inherit;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.safety-choice-card:hover { transform: translateY(-2px); border-color: #64b6a2; box-shadow: 0 12px 28px rgba(37, 53, 58, .1); }
.safety-choice-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: #fff1d9; color: #9a6416; font-size: 24px; margin-bottom: 16px; }
.safety-choice-card.near-miss .safety-choice-icon { background: #e5f5f0; color: #35796b; }
.safety-choice-card strong { display: block; font-size: 20px; }
.safety-choice-card span { display: block; color: #718184; margin-top: 7px; line-height: 1.5; }

.safety-wizard { margin-top: 8px; }
.safety-wizard-top { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.safety-back { border: 0; background: transparent; color: #3d747f; font-weight: 800; cursor: pointer; padding: 10px 0; }
.safety-progress { flex: 1; height: 8px; overflow: hidden; background: #dfe8e6; border-radius: 999px; }
.safety-progress span { display: block; height: 100%; background: #64b6a2; border-radius: inherit; transition: width .2s ease; }
.safety-step-count { color: #718184; font-size: 13px; font-weight: 800; white-space: nowrap; }
.safety-panel { padding: 24px; }
.safety-step-title { margin-bottom: 20px; }
.safety-step-title small { display: block; color: #4b818b; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }

.safety-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.safety-form-grid .wide { grid-column: 1 / -1; }
.safety-page label { display: grid; gap: 7px; color: #344a50; font-weight: 800; }
.safety-page input,
.safety-page select,
.safety-page textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cfdcda;
  border-radius: 10px;
  background: #fff;
  color: #25353a;
  padding: 11px 12px;
  font: inherit;
}
.safety-page textarea { min-height: 112px; resize: vertical; line-height: 1.5; }
.safety-page input:focus,
.safety-page select:focus,
.safety-page textarea:focus { outline: 3px solid rgba(100, 182, 162, .2); border-color: #64b6a2; }
.safety-field-help { color: #718184; font-size: 13px; font-weight: 500; line-height: 1.4; }
.safety-required::after { content: " *"; color: #b74d43; }
.safety-wizard-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; }
.safety-wizard-actions .btn { min-height: 46px; }
.safety-form-message { min-height: 22px; color: #b1443b; font-weight: 700; margin-top: 12px; }

.safety-upload-box { border: 1px dashed #9fc3bc; background: #f5fbf9; border-radius: 12px; padding: 16px; }
.safety-upload-list { margin-top: 10px; display: grid; gap: 8px; }
.safety-upload-item { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #476068; }
.safety-review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.safety-review-item { padding: 13px; background: #f6f9f8; border-radius: 10px; }
.safety-review-item span { display: block; color: #718184; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.safety-review-item strong { display: block; margin-top: 4px; white-space: pre-wrap; }
.safety-legal-note { margin-top: 16px; padding: 14px; background: #fff8ea; border: 1px solid #f0d39f; border-radius: 10px; color: #66502d; line-height: 1.5; }

.safety-confirmation { max-width: 680px; margin: 24px auto; padding: 34px; text-align: center; }
.safety-confirmation-icon { width: 62px; height: 62px; display: grid; place-items: center; margin: 0 auto 16px; border-radius: 50%; background: #dff4e7; color: #287245; font-size: 30px; font-weight: 900; }
.safety-reference { display: inline-block; margin: 18px 0; padding: 12px 18px; border-radius: 10px; background: #25353a; color: #fff; font-size: 22px; font-weight: 900; letter-spacing: .04em; }
.safety-privacy-confirmation { color: #718184; line-height: 1.55; }

.safety-dashboard-tools { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin: 20px 0 16px; }
.safety-dashboard-tools label { min-width: 160px; flex: 0 1 220px; }
.safety-dashboard-tools .search { flex: 1 1 280px; }
.safety-dashboard-list { display: grid; gap: 12px; }
.safety-report-card { display: grid; grid-template-columns: 1.1fr .8fr 1fr auto; gap: 16px; align-items: center; width: 100%; border: 1px solid #dce7e5; border-radius: 13px; background: #fff; color: inherit; padding: 17px; text-align: left; cursor: pointer; }
.safety-report-card:hover { border-color: #64b6a2; }
.safety-report-main strong { display: block; font-size: 17px; }
.safety-report-main span,
.safety-report-meta { color: #718184; font-size: 14px; line-height: 1.45; }
.safety-report-location { font-weight: 800; }
.safety-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.safety-badge { display: inline-flex; align-items: center; min-height: 25px; border-radius: 999px; padding: 4px 9px; background: #edf2f1; color: #4d6166; font-size: 11px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.safety-badge.accident,
.safety-badge.potentially_reportable { background: #fff1d9; color: #8d5a14; }
.safety-badge.near_miss,
.safety-badge.closed,
.safety-badge.not_reportable { background: #e5f5f0; color: #2e7163; }
.safety-badge.new { background: #fde9e7; color: #9c3e36; }
.safety-badge.investigating,
.safety-badge.reported { background: #e8eef9; color: #385d9d; }
.safety-badge.overdue { background: #9e3e36; color: #fff; }

.safety-detail-backdrop { padding: 20px; align-items: flex-start; overflow-y: auto; }
.safety-detail-modal { width: min(980px, 100%); max-height: calc(100dvh - 40px); overflow-y: auto; padding: 0; border-radius: 18px; }
.safety-detail-sticky { position: sticky; top: 0; z-index: 2; padding: 20px 24px; background: rgba(255,255,255,.97); border-bottom: 1px solid #dce7e5; }
.safety-detail-body { padding: 22px 24px calc(28px + env(safe-area-inset-bottom)); display: grid; gap: 18px; }
.safety-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.safety-detail-fact { background: #f5f8f7; padding: 12px; border-radius: 10px; }
.safety-detail-fact span { display: block; color: #718184; font-size: 12px; text-transform: uppercase; font-weight: 900; letter-spacing: .05em; }
.safety-detail-fact strong { display: block; margin-top: 5px; white-space: pre-wrap; line-height: 1.45; }
.safety-section { border: 1px solid #dce7e5; border-radius: 14px; padding: 18px; }
.safety-section h3 { margin-bottom: 14px; }
.safety-causes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.safety-action-list { display: grid; gap: 8px; margin: 12px 0; }
.safety-action-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; border: 1px solid #dce7e5; border-radius: 10px; padding: 12px; }
.safety-action-row.complete { opacity: .65; }
.safety-action-form { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 10px; align-items: end; }
.safety-riddor-note { padding: 13px; border-radius: 10px; background: #fff8ea; color: #66502d; margin-bottom: 14px; line-height: 1.5; }
.safety-checkbox-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.safety-checkbox-grid label { display: flex; align-items: flex-start; gap: 8px; font-weight: 600; }
.safety-checkbox-grid input { width: auto; min-height: auto; margin-top: 3px; }
.safety-attachments { display: grid; gap: 8px; }
.safety-attachment { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; border: 1px solid #dce7e5; border-radius: 9px; }

@media (max-width: 768px) {
  .safety-report-choices,
  .safety-form-grid,
  .safety-review-grid,
  .safety-detail-grid,
  .safety-causes-grid,
  .safety-checkbox-grid { grid-template-columns: 1fr; }
  .safety-panel { padding: 18px; border-radius: 13px; }
  .safety-choice-card { padding: 20px; }
  .safety-wizard-heading,
  .safety-page-header,
  .safety-dashboard-header { display: block; }
  .safety-report-card { grid-template-columns: 1fr; gap: 8px; }
  .safety-dashboard-tools { align-items: stretch; }
  .safety-dashboard-tools label { flex: 1 1 100%; }
  .safety-detail-backdrop { padding: 0; }
  .safety-detail-modal { width: 100%; max-height: 100dvh; min-height: 100dvh; border-radius: 0; }
  .safety-detail-sticky { padding: 16px; }
  .safety-detail-body { padding: 16px calc(16px + env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left)); }
  .safety-action-form { grid-template-columns: 1fr; }
  .safety-action-row { align-items: flex-start; flex-direction: column; }
  .safety-wizard-actions { position: sticky; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 2; background: rgba(255,255,255,.96); border-top: 1px solid #dce7e5; margin: 22px -18px -18px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); }
  body:has(.modal-backdrop.open) .safety-wizard-actions { bottom: 0; }
}

.safety-eyebrow { color:#4b818b; font-size:.78rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; margin-bottom:6px; }
.safety-location-add { display:flex; align-items:end; gap:12px; margin:18px 0; padding:18px; background:#fff; border:1px solid #dce7e5; border-radius:16px; }
.safety-location-add label { flex:1; display:grid; gap:7px; font-weight:700; }
.safety-location-add input, .safety-location-row input { width:100%; min-height:44px; border:1px solid #cbdad8; border-radius:10px; padding:10px 12px; background:#fff; }
.safety-location-list { display:grid; gap:10px; }
.safety-location-row { display:grid; grid-template-columns:auto minmax(180px,1fr) auto auto; gap:10px; align-items:end; padding:14px; background:#fff; border:1px solid #dce7e5; border-radius:14px; }
.safety-location-row.inactive { background:#f2f4f4; opacity:.75; }
.safety-location-row label { display:grid; gap:6px; font-weight:700; }
.safety-location-order { display:flex; gap:6px; }
.safety-location-order .btn { min-width:44px; padding:10px; }
.safety-settings-message { min-height:24px; color:#4b818b; font-weight:700; }
@media (max-width:768px) {
  .safety-location-add { align-items:stretch; flex-direction:column; }
  .safety-location-row { grid-template-columns:auto 1fr; }
  .safety-location-row > .btn { width:100%; }
}

.safety-environmental-field {
  margin:0;
  padding:0;
  border:0;
}
.safety-environmental-field legend {
  margin-bottom:6px;
  font-weight:700;
}
.safety-environmental-chips {
  display:grid;
  grid-template-columns:repeat(5, minmax(0, 1fr));
  gap:10px;
  margin-top:10px;
}
.safety-environmental-chip {
  min-height:54px;
  padding:12px 14px;
  border:2px solid #cbdad8;
  border-radius:14px;
  background:#fff;
  color:#25353a;
  font-weight:800;
  cursor:pointer;
  touch-action:manipulation;
  transition:background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.safety-environmental-chip span {
  display:none;
  margin-right:6px;
}
.safety-environmental-chip.active,
.safety-environmental-chip[aria-pressed="true"] {
  border-color:#4b818b;
  background:#4b818b;
  color:#fff;
  box-shadow:0 4px 12px rgba(75,129,139,.24);
}
.safety-environmental-chip.active span,
.safety-environmental-chip[aria-pressed="true"] span {
  display:inline;
}
.safety-environmental-chip:focus-visible {
  outline:3px solid #64b6a2;
  outline-offset:2px;
}
.safety-environmental-chip:active {
  transform:scale(.98);
}
@media (max-width:768px) {
  .safety-environmental-chips {
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
  .safety-environmental-chip {
    min-height:58px;
    font-size:1rem;
  }
}
.safety-dashboard-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.daily-check-dashboard-list{display:grid;gap:12px}.daily-check-dashboard-card{border:1px solid #dce6e4;border-radius:14px;background:#fff;overflow:hidden}.daily-check-dashboard-card.attention{border-color:#e2bd7a}.daily-check-dashboard-card summary{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:16px;cursor:pointer;list-style:none}.daily-check-dashboard-card summary::-webkit-details-marker{display:none}.daily-check-dashboard-card summary>div{display:grid;gap:4px}.daily-check-dashboard-card summary span,.daily-check-dashboard-card summary small{color:#657572;font-size:12px}.daily-check-dashboard-card summary>div:last-child{justify-items:end;min-width:0;text-align:right}.daily-check-dashboard-card .daily-check-card-names{max-width:240px;line-height:1.35;white-space:normal;overflow-wrap:anywhere}.daily-check-dashboard-body{display:grid;gap:14px;padding:0 16px 16px;border-top:1px solid #e4ecea}.daily-check-dashboard-body section{padding-top:14px}.daily-check-dashboard-body h3{margin:0 0 8px}.daily-check-dashboard-response{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;padding:9px 0;border-bottom:1px solid #edf2f1}.daily-check-dashboard-response strong{color:#356f66;text-transform:uppercase;font-size:11px}.daily-check-dashboard-response strong.issue{color:#a55e18}.daily-check-dashboard-response p{grid-column:1/-1;margin:0;color:#77501f;font-size:13px}@media(max-width:650px){.safety-dashboard-actions{width:100%}.safety-dashboard-actions .btn{flex:1}.daily-check-dashboard-card summary{align-items:flex-start}}
.daily-check-calendar-toolbar{display:flex;align-items:center;justify-content:center;gap:16px;margin:20px 0 14px}.daily-check-calendar-toolbar h3{min-width:190px;text-align:center;color:#29474d}.daily-check-calendar-layout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(340px,.85fr);gap:18px;align-items:start}.daily-check-calendar,.daily-check-day-panel{border:1px solid #dce7e5;border-radius:16px;background:#fff;box-shadow:0 8px 24px rgba(37,53,58,.05);overflow:hidden}.daily-check-calendar-weekdays,.daily-check-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.daily-check-calendar-weekdays{border-bottom:1px solid #dce7e5;background:#eef6f4}.daily-check-calendar-weekdays span{padding:10px 4px;text-align:center;color:#4b676d;font-size:11px;font-weight:900;text-transform:uppercase}.daily-check-calendar-cell{position:relative;display:flex;min-height:104px;flex-direction:column;align-items:flex-start;gap:5px;padding:9px;border:0;border-right:1px solid #e7eeec;border-bottom:1px solid #e7eeec;background:#fff;color:#25353a;text-align:left;cursor:pointer}.daily-check-calendar-cell:nth-child(7n){border-right:0}.daily-check-calendar-cell:hover{background:#f5faf8}.daily-check-calendar-cell.outside{background:#f7f9f8;cursor:default}.daily-check-calendar-cell.today{box-shadow:inset 0 0 0 2px #64b6a2}.daily-check-calendar-cell.selected{background:#e8f4f1;box-shadow:inset 0 0 0 2px #4b818b}.daily-check-calendar-cell.attention{background:#fff8eb}.daily-check-calendar-cell.attention.selected{background:#fff1d7}.daily-check-calendar-number{font-size:14px;font-weight:900}.daily-check-calendar-count{margin-top:auto;color:#2f6f61;font-size:11px;font-weight:900}.daily-check-calendar-state{color:#5e756f;font-size:10px;font-weight:800}.daily-check-calendar-cell.attention .daily-check-calendar-state{color:#9a5d13}.daily-check-calendar-empty{margin-top:auto;color:#a0adaa;font-size:10px}.daily-check-day-panel{padding:16px}.daily-check-day-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}.daily-check-day-heading span{color:#718184;font-size:11px;font-weight:900;text-transform:uppercase}.daily-check-day-heading h3{margin-top:3px}.daily-check-day-heading>strong{padding:6px 9px;border-radius:999px;background:#eaf4f1;color:#376f65;font-size:11px}.daily-check-day-empty{padding:28px 18px;border:1px dashed #cbdad8;border-radius:12px;color:#718184;text-align:center}.daily-check-day-panel .daily-check-dashboard-card summary{padding:13px}.daily-check-day-panel .daily-check-dashboard-body{padding:0 13px 13px}@media(max-width:900px){.daily-check-calendar-layout{grid-template-columns:1fr}.daily-check-calendar-cell{min-height:84px;padding:7px}.daily-check-calendar-empty{display:none}}@media(max-width:600px){.daily-check-calendar-weekdays span{font-size:9px;padding:8px 1px}.daily-check-calendar-cell{min-height:64px;gap:2px;padding:5px}.daily-check-calendar-number{font-size:12px}.daily-check-calendar-count{font-size:9px}.daily-check-calendar-state{display:none}.daily-check-calendar-toolbar{gap:10px}.daily-check-calendar-toolbar h3{min-width:150px}.daily-check-day-panel{padding:12px}}
.maintenance-log-list{display:grid;gap:12px}.maintenance-log-card{display:grid;grid-template-columns:minmax(220px,.7fr) minmax(0,1.3fr);gap:18px;padding:17px;border:1px solid #dce7e5;border-radius:14px;background:#fff}.maintenance-log-card span{color:#718184;font-size:12px}.maintenance-log-card h3{margin:5px 0}.maintenance-log-card strong{color:#4b818b}.maintenance-log-card p{margin:6px 0 0;white-space:pre-wrap;line-height:1.5}@media(max-width:650px){.maintenance-log-card{grid-template-columns:1fr;gap:10px}}
.daily-check-calendar-summary{display:grid;gap:3px;margin-top:auto}.daily-check-maintenance-count{color:#426f91;font-size:11px;font-weight:900}.daily-check-calendar-cell.has-maintenance:not(.attention){background:#f4f8fc}.daily-check-calendar-cell.has-maintenance.selected{background:#e8f1f8}.daily-check-day-section-title{margin:7px 0 1px;color:#4b676d;font-size:12px;text-transform:uppercase;letter-spacing:.06em}.calendar-maintenance-card{display:grid;gap:10px;padding:14px;border:1px solid #c9dbe8;border-left:4px solid #5d8ead;border-radius:13px;background:#f7fafc}.calendar-maintenance-card>div{display:grid;gap:5px}.calendar-maintenance-card small{color:#718184}.calendar-maintenance-card p{margin:0;white-space:pre-wrap;line-height:1.45}.safety-badge.maintenance{width:max-content;background:#e4eef5;color:#3f6d88}@media(max-width:600px){.daily-check-maintenance-count{font-size:9px}}

.water-quality-standard,.water-quality-summary{display:flex;justify-content:space-between;gap:14px;padding:14px;border:1px solid #b9d8d2;border-radius:14px;background:#f0f9f7;margin-bottom:16px}.water-quality-standard{flex-direction:column}.water-quality-standard span,.water-quality-summary small{color:#607774}.water-quality-summary>div{display:grid;gap:5px}.water-quality-summary>div:last-child{justify-items:end}.water-quality-summary.overdue{border-color:#e7b679;background:#fff8ec}.daily-check-water-count{color:#2f7781;font-weight:800}.calendar-water-card{display:grid;gap:12px;border:1px solid #b9d8d2;border-radius:14px;padding:14px;background:#f7fcfb}.calendar-water-card.review{border-color:#e7b679;background:#fff8ec}.calendar-water-card header>div{display:grid;gap:5px}.water-result-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.water-result-grid>span{display:grid;gap:3px;padding:10px;border-radius:10px;background:#fff}.water-result-grid small,.water-result-grid em,.calendar-water-card footer{font-size:12px;color:#667875}.water-result-grid em{font-style:normal}.calendar-water-card p{margin:0}.calendar-water-card footer{border-top:1px solid #dce9e6;padding-top:10px}@media(max-width:620px){.water-quality-summary{flex-direction:column}.water-quality-summary>div:last-child{justify-items:start}.water-result-grid{grid-template-columns:1fr}}
