/* ===== Digitaler Haus-Pass (Kundenbereich /konto, Kundenansicht im Admin) =====
   Eigene Klassen mit Präfix hp-, weil tailwind.min.css nur die bisher genutzten Klassen enthält. */

.hp {
  --hp-bg: #0b1220;
  --hp-card: #111a2b;
  --hp-card-2: #0f1727;
  --hp-line: rgba(255, 255, 255, 0.08);
  --hp-line-strong: rgba(255, 255, 255, 0.16);
  --hp-text: #f3f4f6;
  --hp-muted: #9ca3af;
  --hp-dim: #6b7280;
  --hp-orange: #ea580c;
  --hp-orange-hi: #f97316;
  --hp-red: #dc2626;
  --hp-yellow: #eab308;
  --hp-green: #16a34a;
  background: var(--hp-bg);
  color: var(--hp-text);
  padding-top: 112px;
  min-height: 100vh;
}

.hp-wrap { max-width: 80rem; margin: 0 auto; padding: 0 1rem; }

/* Vorschau-Banner (Admin sieht die Kundenansicht) */
.hp-preview {
  background: rgba(234, 88, 12, 0.12);
  border-bottom: 1px solid rgba(234, 88, 12, 0.35);
  color: #fdba74;
  font-size: 0.875rem;
}
.hp-preview .hp-wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 0.6rem; padding-bottom: 0.6rem; flex-wrap: wrap; }
.hp-preview a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Unter-Navigation */
.hp-tabs { border-bottom: 1px solid var(--hp-line); }
.hp-tabs .hp-wrap { display: flex; gap: 0.25rem; overflow-x: auto; scrollbar-width: none; }
.hp-tabs .hp-wrap::-webkit-scrollbar { display: none; }
.hp-tab {
  white-space: nowrap; padding: 0.95rem 0.9rem 0.85rem; color: var(--hp-muted); font-size: 0.95rem;
  border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
.hp-tab:hover { color: #fff; }
.hp-tab.is-active { color: #fff; font-weight: 600; border-bottom-color: var(--hp-orange-hi); }
.hp-tab-end { margin-left: auto; }

/* Kopfzeile */
.hp-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.75rem 0 1.25rem; }
.hp-title { font-size: clamp(1.75rem, 3.2vw, 2.6rem); font-weight: 800; letter-spacing: -0.01em; line-height: 1.1; }
.hp-title small { display: block; font-size: 0.9rem; font-weight: 500; color: var(--hp-muted); letter-spacing: 0; margin-top: 0.4rem; }
.hp-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.hp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  border-radius: 0.5rem; padding: 0.7rem 1.25rem; font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s; cursor: pointer;
}
.hp-btn svg { width: 1.15rem; height: 1.15rem; flex-shrink: 0; }
.hp-btn-outline { border-color: rgba(249, 115, 22, 0.75); color: var(--hp-orange-hi); background: transparent; }
.hp-btn-outline:hover { background: rgba(249, 115, 22, 0.1); }
.hp-btn-danger { border-color: rgba(239, 68, 68, 0.75); color: #f87171; background: transparent; }
.hp-btn-danger:hover { background: rgba(239, 68, 68, 0.1); }
.hp-btn-primary { background: var(--hp-orange); color: #111; }
.hp-btn-primary:hover { background: var(--hp-orange-hi); }
.hp-btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* Karten */
.hp-card { background: var(--hp-card); border: 1px solid var(--hp-line); border-radius: 14px; }
.hp-card-pad { padding: 1.4rem 1.5rem; }
.hp-card h2, .hp-card-title { font-size: 1.15rem; font-weight: 700; }
.hp-link { display: flex; align-items: center; justify-content: space-between; color: var(--hp-orange-hi); font-weight: 600; font-size: 0.95rem; padding-top: 1rem; }
.hp-link:hover { color: #fdba74; }
.hp-link svg { width: 1rem; height: 1rem; }

.hp-grid-top { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
.hp-grid-bottom { display: grid; gap: 1.1rem; grid-template-columns: 1fr; margin-top: 1.1rem; padding-bottom: 3rem; }
.hp-stack { display: grid; gap: 1.1rem; align-content: start; }
@media (min-width: 1024px) {
  .hp-grid-top { grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr); }
  .hp-grid-bottom { grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr) minmax(0, 1.05fr); }
}

/* Hausbild / 3D */
.hp-house { position: relative; overflow: hidden; min-height: 300px; aspect-ratio: 16 / 10.2; background: #0a0f1a; }
.hp-house > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hp-house model-viewer { position: absolute; inset: 0; width: 100%; height: 100%; background: #0b0f19; }
.hp-house .hp-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; color: var(--hp-muted); text-align: center; padding: 1.5rem; }
.hp-house .hp-empty svg { width: 2.5rem; height: 2.5rem; color: var(--hp-dim); }
.hp-view-toggle { position: absolute; top: 1rem; left: 1rem; display: flex; gap: 0.6rem; z-index: 5; }
.hp-view-btn {
  position: relative; display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1rem; border-radius: 0.5rem;
  background: rgba(17, 26, 43, 0.85); border: 1px solid var(--hp-line-strong); color: #e5e7eb; font-weight: 500; backdrop-filter: blur(6px);
}
.hp-view-btn svg { width: 1.15rem; height: 1.15rem; }
.hp-view-btn.is-active { background: var(--hp-orange); border-color: var(--hp-orange-hi); color: #fff; }
.hp-view-btn .hp-badge { position: absolute; top: -0.65rem; right: -0.6rem; }
.hp-badge { background: #374151; color: #e5e7eb; font-size: 0.72rem; font-weight: 600; padding: 0.12rem 0.45rem; border-radius: 0.3rem; border: 1px solid rgba(255,255,255,.15); }
.hp-controls {
  position: absolute; left: 1rem; bottom: 1rem; z-index: 5; display: flex; gap: 0.25rem; padding: 0.35rem;
  background: rgba(17, 26, 43, 0.85); border: 1px solid var(--hp-line-strong); border-radius: 0.6rem; backdrop-filter: blur(6px);
}
.hp-controls button { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.75rem; border-radius: 0.4rem; color: #d1d5db; font-size: 0.9rem; }
.hp-controls button:hover { background: rgba(255,255,255,.08); color: #fff; }
.hp-controls svg { width: 1.1rem; height: 1.1rem; }
.hp-house:fullscreen { aspect-ratio: auto; border-radius: 0; }
.hp-lock { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; text-align: center; background: rgba(8, 12, 22, 0.78); backdrop-filter: blur(3px); padding: 1.5rem; }
.hp-lock svg { width: 2.4rem; height: 2.4rem; color: #d1d5db; }

/* Hotspots auf dem Hausbild */
.hp-spot { position: absolute; z-index: 3; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 0.3rem; background: none; border: 0; cursor: pointer; }
.hp-spot-dot {
  width: 2.5rem; height: 2.5rem; border-radius: 999px; display: flex; align-items: center; justify-content: center; color: #fff;
  border: 2px solid rgba(255,255,255,.85); box-shadow: 0 4px 14px rgba(0,0,0,.45); transition: transform .15s;
}
.hp-spot:hover .hp-spot-dot, .hp-spot.is-open .hp-spot-dot { transform: scale(1.1); }
.hp-spot-dot svg { width: 1.2rem; height: 1.2rem; }
.hp-spot-label { font-size: 0.8rem; font-weight: 600; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.9); background: rgba(10, 15, 26, .55); padding: 0.05rem 0.4rem; border-radius: 0.25rem; }
.hp-s-green { background: var(--hp-green); }
.hp-s-yellow { background: var(--hp-yellow); color: #1f1300; }
.hp-s-red { background: var(--hp-red); }
.hp-s-neutral { background: var(--hp-orange); }
.hp-spot-pop {
  position: absolute; z-index: 6; width: min(260px, 80%); background: #0f1727; border: 1px solid var(--hp-line-strong); border-radius: 10px;
  padding: 0.85rem 1rem; font-size: 0.85rem; box-shadow: 0 12px 30px rgba(0,0,0,.5);
}
.hp-spot-pop h3 { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.4rem; }
.hp-spot-pop dl { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.75rem; }
.hp-spot-pop dt { color: var(--hp-muted); }

/* Gebäudeindex */
.hp-index { display: grid; grid-template-columns: 1fr; gap: 1.25rem; align-items: center; }
@media (min-width: 560px) { .hp-index { grid-template-columns: 200px 1fr; } }
.hp-index-gauge { text-align: center; }
.hp-index-gauge h2 { font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; }
.hp-gauge { position: relative; width: 190px; height: 190px; margin: 0 auto; }
.hp-gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.hp-gauge-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.hp-gauge-value { font-size: 3rem; font-weight: 800; line-height: 1; }
.hp-gauge-value span { font-size: 1.35rem; font-weight: 600; color: var(--hp-muted); }
.hp-gauge-label { margin-top: 0.4rem; font-size: 0.85rem; line-height: 1.3; max-width: 8.5rem; }
.hp-bars { display: grid; gap: 0.95rem; }
.hp-bar-row { display: grid; grid-template-columns: 2.1rem 1fr; gap: 0.75rem; align-items: center; }
.hp-bar-icon { width: 2.1rem; height: 2.1rem; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--hp-line); display: flex; align-items: center; justify-content: center; color: var(--hp-orange-hi); }
.hp-bar-icon svg { width: 1.05rem; height: 1.05rem; }
.hp-bar-top { display: flex; justify-content: space-between; font-size: 0.92rem; margin-bottom: 0.4rem; }
.hp-bar-top b { font-weight: 700; }
.hp-bar-top span span { color: var(--hp-muted); }
.hp-bar { height: 5px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.hp-bar i { display: block; height: 100%; border-radius: 99px; background: var(--hp-orange); }

/* Empfehlung */
.hp-next { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; margin-top: 1rem; }
.hp-next-icon { width: 4rem; height: 4rem; border-radius: 999px; border: 1.5px solid rgba(249,115,22,.6); display: flex; align-items: center; justify-content: center; color: var(--hp-orange-hi); flex-shrink: 0; }
.hp-next-icon svg { width: 1.9rem; height: 1.9rem; }
.hp-next-text { flex: 1 1 14rem; min-width: 0; }
.hp-next-text h3 { font-weight: 700; font-size: 1.05rem; }
.hp-next-text p { color: var(--hp-muted); font-size: 0.9rem; margin-top: 0.3rem; line-height: 1.45; }

/* Listen (Aufgaben, Termine, Dokumente) */
.hp-list { margin-top: 0.9rem; }
.hp-list-row { display: flex; align-items: center; gap: 0.85rem; padding: 0.85rem 0; border-bottom: 1px solid var(--hp-line); font-size: 0.95rem; }
.hp-list-row:last-child { border-bottom: 0; }
.hp-dot { width: 0.85rem; height: 0.85rem; border-radius: 999px; flex-shrink: 0; }
.hp-dot.hp-s-green { background: var(--hp-green); }
.hp-list-meta { margin-left: auto; font-size: 0.85rem; color: var(--hp-muted); white-space: nowrap; }
.hp-list-meta.is-red { color: #f87171; }
.hp-muted { color: var(--hp-muted); }
.hp-dim { color: var(--hp-dim); }
.hp-empty-note { color: var(--hp-dim); font-size: 0.9rem; padding: 1rem 0; }

.hp-appt { display: flex; gap: 1.1rem; align-items: flex-start; margin-top: 1rem; }
.hp-appt h3 { font-weight: 700; font-size: 1.05rem; }
.hp-appt p { color: var(--hp-muted); font-size: 0.9rem; margin-top: 0.3rem; }

.hp-docs { display: flex; gap: 1.1rem; margin-top: 0.9rem; }
.hp-docs ul { flex: 1; min-width: 0; }
.hp-doc { display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0; border-bottom: 1px solid var(--hp-line); }
.hp-doc:last-child { border-bottom: 0; }
.hp-doc-name { font-size: 0.92rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-doc-meta { font-size: 0.8rem; color: var(--hp-muted); margin-top: 0.15rem; }
.hp-icon-btn { margin-left: auto; color: var(--hp-orange-hi); padding: 0.35rem; border-radius: 0.35rem; flex-shrink: 0; }
.hp-icon-btn:hover { background: rgba(249,115,22,.1); }
.hp-icon-btn svg { width: 1.2rem; height: 1.2rem; }

/* Unterseiten (Gebäudeakte, Energie, Technik, Service) */
.hp-section-grid { display: grid; gap: 1.1rem; grid-template-columns: 1fr; padding-bottom: 3rem; }
@media (min-width: 768px) { .hp-section-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .hp-section-grid.hp-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.hp-span-all { grid-column: 1 / -1; }
.hp-fields { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 1rem; margin-top: 0.9rem; font-size: 0.92rem; }
.hp-fields dt { color: var(--hp-muted); }
.hp-fields dd { text-align: right; font-weight: 500; }
.hp-trade-head { display: flex; align-items: center; gap: 0.75rem; }
.hp-trade-head .hp-spot-dot { width: 2.2rem; height: 2.2rem; border-width: 0; box-shadow: none; }
.hp-trade-head .hp-list-meta { white-space: normal; text-align: right; }
.hp-gated { position: relative; overflow: hidden; }
.hp-gated .hp-lock { border-radius: 14px; }
.hp-note { font-size: 0.9rem; color: var(--hp-muted); line-height: 1.5; margin-top: 0.75rem; white-space: pre-line; }

.hp-hidden { display: none !important; }

/* "Mein Konto" unterhalb des Haus-Pass-Kopfs; Tailwind-.hidden muss auch auf hp-Buttons wirken */
.hp-plain { padding-top: 0; min-height: 0; }
.hp .hidden { display: none !important; }
#kundenbereich.hp-compact { min-height: 0; }
.hp-dot.hp-s-neutral { background: #6b7280; }

/* Hausbild füllt auf großen Bildschirmen die ganze Kartenhöhe */
.hp-house-card { overflow: hidden; display: flex; }
.hp-house-card .hp-house { flex: 1; }
@media (min-width: 1024px) { .hp-house-card .hp-house { aspect-ratio: auto; min-height: 460px; } }
.hp-next-text { flex-basis: 10rem; }
.hp-grid-top > *, .hp-grid-bottom > *, .hp-section-grid > * { min-width: 0; }
@media (max-width: 640px) {
  .hp-list-meta { white-space: normal; text-align: right; }
  .hp-spot-label { display: none; }
  .hp-spot-dot { width: 2.1rem; height: 2.1rem; }
  .hp-controls button { padding: 0.35rem 0.5rem; font-size: 0.8rem; }
  .hp-btn { width: 100%; }
  .hp-actions { width: 100%; }
}
