/*<!--
#                              __
#                            .d$$b
#                          .' TO$;\
#                         /  : TP._;
#                        / _.;  :Tb|
#                       /   /   ;j$j
#                   _.-"       d$$$$
#                 .' ..       d$$$$;
#                /  /P'      d$$$$P. |\
#               /   "      .d$$$P' |\^"l
#             .'           `T$P^"""""  :
#         ._.'      _.'                ;
#      `-.-".-'-' ._.       _.-"    .-"
#    `.-" _____  ._              .-"
#   -(.g$$$$$$$b.              .'
#     ""^^T$$$P^)            .(:
#       _/  -"  /.'         /:/;
#    ._.'-'`-'  ")/         /;/;
# `-.-"..--""   " /         /  ;
#.-" ..--""        -'          :
#..--""--.-"         (\      .-(\
#  ..--""              `-\(\/;`
#    _.                      :
#                            ;`-
#                           :\
#                           ;  
#___________Veyora____________
#____________2025_____________
-->*/

/* Grundlayout */

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background-color: #020617;
  color: #e5e7eb;
}

.app-shell {
  display: flex;
  min-height: 100vh;
  background: radial-gradient(circle at top, #0b1220 0, #020617 55%);
}

/* Proton ähnliche Sidebar */

.sidebar {
  width: 240px;
  background: linear-gradient(180deg, #020617 0, #020617 40%, #020617 100%);
  border-right: 1px solid rgba(31, 41, 55, 0.9);
  display: flex;
  flex-direction: column;
  padding: 16px 14px;
  box-sizing: border-box;
}

.sidebar-header {
  margin-bottom: 18px;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.logo-image-big {
  width: 250px;
  height: auto;
  display: block;
  object-fit: contain;
  margin-left: -14px;   /* weiter nach links */
}

/* Sidebar Navigation */

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.nav-section {
  margin-bottom: 16px;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 8px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  margin: 2px 0;
  border-radius: 999px;
  font-size: 13px;
  color: #e5e7eb;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: background 0.12s ease, color 0.12s ease, transform 0.12s ease;
}

.nav-item::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at top left, rgba(148, 163, 184, 0.25), transparent 60%);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.nav-item:hover {
  background: rgba(148, 163, 184, 0.16);
  transform: translateY(-0.5px);
}

.nav-item:hover::before {
  opacity: 1;
}

.nav-item-active {
  background: rgba(56, 189, 248, 0.18);
  color: #e0f2fe;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.45);
}

.nav-label {
  margin-left: 4px;
}

/* Sidebar Footer Tenant Anzeige */

.sidebar-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(31, 41, 55, 0.9);
}

.tenant-pill {
  display: flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 8px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(55, 65, 81, 0.9);
}

.tenant-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  margin-right: 8px;
}

.tenant-text {
  display: flex;
  flex-direction: column;
}

.tenant-label {
  font-size: 10px;
  color: #9ca3af;
}

.tenant-value {
  font-size: 12px;
}

/* Hauptbereich */

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Topbar */

.topbar {
  height: 56px;
  border-bottom: 1px solid rgba(31, 41, 55, 0.9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(12px);
}

.topbar-left {
  font-size: 15px;
  font-weight: 500;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* User Chip */

.user-chip {
  display: flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(55, 65, 81, 0.9);
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: radial-gradient(circle at top, #38bdf8 0, #0ea5e9 60%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #0b1120;
  margin-right: 6px;
}

.user-text {
  display: flex;
  flex-direction: column;
}

.user-email {
  font-size: 12px;
}

.user-role {
  font-size: 11px;
  color: #9ca3af;
}

/* Buttons */

.btn-primary,
.btn-ghost,
.btn-full {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease,
    color 0.12s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #0b1120;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.30), 
              0 0 4px rgba(56, 189, 248, 0.45);
}

.btn-primary:hover {
  box-shadow: 0 14px 32px rgba(56, 189, 248, 0.55);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: #e5e7eb;
}

.btn-ghost:hover {
  background: rgba(148, 163, 184, 0.12);
}

.btn-full {
  width: 100%;
  box-sizing: border-box; /* verhindert Ueberstand durch Padding */
}

/* Pill Buttons im Arbeitsbereich, optisch wie Dashboard */

.nav-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  margin-top: 6px;
  border-radius: 999px;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.95);
  color: #e5e7eb;
  border: 1px solid rgba(31, 41, 55, 0.9);
  transition: background 0.12s ease, box-shadow 0.12s ease,
    transform 0.12s ease, color 0.12s ease;
  box-sizing: border-box;
}

.nav-pill:hover {
  background: rgba(30, 64, 175, 0.4);      /* leicht bläuliche Aufhellung */
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.7);
  transform: translateY(-0.5px);
}

.nav-pill-active {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #0b1120;
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.45);
  border-color: transparent;
}

/* Hover fuer aktiven Pill. soll gleich bleiben wie aktiv, nicht abdunkeln */

.nav-pill-active:hover {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #0b1120;
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.55);
  border-color: transparent;
  transform: translateY(-0.5px);
}

/* Content */

.content {
  padding: 18px 22px;
  box-sizing: border-box;
}

/* Karten */

.card {
  background-color: rgba(15, 23, 42, 0.98);
  border-radius: 16px;
  padding: 20px 22px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.9);
  max-width: 760px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.card-subtitle {
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 16px;
}

.info-row {
  font-size: 13px;
  margin-bottom: 6px;
}

.section-title {
  margin-top: 18px;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
}

.hint {
  font-size: 12px;
  color: #9ca3af;
}

/* Flash Messages */

.flash-container {
  margin-bottom: 12px;
}

.flash {
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  margin-bottom: 4px;
}

.flash-success {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.5);
}

.flash-danger {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.5);
}

.flash-info {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.6);
}

/* ============================
   Auth / Login Seiten
   ============================ */

.auth-body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #020617 0, #020617 45%, #020617 100%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: #e5e7eb;
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 60%),
    radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.14), transparent 65%),
    #020617;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: rgba(15, 23, 42, 0.98);
  border-radius: 24px;
  padding: 26px 26px 22px;
  box-sizing: border-box;
  border: 1px solid rgba(55, 65, 81, 0.9);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.95);
}

.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.auth-logo-img {
  width: 250px;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.auth-title {
  text-align: center;
  font-size: auto;
  font-weight: 600;
  margin-bottom: 4px;
}

.auth-subtitle {
  text-align: center;
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 18px;
}

.auth-form {
  margin-top: 4px;
}

.form-row {
  margin-bottom: 14px;
}

.form-row-inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-label {
  display: block;
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 4px;
}

.form-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  font-size: 13px;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.form-input:focus {
  border-color: rgba(56, 189, 248, 0.75);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.55);
  background: rgba(15, 23, 42, 1);
}

.form-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #9ca3af;
}

.form-checkbox input[type="checkbox"] {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(55, 65, 81, 0.9);
}

.auth-footer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(31, 41, 55, 0.9);
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.auth-footer-text {
  color: #9ca3af;
}

.auth-footer-link {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 500;
}

.auth-footer-link:hover {
  text-decoration: underline;
}

/* --------------------------------
   Init-Admin Seite (Override)
   -------------------------------- */

.init-wrapper {
  align-items: center;
  padding-top: 40px;
  padding-bottom: 40px;
}

.init-left {
  padding: 32px 40px;
}

.init-right {
  padding: 32px 40px;
}

/* Logo gezielt verkleinern */
.init-logo-img {
  width: 250px !important;
  height: auto !important;
  max-width: 250px !important;
  display: block;
}

.init-subtitle {
  margin-top: 20px;
  font-size: 20px;
}

.init-text {
  margin-top: 10px;
  max-width: 420px;
  line-height: 1.5;
}

/* Karte optimieren */
.init-card {
  margin-top: 30px;
  padding: 28px 28px 24px;
}

.init-card .login-title {
  margin-bottom: 20px;
}

.init-card .form-group {
  margin-bottom: 14px;
}

.table-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.inline-form {
  display: inline-block;
  margin: 0;
}

.btn-xs {
  padding: 3px 8px;
  font-size: 11px;
  border-radius: 4px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.8);
  cursor: pointer;
}

.btn-xs.btn-warning {
  border-color: #fbbf24;
}

/* Sicherheits-Uebersicht: gesperrte Accounts hervorheben */

.row-locked {
  background: rgba(127, 29, 29, 0.25); /* dunkles Rot, leicht transparent */
}

.row-locked td {
  border-top: 1px solid rgba(248, 113, 113, 0.4);
  border-bottom: 1px solid rgba(248, 113, 113, 0.4);
}

.badge-locked {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  font-size: 10px;
  border-radius: 999px;
  background: rgba(248, 113, 113, 0.2);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.7);
}

/* kleine Buttons in Tabellen */
.btn-xs {
  padding: 3px 8px;
  font-size: 11px;
  border-radius: 4px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
  cursor: pointer;
}

.btn-xs.btn-warning {
  border-color: #fbbf24;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inline-form {
  display: inline-block;
  margin: 0;
}

/* ================================
   Tabellen-Buttons (klein, kompakt)
   ================================ */

.btn-table {
  padding: 5px 12px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(30, 41, 59, 0.7);
  color: #e2e8f0;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.btn-table:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(148, 163, 184, 0.55);
}

/* Erfolg = Grün */
.btn-table-success {
  border-color: rgba(34, 197, 94, 0.6);
  color: #bbf7d0;
}

.btn-table-success:hover {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.9);
}

/* Gefahr = Rot */
.btn-table-danger {
  border-color: rgba(239, 68, 68, 0.6);
  color: #fecaca;
}

.btn-table-danger:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.9);
}

/* Inline-Formulare für Aktionen */
.inline-form {
  display: inline-block;
  margin: 0;
}

.table-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.license-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  margin-right: 12px;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.license-ok {
  background: rgba(22, 163, 74, 0.12);
  border-color: rgba(22, 163, 74, 0.5);
  color: #bbf7d0;
}

.license-bad {
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.5);
  color: #fecaca;
}

.license-label {
  font-weight: 500;
}

.license-status {
  font-weight: 600;
}

.table-wrapper {
  overflow-x: auto;
}

.table-contacts .contact-main-cell {
  min-width: 220px;
}

.contact-main-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.contact-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #e5f4ff;
}

.contact-avatar-lg {
  width: 52px;
  height: 52px;
  font-size: 20px;
}

.contact-main-text {
  display: flex;
  flex-direction: column;
}

.contact-name {
  font-size: 14px;
  font-weight: 500;
}

.contact-meta,
.contact-meta-lg {
  font-size: 12px;
  opacity: 0.7;
}

.contact-actions-cell {
  white-space: nowrap;
}

.contact-detail-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.contact-detail-header-text {
  flex: 1;
  min-width: 0;
}

.contact-name-lg {
  font-size: 18px;
  font-weight: 600;
}

.contact-detail-header-actions {
  display: flex;
  gap: 8px;
}

.contact-detail-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-detail-section .section-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 4px 12px;
  font-size: 13px;
}

.detail-label {
  opacity: 0.7;
}

.detail-value {
  font-weight: 400;
}

.detail-notes {
  font-size: 13px;
  line-height: 1.4;
  opacity: 0.9;
}

.contact-search-form {
  gap: 6px;
}

.contact-filter-row {
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.6);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-label {
  font-size: 11px;
  opacity: 0.75;
}

.filter-checks {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

.filter-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.pagination-row {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.pagination-buttons {
  display: flex;
  gap: 6px;
}

.pagination-info {
  opacity: 0.75;
}

/* Kontaktliste Layout / Abstaende */

.contacts-header {
  margin-bottom: 14px;
}

.contacts-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-search-form {
  margin: 0;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-input {
  min-width: 260px;
}

/* Filterzeile etwas luftiger */

.contact-filter-row {
  margin-top: 6px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.8);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: flex-end;
}

/* Tabelle etwas hoeher */

.table-contacts tbody tr {
  height: 46px;
}

.table-contacts td,
.table-contacts th {
  padding-top: 8px;
  padding-bottom: 8px;
}

/* Avatar / Hauptzelle wie gehabt (leichte Optimierung) */

.contact-main-cell {
  min-width: 230px;
}

.contact-main-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.contact-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #e5f4ff;
}

.contact-main-text {
  display: flex;
  flex-direction: column;
}

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

.contact-meta {
  font-size: 12px;
  opacity: 0.7;
}

.contact-actions-cell {
  white-space: nowrap;
}

/* Pagination wie vorher, leicht mehr Abstand nach oben */

.pagination-row {
  margin-top: 14px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.pagination-buttons {
  display: flex;
  gap: 6px;
}

.pagination-info {
  opacity: 0.75;
}
