/* frontend/style.css
   NAVIPRAX – App Styles (Layout + Components + Pages)
   Hinweis: Theme-Tokens (Dark/Light + Tenant-Farben) sind jetzt ausgelagert nach:
   /frontend/css/np.theme.css
*/
/* RESET (vereinfachte Variante) */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font-family-sans);
  background: var(--app-bg-gradient);
  color: var(--color-text);
}
/* SPLASH SCREEN */

.app-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
    background: var(--app-bg-gradient);
  transition: opacity 0.4s ease-out, visibility 0.4s ease-out;
}

.app-splash--hidden {
  opacity: 0;
  visibility: hidden;
}

.app-splash__inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.app-splash__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  /* keine eigene Fläche / kein Rahmen / kein Shadow */
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  box-shadow: none;
}

.app-splash__logo img {
  width: 96px;
  height: 96px;
  object-fit: block;
}

.app-splash__title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.26em; /* stärkeres Spacing für CI-Look */
  text-transform: uppercase;
  font-family: "Arial Rounded MT Bold", "Arial Rounded MT",
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-splash__subtitle {
  font-size: 13px;
  color: rgba(148, 163, 184, 0.9);
}

/* ---------------------------------------
   APP LAYOUT
---------------------------------------- */

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* HEADER */

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-lg);
  border-bottom: 1px solid var(--color-border-soft);
  backdrop-filter: blur(18px);
  /* Gradient im Stil des Screenshots, mit der globalen Highlightfarbe */
    background: linear-gradient(
    to right,
    var(--color-primary),
    var(--color-primary-secondary)
  );
  position: sticky;
  top: 0;
  z-index: 20;
}

.app-header__left,
.app-header__right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.app-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.app-logo__mark {
  width: 177px;
  height: 25px;
  border-radius: 9px;
background: radial-gradient(
    circle at top left,
    color-mix(in srgb, var(--color-primary-secondary) 40%, var(--color-primary) 60%),
    var(--color-primary)
  );
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
}

.app-logo__img {
  width: 177px;         /* an dein Logo anpassen */
  height: 25px;
  border-radius: 9px;  /* wenn du die abgerundete Kachel behalten willst */
  object-fit: contain; /* Logo wird sauber eingepasst */
  display: block;
}

.app-header__divider {
  width: 1px;
  height: 28px;
  background: linear-gradient(to bottom, transparent, #e5e7eb, transparent);
  opacity: 0.5;
}

.app-header__practice,
.app-header__location {
  display: flex;
  flex-direction: column;
}

.app-header .label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(248, 250, 252, 0.85);
}

.app-header .value {
  font-size: 13px;
}

/* USER AREA */

.app-header__user {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md); /* 10px */
  background: var(--surface-primary-med-a55);
  border: 1px solid var(--surface-secondary-med);
}

.app-header__user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
}

.user-roles {
  font-size: 11px;
  color: var(--color-text-muted);
}

/* Status-Pill neutral, Signalfarbe nur als Punkt */
.user-status {
  font-size: 11px;
  border-radius: 999px;
  padding: 2px 8px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  color: var(--color-text-muted);
}

.user-status--online::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--color-status-ok);
  margin-right: 4px;
}

/* LAYOUT: SIDEBAR + MAIN */

.app-layout {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  height: calc(100vh - 64px);
}

/* SIDEBAR */

.app-sidebar {
  display: flex;
  flex-direction: column;
  padding: var(--space-md);
  gap: var(--space-sm);
  background: var(--surface-primary-med-a55);
  border-right: 1px solid var(--color-border-soft);
}

.app-sidebar__spacer {
  flex: 1;
}

.app-nav-item {
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-md);
  border-radius: var(--radius-md);
  font-size: 14px;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast),
    transform var(--transition-fast), border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.app-nav-item .icon--sidebar {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-primary-med-a55);
  border: 0px solid #111827;
  font-size: 13px;
}

.app-nav-item:hover {
  background: rgba(31, 41, 55, 0.85);
  color: #f9fafb;
  transform: translateY(-1px);
}

/* Aktiver Menüpunkt mit der globalen Highlightfarbe */
.app-nav-item--active {
  background: radial-gradient(
    circle at top left,
    var(--color-primary-soft),
    #020617
  );
  color: #f9fafb;
  border: 1px solid var(--color-primary);
  box-shadow: var(--shadow-primary-outline-soft);
}

.app-nav-item--active .icon--sidebar {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}

/* Gefahr-Navigation: keine rote Fläche, nur neutral plus Punkt */
.app-nav-item--danger {
  border: 1px solid rgba(31, 41, 55, 0.9);
  color: var(--color-text-muted);
  position: relative;
  padding-left: calc(var(--space-sm) + 10px);
}

.app-nav-item--danger::before {
  content: "";
  position: absolute;
  left: 10px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--color-danger);
}

/* MAIN */

.app-main {
  padding: var(--space-lg);
  overflow: auto;
}

/* ---------------------------------------
   GENERISCHE KOMPONENTEN
---------------------------------------- */

.view {
  display: none;
}

.view--active {
  display: block;
}

.view-header {
  margin-bottom: var(--space-lg);
}

.view-title {
  margin: 0;
  font-size: 32px;
}

.view-subtitle {
  margin: var(--space-xs) 0 0;
  color: var(--color-text-muted);
  font-size: 14px;
}

/* CARD */

.card {
background: var(--surface-primary-med-a55);
  border-radius: var(--radius-lg);
border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: var(--shadow-soft);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.card--stretch {
  height: 100%;
}

.card__header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card__header--with-actions {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.card__title {
  margin: 0;
  font-size: 16px;
}

.card__subtitle {
  margin: 0;
  font-size: 12px;
  color: var(--color-text-muted);
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.card__body--chips {
  flex-wrap: wrap;
  display: flex;
}

.card__body--compact {
  gap: var(--space-xs);
}

.card__actions {
  display: flex;
  gap: var(--space-sm);
}

/* BUTTONS */

.btn {
  border-radius: var(--radius-md);
  border: none;
  font: inherit;
  cursor: pointer;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--color-text);
  background: rgba(31, 41, 55, 0.1);
  border: 1px solid rgba(55, 65, 81, 0.9);
  transition: background var(--transition-fast), transform var(--transition-fast),
    border-color var(--transition-fast), box-shadow var(--transition-fast),
    opacity var(--transition-fast);
}

/* Standard-Hover nur für neutrale Buttons */
.btn:not(.btn--primary):hover {
  background: rgba(55, 65, 81, 0.95);
  transform: translateY(-0.5px);
}

/* Pinke Primary-Buttons: eigener Hover, kein Grau */
.btn--primary {
  background: linear-gradient(
    to right,
    var(--color-primary),
    var(--color-primary-strong)
  );
  border-color: var(--color-primary);
  
  color: var(--color-on-primary, #fff);
  box-shadow: var(--shadow-primary-elevated);
}
/* Primary Button Icons sollen wie der Text umkippen */
.btn--primary img.icon-svg,
.btn--primary img.np-icon,
.btn--primary .np-icon,
.btn--primary .icon-svg,
.btn--primary svg{
  filter: var(--icon-filter-on-primary) !important;
  opacity: .95;
}

.btn--primary:hover {
  background: linear-gradient(
    to right,
    var(--color-primary-strong),
    var(--color-primary-strong)
  ); /* leicht abgedunkelt */
  box-shadow: var(--shadow-primary-elevated-strong);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(55, 65, 81, 0.8);
}
/* Darkmode: Ghost Buttons leicht cloudy (für Lounge/Playlists/etc.) */
html[data-theme="dark"] .btn--ghost{
  background: rgba(255,255,255,0.05);
  border-color: rgba(148,163,184,0.22);
  color: var(--color-text);
}
html[data-theme="dark"] .btn--ghost:hover{
  background: rgba(255,255,255,0.09);
  border-color: rgba(148,163,184,0.34);
}

.btn--icon-only{
  padding: 0;
  width: 32px;
  height: 32px;

  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--color-border) 70%, transparent);
  background: transparent;

  display: inline-grid;
  place-items: center;
  line-height: 1;

  /* wichtig für inline-SVGs (TV Controls) */
  color: var(--color-text);

  transition: background var(--transition-fast),
              border-color var(--transition-fast),
              box-shadow var(--transition-fast),
              transform var(--transition-fast);
}

/* Cloudy Darkmode */
html[data-theme="dark"] .btn--icon-only{
  background: rgba(255,255,255,0.06);
  border-color: rgba(148,163,184,0.22);
}
html[data-theme="dark"] .btn--icon-only:hover{
  background: rgba(255,255,255,0.10);
  border-color: rgba(148,163,184,0.36);
  box-shadow: var(--shadow-primary-outline-soft);
  transform: translateY(-0.5px);
}
html[data-theme="dark"] .btn--icon-only:active{
  background: rgba(255,255,255,0.14);
  transform: none;
}

/* Lightmode: bleibt leicht und clean */
html[data-theme="light"] .btn--icon-only{
  background: rgba(2,6,23,0.03);
  border-color: rgba(2,6,23,0.10);
}
html[data-theme="light"] .btn--icon-only:hover{
  background: rgba(2,6,23,0.06);
  border-color: rgba(2,6,23,0.18);
  box-shadow: var(--shadow-primary-outline-soft);
  transform: translateY(-0.5px);
}
html[data-theme="light"] .btn--icon-only:active{
  background: rgba(2,6,23,0.09);
  transform: none;
}

/* ⬇️ DER WICHTIGSTE FIX: icon-svg in Iconbuttons immer über Theme-Filter */
.btn--icon-only img.icon-svg,
.btn--icon-only img.np-icon,
.btn--icon-only .np-icon,
.btn--icon-only .icon-svg{
  width: 18px;
  height: 18px;
  display: block;
  filter: var(--icon-filter-ui) !important;
  opacity: .92;
}

/* inline SVG (TV Buttons) */
.btn--icon-only svg{
  width: 18px;
  height: 18px;
  display: block;
}

/* 2-Klick Confirm (nicht Logik, nur Optik) */
.btn--icon-only.is-confirm,
.btn--icon-only.is-armed{
  border-color: var(--color-danger) !important;
  background: color-mix(in srgb, var(--color-danger) 18%, transparent) !important;
}
.btn--icon-only.is-confirm:hover,
.btn--icon-only.is-armed:hover{
  background: color-mix(in srgb, var(--color-danger) 26%, transparent) !important;
}

.btn--icon-only:hover {
  background: var(--np-iconbtn-bg-hover);
  border-color: var(--np-iconbtn-border-hover);
  box-shadow: var(--shadow-primary-outline-soft);
  transform: translateY(-0.5px);
}

.btn--icon-only:active {
  background: var(--np-iconbtn-bg-active);
  transform: none;
}

/* Ghost darf Iconbuttons nicht wieder komplett transparent machen */
.btn--ghost.btn--icon-only {
  background: var(--np-iconbtn-bg);
  border-color: var(--np-iconbtn-border);
}

.btn--icon-only:focus-visible{
  outline: none;
  border-color: color-mix(in srgb, var(--color-primary) 45%, var(--np-iconbtn-border));
  box-shadow: var(--shadow-primary-outline-strong);
}

/* ------------------------------------------------------------
   ICON BUTTONS – Unified (Light & Dark)
   - betrifft: Header, Hub, Flow, TV, Media etc.
   - 2-Klick-States: .is-confirm / .is-armed bleiben unangetastet (nur Style)
------------------------------------------------------------ */

/* Icons in Iconbuttons: Größe + Theme-Filter */
.btn--icon-only img,
.btn--icon-only svg,
.btn--icon-only .np-icon,
.btn--icon-only .icon-svg{
  width: 18px;
  height: 18px;
  display: block;
}

.btn--icon-only img,
.btn--icon-only .np-icon,
.btn--icon-only .icon-svg{
  filter: var(--icon-filter-ui) !important;
  opacity: .92;
}

/* 2-Klick / Danger (Löschen etc.) */
.btn--icon-only.is-confirm,
.btn--icon-only.is-armed,
.btn.is-confirm.btn--icon-only,
.btn.is-armed.btn--icon-only{
  border-color: var(--color-danger) !important;
  background: var(--np-iconbtn-danger-bg) !important;
}

.btn--icon-only.is-confirm:hover,
.btn--icon-only.is-armed:hover,
.btn.is-confirm.btn--icon-only:hover,
.btn.is-armed.btn--icon-only:hover{
  background: var(--np-iconbtn-danger-bg-hover) !important;
}

.btn--icon-only.is-confirm img,
.btn--icon-only.is-armed img,
.btn.is-confirm.btn--icon-only img,
.btn.is-armed.btn--icon-only img,
.btn--icon-only.is-confirm .icon-svg,
.btn--icon-only.is-armed .icon-svg,
.btn.is-confirm.btn--icon-only .icon-svg,
.btn.is-armed.btn--icon-only .icon-svg{
  filter: var(--icon-filter-on-primary) !important;
  opacity: .95;
}

/* Gefahr-Button: optisch neutral, Signalfarbe als Dot (siehe HTML-Pseudo) */
.btn--danger {
  background: var(--surface-primary-med-a55);
  border-color: rgba(55, 65, 81, 0.9);
  position: relative;
  padding-left: 12px;
}

.btn--danger::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--color-danger);
  margin-right: 6px;
}

.btn--sm {
  padding: 4px 10px;
  font-size: 12px;
}

.btn--full {
  width: 100%;
}

/* BADGES */

.badge {
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  border: 1px solid rgba(55, 65, 81, 0.8);
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Basis-Dot für alle Badges: ist standardmäßig transparent */
.badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: transparent;
}

/* Prio-Badges: Signalfarbe nur als Punkt */

.badge--prio-normal::before {
  background: var(--color-status-info);
}

.badge--prio-urgent::before {
  background: var(--color-status-warn);
}

.badge--prio-panic::before {
  background: var(--color-danger);
}

/* Bereich-Badges */

.badge--area-treatment::before {
  background: var(--color-status-ok);
}

.badge--area-waiting::before {
  background: var(--color-status-waiting);
}

/* Zeit-Badge */

.badge--time::before {
  background: var(--color-status-neutral);
}

/* TEXT */

.text-muted {
  color: var(--color-text-muted);
}

.text-small {
  font-size: 12px;
}

/* STATUS DOT – kann überall eingesetzt werden */

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-right: 4px;
  background: var(--color-status-neutral);
}

.status-dot--online {
  background: var(--color-status-ok);
}

.status-dot--warn {
  background: var(--color-status-warn);
}

.status-dot--panic {
  background: var(--color-danger);
}

/* CHIPS */

.chip {
  border-radius: 999px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: var(--surface-primary-med-a55);
  padding: 4px 10px;
  font-size: 11px;
  color: var(--color-text-muted);
  cursor: pointer;
  margin: 0 var(--space-xs) var(--space-xs) 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chip--active {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  color: #e5e7eb;
}

/* Gefahr-Chip: neutraler Rahmen, roter Punkt */
.chip--danger {
  border-color: rgba(55, 65, 81, 0.9);
  background: var(--surface-primary-med-a55);
  color: var(--color-text-muted);
  position: relative;
}

.chip--danger::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--color-danger);
}

.chip--outline {
  background: transparent;
}

.chip-separator {
  width: 100%;
  height: 1px;
  background: radial-gradient(circle at left, #1f2937, transparent);
  margin: var(--space-xs) 0;
}

/* ---------------------------------------
   FLOW LAYOUT
---------------------------------------- */

.flow-layout {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1.6fr) minmax(0, 320px);
  gap: var(--space-lg);
}

.flow-column {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.flow-column--center {
  min-width: 0;
}

/* TASK LIST */

.task-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.task {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid rgba(31, 41, 55, 0.9);
  background: var(--surface-primary-med-a55);
  cursor: pointer; /* wichtig */
  transition: background var(--transition-fast),
              transform var(--transition-fast),
              box-shadow var(--transition-fast),
              border-color var(--transition-fast);
}

/* Hover nur für normale Tasks */
.task:not(.task--prio-panic):hover {
  background: rgba(31, 41, 55, 0.95);
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* In Bearbeitung – z.B. dezenter Rand in Highlightfarbe */
.task--in-progress {
  border-color: var(--color-primary-secondary);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-primary) 25%, transparent);
}


/* Erledigt – leicht ausgegraut und halb transparent */
.task--done {
  opacity: 0.6;
  border-color: rgba(148, 163, 184, 0.5);
}

.task--done .task__title {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(148, 163, 184, 0.9);
}

/* Aktive Notrufe hervorheben */
.task--prio-panic {
  background: linear-gradient(
    to right,
    var(--color-primary),
    var(--color-primary-strong)
  );
  border-color: var(--color-primary);
  color: #f9fafb;
  box-shadow: var(--shadow-primary-elevated);
}

.task--prio-panic:hover {
  background: linear-gradient(
    to right,
    var(--color-primary-strong),
    var(--color-primary-strong)
  ); /* vollflächig strong */
  box-shadow: var(--shadow-primary-elevated-strong);
  transform: translateY(-1px);
}

/* Meta-Text im Notfall-Eintrag gut lesbar */
.task--prio-panic .task__meta {
  color: rgba(248, 250, 252, 0.9);
}

/* Badges im Notfall-Eintrag: Text hell, Rahmen leicht */
.task--prio-panic .badge {
  border-color: rgba(248, 250, 252, 0.4);
  color: #f9fafb;
}

.task__main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.task__title-row {
  display: flex;
  flex-direction: column;
}

.task__title {
  font-size: 14px;
  font-weight: 500;
}

.task__meta {
  font-size: 11px;
  color: var(--color-text-muted);
}

.task__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.task__actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Call Pad */

.callpad-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
}
/* CallPad Presets: 1 pro Zeile, klar unterscheidbar */
.callpad-btn{
  aspect-ratio: auto;      /* falls vorher quadratisch */
  min-height: 64px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-elevated);
  align-items: flex-start; /* statt center */
  text-align: left;
}

.callpad-btn__title{
  font-size: 15px;
  font-weight: 800;
  -webkit-line-clamp: 2;
}

.callpad-btn__meta{
  margin-top: 4px;
  opacity: .85;
}

.callpad-btn {
  border-radius: var(--radius-md);
  border: 1px solid var(--color-primary-secondary-border);
  background: linear-gradient(
    to bottom right,
    var(--color-primary-secondary),
    var(--color-primary-secondary-deep)
  );
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast),
    box-shadow var(--transition-fast), border-color var(--transition-fast);
  position: relative;
  color: #f9fafb;
}

.callpad-btn:hover {
  background: linear-gradient(
    to bottom right,
    var(--color-primary-secondary-hover),
    var(--color-primary-secondary-deep)
  );
}

.callpad-btn__icon {
  display: flex;
}

/* Label im Callpad: explizit weiß */
.callpad-btn__label {
  font-size: 13px;
  color: #f9fafb;
}

.callpad-btn--panic {
  background: linear-gradient(
    to bottom right,
    var(--color-primary),
    var(--color-primary-strong)
  );
  border-color: var(--color-primary);
  color: #f9fafb;
  box-shadow: var(--shadow-primary-elevated);
}

.callpad-btn--panic:hover {
  background: linear-gradient(
    to bottom right,
    var(--color-primary-strong),
    var(--color-primary-strong)
  );
  box-shadow: var(--shadow-primary-elevated-strong);
  transform: translateY(-1px);
}
/* CALLPAD Presets: Titel groß + Wo darunter (wie Hub-Presets) */
.callpad-btn{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.callpad-btn__title{
  font-weight: 800;
  font-size: 14px;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-line-clamp: 3; /* mehr Platz */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.callpad-btn__meta{
  font-size: 12px;
  opacity: .85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
/* FLOW: Team-Status Card */
.flow-team-list{
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.flow-team-tile{
  position: relative;
  border-radius: var(--radius-md);
  border: 1px solid rgba(31, 41, 55, 0.9);
  background: var(--surface-primary-med-a55);
  padding: 12px 14px;
  text-align: center;
}

.flow-team-dot{
  position: absolute;
  top: 10px;
  right: 10px;
  margin-right: 0; /* status-dot hat sonst margin-right */
}

.flow-team-name{
  font-weight: 800;
  font-size: 14px;
  line-height: 1.2;
}

.flow-team-meta{
  margin-top: 4px;
  font-size: 12px;
  opacity: .85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.call-tile{
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(31,41,55,0.9);
  background: rgba(15,23,42,0.92);
  box-shadow: var(--shadow-soft);
  padding: 14px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast), opacity var(--transition-fast);
}

.call-tile:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0,0,0,.35);
}

.call-tile--panic{
  background: linear-gradient(to right, var(--color-primary), var(--color-primary-strong));
  border-color: var(--color-primary);
  box-shadow: var(--shadow-primary-elevated);
}

.call-tile__title{
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-on-primary, #fff);
  line-height: 1.15;
  margin: 0;
}

.call-tile__desc{
  margin-top: 6px;
  text-align: center;
  font-size: 12px;
  color: var(--color-on-primary, #fff);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 3;       /* max 3 Zeilen im Quadrat */
  -webkit-box-orient: vertical;
  overflow: hidden;

}



/* Actions unten rechts */
.call-actions{
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: inline-flex;
  gap: 8px;
}

.call-icobtn{
  width: 34px;
  height: 34px;
  border-radius: var(--np-iconbtn-radius);
  border: 1px solid var(--np-iconbtn-border);
  background: var(--np-iconbtn-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.call-icobtn:hover{
  background: var(--np-iconbtn-bg-hover);
  border-color: var(--np-iconbtn-border-hover);
  box-shadow: var(--shadow-primary-outline-soft);
  transform: translateY(-0.5px);
}

.call-icobtn:active{
  background: var(--np-iconbtn-bg-active);
  transform: none;
}

.call-icobtn img{
  width: 18px;
  height: 18px;
  display: block;
  filter: var(--icon-filter-ui);
  opacity: 0.92;
}
/* ✅ Icons hell wie überall */
.btn .np-icon{
  width: 16px;
  height: 16px;
  display: block;
  filter: var(--icon-filter-ui) !important;
  opacity: 0.95;
}
.btn.is-confirm {
  border-color: var(--color-danger) !important;
}
.btn.is-confirm .icon-svg {
  filter: var(--icon-filter-on-primary) !important;
}

.btn.is-armed .icon-svg {
  filter: var(--icon-filter-on-primary) !important;
}
/* Flow Calls Filter: aktiver Zustand bleibt sichtbar */
#flow-calls-filters .btn.btn--primary{
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-on-primary, #fff);
}

#flow-calls-filters .btn.btn--primary:hover{
  background: var(--color-primary);
  border-color: var(--color-primary);
}

/* =========================================================
   PRESETS: Panic-Dot + Farb-Logik überall gleich
   - normal: secondary (default callpad-btn / secondary tiles)
   - panic: highlight + dot
========================================================= */

/* Dot-Helper: kann in Callpad & Tiles verwendet werden */
.has-panic-dot { position: relative; }

.has-panic-dot::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--color-danger);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.35);
}

/* CALLPAD: normal = default callpad-btn (secondary), panic = callpad-btn--panic (highlight)
   -> hier nichts weiter nötig, nur Dot-Overlay per .has-panic-dot */

/* CALLS / HUB Tiles: wir geben Preset-Kacheln eigene Modifier */
#view-calls .calls-tilebtn.preset--normal {
  background: var(--color-primary-secondary) !important;
  color: #fff;
}

#view-calls .calls-tilebtn.preset--panic {
  background: var(--color-primary) !important;
  color: #fff;
}

#view-calls .callpad-btn--ghost {
  background: transparent;                          /* kein Hintergrund */
  border-style: dashed;                             /* gestrichelter Rahmen */
  border-width: 1px;
  border-color: rgba(55, 65, 81, 0.1);              /* neutrales Grau */
  color: var(--color-text-muted);                   /* zurückhaltende Schrift */
  box-shadow: none;                                 /* kein Glow */
}

/* optional: leichter Hover-Effekt */
.callpad-btn--ghost:hover {
  background: var(--surface-primary-med-a55);
  border-color: rgba(75, 85, 99, 0.1);
}

/* Platzhalter-Icon-Kreise – später durch echte SVGs ersetzen */

.icon-circle {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: radial-gradient(circle at top left, #111827, #020617);
  border: 1px solid rgba(55, 65, 81, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* SVG-Icons im Kreis */
.icon-svg {
  width: 18px;
  height: 18px;
  display: block;
  filter: brightness(0) invert(1); /* schwarz → weiß */
}

/* Panic-Icon-Kreis mit rotem Punkt innen */
.icon-circle--panic {
  position: relative;
}

.icon-circle--panic::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--color-danger);
}

/* ICON Platzhalter allgemein */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* RESPONSIVE */

@media (max-width: 1120px) {
  .app-layout {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .app-sidebar {
    padding-inline: var(--space-sm);
  }

  .app-nav-item span:last-child {
    display: none;
  }
}

@media (max-width: 900px) {
  .flow-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .app-header__practice,
  .app-header__location {
    display: none;
  }

  .app-main {
    padding: var(--space-md);
  }
}
/* FLOW: Calls als Kacheln */
.call-tiles{
  display: grid;
  gap: var(--space-md);

  /* ✅ wichtig: niemals “rausschieben”, sondern automatisch umbrechen */
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));

  width: 100%;
  min-width: 0;
}

/* iPad / Tablet: 2 nebeneinander, weniger “Riesen-Kacheln” */
@media (max-width: 1400px){
  .call-tiles{
    gap: var(--space-sm);
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* ✅ weniger Höhe als Quadrat (macht’s auf iPad viel angenehmer) */
  .call-tile{
    aspect-ratio: 4 / 3;
    padding: 12px;
  }

  .call-tile__title{
    font-size: 14px;
  }
}

/* sehr klein: 1 pro Zeile */
@media (max-width: 700px){
  .call-tiles{
    grid-template-columns: 2fr;
  }
  .call-tile{
    aspect-ratio: auto;
  }
}

/* Tile quadratisch */
.call-tile{
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  padding: 12px;
  background: var(--surface-primary-med-a55);
  border: 1px solid rgba(31, 41, 55, 0.9);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap: 10px;
}

/* Panic / Normal Farb-Logik */
.call-tile--panic{
  background: linear-gradient(to right, var(--color-primary), var(--color-primary-strong));
  border-color: var(--color-primary);
  box-shadow: var(--shadow-primary-elevated);
  color: var(--color-on-primary, #fff);
}

.call-tile--normal{
  background: linear-gradient(to bottom right, var(--color-primary-secondary), var(--color-primary-secondary-deep));
  border-color: var(--color-primary-secondary-border);
  color: var(--color-on-primary, #fff);
}
/* FLOW Calls: alles in der Kachel soll die On-Color erben */
.call-tile--panic *,
.call-tile--normal *{
  color: inherit !important;
}

/* FLOW Calls: Icons in farbigen Kacheln konsistent (img + inline svg) */
.call-tile--panic img,
.call-tile--panic img.icon-svg,
.call-tile--panic .np-icon,
.call-tile--panic .icon-svg,
.call-tile--panic svg{
  filter: var(--icon-filter-on-primary) !important;
  opacity: .95;
}

.call-tile--normal img,
.call-tile--normal img.icon-svg,
.call-tile--normal .np-icon,
.call-tile--normal .icon-svg,
.call-tile--normal svg{
  filter: var(--icon-filter-on-secondary) !important;
  opacity: .95;
}

/* FLOW Calls: Iconbuttons auf farbigem Hintergrund "dreamy", ohne 2-Klick zu stören */
.call-tile--panic .btn--icon-only:not(.is-confirm):not(.is-armed),
.call-tile--normal .btn--icon-only:not(.is-confirm):not(.is-armed){
  border-color: color-mix(in srgb, currentColor 35%, transparent) !important;
  background: color-mix(in srgb, currentColor 10%, transparent) !important;
}

.call-tile--panic .btn--icon-only:not(.is-confirm):not(.is-armed):hover,
.call-tile--normal .btn--icon-only:not(.is-confirm):not(.is-armed):hover{
  background: color-mix(in srgb, currentColor 16%, transparent) !important;
}

/* Übernommen -> blass */
.call-tile--taken{
  opacity: .55;
  filter: saturate(.65);
}
/* OPEN: früher vollflächig Highlight */
.call-tile--open{
  background: linear-gradient(to right, var(--color-primary), var(--color-primary-strong));
  border-color: var(--color-primary);
  box-shadow: var(--shadow-primary-elevated);
  color: var(--color-on-primary, #fff);
}

/* TAKEN: du hast bereits .call-tile--taken, das ist korrekt (ausgrauen) */

/* Cancel-Confirm (nur visueller 2. Klick Hinweis, kein Popup) */
.call-tile__actions .btn[data-action="cancel"].is-confirm{
  border-color: var(--color-danger) !important;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-danger) 55%, transparent);
}

.call-tile__actions .btn[data-action="cancel"].is-confirm .icon-svg{
  filter: none; /* falls du global invertest */
}

.call-tile__actions .btn[data-action="cancel"].is-confirm img{
  filter: brightness(0) saturate(100%) invert(35%) sepia(88%) saturate(746%) hue-rotate(329deg) brightness(100%) contrast(101%);
}

/* optional: der Hint ist bei dir schon da (call-action-hint), nur sichtbar schalten wir per JS */

/* Top Row */
.call-tile__top{
  display:flex;
  justify-content:space-between;
  gap: 10px;
  align-items:flex-start;
}

/* Middle */
.call-tile__mid{
  display:flex;
  flex-direction:column;
  gap: 6px;
  text-align:center;
  padding: 6px 0;
}

.call-tile__title{
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.call-tile__desc{
  font-size: 12px;
  opacity: .9;
}

/* Bottom Row */
.call-tile__bottom{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap: 10px;
}

.call-tile__actions{
  display:flex;
  gap: 6px;
  align-items:center;
  flex-wrap: wrap;
  justify-content:flex-end;
}

/* Pills */
.call-pill{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.18);
  color:#fff;
}

/* Prio Pills + Dot */
.call-pill--prio-normal::before,
.call-pill--prio-urgent::before,
.call-pill--prio-panic::before{
  content:"";
  width: 8px;
  height: 8px;
  border-radius:999px;
}

.call-pill--prio-normal::before{ background: var(--color-status-info); }
.call-pill--prio-urgent::before{ background: var(--color-status-warn); }
.call-pill--prio-panic::before{ background: var(--color-danger); }
/* CallPad: Inline Manual Task (spannt über volle Grid-Breite) */
.callpad-manual {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.callpad-manual__title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: 8px;
  margin-top: var(--space-md);
}

.callpad-manual__row {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.callpad-manual__row input {
  flex: 1 1 220px;
  min-width: 160px;
}

.callpad-manual__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}
#callpad-manual-host {
  margin-top: var(--space-md);
}

/* ---------------------------------------
   HUB LAYOUT & INTERNES MENÜ
---------------------------------------- */

.hub-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: var(--space-lg);
  align-items: flex-start;
}

/* Linkes, innenliegendes Menü im Hub */
.hub-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  background: linear-gradient(
    to bottom,
    var(--surface-primary-med-a55),
    var(--surface-secondary-med)
  );
  border: 1px solid var(--color-border-soft);
}

.hub-nav__item {
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  text-align: left;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  font-size: 13px;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast);
}

.hub-nav__item:hover {
  background: rgba(31, 41, 55, 0.9);
  color: #f9fafb;
  transform: translateY(-1px);
}

.hub-nav__item--active {
  background: radial-gradient(
    circle at top left,
    var(--color-primary-soft),
    #020617
  );
  color: #f9fafb;
  border: 1px solid var(--color-primary);
  box-shadow: var(--shadow-primary-outline-soft);
}

/* Rechte Seite im Hub */
.hub-content {
  display: block;
}

/* Nur die aktive Hub-Sektion anzeigen */
.hub-section {
  display: none;
}

.hub-section--active {
  display: block;
}

.hub-section__intro {
  margin-bottom: var(--space-md);
}

.hub-section__intro h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.hub-section__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-lg);
}
/* Praxis & Design: immer 2 Spalten (50:50) → Karten laufen automatisch in Zeile 2 */
#hub-section-practice .hub-section__grid--practice{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* optional: bei kleineren Screens dann 1 Spalte */
@media (max-width: 900px){
  #hub-section-practice .hub-section__grid--practice{
    grid-template-columns: 1fr;
  }
}

/* Praxisdaten-Layout im Hub */

.hub-tenant {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hub-tenant__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(31, 41, 55, 0.1);
  font-size: 13px;
}

.hub-tenant__row:last-child {
  border-bottom: none;
}

.hub-tenant__label {
  min-width: 110px;
  color: var(--color-text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hub-tenant__value {
  flex: 1;
  text-align: right;
}

/* Formular-Variante */

.hub-tenant-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hub-tenant-form__row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.hub-tenant-form__label {
  font-size: 12px;
  color: var(--color-text-muted);
}

.hub-tenant-form__label span.required {
  color: var(--color-danger);
}

/* Inputs im Praxisdaten-Formular */

.hub-tenant-form input {
  width: 100%;
  border-radius: var(--radius-md);
  color: var(--color-text);
  font: inherit;
}

.hub-tenant-form input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-primary-outline-soft);
}

/* Action-Bereich unten */

.hub-tenant-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

/* Edit-Button im Card-Header etwas dezenter */

.hub-tenant-edit-toggle {
  opacity: 0.9;
}

.hub-tenant-edit-toggle:hover {
  opacity: 1;
  transform: translateY(-0.5px);
}
/* Praxisdaten im Hub – Anzeige-Modus */

.hub-tenant {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hub-tenant__row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hub-tenant__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.hub-tenant__value {
  font-size: 14px;
  line-height: 1.4;
}

/* Praxisdaten – Formular */

.hub-tenant-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hub-tenant-form__row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hub-tenant-form__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.hub-tenant-form__actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.hub-tenant__value {
  font-size: 14px;
  line-height: 1.4;
  text-align: left;         /* erzwingt Links-Ausrichtung */
}
/* ---------------------------------------
   SCROLLBARS – GLOBAL, DARK & DEZENT
---------------------------------------- */

/* WebKit-Browser (Chrome, Edge, Safari, Opera) */
*::-webkit-scrollbar {
  width: 8px;   /* vertikal */
  height: 8px;  /* horizontal */
}

*::-webkit-scrollbar-track {
  background: transparent; /* zerstört den Look nicht */
}

*::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4); /* leicht helleres Grau auf dunkel */
  border-radius: 999px;
  border: 2px solid var(--surface-primary-med-a55); /* dunkler Rand, fügt sich ins BG */
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(209, 213, 219, 0.6); /* beim Hover minimal stärker sichtbar */
}

/* Firefox */
html {
  scrollbar-width: thin; /* dünner Balken */
  scrollbar-color: rgba(148, 163, 184, 0.1) transparent;
  /* Thumb-Farbe | Track-Farbe (transparent = stört den Hintergrund nicht) */
}
/* ---------------------------------------
   AUTH / LOGIN PAGE
---------------------------------------- */

.app-body--auth {
  min-height: 100vh;
  margin: 0;
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  /* ähnlicher Look wie Splash */
    background: var(--app-bg-gradient);
}

/* Wrapper für die Loginpage */
.auth-page {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}

.auth-page__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* Brand/Logo oben */

.auth-page__header {
  text-align: center;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-md);
}
/* Override: Login-Logo ohne eigenen Kasten wie im Splash */

.auth-brand__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0 0; /* linksbündig, bei Bedarf anpassen */
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  box-shadow: none;
}

.auth-brand__logo {
  width: 40px;   /* gern 48px wenn du es größer willst */
  height: 40px;
  object-fit: contain;
  display: block;
  filter: none;  /* wichtig: nicht weißfiltern */
}

.auth-brand__text {
  text-align: left;
}

.auth-brand__name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.auth-brand__tagline {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* Login-Card an das App-Design anpassen */

.auth-page .card {
  max-width: 460px;
  margin: 0 auto;
}

/* FORM STYLES – eng an dein Dark-UI angelehnt */

.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form__label {
  font-size: 13px;
  color: var(--color-text-muted);
}

.form__control {
  font: inherit;
  padding: 10px 12px;
  margin-bottom: 0px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(31, 41, 55, 0.9);
  background: var(--surface-primary-med-a55);
  color: var(--color-text);
  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast),
    transform var(--transition-fast);
}

.form__control::placeholder {
  color: rgba(148, 163, 184, 0.7);
}

.form__control:focus {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-primary-outline-strong);
  background: var(--surface-primary-med-a55);
  transform: translateY(-0.5px);
}

/* Fehlertext unter den Inputs */

.form__error {
  margin-top: -4px;
  margin-bottom: 4px;
  color: var(--color-danger);
}

/* Button-Bereich & Vollbreite */

.form__actions {
  margin-top: var(--space-sm);
}

.form__actions .btn {
  width: 100%;
}

/* Hinweistext unter dem Button */

.auth-page .text-muted {
  margin-top: var(--space-sm);
  line-height: 1.5;
}

/* Responsiv etwas mehr Luft auf sehr kleinen Screens */

@media (max-width: 480px) {
  .app-body--auth {
    padding: var(--space-md);
  }

  .auth-brand {
    flex-direction: column;
    text-align: center;
  }

  .auth-brand__text {
    text-align: center;
  }
}
/* ---------------------------------------
   HUB – PRAxisdesign / Color Picker
---------------------------------------- */

.hub-color-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.hub-color-row__label {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hub-color-row__title {
  font-size: 13px;
  font-weight: 500;
}

.hub-color-row__desc {
  font-size: 11px;
  color: var(--color-text-muted);
}

.hub-color-row__controls {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Swatch + Color-Input */

.hub-color-swatch {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--color-border-soft);
  background: var(--surface-primary-med-a55);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hub-color-swatch input[type="color"] {
  position: absolute;
  inset: -4px;
  opacity: 0;
  cursor: pointer;
}

.hub-color-swatch__preview {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--color-primary); /* wird per JS überschrieben */
}

/* Hex-Feld */

.hub-color-hex {
  width: 110px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  padding-inline: 8px;
}

/* Actions unten rechts */

.hub-color-actions {
  margin-top: var(--space-md);
  display: flex;
  justify-content: flex-end;
}
/* Theme-Picker ohne Card – zentriert */

.auth-page--theme-only .auth-page__inner--center {
  max-width: 640px;
}

.theme-picker-simple {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
}

.theme-picker-simple__row {
  display: flex;
  gap: var(--space-xl);
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
}

.theme-picker-simple__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 220px;
}

.theme-picker-simple__label {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.15rem;
}

.theme-picker-simple__desc {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
  text-align: center;
  max-width: 220px;
}

.theme-picker-simple__swatch {
  margin-bottom: 0.5rem;
}

.theme-picker-simple__hex {
  text-align: center;
}

.theme-picker-simple__actions {
  margin-top: 1.75rem;
  display: flex;
  justify-content: center;
}
/* Praxis-Registrierung – 2-Spalten-Layout in der Card */
.register-complete__grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
}

.register-complete__col {
  flex: 1 1 260px;
  min-width: 0;
}
@media (min-width: 900px) {
  .register-complete__col {
    flex: 1 1 0;
  }
}
/* Auth-Layout breiter für die Registrierungs-Praxisdaten-Seite */
.auth-page__inner--wide {
  max-width: 960px;
}

/* Card selbst auch etwas „luftiger“ */
.auth-card--wide {
  max-width: 960px;
}
@media (min-width: 900px) {
  .auth-page__inner--wide {
    max-width: 960px;
  }

  .auth-card--wide {
    max-width: 960px;
  }
}
/* ---------------------------------------
   Breitere Layout-Variante für Praxis-Registrierung
---------------------------------------- */

/* Container breiter machen – mehr Spezifität als .auth-page__inner */
.auth-page__inner.auth-page__inner--wide {
  max-width: 960px;
}

/* Card selbst breiter machen */
.auth-card.auth-card--wide {
  max-width: 960px;
}
/* ---------------------------------------
   Registrierungsseite: Praxisdaten – breitere Card
---------------------------------------- */

.app-body--register-complete .auth-page__inner {
  max-width: 960px;
}

.app-body--register-complete .auth-card {
  max-width: 960px;
}
/* Reihen im Registrierungsformular: zwei gleich breite Felder nebeneinander */
.register-row {
  display: flex;
  gap: var(--space-md);
}

.register-row__field {
  flex: 1 1 0;
  min-width: 0;
}
/* Reihen im Registrierungsformular: zwei gleich breite Felder nebeneinander */
.register-row {
  display: flex;
  gap: var(--space-md);
}

.register-row__field {
  flex: 1 1 0;
  min-width: 0;
}

/* Inneres Label über dem zweiten Passwort-Feld etwas dezenter */
.form__label--inner {
  display: block;
  font-size: 11px;
  margin-bottom: 2px;
}

/* =========================================================
   CALLS SCHALTZENTRALE (Große quadratische Tiles)
========================================================= */

/* Drei Spalten (Cards) symmetrisch */
.calls-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-lg);
}

@media (max-width: 1000px) {
  .calls-columns { grid-template-columns: 1fr; }
}

/* Panic-Bar oben */
.calls-panicbar {
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* Card Kopf */
.calls-col__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

/* GRID: hier passiert die Magie:
   - auto-fit: füllt die Breite mit so vielen Spalten wie passen
   - minmax: Kachel wird mindestens X groß, sonst wächst sie gleichmäßig
   - aspect-ratio: 1 => immer quadratisch
*/
/* GRID für die großen quadratischen Buttons */
/* Desktop: mind. 4 pro Reihe */
/* Tablet: 3 pro Reihe */
/* Smartphone: 2 pro Reihe */

.calls-grid{
  --tile-min: 72px;
  --tile-max: 120px; /* <- Max Größe pro Quadrat */
  display: grid;
  gap: var(--space-md);
  align-content: start;

  /* Default (große Screens): 4 Spalten */
  grid-template-columns: repeat(4, minmax(var(--tile-min), var(--tile-max)));

  /* wenn Platz übrig ist, sauber zentrieren */
  justify-content: space-between;
}

/* Tablet: 3 Spalten */
@media (max-width: 1000px){
  .calls-grid{
    grid-template-columns: repeat(3, minmax(var(--tile-min), var(--tile-max)));
  }
}

/* Smartphone: 2 Spalten */
@media (max-width: 640px){
  .calls-grid{
    grid-template-columns: repeat(2, minmax(var(--tile-min), var(--tile-max)));
  }
}

/* Der quadratische Button selbst */
/* Kachel: Inhalt innen, Icon groß, Label klein unten */
#view-calls .calls-tilebtn{
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  border: 1px solid var(--color-primary-secondary-border);
  background: var(--surface-primary-med-a55);
  cursor: pointer;

  /* NEU: Layout */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;

  padding: 10px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

#view-calls .calls-tilebtn:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0,0,0,.35);
}

#view-calls .calls-tilebtn.is-active{
  border-color: var(--color-primary);
  box-shadow: var(--shadow-primary-outline-soft);
}
/* Calls "Wer": Kachel "Alle" immer in Primary */
#view-calls .calls-tilebtn.is-all{
  background: linear-gradient(to bottom right, var(--color-primary), var(--color-primary-strong));
  border-color: color-mix(in srgb, var(--color-primary) 60%, var(--color-border));
  box-shadow: var(--shadow-primary-elevated);
}

#view-calls .calls-tilebtn.is-all:hover{
  filter: brightness(1.03);
}

#view-calls .calls-tilebtn.is-fav{
  border-color: var(--color-primary-secondary);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-primary-secondary) 45%, transparent);
}

#view-calls .calls-tilebtn.is-disabled{
  opacity:.45;
  cursor:not-allowed;
  transform:none;
}

/* Großes Kürzel/Icon (hell, gut lesbar) */
#view-calls.calls-icon{
  font-size: 22px;              /* <- groß */
  font-weight: 800;
  color: rgba(248, 250, 252, .95); /* <- hell */
  line-height: 1;
  letter-spacing: .5px;
  text-align: center;
  max-width: 100%;
}

/* Label klein, mittig, innerhalb der Fläche */
#view-calls.calls-label{
  font-size: 11px;               /* <- klein */
  color: rgba(226,232,240,.85);
  text-align: center;
  line-height: 1.15;
  width: 100%;
  padding: 0 6px;

  /* falls lang: sauber abschneiden */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Icon oben */
#view-calls.calls-tilebtn__icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: radial-gradient(circle at top left, #111827, #020617);
  font-weight: 700;
}

/* Label unten */
#view-calls.calls-tilebtn__label {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.1;
  color: var(--color-text-muted);
  text-align: center;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Panic Toggle (nutzt Theme-Variablen) */
.calls-panic input { display: none; }
.calls-panic__ui {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: var(--surface-secondary-med);
  cursor: pointer;
  user-select: none;
}

.calls-panic input:checked + .calls-panic__ui {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-danger) 45%, transparent);
}

/* Raum-Feedback (Check Overlay) */
#view-calls .calls-tilebtn .calls-ok {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
  font-size: 22px;
}
#view-calls .calls-tilebtn.is-ok .calls-ok { opacity: 1; }
#view-calls .calls-col__head--row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: var(--space-sm);
}

#view-calls .calls-col__title{
  display:flex;
  flex-direction:column;
  gap: 2px;
}

/* kompakter Toggle für Header */
.calls-panic--compact .calls-panic__ui{
  padding: 6px 10px;
  gap: 8px;
  font-size: 12px;
  white-space: nowrap;
}
/* HUB Workflows & Calls */
.hub-wf-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

@media (max-width: 900px){
  .hub-wf-grid{ grid-template-columns: 1fr; }
}

.hub-wf-panel{
  border-radius: var(--radius-lg);
border: 1px solid rgba(148, 163, 184, 0.18);
background: var(--surface-primary-med-a55);
  padding: var(--space-md);
}

.hub-wf-search{
  width: 100%;
  margin-bottom: var(--space-sm);
}

.hub-wf-iconlib{
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-sm);
}

@media (max-width: 900px){
  .hub-wf-iconlib{ grid-template-columns: repeat(8, 1fr); }
}
@media (max-width: 640px){
  .hub-wf-iconlib{ grid-template-columns: repeat(6, 1fr); }
}

.hub-wf-iconbtn{
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: var(--np-iconbtn-radius);
  border: 1px solid var(--np-iconbtn-border);
  background: var(--np-iconbtn-bg);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition: background var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.hub-wf-iconbtn:hover{
  background: var(--np-iconbtn-bg-hover);
  border-color: var(--np-iconbtn-border-hover);
  transform: translateY(-0.5px);
}

.hub-wf-iconbtn.is-active{
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 10%, var(--np-iconbtn-bg-hover));
  box-shadow: var(--shadow-primary-outline-soft);
}

.hub-wf-iconbtn img{
  width: 18px;
  height: 18px;
  opacity: .95;
  filter: var(--icon-filter-ui);
}
.hub-wf-list{
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.hub-wf-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: var(--space-sm);
  padding: var(--space-sm);
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.18);
  background: rgba(2,6,23,.18);
}

.hub-wf-item__left{
  display:flex;
  align-items:center;
  gap: var(--space-sm);
  min-width: 0;
}

.hub-wf-item__meta{
  display:flex;
  flex-direction:column;
  min-width:0;
}

.hub-wf-item__name{
  font-weight: 600;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}

.hub-wf-item__code{
  font-size: 12px;
  color: rgba(226,232,240,.75);
}
/* ============================================================
   CALLS CENTER – KACHELN (Schaltzentrale)
   Fix: Kacheln laufen nicht mehr über Card, Label hat mehr Platz
   ============================================================ */

#calls-who,
#calls-what,
#calls-where {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: var(--space-sm);
  width: 100%;
}

.calls-tile {
  min-width: 0; /* wichtig, damit Grid nicht “drückt” */
}

#view-calls .calls-tilebtn {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;                /* weniger Padding */
  min-height: 94px;             /* etwas größer */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-md);
  overflow: hidden;             /* verhindert Überlaufen */
}

#view-calls .calls-icon {
  width: 46px;
  height: 46px;
  border-radius: 0px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

#view-calls .calls-icon img,
.icon-circle img {
  width: 22px;
  height: 22px;
  display: block;
}

#view-calls .calls-label {
  width: 100%;
  text-align: center;
  line-height: 1.2;
  font-size: 12px;
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;        /* max 2 Zeilen */
  -webkit-box-orient: vertical;
}
/* ------------------------------------------------------------
   Icon Picker (Dropdown + Grid)
------------------------------------------------------------ */
.icon-picker { position: relative; width: 100%; }

.icon-picker__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.icon-picker__left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.icon-picker__label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-picker__preview {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-picker__preview img {
  width: 22px;
  height: 22px;
  display: block;
}

.icon-picker__popover {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: min(560px, 92vw);
  max-height: 360px;
  overflow: auto;
  z-index: 50;

  border-radius: var(--radius-md);
  border: 1px solid rgba(31, 41, 55, 0.9);
  background: var(--surface-primary-med-a55);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);

  padding: 12px;
  display: none;
}

.icon-picker__popover.is-open { display: block; }

.icon-picker__top {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.icon-picker__search { width: 100%; }

.icon-picker__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 10px;
}

.icon-picker__iconbtn {
  border-radius: var(--np-iconbtn-radius);
  border: 1px solid var(--np-iconbtn-border);
  background: var(--np-iconbtn-bg);
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.icon-picker__iconbtn:hover {
  background: var(--np-iconbtn-bg-hover);
  border-color: var(--np-iconbtn-border-hover);
  transform: translateY(-0.5px);
}

.icon-picker__iconbtn:active {
  background: var(--np-iconbtn-bg-active);
  transform: none;
}

.icon-picker__iconbtn.is-active {
  outline: none;
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 10%, var(--np-iconbtn-bg-hover));
  box-shadow: var(--shadow-primary-outline-soft);
}

.icon-picker__iconbtn img {
  width: 22px;
  height: 22px;
  display: block;
  filter: var(--icon-filter-ui);
  opacity: 0.95;
}
/* ------------------------------------------------------------
   Icon Picker (Dropdown + Grid)
------------------------------------------------------------ */
.icon-picker { position: relative; width: 100%; }

.icon-picker__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.icon-picker__left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.icon-picker__label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-picker__preview {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-picker__preview img {
  width: 22px;
  height: 22px;
  display: block;
}

.icon-picker__popover {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: min(560px, 92vw);
  max-height: 360px;
  overflow: auto;
  z-index: 50;

  border-radius: var(--radius-md);
  border: 1px solid rgba(31, 41, 55, 0.9);
  background: var(--surface-secondary-med);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);

  padding: 12px;
  display: none;
}

.icon-picker__popover.is-open { display: block; }

.icon-picker__top {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.icon-picker__search { width: 100%; }

.icon-picker__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 10px;
}

.icon-picker__iconbtn {
  border-radius: var(--np-iconbtn-radius);
  border: 1px solid var(--np-iconbtn-border);
  background: var(--np-iconbtn-bg);
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.icon-picker__iconbtn:hover {
  background: var(--np-iconbtn-bg-hover);
  border-color: var(--np-iconbtn-border-hover);
  transform: translateY(-0.5px);
}

.icon-picker__iconbtn:active {
  background: var(--np-iconbtn-bg-active);
  transform: none;
}

.icon-picker__iconbtn.is-active {
  outline: none;
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 10%, var(--np-iconbtn-bg-hover));
  box-shadow: var(--shadow-primary-outline-soft);
}

.icon-picker__iconbtn img {
  width: 22px;
  height: 22px;
  display: block;
  filter: var(--icon-filter-ui);
  opacity: 0.95;
}
/* ------------------------------------------------------------
   CALLS CENTER TILES – stabiler Grid + mehr Platz fürs Label
------------------------------------------------------------ */
#view-calls .calls-tiles{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(120px,1fr));
  gap:12px;
  align-items:stretch;
}

#view-calls .calls-tile{ min-width:0; }

#view-calls .calls-tilebtn{
  width:100%;
  min-width:0;
  padding:10px 10px;          /* weniger Padding */
  min-height:92px;            /* etwas größer */
  border-radius:var(--radius-md);
  border:1px solid rgba(31,41,55,.9);
  background:rgba(15,23,42,.96);
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:6px;
  position:relative;
  overflow:hidden;
  box-sizing:border-box;
}

#view-calls .calls-icon{
  font-size:20px;
  font-weight:800;
  letter-spacing:.02em;
  line-height:1;
}

#view-calls .calls-label{
  font-size:12px;
  line-height:1.15;
  opacity:.92;
  display:-webkit-box;
  -webkit-line-clamp:2;       /* 2 Zeilen, dann … */
  -webkit-box-orient:vertical;
  overflow:hidden;
}

/* Disabled */
#view-calls .calls-tilebtn.is-disabled{
  opacity:.45;
  cursor:not-allowed;
}

/* OK-Flash */
.calls-ok{
  position:absolute;
  right:10px;
  top:10px;
  opacity:0;
  transform:scale(.95);
  transition:opacity .12s ease, transform .12s ease;
  font-weight:800;
}
#view-calls .calls-tilebtn.is-ok .calls-ok{
  opacity:1;
  transform:scale(1);
}

/* ------------------------------------------------------------
   WORKFLOWS: Preview Grid + Icon Dropdown
------------------------------------------------------------ */
.hub-wf-grid{
  display:grid;
  grid-template-columns:1fr 1fr; /* links Form, rechts Preview */
  gap:14px;
}

.wf-tilegrid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(120px,1fr));
  gap:12px;
}
/* HUB: Preset-Liste – eigener Textstil (ohne Calls-Icon-Kreis) */
#wf-preset-list .wf-preset-title{
  width: 100%;
  text-align: center;
  font-weight: 800;
  font-size: 14px;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-line-clamp: 3;          /* mehr Platz als Calls */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#wf-preset-list .wf-preset-meta{
  width: 100%;
  text-align: center;
  font-size: 12px;
  opacity: .85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wf-iconpicker{ position:relative; display:flex; gap:10px; flex-wrap:wrap; }

.wf-icon-dropdown{
  position:absolute;
  left:0;
  top:calc(100% + 10px);
  width:min(520px, 92vw);
  border-radius:var(--radius-md);
  border:1px solid rgba(31,41,55,.9);
  background:rgba(15,23,42,.98);
  box-shadow:0 10px 25px rgba(0,0,0,.45);
  padding:12px;
  z-index:60;
}

.wf-icon-grid{
  margin-top:10px;
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(44px,1fr));
  gap:10px;
  max-height:280px;
  overflow:auto;
  padding-right:6px;
}

.wf-iconbtn{
  border-radius: var(--np-iconbtn-radius);
  border: 1px solid var(--np-iconbtn-border);
  background: var(--np-iconbtn-bg);
  padding: 8px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.wf-iconbtn:hover{
  background: var(--np-iconbtn-bg-hover);
  border-color: var(--np-iconbtn-border-hover);
  transform: translateY(-0.5px);
}

.wf-iconbtn.is-active{
  border-color:var(--color-primary);
  box-shadow: var(--shadow-primary-outline-soft);
  background: color-mix(in srgb, var(--color-primary) 10%, var(--np-iconbtn-bg-hover));
}

.wf-iconbtn img{
  width:22px;
  height:22px;
  display:block;
  filter: var(--icon-filter-ui);
  opacity: 0.95;
}

/* ------------------------------------------------------------
   ICON PICKER: SVGs Theme-gerecht (Filter via --icon-filter-ui)
------------------------------------------------------------ */
.wf-icon-dropdown img,
.wf-iconbtn img,
#wf-icon-open img {
  filter: var(--icon-filter-ui) !important;
  opacity: 0.95;
}

/* ------------------------------------------------------------
   CALLS CENTER TILES: vollflächig statt umrandet
   - WAS: primary (Favorit: secondary)
   - WO: secondary
------------------------------------------------------------ */

#view-calls .calls-tilebtn--what,
#view-calls .calls-tilebtn--where {
  border: none !important;
  color: inherit !important;
}
#view-calls .calls-tilebtn--what{ color: var(--color-on-primary,#fff) !important; }
#view-calls .calls-tilebtn--what.is-fav{ color: var(--color-on-secondary,#fff) !important; }
#view-calls .calls-tilebtn--where{ color: var(--color-on-secondary,#fff) !important; }

#view-calls .calls-tilebtn--what *,
#view-calls .calls-tilebtn--where *{
  color: inherit !important;
}

/* Icons (img/icon-svg) passend zur Kachel */
#view-calls .calls-tilebtn--what .calls-icon img,
#view-calls .calls-tilebtn--what img.icon-svg{
  filter: var(--icon-filter-on-primary) !important;
}
#view-calls .calls-tilebtn--what.is-fav .calls-icon img,
#view-calls .calls-tilebtn--what.is-fav img.icon-svg{
  filter: var(--icon-filter-on-secondary) !important;
}
#view-calls .calls-tilebtn--where .calls-icon img,
#view-calls .calls-tilebtn--where img.icon-svg{
  filter: var(--icon-filter-on-secondary) !important;
}

#view-calls .calls-tilebtn--what {
  background: var(--color-primary) !important;
}

#view-calls .calls-tilebtn--what.is-fav {
  background: var(--color-primary-secondary) !important;
}

#view-calls .calls-tilebtn--where {
  background: var(--color-primary-secondary) !important;
}

/* Text/Label lesbar */
#view-calls .calls-tilebtn--what .calls-icon,
#view-calls .calls-tilebtn--what .calls-label,
#view-calls .calls-tilebtn--where .calls-icon,
#view-calls .calls-tilebtn--where .calls-label {
  color: #fff;
}

#view-calls .calls-tilebtn--what .calls-label,
#view-calls .calls-tilebtn--where .calls-label {
  opacity: .92;
}

/* Active/Hover ohne Border */
#view-calls .calls-tilebtn.is-active {
  box-shadow: 0 0 0 2px rgba(255,255,255,.35) inset, 0 10px 25px rgba(0,0,0,.25);
}

#view-calls .calls-tilebtn--what:hover:not(.is-disabled),
#view-calls .calls-tilebtn--where:hover:not(.is-disabled) {
  filter: brightness(1.05);
}
/* ============================================================
   CALLS KACHELN – Vollflächig (ohne Rand) + bessere Wrap-Logik
   ============================================================ */

/* Grid soll NICHT mehr über Karten hinausschieben */
#view-calls .calls-grid{
  --tile-min: 84px;
  --tile-max: 160px;
  display: grid;
  gap: var(--space-md);
  align-content: start;
  grid-template-columns: repeat(auto-fit, minmax(var(--tile-min), 1fr));
  justify-content: stretch;
}

/* Kachel: weniger Padding, mehr Platz fürs Label, keine Border */
#view-calls .calls-tilebtn{
  border: 0 !important;
  padding: 10px !important;
  background: var(--surface-secondary-med);
  box-shadow: 0 10px 25px rgba(0,0,0,.35);
}

/* WAS = primary, Favorit = secondary, WO = secondary */
#view-calls .calls-tilebtn--what{
  background: var(--color-primary) !important;
}
#view-calls .calls-tilebtn--what.is-fav{
  background: var(--color-primary-secondary) !important;
}
#view-calls .calls-tilebtn--where{
  background: var(--color-primary-secondary) !important;
}

/* Disabled etwas „nebliger“, aber weiterhin vollflächig */
#view-calls .calls-tilebtn.is-disabled{
  opacity: .45;
}

/* Icon-Inhalt: Kürzel oder SVG-Icon */
#view-calls .calls-icon{
  font-size: 20px;   /* 4 Zeichen passen besser */
  letter-spacing: .5px;
}
#view-calls .calls-icon{
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.05;
  font-size: 18px;
  text-align: center;
}

/* Icons (SVG) überall konstant hell anzeigen */
.calls-icon__img,
.hub-wf-iconbtn img,
.wf-preview-action img{
  width: 28px;
  height: 28px;
  filter: invert(1) brightness(1.7) contrast(1.05);
}

/* Vorschau-Kachel Wrapper + Action-Buttons oben rechts */
.wf-preview-tile{
  position: relative;
}

.wf-preview-actions{
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
  z-index: 5;
}

.wf-preview-action{
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
  background: rgba(0,0,0,.25);
  border: 0;
}

.wf-preview-action:hover{
  background: rgba(0,0,0,.35);
}

/* Inline-Trash */
.wf-trash-svg{
  width: 18px;
  height: 18px;
  display: block;
  fill: #fff;
  opacity: .95;
}
/* WF / Calls: Action-Iconbuttons unter den Vorschau-Kacheln */
#wf-tile-preview .btn--icon-only{
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--np-iconbtn-radius);
  display: inline-grid;
  place-items: center;
  line-height: 1;
}

#wf-tile-preview .btn--icon-only img,
#wf-tile-preview .btn--icon-only .wf-trash-svg{
  width: 18px;
  height: 18px;
  display: block;
}

#wf-tile-preview .btn--icon-only img{
  filter: var(--icon-filter-ui);
  opacity: 0.92;
}

#wf-tile-preview .btn--icon-only:hover{
  background: var(--np-iconbtn-bg-hover);
  border-color: var(--np-iconbtn-border-hover);
}

#wf-tile-preview .btn--icon-only:active{
  background: var(--np-iconbtn-bg-active);
}

.wf-trash-svg{
  fill: currentColor;
}
/* Icons in Calls-Kacheln immer hell (auch in Vorschau / Highlightflächen) */
.calls-icon__img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(100%);
  opacity: 1;
}

/* optional: auch im Icon-Dropdown immer hell */
.wf-iconbtn img,
.wf-iconpicker img {
  filter: brightness(0) saturate(100%) invert(100%);
  opacity: 1;
}

/* PATIENTEN PANEL – CARD-LAYOUT */

.patient-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* Eine Karte pro Patient */
.patient-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-soft);      /* statt rgba(...) */
  background: var(--color-bg-elevated);            /* statt rgba(15,23,42,0.96) */
  padding: var(--space-sm) var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  box-shadow: var(--shadow-soft);                  /* statt fixer rgba-shadow */
}

/* oberer Bereich: Name links, Zeit (und später evtl. weitere Meta) rechts */
.patient-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-sm);
}

/* Name & Hinweis-Text */
.patient__main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.patient__name {
  font-size: 13px;
  font-weight: 500;
}
/* Self-Check-in (Flow Highlight + Accept Button) */
.patient__name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.patient-selfcheckin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  background: color-mix(in srgb, var(--color-primary) 14%, var(--color-bg-elevated));
}

.patient-selfaccept-btn {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-elevated);
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.patient-selfaccept-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.patient-card.is-selfcheckin {
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 10%, var(--color-bg-elevated));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-primary) 35%, transparent);
}

.patient__hint {
  font-size: 11px;
  color: var(--color-text-muted);
}
.patient__name-row{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.patient-info{
  position:relative;
  display:inline-flex;
  align-items:center;
}

.patient-info-btn{
  width:26px;
  height:26px;
  border-radius:999px;
  border:1px solid var(--color-border-soft);
  background: transparent;
  color: var(--color-text);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}

.patient-tooltip{
  position:absolute;
  top: calc(100% + 8px);
  right:0;
  min-width: 220px;
  max-width: 320px;
  padding:10px 12px;
  border-radius: 12px;
  background: var(--color-primary);
  color: white;
  box-shadow: var(--shadow-soft);
  border: 1px solid color-mix(in srgb, var(--color-primary) 70%, black);
  opacity:0;
  transform: translateY(-4px);
  pointer-events:none;
  z-index: 30;
}

.patient-info:hover .patient-tooltip,
.patient-info:focus-within .patient-tooltip{
  opacity:1;
  transform: translateY(0);
  pointer-events:auto;
}

.patient-tooltip .row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-size:12px;
  line-height:1.3;
  margin: 4px 0;
}
.patient-tooltip .k{ opacity:.9; }
.patient-tooltip .v{ font-weight:600; }

/* Meta-Bereich rechts: Uhrzeit */
.patient__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 11px;
  color: var(--color-text-muted);
}

.patient__time {
  font-size: 11px;
}

/* Raum-Buttons unter der Zeit */
.patient__rooms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* einzelner Raum-Button (WZ 1, R 1, R 2, Labor...) */
.patient-room-btn {
  border-radius: 999px;
  border: 1px solid var(--color-border);          /* statt rgba(55,65,81,0.9) */
  background: var(--color-bg-elevated);           /* statt rgba(15,23,42,0.94) */
  padding: 3px 10px;
  font-size: 11px;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
  color: var(--color-text);                       /* LESBARKEIT: helle Schrift */
}

.patient-room-btn:hover {
  background: color-mix(
    in srgb,
    var(--color-border) 55%,
    var(--color-bg-elevated)
  );                                              /* variablenbasiertes Hover */
  border-color: var(--color-border);
  transform: translateY(-0.5px);
}


/* Button "Patienten verabschieden" unten in der Card */
.patient-discharge-btn {
  align-self: flex-start;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 11px;
  border: 1px solid var(--color-border);          /* statt rgba(55,65,81,0.9) */
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

.patient-discharge-btn:hover {
  background: var(--color-bg-elevated);           /* statt rgba(15,23,42,0.96) */
  border-color: var(--color-status-ok);
  color: var(--color-status-ok);
  transform: translateY(-0.5px);
}

/* Neuer-Patient-Formular oben im Patienten-Panel */

.patient-add-form {
  margin-bottom: var(--space-sm);
}

.patient-add-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.patient-add-input {
  flex: 1;
  border-radius: var(--radius-md);
  color: var(--color-text);
  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

.patient-add-input::placeholder {
  color: var(--color-text-muted);
}

.patient-add-input:focus {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-primary-outline-soft); /* statt rgba(236,72,153,0.45) */
  background: var(--color-bg-elevated);           /* leicht angehoben, aber variablenbasiert */
}
/* Aktiver Raum: kein Pointer & kein Hover-Effekt mehr */
.patient-room-btn--active {
  cursor: default; /* Pfeil statt Hand */
}

/* aktiv gewählter Raum → Highlightfarbe + automatische Lesbarkeit */
.patient-room-btn--active,
.patient-room-btn--active:hover{
  border-color: var(--color-primary) !important;
  background: var(--color-primary) !important;                 /* Highlight */
  color: var(--color-on-primary, #fff) !important;             /* kippt automatisch */
  box-shadow: var(--shadow-primary-elevated) !important;
}

/* Icons in Calls/Callpad hell darstellen (wie früher) */
#view-calls .calls-icon img,
.icon-circle img,
.callpad-btn__icon img,
.calls-icon__img {
  width: 22px;
  height: 22px;
  display: block;

  /* hell / weiß auf dunklem Hintergrund */
  filter: brightness(0) invert(1);
  opacity: 0.92;
}
.calls-columns{
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: var(--space-md);
  align-items: start;
}

/* responsive */
@media (max-width: 1200px){
  .calls-columns{ grid-template-columns: repeat(2, minmax(240px, 1fr)); }
}
@media (max-width: 700px){
  .calls-columns{ grid-template-columns: 1fr; }
}
/* Manuelle Aufgabe unter dem CallPad in der rechten Spalte */
#callpad-manual-card {
  grid-column: 4;
}

/* ✅ Icons im Dark UI hell anzeigen */
.calls-icon img,
.icon-circle img,
.callpad-btn__icon img {
  filter: brightness(0) invert(1);
  opacity: 0.92;
}
.trial-pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(0,0,0,0.35);
  cursor: default;
  user-select: none;
}

/* Optional: dezentes “Glow”, ohne nerviges Hover-Behavior */
.trial-pill:focus-visible{
  outline: 2px solid rgba(255,255,255,0.45);
  outline-offset: 2px;
}
/* Standorte: Kacheln wie der Rest (nur Variablen, kein rgba/#fff) */
.hub-tiles{
  display: grid;
  gap: var(--space-md);

  /* ✅ mind. 3 pro Reihe, responsive runter */
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  align-items: stretch;
}

@media (max-width: 1100px){
  .hub-tiles{ grid-template-columns: repeat(2, minmax(220px, 1fr)); }
}
@media (max-width: 700px){
  .hub-tiles{ grid-template-columns: 1fr; }
}
/* Standorte: max. 2 Kacheln pro Reihe + hochkant (mehr Höhe) */
#hub-location-list.hub-tiles{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 700px){
  #hub-location-list.hub-tiles{ grid-template-columns: 1fr; }
}

#hub-location-list .hub-tile{
  aspect-ratio: 3 / 4;
}

/* Shadows im Hub entfernen (nur Hub-Kacheln) */
#hub-section-rooms #hub-rooms-list .hub-room-tile,
#hub-team-list-body #hub-team-tiles .hub-team-tilewrap,
#hub-section-workflows #hub-templates-list .calls-tile,
#hub-location-list .hub-tile{
  box-shadow: none !important;
}

/* auch bei Hover/Focus (falls style.css dort einen Shadow setzt) */
#hub-section-rooms #hub-rooms-list .hub-room-tile:hover,
#hub-team-list-body #hub-team-tiles .hub-team-tilewrap:hover,
#hub-section-workflows #hub-templates-list .calls-tile:hover,
#hub-location-list .hub-tile:hover,
#hub-location-list .hub-tile:focus-within{
  box-shadow: none !important;
}
.hub-tile{
  position: relative;
  aspect-ratio: 1 / 1;

  border-radius: var(--radius-lg);
  border: 1px solid var(--color-primary-secondary-border);

  /* ✅ dunkler Card-Look + ein Hauch Secondary */
  background: color-mix(in srgb, var(--color-bg-elevated) 82%, var(--color-primary-secondary-soft) 18%);
  box-shadow: var(--shadow-soft);

  padding: var(--space-md);
  padding-bottom: 52px; /* Platz für Buttons unten */

  display: flex;
  flex-direction: column;
  justify-content: center; /* Titel/Meta mittig */
  align-items: center;
  gap: 10px;

  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.hub-tile:hover{
  transform: translateY(-1px);
  border-color: var(--color-primary-secondary-hover);
  box-shadow: var(--shadow-primary-elevated);
}

.hub-tile__top{
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: static; /* ✅ Buttons nicht mehr am Titel hängen */
}

.hub-tile__title{
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  text-align: center;
  color: var(--color-text);
  max-width: 100%;
  padding: 0 28px;
}

.hub-tile__meta{
  font-size: 12px;
  color: var(--color-text-muted);
  text-align: center;
  max-width: 100%;

  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hub-tile__actions{
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  gap: 6px;
  z-index: 2;
}

.hub-tile__confirm{
  position: absolute;
  left: 12px;
  bottom: 14px;
  font-size: 12px;
  color: var(--color-primary-secondary);
}
/* ============================================================
   TV Monitor Übersicht: 16:9 Live Preview Tiles
   ============================================================ */

.hub-tile--wide{
  aspect-ratio: 16 / 9;
  padding-bottom: var(--space-md);
  justify-content: flex-start;
  align-items: stretch;
}

.hub-tile__preview{
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.hub-tile__preview iframe{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.hub-tile__actions--row{
  position: static;
  width: 100%;
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ============================================================
   GLOBAL: Einheitlicher Input-Stil (Größe + dunkler Hintergrund)
   ============================================================ */

/* Text-Controls überall */
input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]),
select,
textarea,
.patient-add-input,
.hub-tenant-input,
.hub-tenant-form input,
.hub-tenant-form select,
.hub-tenant-form textarea {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-bg-elevated);     /* ✅ dunkler wie die meisten Inputs */
  color: var(--color-text);
  font: inherit;

  /* ✅ Größe wie Räume & Geräte (größer als bisher) */
  padding: 10px 12px;
  font-size: 14px;
  min-height: 40px;

  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"])::placeholder,
textarea::placeholder {
  color: var(--color-text-muted);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]):focus,
select:focus,
textarea:focus,
.patient-add-input:focus,
.hub-tenant-input:focus,
.hub-tenant-form input:focus,
.hub-tenant-form select:focus,
.hub-tenant-form textarea:focus {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-primary-outline-soft);
}
/* ============================================================
   iOS Safari / Touch: verhindert Auto-Zoom beim Fokus
   (iPhone zoomt bei Inputs < 16px)
   ============================================================ */
@media (hover: none) and (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]),
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* ============================================================
   GLOBAL: Checkbox & Radio – custom, im selben Stil
   ============================================================ */

input[type="checkbox"],
input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;

  border: 1px solid var(--color-border);
  background: var(--color-bg-elevated);
  display: inline-grid;
  place-content: center;

  vertical-align: middle;
  cursor: pointer;

  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

/* Checkbox eckig, Radio rund */
input[type="checkbox"] { border-radius: 6px; }
input[type="radio"] { border-radius: 999px; }

/* Focus wie bei Inputs */
input[type="checkbox"]:focus,
input[type="radio"]:focus {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-primary-outline-soft);
}

/* Checked State */
input[type="checkbox"]:checked,
input[type="radio"]:checked {
  background: rgba(236, 72, 153, 0.18); /* leichtes Primary-Glow */
  border-color: var(--color-primary);
}

/* Checkmark (Checkbox) */
input[type="checkbox"]::before {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0);
  transform-origin: center;
  transition: transform var(--transition-fast);
}

input[type="checkbox"]:checked::before {
  transform: rotate(-45deg) scale(1);
}

/* Dot (Radio) */
input[type="radio"]::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #fff;
  transform: scale(0);
  transition: transform var(--transition-fast);
}

input[type="radio"]:checked::before {
  transform: scale(1);
}

/* Disabled */
input[type="checkbox"]:disabled,
input[type="radio"]:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
/* Checkbox/Radio + Text sauber ausrichten */
.form-inline-check{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.form-inline-check input{
  margin: 0; /* verhindert Browser-Default-Abstände */
}
/* Calls: "Wer" – Kachel "Alle" immer Primary, aber OHNE Glow wenn inaktiv */
#view-calls #calls-who .calls-tilebtn.is-all{
  background: linear-gradient(to bottom right, var(--color-primary), var(--color-primary-strong)) !important;
  border-color: color-mix(in srgb, var(--color-primary) 60%, var(--color-border)) !important;
  box-shadow: none !important;                 /* ✅ kein Glow */
}

/* Optional: nur wenn aktiv, minimaler Ring statt Glow */
#view-calls #calls-who .calls-tilebtn.is-all.is-active{
  box-shadow: var(--shadow-primary-outline-soft) !important;
}

/* Calls: Panic – Checkbox nie anzeigen (UI reicht) */
#view-calls .calls-panic input{
  display: none !important;
}
/* ============================================================
   LOC TILES (Standorte) – Neu & clean
   ============================================================ */

.loc-tiles{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.loc-tile{
  position: relative;
  min-width: 0;

  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(31, 41, 55, 0.9);

  /* ✅ Hintergrund: Secondary */
  background: linear-gradient(
    to bottom right,
    var(--color-primary-secondary-hover),
    var(--color-primary-secondary-deep)
  );

  box-shadow: var(--shadow-soft);
  padding: 14px;
  padding-bottom: 58px; /* Platz für Buttons unten */

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  overflow: hidden;
  color: #fff;
}

/* ✅ Active (später im Flow): Primary */
.loc-tile.is-active{
  background: linear-gradient(
    to bottom right,
    var(--color-primary),
    var(--color-primary-strong)
  );
  box-shadow: var(--shadow-primary-elevated);
}

/* Titel + Meta mittig */
.loc-tile__title{
  text-align: center;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.15;
  margin: 0;
  padding: 0 4px;
}

.loc-tile__sub{
  margin-top: 8px;
  text-align: center;
  font-size: 12px;
  line-height: 1.25;
  color: rgba(248,250,252,0.85);
  padding: 0 6px;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ✅ Buttons unten: Edit links / Delete rechts */
.loc-tile__actions{
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  z-index: 2;
}

.loc-tile__actions .btn{
  flex: 0 0 auto;
}

/* Optional: Icon-only Buttons gleichmäßig */
.loc-tile__actions .btn--icon-only{
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
}

/* Confirm-Hinweis (2-Klick-Löschen) */
.loc-tile__confirm{
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 54px;
  text-align: center;
  font-size: 12px;
  color: rgba(248,250,252,0.9);
  opacity: 0.95;
}

/* Icons hell wie überall (falls noch nicht global geregelt) */
.loc-tile__actions .np-icon{
  width: 16px;
  height: 16px;
  display: block;
  filter: invert(1) brightness(2.2) contrast(1.05);
  opacity: 0.95;
}
/* ============================================================
   CALLS – Tablet / iPad Optimierung
   ============================================================ */

@media (max-width: 1024px) {
  /* 4 Spalten -> 2 Spalten (Wer/Was oben, Wo/Pad unten) */
  #view-calls .calls-columns{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: start;
  }

  /* Tiles innerhalb der Spalten: 2 pro Reihe */
  #view-calls .calls-grid{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  /* Tile Button kompakter */
  #view-calls .calls-tilebtn{
    padding: 10px 10px;
    min-height: 56px;
    border-radius: var(--radius-md);
  }

  #view-calls .calls-icon{
    width: 38px;
    height: 38px;
    font-size: 13px;
  }

  #view-calls .calls-label{
    font-size: 13px;
    line-height: 1.15;
  }

  /* CallPad Grid ebenfalls 2 pro Reihe */
  #view-calls .callpad-grid{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  #view-calls .callpad-btn{
    min-height: 56px;
    padding: 10px;
  }

  .callpad-btn__label{
    font-size: 13px;
    line-height: 1.15;
  }
}

/* Sehr kleine Screens: wieder 1 Spalte */
@media (max-width: 560px) {
  #view-calls .calls-columns{
    grid-template-columns: 1fr;
  }
  #view-calls .calls-grid{
    grid-template-columns: 1fr;
  }
  #view-calls .callpad-grid{
    grid-template-columns: 1fr;
  }
}
/* ============================================================
   SIDEBAR NAV – Tablet kompakt (nur Icons)
   ============================================================ */

@media (max-width: 1024px) {
  /* Sidebar schmaler */
  .app-nav{
    width: 68px;
    min-width: 68px;
  }

  /* Textlabels ausblenden (je nach HTML-Struktur greifen 1–2 davon) */
  .app-nav-item .label,
  .app-nav-item .text,
  .app-nav-item__label,
  .app-nav-label,
  .nav-label{
    display: none !important;
  }

  /* Buttons mittig */
  .app-nav-item{
    justify-content: center;
    padding-left: 10px;
    padding-right: 10px;
  }
}
/* ============================================================
   iPad / kleinere Screens: Calls nicht untereinander stapeln
   + Sidebar auf Icon-Nav reduzieren
   ============================================================ */

@media (max-width: 1124px) {
  /* Sidebar schmaler -> mehr Platz für Calls */
  .app-layout {
    grid-template-columns: 74px 1fr;
  }

  .app-sidebar {
    padding: 10px 8px;
  }

  .app-nav-item {
    justify-content: center;
    gap: 0;
    padding: 12px 10px;
  }

  /* Textlabels in der Sidebar ausblenden (nur Icons) */
  .app-nav-item > span:last-child {
    display: none;
  }

  /* Calls: statt 1 Spalte -> 2 Spalten */
  .calls-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Tiles etwas kompakter, damit mehr “greifbar” ist */
  #view-calls .calls-tilebtn {
    min-height: 74px;
    padding: 10px 10px;
  }

  #view-calls .calls-icon {
    width: 36px;
    height: 36px;
    font-size: 12px;
  }

  #view-calls .calls-label {
    font-size: 12px;
    line-height: 1.15;
  }

  /* In jeder Calls-Spalte: 2 Kacheln pro Reihe erzwingen */
  #view-calls .calls-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Handy: dann erst wirklich untereinander */
@media (max-width: 620px) {
  .calls-columns {
    grid-template-columns: 1fr;
  }
}
/* ==========================================================================
   CALLS: Layout früher umbrechen (iPad: 2 Spalten statt 1)
   ========================================================================== */

/* 4 Cards: Wer / Was / Wo / CallPad */
#view-calls .calls-columns{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-md);
  align-items: start;
}

/* Wichtig: nichts soll aus dem Container rausdrücken */
#view-calls .calls-col,
#view-calls .calls-grid,
#view-calls .calls-tile,
#view-calls .calls-tilebtn{
  min-width: 0;
}

/* iPad / kleinere Laptops: 2 Spalten => Wo + CallPad rutschen in Zeile 2 */
@media (max-width: 1400px){
  #view-calls .calls-columns{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* in der halbbreiten Spalte lieber 2 Kacheln pro Reihe */
  #view-calls .calls-grid{
    grid-template-columns: repeat(2, minmax(110px, 1fr));
  }
}

/* Handy: 1 Spalte */
@media (max-width: 640px){
  #view-calls .calls-columns{
    grid-template-columns: 1fr;
  }

  #view-calls .calls-grid{
    grid-template-columns: repeat(2, minmax(110px, 1fr));
  }
}

/* ==========================================================================
   NP SIGNAGE – Wartezimmer TV (Hub + Player)
   Wichtig: nur Variablen/Tokens aus diesem style.css verwenden.
   ========================================================================== */

.np-signage-mount { width: 100%; }

/* Hub-Grid etwas enger (passt in bestehendes Hub Layout) */
.np-signage-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-lg);
}

/* Screen cards */
.np-signage-screengrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-md);
}

.np-signage-formgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

@media (max-width: 900px) {
  .np-signage-formgrid { grid-template-columns: 1fr; }
}

.np-signage-row {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  flex-wrap: wrap;
}

.np-signage-row__grow { flex: 1 1 260px; min-width: 220px; }

/* Preview */
.np-signage-preview {
  margin-top: var(--space-sm);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-soft);
  background: var(--color-bg-elevated);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-soft);
}

.np-signage-preview__label {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: rgba(2, 6, 23, 0.55);
  border-color: rgba(148, 163, 184, 0.35);
  color: var(--color-text);
  backdrop-filter: blur(10px);
}

.np-signage-preview__frame {
  width: 100%;
  height: 260px;
  border: 0;
  display: block;
  background: var(--color-bg-elevated);
}

/* Playlists */
.np-signage-pl { border: 1px solid var(--color-border-soft); }
.np-signage-pl-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.np-signage-pl-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.np-signage-pl-actions { display: inline-flex; gap: 8px; }

.np-signage-additem {
  margin-top: var(--space-sm);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  align-items: end;
}

@media (max-width: 900px) {
  .np-signage-additem { grid-template-columns: 1fr; }
}

.np-signage-additem__actions { display: flex; justify-content: flex-end; }

.np-signage-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-soft);
  background: rgba(2, 6, 23, 0.18);
}

.np-signage-item__left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.np-signage-item__text { min-width: 0; }
.np-signage-item__title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 52vw;
}
.np-signage-item__right { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* Medien */
.np-signage-mediagrid__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-md);
}

.np-signage-media {
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-soft);
  background: rgba(2, 6, 23, 0.18);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.np-signage-media__thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--color-bg-elevated);
  display: grid;
  place-items: center;
}

.np-signage-media__thumb img,
.np-signage-media__thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.np-signage-media__meta { padding: 10px 12px; }
.np-signage-media__name {
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.np-signage-media__sub { font-size: 11px; margin-top: 4px; }

/* Toast */
.np-toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(2, 6, 23, 0.68);
  color: var(--color-text);
  box-shadow: var(--shadow-soft);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  backdrop-filter: blur(12px);
}

.np-toast.is-open {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   PLAYER (Wartezimmer TV)
   ========================================================================== */

.np-tv {
  height: 100%;
  background: var(--app-bg-gradient);
  overflow: hidden;
  font-family: var(--font-family-sans, system-ui, -apple-system, "Segoe UI", Arial, sans-serif);
}

.np-tv-stage {
  position: fixed;
  inset: 0;
  background: var(--app-bg-gradient);
}

.np-tv-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--np-tv-fade-ms, 800ms);
}

.np-tv-slide--active { opacity: 1; }

.np-tv-img,
.np-tv-video,
.np-tv-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: cover;
}

/* Overlay */
.np-tv-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
  background: rgba(0,0,0,.55);
  background: color-mix(in srgb, #000 55%, transparent);
  backdrop-filter: blur(10px);
}

.np-tv-overlay.is-open { opacity: 1; }

.np-tv-overlay__inner {
  min-width: min(820px, 92vw);
  padding: var(--space-lg);
  border: 1px solid color-mix(in srgb, var(--color-primary) 35%, var(--color-border));
  box-shadow: var(--shadow-primary-elevated);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.np-tv-overlay__title {
  font-size: clamp(22px, 4vw, 52px);
  line-height: 1.08;
  margin: 0;
}
/* NAVIPRAX Signage – Media Delete Button */
.np-signage-media__thumb { position: relative; }

.np-signage-media__actions{
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
  z-index: 2;
}
/* ------------------------------------------------------------
   NP TV – Controls (Vollbild / Schließen / Hint)
------------------------------------------------------------ */

.np-tv-stage { position: relative; }

.np-tv-controls{
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  z-index: 50;

  color: var(--color-text);

  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.np-tv-controls--show{
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.np-tv-controls__btn svg{
  width: 18px;
  height: 18px;
  display: block;
}

.np-tv-controls__hint{
  font-size: 13px;
  padding: 6px 10px;
  border-radius: var(--radius-md);

  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);

  /* nicer, falls unterstützt */
  background: color-mix(in srgb, var(--color-bg-elevated) 82%, transparent);
  border-color: color-mix(in srgb, var(--color-border) 70%, transparent);
}
/* Player Layer müssen den Screen füllen */
.np-tv-stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.np-tv-slide {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* WICHTIG: Video (und Bilder) immer Fullscreen-Cover */
.np-tv-video,
.np-tv-media,
.np-tv-slide video,
.np-tv-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Waitroom TV – Preview & Buttons sauber */
.np-wr-previewhost { margin-top: 10px; }

.np-wr-previewbox{
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: rgba(0,0,0,0.25);
}

.np-wr-media{
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  object-fit: cover;
}

.np-wr-previewplaceholder{
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 12px;
  opacity: .85;
}

.np-wr-actions{
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: stretch;
}

.np-wr-btn{
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
/* ============================================================
   TV (Waitroom) – Buttons groß, nicht pill, exakt gleich
   ============================================================ */

#view-waitroom .np-wr-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  align-items: stretch;
}

#view-waitroom .np-wr-actions .np-wr-btn {
  /* beide (a + button) exakt gleich behandeln */
  display: inline-flex;
  align-items: center;
  justify-content: center;

  /* groß und gleich */
  min-height: 44px;
  padding: 12px 16px;

  /* KEINE pill */
  border-radius: var(--radius-md);

  /* Link-Underline killen */
  text-decoration: none !important;
}

/* optional: gleiche Breite, wirkt “groß” und aufgeräumt */
#view-waitroom .np-wr-actions .np-wr-btn {
  flex: 1 1 180px; /* beide ziehen gleich, min 180px */
}
/* TV (Waitroom) – Buttons exakt gleich + exakt gleiche Höhe/Position */
#view-waitroom .np-wr-actions{
  display:flex !important;
  gap: var(--space-sm) !important;
  align-items: stretch !important;   /* <- wichtig */
}

#view-waitroom .np-wr-actions .np-wr-btn.btn--primary,
#view-waitroom .np-wr-actions .np-wr-btn.btn--ghost{
  box-sizing: border-box !important;

  display: flex !important;          /* <- statt inline-flex */
  align-items: center !important;
  justify-content: center !important;

  flex: 1 1 0 !important;

  height: 48px !important;
  min-height: 48px !important;
  padding: 0 18px !important;

  line-height: 1 !important;
  vertical-align: middle !important;

  border-radius: var(--radius-md) !important;
  text-decoration: none !important;

  /* <- KRITISCH: gleiche Border-Basis, sonst “wandert” einer */
  border-width: 1px !important;
  border-style: solid !important;
}

/* Primary hat oft keine Border -> wir geben eine transparente,
   damit beide exakt gleich rechnen */
#view-waitroom .np-wr-actions .np-wr-btn.btn--primary{
  border-color: transparent !important;
}

/* Ghost soll seine Border behalten (nur falls irgendwo überschrieben) */
#view-waitroom .np-wr-actions .np-wr-btn.btn--ghost{
  border-color: var(--color-border) !important;
}
/* Neuer Patient: Abstand zwischen Input und Button (nur hier) */
.patient-add-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* falls irgendwo Buttons global margin-top bekommen haben */
.patient-add-form .btn {
  margin-top: 0 !important;
}
/* ============================================================
   NP WAITROOM TV – Overlay Tweaks (no blur, centered)
   ============================================================ */
.np-tv-overlay {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.np-tv-overlay__inner {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;

  /* mehr Luft */
  padding: 34px 28px !important;

  /* nichts was „Glow“ wirkt */
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.40) !important;
    border-radius: var(--radius-lg);
  overflow: hidden;

}

.np-tv-overlay__inner .card__header {
  /* komplett mittig */
  text-align: center !important;
  align-items: center !important;
  justify-content: center !important;
}

.np-tv-overlay__title {
  text-align: center !important;
}
/* =========================================
   CALLS / Schaltzentrale: Kachel-Text hell
   (weil .calls-tilebtn auch im Hub genutzt wird,
   aber Calls nicht die Hub-CSS lädt)
========================================= */
#view-calls .calls-tilebtn{
  color: var(--color-text, #e5e7eb);
}

#view-calls .calls-tilebtn .calls-label,
#view-calls .calls-tilebtn .calls-icon{
  color: inherit;
}

/* Active darf NICHT pauschal auf primary-on-color schalten (macht "Wer" kaputt) */
#view-calls .calls-tilebtn.is-active{
  color: inherit !important;
}

/* nur echte farbige Kacheln sollen on-color erzwingen */
#view-calls .calls-tilebtn.is-all.is-active{
  color: var(--color-on-primary, #fff) !important;
}
#view-calls .calls-tilebtn--what.is-active{
  color: var(--color-on-primary, #fff) !important;
}
#view-calls .calls-tilebtn--what.is-fav.is-active{
  color: var(--color-on-secondary, #fff) !important;
}
#view-calls .calls-tilebtn--where.is-active{
  color: var(--color-on-secondary, #fff) !important;
}
#view-calls .calls-tilebtn.preset--panic.is-active{
  color: var(--color-on-primary, #fff) !important;
}
#view-calls .calls-tilebtn.preset--normal.is-active{
  color: var(--color-on-secondary, #fff) !important;
}

/* Panic-Dot für Preset-Buttons (oben rechts) */
.callpad-btn.has-panic-dot,
.calls-preset-btn.has-panic-dot{
  position: relative;
}

.callpad-btn.has-panic-dot::after,
.calls-preset-btn.has-panic-dot::after{
  content:"";
  position:absolute;
  top:8px;
  right:8px;
  width:10px;
  height:10px;
  border-radius:999px;
  background: var(--color-danger, #ef4444);
  box-shadow: 0 0 0 2px var(--color-surface, #111);
  z-index: 2;
  pointer-events: none;
}
/* 2-Klick-Confirm (z.B. Call "Abbrechen"/Löschen): sichtbar rot ohne Hint */
.btn.is-confirm{
  border-color: var(--color-danger, #ef4444) !important;
  color: var(--color-danger, #ef4444) !important;
  background: var(--color-danger-soft, rgba(239, 68, 68, 0.18)) !important;
  box-shadow: 0 0 0 2px var(--color-danger, #ef4444) !important;
}
/* Header: großer Status-Dot (ohne Text / ohne Rand) */
.status-dot {
  display: inline-block;
  border-radius: 999px;
  border: 0;
}

.status-dot--online { background: #22c55e; }  /* grün */
.status-dot--offline { background: #ef4444; } /* rot */

.status-dot--xl {
  width: 16px;
  height: 16px;
}

/* Abstand im Header zwischen User-Info und Logout */
.app-header__user #header-user-dot {
  margin-left: 12px;
}
/* ------------------------------------------------------------
   SELECT (Dropdown) – im Stil des Iconpickers
------------------------------------------------------------ */
select,
.hub-tenant-form select{
  width: 100%;
  box-sizing: border-box;

  border-radius: var(--radius-md) !important;
  border: 1px solid var(--color-border) !important;

  background: var(--color-bg-elevated) !important;
  color: var(--color-text) !important;

  font: inherit;
  font-size: 14px;
  min-height: 40px;

  padding: 10px 40px 10px 12px !important; /* Platz für Chevron */

  cursor: pointer;
  outline: none;

  /* wichtig: native Optik aus, damit es wie Iconpicker wirkt */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  /* Chevron (hell auf dunkel) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23e5e7eb' fill-opacity='0.75' d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;

  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

select:hover,
.hub-tenant-form select:hover{
  border-color: color-mix(in srgb, var(--color-border) 70%, white 12%);
}

select:focus,
.hub-tenant-form select:focus{
  border-color: var(--color-primary);
  box-shadow: var(--shadow-primary-outline-soft);
}

/* Disabled */
select:disabled,
.hub-tenant-form select:disabled{
  opacity: 0.6;
  cursor: not-allowed;
}

/* Options (je nach Browser begrenzt stylbar) */
select option{
  background: var(--color-bg-elevated);
  color: var(--color-text);
}

select::-ms-expand{ display:none; }
/* =========================================================
   NP Pretty Dropdown (Select-Replacement) – Iconpicker Look
   Nur für Selects, die wir per JS upgraden.
========================================================= */

.np-dd{ position:relative; width:100%; }

/* natives Select bleibt vorhanden, aber unsichtbar (Form bleibt intakt) */
.np-dd__native{
  position:absolute !important;
  inset:0 !important;
  opacity:0 !important;
  pointer-events:none !important;
  width:100% !important;
  height:100% !important;
}

/* Trigger sieht aus wie deine Inputs / Iconpicker-UI */
.np-dd__trigger{
  width:100%;
  min-height:40px;
  box-sizing:border-box;

  display:flex;
  align-items:center;
  justify-content:flex-start;

  border-radius:var(--radius-md);
  border:1px solid rgba(31,41,55,.9);
  background:rgba(15,23,42,.92);
  color:var(--color-text);

  padding:10px 42px 10px 12px;
  font:inherit;
  cursor:pointer;

  box-shadow:0 10px 25px rgba(0,0,0,.18);
}

.np-dd__trigger:focus-visible{
  outline:none;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-primary-outline-soft);
}

.np-dd__trigger::after{
  content:"";
  position:absolute;
  right:12px;
  top:50%;
  transform:translateY(-50%);
  width:16px;
  height:16px;
  opacity:.8;
  background-repeat:no-repeat;
  background-size:16px 16px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23e5e7eb' fill-opacity='0.85' d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
}

/* Menü = wie .wf-icon-dropdown */
.np-dd__menu{
  position:absolute;
  left:0;
  top:calc(100% + 10px);
  width:100%;
  max-height:280px;
  overflow:auto;

  border-radius:var(--radius-md);
  border:1px solid rgba(31,41,55,.9);
  background:rgba(15,23,42,.98);
  box-shadow:0 10px 25px rgba(0,0,0,.45);

  padding:8px;
  z-index:80;

  display:none;
}

.np-dd.is-open .np-dd__menu{ display:block; }

.np-dd__opt{
  width:100%;
  border:0;
  background:transparent;
  color:var(--color-text);
  font:inherit;

  padding:10px 10px;
  border-radius:12px;

  cursor:pointer;
  text-align:left;

  display:flex;
  align-items:center;
  gap:10px;
}

.np-dd__opt:hover{ background:rgba(255,255,255,0.08); }
.np-dd__opt.is-selected{
  outline:2px solid var(--color-primary);
  background:rgba(255,255,255,0.10);
}
.np-dd__opt:disabled{ opacity:.55; cursor:not-allowed; }
/* =========================================================
   NP Pretty Dropdown (Select-Replacement) – Iconpicker Look
========================================================= */

.np-dd{
  position:relative;
  width:100%;

  /* ✅ Tenant-abhängige Farben */
  --np-dd-border: color-mix(in srgb, var(--color-primary-secondary) 28%, var(--color-border) 72%);
  --np-dd-bg: var(--surface-secondary-med-a92, var(--color-bg-elevated));
  --np-dd-panel: var(--surface-secondary-med, var(--color-bg-elevated));
  --np-dd-hover: var(--color-primary-secondary-soft);
  --np-dd-selected: var(--surface-primary-med-a55, var(--color-primary-soft));
}

.np-dd__native{
  position:absolute !important;
  inset:0 !important;
  opacity:0 !important;
  pointer-events:none !important;
  width:100% !important;
  height:100% !important;
}

.np-dd__trigger{
  position:relative;
  width:100%;
  min-height:40px;
  box-sizing:border-box;

  display:flex;
  align-items:center;

  border-radius:var(--radius-md);
  border:1px solid var(--np-dd-border);
background: var(--np-dd-bg);

  color:var(--color-text);

  padding:10px 42px 10px 12px;
  font:inherit;
  cursor:pointer;

  box-shadow:0 10px 25px rgba(0,0,0,.18);
}

.np-dd__trigger:focus-visible{
  outline:none;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-primary-outline-soft);
}

.np-dd__trigger::after{
  content:"";
  position:absolute;
  right:12px;
  top:50%;
  transform:translateY(-50%);
  width:16px;
  height:16px;
  opacity:.8;
  background-repeat:no-repeat;
  background-size:16px 16px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23e5e7eb' fill-opacity='0.85' d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
}

.np-dd__menu{
  position:absolute;
  left:0;
  top:calc(100% + 10px);
  width:100%;
  max-height:280px;
  overflow:auto;

  border-radius:var(--radius-md);
 border:1px solid var(--np-dd-border);
background: var(--np-dd-panel);

  box-shadow:0 10px 25px rgba(0,0,0,.45);

  padding:8px;
  z-index:9999;

  display:none;
}

.np-dd.is-open .np-dd__menu{ display:block; }

.np-dd__opt{
  width:100%;
  border:0;
  background:transparent;
  color:var(--color-text);
  font:inherit;

  padding:10px 10px;
  border-radius:12px;

  cursor:pointer;
  text-align:left;

  display:flex;
  align-items:center;
  gap:10px;
}

.np-dd__opt:hover{ background: var(--np-dd-hover); }
.np-dd__opt.is-selected{
  outline:2px solid var(--color-primary);
background: var(--np-dd-selected);
}
.np-dd__opt:disabled{ opacity:.55; cursor:not-allowed; }
/* FLOW Calls: Iconbuttons sollen zur Kachel passen (hell/dunkel auto via on-color) */
#flow .call-tile--normal .btn--icon-only img.icon-svg{
  filter: var(--icon-filter-on-secondary) !important;
}
#flow .call-tile--panic .btn--icon-only img.icon-svg{
  filter: var(--icon-filter-on-primary) !important;
}

/* Buttonfläche “dreamy/cloudy” auf farbigem Hintergrund (ohne Confirm zu stören) */
#flow .call-tile--normal .btn--icon-only:not(.is-confirm),
#flow .call-tile--panic .btn--icon-only:not(.is-confirm){
  border-color: color-mix(in srgb, currentColor 35%, transparent) !important;
  background: color-mix(in srgb, currentColor 10%, transparent) !important;
}
#flow .call-tile--normal .btn--icon-only:not(.is-confirm):hover,
#flow .call-tile--panic .btn--icon-only:not(.is-confirm):hover{
  background: color-mix(in srgb, currentColor 16%, transparent) !important;
}
/* =========================================================
   HEADER: Praxis + Standort (Label + Value) gleiche Farbe,
   kippt automatisch nach Schwellenwert (on-primary)
========================================================= */

.app-header__practice,
.app-header__location{
  color: var(--color-on-primary, #fff) !important;
}

/* Label und Value sollen exakt gleichfarbig sein */
.app-header__practice .label,
.app-header__practice .value,
.app-header__location .label,
.app-header__location .value{
  color: inherit !important;
  opacity: 1 !important; /* falls irgendwo label gedimmt ist */
}

/* optional: bessere Lesbarkeit im Gradient (sehr subtil) */
html[data-theme="light"] .app-header__practice,
html[data-theme="light"] .app-header__location,
html[data-theme="dark"] .app-header__practice,
html[data-theme="dark"] .app-header__location{
  text-shadow: 0 1px 0 rgba(0,0,0,0.08);
}
/* =========================================================
   HEADER: Panic-Indicator (Benachrichtigungen)
========================================================= */
.app-header__right .btn--icon-only.is-panic-alert{
  background: var(--color-danger) !important;
  border-color: color-mix(in srgb, var(--color-danger) 70%, transparent) !important;
  box-shadow:
    0 0 0 4px var(--color-danger-soft),
    var(--shadow-soft) !important;
  color: #fff !important;
}

.app-header__right .btn--icon-only.is-panic-alert:hover{
  background: color-mix(in srgb, var(--color-danger) 88%, #000) !important;
}

/* Icon (img) auf weiß erzwingen */
.app-header__right .btn--icon-only.is-panic-alert .icon-svg,
.app-header__right .btn--icon-only.is-panic-alert img{
  filter: brightness(0) invert(1) !important;
  opacity: 1 !important;
}
/* ============================================================
   CALLS – iPad Layout Fix
   - Presets als Full-Width-Card oben
   - darunter WER / WAS / WO als 3 Cards nebeneinander
   - Presets: Desktop 5, iPad 4, Phone 1 pro Reihe
   ============================================================ */

#view-calls{
  --calls-tile-min: 84px;
  --calls-tile-gap: 10px;
  --calls-presets-gap: 10px;
}

/* 3 Cards nebeneinander (auch iPad), NICHT auf 2 umbrechen */
#view-calls .calls-columns{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

/* Presets-Card: über die ganze Breite + nach oben (JS setzt .calls-col--presets) */
#view-calls .calls-columns > .calls-col--presets{
  grid-column: 1 / -1;
  grid-row: 1;
}

/* WER/WAS/WO Grids: kompakter & responsiv über tile-min */
#view-calls #calls-who,
#view-calls #calls-what,
#view-calls #calls-where{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--calls-tile-min), 1fr));
  gap: var(--calls-tile-gap);
  align-content: start;
  width: 100%;
}

/* Tiles allgemein etwas kompakter halten */
#view-calls .calls-tilebtn{
  padding: 10px !important;
  min-height: 82px;
}

/* Presets Grid (#callpad) – default: Smartphone (1 pro Reihe) */
#view-calls #callpad.callpad-grid{
  display: grid;
  gap: var(--calls-presets-gap);
  grid-template-columns: 1fr;
  align-content: start;
}

/* Desktop: 5 Presets nebeneinander */
@media (min-width: 1100px){
  #view-calls #callpad.callpad-grid{
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* iPad / Tablet: 4 Presets nebeneinander */
@media (min-width: 740px) and (max-width: 1099px){
  #view-calls #callpad.callpad-grid{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Preset Buttons: länglich + lesbar */
#view-calls .callpad-btn{
  min-height: 54px;
  padding: 10px 12px;
}

/* Meta text clamp (damit Buttons nicht riesig werden) */
#view-calls .callpad-btn__meta{
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  -webkit-line-clamp: 2;
  font-size: 11px;
  line-height: 1.2;
  opacity: .85;
}

#view-calls .callpad-btn__label{
  font-size: 13px;
  line-height: 1.1;
}

/* iPad: Tiles noch kompakter, damit mehr sichtbar bleibt */
@media (max-width: 1024px){
  #view-calls{
    --calls-tile-min: 66px;
    --calls-tile-gap: 8px;
    --calls-presets-gap: 8px;
  }

  #view-calls .calls-columns{
    gap: 10px;
  }

  #view-calls .calls-tilebtn{
    padding: 8px !important;
    min-height: 68px;
    gap: 6px !important;
  }

  #view-calls .calls-icon{
    width: 34px;
    height: 34px;
    font-size: 12px;
  }

  #view-calls .calls-label{
    font-size: 11px;
    line-height: 1.1;
  }

  /* Presets-Meta auf iPad 1 Zeile => Buttons bleiben niedrig */
  #view-calls .callpad-btn__meta{
    -webkit-line-clamp: 1;
  }
}

/* Smartphone: Cards untereinander (Presets bleiben 1 pro Reihe) */
@media (max-width: 720px){
  #view-calls .calls-columns{
    grid-template-columns: 1fr;
  }
  #view-calls .calls-columns > .calls-col--presets{
    grid-row: auto;
  }
}
/* ============================================================
   Call Presets Drag & Drop (Long-Press)
   ============================================================ */
#view-calls #callpad.np-callpad-dnd .np-drag-placeholder{
  border: 1px dashed var(--color-border-soft, rgba(148,163,184,0.28));
  border-radius: 14px;
  background: color-mix(in srgb, var(--color-border-soft, rgba(148,163,184,0.18)) 45%, transparent);
}

#view-calls .callpad-btn.np-dragging{
  opacity: .92;
  transform: scale(1.02);
  box-shadow: 0 16px 34px rgba(0,0,0,.22);
}

.np-drag-noselect,
.np-drag-noselect *{
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-touch-callout: none !important;
}
/* ============================================================
   CALLPAD DnD – smoother on iPad/iPhone
   ============================================================ */

#view-calls .callpad-btn{
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

body.np-dnd-active #view-calls .callpad-grid,
body.np-dnd-active #view-calls .callpad-btn{
  touch-action: none;           /* verhindert scroll / zoom-interference während drag */
}

#view-calls .callpad-btn.np-dragging{
  opacity: .96;
  transform: translate3d(0,0,0);
}

#view-calls .np-drag-placeholder{
  border-radius: var(--radius-md);
  border: 1px dashed color-mix(in srgb, var(--color-border) 65%, transparent);
  background: color-mix(in srgb, var(--color-bg-elevated) 60%, transparent);
}
/* Callpad DnD: smooth + kein Scroll-Interference */
body.np-dnd-active #view-calls #callpad,
body.np-dnd-active #view-calls .callpad-btn{
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

#view-calls .callpad-btn.np-dragging{
  opacity: .96;
  transform: translate3d(0,0,0);
}

#view-calls .np-drag-placeholder{
  border: 1px dashed color-mix(in srgb, var(--color-border, rgba(148,163,184,.35)) 70%, transparent);
  background: color-mix(in srgb, var(--color-bg-elevated, rgba(255,255,255,.06)) 60%, transparent);
}
