/* Howanti – Design-Schicht für Howanti Konto (nach dem Howanti-Design-System).
   Lädt nach konto.css und intro.css: Schriften, dezente Welle im Hintergrund, Glas-Flächen,
   Verlaufs-Knöpfe, aktiver Bereich als Glas-Knopf, eigene Rollbalken. Farben kommen aus theme.css. */

/* ---------- Schriften (liegen auf dem eigenen Server) ---------- */
@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/inter-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/inter-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/inter-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: Manrope; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/manrope-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: Manrope; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/manrope-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: Manrope; font-style: normal; font-weight: 800; font-display: swap; src: url(/fonts/manrope-latin-800-normal.woff2) format("woff2"); }

body { font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif; font-size: 14.5px; }
h1, h2, h3, .wordmark, .auth-title, .page-head h1, .kpi b, .dialog-head h2 { font-family: Manrope, Inter, "Segoe UI", system-ui, sans-serif; }

/* ---------- Hintergrund: Farbschein + sehr dezente Welle ---------- */
html { background: var(--bg); }
body {
  background:
    radial-gradient(800px 480px at 88% -10%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 60%),
    radial-gradient(700px 420px at 5% 110%, color-mix(in srgb, var(--accent-2) 11%, transparent), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  position: relative;
  isolation: isolate;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: var(--wave-opacity);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 900' preserveAspectRatio='xMidYMid slice'%3E%3Cpath d='M0 640 C 240 560, 420 720, 720 650 S 1200 520, 1440 600' fill='none' stroke='%23ff9a1f' stroke-opacity='0.18' stroke-width='1.5'/%3E%3Cpath d='M0 690 C 260 610, 460 770, 760 700 S 1220 570, 1440 650' fill='none' stroke='%23ff6a00' stroke-opacity='0.14' stroke-width='1.2'/%3E%3Cpath d='M0 740 C 280 660, 500 820, 800 750 S 1240 620, 1440 700' fill='none' stroke='%23ff9a1f' stroke-opacity='0.10' stroke-width='1'/%3E%3Cpath d='M0 900 L0 760 C 300 690, 520 850, 840 780 S 1260 660, 1440 730 L1440 900 Z' fill='%23ff9a1f' fill-opacity='0.035'/%3E%3C/svg%3E") center / cover no-repeat;
}

/* ---------- Rollbalken ---------- */
* { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }

/* ---------- Glas ---------- */
.card, .kpi, .notice:not(.warn), .dialog, .app-panel, .toast, .consent-field, .pkg-box, .flag-item, .auth-card, .test-box {
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom));
  border: 1px solid var(--glass-edge);
  box-shadow: inset 0 1px 0 var(--glass-highlight), 0 14px 40px rgba(0, 0, 0, 0.18);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  backdrop-filter: blur(18px) saturate(1.15);
}
:root[data-theme="light"] .card, :root[data-theme="light"] .kpi, :root[data-theme="light"] .auth-card, :root[data-theme="light"] .dialog { box-shadow: inset 0 1px 0 var(--glass-highlight), 0 14px 40px rgba(20, 40, 90, 0.08); }
.card { border-radius: 20px; }
.kpi { border-radius: 16px; }
.kpis.small .kpi, .apps li, .pkg-list li, .mail-text, .consent-text { background: var(--tile); border: 1px solid var(--tile-edge); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.dialog { border-radius: 22px; background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 94%, transparent), color-mix(in srgb, var(--bg) 92%, transparent)); }
.backdrop { background: rgba(3, 6, 13, 0.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.app-panel { border-radius: 18px; background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 92%, transparent), color-mix(in srgb, var(--bg) 88%, transparent)); }
.toast { border-radius: 14px; }
.notice.warn { border: 1px solid color-mix(in srgb, var(--warn-text) 30%, transparent); }
.notice.ok { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }

/* ---------- Kopfzeile ---------- */
/* Glas liegt auf ::before – backdrop-filter direkt auf der Kopfzeile würde das App-Fenster (position: fixed) an die Kopfzeile binden */
.topbar { position: sticky; top: 0; z-index: 40; border: 0; border-radius: 0; padding: 10px 22px; background: transparent; box-shadow: inset 0 -1px 0 var(--glass-edge); isolation: isolate; }
.topbar::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom)); -webkit-backdrop-filter: blur(18px) saturate(1.15); backdrop-filter: blur(18px) saturate(1.15); }
.wordmark { font-size: 20px; letter-spacing: -0.02em; }
.wm-a { font-weight: 800; }
.wm-b { font-weight: 800; color: var(--accent); margin-left: 0.28em; }
:root[data-theme="light"] .wm-b { color: var(--accent-2); }
.logo { border-radius: 0; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25)); }

/* Aktiver Bereich als Glas-Knopf */
.glassy-active, .topnav a.active, .op-tabs button.active, .app-tile.current {
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03)),
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 24%, transparent), color-mix(in srgb, var(--accent-2) 12%, transparent));
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.30), 0 6px 20px color-mix(in srgb, var(--accent) 18%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
:root[data-theme="light"] .topnav a.active, :root[data-theme="light"] .op-tabs button.active, :root[data-theme="light"] .app-tile.current {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 6px 18px color-mix(in srgb, var(--accent) 18%, transparent);
}
.topnav { gap: 6px; }
.topnav a { border: 1px solid transparent; border-radius: 12px; }
.topnav a:hover:not(.active) { background: var(--tile); color: var(--text); }
.topnav a.active .icon { color: var(--accent); }
:root[data-theme="light"] .topnav a.active .icon { color: var(--accent-2); }

.op-tabs { gap: 6px; padding: 4px; border: 1px solid var(--glass-edge); border-radius: 14px; background: var(--tile); scrollbar-width: none; }
.op-tabs button { border: 1px solid transparent; border-radius: 11px; min-height: 40px; }
.op-tabs button:hover:not(.active) { color: var(--text); background: var(--tile); }

.tabs { border-bottom: 1px solid var(--line); }
.tabs a.active { border-bottom: 3px solid var(--accent); }

.app-tile { border: 1px solid transparent; }
.app-tile:hover:not(.current) { background: var(--tile); }
.app-tile-icon img { border-radius: 0; object-fit: contain; }
.app-tile-here { color: var(--accent-text); }

.icon-btn { border-radius: 12px; }
.icon-btn:hover { background: var(--tile); }

/* ---------- Knöpfe ---------- */
.btn { border-radius: 12px; font-weight: 600; background: var(--input); border: 1px solid var(--line-strong); }
.btn:hover:not(:disabled) { border-color: color-mix(in srgb, var(--accent) 45%, var(--line-strong)); }
.btn.accent {
  border: 0; color: var(--accent-ink); font-weight: 700;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  box-shadow: 0 8px 24px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn.accent:hover:not(:disabled) { filter: brightness(1.06); }
.btn.ghost {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02)),
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 16%, transparent), color-mix(in srgb, var(--accent-2) 8%, transparent));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
:root[data-theme="light"] .btn.ghost { border-color: color-mix(in srgb, var(--accent) 35%, var(--line-strong)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9); }
.btn.ghost:hover:not(:disabled) { background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)), linear-gradient(90deg, color-mix(in srgb, var(--accent) 24%, transparent), color-mix(in srgb, var(--accent-2) 12%, transparent)); }
.btn.danger { background: var(--danger); border: 0; color: #fff; }

/* ---------- Eingaben ---------- */
input[type="text"], input[type="password"], input[type="search"], input[type="email"], input[type="number"], input:not([type]), select, textarea {
  border-radius: 12px; border-color: var(--line-strong); background: var(--input);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
input::placeholder { color: var(--soft); }
.field { font-weight: 600; color: var(--muted); font-size: 13px; }
.check input, .radio input { accent-color: var(--accent); }
:focus-visible { outline-color: var(--accent); }

/* Umschalter */
.switch input:checked + .switch-ui { background: linear-gradient(90deg, var(--accent-2), var(--accent)); box-shadow: 0 0 12px var(--accent-glow); }
.seg { border-radius: 12px; background: var(--tile); border-color: var(--glass-edge); }
.seg button.on { background: var(--accent-tint); color: var(--text); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18); }
.lang-switch { border-color: var(--line-strong); border-radius: 12px; padding: 2px; gap: 2px; background: var(--input); }
.lang-btn { min-height: 44px; min-width: 44px; border-radius: 9px; }
.lang-btn + .lang-btn { border-left: 0; }
.lang-btn:hover { background: var(--tile); }
.lang-btn.on { background: var(--accent-tint); color: var(--text); }

/* Kennzeichen */
.pill { background: var(--tile); border: 1px solid var(--tile-edge); }
.pill.ok { background: color-mix(in srgb, var(--success) 16%, transparent); color: var(--success); border-color: transparent; }
.pill.warn { background: color-mix(in srgb, var(--warn-text) 16%, transparent); color: var(--warn-text); border-color: transparent; }
.pill.bad { border-color: transparent; }
.table th { color: var(--soft); border-bottom-color: var(--line); }
.op-table tbody tr:hover { background: var(--tile); }

/* ---------- Anmelde-Seiten wie im Entwurf ---------- */
.auth { align-items: stretch; }
.auth-brand { background: transparent; padding: 48px 56px; }
.brand-copy h1 { font-size: clamp(30px, 3.6vw, 42px); letter-spacing: -0.02em; }
.brand-copy p { font-size: 16px; line-height: 1.6; }
.brand-row .logo { filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.3)); }
.auth-main { padding: 24px 32px; }
.auth-card { max-width: 440px; padding: 28px; border-radius: 22px; gap: 16px; margin: auto; }
.auth-title { font-size: 24px; }
.auth-card .btn.big { min-height: 48px; font-size: 15px; }
.app-logos { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.app-logos li { width: 52px; height: 52px; border-radius: 14px; background: var(--tile); border: 1px solid var(--glass-edge); display: flex; align-items: center; justify-content: center; }
.app-logos img { width: 36px; height: 36px; object-fit: contain; }
@media (max-width: 820px) {
  .auth-brand { padding: 20px; }
  .auth-main { padding: 8px 16px 24px; }
  .auth-card { padding: 20px 18px; }
  .app-logos { display: none; }
}

/* Seitenkopf */
.page-head h1 { font-size: 28px; letter-spacing: -0.02em; }
.card h2 { font-size: 17px; }
.card h3 { color: var(--soft); }
.kpi span { color: var(--soft); }

/* Profilbilder etwas zur Farbwelt passend */
.c0 { background: #3b5bdb; } .c1 { background: #7048e8; } .c2 { background: #0c8599; } .c3 { background: #d9480f; }
.c4 { background: #9c36b5; } .c5 { background: #2b8a3e; } .c6 { background: #c2255c; } .c7 { background: #1971c2; }

/* Diagramme in Produktfarben */
.bar.s1, .sw.s1 { fill: #ff9a1f; background: #ff9a1f; } .line.s1 { stroke: #ff9a1f; }
:root[data-theme="dark"] .bar.s1, :root[data-theme="dark"] .sw.s1 { fill: #ff9a1f; background: #ff9a1f; }
:root[data-theme="dark"] .line.s1 { stroke: #ff9a1f; }
.bar.s2, .sw.s2 { fill: #19b0f0; background: #19b0f0; } .line.s2 { stroke: #19b0f0; }

/* Ohne Unschärfe (alte Browser) oder wenn weniger Transparenz gewünscht ist: feste Flächen */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card, .kpi, .dialog, .app-panel, .toast, .consent-field, .pkg-box, .flag-item, .auth-card, .topbar::before { background: var(--panel); }
}
@media (prefers-reduced-transparency: reduce) {
  .card, .kpi, .dialog, .app-panel, .toast, .consent-field, .pkg-box, .flag-item, .auth-card, .topbar::before { background: var(--panel); -webkit-backdrop-filter: none; backdrop-filter: none; }
  body::before { display: none; }
}
@media (max-width: 700px) {
  .topbar { padding: 8px 12px; }
}
