:root {
  --gf-navy: #002A5C;
  --gf-blue: #0068B4;
  --gf-cyan: #009FE3;
  --gf-light-blue: #E6F2FA;
  --ios-bg: #F2F4F7;
  --ios-card: #FFFFFF;
  --ios-text: #111827;
  --ios-text-secondary: #6B7280;
  --ios-border: #E5E7EB;
  --ios-separator: rgba(60, 60, 67, 0.14);
  --status-ok: #10B981;
  --status-ok-bg: #ECFDF5;
  --status-warn: #F59E0B;
  --status-warn-bg: #FFFBEB;
  --status-defect: #EF4444;
  --status-defect-bg: #FEF2F2;
  --status-na: #6B7280;
  --status-na-bg: #F3F4F6;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 2px 10px rgba(0, 42, 92, 0.06);
  --shadow-modal: 0 20px 50px rgba(0, 22, 50, 0.28);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--ios-bg);
  color: var(--ios-text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  user-select: none;
}

input, textarea, select {
  user-select: text;
  font-family: inherit;
  font-size: 15px;
}

/* iOS Top Navigation Bar */
.ios-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 42, 92, 0.94);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  color: #ffffff;
  padding-top: var(--safe-top);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.ios-header-inner {
  max-width: 980px;
  margin: 0 auto;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--gf-cyan), var(--gf-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 159, 227, 0.35);
  flex-shrink: 0;
}

.brand-title {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.brand-subtitle {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.offline-dot-indicator {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25), 0 0 8px rgba(16, 185, 129, 0.6);
  display: inline-block;
  flex-shrink: 0;
}

.offline-dot-indicator.is-offline {
  background: #10B981; /* Auch offline grün als "Offline verfügbar", leichter Ring-Akzent */
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.35);
}

/* Collapsible Asset & Attribute Submenu Accordions */
.asset-accordion {
  border: 1px solid #CBD5E1;
  border-radius: 12px;
  background: #FFFFFF;
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.asset-accordion.is-dea {
  border-left: 4px solid var(--gf-navy);
}

.asset-accordion.is-subpump {
  border-left: 4px solid var(--gf-cyan);
  background: #FCFDFE;
}

.asset-accordion.is-standalone {
  border-left: 4px solid var(--gf-blue);
}

.asset-acc-header {
  padding: 11px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  background: linear-gradient(to right, #F8FAFC, #FFFFFF);
  user-select: none;
}

.asset-acc-header:hover {
  background: #F1F5F9;
}

.asset-acc-body {
  display: none;
  padding: 12px 14px;
  border-top: 1px solid #E2E8F0;
  background: #FFFFFF;
}

.asset-accordion.open > .asset-acc-body {
  display: block;
}

.acc-chevron {
  transition: transform 0.2s ease;
  color: #64748B;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #F1F5F9;
}

.asset-accordion.open > .asset-acc-header .acc-chevron {
  transform: rotate(180deg);
  background: var(--gf-light-blue);
  color: var(--gf-navy);
}

/* Nested DEA Sub-Pumps Container */
.dea-children-container {
  margin-left: 22px;
  padding-left: 14px;
  border-left: 2px dashed #93C5FD;
  margin-top: 6px;
  margin-bottom: 12px;
}

@media (max-width: 600px) {
  .dea-children-container {
    margin-left: 10px;
    padding-left: 10px;
  }
}

/* Attribute Submenu (Untermenü auf- und zuklappbar) */
.attr-submenu {
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  margin-bottom: 8px;
  background: #F8FAFC;
  overflow: hidden;
}

.attr-submenu-header {
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gf-navy);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: #F1F5F9;
  transition: background-color 0.15s;
}

.attr-submenu-header:hover {
  background: #E2E8F0;
}

.attr-submenu-body {
  display: none;
  padding: 12px;
  background: #FFFFFF;
  border-top: 1px solid #E2E8F0;
}

.attr-submenu.open > .attr-submenu-body {
  display: block;
}

.attr-submenu .sub-chevron {
  transition: transform 0.18s ease;
  font-size: 11px;
  color: #475569;
}

.attr-submenu.open > .attr-submenu-header .sub-chevron {
  transform: rotate(180deg);
}

/* Main App Container */
.app-container {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 16px calc(92px + var(--safe-bottom)) 16px;
}

/* Views */
.view-section {
  display: none;
  animation: fadeIn 0.18s ease-out;
}

.view-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* KPI Summary Row */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

@media (max-width: 640px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.kpi-card {
  background: var(--ios-card);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(0, 42, 92, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kpi-label {
  font-size: 12px;
  color: var(--ios-text-secondary);
  font-weight: 500;
}

.kpi-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--gf-navy);
  margin-top: 4px;
  letter-spacing: -0.5px;
}

.kpi-card.kpi-ok .kpi-value { color: var(--status-ok); }
.kpi-card.kpi-defect .kpi-value { color: var(--status-defect); }
.kpi-card.kpi-blue .kpi-value { color: var(--gf-blue); }

/* iOS Search & Filter Bar */
.toolbar-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.ios-search-box {
  flex: 1;
  min-width: 210px;
  position: relative;
}

.ios-search-box input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border-radius: 11px;
  border: 1px solid var(--ios-border);
  background: #FFFFFF;
  color: var(--ios-text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ios-search-box input:focus {
  border-color: var(--gf-blue);
  box-shadow: 0 0 0 3px rgba(0, 104, 180, 0.15);
}

.ios-search-box svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ios-text-secondary);
}

/* Segmented Control */
.ios-segmented {
  display: inline-flex;
  background: #E5E7EB;
  padding: 3px;
  border-radius: 10px;
  gap: 2px;
}

.ios-segment-btn {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #4B5563;
  cursor: pointer;
  transition: all 0.15s;
}

.ios-segment-btn.active {
  background: #FFFFFF;
  color: var(--gf-navy);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 11px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: transform 0.1s, background-color 0.15s, opacity 0.15s;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gf-blue), var(--gf-navy));
  color: #FFFFFF;
  box-shadow: 0 3px 10px rgba(0, 104, 180, 0.25);
}

.btn-accent {
  background: var(--gf-cyan);
  color: #FFFFFF;
}

.btn-secondary {
  background: #FFFFFF;
  color: var(--gf-navy);
  border: 1px solid var(--ios-border);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  padding: 7px 11px;
  font-size: 13px;
}

.btn-danger {
  background: var(--status-defect-bg);
  color: var(--status-defect);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.btn-sm {
  padding: 6px 11px;
  font-size: 12.5px;
  border-radius: 8px;
}

/* Cards & Lists */
.ios-card {
  background: var(--ios-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(0, 42, 92, 0.06);
  margin-bottom: 16px;
  overflow: hidden;
}

.ios-card-header {
  padding: 14px 16px;
  background: linear-gradient(to right, #F8FAFC, #FFFFFF);
  border-bottom: 1px solid var(--ios-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ios-card-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--gf-navy);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.ios-card-body {
  padding: 16px;
}

/* Inspection List Item Card */
.inspection-item-card {
  background: var(--ios-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(0, 42, 92, 0.08);
  transition: transform 0.12s, border-color 0.15s;
  cursor: pointer;
}

.inspection-item-card:hover {
  border-color: var(--gf-cyan);
}

.insp-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.insp-protocol-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--gf-blue);
  background: var(--gf-light-blue);
  padding: 3px 9px;
  border-radius: 6px;
  letter-spacing: 0.2px;
}

.insp-status-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pill-passed { background: var(--status-ok-bg); color: #047857; }
.pill-conditional { background: var(--status-warn-bg); color: #B45309; }
.pill-failed { background: var(--status-defect-bg); color: #B91C1C; }
.pill-draft { background: #EEF2FF; color: #4338CA; }

.insp-title {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ios-text);
  margin: 0 0 4px 0;
}

.insp-subtitle {
  font-size: 13.5px;
  color: var(--ios-text-secondary);
  margin: 0 0 12px 0;
}

.insp-meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--ios-border);
  font-size: 12.5px;
  color: #4B5563;
  align-items: center;
  justify-content: space-between;
}

.insp-stats-pills {
  display: flex;
  gap: 6px;
  align-items: center;
}

.mini-stat {
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 11.5px;
}

/* Editor Step Navigation */
.editor-stepper {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 14px;
  scrollbar-width: none;
}

.editor-stepper::-webkit-scrollbar {
  display: none;
}

.step-tab {
  flex: 1;
  min-width: 125px;
  background: #FFFFFF;
  border: 1px solid var(--ios-border);
  border-radius: 11px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ios-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.15s;
}

.step-tab.active {
  background: var(--gf-navy);
  color: #FFFFFF;
  border-color: var(--gf-navy);
  box-shadow: 0 3px 10px rgba(0, 42, 92, 0.2);
}

.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 42, 92, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 700;
}

.step-tab.active .step-num {
  background: var(--gf-cyan);
  color: #FFFFFF;
}

/* Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 640px) {
  .form-grid, .form-grid-3 {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #374151;
  display: flex;
  justify-content: space-between;
}

.form-label span.unit-hint {
  color: var(--gf-blue);
  font-weight: 700;
}

.ios-input, .ios-select, .ios-textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #D1D5DB;
  background: #F9FAFB;
  color: var(--ios-text);
  transition: border-color 0.15s, background-color 0.15s;
}

.ios-input:focus, .ios-select:focus, .ios-textarea:focus {
  outline: none;
  background: #FFFFFF;
  border-color: var(--gf-blue);
  box-shadow: 0 0 0 3px rgba(0, 104, 180, 0.14);
}

/* Checklist Item Row */
.checklist-item {
  border: 1px solid var(--ios-border);
  border-radius: 13px;
  padding: 14px;
  margin-bottom: 12px;
  background: #FFFFFF;
  transition: border-color 0.15s, background-color 0.15s;
}

.checklist-item.status-ok {
  border-left: 5px solid var(--status-ok);
}

.checklist-item.status-warn {
  border-left: 5px solid var(--status-warn);
  background: #FFFDF7;
}

.checklist-item.status-defect {
  border-left: 5px solid var(--status-defect);
  background: #FFF9F9;
}

.checklist-item.status-na {
  border-left: 5px solid var(--status-na);
  opacity: 0.85;
}

.chk-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

@media (max-width: 620px) {
  .chk-header {
    flex-direction: column;
  }
}

.chk-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--ios-text);
  margin: 0 0 3px 0;
}

.chk-hint {
  font-size: 12.5px;
  color: var(--ios-text-secondary);
  margin: 0;
}

/* 4-Button Status Selector for iOS Touch */
.status-selector {
  display: inline-flex;
  background: #F3F4F6;
  padding: 3px;
  border-radius: 10px;
  gap: 3px;
  flex-shrink: 0;
}

.status-btn {
  border: none;
  background: transparent;
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: #4B5563;
  cursor: pointer;
  transition: all 0.12s;
}

.status-btn.active-ok {
  background: var(--status-ok);
  color: #FFFFFF;
}

.status-btn.active-warn {
  background: var(--status-warn);
  color: #FFFFFF;
}

.status-btn.active-defect {
  background: var(--status-defect);
  color: #FFFFFF;
}

.status-btn.active-na {
  background: var(--status-na);
  color: #FFFFFF;
}

.chk-details-row {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

@media (max-width: 640px) {
  .chk-details-row {
    grid-template-columns: 1fr;
  }
}

/* Photo Thumbnails inside Checklist Item */
.photo-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.photo-thumb-wrap {
  position: relative;
  width: 78px;
  height: 78px;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--ios-border);
  background: #000;
}

.photo-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.photo-del-btn {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.92);
  color: #fff;
  border: none;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Signature Canvas Box */
.signature-pad-wrap {
  border: 2px dashed #CBD5E1;
  border-radius: 12px;
  background: #FFFFFF;
  position: relative;
  height: 170px;
  overflow: hidden;
  touch-action: none;
}

.signature-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

.signature-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: #9CA3AF;
  font-size: 13.5px;
}

/* Bottom iOS Tab Bar */
.ios-tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--ios-separator);
  padding-bottom: var(--safe-bottom);
}

.ios-tabbar-inner {
  max-width: 600px;
  margin: 0 auto;
  height: 62px;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.tabbar-item {
  flex: 1;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #6B7280;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
}

.tabbar-item.active {
  color: var(--gf-blue);
}

.tabbar-item svg {
  width: 23px;
  height: 23px;
}

/* Modal / iOS Sheet */
.ios-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 18, 40, 0.55);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.ios-modal-backdrop.open {
  display: flex;
}

.ios-modal {
  background: #FFFFFF;
  border-radius: 20px;
  width: 100%;
  max-width: 660px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-modal);
  overflow: hidden;
}

.ios-modal-header {
  padding: 15px 18px;
  background: var(--gf-navy);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ios-modal-body {
  padding: 18px;
  overflow-y: auto;
}

.ios-modal-footer {
  padding: 12px 18px;
  background: #F8FAFC;
  border-top: 1px solid var(--ios-border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Toast Notification */
.ios-toast {
  position: fixed;
  top: calc(68px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(17, 24, 39, 0.94);
  color: #FFFFFF;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0,0,0,0.22);
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: all 0.22s ease;
}

.ios-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   DIN A4 PRINT / PDF EXPORT REPORT STYLING (Grundfos Service Protocol)
   ========================================================================== */
.print-report-sheet {
  background: #FFFFFF;
  color: #111827;
  padding: 28px;
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--ios-border);
}

.report-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 3px solid var(--gf-navy);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.report-brand-block h1 {
  margin: 0;
  font-size: 22px;
  color: var(--gf-navy);
  letter-spacing: -0.3px;
}

.report-brand-block p {
  margin: 3px 0 0 0;
  font-size: 12.5px;
  color: #4B5563;
}

.report-meta-box {
  text-align: right;
  font-size: 12.5px;
}

.report-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.report-info-box {
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  padding: 10px 12px;
  background: #F8FAFC;
}

.report-info-box h4 {
  margin: 0 0 8px 0;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--gf-navy);
  border-bottom: 1px solid #E2E8F0;
  padding-bottom: 4px;
}

.report-kv-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  padding: 2.5px 0;
}

.report-kv-row span:first-child {
  color: #64748B;
}

.report-kv-row span:last-child {
  font-weight: 600;
  color: #0F172A;
  text-align: right;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  margin-bottom: 16px;
}

.report-table th {
  background: var(--gf-navy);
  color: #FFFFFF;
  text-align: left;
  padding: 7px 10px;
  font-size: 12px;
}

.report-table td {
  padding: 7px 10px;
  border-bottom: 1px solid #E2E8F0;
  vertical-align: top;
}

.report-sign-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 22px;
  page-break-inside: avoid;
}

.report-sign-box {
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  padding: 10px 14px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@media print {
  body {
    background: #FFFFFF !important;
    font-size: 11.5pt;
  }
  .ios-header,
  .ios-tabbar,
  .no-print {
    display: none !important;
  }
  .app-container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .view-section {
    display: none !important;
  }
  #view-report-preview {
    display: block !important;
  }
  .print-report-sheet {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
  }
}

/* ==========================================================================
   USER MANAGEMENT & PASSWORD LOGIN OVERLAY (v6.1)
   ========================================================================== */
.auth-login-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(145deg, #001B3D 0%, #002A5C 50%, #004B87 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.auth-login-overlay.hidden {
  display: none !important;
}

.auth-login-card {
  width: 100%;
  max-width: 430px;
  background: #FFFFFF;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.auth-login-header {
  background: linear-gradient(135deg, #002A5C, #00518F);
  color: #FFFFFF;
  padding: 24px 24px 20px 24px;
  text-align: center;
}

.auth-login-body {
  padding: 22px 24px 24px 24px;
}

.user-quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #F1F5F9;
  color: #1E293B;
  border: 1px solid #CBD5E1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.user-quick-chip:hover,
.user-quick-chip.active {
  background: #E0F2FE;
  color: #0369A1;
  border-color: #38BDF8;
}

.user-header-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.22);
  cursor: pointer;
}

.user-header-pill:hover {
  background: rgba(255, 255, 255, 0.24);
}

.user-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
}

.user-role-admin {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
}

.user-role-tech {
  background: #E0F2FE;
  color: #075985;
  border: 1px solid #BAE6FD;
}
