/* Admin-Panel // admin.displayed-solutions.com (2026-08-25)
   Isoliertes Frontend, laeuft auf Laptop-/Desktop-Browsern
   (nicht auf der Chromium-80-Stele). */

* { box-sizing: border-box; }

/* hidden-Attribut immer durchsetzen: .login-wrap hat display:flex,
   das sonst das Attribut ueberschreiben wuerde (Bug 2026-08-25). */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f4f5f6;
  color: #1d1d1f;
}

/* ---------- Login ---------- */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  padding: 36px 32px;
  width: 100%;
  max-width: 380px;
}

.login-logo {
  font-size: 15px;
  letter-spacing: 0.06em;
  color: #b90c2e;
  margin-bottom: 18px;
}
.login-logo strong { color: #1d1d1f; }
.login-logo span { color: #6b6b70; margin-left: 8px; }

.login-card h1 { font-size: 22px; margin: 0 0 6px; }
.login-hint { font-size: 13px; color: #6b6b70; margin: 0 0 22px; }

.login-card label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }

.login-card input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #c9c9ce;
  border-radius: 8px;
  font-size: 16px;
  margin-bottom: 16px;
}

.login-error { margin-top: 14px; font-size: 13px; color: #b90c2e; min-height: 18px; }

.btn {
  border: 1px solid #c9c9ce;
  background: #fff;
  color: #1d1d1f;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: #ececed; }
.btn.is-primary { background: #b90c2e; border-color: #b90c2e; color: #fff; }
.btn.is-primary:hover { background: #9c0a26; }
.btn.is-danger { background: #fff; border-color: #b90c2e; color: #b90c2e; }
.btn.is-danger:hover { background: #fdf3f4; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------- Reset-Bestaetigung (Doppelabsicherung) ---------- */

.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}

.confirm-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  padding: 28px;
  width: 100%;
  max-width: 440px;
}

.confirm-card h3 { margin: 0 0 8px; font-size: 18px; color: #b90c2e; }
.confirm-card p { font-size: 14px; color: #4a4a4f; margin: 0 0 14px; }
.confirm-card ul { font-size: 13px; color: #4a4a4f; margin: 0 0 16px; padding-left: 18px; }
.confirm-card label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.confirm-card input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #c9c9ce;
  border-radius: 8px;
  font-size: 15px;
  margin-bottom: 18px;
}
.confirm-card .btn { margin-right: 8px; }
.confirm-error { color: #b90c2e; font-size: 13px; min-height: 18px; margin-top: 10px; }

/* ---------- Dashboard ---------- */

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: #1d1d1f;
  color: #fff;
}
.app-title { font-size: 15px; letter-spacing: 0.05em; }
.app-title strong { color: #fff; }
.app-title span { color: #b90c2e; margin-left: 8px; font-weight: 600; }
.app-header-right button { margin-left: 8px; }

.app-main { max-width: 1080px; margin: 0 auto; padding: 24px 28px 60px; }

.sync-note { font-size: 13px; color: #4a4a4f; min-height: 20px; margin-bottom: 14px; }
.sync-note.is-error { color: #b90c2e; }
.sync-note.is-ok { color: #1c7a3d; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.stat-value { font-size: 26px; font-weight: 700; }
.stat-label { font-size: 12px; color: #6b6b70; margin-top: 4px; }

.panel {
  background: #fff;
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.panel h2 { font-size: 17px; margin: 0 0 14px; }
.panel-sub { font-size: 13px; font-weight: 400; color: #6b6b70; }
.panel-hint { font-size: 12px; color: #6b6b70; margin: 12px 0 0; }
.panel-actions { margin-top: 16px; }
.panel-actions .btn { margin-right: 8px; }

.mode-row { display: flex; flex-wrap: wrap; gap: 14px; }
.mode-option {
  flex: 1 1 220px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #c9c9ce;
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
}
.mode-option input { margin-top: 3px; }
.mode-option strong { display: block; font-size: 14px; }
.mode-option small { display: block; font-size: 12px; color: #6b6b70; margin-top: 2px; }
.mode-option:has(input:checked) { border-color: #b90c2e; background: #fdf3f4; }

/* ---------- Tabelle ---------- */

.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { padding: 9px 10px; border-bottom: 1px solid #ececed; text-align: left; }
.admin-table th { font-size: 12px; color: #6b6b70; text-transform: uppercase; letter-spacing: 0.04em; }
.admin-table .num { text-align: right; }

.wprob { min-width: 260px; }
.wprob .wprob-row { display: flex; align-items: center; gap: 8px; }
.wprob input[type="range"] { flex: 1; }
.wprob .wprob-value { width: 64px; text-align: right; font-variant-numeric: tabular-nums; }
.wprob.is-disabled { opacity: 0.45; }

.lock-cell input { transform: scale(1.3); }

.weight-sum { margin-top: 12px; font-size: 14px; font-weight: 600; }
.weight-sum.is-ok { color: #1c7a3d; }
.weight-sum.is-off { color: #b90c2e; }
