/* Wartungstool globaler Basis-Style
   Version: v13.1.0 – Selfhosted Betriebsportal
   Minimaler Layer: vereinheitlicht Grundelemente, ohne Modulstyles zu ersetzen. */
:root {
  --wt-color-bg: #f3f4f6;
  --wt-color-card: #ffffff;
  --wt-color-text: #111827;
  --wt-color-muted: #6b7280;
  --wt-color-border: #e5e7eb;
  --wt-color-primary: #2563eb;
  --wt-color-primary-dark: #1d4ed8;
  --wt-color-danger: #dc2626;
  --wt-radius-card: 16px;
  --wt-radius-control: 10px;
  --wt-shadow-card: 0 10px 25px rgba(15, 23, 42, 0.12);
  --wt-font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--wt-font-family); color: var(--wt-color-text); }
button, input, select, textarea { font: inherit; }
input, select, textarea { max-width: 100%; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(37, 99, 235, 0.28);
  outline-offset: 1px;
}
button:disabled, .primary:disabled, .secondary:disabled, .danger:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
.card { background: var(--wt-color-card); }
.page-header small, .muted, .field-hint { color: var(--wt-color-muted); }
.data-table th, .table th { color: #374151; }
.wt-version-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  font-size: 11px;
  font-weight: 600;
}
@media (max-width: 760px) {
  .page-header { gap: 10px; }
  .form-inline, .filters { align-items: stretch; }
}

.wt-version {
  display: block;
  margin-top: 2px;
  color: var(--wt-color-muted);
}

/* Betriebsportal v13.4.3 – Offline-Status Störungen / QS-Rundgänge */
.wt-offline-indicator{
  position:fixed;
  top:14px;
  right:14px;
  z-index:100050;
  display:flex;
  align-items:center;
  gap:9px;
  max-width:min(520px,calc(100vw - 28px));
  padding:9px 12px;
  border:1px solid #f59e0b;
  border-radius:12px;
  background:#fffbeb;
  color:#92400e;
  box-shadow:0 10px 30px rgba(15,23,42,.18);
  font-size:13px;
  font-weight:700;
  line-height:1.25;
}
.wt-offline-indicator.is-hidden{display:none}
.wt-offline-indicator .wt-offline-icon{
  flex:0 0 auto;
  display:inline-grid;
  place-items:center;
  width:24px;
  height:24px;
  border-radius:50%;
  background:#f59e0b;
  color:#fff;
  font-size:17px;
  font-weight:900;
}
.wt-offline-indicator .wt-offline-text{min-width:0}
.wt-offline-indicator .wt-offline-sync-button{
  appearance:none;
  border:1px solid currentColor;
  border-radius:8px;
  background:rgba(255,255,255,.72);
  color:inherit;
  padding:6px 9px;
  font:inherit;
  font-size:12px;
  cursor:pointer;
  white-space:nowrap;
}
.wt-offline-indicator.is-syncing{border-color:#3b82f6;background:#eff6ff;color:#1d4ed8}
.wt-offline-indicator.is-syncing .wt-offline-icon{background:#3b82f6;animation:wtOfflinePulse 1s infinite alternate}
.wt-offline-indicator.has-error{border-color:#dc2626;background:#fef2f2;color:#991b1b}
.wt-offline-indicator.has-error .wt-offline-icon{background:#dc2626}
.wt-offline-indicator.is-success{border-color:#16a34a;background:#f0fdf4;color:#166534}
.wt-offline-indicator.is-success .wt-offline-icon{background:#16a34a}
@keyframes wtOfflinePulse{from{opacity:.55;transform:scale(.92)}to{opacity:1;transform:scale(1.05)}}
@media (max-width:720px){
  .wt-offline-indicator{top:8px;right:8px;left:8px;max-width:none;justify-content:flex-start}
  .wt-offline-indicator .wt-offline-sync-button{margin-left:auto}
  body:has(.wt-offline-indicator:not(.is-hidden)){padding-top:54px}
}
.wt-offline-dialog-backdrop{position:fixed;inset:0;z-index:100060;background:rgba(15,23,42,.5);display:flex;align-items:center;justify-content:center;padding:18px}
.wt-offline-dialog{width:min(760px,100%);max-height:min(82vh,760px);overflow:auto;background:#fff;border-radius:18px;padding:22px;box-shadow:0 28px 80px rgba(15,23,42,.32);color:#111827}
.wt-offline-dialog h2{margin:0 0 8px;font-size:24px}.wt-offline-dialog>p{margin:0 0 16px;color:#4b5563;line-height:1.5}
.wt-offline-dialog-list{display:grid;gap:12px}.wt-offline-dialog-item{border:1px solid #fecaca;background:#fff7f7;border-radius:12px;padding:14px}
.wt-offline-dialog-meta{margin-top:3px;font-size:12px;color:#6b7280}.wt-offline-dialog-item p{white-space:pre-wrap;color:#7f1d1d}
.wt-offline-dialog-actions,.wt-offline-dialog-footer{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}
.wt-offline-dialog-actions button,.wt-offline-dialog-footer button{appearance:none;border:1px solid #9ca3af;border-radius:9px;background:#fff;padding:8px 11px;font:inherit;cursor:pointer}
.wt-offline-dialog-actions button.danger{border-color:#dc2626;color:#991b1b;background:#fef2f2}.wt-offline-dialog-footer{margin-top:18px}
