﻿@charset "UTF-8";
/* Swizz-IT Kundenpanel - ruhig, klar und gut lesbar */

/* Grundvariablen für Farben, Schriften und Abstände */
:root {
  color-scheme: light;
  --font-sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --ink: #0f172a;
  --ink-muted: #475569;
  --ink-faint: #94a3b8;
  --brand: #2a9d8f;
  --brand-strong: #217f74;
  --brand-soft: #edfafa;
  --line: #e2e8f0;
  --radius: 14px;
  --panel-sidebar-bg: #0f1b1a;
  --panel-sidebar-surface: #162726;
  --panel-sidebar-surface-hover: #1f3533;
  --panel-accent: #2a9d8f;
  --panel-accent-soft: rgba(42, 157, 143, 0.18);
  --panel-shadow: 0 18px 32px rgba(18, 24, 40, 0.08);
}

/* Einheitliches Box-Modell */
* {
  box-sizing: border-box;
}

/* Seitenbasis */
html,
body {
  margin: 0;
  min-height: 100%;
}

/* Grundstil für den Body im Kundenpanel */
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
}

/* Zusätzliche Klasse am Body für spätere Erweiterungen */
.panel-body {
  background: var(--bg);
  color: var(--ink);
}

/* Gesamtes Portal-Layout */
.panel-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-rows: auto 1fr;
  background: var(--bg);
}

/* Mobile Header ist auf Desktop standardmässig versteckt */
.panel-mobile-header {
  display: none;
}

/* Zeile im mobilen Header */
.panel-mobile-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Logo im mobilen Header: Symbol und Schriftzug mit Abstand auf einer Höhe,
   ohne Umbruch, damit der Menüknopf auf derselben Zeile bleibt */
.panel-mobile-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.24em;
  color: #ecf4f2;
}

/* Button für mobile Navigation */
.panel-mobile-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #f4f7f6;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

/* Hover für mobile Navigation */
.panel-mobile-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
}

/* Fokusstil für mobile Navigation */
.panel-mobile-toggle:focus-visible {
  outline: 2px solid var(--panel-accent);
  outline-offset: 2px;
}

/* Linke Hauptsidebar */
.panel-sidebar {
  grid-row: 1 / span 2;
  background: linear-gradient(180deg, #0f1b1a 0%, #0a1514 100%);
  color: #f4f7f6;
  padding: 20px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  height: 100vh;
  position: sticky;
  top: 0;
  overflow: hidden;
}

/* Hauptlogo in der Sidebar */
.panel-logo {
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.28em;
  text-align: left;
  color: #e9f1ef;
}

/* Hauptnavigation in der Sidebar - scrollbar, damit Logout immer sichtbar bleibt */
.panel-main-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
  padding-right: 2px;
}

/* Einzelner Link in der Hauptnavigation */
.panel-main-link {
  position: relative;
  text-decoration: none;
  color: #d7e2df;
  background: var(--panel-sidebar-surface);
  border-radius: 14px;
  min-height: 52px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
  cursor: pointer;
  transition:
    transform 120ms ease,
    background-color 120ms ease,
    color 120ms ease,
    box-shadow 120ms ease,
    border-color 120ms ease;
}

/* Hover für Hauptnavigation */
.panel-main-link:hover {
  transform: translateY(-1px);
  background: var(--panel-sidebar-surface-hover);
  border-color: rgba(255, 255, 255, 0.18);
}

/* Fokus für Hauptnavigation */
.panel-main-link:focus-visible {
  outline: 2px solid var(--panel-accent);
  outline-offset: 2px;
}

/* Aktiver Link in der Hauptnavigation */
.panel-main-link.is-active {
  background: #213733;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(5, 10, 10, 0.35);
  border-color: rgba(42, 157, 143, 0.35);
}

/* Iconbereich im Hauptlink */
.panel-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #e7f2ef;
  flex: 0 0 auto;
}

/* SVG-Grösse im Icon */
.panel-icon svg {
  width: 20px;
  height: 20px;
}

/* Text im Hauptlink */
.panel-label {
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  font-weight: 600;
}

/* Kleines Badge wie "neu" */
.panel-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 0.55rem;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 0 4px 10px rgba(8, 16, 26, 0.35);
}

/* Logout-Bereich - immer am unteren Rand sichtbar */
.panel-logout {
  flex-shrink: 0;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Logout-Link leicht anders einfärben */
.panel-main-link--logout {
  background: rgba(255, 255, 255, 0.04);
}

/* Kleine Brand-Markierung unten */
.panel-brand {
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  color: rgba(255, 255, 255, 0.45);
}

/* Oberes Untermenü rechts vom Sidebar-Bereich */
.panel-subnav {
  grid-column: 2;
  grid-row: 1;
  background: #f6efe7;
  padding: 18px 32px 14px;
  border-bottom: 1px solid var(--line);
}

/* Titel des Untermenüs */
.panel-subnav-header {
  font-weight: 700;
  color: var(--ink-muted);
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* Liste der Untermenü-Links */
.panel-subnav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Einzelner Untermenü-Link */
.panel-subnav-link {
  text-decoration: none;
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid var(--line);
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

/* Hover für Untermenü */
.panel-subnav-link:hover {
  background: var(--surface-soft);
}

/* Aktiver Untermenü-Link */
.panel-subnav-link.is-active {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
  box-shadow: 0 10px 20px rgba(20, 38, 34, 0.18);
}

/* Fokusstil für Untermenü */
.panel-subnav-link:focus-visible {
  outline: 2px solid var(--panel-accent);
  outline-offset: 2px;
}

/* Platzhaltertext wenn kein Untermenü vorhanden ist */
.panel-subnav-empty {
  color: var(--ink-muted);
  font-size: 0.9rem;
  padding: 10px 0;
}

/* Rechter Hauptinhalt */
.panel-content {
  background: #f8f4ef;
  min-height: 100vh;
  grid-column: 2;
  grid-row: 2;
}

/* Innerer Content mit Maximalbreite */
.panel-content-inner {
  max-width: 1100px;
  padding: 28px 34px 70px;
}

/* Einheitliche Typografie für das ganze Kundenpanel */
.panel-main-link,
.panel-subnav-header,
.panel-subnav-link,
.panel-mobile-logo,
.panel-content,
.panel-content p,
.panel-content li,
.panel-content a,
.panel-content label,
.panel-content input,
.panel-content select,
.panel-content textarea,
.panel-content button,
.panel-content th,
.panel-content td,
.panel-content small,
.card__subtitle,
.panel-section__title,
.form-hint,
.empty-state,
.badge,
.status-badge {
  font-family: var(--font-sans);
}

/* Im Kundenpanel bleibt die Schrift nun einheitlich und sachlich */
.panel-content h1,
.panel-content h2,
.panel-content h3,
.panel-breadcrumb,
.card__title {
  font-family: var(--font-sans);
}

/* Lesefluss in Karten und Inhaltsblöcken ruhiger machen */
.card__subtitle,
.empty-state,
.panel-content li,
.panel-content td {
  font-size: 1rem;
  line-height: 1.6;
}

/* Alte allgemeine Layout-Klassen bleiben drin, falls Views sie nutzen */
.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Standardcontainer */
.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

/* Allgemeiner Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

/* Header-Zeile */
.header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}

/* Brand-Link */
.brand {
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
  color: var(--ink);
}

/* Einfache Navigation */
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Navigationseintrag */
.nav__link {
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
}

/* Navigation Hover */
.nav__link:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

/* Hauptbereich */
.site-main {
  padding: 30px 0 50px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 30px;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

/* Standardkarte */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  border: 1px solid var(--line);
  box-shadow: var(--panel-shadow);
}

/* Kartentitel */
.card__title {
  margin: 0 0 6px;
  font-size: 1.6rem;
  font-weight: 700;
  font-family: var(--font-sans);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

/* Kartenuntertitel */
.card__subtitle {
  margin: 0 0 18px;
  color: var(--ink-muted);
}

/* Weichere Kartenvariante */
.card--soft {
  background: var(--surface-soft);
  border-color: rgba(229, 221, 213, 0.7);
  box-shadow: none;
}

/* Titel in weicher Karte */
.card--soft .card__title {
  margin: 0 0 6px;
  font-size: 1.6rem;
  font-weight: 700;
  font-family: var(--font-sans);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

/* Untertitel in weicher Karte */
.card--soft .card__subtitle {
  margin: 0 0 12px;
}

/* Abstand zwischen Panel-Sektionen */
.panel-section {
  margin-top: 18px;
}

/* Kleine Abschnittsüberschrift */
.panel-section__title {
  margin: 0 0 12px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

/* Werkzeugleiste innerhalb einer Ansicht */
.panel-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 12px 0 16px;
}

/* Werkzeugleiste mit Aufteilung */
.panel-toolbar--split {
  justify-content: space-between;
}

/* Hover für Tabellenzeilen */
.table tbody tr:hover {
  background: rgba(42, 157, 143, 0.08);
}

/* Allgemeines Grid */
.grid {
  display: grid;
  gap: 16px;
}

/* Hilfsgrid mit 3 Spalten */
.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Primärer Button */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  border: none;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    background-color 120ms ease,
    border-color 120ms ease;
}

/* Sekundärer Button */
.button--ghost {
  background: transparent;
  color: var(--brand);
  border: 1px solid rgba(42, 157, 143, 0.35);
  cursor: pointer;
}

/* Button Hover */
.button:hover {
  background: var(--brand-strong);
  box-shadow: 0 10px 20px rgba(42, 157, 143, 0.22);
  transform: translateY(-1px);
}

/* Button Active */
.button:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Ghost Hover */
.button--ghost:hover {
  background: var(--panel-accent-soft);
}

/* Fokus für Buttons */
.button:focus-visible,
.button--ghost:focus-visible {
  outline: 2px solid var(--panel-accent);
  outline-offset: 2px;
}

/* Standardformular */
.form {
  display: grid;
  gap: 16px;
  max-width: 720px;
}

/* Feldblock */
.field {
  display: grid;
  gap: 6px;
}

/* Label in Feldern */
.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-muted);
}

/* Input-Feld */
.input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fdfbf9;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  color: var(--ink);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

/* Fokus für Input */
.input:focus {
  outline: none;
  border-color: var(--panel-accent);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.18);
}

/* Zweispaltiges Formularraster */
.panel-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}

/* Feld über gesamte Breite */
.field--full {
  grid-column: 1 / -1;
}

/* Hilfstext unter einem Feld */
.form-hint {
  margin: 4px 0 0;
  color: var(--ink-muted);
  font-size: 0.85rem;
}

/* Bereich für Formularaktionen */
.panel-form-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}

/* Standardtabelle */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

/* Tabellenzellen */
.table th,
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

/* Einfaches Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: var(--surface-soft);
  color: var(--ink-muted);
}

/* Statusbadge allgemein */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Status gut */
.status-ok {
  background: #e2eefc;
  color: #1e4aa8;
}

/* Status Warnung */
.status-warn {
  background: #fff0da;
  color: #8a5a1f;
}

/* Status aus / kritisch */
.status-off {
  background: #fde8e8;
  color: #8b2c2c;
}

/* Status neutral / Add-on nicht aktiv */
.status-neutral {
  background: #f0f0f0;
  color: #6b7280;
}

/* Leerer Zustand */
.empty-state {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--ink-muted);
}

/* Bildkachel */
.image-tile {
  padding: 14px;
}

/* Bild in Bildkachel */
.image-tile__img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(229, 221, 213, 0.9);
  background: #fff;
  display: block;
}

/* Meta-Bereich unter Bild */
.image-tile__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

/* Bildname */
.image-tile__name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
  word-break: break-word;
}

/* Aktionen zur Bildkachel */
.image-tile__actions {
  flex: 0 0 auto;
}

/* Link / URL-Bereich */
.image-tile__url {
  margin-top: 10px;
}

/* Metadaten-Zeile */
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-bottom: 12px;
}

/* Breite mittlerer Bildschirme */
@media (max-width: 1100px) {
  .panel-shell {
    grid-template-columns: 210px 1fr;
  }

  .panel-content-inner {
    padding: 26px 24px 50px;
  }
}

/* Tabletbereich */
@media (max-width: 900px) {
  .panel-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto 1fr;
  }

  .panel-mobile-header {
    display: block;
    grid-column: 1;
    grid-row: 1;
    background: linear-gradient(180deg, #0f1b1a 0%, #0a1514 100%);
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .panel-sidebar {
    grid-column: 1;
    grid-row: 2;
    display: none;
    padding: 14px 16px 16px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    height: auto;
    position: static;
    overflow: hidden;
    max-height: 80vh;
  }

  .panel-sidebar.is-open {
    display: flex;
  }

  .panel-logo,
  .panel-brand {
    display: none;
  }

  .panel-main-nav {
    flex-direction: column;
    min-width: 0;
  }

  .panel-main-link {
    min-width: 0;
    justify-content: flex-start;
  }

  .panel-subnav {
    grid-column: 1;
    grid-row: 3;
    padding: 16px 18px 14px;
  }

  .panel-content {
    grid-column: 1;
    grid-row: 4;
    min-height: auto;
  }

  .panel-content-inner {
    padding: 22px 18px 40px;
  }
}

/* Kleine Breiten */
@media (max-width: 760px) {
  .header__row {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    width: 100%;
  }

  .table {
    display: block;
    width: 100%;
    overflow-x: auto;
  }

  .table th,
  .table td {
    white-space: nowrap;
  }

  .panel-form-grid {
    grid-template-columns: 1fr;
  }

  .panel-form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .panel-form-actions .button,
  .panel-form-actions .button--ghost {
    width: 100%;
  }
}
