/* Register Page Styles — IT-SCE branding (Orange #FE4F00, Poppins).
   Light card on light background, mirrors LoginPage but standalone form. */

/* TQ #6914: self-contained design tokens. customer-portal defines these in its
   index.css, but org-portal's token set (packages/ui/styles/tokens.css) uses
   different names (--color-text-*, --font-size-*). Scope them to the register
   page so the migrated component renders identically without touching org-portal
   globals. Values copied verbatim from customer-portal/src/index.css. */
.register-page {
  --primary: #FE4F00;
  --border: #E8EAED;
  --border-light: #F2F2F2;
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --text-primary: #333333;
  --text-secondary: #666666;
}

.register-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F5F7FA;
  padding: var(--spacing-lg);
}

.register-container {
  width: 100%;
  max-width: 460px;
}

.register-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.register-logo {
  display: flex;
  justify-content: center;
  margin-bottom: var(--spacing-md);
  filter: drop-shadow(0 4px 12px rgba(26, 34, 53, 0.22));
}

.register-card {
  background: white;
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.register-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: var(--spacing-xs);
}

.register-card .register-subtitle {
  color: var(--text-secondary);
  text-align: center;
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: var(--spacing-lg);
}

.register-field {
  margin-bottom: var(--spacing-md);
}

.register-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
}

.register-input {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
  background: white;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.register-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(254, 79, 0, 0.15);
}

.register-input:disabled,
.register-input[readonly] {
  background: var(--border-light);
  color: var(--text-secondary);
}

.register-input.code-input {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.4em;
}

.register-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-sm);
}

.register-pw-wrap {
  position: relative;
}

.register-pw-toggle {
  position: absolute;
  top: 50%;
  right: var(--spacing-md);
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.register-pw-toggle:hover {
  color: var(--text-primary);
}

.register-hint {
  margin-top: var(--spacing-xs);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.register-agb {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--spacing-md);
}

.register-agb input[type='checkbox'] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.register-agb a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.register-agb a:hover {
  text-decoration: underline;
}

.register-error {
  margin-bottom: var(--spacing-md);
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid #f5c2c2;
  background: #fdecec;
  border-radius: var(--radius-md);
  color: #b3261e;
  font-size: 0.875rem;
}

.btn-register-primary {
  width: 100%;
  padding: var(--spacing-md) var(--spacing-lg);
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-primary);
}

.btn-register-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(254, 79, 0, 0.3);
}

.btn-register-primary:active {
  transform: translateY(0);
}

.btn-register-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-register-secondary {
  width: 100%;
  margin-top: var(--spacing-sm);
  padding: var(--spacing-sm);
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

.btn-register-secondary:hover {
  color: var(--text-primary);
}

.register-footnote {
  margin-top: var(--spacing-md);
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.register-footnote a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.register-footnote a:hover {
  text-decoration: underline;
}

/* Off-screen honeypot — invisible to humans + AT, bots fill it. */
.register-honeypot {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* "Mail sent" + Welcome shared centered layout */
.register-centered {
  text-align: center;
}

.register-icon-circle {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.75rem;
  background: rgba(254, 79, 0, 0.1);
}

.register-icon-circle.success {
  background: rgba(40, 167, 69, 0.12);
}

.register-email-echo {
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
  margin: var(--spacing-xs) 0;
}

/* Welcome service tiles */
.register-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-sm);
  margin: var(--spacing-lg) 0;
  text-align: left;
}

.register-tile {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.register-tile:hover {
  border-color: var(--primary);
  background: rgba(254, 79, 0, 0.04);
}

.register-tile-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.register-tile-title {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.register-tile-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

@media (max-width: 480px) {
  .register-page {
    padding: var(--spacing-md);
  }
  .register-card {
    padding: var(--spacing-lg);
  }
  .register-row,
  .register-tiles {
    grid-template-columns: 1fr;
  }
}
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  pointer-events: auto;
  animation: toastSlideIn 0.3s ease-out;
  border-left: 4px solid;
  min-width: 320px;
  max-width: 420px;
}

.toast-exit {
  animation: toastSlideOut 0.3s ease-out forwards;
}

@keyframes toastSlideIn {
  from {
    transform: translateX(120%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toastSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(120%);
    opacity: 0;
  }
}

.toast-success {
  border-color: #22c55e;
}

.toast-success .toast-icon {
  color: #22c55e;
}

.toast-error {
  border-color: #ef4444;
}

.toast-error .toast-icon {
  color: #ef4444;
}

.toast-warning {
  border-color: #f59e0b;
}

.toast-warning .toast-icon {
  color: #f59e0b;
}

.toast-info {
  border-color: #3b82f6;
}

.toast-info .toast-icon {
  color: #3b82f6;
}

.toast-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-message {
  flex: 1;
  font-size: 0.95rem;
  color: #1a1a2e;
  line-height: 1.4;
}

.toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.15s;
}

.toast-close:hover {
  background: #f5f5f5;
  color: #666;
}
.confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.confirm-modal {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  animation: scaleIn 0.2s ease-out;
  overflow: hidden;
}

@keyframes scaleIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.confirm-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 24px 0;
}

.confirm-header h3 {
  margin: 0;
  font-size: 1.15rem;
  color: #1a1a2e;
  font-weight: 600;
}

.confirm-icon {
  flex-shrink: 0;
}

.confirm-icon.danger {
  color: #ef4444;
}

.confirm-icon.warning {
  color: #f59e0b;
}

.confirm-icon.info {
  color: #3b82f6;
}

.confirm-body {
  padding: 16px 24px 24px;
}

.confirm-body p {
  margin: 0;
  color: #666;
  line-height: 1.5;
  font-size: 0.95rem;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  padding: 16px 24px;
  background: #f8f9fa;
  border-top: 1px solid #eee;
  justify-content: flex-end;
}

.btn-cancel {
  padding: 10px 20px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-cancel:hover:not(:disabled) {
  background: #f5f5f5;
  border-color: #ccc;
}

.btn-cancel:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-confirm {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: all 0.15s;
  min-width: 120px;
}

.btn-confirm:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-confirm.btn-danger {
  background: #ef4444;
}

.btn-confirm.btn-danger:hover:not(:disabled) {
  background: #dc2626;
}

.btn-confirm.btn-warning {
  background: #f59e0b;
}

.btn-confirm.btn-warning:hover:not(:disabled) {
  background: #d97706;
}

.btn-confirm.btn-info {
  background: #3b82f6;
}

.btn-confirm.btn-info:hover:not(:disabled) {
  background: #2563eb;
}

.btn-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.spinner-small {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
.skeleton {
  background: linear-gradient(
    90deg,
    #e8e8e8 25%,
    #f5f5f5 50%,
    #e8e8e8 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: white;
  border-radius: 12px;
}

.skeleton-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: white;
  border-radius: 12px;
}

.skeleton-stat-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-table {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skeleton-table-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: white;
  border-radius: 12px;
}
/* ========================================
   AppSwitcher - Vanilla CSS Version
   IT-SCE Branding
   ======================================== */

/* Container */
.app-switcher {
  position: relative;
  display: inline-block;
}

/* Trigger Button */
.app-switcher-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #111827;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.app-switcher-button:hover {
  background: #f9fafb;
  border-color: #FE4F00; /* IT-SCE Orange */
  box-shadow: 0 2px 4px rgba(254, 79, 0, 0.1);
}

.app-switcher-button:focus {
  outline: 2px solid #FE4F00;
  outline-offset: 2px;
}

.app-switcher-icon {
  font-size: 18px;
  line-height: 1;
}

.app-switcher-text {
  color: #374151;
}

.app-switcher-arrow {
  font-size: 10px;
  color: #6b7280;
  transition: transform 0.2s ease;
}

.app-switcher-arrow.open {
  transform: rotate(180deg);
}

/* Dropdown */
.app-switcher-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 340px;
  max-width: 400px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15), 0 4px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  animation: dropdown-appear 0.15s ease-out;
}

@keyframes dropdown-appear {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header */
.app-switcher-header {
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #fef3ed 0%, #ffffff 100%);
}

.app-switcher-title {
  margin: 0 0 8px 0;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.app-switcher-package {
  margin: 4px 0;
  font-size: 12px;
  color: #6b7280;
}

.app-switcher-package-name {
  font-weight: 600;
  color: #FE4F00;
  text-transform: capitalize;
}

.app-switcher-current {
  margin: 4px 0 0 0;
  font-size: 11px;
  color: #9ca3af;
  font-style: italic;
}

/* Sections */
.app-switcher-section {
  padding: 8px 0;
}

.app-switcher-section.with-separator {
  border-top: 1px solid #e5e7eb;
}

.app-switcher-section-title {
  padding: 8px 16px 4px 16px;
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Module Items */
.app-switcher-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.app-switcher-item:hover {
  background: #f9fafb;
  border-left-color: #FE4F00;
}

.app-switcher-item.active {
  background: #fef3ed;
  border-left-color: #FE4F00;
}

.app-switcher-item-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}

.app-switcher-item-content {
  flex: 1;
  min-width: 0;
}

.app-switcher-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.app-switcher-item-name {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #111827;
}

.app-switcher-item.active .app-switcher-item-name {
  color: #FE4F00;
  font-weight: 600;
}

.app-switcher-item-active {
  font-size: 12px;
  color: #059669;
}

.app-switcher-item-badge {
  padding: 2px 6px;
  background: #dbeafe;
  color: #1e40af;
  font-size: 10px;
  font-weight: 600;
  border-radius: 4px;
  text-transform: uppercase;
}

.app-switcher-item-description {
  margin: 0;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}

/* Upgrade Section */
.app-switcher-upgrade {
  padding: 16px;
  border-top: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #fef3ed 0%, #ffffff 100%);
  text-align: center;
}

.app-switcher-upgrade-text {
  margin: 0 0 12px 0;
  font-size: 13px;
  color: #374151;
  line-height: 1.5;
}

.app-switcher-upgrade-text strong {
  color: #FE4F00;
  font-weight: 600;
}

.app-switcher-upgrade-button {
  display: inline-block;
  padding: 8px 16px;
  background: linear-gradient(135deg, #FE4F00 0%, #ff6a2e 100%);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(254, 79, 0, 0.2);
}

.app-switcher-upgrade-button:hover {
  background: linear-gradient(135deg, #e54700 0%, #fe4f00 100%);
  box-shadow: 0 4px 8px rgba(254, 79, 0, 0.3);
  transform: translateY(-1px);
}

.app-switcher-upgrade-button:active {
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 640px) {
  .app-switcher-dropdown {
    left: auto;
    right: 0;
    min-width: 320px;
  }
  
  .app-switcher-item {
    padding: 10px 12px;
  }
  
  .app-switcher-item-icon {
    font-size: 20px;
  }
}
/**
 * ScoutFeedbackIndicator — Pulse-Ring am Scout-Floating-Button.
 *
 * Der Eltern-Button (`.aria-toggle-btn`) muss `position: relative` haben
 * (ist im Portal-CSS bereits der Fall). Der Ring legt sich als absolutes
 * Overlay ueber den Button und pulsiert nach aussen.
 */

.scout-feedback-pulse {
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 0 0 rgba(255, 87, 34, 0.55); /* --color-primary */
  animation: scout-feedback-pulse 3s cubic-bezier(0.66, 0, 0, 1) infinite;
}

@keyframes scout-feedback-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 87, 34, 0.55);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(255, 87, 34, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 87, 34, 0);
  }
}

/* Barrierefreiheit: kein Puls bei reduzierter Bewegung -> statischer, ruhiger Ring. */
@media (prefers-reduced-motion: reduce) {
  .scout-feedback-pulse {
    animation: none;
    box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.55);
  }
}
/**
 * Badge Component Styles
 */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family-base, inherit);
  font-weight: var(--font-weight-medium, 500);
  line-height: 1;
  white-space: nowrap;
  border-radius: var(--radius-sm, 4px);
  transition: all var(--transition-fast, 0.15s ease);
}

/* Sizes */
.badge-sm {
  font-size: var(--font-size-xs, 0.75rem);
  padding: 2px 6px;
  min-height: 18px;
}

.badge-md {
  font-size: var(--font-size-xs, 0.75rem);
  padding: 4px 8px;
  min-height: 22px;
}

.badge-lg {
  font-size: var(--font-size-sm, 0.875rem);
  padding: 6px 12px;
  min-height: 28px;
}

/* Pill Shape */
.badge-pill {
  border-radius: var(--radius-full, 9999px);
}

/* Dot Indicator */
.badge-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  min-height: 0;
  border-radius: var(--radius-full, 9999px);
}

.badge-dot.badge-sm {
  width: 6px;
  height: 6px;
}

.badge-dot.badge-lg {
  width: 10px;
  height: 10px;
}

/* Variants */
.badge-default {
  background: var(--color-bg-tertiary, #EEEEEE);
  color: var(--color-text-secondary, #757575);
}

.badge-primary {
  background: var(--color-primary, #FF5722);
  color: white;
}

.badge-success {
  background: rgba(76, 175, 80, 0.15);
  color: var(--color-success, #4CAF50);
}

.badge-warning {
  background: rgba(255, 152, 0, 0.15);
  color: #E65100; /* Darker orange for better contrast */
}

.badge-danger {
  background: rgba(244, 67, 54, 0.15);
  color: var(--color-error, #F44336);
}

.badge-info {
  background: rgba(33, 150, 243, 0.15);
  color: var(--color-info, #2196F3);
}

/* Dot Variants */
.badge-dot.badge-default {
  background: var(--color-text-tertiary, #9b9b9b);
}

.badge-dot.badge-primary {
  background: var(--color-primary, #FF5722);
}

.badge-dot.badge-success {
  background: var(--color-success, #4CAF50);
}

.badge-dot.badge-warning {
  background: var(--color-warning, #FF9800);
}

.badge-dot.badge-danger {
  background: var(--color-error, #F44336);
}

.badge-dot.badge-info {
  background: var(--color-info, #2196F3);
}

/* Pulse Animation for Dot */
.badge-dot.pulse {
  animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {
  0% {
    box-shadow: 0 0 0 0 currentColor;
    opacity: 1;
  }
  70% {
    box-shadow: 0 0 0 6px currentColor;
    opacity: 0;
  }
  100% {
    box-shadow: 0 0 0 0 currentColor;
    opacity: 0;
  }
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-2);

  font-family: var(--font-sans);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-tight);
  text-align: center;
  text-decoration: none;
  white-space: nowrap;

  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;

  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Sizes */
.btn--sm {
  font-size: var(--font-size-sm);
  padding: var(--spacing-2) var(--spacing-3);
  min-height: 32px;
}

.btn--md {
  font-size: var(--font-size-base);
  padding: var(--spacing-3) var(--spacing-4);
  min-height: 40px;
}

.btn--lg {
  font-size: var(--font-size-lg);
  padding: var(--spacing-4) var(--spacing-6);
  min-height: 48px;
}

/* Variants */
.btn--primary {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
}

.btn--primary:hover:not(:disabled) {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

.btn--secondary {
  background-color: var(--color-secondary);
  color: var(--color-text-inverse);
  border-color: var(--color-secondary);
}

.btn--secondary:hover:not(:disabled) {
  background-color: var(--color-secondary-dark);
  border-color: var(--color-secondary-dark);
}

.btn--success {
  background-color: var(--color-success);
  color: var(--color-text-inverse);
  border-color: var(--color-success);
}

.btn--success:hover:not(:disabled) {
  background-color: var(--color-success-dark);
  border-color: var(--color-success-dark);
}

.btn--danger {
  background-color: var(--color-danger);
  color: var(--color-text-inverse);
  border-color: var(--color-danger);
}

.btn--danger:hover:not(:disabled) {
  background-color: var(--color-danger-dark);
  border-color: var(--color-danger-dark);
}

.btn--ghost {
  background-color: transparent;
  color: var(--color-text-primary);
  border-color: var(--color-border);
}

.btn--ghost:hover:not(:disabled) {
  background-color: var(--color-bg-secondary);
  border-color: var(--color-border-hover);
}

.btn--link {
  background-color: transparent;
  color: var(--color-primary);
  border-color: transparent;
  text-decoration: underline;
}

.btn--link:hover:not(:disabled) {
  color: var(--color-primary-dark);
}

/* States */
.btn:disabled,
.btn--disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn__spinner {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
}

@keyframes btn-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Full Width */
.btn--full-width {
  width: 100%;
}

/* Icons */
.btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn__icon--left {
  margin-right: calc(var(--spacing-2) * -0.5);
}

.btn__icon--right {
  margin-left: calc(var(--spacing-2) * -0.5);
}
.card {
  background-color: var(--color-bg-primary);
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
}

/* Variants */
.card--default {
  background-color: var(--color-bg-tertiary);
}

.card--bordered {
  border: 1px solid var(--color-border);
}

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

/* Padding */
.card--padding-none .card__body {
  padding: 0;
}

.card--padding-sm .card__body {
  padding: var(--spacing-3);
}

.card--padding-md .card__body {
  padding: var(--spacing-5);
}

.card--padding-lg .card__body {
  padding: var(--spacing-8);
}

/* Hoverable */
.card--hoverable:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Clickable */
.card--clickable {
  cursor: pointer;
}

.card--clickable:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Header */
.card__header {
  padding: var(--spacing-5);
  border-bottom: 1px solid var(--color-border);
}

.card__title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin: 0;
}

.card__subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin: var(--spacing-1) 0 0;
}

/* Footer */
.card__footer {
  padding: var(--spacing-4);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-3);
}
/* Input Group - Container */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

/* Label */
.input-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-primary, #1a1a1a);
  margin-bottom: 0.25rem;
}

.input-required {
  color: var(--color-danger, #cd3131);
  margin-left: 0.25rem;
}

/* Input Wrapper (for icon support) */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-wrapper--icon-left .input {
  padding-left: 2.5rem;
}

.input-wrapper--icon-right .input {
  padding-right: 2.5rem;
}

/* Input Icon */
.input-icon {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--color-text-secondary, #6b6b6b);
  pointer-events: none;
}

.input-icon--left {
  left: 0.75rem;
}

.input-icon--right {
  right: 0.75rem;
}

/* Text Input */
.input {
  width: 100%;
  height: 40px;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif);
  color: var(--color-text-primary, #1a1a1a);
  background-color: var(--color-bg-primary, #ffffff);
  border: 1px solid var(--color-border, #d4d4d4);
  border-radius: var(--radius-md, 8px);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input::placeholder {
  color: var(--color-text-tertiary, #9b9b9b);
}

.input:hover:not(:disabled) {
  border-color: var(--color-border-hover, #a3a3a3);
}

.input:focus {
  border-color: var(--color-primary, #FF5722);
  box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.1);
}

.input:disabled {
  background-color: var(--color-bg-disabled, #f5f5f5);
  color: var(--color-text-disabled, #9b9b9b);
  cursor: not-allowed;
}

/* Input Error State */
.input--error {
  border-color: var(--color-danger, #cd3131);
}

.input--error:focus {
  border-color: var(--color-danger, #cd3131);
  box-shadow: 0 0 0 3px rgba(205, 49, 49, 0.1);
}

/* Select Dropdown */
.select {
  width: 100%;
  height: 40px;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif);
  color: var(--color-text-primary, #1a1a1a);
  background-color: var(--color-bg-primary, #ffffff);
  border: 1px solid var(--color-border, #d4d4d4);
  border-radius: var(--radius-md, 8px);
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b6b6b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

.select:hover:not(:disabled) {
  border-color: var(--color-border-hover, #a3a3a3);
}

.select:focus {
  border-color: var(--color-primary, #FF5722);
  box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.1);
}

.select:disabled {
  background-color: var(--color-bg-disabled, #f5f5f5);
  color: var(--color-text-disabled, #9b9b9b);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Select Error State */
.select--error {
  border-color: var(--color-danger, #cd3131);
}

.select--error:focus {
  border-color: var(--color-danger, #cd3131);
  box-shadow: 0 0 0 3px rgba(205, 49, 49, 0.1);
}

/* Checkbox */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.checkbox {
  width: 1.125rem;
  height: 1.125rem;
  border: 1px solid var(--color-border, #d4d4d4);
  border-radius: var(--radius-sm, 4px);
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
  flex-shrink: 0;
  position: relative;
}

.checkbox:hover:not(:disabled) {
  border-color: var(--color-border-hover, #a3a3a3);
}

.checkbox:focus {
  border-color: var(--color-primary, #FF5722);
  box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.1);
}

.checkbox:checked {
  background-color: var(--color-primary, #FF5722);
  border-color: var(--color-primary, #FF5722);
}

.checkbox:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox:disabled {
  background-color: var(--color-bg-disabled, #f5f5f5);
  border-color: var(--color-border, #d4d4d4);
  cursor: not-allowed;
  opacity: 0.6;
}

.checkbox-text {
  font-size: 0.875rem;
  color: var(--color-text-primary, #1a1a1a);
}

.checkbox:disabled ~ .checkbox-text {
  color: var(--color-text-disabled, #9b9b9b);
}

/* Error Message */
.input-error {
  font-size: 0.75rem;
  color: var(--color-danger, #cd3131);
  margin: 0;
  margin-top: -0.25rem;
}
/**
 * Modal Component Styles
 */

/* Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal, 1050);
  padding: var(--spacing-4, 1rem);
  animation: modal-overlay-fade-in 0.2s ease;
}

@keyframes modal-overlay-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Modal Container */
.modal {
  background: var(--color-bg-primary, #FFFFFF);
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.1));
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 2rem);
  overflow: hidden;
  animation: modal-slide-in 0.2s ease;
}

@keyframes modal-slide-in {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Modal Sizes */
.modal-sm {
  width: 100%;
  max-width: 400px;
}

.modal-md {
  width: 100%;
  max-width: 560px;
}

.modal-lg {
  width: 100%;
  max-width: 720px;
}

.modal-xl {
  width: 100%;
  max-width: 960px;
}

.modal-full {
  width: calc(100vw - 2rem);
  height: calc(100vh - 2rem);
  max-width: none;
}

/* Modal Header */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-4, 1rem) var(--spacing-6, 1.5rem);
  border-bottom: 1px solid var(--color-border-light, #E0E0E0);
  flex-shrink: 0;
}

.modal-title {
  margin: 0;
  font-size: var(--font-size-xl, 1.25rem);
  font-weight: var(--font-weight-semibold, 600);
  color: var(--color-text-primary, #212121);
  line-height: 1.4;
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: var(--radius-md, 8px);
  color: var(--color-text-secondary, #757575);
  font-size: var(--font-size-lg, 1.125rem);
  cursor: pointer;
  transition: all var(--transition-fast, 0.15s ease);
  flex-shrink: 0;
  margin-left: var(--spacing-3, 0.75rem);
}

.modal-close:hover {
  background: var(--color-bg-secondary, #F5F5F5);
  color: var(--color-text-primary, #212121);
}

.modal-close:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-primary, #FF5722);
}

.modal-close:focus:not(:focus-visible) {
  box-shadow: none;
}

/* Modal Body */
.modal-body {
  padding: var(--spacing-6, 1.5rem);
  overflow-y: auto;
  flex: 1;
}

/* Modal Footer */
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--spacing-3, 0.75rem);
  padding: var(--spacing-4, 1rem) var(--spacing-6, 1.5rem);
  border-top: 1px solid var(--color-border-light, #E0E0E0);
  background: var(--color-bg-secondary, #F5F5F5);
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 640px) {
  .modal-overlay {
    padding: var(--spacing-2, 0.5rem);
    align-items: flex-end;
  }

  .modal {
    max-height: calc(100vh - 1rem);
    border-radius: var(--radius-lg, 12px) var(--radius-lg, 12px) 0 0;
    animation: modal-slide-up 0.3s ease;
  }

  @keyframes modal-slide-up {
    from {
      opacity: 0;
      transform: translateY(100%);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .modal-sm,
  .modal-md,
  .modal-lg,
  .modal-xl {
    max-width: none;
    width: 100%;
  }

  .modal-header {
    padding: var(--spacing-3, 0.75rem) var(--spacing-4, 1rem);
  }

  .modal-body {
    padding: var(--spacing-4, 1rem);
  }

  .modal-footer {
    padding: var(--spacing-3, 0.75rem) var(--spacing-4, 1rem);
    flex-direction: column;
  }

  .modal-footer > * {
    width: 100%;
  }
}
/**
 * Sidebar Component Styles
 * 
 * Shared sidebar for all portals:
 * - Customer Portal
 * - Admin Portal
 * - Infrastructure Portal
 * - Organization Portal
 */

/* ============================================
   Sidebar Container
   ============================================ */

.sidebar {
  width: var(--layout-sidebar-width, 240px);
  height: 100vh;
  background: var(--sidebar-bg, #1E1E1E);
  color: var(--sidebar-text, #FFFFFF);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  z-index: var(--z-fixed, 1030);
  box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));
  overflow: hidden;
  transition: transform var(--transition-slow, 0.3s ease);
}

/* Collapsed State (future) */
.sidebar.collapsed {
  width: 64px;
}

.sidebar.collapsed .sidebar-logo-text,
.sidebar.collapsed .sidebar-nav-label,
.sidebar.collapsed .sidebar-nav-badge,
.sidebar.collapsed .sidebar-user-info,
.sidebar.collapsed .sidebar-logout-text,
.sidebar.collapsed .sidebar-appswitcher {
  display: none;
}

/* ============================================
   Mobile Overlay
   ============================================ */

.sidebar-overlay {
  display: none;
}

/* ============================================
   Sidebar Header
   ============================================ */

.sidebar-header {
  padding: var(--spacing-6, 1.5rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-3, 0.75rem);
  margin-bottom: var(--spacing-4, 1rem);
}

.sidebar-logo-icon {
  font-size: var(--font-size-3xl, 1.875rem);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-logo-text {
  flex: 1;
  min-width: 0;
}

.sidebar-logo-title {
  font-size: var(--font-size-xl, 1.25rem);
  font-weight: var(--font-weight-bold, 700);
  color: var(--sidebar-text, #FFFFFF);
  margin: 0;
  line-height: 1.2;
}

.sidebar-logo-subtitle {
  font-size: var(--font-size-sm, 0.875rem);
  color: var(--sidebar-text-secondary, #B0B0B0);
  margin: 0;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* AppSwitcher Container */
.sidebar-appswitcher {
  margin-top: var(--spacing-4, 1rem);
}

/* ============================================
   Sidebar Navigation
   ============================================ */

.sidebar-nav {
  flex: 1;
  padding: var(--spacing-4, 1rem) var(--spacing-2, 0.5rem);
  overflow-y: auto;
  overflow-x: hidden;
}

/* Custom Scrollbar (Webkit) */
.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Navigation Item */
.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-3, 0.75rem);
  width: 100%;
  padding: var(--spacing-3, 0.75rem) var(--spacing-4, 1rem);
  margin-bottom: var(--spacing-1, 0.25rem);
  background: transparent;
  border: none;
  border-radius: var(--radius-md, 8px);
  color: var(--sidebar-text, #FFFFFF);
  font-size: var(--font-size-base, 1rem);
  font-weight: var(--font-weight-medium, 500);
  font-family: var(--font-family-base, inherit);
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-base, 0.2s ease);
  position: relative;
}

.sidebar-nav-item:hover:not(:disabled) {
  background: var(--sidebar-hover, #2D2D2D);
}

.sidebar-nav-item:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-primary, #FF5722);
}

.sidebar-nav-item:focus:not(:focus-visible) {
  box-shadow: none;
}

.sidebar-nav-item:focus-visible {
  outline: 2px solid var(--color-primary, #FF5722);
  outline-offset: 2px;
}

.sidebar-nav-item.active {
  background: var(--sidebar-active, #FF5722);
  color: white;
}

.sidebar-nav-item:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Navigation Icon */
.sidebar-nav-icon {
  font-size: var(--font-size-xl, 1.25rem);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

/* Navigation Label */
.sidebar-nav-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Navigation Badge */
.sidebar-nav-badge {
  background: var(--color-error, #F44336);
  color: white;
  font-size: var(--font-size-xs, 0.75rem);
  font-weight: var(--font-weight-bold, 700);
  padding: 2px 6px;
  border-radius: var(--radius-full, 9999px);
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-nav-item.active .sidebar-nav-badge {
  background: white;
  color: var(--sidebar-active, #FF5722);
}

/* ============================================
   Sidebar Footer
   ============================================ */

.sidebar-footer {
  padding: var(--spacing-4, 1rem);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

/* User Info */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: var(--spacing-3, 0.75rem);
  margin-bottom: var(--spacing-3, 0.75rem);
  padding: var(--spacing-2, 0.5rem);
  border-radius: var(--radius-md, 8px);
}

.sidebar-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full, 9999px);
  background: var(--color-primary, #FF5722);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-lg, 1.125rem);
  font-weight: var(--font-weight-bold, 700);
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-user-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-user-avatar-initials {
  display: block;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: var(--font-size-sm, 0.875rem);
  font-weight: var(--font-weight-semibold, 600);
  color: var(--sidebar-text, #FFFFFF);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.sidebar-user-email {
  font-size: var(--font-size-xs, 0.75rem);
  color: var(--sidebar-text-secondary, #B0B0B0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

/* Logout Button */
.sidebar-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-2, 0.5rem);
  width: 100%;
  padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid rgba(244, 67, 54, 0.3);
  border-radius: var(--radius-md, 8px);
  color: var(--color-error, #F44336);
  font-size: var(--font-size-sm, 0.875rem);
  font-weight: var(--font-weight-medium, 500);
  font-family: var(--font-family-base, inherit);
  cursor: pointer;
  transition: all var(--transition-base, 0.2s ease);
}

.sidebar-logout:hover {
  background: rgba(244, 67, 54, 0.2);
  border-color: var(--color-error, #F44336);
}

.sidebar-logout:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-error, #F44336);
}

.sidebar-logout:focus:not(:focus-visible) {
  box-shadow: none;
}

.sidebar-logout:focus-visible {
  outline: 2px solid var(--color-error, #F44336);
  outline-offset: 2px;
}

.sidebar-logout:active {
  transform: scale(0.98);
}

.sidebar-logout-icon {
  font-size: var(--font-size-lg, 1.125rem);
}

.sidebar-logout-text {
  font-weight: var(--font-weight-semibold, 600);
}

/* ============================================
   Responsive Design
   ============================================ */

/* Tablet: Smaller sidebar */
@media (max-width: 1024px) {
  .sidebar {
    width: 200px;
  }

  .sidebar-logo-title {
    font-size: var(--font-size-lg, 1.125rem);
  }

  .sidebar-nav-item {
    padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);
  }
}

/* Mobile: Hidden by default, shown as overlay */
@media (max-width: 768px) {
  .sidebar {
    width: 280px;
    transform: translateX(-100%);
    z-index: var(--z-modal, 1050);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  /* Overlay backdrop */
  .sidebar-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-modal-backdrop, 1040);
  }
}

/* ============================================
   Light Mode (optional)
   ============================================ */

.sidebar.light-mode {
  background: white;
  color: var(--color-text-primary, #212121);
  box-shadow: var(--shadow-lg);
}

.sidebar.light-mode .sidebar-header,
.sidebar.light-mode .sidebar-footer {
  border-color: var(--color-border-light, #E0E0E0);
}

.sidebar.light-mode .sidebar-logo-title {
  color: var(--color-text-primary, #212121);
}

.sidebar.light-mode .sidebar-logo-subtitle {
  color: var(--color-text-secondary, #757575);
}

.sidebar.light-mode .sidebar-nav-item {
  color: var(--color-text-primary, #212121);
}

.sidebar.light-mode .sidebar-nav-item:hover {
  background: var(--color-bg-secondary, #F5F5F5);
}

.sidebar.light-mode .sidebar-nav-item.active {
  background: var(--color-primary, #FF5722);
  color: white;
}

.sidebar.light-mode .sidebar-user-name {
  color: var(--color-text-primary, #212121);
}

.sidebar.light-mode .sidebar-user-email {
  color: var(--color-text-secondary, #757575);
}
/**
 * Spinner Component Styles
 */

.spinner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.spinner-centered {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 100px;
}

.spinner-circle {
  border-radius: 50%;
  border-style: solid;
  animation: spinner-rotate 0.75s linear infinite;
}

/* Sizes */
.spinner-sm .spinner-circle {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

.spinner-md .spinner-circle {
  width: 24px;
  height: 24px;
  border-width: 2px;
}

.spinner-lg .spinner-circle {
  width: 32px;
  height: 32px;
  border-width: 3px;
}

.spinner-xl .spinner-circle {
  width: 48px;
  height: 48px;
  border-width: 4px;
}

/* Variants */
.spinner-default .spinner-circle {
  border-color: var(--color-border-light, #E0E0E0);
  border-top-color: var(--color-primary, #FF5722);
}

.spinner-primary .spinner-circle {
  border-color: rgba(255, 87, 34, 0.2);
  border-top-color: var(--color-primary, #FF5722);
}

.spinner-light .spinner-circle {
  border-color: rgba(255, 255, 255, 0.2);
  border-top-color: white;
}

/* Animation */
@keyframes spinner-rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Screen Reader Only */
.spinner-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/**
 * Table Component Styles
 */

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md, 8px);
  border: 1px solid var(--color-border-light, #E0E0E0);
  background: var(--color-bg-primary, #FFFFFF);
}

/* Base Table */
.shared-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm, 0.875rem);
}

/* Header */
.shared-table thead {
  background: var(--color-bg-secondary, #F5F5F5);
}

.shared-table th {
  padding: var(--spacing-3, 0.75rem) var(--spacing-4, 1rem);
  font-weight: var(--font-weight-semibold, 600);
  color: var(--color-text-primary, #212121);
  text-align: left;
  border-bottom: 2px solid var(--color-border-light, #E0E0E0);
  white-space: nowrap;
  user-select: none;
}

.shared-table th.sortable {
  cursor: pointer;
  transition: background var(--transition-fast, 0.15s ease);
}

.shared-table th.sortable:hover {
  background: var(--color-bg-tertiary, #EEEEEE);
}

.th-content {
  display: flex;
  align-items: center;
  gap: var(--spacing-2, 0.5rem);
}

/* Sort Icons */
.sort-icon {
  font-size: var(--font-size-xs, 0.75rem);
  opacity: 0.5;
  transition: opacity var(--transition-fast, 0.15s ease);
}

.sort-icon-active {
  opacity: 1;
  color: var(--color-primary, #FF5722);
}

.shared-table th.sortable:hover .sort-icon {
  opacity: 1;
}

/* Body */
.shared-table td {
  padding: var(--spacing-3, 0.75rem) var(--spacing-4, 1rem);
  color: var(--color-text-primary, #212121);
  border-bottom: 1px solid var(--color-border-light, #E0E0E0);
  vertical-align: middle;
}

.shared-table tbody tr:last-child td {
  border-bottom: none;
}

/* Hoverable */
.shared-table.hoverable tbody tr {
  transition: background var(--transition-fast, 0.15s ease);
}

.shared-table.hoverable tbody tr:hover {
  background: var(--color-bg-secondary, #F5F5F5);
}

/* Clickable Rows */
.shared-table tbody tr.clickable {
  cursor: pointer;
}

.shared-table tbody tr.clickable:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--color-primary, #FF5722);
}

.shared-table tbody tr.clickable:focus:not(:focus-visible) {
  box-shadow: none;
}

/* Striped */
.shared-table.striped tbody tr:nth-child(even) {
  background: var(--color-bg-secondary, #F5F5F5);
}

.shared-table.striped.hoverable tbody tr:hover {
  background: var(--color-bg-tertiary, #EEEEEE);
}

/* Compact */
.shared-table.compact th,
.shared-table.compact td {
  padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);
}

/* Sticky Header */
.shared-table.sticky-header thead {
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: var(--shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.05));
}

/* Alignment */
.text-left {
  text-align: left;
}

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

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

/* Loading State */
.table-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-3, 0.75rem);
  padding: var(--spacing-12, 3rem);
  color: var(--color-text-secondary, #757575);
}

.table-loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--color-border-light, #E0E0E0);
  border-top-color: var(--color-primary, #FF5722);
  border-radius: 50%;
  animation: table-spin 0.8s linear infinite;
}

@keyframes table-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Empty State */
.table-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-2, 0.5rem);
  padding: var(--spacing-12, 3rem);
  color: var(--color-text-secondary, #757575);
}

.table-empty-icon {
  font-size: var(--font-size-4xl, 2.25rem);
  opacity: 0.5;
}

.table-empty-message {
  margin: 0;
  font-size: var(--font-size-base, 1rem);
}

/* Responsive */
@media (max-width: 768px) {
  .table-wrapper {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .shared-table th,
  .shared-table td {
    padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);
    font-size: var(--font-size-xs, 0.75rem);
  }
}
/**
 * Toast Component Styles
 */

/* Container */
.toast-container {
  position: fixed;
  z-index: var(--z-tooltip, 1070);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2, 0.5rem);
  pointer-events: none;
  max-width: 100%;
  padding: var(--spacing-4, 1rem);
}

/* Positions */
.toast-top-right {
  top: 0;
  right: 0;
  align-items: flex-end;
}

.toast-top-left {
  top: 0;
  left: 0;
  align-items: flex-start;
}

.toast-bottom-right {
  bottom: 0;
  right: 0;
  align-items: flex-end;
}

.toast-bottom-left {
  bottom: 0;
  left: 0;
  align-items: flex-start;
}

.toast-top-center {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  align-items: center;
}

.toast-bottom-center {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  align-items: center;
}

/* Toast Item */
.toast {
  display: flex;
  align-items: center;
  gap: var(--spacing-3, 0.75rem);
  padding: var(--spacing-3, 0.75rem) var(--spacing-4, 1rem);
  border-radius: var(--radius-md, 8px);
  box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));
  pointer-events: auto;
  min-width: 300px;
  max-width: 500px;
  animation: toast-enter 0.3s ease;
}

@keyframes toast-enter {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast-exit {
  animation: toast-exit 0.3s ease forwards;
}

@keyframes toast-exit {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* Left-side animations */
.toast-top-left .toast,
.toast-bottom-left .toast {
  animation-name: toast-enter-left;
}

@keyframes toast-enter-left {
  from {
    opacity: 0;
    transform: translateX(-100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast-top-left .toast-exit,
.toast-bottom-left .toast-exit {
  animation-name: toast-exit-left;
}

@keyframes toast-exit-left {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-100%);
  }
}

/* Center animations */
.toast-top-center .toast,
.toast-bottom-center .toast {
  animation-name: toast-enter-center;
}

@keyframes toast-enter-center {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.toast-top-center .toast-exit,
.toast-bottom-center .toast-exit {
  animation-name: toast-exit-center;
}

@keyframes toast-exit-center {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* Toast Icon */
.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full, 9999px);
  font-size: var(--font-size-sm, 0.875rem);
  font-weight: var(--font-weight-bold, 700);
  flex-shrink: 0;
}

/* Toast Message */
.toast-message {
  flex: 1;
  font-size: var(--font-size-sm, 0.875rem);
  font-weight: var(--font-weight-medium, 500);
  line-height: 1.4;
}

/* Toast Close Button */
.toast-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm, 4px);
  cursor: pointer;
  opacity: 0.5;
  transition: opacity var(--transition-fast, 0.15s ease);
  flex-shrink: 0;
  font-size: var(--font-size-sm, 0.875rem);
}

.toast-close:hover {
  opacity: 1;
}

/* Variants */
.toast-success {
  background: #E8F5E9;
  color: #1B5E20;
  border-left: 4px solid var(--color-success, #4CAF50);
}

.toast-success .toast-icon {
  background: var(--color-success, #4CAF50);
  color: white;
}

.toast-success .toast-close {
  color: #1B5E20;
}

.toast-error {
  background: #FFEBEE;
  color: #B71C1C;
  border-left: 4px solid var(--color-error, #F44336);
}

.toast-error .toast-icon {
  background: var(--color-error, #F44336);
  color: white;
}

.toast-error .toast-close {
  color: #B71C1C;
}

.toast-warning {
  background: #FFF3E0;
  color: #E65100;
  border-left: 4px solid var(--color-warning, #FF9800);
}

.toast-warning .toast-icon {
  background: var(--color-warning, #FF9800);
  color: white;
}

.toast-warning .toast-close {
  color: #E65100;
}

.toast-info {
  background: #E3F2FD;
  color: #0D47A1;
  border-left: 4px solid var(--color-info, #2196F3);
}

.toast-info .toast-icon {
  background: var(--color-info, #2196F3);
  color: white;
}

.toast-info .toast-close {
  color: #0D47A1;
}

/* Responsive */
@media (max-width: 640px) {
  .toast-container {
    padding: var(--spacing-2, 0.5rem);
  }

  .toast-top-right,
  .toast-top-left,
  .toast-bottom-right,
  .toast-bottom-left {
    left: 0;
    right: 0;
    align-items: stretch;
  }

  .toast-top-center,
  .toast-bottom-center {
    left: 0;
    right: 0;
    transform: none;
  }

  .toast {
    min-width: 0;
    max-width: none;
  }
}
.page-header {
  margin-bottom: 1.5rem;
}

.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.page-header-text {
  flex: 1;
  min-width: 0;
}

.page-header-title {
  margin: 0 0 0.25rem 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-header-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.page-header-subtitle {
  margin: 0;
  color: #6b7280;
  font-size: 0.9rem;
}

.page-header-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.page-header-tabs {
  margin-top: 1rem;
  border-bottom: 2px solid #e5e7eb;
  display: flex;
  gap: 0;
}
.confirm-message {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #374151;
}

.confirm-btn {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.confirm-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.confirm-btn-secondary {
  background: #fff;
  color: #374151;
  border-color: #d1d5db;
}

.confirm-btn-secondary:hover:not(:disabled) {
  background: #f9fafb;
}

.confirm-btn-default {
  background: #3b82f6;
  color: #fff;
}

.confirm-btn-default:hover:not(:disabled) {
  background: #2563eb;
}

.confirm-btn-danger {
  background: #dc2626;
  color: #fff;
}

.confirm-btn-danger:hover:not(:disabled) {
  background: #b91c1c;
}

.confirm-btn-warning {
  background: #f59e0b;
  color: #111827;
}

.confirm-btn-warning:hover:not(:disabled) {
  background: #d97706;
}

.confirm-btn-info {
  background: #0ea5e9;
  color: #fff;
}

.confirm-btn-info:hover:not(:disabled) {
  background: #0284c7;
}
.form-dialog {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-dialog-subtitle {
  margin: 0 0 0.5rem 0;
  color: #6b7280;
  font-size: 0.875rem;
}

.form-dialog-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-dialog-error {
  background: #fee2e2;
  color: #991b1b;
  padding: 0.625rem 0.875rem;
  border-radius: 6px;
  font-size: 0.875rem;
  border: 1px solid #fecaca;
}

.form-dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #f3f4f6;
}

.form-dialog-btn {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.form-dialog-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-dialog-btn-secondary {
  background: #fff;
  color: #374151;
  border-color: #d1d5db;
}

.form-dialog-btn-secondary:hover:not(:disabled) {
  background: #f9fafb;
}

.form-dialog-btn-default {
  background: #3b82f6;
  color: #fff;
}

.form-dialog-btn-default:hover:not(:disabled) {
  background: #2563eb;
}

.form-dialog-btn-danger {
  background: #dc2626;
  color: #fff;
}

.form-dialog-btn-danger:hover:not(:disabled) {
  background: #b91c1c;
}

/* FormField */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  flex: 1;
  min-width: 0;
}

.form-field-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
}

.form-field-required {
  color: #dc2626;
}

.form-field-control input,
.form-field-control select,
.form-field-control textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.875rem;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-field-control input:focus,
.form-field-control select:focus,
.form-field-control textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-field-control textarea {
  resize: vertical;
  min-height: 80px;
}

.form-field-hint {
  font-size: 0.75rem;
  color: #6b7280;
}

.form-field-error .form-field-control input,
.form-field-error .form-field-control select,
.form-field-error .form-field-control textarea {
  border-color: #dc2626;
}

.form-field-error-text {
  font-size: 0.75rem;
  color: #dc2626;
}

/* FormRow — horizontale Anordnung mehrerer Felder */
.form-row {
  display: flex;
  gap: 0.75rem;
}

@media (max-width: 600px) {
  .form-row {
    flex-direction: column;
  }
}
.data-table {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.data-table-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.5rem 0;
}

.data-table-search {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 360px;
}

.data-table-search-icon {
  position: absolute;
  left: 0.625rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
  font-size: 0.875rem;
}

.data-table-search-input {
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 2rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.875rem;
  background: #fff;
}

.data-table-search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.data-table-filter {
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.875rem;
  background: #fff;
  cursor: pointer;
}

.data-table-count-hint {
  color: #6b7280;
  font-size: 0.8125rem;
  margin-left: 0.25rem;
}

.data-table-toolbar-spacer {
  flex: 1;
}

.data-table-btn {
  padding: 0.5rem 0.875rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.data-table-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.data-table-btn-icon {
  background: #fff;
  color: #6b7280;
  border-color: #d1d5db;
  padding: 0.5rem 0.625rem;
  font-size: 1rem;
}

.data-table-btn-icon:hover:not(:disabled) {
  background: #f3f4f6;
  color: #111827;
}

.data-table-btn-secondary {
  background: #fff;
  color: #374151;
  border-color: #d1d5db;
}

.data-table-btn-secondary:hover:not(:disabled) {
  background: #f9fafb;
}

.data-table-btn-primary {
  background: #3b82f6;
  color: #fff;
}

.data-table-btn-primary:hover:not(:disabled) {
  background: #2563eb;
}

.data-table-error {
  background: #fee2e2;
  color: #991b1b;
  padding: 0.625rem 0.875rem;
  border-radius: 6px;
  font-size: 0.875rem;
  border: 1px solid #fecaca;
}
.audit-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.audit-timeline-empty {
  color: #6b7280;
  font-size: 0.875rem;
  font-style: italic;
}

.audit-timeline-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.audit-timeline-day {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #6b7280;
  letter-spacing: 0.05em;
}

.audit-timeline-list {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1rem;
  border-left: 2px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.audit-timeline-item {
  position: relative;
  padding-left: 0.5rem;
}

.audit-timeline-marker {
  position: absolute;
  left: -1.4rem;
  top: 0.25rem;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: #9ca3af;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #e5e7eb;
}

.audit-timeline-item-success .audit-timeline-marker { background: #22c55e; box-shadow: 0 0 0 2px #bbf7d0; }
.audit-timeline-item-warning .audit-timeline-marker { background: #f59e0b; box-shadow: 0 0 0 2px #fde68a; }
.audit-timeline-item-danger .audit-timeline-marker  { background: #dc2626; box-shadow: 0 0 0 2px #fecaca; }
.audit-timeline-item-info .audit-timeline-marker    { background: #0ea5e9; box-shadow: 0 0 0 2px #bae6fd; }

.audit-timeline-content {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.audit-timeline-headline {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
}

.audit-timeline-meta {
  font-size: 0.75rem;
  color: #6b7280;
}

.audit-timeline-body {
  font-size: 0.8125rem;
  color: #374151;
  margin-top: 0.125rem;
}

.audit-timeline-time {
  font-size: 0.6875rem;
  color: #9ca3af;
  margin-top: 0.125rem;
}
.md-message {
  font-size: inherit;
  line-height: 1.6;
  color: inherit;
  /* Wichtig: Eltern-Container (.aria-message-content) hat white-space:pre-wrap
     fuer Plain-Text-User-Messages. Bei Markdown-Rendering wuerde das aber
     Bullet-Listen mit Leerzeilen riesig auseinandertreiben — Markdown
     handhabt Whitespaces selbst, hier resetten. */
  white-space: normal;
}

.md-message p {
  margin: 0 0 0.5rem;
}

.md-message p:last-child {
  margin-bottom: 0;
}

.md-message strong {
  font-weight: 700;
}

.md-message em {
  font-style: italic;
}

.md-message ul,
.md-message ol {
  margin: 0.25rem 0 0.5rem 1.25rem;
  padding: 0;
}

.md-message li {
  margin-bottom: 0.2rem;
}

/* react-markdown wickelt <li> in <p> bei "loose lists" (Bullet-Points mit
   Leerzeilen dazwischen). Dann addieren sich p-margin + li-margin und es
   wirkt riesig. Fix: p innerhalb li bekommt 0 Margin. */
.md-message li > p {
  margin: 0;
}
.md-message li > p + p {
  margin-top: 0.25rem;
}

.md-message h1,
.md-message h2,
.md-message h3 {
  font-weight: 700;
  margin: 0.75rem 0 0.25rem;
  line-height: 1.3;
}

.md-message h1 { font-size: 1.1em; }
.md-message h2 { font-size: 1.05em; }
.md-message h3 { font-size: 1em; }

.md-message code {
  font-family: monospace;
  font-size: 0.875em;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 3px;
  padding: 0.1em 0.3em;
}

.md-message pre {
  margin: 0.5rem 0;
  border-radius: 6px;
  overflow-x: auto;
  background: rgba(0, 0, 0, 0.08);
  padding: 0.75rem;
}

.md-message pre code {
  background: none;
  padding: 0;
  font-size: 0.8em;
}

.md-message a {
  color: #FE4F00;
  text-decoration: none;
}

.md-message a:hover {
  text-decoration: underline;
}

.md-message hr {
  border: none;
  border-top: 1px solid currentColor;
  opacity: 0.2;
  margin: 0.5rem 0;
}

.aria-message--user .md-message code,
.aria-message--user .md-message pre {
  background: rgba(255, 255, 255, 0.2);
}

.aria-message--user .md-message a {
  color: #fff;
  text-decoration: underline;
}
/* ============================================================
   Aria Chat Panel — Slide-in Sidebar
   IT-SCE CI: Orange #FE4F00
   ============================================================ */

.aria-toggle-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.1rem;
  background: #FE4F00;
  color: #fff;
  border: none;
  border-radius: 2rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(254, 79, 0, 0.35);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
}

.aria-toggle-btn:hover {
  background: #e04400;
  box-shadow: 0 6px 20px rgba(254, 79, 0, 0.45);
  transform: translateY(-1px);
}

.aria-toggle-label {
  line-height: 1;
}

.aria-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 0;
  overflow: hidden;
  background: #fff;
  border-left: 1px solid #e5e7eb;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  z-index: 99;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.aria-panel--open {
  width: 380px;
}

.aria-panel--open.aria-panel--with-sidebar {
  width: 620px;
}

.aria-panel-inner {
  width: 100%;
  display: flex;
  flex-direction: row;
  height: 100%;
  overflow: hidden;
}

.aria-chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 380px;
  overflow: hidden;
}

/* === Sessions Sidebar === */
.aria-sessions-sidebar {
  width: 240px;
  min-width: 240px;
  border-right: 1px solid #e5e7eb;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.2s ease, min-width 0.2s ease;
}

.aria-sessions-sidebar--collapsed {
  width: 0;
  min-width: 0;
  border-right: none;
}

.aria-sessions-header {
  padding: 0.75rem 0.875rem;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.aria-sessions-new-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  background: #FE4F00;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.12s;
}

.aria-sessions-new-btn:hover:not(:disabled) {
  background: #e04400;
}

.aria-sessions-new-btn:disabled {
  background: #d1d5db;
  cursor: not-allowed;
}

.aria-sessions-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0.5rem 0.75rem;
}

.aria-sessions-empty {
  padding: 0.75rem 0.5rem;
  font-size: 0.8rem;
  color: #9ca3af;
  text-align: center;
}

.aria-sessions-error {
  padding: 0.5rem 0.625rem;
  font-size: 0.75rem;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 0.4rem;
  margin: 0.25rem;
}

.aria-session-item {
  display: flex;
  align-items: stretch;
  position: relative;
  border-radius: 0.45rem;
  margin-bottom: 0.15rem;
  transition: background 0.1s;
}

.aria-session-item:hover {
  background: #f1f3f5;
}

.aria-session-item--active {
  background: #ffe9dc;
}

.aria-session-item--active:hover {
  background: #ffe1d0;
}

.aria-session-item-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.55rem 0.6rem;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  min-width: 0;
}

.aria-session-title {
  font-size: 0.825rem;
  font-weight: 500;
  color: #1a1a2e;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.aria-session-item--active .aria-session-title {
  font-weight: 600;
  color: #b03100;
}

.aria-session-date {
  font-size: 0.7rem;
  color: #6b7280;
  line-height: 1.2;
}

.aria-session-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  border-radius: 0.4rem;
  opacity: 0;
  transition: opacity 0.1s, color 0.1s, background 0.1s;
}

.aria-session-item:hover .aria-session-menu-btn,
.aria-session-item--active .aria-session-menu-btn {
  opacity: 1;
}

.aria-session-menu-btn:hover {
  color: #1a1a2e;
  background: #e5e7eb;
}

.aria-session-menu {
  position: absolute;
  right: 0.25rem;
  top: 100%;
  z-index: 5;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  min-width: 140px;
  padding: 0.25rem;
  display: flex;
  flex-direction: column;
}

.aria-session-menu button {
  background: transparent;
  border: none;
  text-align: left;
  padding: 0.45rem 0.65rem;
  font-size: 0.8rem;
  cursor: pointer;
  border-radius: 0.35rem;
  color: #374151;
}

.aria-session-menu button:hover {
  background: #f3f4f6;
}

.aria-session-menu-danger {
  color: #dc2626 !important;
}

.aria-session-menu-danger:hover {
  background: #fef2f2 !important;
}

.aria-sidebar-toggle {
  margin-right: 0.25rem;
}

@media (max-width: 768px) {
  .aria-panel {
    z-index: 1002;
  }

  .aria-panel--open,
  .aria-panel--open.aria-panel--with-sidebar {
    width: 100%;
  }

  .aria-sessions-sidebar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 3;
    width: 80%;
    min-width: 220px;
    box-shadow: 4px 0 16px rgba(0, 0, 0, 0.08);
  }

  .aria-sessions-sidebar--collapsed {
    transform: translateX(-100%);
    width: 80%;
    min-width: 220px;
  }
}

.aria-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  background: #fafafa;
  flex-shrink: 0;
}

.aria-panel-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
  color: #1a1a2e;
}

.aria-panel-title svg {
  color: #FE4F00;
}

.aria-panel-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.aria-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent;
  border-radius: 0.5rem;
  cursor: pointer;
  color: #6b7280;
  transition: background 0.12s, color 0.12s;
}

.aria-action-btn:hover {
  background: #f3f4f6;
  color: #1a1a2e;
}

.aria-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.aria-welcome {
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 1.6;
}

.aria-welcome p {
  margin: 0 0 0.5rem;
}

.aria-welcome p:first-child {
  font-weight: 600;
  color: #374151;
}

.aria-welcome ul {
  margin: 0.25rem 0 0 1rem;
  padding: 0;
}

.aria-welcome li {
  margin-bottom: 0.25rem;
  font-style: italic;
}

/* TQ #5710: Onboarding-Mode "Ich bin fertig"-Box */
.aria-onboarding-finish {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: rgba(255, 196, 0, 0.08);
  border: 1px solid rgba(255, 196, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.aria-onboarding-finish p {
  margin: 0;
  font-size: 0.825rem;
  color: #92670c;
}

.aria-onboarding-finish-btn {
  padding: 0.55rem 0.9rem;
  border-radius: 6px;
  border: 0;
  background: #ff6b35;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.aria-onboarding-finish-btn:hover:not(:disabled) {
  background: #e85a26;
}

.aria-onboarding-finish-btn:disabled {
  background: rgba(0, 0, 0, 0.18);
  color: rgba(0, 0, 0, 0.55);
  cursor: not-allowed;
}

.aria-onboarding-finish-error {
  margin: 0;
  font-size: 0.8rem;
  color: #c0392b;
}

.aria-message {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
}

.aria-message--user {
  flex-direction: row-reverse;
}

.aria-message-avatar {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

.aria-message--user .aria-message-avatar {
  background: #e5e7eb;
  color: #374151;
}

.aria-message--assistant .aria-message-avatar {
  background: #FE4F00;
  color: #fff;
}

.aria-message-content {
  max-width: 82%;
  padding: 0.625rem 0.875rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.aria-message--user .aria-message-content {
  background: #FE4F00;
  color: #fff;
  border-bottom-right-radius: 0.25rem;
}

.aria-message--assistant .aria-message-content {
  background: #f3f4f6;
  color: #1a1a2e;
  border-bottom-left-radius: 0.25rem;
}

.aria-typing {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.75rem 0.875rem;
}

.aria-dot {
  width: 0.45rem;
  height: 0.45rem;
  background: #9ca3af;
  border-radius: 50%;
  animation: aria-bounce 1.2s ease-in-out infinite;
}

.aria-dot:nth-child(2) { animation-delay: 0.2s; }
.aria-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes aria-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
  40% { transform: translateY(-6px); opacity: 1; }
}

/* TQ #6093: Inline Status-Bar — ersetzt mehrere leere Avatar-Bubbles
   waehrend Aria Tools sucht/aufruft. Single Element, in-place text-update. */
.aria-status-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin: 0.5rem 0.25rem;
  background: #f3f4f6;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  color: #6b7280;
  font-style: italic;
  animation: aria-status-pulse 1.4s ease-in-out infinite;
}

.aria-status-spinner {
  display: inline-block;
  animation: aria-spin 2.4s linear infinite;
}

.aria-status-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes aria-status-pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

@keyframes aria-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.aria-error {
  font-size: 0.8rem;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
}

.aria-input-area {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  border-top: 1px solid #e5e7eb;
  background: #fafafa;
  flex-shrink: 0;
}

.aria-textarea {
  flex: 1;
  resize: none;
  border: 1px solid #d1d5db;
  border-radius: 0.75rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  line-height: 1.5;
  font-family: inherit;
  color: #1a1a2e;
  background: #fff;
  outline: none;
  max-height: 160px;
  overflow-y: auto;
  transition: border-color 0.15s;
}

/* TQ #6093 (Reopen-3): dezent. Nur Border-Darken, minimaler grauer
   Drop-Shadow, kein farbiger Ring (konsistent mit CortexPage.css). */
.aria-textarea:focus {
  border-color: #9ca3af;
  outline: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.aria-textarea:focus-visible {
  outline: none;
}

.aria-textarea:disabled {
  background: #f9fafb;
  color: #9ca3af;
}

.aria-send-btn {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FE4F00;
  color: #fff;
  border: none;
  border-radius: 0.625rem;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.aria-send-btn:hover:not(:disabled) {
  background: #e04400;
}

.aria-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Confirm-Engine P3 (TQ #6981): API-gestuetzte Confirm-Card im Slide-out-Panel. */
.aria-confirm-card {
  margin-top: 8px;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-left: 3px solid #d97706;
  border-radius: 10px;
  padding: 12px 14px;
}

.aria-confirm-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.aria-confirm-details {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: #374151;
}

.aria-confirm-details code {
  font-size: 12px;
  background: #f3f4f6;
  padding: 1px 5px;
  border-radius: 4px;
}

.aria-confirm-question {
  font-size: 13px;
  color: #6b7280;
  margin: 0 0 10px;
  line-height: 1.5;
}

.aria-confirm-err {
  font-size: 12px;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 6px 9px;
  margin: 0 0 8px;
}

.aria-confirm-actions {
  display: flex;
  gap: 8px;
}

.aria-confirm-btn {
  flex: 1;
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
}

.aria-confirm-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.aria-confirm-btn--cancel {
  background: #f3f4f6;
  color: #6b7280;
  border-color: #e5e7eb;
}

.aria-confirm-btn--ok {
  background: #d97706;
  color: #fff;
}

.aria-confirm-result {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
}

.aria-confirm-result--ok {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.aria-confirm-result--cancel {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}
/* WelcomeModal (TQ #7072 Phase 1) — Personal-User Onboarding-Modal.
   Spiegelt ConfirmModal-Idiome (Overlay + fadeIn/scaleIn, weisse Karte,
   IT-SCE Brand-Akzent #FF6B35 / Header-Navy #1a1a2e). Eine Service-Karte
   pro pending Welcome. Kein neues UI-Paradigma. */

.welcome-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 24px;
  animation: welcomeFadeIn 0.2s ease-out;
}

@keyframes welcomeFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.welcome-modal {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  animation: welcomeScaleIn 0.2s ease-out;
  overflow: hidden;
}

@keyframes welcomeScaleIn {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.welcome-header {
  padding: 28px 28px 12px;
}

.welcome-header h2 {
  margin: 0;
  font-size: 1.35rem;
  color: #1a1a2e;
  font-weight: 700;
}

.welcome-header p {
  margin: 8px 0 0;
  color: #666;
  font-size: 0.95rem;
  line-height: 1.5;
}

.welcome-body {
  padding: 8px 28px 8px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.welcome-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px;
  border: 1px solid #ececf1;
  border-radius: 12px;
  background: #fafafc;
}

.welcome-card-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
  color: white;
}

.welcome-card-body {
  flex: 1;
  min-width: 0;
}

.welcome-card-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
  color: #1a1a2e;
}

.welcome-card-hint {
  margin: 4px 0 12px;
  color: #666;
  font-size: 0.9rem;
  line-height: 1.45;
}

.welcome-card-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  background: #FF6B35;
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

.welcome-card-action:hover {
  background: #e85d2a;
}

.welcome-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 28px;
  background: #f8f9fa;
  border-top: 1px solid #eee;
}

.welcome-dismiss {
  padding: 10px 22px;
  border: none;
  border-radius: 8px;
  background: #1a1a2e;
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
}

.welcome-dismiss:hover:not(:disabled) {
  background: #16213e;
}

.welcome-dismiss:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Phase 2 (TQ #8072) — hervorgehobener, personalisierter Aria-Begruessungs-Block.
   Steht oben in .welcome-body. Navy-Brand-Flaeche mit Accent-Border, damit Aria
   sich klar von den uebrigen (hellen) Service-Karten abhebt. */
.welcome-aria-feature {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 107, 53, 0.45);
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
  box-shadow: 0 6px 18px rgba(26, 26, 46, 0.25);
}

.welcome-aria-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: rgba(255, 255, 255, 0.12);
}

.welcome-aria-body {
  flex: 1;
  min-width: 0;
}

.welcome-aria-eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #FF6B35;
}

.welcome-aria-title {
  margin: 2px 0 0;
  font-size: 1.08rem;
  font-weight: 700;
  color: #ffffff;
}

.welcome-aria-hint {
  margin: 6px 0 14px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
  line-height: 1.5;
}

.welcome-aria-hint strong {
  color: #ffffff;
}
.layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: #f5f5f5;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  z-index: 100;
}

.sidebar-header {
  padding: 28px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo {
  font-size: 1.6rem;
  font-weight: 700;
  color: #ff6b35;
  margin: 0;
  letter-spacing: -0.5px;
}

.portal-name {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 6px 0 0 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* TQ #5710: Mode-Switch-Badge */
.mode-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  line-height: 1.4;
}

.mode-badge--onboarding {
  background: rgba(255, 196, 0, 0.15);
  color: #ffc400;
  border: 1px solid rgba(255, 196, 0, 0.4);
}

.mode-badge--aria {
  background: rgba(64, 158, 255, 0.12);
  color: #4ea8ff;
  border: 1px solid rgba(64, 158, 255, 0.35);
}

.org-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.org-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #ff6b35, #e55a2b);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.org-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.org-name {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.org-role {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.btn-switch-org {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-switch-org:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

/* Navigation */
.sidebar-nav {
  flex: 1;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.2s;
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: white;
}

.nav-item.active {
  background: rgba(255, 107, 53, 0.15);
  color: #ff6b35;
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  flex-shrink: 0;
}

/* TQ #6199: Submenu unter Hauptlink (z.B. Aria > Einstellungen) */
.nav-group {
  display: flex;
  flex-direction: column;
}

.nav-subitem {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 44px;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s;
  font-weight: 400;
  font-size: 0.85rem;
  margin-top: -2px;
}

.nav-subitem:hover {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.85);
}

.nav-subitem.active {
  background: rgba(255, 107, 53, 0.12);
  color: #ff6b35;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 16px 12px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 10px;
  transition: all 0.2s;
}

.btn-logout:hover {
  background: rgba(255, 255, 255, 0.06);
  color: white;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 280px;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  /* Children that don't manage their own scroll (Aria) get default page padding.
     Pages that need a full-bleed full-height layout (CortexPage) override this. */
}

.main-content > * {
  padding: 32px 40px;
  min-height: 100%;
  box-sizing: border-box;
}

/* Full-bleed pages (Aria/Cortex) opt out of the default padding wrapper. */
.main-content > .aria-chat-page {
  padding: 0;
  height: 100%;
  min-height: 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .sidebar {
    width: 260px;
  }

  .main-content {
    margin-left: 260px;
  }

  .main-content > * {
    padding: 24px;
  }

  .main-content > .aria-chat-page {
    padding: 0;
  }
}

/* TQ #7975: Tenant-Switcher */
.tenant-switcher {
  position: relative;
  flex-shrink: 0;
}

.tenant-switcher-toggle {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
}

.tenant-switcher-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.tenant-switcher-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: #1e2a40;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 200;
  overflow: hidden;
}

.tenant-switcher-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.4);
  padding: 10px 14px 6px;
}

.tenant-switcher-loading {
  padding: 8px 14px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

.tenant-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  text-decoration: none;
  color: white;
  transition: background 0.15s;
  cursor: pointer;
}

.tenant-item:hover {
  background: rgba(255, 255, 255, 0.07);
}

.tenant-item--current {
  background: rgba(255, 107, 53, 0.1);
  cursor: default;
}

.tenant-item-avatar {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #4a6fa5, #3d5c8a);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.tenant-item--current .tenant-item-avatar {
  background: linear-gradient(135deg, #ff6b35, #e55a2b);
}

.tenant-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tenant-item-name {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tenant-item-role {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
}

.tenant-item-check {
  color: #ff6b35;
  font-size: 0.9rem;
  flex-shrink: 0;
}
/* TQ #5711 — Cockpit Setup-Fortschritt + Dienste-Status Panel. */

.ohp-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 760px) {
  .ohp-panel {
    grid-template-columns: 1fr;
  }
}

.ohp-block {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

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

.ohp-header h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
}

.ohp-progress-count {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
}

.ohp-loading,
.ohp-empty {
  color: #9ca3af;
  font-size: 13px;
  padding: 12px 0;
}

/* ── Setup-Steps ──────────────────────────────────────────────────── */
.ohp-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: space-between;
}

.ohp-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  text-align: center;
  gap: 6px;
}

.ohp-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background: #e5e7eb;
  color: #9ca3af;
  z-index: 1;
  transition: background 0.2s, color 0.2s;
}

.ohp-step-label {
  font-size: 11px;
  line-height: 1.3;
  color: #6b7280;
  max-width: 90px;
}

/* Verbindungslinie zwischen den Dots (hinter dem nächsten Dot). */
.ohp-step-line {
  position: absolute;
  top: 14px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: #e5e7eb;
  z-index: 0;
}

.ohp-step-done .ohp-step-dot {
  background: #10b981;
  color: #fff;
}
.ohp-step-done .ohp-step-label {
  color: #047857;
}
.ohp-step-done .ohp-step-line {
  background: #10b981;
}

.ohp-step-current .ohp-step-dot {
  background: #FF6B35;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.18);
}
.ohp-step-current .ohp-step-label {
  color: #c2410c;
  font-weight: 600;
}

/* ── Health-Tile ──────────────────────────────────────────────────── */
.ohp-health-summary {
  font-size: 13px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
}
.ohp-health-summary.ohp-health-healthy {
  background: #d1fae5;
  color: #047857;
}
.ohp-health-summary.ohp-health-degraded {
  background: #fef3c7;
  color: #92400e;
}
.ohp-health-summary.ohp-health-unhealthy {
  background: #fee2e2;
  color: #b91c1c;
}
.ohp-health-summary.ohp-health-unknown {
  background: #f3f4f6;
  color: #6b7280;
}

.ohp-health-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ohp-health-tile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 9px;
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  font-size: 13px;
}

.ohp-health-name {
  font-weight: 500;
  color: #1f2937;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ohp-health-state {
  font-size: 11px;
  color: #9ca3af;
}

.ohp-health-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #9ca3af;
}
.ohp-health-healthy .ohp-health-dot {
  background: #10b981;
}
.ohp-health-degraded .ohp-health-dot {
  background: #f59e0b;
}
.ohp-health-unhealthy .ohp-health-dot {
  background: #ef4444;
}
.ohp-health-stopped .ohp-health-dot,
.ohp-health-unknown .ohp-health-dot {
  background: #9ca3af;
}
.page {
  max-width: 1200px;
}

.page-header {
  margin-bottom: 32px;
}

.greeting {
  font-size: 0.9rem;
  color: #888;
  margin: 0 0 4px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.page-header h1 {
  font-size: 2rem;
  color: #1a1a2e;
  margin: 0;
  font-weight: 600;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

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

.stat-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s;
  position: relative;
}

.stat-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.stat-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-wrapper.members {
  background: linear-gradient(135deg, #e8f4fd, #d1e8fa);
  color: #0066cc;
}

.stat-icon-wrapper.services {
  background: linear-gradient(135deg, #e6f7e6, #ccf0cc);
  color: #1a7f1a;
}

.stat-icon-wrapper.role {
  background: linear-gradient(135deg, #fff4e5, #ffe8cc);
  color: #cc6600;
}

.stat-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.2;
}

.stat-value.role-value {
  font-size: 1.1rem;
  font-weight: 600;
}

.stat-label {
  font-size: 0.9rem;
  color: #888;
}

.stat-link {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  border-radius: 10px;
  color: #888;
  transition: all 0.2s;
}

.stat-link:hover {
  background: #ff6b35;
  color: white;
}

.role-card {
  background: linear-gradient(135deg, #fff9f5, #fff5f0);
  border: 1px solid rgba(255, 107, 53, 0.1);
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

.dashboard-section {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.dashboard-section h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  color: #1a1a2e;
  margin: 0 0 20px 0;
  font-weight: 600;
}

/* Quick Actions */
.actions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.action-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  text-decoration: none;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.action-card:hover {
  background: white;
  border-color: #ff6b35;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.1);
}

.action-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.action-icon.members {
  background: linear-gradient(135deg, #e8f4fd, #d1e8fa);
  color: #0066cc;
}

.action-icon.services {
  background: linear-gradient(135deg, #e6f7e6, #ccf0cc);
  color: #1a7f1a;
}

.action-icon.settings {
  background: linear-gradient(135deg, #f5f5f5, #eaeaea);
  color: #666;
}

.action-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.action-title {
  font-weight: 600;
  color: #1a1a2e;
  font-size: 0.95rem;
}

.action-desc {
  font-size: 0.85rem;
  color: #888;
}

.action-arrow {
  color: #ccc;
  transition: all 0.2s;
}

.action-card:hover .action-arrow {
  color: #ff6b35;
  transform: translateX(4px);
}

/* Activity List */
.activity-list {
  display: flex;
  flex-direction: column;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
}

.activity-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.activity-item:first-child {
  padding-top: 0;
}

.activity-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.activity-dot.member_joined {
  background: #22c55e;
}

.activity-dot.member_left {
  background: #ef4444;
}

.activity-dot.service_added {
  background: #3b82f6;
}

.activity-dot.role_changed {
  background: #f59e0b;
}

/* Cortex-Audit-Decision-Typen (TQ #6763) */
.activity-dot.permit {
  background: #22c55e;
}

.activity-dot.deny {
  background: #ef4444;
}

.activity-dot.error {
  background: #f59e0b;
}

.activity-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.activity-desc {
  font-size: 0.9rem;
  color: #1a1a2e;
}

.activity-actor {
  font-size: 0.8rem;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-time {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: #aaa;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Loading State */
.loading {
  text-align: center;
  padding: 48px;
  color: #888;
  font-size: 0.95rem;
}

/* Aria Token Budget Widget */
.aria-budget-card {
  align-items: flex-start;
}

/* Volle Breite des stats-grid (3 Spalten). */
.aria-budget-fullwidth {
  grid-column: 1 / -1;
}

.aria-budget-card.aria-budget-warning {
  border-left: 3px solid #f59e0b;
}

.stat-icon-wrapper.aria-budget-icon {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #b45309;
  margin-top: 4px;
}

.aria-budget-card.aria-budget-warning .stat-icon-wrapper.aria-budget-icon {
  background: linear-gradient(135deg, #fde68a, #fbbf24);
  color: #92400e;
}

.aria-budget-content {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  flex: 1;
}

.aria-budget-header {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.aria-budget-badge {
  font-size: 0.7rem;
  font-weight: 600;
  background: #fef3c7;
  color: #92400e;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid #fcd34d;
}

/* TQ #6109: kritische / Limit-überschritten Varianten */
.aria-budget-badge.aria-budget-badge-critical {
  background: #fed7aa;
  color: #9a3412;
  border-color: #fb923c;
}

.aria-budget-badge.aria-budget-badge-over {
  background: #fecaca;
  color: #991b1b;
  border-color: #ef4444;
}

.aria-budget-numbers {
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1;
}

.aria-budget-of {
  font-size: 0.95rem;
  color: #888;
  font-weight: 400;
}

.aria-budget-bar-track {
  width: 100%;
  height: 6px;
  background: #f0f0f0;
  border-radius: 3px;
  overflow: hidden;
}

.aria-budget-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #10b981, #34d399);
  transition: width 0.3s ease;
}

.aria-budget-warning .aria-budget-bar-fill {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.aria-budget-remaining {
  font-size: 0.78rem;
  color: #10b981;
  font-weight: 500;
  margin-top: 4px;
}

.aria-budget-modules {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.aria-budget-module-tag {
  font-size: 0.7rem;
  background: #f5f5f5;
  color: #666;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.aria-budget-overage-btn {
  margin-top: 8px;
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #1a73e8;
  background: transparent;
  border: 1px solid #1a73e8;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  align-self: flex-start;
}

.aria-budget-overage-btn:hover:not(:disabled) {
  background: #1a73e8;
  color: #fff;
}

.aria-budget-overage-btn:disabled {
  opacity: 0.6;
  cursor: default;
}
.page {
  max-width: 1200px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 1.75rem;
  color: #1a1a2e;
  margin: 0 0 6px 0;
}

.page-subtitle {
  color: #666;
  margin: 0;
  font-size: 0.95rem;
}

.btn-primary {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ff6b35;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.95rem;
}

.btn-primary:hover {
  background: #e55a2b;
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Search and Filter Bar */
.search-filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.search-wrapper {
  flex: 1;
  position: relative;
  max-width: 400px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
}

.search-input {
  width: 100%;
  padding: 12px 12px 12px 44px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  font-size: 0.95rem;
  background: white;
  transition: all 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: #9ca3af;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.search-input::placeholder {
  color: #aaa;
}

.btn-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-filter:hover {
  border-color: #ccc;
  color: #333;
}

.btn-filter.active {
  background: #f5f5f5;
  border-color: #ff6b35;
  color: #ff6b35;
}

.filter-badge {
  background: #ff6b35;
  color: white;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* Filter Options */
.filter-options {
  display: flex;
  gap: 16px;
  padding: 16px 20px;
  background: white;
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-group select {
  padding: 10px 32px 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.9rem;
  background: white;
  cursor: pointer;
  min-width: 160px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.filter-group select:focus {
  outline: none;
  border-color: #9ca3af;
}

.btn-clear-filters {
  padding: 10px 16px;
  background: none;
  border: none;
  color: #ff6b35;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.btn-clear-filters:hover {
  text-decoration: underline;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 64px 32px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.empty-icon {
  margin-bottom: 20px;
}

.empty-state h3 {
  color: #1a1a2e;
  margin: 0 0 8px 0;
  font-size: 1.2rem;
}

.empty-state p {
  color: #666;
  margin: 0 0 24px 0;
}

.btn-secondary {
  background: #f5f5f5;
  color: #333;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #e8e8e8;
}

/* Members List */
.members-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.member-card {
  background: white;
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s;
}

.member-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.member-avatar {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #ff6b35, #e55a2b);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.member-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.member-name {
  font-weight: 600;
  color: #1a1a2e;
  font-size: 0.95rem;
}

.member-email {
  font-size: 0.85rem;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-role {
  min-width: 140px;
}

.role-select {
  padding: 8px 28px 8px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-size: 0.9rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.role-select:focus {
  outline: none;
  border-color: #9ca3af;
}

.role-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
}

.role-owner {
  background: linear-gradient(135deg, #ffd700, #ffb700);
  color: #5c4a00;
}

.role-admin {
  background: #e8f4fd;
  color: #0066cc;
}

.role-member {
  background: #f5f5f5;
  color: #666;
}

.member-status {
  min-width: 90px;
}

.status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-active {
  background: #e6f7e6;
  color: #1a7f1a;
}

.status-pending {
  background: #fff4e5;
  color: #cc6600;
}

.status-removed {
  background: #ffeaea;
  color: #cc0000;
}

.btn-remove {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid #f0f0f0;
  color: #999;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-remove:hover {
  background: #ffeaea;
  border-color: #ffcccc;
  color: #cc0000;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  animation: scaleIn 0.2s ease-out;
  overflow: hidden;
}

@keyframes scaleIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-header {
  padding: 24px 24px 0;
}

.modal h2 {
  margin: 0 0 4px 0;
  color: #1a1a2e;
  font-size: 1.25rem;
}

.modal-subtitle {
  margin: 0;
  color: #888;
  font-size: 0.9rem;
}

.modal-body {
  padding: 20px 24px;
}

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

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #333;
  font-size: 0.9rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #9ca3af;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.8rem;
  color: #888;
}

.error-message {
  background: #ffeaea;
  color: #cc0000;
  padding: 12px 14px;
  border-radius: 10px;
  margin-top: 16px;
  font-size: 0.9rem;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 24px;
  background: #f8f9fa;
  border-top: 1px solid #eee;
}

/* Header Actions */
.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* View Tabs */
.view-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.view-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
}

.view-tab:hover {
  color: #333;
}

.view-tab.active {
  color: #ff6b35;
  border-bottom-color: #ff6b35;
}

/* User Actions (in user management view) */
.user-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-action {
  padding: 6px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: white;
  font-size: 0.8rem;
  font-weight: 500;
  color: #555;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-action:hover {
  border-color: #ccc;
  background: #f8f8f8;
}

.btn-action-warning {
  color: #cc6600;
  border-color: #ffd699;
}

.btn-action-warning:hover {
  background: #fff4e5;
  border-color: #cc6600;
}

.btn-action-success {
  color: #1a7f1a;
  border-color: #b3e6b3;
}

.btn-action-success:hover {
  background: #e6f7e6;
  border-color: #1a7f1a;
}

/* Disabled status badge */
.status-disabled {
  background: #f5f5f5;
  color: #999;
}

/* Modal Wide Variant */
.modal-wide {
  max-width: 600px;
}

/* Form Row (side by side) */
.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

/* Checkbox Label */
.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: auto !important;
  accent-color: #ff6b35;
  transform: scale(1.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .header-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

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

  .member-card {
    flex-wrap: wrap;
  }

  .user-actions {
    width: 100%;
    justify-content: flex-end;
    margin-top: 8px;
  }
}
.page {
  max-width: 1200px;
}

.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 1.75rem;
  color: #1a1a2e;
  margin: 0 0 6px 0;
}

.page-subtitle {
  color: #666;
  margin: 0;
  font-size: 0.95rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 80px 32px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.empty-icon {
  margin-bottom: 24px;
}

.empty-state h2 {
  color: #1a1a2e;
  margin: 0 0 8px 0;
  font-size: 1.3rem;
}

.empty-state > p {
  color: #888;
  margin: 0 0 32px 0;
  font-size: 1rem;
}

.empty-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ff6b35;
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: #e55a2b;
  transform: translateY(-2px);
}

.empty-hint {
  font-size: 0.85rem;
  color: #aaa;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

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

.service-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.service-card.skeleton-service {
  min-height: 180px;
}

.service-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.service-info {
  flex: 1;
  min-width: 0;
}

.service-name {
  margin: 0 0 4px 0;
  font-size: 1.1rem;
  color: #1a1a2e;
  font-weight: 600;
}

.service-instance {
  font-size: 0.85rem;
  color: #888;
}

.service-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  flex-shrink: 0;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.service-status.status-active {
  background: #e6f7e6;
  color: #1a7f1a;
}

.service-status.status-active .status-dot {
  background: #22c55e;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.service-status.status-pending {
  background: #fff4e5;
  color: #cc6600;
}

.service-status.status-pending .status-dot {
  background: #f59e0b;
}

.service-status.status-suspended {
  background: #ffeaea;
  color: #cc0000;
}

.service-status.status-suspended .status-dot {
  background: #ef4444;
}

.service-status.status-maintenance {
  background: #e8f4fd;
  color: #0066cc;
}

.service-status.status-maintenance .status-dot {
  background: #3b82f6;
}

.service-domain {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8f9fa;
  padding: 14px 16px;
  border-radius: 10px;
  text-decoration: none;
  color: #1a1a2e;
  margin-bottom: 16px;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.service-domain:hover {
  background: white;
  border-color: #ff6b35;
  color: #ff6b35;
}

.service-domain span {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
}

.external-icon {
  color: #ccc;
  transition: all 0.2s;
}

.service-domain:hover .external-icon {
  color: #ff6b35;
  transform: translate(2px, -2px);
}

.service-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}

.service-date {
  font-size: 0.8rem;
  color: #aaa;
}

.service-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  font-size: 13px;
  color: #6b7280;
}

.service-billing {
  font-weight: 500;
  color: #374151;
}

.service-linked-type {
  font-size: 11px;
  background: #f3f4f6;
  color: #6b7280;
  padding: 2px 6px;
  border-radius: 4px;
}

.service-erp-link {
  margin-left: auto;
  color: #9ca3af;
  display: flex;
  align-items: center;
}

.service-erp-link:hover {
  color: #FF6B35;
}
/* Scout Landing Page — public pre-login view */

.scout-landing {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: #f8f9fa;
}

/* ── Left side-panel ── */
.scout-landing-side {
  width: 360px;
  flex-shrink: 0;
  background: linear-gradient(160deg, #FE4F00 0%, #c73e00 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 2.5rem 2rem;
  gap: 2rem;
  overflow-y: auto;
}

.scout-landing-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.scout-landing-logo {
  margin-bottom: 0.25rem;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.scout-landing-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.1;
}

.scout-landing-subtitle {
  font-size: 1rem;
  opacity: 0.85;
  margin: 0;
}

.scout-landing-intro {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex: 1;
}

.scout-feature {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
}

.scout-feature-icon {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.scout-feature strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.scout-feature p {
  margin: 0;
  font-size: 0.8125rem;
  opacity: 0.85;
  line-height: 1.5;
}

.scout-landing-ctas {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.scout-btn-login {
  padding: 0.75rem 1.5rem;
  background: #fff;
  color: #FE4F00;
  border: none;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.scout-btn-login:hover {
  background: #f8f8f8;
  transform: translateY(-1px);
}

.scout-btn-register {
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
  display: block;
}

.scout-btn-register:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.scout-landing-footer {
  font-size: 0.8125rem;
  opacity: 0.7;
  margin: 0;
}

.scout-landing-footer a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.scout-landing-footer a:hover {
  border-bottom-color: #fff;
}

/* ── Right chat panel ── */
.scout-chat-panel {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border-left: 1px solid #e5e7eb;
}

.scout-chat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
  color: #111827;
}

.scout-chat-logo {
  display: inline-flex;
  flex-shrink: 0;
}

.scout-chat-title {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.scout-chat-title strong {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.01em;
}

.scout-chat-subtitle {
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b7280;
}

.scout-chat-badge {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 600;
  color: #FE4F00;
  background: rgba(254, 79, 0, 0.08);
  border: 1px solid rgba(254, 79, 0, 0.2);
  border-radius: 20px;
  padding: 0.2rem 0.65rem;
}

.scout-chat-reset {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  background: transparent;
  border: 1px solid #d1d5db;
  border-radius: 20px;
  padding: 0.2rem 0.65rem;
  cursor: pointer;
  transition: all 0.15s;
}

.scout-chat-reset:hover {
  color: #111827;
  border-color: #9ca3af;
  background: #f9fafb;
}

.scout-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.scout-chat-welcome {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  color: #374151;
  line-height: 1.6;
}

.scout-chat-welcome p {
  margin: 0 0 0.5rem;
}

.scout-chat-welcome ul {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.scout-msg {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.scout-msg--user {
  flex-direction: row-reverse;
}

.scout-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #FE4F00;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.scout-msg--user .scout-msg-avatar {
  background: #e5e7eb;
  color: #374151;
}

.scout-msg-content {
  max-width: 72%;
  background: #f3f4f6;
  border-radius: 12px;
  padding: 0.625rem 0.875rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #111827;
  white-space: pre-wrap;
  word-break: break-word;
}

.scout-msg--user .scout-msg-content {
  background: #FE4F00;
  color: #fff;
  border-radius: 12px 12px 2px 12px;
}

.scout-msg--assistant .scout-msg-content {
  border-radius: 12px 12px 12px 2px;
}

/* Typing indicator */
.scout-typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 0.875rem 1rem;
  min-height: 2.5rem;
}

.scout-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9ca3af;
  animation: scoutBounce 1.4s ease-in-out infinite;
}

.scout-dot:nth-child(2) { animation-delay: 0.16s; }
.scout-dot:nth-child(3) { animation-delay: 0.32s; }

/* TQ #6490: Loading-Label damit User sieht dass Scout arbeitet (nicht kaputt) */
.scout-typing-label {
  font-size: 0.85rem;
  color: #6b7280;
  margin-right: 6px;
}

/* TQ #6490: fehlgeschlagene User-Message + Retry-Button */
.scout-msg--failed .scout-msg-content {
  border: 1px solid #fecaca;
  border-radius: 8px;
}
.scout-msg-failed-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.scout-msg-failed-hint {
  font-size: 0.8rem;
  color: #dc2626;
}
.scout-retry-btn {
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid #fe4f00;
  border-radius: 6px;
  background: #fff;
  color: #fe4f00;
  cursor: pointer;
}
.scout-retry-btn:hover:not(:disabled) {
  background: #fe4f00;
  color: #fff;
}
.scout-retry-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@keyframes scoutBounce {
  0%, 80%, 100% { transform: scale(1); opacity: 0.5; }
  40% { transform: scale(1.3); opacity: 1; }
}

.scout-chat-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #dc2626;
  font-size: 0.875rem;
}

/* Input area */
.scout-chat-input-area {
  display: flex;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-top: 1px solid #e5e7eb;
  background: #fff;
  align-items: flex-end;
}

.scout-textarea {
  flex: 1;
  resize: none;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  padding: 0.625rem 0.875rem;
  font-size: 0.9rem;
  font-family: inherit;
  line-height: 1.5;
  outline: none;
  background: #f9fafb;
  color: #111827;
  transition: border-color 0.15s;
  min-height: 2.5rem;
  max-height: 140px;
  overflow-y: auto;
}

.scout-textarea:focus {
  border-color: #FE4F00;
  background: #fff;
}

.scout-send-btn {
  height: 44px;
  padding: 0 1.1rem;
  background: #FE4F00;
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-shrink: 0;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 2px rgba(254, 79, 0, 0.25), 0 2px 6px rgba(254, 79, 0, 0.15);
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}

.scout-send-label {
  line-height: 1;
}

.scout-send-btn:hover:not(:disabled) {
  background: #e04400;
  box-shadow: 0 1px 2px rgba(254, 79, 0, 0.3), 0 4px 10px rgba(254, 79, 0, 0.25);
}

.scout-send-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.scout-send-btn:disabled {
  background: #f3f4f6;
  color: #9ca3af;
  box-shadow: none;
  cursor: default;
}

@media (max-width: 480px) {
  .scout-send-btn {
    padding: 0;
    width: 44px;
  }
  .scout-send-label {
    display: none;
  }
}

.scout-chat-hint {
  padding: 0.625rem 1.5rem;
  font-size: 0.8125rem;
  color: #9ca3af;
  border-top: 1px solid #f3f4f6;
  margin: 0;
}

.scout-chat-hint-login {
  background: none;
  border: none;
  color: #FE4F00;
  font-size: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.scout-chat-hint a {
  color: #FE4F00;
  font-weight: 600;
  text-decoration: none;
}

.scout-chat-hint a:hover,
.scout-chat-hint-login:hover {
  text-decoration: underline;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .scout-landing {
    flex-direction: column;
  }

  /* TQ #6483: Auf Mobile war das Side-Panel (Brand + Login/Register-CTAs +
     Footer) gestapelt und belegte ~1/3 der Hoehe ueber dem Chat. Jetzt: schlanke
     Top-Bar — Brand links, CTAs rechts, alles in einer Zeile. Chat dominiert. */
  .scout-landing-side {
    width: 100%;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }

  .scout-landing-brand {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
  }

  .scout-landing-logo svg {
    width: 32px;
    height: 32px;
  }

  .scout-landing-title {
    font-size: 1.1rem;
    margin: 0;
  }

  .scout-landing-subtitle {
    display: none;
  }

  .scout-landing-intro {
    display: none; /* Hide feature list on mobile to save space */
  }

  .scout-landing-ctas {
    flex-direction: row;
    gap: 0.5rem;
    width: auto;
  }

  .scout-btn-login,
  .scout-btn-register {
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
  }

  .scout-landing-footer {
    display: none; /* spar vertikalen Platz auf Mobile — chat ist wichtiger */
  }

  .scout-chat-panel {
    flex: 1;
    min-height: 0;
  }
}

/* TQ #5894 (B2C Gap-4) — Personal-Pakete Marketing-Section auf Pre-Login-Landing */
.scout-landing-plans {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0,0,0,0.08);
}
.scout-plans-heading {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a202c;
}
.scout-plans-subhead {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  color: #4a5568;
}
.scout-plans-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.scout-plan-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.7rem;
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.82rem;
  transition: border-color 0.15s, background-color 0.15s;
}
.scout-plan-card:hover {
  border-color: #fe4f00;
  background: #fff;
}
.scout-plan-name strong { color: #1a202c; }
.scout-plan-variant { color: #4a5568; font-weight: 400; font-size: 0.78rem; }
.scout-plan-price-amount {
  font-weight: 700;
  color: #fe4f00;
}
.scout-plan-price-unit {
  font-size: 0.72rem;
  color: #718096;
}

@media (max-width: 768px) {
  .scout-landing-plans {
    display: none; /* spar Platz auf Mobile; chat ist wichtiger */
  }
}

/* TQ #6893: Email-first Login auf der Landing-CTA */
.scout-email-login {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.scout-email-input {
  flex: 1 1 220px;
  min-width: 180px;
  padding: 10px 14px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  font: inherit;
}
.scout-email-input:focus {
  outline: none;
  border-color: #FE4F00;
  box-shadow: 0 0 0 3px rgba(254, 79, 0, 0.15);
}
.scout-btn-link {
  background: none;
  border: none;
  color: #667085;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  padding: 4px;
}
.scout-btn-login:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.cred-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}

.cred-modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cred-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cred-modal-header h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
}

.cred-modal-subtitle {
  font-size: 13px;
  color: #6b7280;
}

.cred-modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.cred-modal-close:hover:not(:disabled) {
  background: #f3f4f6;
  color: #1a1a1a;
}

.cred-modal-close:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.cred-modal-note {
  font-size: 12px;
  color: #6b7280;
  background: #f9fafb;
  border-left: 3px solid #FE4F00;
  padding: 8px 12px;
  border-radius: 4px;
  margin: 0;
  line-height: 1.5;
}

.cred-modal-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cred-modal-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cred-modal-field label {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}

.cred-modal-field input {
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: #1a1a1a;
}

.cred-modal-field input:focus {
  outline: none;
  border-color: #9ca3af;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.cred-modal-field input:disabled {
  background: #f9fafb;
  color: #6b7280;
}

.cred-modal-hint {
  font-size: 11px;
  color: #9ca3af;
  line-height: 1.4;
}

.cred-modal-empty {
  font-size: 13px;
  color: #6b7280;
  font-style: italic;
  margin: 0;
}

.cred-modal-error {
  font-size: 13px;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 8px 12px;
}

.cred-modal-success {
  font-size: 13px;
  color: #16a34a;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 8px 12px;
}

.cred-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
}

.cred-modal-footer-right {
  display: flex;
  gap: 8px;
}

.cred-modal-btn {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: #374151;
  font-family: inherit;
}

.cred-modal-btn:hover:not(:disabled) {
  background: #f3f4f6;
}

.cred-modal-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.cred-modal-btn--primary {
  background: #FE4F00;
  border-color: #FE4F00;
  color: #fff;
}

.cred-modal-btn--primary:hover:not(:disabled) {
  background: #e34700;
}

.cred-modal-btn--danger {
  background: #fff;
  border-color: #fecaca;
  color: #dc2626;
}

.cred-modal-btn--danger:hover:not(:disabled) {
  background: #fef2f2;
}
.aria-settings-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}

.aria-settings-block .aria-settings-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.aria-settings-block .aria-settings-card h2 {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 6px;
}

.aria-settings-block .aria-settings-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin: 0 0 14px;
  line-height: 1.5;
}

.aria-settings-block .aria-settings-note {
  font-size: 12px;
  color: #9ca3af;
}

.aria-settings-block .aria-settings-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.aria-settings-block .aria-settings-select {
  flex: 1;
  max-width: 460px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #fff;
  font-size: 14px;
  color: #1a1a1a;
  font-family: inherit;
}

.aria-settings-block .aria-settings-select:focus {
  outline: none;
  border-color: #9ca3af;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.aria-settings-block .aria-settings-success {
  margin-top: 10px;
  font-size: 13px;
  color: #16a34a;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 8px 12px;
}

.aria-settings-block .aria-settings-error {
  margin-top: 10px;
  font-size: 13px;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 8px 12px;
}

.aria-settings-block .aria-sidecar-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aria-settings-block .aria-sidecar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}

.aria-settings-block .aria-sidecar-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #FE4F00 0%, #f0a070 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.aria-settings-block .aria-sidecar-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.aria-settings-block .aria-sidecar-name {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}

.aria-settings-block .aria-sidecar-desc {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}

.aria-settings-block .aria-sidecar-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.aria-settings-block .aria-sidecar-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.aria-settings-block .aria-sidecar-badge--ok {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.aria-settings-block .aria-sidecar-badge--err {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.aria-settings-block .aria-sidecar-badge--warn {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.aria-settings-block .aria-sidecar-badge--muted {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

.aria-settings-block .aria-sidecar-tools {
  font-size: 11px;
  color: #9ca3af;
}

.aria-settings-block .aria-sidecar-edit {
  margin-left: 12px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  color: #374151;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.aria-settings-block .aria-sidecar-edit:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.aria-settings-block .aria-sidecar-test {
  margin-left: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  color: #374151;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  min-width: 70px;
}

.aria-settings-block .aria-sidecar-test:hover:not(:disabled) {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.aria-settings-block .aria-sidecar-test:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

/* Color the result state once the test has completed. */
.aria-settings-block .aria-sidecar-test[title^="IMAP-Login"],
.aria-settings-block .aria-sidecar-test[title^="WebDAV-PROPFIND"],
.aria-settings-block .aria-sidecar-test[title^="ERPNext-Auth"] {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #16a34a;
}

.aria-settings-block .aria-sidecar-test[title*="fehlgeschlagen"],
.aria-settings-block .aria-sidecar-test[title*="Fehler"],
.aria-settings-block .aria-sidecar-test[title*="falsch"] {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

/* ── Info-Banner: erklärt die zwei Credential-Ebenen ──────────────── */

.aria-settings-block .aria-settings-info {
  background: #fff7ed;
  border-color: #fed7aa;
}

.aria-settings-block .aria-settings-info h2 {
  color: #9a3412;
}

.aria-settings-block .aria-settings-info-body {
  font-size: 13px;
  color: #7c2d12;
  margin: 0 0 8px;
  line-height: 1.55;
}

.aria-settings-block .aria-settings-info-body:last-child {
  margin-bottom: 0;
}

.aria-settings-block .aria-settings-info-body code {
  background: #fff;
  border: 1px solid #fed7aa;
  border-radius: 4px;
  padding: 1px 4px;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ── Tags zur Unterscheidung Org vs. User Section ──────────────── */

.aria-settings-block .aria-settings-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #FE4F00;
  color: #fff;
  border-radius: 999px;
  vertical-align: middle;
}

.aria-settings-block .aria-settings-tag--user {
  background: #1e3a8a;
}

/* ── Persönliche Vollmacht: Quick-Add-Reihe ──────────────── */

.aria-settings-block .aria-user-add-row {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.aria-settings-block .aria-user-add-btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  background: #f3f4f6;
  border: 1px dashed #9ca3af;
  border-radius: 6px;
  color: #374151;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.aria-settings-block .aria-user-add-btn:hover {
  background: #e5e7eb;
  border-color: #6b7280;
  border-style: solid;
}

/* TQ #7976: MySoulEditor textarea + footer */
.aria-soul-textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 12px;
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
  min-height: 200px;
  box-sizing: border-box;
}

.aria-soul-textarea:focus {
  outline: none;
  border-color: #9ca3af;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.aria-soul-footer {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.aria-soul-actions {
  display: flex;
  gap: 8px;
}

.aria-soul-btn-save {
  padding: 7px 16px;
  background: #FF6B35;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

.aria-soul-btn-save:hover:not(:disabled) {
  background: #e55a25;
}

.aria-soul-btn-save:disabled {
  opacity: 0.5;
  cursor: default;
}

.aria-soul-btn-cancel {
  padding: 7px 14px;
  background: transparent;
  color: #6b7280;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  font-family: inherit;
}

.aria-soul-btn-cancel:hover {
  background: #f3f4f6;
}

/* ── Token-Bounty-Ledger (TQ #8684) ───────────────────────────────────────── */

.bounty-summary {
  display: flex;
  gap: 2rem;
  margin: 0.75rem 0 1rem;
  flex-wrap: wrap;
}

.bounty-summary-figure {
  display: flex;
  flex-direction: column;
}

.bounty-summary-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
}

.bounty-summary-label {
  font-size: 0.8rem;
  color: #6b7280;
}

.bounty-table-wrap {
  overflow-x: auto;
}

.bounty-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.bounty-table th,
.bounty-table td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
}

.bounty-table th {
  font-weight: 600;
  color: #6b7280;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.bounty-table .bounty-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bounty-note {
  color: #4b5563;
  max-width: 22rem;
}

.bounty-sev {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.bounty-sev--critical {
  background: #fee2e2;
  color: #991b1b;
}

.bounty-sev--major {
  background: #ffedd5;
  color: #9a3412;
}

.bounty-sev--minor {
  background: #fef9c3;
  color: #854d0e;
}

.bounty-sev--unknown {
  background: #f3f4f6;
  color: #4b5563;
}
/* TQ #6166 Bundle-D — Aria-Org-Settings page styles */

.aria-org-page {
  padding: 24px 32px;
  max-width: 1100px;
  margin: 0 auto;
}

.aria-org-loading,
.aria-org-noaccess {
  padding: 48px;
  text-align: center;
  color: #6b7280;
}

.aria-org-header {
  margin-bottom: 16px;
}

.aria-org-header h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
}

.aria-org-mock-banner {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 0.875rem;
  color: #92400e;
  margin-top: 8px;
}

/* Tabs */

.aria-org-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 24px;
}

.aria-org-tab-btn {
  padding: 10px 20px;
  border: none;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s;
}

.aria-org-tab-btn:hover {
  color: #111827;
}

.aria-org-tab-btn.active {
  color: #FE4F00;
  border-bottom-color: #FE4F00;
}

/* Content */

.aria-org-content {
  min-height: 300px;
}

.aria-org-tab {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.aria-org-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px 24px;
}

.aria-org-section h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
}

.aria-org-section-hint {
  margin: 0 0 16px;
  font-size: 0.875rem;
  color: #6b7280;
}

/* Tonality Radios */

.aria-org-tonality-radio {
  display: flex;
  gap: 12px;
}

.aria-org-radio {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  font-size: 0.9rem;
  transition: all 0.15s;
}

.aria-org-radio:hover {
  border-color: #9ca3af;
}

.aria-org-radio.active {
  border-color: #FE4F00;
  background: #fff7ed;
  color: #FE4F00;
  font-weight: 500;
}

.aria-org-radio input {
  display: none;
}

/* Textarea */

.aria-org-textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 12px;
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
  min-height: 120px;
}

.aria-org-textarea:focus {
  outline: none;
  border-color: #9ca3af;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.aria-org-textarea-footer {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #6b7280;
}

/* Tools List */

.aria-org-tool-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aria-org-checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.1s;
}

.aria-org-checkbox:hover {
  background: #f9fafb;
}

.aria-org-tool-id {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.8rem;
  color: #6b7280;
  min-width: 200px;
}

.aria-org-tool-label {
  font-size: 0.9rem;
  color: #111827;
}

/* Table */

.aria-org-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.aria-org-table th,
.aria-org-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.9rem;
}

.aria-org-table th {
  background: #f9fafb;
  font-weight: 500;
  color: #6b7280;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.aria-org-table-empty {
  text-align: center;
  padding: 24px;
  color: #9ca3af;
  font-style: italic;
}

.aria-org-mono {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.85rem;
}

/* Sync row */

.aria-org-sync-row {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.aria-org-sync-info {
  font-size: 0.85rem;
  color: #6b7280;
}

.aria-org-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  cursor: pointer;
}

/* GroupFolder Group */

.aria-org-gf-group {
  margin-top: 16px;
}

.aria-org-gf-group-header {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f3f4f6;
  border-radius: 4px;
  margin-bottom: 4px;
  font-size: 0.875rem;
}

.aria-org-gf-members {
  color: #6b7280;
}

/* Filter row */

.aria-org-filter-row {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.aria-org-filter-row select {
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 0.9rem;
}

/* Diff */

.aria-org-diff {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.75rem;
  background: #f9fafb;
  padding: 8px;
  border-radius: 4px;
  margin-top: 4px;
  white-space: pre-wrap;
}

/* Buttons */

.aria-org-btn-primary {
  background: #FE4F00;
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.aria-org-btn-primary:hover:not(:disabled) {
  background: #e84600;
}

.aria-org-btn-primary:disabled {
  background: #d1d5db;
  cursor: not-allowed;
}

.aria-org-btn-secondary {
  background: white;
  color: #374151;
  border: 1px solid #d1d5db;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
}

.aria-org-btn-secondary:hover:not(:disabled) {
  border-color: #9ca3af;
  background: #f9fafb;
}

.aria-org-btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Footer */

.aria-org-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 16px;
  align-items: center;
}

.aria-org-no-changes {
  color: #9ca3af;
  font-size: 0.85rem;
}

/* Toast */

.aria-org-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  animation: aria-org-toast-slide-in 0.2s ease-out;
}

@keyframes aria-org-toast-slide-in {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.aria-org-toast-ok {
  background: #ecfdf5;
  border-left: 4px solid #10b981;
  color: #065f46;
}

.aria-org-toast-err {
  background: #fef2f2;
  border-left: 4px solid #ef4444;
  color: #991b1b;
}
.page {
  max-width: 1200px;
  margin: 0 auto;
}

.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 1.75rem;
  color: #1a1a2e;
  margin: 0 0 6px 0;
}

.page-subtitle {
  color: #666;
  margin: 0;
  font-size: 0.95rem;
}

.settings-container {
  max-width: 800px;
}

.settings-section {
  background: white;
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.settings-section h2 {
  font-size: 1.1rem;
  color: #1a1a2e;
  margin: 0;
  font-weight: 600;
}

.section-badge {
  padding: 4px 10px;
  background: #e6f7e6;
  color: #1a7f1a;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 6px;
}

.section-badge.readonly {
  background: #f5f5f5;
  color: #888;
}

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

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

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

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.2s;
  background: white;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #9ca3af;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #bbb;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* Readonly Section */
.readonly-section {
  background: #fafafa;
}

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

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

.info-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.info-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-value {
  font-size: 0.95rem;
  color: #1a1a2e;
}

.info-value code {
  background: #f0f0f0;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
  font-size: 0.85rem;
  color: #666;
}

.status-value {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
}

.status-value.status-active {
  background: #e6f7e6;
  color: #1a7f1a;
}

.status-value.status-pending {
  background: #fff4e5;
  color: #cc6600;
}

.status-value.status-disabled {
  background: #f5f5f5;
  color: #888;
}

/* Settings Actions */
.settings-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
}

.btn-primary {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ff6b35;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.95rem;
}

.btn-primary:hover:not(:disabled) {
  background: #e55a2b;
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: white;
  color: #666;
  border: 1px solid #e0e0e0;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.95rem;
}

.btn-secondary:hover {
  background: #f5f5f5;
  border-color: #ccc;
}

/* TQ #8504: Einstellungen-Tabbar (Hub-Muster: ein Settings-Bereich mit Tabs). */
.settings-tabbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 1.5rem;
}

.settings-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.6rem 0.9rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.settings-tab-btn:hover {
  color: #374151;
}

.settings-tab-btn.active {
  color: #f0651f;
  border-bottom-color: #f0651f;
}

.settings-tab-content {
  min-height: 200px;
}

/* ── Bounty-Code-Einlösung (TQ #8686) ─────────────────────────────────────── */

.bounty-claim-row {
  display: flex;
  gap: 0.5rem;
  margin: 0.75rem 0 0.25rem;
  flex-wrap: wrap;
}

.bounty-claim-input {
  flex: 1 1 16rem;
  min-width: 12rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.bounty-claim-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.bounty-claim-btn {
  padding: 0.5rem 1.1rem;
  border: none;
  border-radius: 6px;
  background: #2563eb;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}

.bounty-claim-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.bounty-claim-success {
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  background: #dcfce7;
  color: #166534;
  font-weight: 600;
  font-size: 0.9rem;
}

.bounty-claim-error {
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 0.9rem;
}
.aria-chat-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100vh;
  overflow: hidden;
}

/* === Page layout with sessions sidebar === */
.aria-page-layout {
  flex: 1;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  min-height: 0;
}

.aria-page-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

/* Reuse the sessions-sidebar styles from AriaChatPanel.css but scoped under the page.
   Since the AriaChatPanel CSS is loaded by the slide-out panel, we provide
   page-specific definitions here so the Sessions sidebar also works on /eza/cortex
   without depending on the panel's CSS being loaded. */
.aria-chat-page .aria-sessions-sidebar {
  width: 240px;
  min-width: 240px;
  border-right: 1px solid #e5e7eb;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.2s ease, min-width 0.2s ease;
}

.aria-chat-page .aria-sessions-sidebar--collapsed {
  width: 0;
  min-width: 0;
  border-right: none;
}

.aria-chat-page .aria-sessions-header {
  padding: 0.75rem 0.875rem;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.aria-chat-page .aria-sessions-new-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  background: #FE4F00;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.12s;
}

.aria-chat-page .aria-sessions-new-btn:hover:not(:disabled) {
  background: #e04400;
}

.aria-chat-page .aria-sessions-new-btn:disabled {
  background: #d1d5db;
  cursor: not-allowed;
}

.aria-chat-page .aria-sessions-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0.5rem 0.75rem;
}

.aria-chat-page .aria-sessions-empty {
  padding: 0.75rem 0.5rem;
  font-size: 0.8rem;
  color: #9ca3af;
  text-align: center;
}

.aria-chat-page .aria-sessions-error {
  padding: 0.5rem 0.625rem;
  font-size: 0.75rem;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 0.4rem;
  margin: 0.25rem;
}

.aria-chat-page .aria-session-item {
  display: flex;
  align-items: stretch;
  position: relative;
  border-radius: 0.45rem;
  margin-bottom: 0.15rem;
  transition: background 0.1s;
}

.aria-chat-page .aria-session-item:hover {
  background: #f1f3f5;
}

.aria-chat-page .aria-session-item--active {
  background: #ffe9dc;
}

.aria-chat-page .aria-session-item--active:hover {
  background: #ffe1d0;
}

.aria-chat-page .aria-session-item-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.55rem 0.6rem;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  min-width: 0;
}

.aria-chat-page .aria-session-title {
  font-size: 0.825rem;
  font-weight: 500;
  color: #1a1a2e;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.aria-chat-page .aria-session-item--active .aria-session-title {
  font-weight: 600;
  color: #b03100;
}

.aria-chat-page .aria-session-date {
  font-size: 0.7rem;
  color: #6b7280;
  line-height: 1.2;
}

.aria-chat-page .aria-session-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  border-radius: 0.4rem;
  opacity: 0;
  transition: opacity 0.1s, color 0.1s, background 0.1s;
}

.aria-chat-page .aria-session-item:hover .aria-session-menu-btn,
.aria-chat-page .aria-session-item--active .aria-session-menu-btn {
  opacity: 1;
}

.aria-chat-page .aria-session-menu-btn:hover {
  color: #1a1a2e;
  background: #e5e7eb;
}

.aria-chat-page .aria-session-menu {
  position: absolute;
  right: 0.25rem;
  top: 100%;
  z-index: 5;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  min-width: 140px;
  padding: 0.25rem;
  display: flex;
  flex-direction: column;
}

.aria-chat-page .aria-session-menu button {
  background: transparent;
  border: none;
  text-align: left;
  padding: 0.45rem 0.65rem;
  font-size: 0.8rem;
  cursor: pointer;
  border-radius: 0.35rem;
  color: #374151;
}

.aria-chat-page .aria-session-menu button:hover {
  background: #f3f4f6;
}

.aria-chat-page .aria-session-menu-danger {
  color: #dc2626 !important;
}

.aria-chat-page .aria-session-menu-danger:hover {
  background: #fef2f2 !important;
}

@media (max-width: 768px) {
  .aria-chat-page .aria-sessions-sidebar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 5;
    width: 80%;
    min-width: 220px;
    box-shadow: 4px 0 16px rgba(0, 0, 0, 0.08);
  }
  .aria-chat-page .aria-sessions-sidebar--collapsed {
    transform: translateX(-100%);
    width: 80%;
    min-width: 220px;
  }
}

.aria-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
  flex-shrink: 0;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.aria-chat-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.aria-header-icon-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: #f3f4f6;
  border-radius: 8px;
  color: #4b5563;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s;
}

.aria-header-icon-btn:hover {
  background: #e5e7eb;
  color: #1a1a1a;
}

.aria-header-icon-btn--active {
  background: #FF6B35;
  color: #fff;
}

.aria-header-icon-btn--active:hover {
  background: #e85a25;
  color: #fff;
}

/* === Tab Switcher === */
.aria-tab-switcher {
  display: inline-flex;
  background: #f3f4f6;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.aria-tab {
  padding: 6px 14px;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.aria-tab:hover {
  color: #1a1a1a;
}

.aria-tab--active {
  background: #fff;
  color: #1a1a1a;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* === Settings === */
.aria-settings-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: #fafafa;
}

.aria-settings-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.aria-settings-card h2 {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 6px;
}

.aria-settings-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin: 0 0 14px;
  line-height: 1.5;
}

.aria-settings-note {
  font-size: 12px;
  color: #9ca3af;
}

.aria-settings-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.aria-settings-select {
  flex: 1;
  max-width: 460px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #fff;
  font-size: 14px;
  color: #1a1a1a;
  font-family: inherit;
}

.aria-settings-select:focus {
  outline: none;
  border-color: #9ca3af;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.aria-settings-success {
  margin-top: 10px;
  font-size: 13px;
  color: #16a34a;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 8px 12px;
}

.aria-settings-error {
  margin-top: 10px;
  font-size: 13px;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 8px 12px;
}

/* === Sidecars list === */
.aria-sidecar-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aria-sidecar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}

.aria-sidecar-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #FE4F00 0%, #f0a070 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.aria-sidecar-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.aria-sidecar-name {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}

.aria-sidecar-desc {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}

.aria-sidecar-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.aria-sidecar-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.aria-sidecar-badge--ok {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.aria-sidecar-badge--warn {
  background: #fef9c3;
  color: #b45309;
  border: 1px solid #fde68a;
}

.aria-sidecar-badge--err {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.aria-sidecar-tools {
  font-size: 11px;
  color: #9ca3af;
}

.aria-chat-header h1 {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 2px;
}

.aria-chat-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
}

.aria-new-chat-btn {
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  background: #f3f4f6;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.aria-new-chat-btn:hover {
  background: #e5e7eb;
  color: #1a1a1a;
}

.aria-chat-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.aria-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Welcome screen */

.aria-chat-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: auto;
  padding: 40px 24px;
  max-width: 480px;
}

.aria-welcome-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #FF6B35 0%, #f0a070 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: #fff;
}

.aria-chat-welcome h2 {
  font-size: 22px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 8px;
}

.aria-chat-welcome p {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
  margin: 0 0 20px;
}

.aria-welcome-examples {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.aria-welcome-examples li {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #374151;
  cursor: default;
}

/* Message bubbles */

.aria-bubble {
  display: flex;
  gap: 10px;
  max-width: 80%;
}

.aria-bubble--user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.aria-bubble--assistant {
  align-self: flex-start;
}

.aria-bubble-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.aria-bubble--user .aria-bubble-avatar {
  background: #e0e7ff;
  color: #4f46e5;
}

.aria-bubble--assistant .aria-bubble-avatar {
  background: linear-gradient(135deg, #FF6B35 0%, #f0a070 100%);
  color: #fff;
}

.aria-bubble-content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 100%;
}

.aria-bubble-content {
  background: #f3f4f6;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.6;
  color: #1a1a1a;
  white-space: pre-wrap;
  word-break: break-word;
}

.aria-bubble--user .aria-bubble-content {
  background: #FF6B35;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.aria-bubble--assistant .aria-bubble-content {
  border-bottom-left-radius: 4px;
}

/* Preview card */

.aria-preview-card {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-left: 3px solid #FF6B35;
  border-radius: 10px;
  padding: 14px 16px;
  max-width: 420px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.aria-preview-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.aria-preview-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #FF6B35 0%, #f0a070 100%);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.aria-preview-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}

.aria-preview-details {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aria-preview-details li {
  font-size: 13px;
  color: #374151;
  padding: 3px 0 3px 12px;
  border-left: 2px solid #e5e7eb;
}

.aria-preview-question {
  font-size: 13px;
  color: #6b7280;
  margin: 0 0 12px;
  line-height: 1.5;
}

.aria-preview-actions {
  display: flex;
  gap: 8px;
}

.aria-preview-btn {
  flex: 1;
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s;
}

.aria-preview-btn--cancel {
  background: #f3f4f6;
  color: #6b7280;
  border-color: #e5e7eb;
}

.aria-preview-btn--cancel:hover {
  background: #e5e7eb;
  color: #374151;
}

.aria-preview-btn--confirm {
  background: #FF6B35;
  color: #fff;
}

.aria-preview-btn--confirm:hover {
  background: #e85a25;
}

.aria-preview-result {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
}

.aria-preview-result--confirmed {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.aria-preview-result--cancelled {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

/* Confirm-Engine P3 (TQ #6981): echte API-gestuetzte Confirm-Card.
   Erbt von .aria-preview-card, gelber Akzent statt orange. */
.aria-confirm-card {
  border-left-color: #d97706;
}

.aria-confirm-card .aria-preview-icon {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
}

.aria-confirm-card code {
  font-size: 12px;
  background: #f3f4f6;
  padding: 1px 5px;
  border-radius: 4px;
}

.aria-confirm-error {
  font-size: 13px;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 6px 10px;
  margin: 0 0 10px;
}

/* Typing indicator */

.aria-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  min-width: 56px;
}

.aria-dot {
  width: 6px;
  height: 6px;
  background: #9ca3af;
  border-radius: 50%;
  animation: aria-bounce 1.2s infinite;
}

.aria-dot:nth-child(2) { animation-delay: 0.2s; }
.aria-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes aria-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
  40% { transform: translateY(-5px); opacity: 1; }
}

/* TQ #6093: Inline Status-Bar — ersetzt mehrere leere 'A'-Avatar-Bubbles
   waehrend Aria Tools sucht/aufruft. Single Element, in-place text-update.
   Identisch zu AriaChatPanel.css (Slide-out-Panel) zwecks UX-Konsistenz. */
.aria-status-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin: 0.5rem 0.25rem;
  background: #f3f4f6;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  color: #6b7280;
  font-style: italic;
  animation: aria-status-pulse 1.4s ease-in-out infinite;
}

.aria-status-spinner {
  display: inline-block;
  animation: aria-spin 2.4s linear infinite;
}

.aria-status-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes aria-status-pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

@keyframes aria-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Error */

.aria-chat-error {
  align-self: center;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
}

/* Input area */

.aria-chat-input-area {
  padding: 16px 24px 20px;
  border-top: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.aria-chat-input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 8px 8px 8px 14px;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

/* TQ #6093 (Reopen-3): Patric will dezent. Nur Border-Darken beim Focus,
   kein farbiger Ring (vorher orange wirkte wie Fehler, blauer Tint war
   zuviel). Minimaler grauer Drop-Shadow fuer Tiefe. */
.aria-chat-input-wrapper:focus-within {
  border-color: #9ca3af;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.aria-chat-textarea {
  flex: 1;
  border: none;
  background: transparent;
  resize: none;
  font-size: 14px;
  line-height: 1.5;
  color: #1a1a1a;
  outline: none;
  min-height: 24px;
  max-height: 200px;
  overflow-y: auto;
  font-family: inherit;
}

.aria-chat-textarea::placeholder {
  color: #9ca3af;
}

.aria-send-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #FF6B35;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: background 0.15s, opacity 0.15s;
  flex-shrink: 0;
}

.aria-send-btn:hover:not(:disabled) {
  background: #e85a25;
}

.aria-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* TQ #6298: Tab-Bar IN der Aria-Page (5 Tabs: Aktivitaet/Persona/Org-Defaults/
   GroupFolders/Audit-Log). Ersetzt Layout-Sidebar-Submenu. */
.aria-tabbed-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.aria-page-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 16px 0;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  flex-shrink: 0;
  overflow-x: auto;
}

.aria-page-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  padding: 8px 16px;
  font-size: 0.92rem;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.aria-page-tab-btn:hover {
  background: #f3f4f6;
  color: #111827;
}

.aria-page-tab-btn.active {
  background: #fff;
  color: #111827;
  border-color: #e5e7eb;
  border-bottom-color: #fff;
  margin-bottom: -1px;
}

/* Wenn AriaOrgSettings embedded gerendert wird, soll der Content nahtlos
   unter der Tab-Bar sitzen (kein doppelter Header/Tab-Bar). */
.aria-tabbed-page .aria-org-page--embedded {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
}

/* Chat-Container muss die restliche Hoehe ausnutzen wenn Tab-Bar oberhalb sitzt. */
.aria-tabbed-page .aria-page-layout {
  flex: 1;
  min-height: 0;
}
.infra-page {
  padding: 32px;
  max-width: 1200px;
}

/* === TQ #5340 Tab-Layout ===================================== */

.infra-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #e5e7eb;
  margin-top: 16px;
  margin-bottom: 24px;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}

.infra-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.infra-tab:hover {
  color: #1a1a1a;
}

.infra-tab.active {
  color: #FF6B35;
  border-bottom-color: #FF6B35;
}

.infra-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  padding: 2px 8px;
  background: #f3f4f6;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  color: #374151;
  font-variant-numeric: tabular-nums;
}

.infra-tab.active .infra-tab-badge {
  background: #fff5ef;
  color: #FF6B35;
}

.infra-tab-content {
  min-height: 240px;
}

/* === IaaS-Tab Empty-State === */

.infra-section-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 4px 0;
}

.infra-section-lead {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 24px 0;
}

.infra-iaas-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 48px 24px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  max-width: 520px;
  margin: 0 auto;
}

.infra-iaas-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #fff5ef;
  color: #FF6B35;
  margin-bottom: 4px;
}

.infra-iaas-empty h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

.infra-iaas-empty p {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
  line-height: 1.5;
}

.infra-iaas-package {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  background: #f9fafb;
  border-radius: 8px;
  margin-top: 12px;
  align-self: stretch;
}

.infra-iaas-package strong {
  font-size: 14px;
  color: #1a1a1a;
}

.infra-iaas-package span {
  font-size: 12px;
  color: #6b7280;
}

.infra-iaas-price {
  font-weight: 600;
  color: #FF6B35 !important;
  margin-top: 4px;
}

.infra-iaas-cta {
  margin-top: 8px;
  padding: 10px 20px;
  background: #FF6B35;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.infra-iaas-cta:hover {
  background: #f55b22;
}

/* === Mobile === */
@media (max-width: 640px) {
  .infra-page {
    padding: 20px;
  }
  .infra-tab {
    padding: 8px 12px;
    font-size: 13px;
  }
}

/* === Legacy Card-Grid (kept for backward compat, falls noch irgendwo gerendert) === */

.infra-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.infra-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.infra-card:hover {
  border-color: #FF6B35;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.infra-card-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.infra-card-disabled:hover {
  border-color: #e5e7eb;
  box-shadow: none;
  transform: none;
}

.infra-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #f3f4f6;
  color: #FF6B35;
  flex-shrink: 0;
}

.infra-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.infra-card-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

.infra-card-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
}
.select-org-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  padding: 24px;
}

.select-org-card {
  background: white;
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.card-header {
  padding: 36px 36px 28px;
  text-align: center;
  background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
  border-bottom: 1px solid #eee;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: #ff6b35;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.card-header h1 {
  font-size: 1.4rem;
  color: #1a1a2e;
  margin: 0 0 6px 0;
  font-weight: 600;
}

.card-subtitle {
  color: #888;
  margin: 0;
  font-size: 0.95rem;
}

.org-list {
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 10px;
}

.org-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: #f8f9fa;
  border: 2px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  width: 100%;
}

.org-item:hover {
  background: white;
  border-color: #ff6b35;
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.15);
  transform: translateY(-2px);
}

.org-avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #ff6b35, #e55a2b);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.org-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.org-item-name {
  font-weight: 600;
  color: #1a1a2e;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.org-item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.org-member-count {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: #888;
}

.org-role-badge {
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 0.75rem;
  font-weight: 500;
}

.org-role-badge.role-owner {
  background: linear-gradient(135deg, #ffd700, #ffb700);
  color: #5c4a00;
}

.org-role-badge.role-admin {
  background: #e8f4fd;
  color: #0066cc;
}

.org-role-badge.role-member {
  background: #f0f0f0;
  color: #666;
}

.org-item-arrow {
  color: #ccc;
  transition: all 0.2s;
  flex-shrink: 0;
}

.org-item:hover .org-item-arrow {
  color: #ff6b35;
  transform: translateX(4px);
}

/* No Organizations */
.no-orgs {
  text-align: center;
  padding: 48px 32px;
}

.no-orgs-icon {
  margin-bottom: 20px;
}

.no-orgs h2 {
  color: #1a1a2e;
  margin: 0 0 8px 0;
  font-size: 1.2rem;
}

.no-orgs p {
  margin: 8px 0;
  color: #666;
}

.no-orgs-hint {
  font-size: 0.85rem;
  color: #aaa;
  margin-top: 16px !important;
}

/* Card Footer */
.card-footer {
  padding: 16px 20px 24px;
  text-align: center;
}

.btn-logout-full {
  width: calc(100% - 40px);
  margin: 0 20px 20px;
  padding: 14px;
  background: #1a1a2e;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-logout-full:hover {
  background: #16213e;
  transform: translateY(-1px);
}

.btn-logout-link {
  display: inline-block;
  background: none;
  border: none;
  color: #888;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s;
}

.btn-logout-link:hover {
  color: #ff6b35;
}
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #f5f5f5;
}

/* Loading Screen */
.loading-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #F5F7FA;
  color: #333;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.loading-logo {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ff6b35;
  letter-spacing: -1px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid #E5E7EB;
  border-top-color: #FE4F00;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-screen p {
  font-size: 0.95rem;
  color: #666;
  margin: 0;
}

/* Global Button Styles */
button {
  font-family: inherit;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* Focus Styles */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #9ca3af;
  outline-offset: 2px;
}

/* Transition for all interactive elements */
a, button {
  transition: all 0.2s ease;
}
