@import url("/css/DIS.css");

:root {
  --bg: #f3f5f8;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #6b7280;
  --line: #d6dbe4;
  --accent: #0d5ea6;
  --accent-2: #0b7a62;
  --err: #b42318;
}
* { box-sizing: border-box; }
body.his-body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #eef3f9 0%, var(--bg) 55%, #edf2f7 100%);
}
.his-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 14px;
}
.his-head {
  margin-bottom: 12px;
}
.his-head h1 {
  margin: 6px 0 2px;
  font-size: clamp(1.25rem, 3.4vw, 1.8rem);
}
.his-head p {
  margin: 0;
  color: var(--muted);
}
.his-back {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  background: #fff;
}
.his-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}
.his-alert {
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 10px;
  font-size: .95rem;
}
.his-alert.ok {
  background: #ecfdf3;
  border: 1px solid #b7ebc6;
  color: #166534;
}
.his-alert.err {
  background: #fef3f2;
  border: 1px solid #fecdca;
  color: var(--err);
}
.his-filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.his-chip {
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: .9rem;
  color: var(--text);
  background: #fff;
}
.his-chip.active {
  background: #e7f0fb;
  border-color: #9fc3ea;
  color: #0b3f72;
}
.his-reserve-form {
  display: grid;
  gap: 10px;
}
.his-label {
  font-size: .86rem;
  color: var(--muted);
}
.his-select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  font-size: 1rem;
  background: #fff;
}
.his-list {
  display: grid;
  gap: 8px;
}
.his-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}
.his-item.locked {
  opacity: .75;
}
.his-item-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 4px;
}
.his-item-sub {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: .88rem;
}
.his-status {
  font-size: .76rem;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.st-frei { background: #ecfdf3; color: #166534; border-color: #b7ebc6; }
.st-belegt { background: #eef4ff; color: #1d4ed8; border-color: #c5d7ff; }
.st-gesperrt { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.st-abgeschlossen { background: #eff6ff; color: #1e3a8a; border-color: #bfdbfe; }
.st-abgelaufen { background: #f5f5f5; color: #444; border-color: #ddd; }
.st-default { background: #f8fafc; color: #475569; border-color: #e2e8f0; }
.his-btn {
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
}
.his-btn:disabled {
  opacity: .5;
}
.his-empty {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 14px;
  color: var(--muted);
  text-align: center;
}
.his-note {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
}
@media (min-width: 768px) {
  .his-shell { padding: 18px; }
  .his-card { padding: 14px; }
}
@media (max-width: 430px) {
  .his-shell { padding: 10px; }
  .his-item { grid-template-columns: 1fr; }
  .his-item-action { justify-self: end; }
}

.his-topbar {
  gap: 1rem;
  align-items: center;
}

.his-topbar-pills {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.his-topbar-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(15,23,42,0.65);
  color: #f9fafb;
  font-size: 0.8rem;
  line-height: 1;
  white-space: nowrap;
}

.his-topbar-pill.is-online {
  border-color: rgba(34,197,94,0.45);
  color: #bbf7d0;
}

.his-topbar-pill.is-offline {
  border-color: rgba(239,68,68,0.35);
  color: #fecaca;
}

.his-topbar-pill.is-timeout.is-warn {
  border-color: rgba(245,158,11,0.5);
  color: #fde68a;
}

.his-topbar-dot {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.9;
}

.his-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.his-title-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.his-title-row .portal-title {
  margin: 0;
}

.his-stander-wrap {
  flex: 0 0 auto;
  width: 180px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.his-stander-img {
  display: block;
  width: 180px;
  height: 60px;
  object-fit: contain;
  object-position: center;
  border: none;
  background: transparent;
}

.pill-muted {
  opacity: 0.78;
}

.his-index-links {
  max-width: 1100px;
  width: 100%;
  margin-top: 1rem;
}

@media (max-width: 900px) {
  .his-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .his-topbar-pills {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .his-title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .his-stander-wrap {
    width: auto;
    height: auto;
    justify-content: flex-start;
  }

  .his-stander-img {
    width: 170px;
    height: 56px;
  }

  .hide-sm {
    display: none;
  }
}
