/* Schriften werden in public/index.html per <link> von Google Fonts geladen. */

/* ═══════════════════════════════════════════
   MYLS Admin Portal — Global Styles
   ═══════════════════════════════════════════ */

:root {
  --acc: #FE75AB;
  --acc2: #FDF0F6;
  --acc-hover: #C8357A;
  --acc-light: #FCE4EF;
  --dark: #111827;
  --mid: #374151;
  --muted: #6B7280;
  --light: #9CA3AF;
  --brd: #E8EAEC;
  --bg: #f5f9fc;
  --white: #FFFFFF;
  --sidebar-w: 240px;
  --topbar-h: 56px;
  --green: #10B981;
  --green-bg: #D1FAE5;
  --red: #EF4444;
  --red-bg: #FEE2E2;
  --blue: #3B82F6;
  --blue-bg: #DBEAFE;
  --purple: #8B5CF6;
  --orange: #F59E0B;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .07);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, .1);
  --font: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Baloo 2', 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  font-family: var(--font);
  font-size: 14px;
  color: var(--dark);
  background: var(--bg);
}

a {
  color: var(--acc);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ── Typography ── */
h1 {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 600;
  color: var(--dark);
}

h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--dark);
}

h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-family: var(--font);
  font-weight: 500;
  cursor: pointer;
  cursor: pointer;
  transition: all .15s;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--acc);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--acc-hover);
}

.btn-secondary {
  background: var(--white);
  color: var(--mid);
  border: 1px solid var(--brd);
}

.btn-secondary:hover {
  background: var(--bg);
}

.btn-danger {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid #FECACA;
}

.btn-danger:hover {
  background: #FEE2E2;
}

.btn-success {
  background: var(--green-bg);
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: none;
}

.btn-ghost:hover {
  background: var(--bg);
  color: var(--dark);
}

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

.btn-lg {
  padding: 10px 22px;
  font-size: 14px;
}

.btn-icon {
  padding: 7px;
  border-radius: var(--radius-md);
}

/* ── Form elements ── */
.form-section {
  margin-bottom: 28px;
}

.form-section-title {
  font-size: 15px;
  font-weight: 600;
  color: #cc2121c4;
  padding-bottom: 7px;
  margin-bottom: 24px;
  gap: 15px;
  display: flex;
  align-items: center;
  /* text-transform: uppercase; */
  border-bottom: 1px dashed #e10f0f3d;
}

.checkbox-align {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 83px;
  margin: 0;
  gap: 11px;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.form-group {
  margin-bottom: 16px;
}

.login-body-div .form-group {
  margin-bottom: 4px;
}

.input-icon {
  position: absolute;
  right: 12px;
  top: 13px;
  cursor: pointer;
  color: var(--muted)
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #323232;
  margin-bottom: 5px;
}

.col-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  row-gap: 10px;
}

.side-line {
  width: 94%;
  background: #E8EAEC;
  height: 1px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="url"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--brd);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: var(--font);
  color: var(--dark);
  background: var(--white);
  outline: none;
  transition: border-color .15s;
  appearance: auto;
  font-weight: 600;
  height: 43px;
  line-height: 43px;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid #E8EAEC;
  padding-bottom: 20px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--acc);
}

input.error {
  border-color: var(--red);
}

.form-error {
  font-size: 11px;
  color: var(--red);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.input-group {
  position: relative;
}

.input-suffix {
  position: absolute;
  right: 1px;
  top: 1px;
  bottom: 1px;
  padding: 0 12px;
  background: var(--bg);
  border-left: 1px solid var(--brd);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  display: flex;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}

.input-with-action {
  display: flex;
  gap: 8px;
}

.input-with-action input {
  flex: 1;
}

/* ── Cards ── */
.card {
  background: var(--white);
  /* border: 1px solid var(--brd); */
  border-radius: 10px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

.badge-green {
  background: var(--green-bg);
  color: #065F46;
}

.badge-red {
  background: var(--red-bg);
  color: #991B1B;
}

.badge-blue {
  background: var(--blue-bg);
  color: #1E40AF;
}

.badge-purple {
  background: #EDE9FE;
  color: #5B21B6;
}

.badge-orange {
  background: #FEF3C7;
  color: #92400E;
}

.badge-gray {
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--brd);
}

.badge-acc {
  background: var(--acc-light);
  color: var(--acc);
}

/* ── Tables ── */
.table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  min-width: 0;
  margin: 0;
}

/* Tabellen, die eine Karte ganz ausfuellen (Karte mit padding:0, Kartenkopf mit
   16px 20px): erste und letzte Spalte auf denselben Rand wie der Kartenkopf, damit
   Titel, Spaltenueberschriften und Zellen auf einer Linie stehen. */
.admin-table-card th:first-child,
.admin-table-card td:first-child {
  padding-left: 20px;
}

.admin-table-card th:last-child,
.admin-table-card td:last-child {
  padding-right: 20px;
}

/* Abgerundete Ecken der Kopfzeile: nur dort, wo das farbige Band frei in einer Karte
   steht. Fuellt die Tabelle die Karte ganz aus (.admin-table-card), sitzt das Band
   buendig an der Kartenkante und bleibt eckig - sonst gaebe es dort weisse Zwickel. */
.admin-table:not(.admin-table-card) tr th:first-child {
  border-top-left-radius: 7px;
  border-bottom-left-radius: 7px;
}

.admin-table:not(.admin-table-card) tr th:last-child {
  border-top-right-radius: 7px;
  border-bottom-right-radius: 7px;
}

.admin-table th {
  text-align: left;
  padding: 12px 14px;
  font-size: 11px;
  font-weight: 600;
  color: #cb2517;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  /* border-bottom: 1px solid var(--brd); */
  background: rgb(253, 241, 241);
  white-space: nowrap;
}

.admin-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #F3F4F6;
  color: var(--mid);
  vertical-align: middle;
}

.admin-table tbody tr:hover td {
  background: #FAFAFA;
}

.admin-table .actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  align-items: center;
}

.admin-table {
  border-collapse: collapse !important;
  border-spacing: 0 !important;
}

.admin-table th {
  margin: 0 !important;
}

/* ── Connector icons in table ── */
.connector-icons {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}

.c-icon {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

/* ── Pagination ── */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--brd);
  background: var(--surface);
}

.pagination-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

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

.rows-per-page {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.rows-per-page label {
  white-space: nowrap;
}

.rows-per-page select {
  min-width: 72px;
  padding: 8px 10px;
  border: 1px solid var(--brd);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--dark);
}

.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: min(100%, 280px);
}

.custom-paginator .p-paginator .p-paginator-current,
.custom-paginator .p-paginator .p-paginator-pages {
  display: flex;
  gap: 8px;
}

.custom-paginator .p-paginator .p-paginator-page,
.custom-paginator .p-paginator .p-paginator-prev,
.custom-paginator .p-paginator .p-paginator-next {
  min-width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  border: 1px solid var(--brd);
  background: var(--white);
  color: var(--mid);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.15s ease;
}

.custom-paginator .p-paginator .p-paginator-page.p-highlight,
.custom-paginator .p-paginator .p-paginator-page.p-active {
  background: var(--acc);
  color: var(--white);
  border-color: var(--acc);
}

.custom-paginator .p-paginator .p-paginator-prev,
.custom-paginator .p-paginator .p-paginator-next {
  min-width: 42px;
}

.custom-paginator .p-paginator .p-paginator-page:hover,
.custom-paginator .p-paginator .p-paginator-prev:hover,
.custom-paginator .p-paginator .p-paginator-next:hover {
  border-color: var(--acc);
  color: var(--acc);
}

.custom-paginator .p-paginator .p-paginator-prev.p-disabled,
.custom-paginator .p-paginator .p-paginator-next.p-disabled,
.custom-paginator .p-paginator .p-paginator-page.p-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Avatar initials ── */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: white;
  color: #E8EAEC;
  display: flex;
  border: 2px solid #E8EAEC;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.avatar-lg {
  width: 152px;
  height: 152px;
  border-radius: var(--radius-lg);
  font-size: 64px;
}

.avatar-circle {
  border-radius: 50%;
}

/* ── Stat card ── */
.stat-card {
  background: var(--white);
  border: 1px solid var(--brd);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.stat-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-card-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.stat-card-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1;
}

.stat-card-change {
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 4px;
}

.stat-card-change.up {
  color: var(--green);
}

.stat-card-change.down {
  color: var(--red);
}

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  margin-bottom: 20px;
}

.breadcrumb span.badge {
  background: #EDE9FE;
  color: var(--purple);
  font-size: 10px;
  padding: 2px 7px;
  margin-right: 4px;
}

.breadcrumb a {
  color: var(--acc);
  /* background: white; */
  /* border-radius: 8px; */
  padding: 0 12px;
  height: 30px;
  /* border: 1px solid #EAEEF2; */
  line-height: 30px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 500;
}

.breadcrumb span {
  color: var(--muted);
}

.breadcrumb .current {
  color: var(--acc);
  /* background: white; */
  /* border-radius: 8px; */
  padding: 0 12px;
  height: 30px;
  /* border: 1px solid #EAEEF2; */
  line-height: 30px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 500;
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.empty-state h3 {
  font-size: 15px;
  color: var(--dark);
  margin: 12px 0 6px;
}

.empty-state p {
  font-size: 13px;
  max-width: 320px;
  margin: 0 auto 16px;
  line-height: 1.6;
}

/* ── Search bar ── */
.search-bar {
  position: relative;
  flex: 1;
  max-width: 280px;
}

.search-bar input {
  padding-left: 34px;
}

.search-bar svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

/* ── Toolbar ── */
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  padding: 0 20px;

}

.table-card {
  background: white;
  padding-top: 20px;
  border-radius: 10px;
  box-shadow: 0px 4px 3px 0px #6F778940;
}

.todo-list {
  height: 175px;
  overflow-y: auto;
  scrollbar-width: thin;
  margin-top: 10px;
  scrollbar-color: #d0d0d0 #f5f9fc;

}

.toolbar-right {
  margin-left: auto;
}

/* ── To-do list ── */
.todo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--brd);
}

.todo-item:last-child {
  border-bottom: none;
}

.todo-checkbox input {
  height: 15px;
  /* width: 18px;
  height: 18px;
  border: 2px solid var(--brd);
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0; */
}

.todo-text {
  font-size: 13px;
  color: var(--mid);
  flex: 1;
}

.todo-delete {
  color: var(--muted);
  cursor: pointer;
}

.roles .card {
  background: var(--white);
  border: 1px solid #e9eafd73;
  border-radius: 10px;
  padding: 26px 30px;
  box-shadow: var(--shadow-sm);
}

.grid-3.roles {
  width: 80%;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 16px;
  margin: auto;
  padding-top: 8%;
}

.roles .card:nth-child(2) .content {
  background: #e2fac6;
}

.roles .card:nth-child(2) .content svg {
  fill: #4CAF50 !important;
}

.roles .card:nth-child(3) .content {
  background: #ffebeb;
}

.roles .card:nth-child(3) .content svg {
  fill: #cc2821 !important;
}

.roles .card:nth-child(4) .content {
  background: #ebfaff;
}

.roles .card:nth-child(4) .content svg {
  fill: #4c93af !important;
}

.role-card .content {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #E8EAF6;
  line-height: 36px;
  margin-bottom: 18px;
}

.roles .card:nth-child(1) .content svg {
  fill: #534AB7;
}

.role-card .title {
  font-size: 14px;
  font-weight: 700;
  color: #161616;
}

.role-card span {
  padding: 0;
  font-size: 13px;
  color: #7c807c;
}

/* ── Alert / info box ── */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 16px;
}

.alert-error {
  background: var(--red-bg);
  color: #991B1B;
  border: 1px solid #FECACA;
}

.alert-success {
  background: var(--green-bg);
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.alert-info {
  background: var(--blue-bg);
  color: #1E40AF;
  border: 1px solid #BFDBFE;
}

.alert-warning {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
}

/* ── Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 24px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}

.modal-header h2 {
  font-size: initial;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-header button {
  color: #4a4646;
  background: none;
  border: none;
  font-size: 18px;
}

.modal-body p {
  line-height: 1.4;
}

.modal-header div {
  display: flex;
  align-items: flex-end;
  gap: 9px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--brd);
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--brd);
  margin: 16px 0;
}

/* ── Grid layouts ── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.grid-4 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 16px;
}

/* ── Connector card grid ── */
.connector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 20px;
  /* padding: 36px 0 63px; */
  /* width: 63%;
  margin: auto; */
}

.connector-card {
  border: 2px solid var(--brd);
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: .15s;
  background: var(--white);
}

.connector-card:hover {
  border-color: var(--acc);
  box-shadow: var(--shadow-sm);
}

.connector-card.selected {
  border-color: var(--acc);
  background: var(--acc2);
}

.connector-card img,
.connector-card .conn-logo {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  display: block;
}

.connector-card .conn-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--dark);
}

/* ── OAuth button ── */
.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border: 2px solid var(--brd);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: .15s;
  background: var(--white);
  font-size: 35px;
  font-weight: 500;
  color: var(--dark);
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  font-family: var(--font);
}

.oauth-btn:hover {
  border-color: var(--acc);
  box-shadow: var(--shadow-sm);
}

/* ── Connector section ── */
.connector-section {
  margin-bottom: 24px;
}

.connector-section-label {
  font-size: 12px;
  color: black;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--brd);
  padding-bottom: 6px;
  font-weight: 500;
}

/* ── User profile card ── */
.user-profile-card {
  background: var(--white);
  border: 1px solid var(--brd);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 30px;
  margin-bottom: 20px;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.user-profile-card h2 {
  font-size: 22px;
  font-weight: 700;
}

.inner-p {
  font-size: 16px;
  color: #00000063;
  margin-top: 2px;
  font-weight: 500;
}

.delete {
  background: #C94444;
  color: white;
}

.invite {
  background: #FE75AB;
  color: white;
}

.finalize {
  background: #5E61F6;
  color: white;
  height: 40px;
  border-radius: 10px;
}

.headers {
  border-bottom: 1px solid #E8EAEC;
  padding-bottom: 15px;
}

.wizard-headers {
  border-bottom: 1px solid #E8EAEC;
  padding: 15px;
}

h3.connection-tile {
  font-size: 18px;
  font-weight: 700;
}

/* ── Agency list ── */
.agency-card {
  background: var(--white);
  border: 1px solid var(--brd);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: .15s;
}

.agency-card:hover {
  box-shadow: var(--shadow-md);
}

.agency-logo {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--white);
  flex-shrink: 0;
}

.tab-detail-titles {
  padding: 0;
  /* border-bottom: 0.5px solid #00000021; */
  margin-bottom: 15px;
}

.tab-detail-titles h2 {
  margin-bottom: 15px;
  font-size: 20px;
  font-weight: 500;
  margin-top: 5px;
}

.tab-detail-titles span {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Sync badge ── */
.sync-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: var(--radius-md);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  min-width: 48px;
}

/* ── Connection item in detail ── */
.connection-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--brd);
}

.form-group input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--brd);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: var(--font);
  color: var(--dark);
  background: var(--white);
  outline: none;
  transition: border-color .15s;
  appearance: auto;
  font-weight: 400;
}

.admin-content-info {
  display: grid;
  grid-template-columns: 7fr 3fr;
  gap: 20px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  align-items: start;
}

.admin-content-info>div {
  min-width: 0;
}

.admin-table {
  /* width: 100%;
  min-width: 0; */
}

.user-dropdown {
  position: absolute;
  top: 80%;
  right: 0;
  background-color: white;
  border-radius: 8px;
  box-shadow: rgb(0 0 0 / 5%) 0px 4px 12px;
  min-width: 175px;
  width: 240px;
  margin-top: 8px;
  z-index: 1000;
  border: 1px solid rgb(224, 224, 224);
}

.notif-dropdown {
  position: absolute;
  padding: 12px;
  top: 100%;
  right: -50px;
  background-color: white;
  border-radius: 8px;
  box-shadow: rgb(0 0 0 / 5%) 0px 4px 12px;
  min-width: 175px;
  width: 290px;
  margin-top: 15px;
  z-index: 1000;
  border: 1px solid rgb(224, 224, 224);
  height: 280px;
  overflow: auto;
  scrollbar-width: thin;
}

.unread-notification {
  background: #ffe9f2;
  border-left: 3px solid #fe75ab57;
  border-radius: 9px;
  font-weight: 500 !important;
  padding: 12px;
  color: black !important;
  align-items: flex-start;
}

.unread-notification .dot-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-left: auto;
}

.unread-notification .dot-btn button {
  background: none;
  padding: 5px 9px;
  border: 1px solid #e0508b;
  background: white;
  color: #c23d75;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
}

button.markas-all-read {
  cursor: pointer;
  color: #c23d75;
  background: #FEF3F7;
  margin-left: auto;
  padding: 4px 9px;
  border: 1px solid #e0508b;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  text-align: right;
  float: right;
  display: flex;
  align-items: center;
  gap: 6px;
}

.unread-notification .dot-btn button:hover {
  cursor: pointer;
  background: white;
  transition: 0.2s;
}

.unread-notification div.dot {
  width: 7px;
  background: #fe75ab;
  height: 7px;
  border-radius: 100%;
  flex-shrink: 0;
}

.notif-dropdown p {
  color: #bab8b8;
  font-size: 14px;
}

.notif-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 9px;
  cursor: pointer;
  font-size: 12px;
  color: #7d8592;
  margin-bottom: 5px;
  font-weight: 400;
}

.notif-item-icon svg {
  width: 18px;
  color: #828282;
}

.notif-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 100%;
  background: #fff9fb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.unread-notification .notif-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 100%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-dropdown {
  right: 10px;
}

.user-dropdown button {
  width: 100%;
  padding: 12px 16px;
  text-align: left;
  border-width: medium medium 1px;
  border-style: none none solid;
  border-color: currentcolor currentcolor rgb(240, 240, 240);
  border-image: initial;
  background-color: transparent;
  cursor: pointer;
  font-size: 13px;
  color: rgb(51, 51, 51);
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
  white-space: nowrap;

}

.user-dropdown button svg {
  color: #6F7789;
}

.right-side-card h3 {
  font-size: 13px;
  margin-bottom: 12px;
}

.right-side-card p {
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 4px;
  font-size: 12px;
}

.right-side-card span {
  font-size: 12px;
  color: var(--mid);
  line-height: 1.5;
}

.set-spancss {
  font-family: monospace;
  font-size: 12px;
  color: var(--blue) !important;
  font-weight: 100;
}

.table-container {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
}

.connection-item:last-child {
  border-bottom: none;
}

.connection-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pick-color {
  width: 43px !important;
  height: 43px!important;
  padding: 2px !important;
  cursor: pointer;
  border-radius: 6px !important;
}

.form-hint {
  font-size: 11px;
  color: var(--muted);
}

/* .generate-password {
  display: flex;
  justify-content: space-between;
} */

.generate-password button {
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    color: #fe75ab;
    text-decoration: none;
    border: none;
    background: no-repeat;
    float: right;
}

/* ── Utility ── */
.flex {
  display: flex;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: 8px;
}

.gap-3 {
  gap: 12px;
}

.gap-4 {
  gap: 16px;
}

.mt-1 {
  margin-top: 4px;
}

.mt-2 {
  margin-top: 8px;
}

.mt-3 {
  margin-top: 12px;
}

.mt-4 {
  margin-top: 16px;
}

.mb-4 {
  margin-bottom: 16px;
}

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

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

.text-right {
  text-align: right;
}

.w-full {
  width: 100%;
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.ml-auto {
  margin-left: auto;
}

.mb-5 {
  margin-bottom: 5px;
}

.mb-10 {
  margin-bottom: 10px;
}

.mb-15 {
  margin-bottom: 15px;
}

.mb-20 {
  margin-bottom: 20px;
}

.mb-25 {
  margin-bottom: 25px;
}

.mt-25 {
  margin-top: 25px;
}

.error-container {
  color: red !important;
  padding: 0;
  min-height: 20px;
  margin-top: 4px;
  font-size: 13px;
}


.p-datatable .p-datatable-thead>tr>th,
.p-datatable .p-datatable-tbody>tr>td {
  padding: 12px 16px;
}


.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;

}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background-color: #d1d5db;
  transition: .3s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 13px;
  width: 13px;
  left: 3px;
  bottom: 4px;
  background: #fff;
  transition: .3s;

}

input:checked+.slider {
  background-color: #e83e8c;
}

input:checked+.slider:before {
  transform: translateX(22px);
}

.slider.round {
  border-radius: 24px;
}

.slider.round:before {
  border-radius: 50%;
}

.error-text{
  color:red;
}
/* ── Fehlerhinweis (ErrorNotice, B7a) ── */
.error-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  padding: 10px 14px;
  border: 1px solid var(--red, #ef4444);
  border-radius: var(--radius-md, 8px);
  background: var(--red-bg, #fee2e2);
  color: #7f1d1d;
  font-size: 13.5px;
  line-height: 1.4;
}

.error-notice-icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--red, #ef4444);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}

.error-notice-text {
  flex: 1 1 auto;
}

.error-notice-retry {
  flex: 0 0 auto;
  padding: 4px 10px;
  border: 1px solid var(--red, #ef4444);
  border-radius: var(--radius-sm, 4px);
  background: transparent;
  color: #7f1d1d;
  font: inherit;
  cursor: pointer;
}

.error-notice-retry:hover {
  background: rgba(239, 68, 68, 0.12);
}

/* ═══════════════════════════════════════════
   B7b-1: API v2 Oberflaechen (Tabs, Einladungstoken, Dev-Login, Detailseiten)
   ═══════════════════════════════════════════ */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--brd);
  margin-bottom: 20px;
}
.tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 16px;
  margin-bottom: -1px;
  cursor: pointer;
  color: var(--muted);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tab:hover { color: var(--dark); }
.tab.active { color: var(--acc); border-bottom-color: var(--acc); }
.tab-count {
  background: var(--bg);
  border-radius: 10px;
  padding: 0 7px;
  font-size: 11px;
}

.inner-card {
  background: var(--bg);
  box-shadow: none;
  border: 1px solid var(--brd);
  margin-bottom: 16px;
}

.token-box {
  border: 1px dashed var(--acc);
  background: var(--acc2);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.token-box-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.token-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.token-row input {
  font-family: monospace;
  font-size: 12px;
  font-weight: 400;
  height: 36px;
  line-height: 36px;
  background: var(--white);
}

.dev-login {
  border-top: 1px dashed var(--brd);
  margin-top: 22px;
  padding-top: 16px;
}
.dev-login-title {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.dev-login .form-hint { margin-bottom: 10px; }
.dev-login .form-row { margin-bottom: 0; }
.dev-login select, .dev-login input { height: 40px; line-height: 40px; font-size: 13px; }

.kv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px 20px;
}
.kv-grid > div { display: flex; flex-direction: column; gap: 2px; }
.kv-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
}

.readonly-value {
  padding: 9px 12px;
  border: 1px solid var(--brd);
  border-radius: var(--radius-md);
  background: var(--bg);
  min-height: 43px;
  display: flex;
  align-items: center;
}

.link-button {
  background: none;
  border: none;
  color: var(--acc);
  cursor: pointer;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  padding: 0 4px;
}
.link-button:hover { text-decoration: underline; }

.swatches { display: flex; gap: 14px; margin-top: 12px; }
.swatch { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.swatch span {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--brd);
  display: inline-block;
}

.inv-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 13px;
}
.inv-summary > div { display: flex; flex-direction: column; }
.inv-label { font-size: 11px; color: var(--muted); }

.notif-list .notif-item { justify-content: space-between; }
.notif-list .notif-item .notif-item { padding: 0; border: none; }

code {
  font-family: monospace;
  font-size: 12px;
  background: var(--bg);
  padding: 1px 5px;
  border-radius: 4px;
}
.agency-logo img { border-radius: inherit; }
.admin-login-card .btn-submit.btn-lg { text-decoration: none; }

/* Detailseiten mit Seitenspalte (Domains): Hauptspalte darf schrumpfen, Seitenspalte fest */
.admin-content-info { grid-template-columns: minmax(0, 1fr) 260px; }
.admin-content-info .admin-table td,
.admin-content-info .admin-table th { padding-left: 10px; padding-right: 10px; white-space: normal; }
.admin-content-info .actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── Verbindungen / Assistenten (B7b-2) ── */
.step.done .step-number {
  background-color: var(--green);
  color: #fff;
}
.alert .spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(30, 64, 175, .25);
  border-top-color: #1E40AF;
  border-radius: 50%;
  animation: conn-spin .8s linear infinite;
  flex-shrink: 0;
  margin-top: 2px;
}
@keyframes conn-spin { to { transform: rotate(360deg); } }
.admin-table td .actions .btn-sm { white-space: nowrap; }
.property-card .property-name { word-break: break-all; }

/* ── Dialog "Konten einer Verbindung" (M3) ──────────────────────────────────
   Eigener Block, weil der Dialog breiter ist als die Standardvorlage und eine
   Tabelle enthaelt. Aufbau: Kopf mit Zaehler, Tabelle der aktiven Konten,
   darunter abgesetzt die entfernten und die erklaerenden Hinweise. */
.accounts-modal {
  max-width: 760px;
}

.accounts-modal .modal-header div {
  /* Titel und Zaehler nebeneinander, aber sauber auf einer Grundlinie. */
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.accounts-body {
  max-height: 62vh;
  overflow-y: auto;
}

.accounts-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
}

.accounts-table td {
  padding: 10px 12px;
}

.accounts-table th {
  padding: 10px 12px;
}

.accounts-table .acc-name {
  color: var(--dark);
  font-weight: 600;
}

/* Kennungen sind Zahlen und Adressen - in gleichbreiter Schrift lesen sie sich besser. */
.accounts-table .acc-id {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--muted);
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accounts-table .acc-date {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.accounts-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.accounts-section-title .badge {
  text-transform: none;
  letter-spacing: 0;
}

.accounts-removed .accounts-table td {
  color: var(--muted);
}

.accounts-empty {
  padding: 22px 20px;
  border: 1px dashed var(--brd);
  border-radius: 12px;
  background: var(--bg);
}

.accounts-empty-title {
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
}

.accounts-empty p {
  margin: 0;
  font-size: 13px;
  color: var(--mid);
  line-height: 1.5;
}

/* Erklaerungen unter der Tabelle: abgesetzt, damit sie nicht wie Daten wirken. */
.accounts-notes {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--brd);
}

.accounts-notes p {
  margin: 0 0 8px;
  padding-left: 12px;
  border-left: 3px solid var(--brd);
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.accounts-notes p:last-child {
  margin-bottom: 0;
}
