* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #f5f7fb;
  color: #111827;
}

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

.sidebar {
  width: 220px;
  background-color: #fdfdfd;
  padding: 24px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
}

.sidebar-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 52px;
  gap: 8px;
}

.logo-icon {
  width: 22px;
  height: 22px;
}

.logo-text-primary {
  color: #2563eb;
  margin-right: 4px;
  margin-left: 12px;
}

.logo-text-secondary {
  color: #111827;
}

.sidebar-toggle {
  border: none;
  background: transparent;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.sidebar-toggle-line {
  width: 18px;
  height: 2px;
  background-color: #9ca3af;
  border-radius: 999px;
}

.sidebar-nav {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  color: #000000;
  text-decoration: none;
  background-color: transparent;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
}

.nav-item:hover {
  background-color: #bababd;
}

.nav-item-active {
  background-color: #4f7cff;
  color: #ffffff;
}

.nav-item-active .nav-icon {
  filter: brightness(0) invert(1);
}

.nav-item-active:hover {
  background-color: #f3f4ff;
  color: #111827;
}

.nav-item-active:hover .nav-icon {
  filter: none;
}

/* Dashboard-Icon speziell steuern */
.nav-icon-dashboard {
  filter: brightness(0);
  /* schwarz, wenn Dashboard NICHT aktiv ist */
}

.nav-item-active .nav-icon-dashboard {
  filter: brightness(0) invert(1);
  /* weiß, wenn Dashboard aktiv ist */
}

.nav-item-active:hover .nav-icon-dashboard {
  filter: brightness(0);
  /* wieder schwarz beim Hover auf aktivem Dashboard */
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.alert-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.logo {
  margin-top: auto;
  align-self: center;
  width: 600px;
  height: 200px;
  transform: rotate(90deg);
}

.nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  /* Prevent footer from shrinking */
}

.footer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  background: transparent;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: #6b7280;
  cursor: pointer;
}

.footer-item:hover {
  background-color: #f3f4f6;
}

.footer-item-active {
  background-color: #4f7cff;
  color: #ffffff;
}

.footer-icon {
  width: 18px;
  height: 18px;
}

.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 64px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.language-switcher {
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #4b5563;
  cursor: pointer;
}

.flag-icon {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(90deg, #1d4ed8, #dc2626);
}

.language-text {
  font-weight: 500;
}

.language-caret {
  font-size: 10px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
}

.user-text {
  display: flex;
  flex-direction: column;
}

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

.user-role {
  font-size: 11px;
  color: #9ca3af;
}

.page {
  padding: 24px 48px 40px;
  /* Höhe an Sidebar anlehnen (Topbar 64px, Padding oben/unten 24/40) */
  min-height: calc(100vh - 64px - 24px - 40px);
  display: flex;
  flex-direction: column;
}

.page-pricing {
  padding-bottom: 28px;
  /* etwas kleinere Mindesthöhe als Default, um Scrollen zu vermeiden */
  min-height: calc(100vh - 64px - 24px - 20px);
}

.page-pricing .page-title,
.page-settings .page-title {
  margin-bottom: 24px;
}

.card {
  background-color: #f3f4ff;
  padding-top: 6px;
  background-color: #ffffff;
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  padding: 24px 18px;
  height: 100%;
}

.card-inner {
  background-color: #ffffff;
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
  padding: 32px 40px 28px;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 32px;
  height: 100%;
}

/* Haupt-Layouts innerhalb der Seite sollen sich vertikal strecken */
.page>.card,
.page>.pricing-layout,
.page>.examples-layout,
.page>.settings-card {
  flex: 1;
}

.card-left {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.tab-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 8px;
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
}

.tab-btn:hover {
  background-color: #f3f4f6;
  color: #111827;
}

.tab-btn-active {
  background-color: #e0e7ff;
  color: #4f46e5;
  font-weight: 600;
}

.tab-content {
  display: none;
  flex-direction: column;
  gap: 18px;
}

.tab-content-active {
  display: flex;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.field-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #9ca3af;
}

.field-input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background-color: #f9fafb;
  min-height: 46px;
  padding: 10px 14px;
  font-size: 13px;
  color: #111827;
}

.field-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.1);
}

.field-textarea {
  resize: none;
  min-height: 96px;
}

.field-row {
  display: flex;
  gap: 16px;
}

.field-half {
  flex: 1;
}

.button-row {
  margin-top: 8px;
}

.primary-button {
  width: 100%;
  border-radius: 10px;
  border: none;
  background: linear-gradient(90deg, #2563eb, #4f46e5);
  color: #ffffff;
  height: 48px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.primary-button:hover {
  opacity: 0.95;
}

.card-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
}

.upload-area {
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background-color: #f3f4f6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.upload-icon-circle {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.upload-icon-camera {
  width: 26px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid #9ca3af;
  position: relative;
}

.upload-icon-camera::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 4px;
  border-radius: 999px;
  background-color: #9ca3af;
}

.upload-icon-camera::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 2px solid #9ca3af;
}

.upload-link {
  border: none;
  background: transparent;
  font-size: 12px;
  color: #2563eb;
  cursor: pointer;
}

.prompt-group {
  align-self: stretch;
}

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

.prompt-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #9ca3af;
}

.prompt-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
}

.prompt-copy:hover {
  background-color: #f3f4f6;
}

.prompt-copy.copy-success {
  background-color: #e6f7ee;
}

.prompt-copy.copy-success::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #10b981;
  font-weight: bold;
  opacity: 0;
  animation: fadeInOut 2s ease;
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
  }

  20% {
    opacity: 1;
  }

  80% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

.copy-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.prompt-box {
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background-color: #f9fafb;
  height: 960px;
  padding: 16px;
  white-space: pre-wrap;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.5;
  color: #374151;
}

.prompt-placeholder {
  color: #9ca3af;
  font-style: italic;
  text-align: center;
  margin-top: 40px;
}

.examples-layout {
  display: grid;
  grid-template-columns: 260px 260px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 24px;
  min-height: 0;
  overflow: hidden;
  flex: 1;
}

.examples-column {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.examples-card {
  background-color: #ffffff;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  padding: 20px 20px 16px;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.examples-card-header {
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.examples-category-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.examples-category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 6px 4px;
  font-size: 13px;
  color: #4b5563;
}

.examples-category-item-active {
  font-weight: 600;
}

.examples-category-icon {
  width: 16px;
  height: 16px;
  margin-right: 8px;
}

.examples-category-name {
  flex: 1;
  margin-left: 4px;
}

.examples-category-count {
  font-size: 12px;
  color: #9ca3af;
}

.page-examples {
  height: calc(100vh - 64px);
  overflow: hidden;
}

.examples-column-prompts .examples-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.examples-prompt-list {
  margin-top: 8px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding-right: 4px;
  /* Space for scrollbar */
}

.examples-prompt-list::-webkit-scrollbar {
  width: 6px;
}

.examples-prompt-list::-webkit-scrollbar-track {
  background: transparent;
}

.examples-prompt-list::-webkit-scrollbar-thumb {
  background-color: #d1d5db;

}

.examples-column-categories .examples-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.examples-category-list {
  overflow-y: auto;
  flex: 1;
  padding-right: 4px;
}

.examples-category-list::-webkit-scrollbar {
  width: 6px;
}

.examples-category-list::-webkit-scrollbar-track {
  background: transparent;
}

.examples-category-list::-webkit-scrollbar-thumb {
  background-color: #d1d5db;

}

.examples-card-output {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.examples-card-output .prompt-box {
  flex: 1;
  height: auto;
}

.examples-prompt-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 0px;
  font-size: 13px;
  color: #000000;
  text-decoration: none;
  background-color: transparent;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
}

.examples-prompt-item:hover {
  background-color: #d1d3d8;
}

.examples-prompt-item-active {
  font-weight: 600;
}

.examples-card-output {
  height: 100%;
}

.pricing-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  align-items: stretch;
}

.pricing-card {
  background-color: #ffffff;
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  padding: 24px 18px;
  height: 100%;
}

.pricing-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  height: 100%;
  justify-content: space-between;
}

.pricing-plan-name {
  font-size: 24px;
  font-weight: 600;
}

.pricing-price {
  font-size: 48px;
  color: #2563eb;
  font-weight: 700;
}

.pricing-description {
  font-size: 16px;
  color: #6b7280;
  text-align: center;
}

.pricing-payments {
  display: flex;
  gap: 12px;
}

.pricing-payment-logo {
  height: 48px;
}

.pricing-button {
  margin-top: 8px;
  margin-bottom: 16px;
}

.pricing-text-card {
  background-color: #ffffff;
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  padding: 24px 18px;
  height: 15%;
}

.pricing-text-inner {
  padding: 28px 32px;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.pricing-text-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 16px;
  color: #1f2937;
}

.pricing-paragraph {
  font-size: 14px;
  line-height: 1.6;
  color: #4b5563;
  margin: 0 0 12px;
}

.pricing-text-inner>p:nth-of-type(6) {
  flex: 1;
  margin-bottom: 16px;
}

.pricing-footer-links {
  font-size: 12px;
  color: #9ca3af;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
}

.legal-links {
  margin-top: 8px;
  text-align: right;
  font-size: 11px;
  color: #6b7280;
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.legal-links a {
  color: inherit;
  text-decoration: none;
}

.legal-links-button {
  border: none;
  background: transparent;
  padding: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.legal-links-divider {
  color: inherit;
}

.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background-color: rgba(15, 23, 42, 0.35);
  z-index: 50;
}

.cookie-modal-inner {
  width: 100%;
  max-width: 720px;
  padding: 24px;
}

.cookie-modal-card {
  position: relative;
  background-color: #ffffff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(79, 70, 229, 0.28);
  padding: 24px 28px 20px;
}

.cookie-modal-title {
  margin: 0 0 18px;
  font-size: 18px;
  font-weight: 600;
}

.cookie-section {
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #4b5563;
}

.cookie-section+.cookie-section {
  margin-top: 8px;
}

.cookie-section-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cookie-section-title {
  font-weight: 600;
  color: #111827;
}

.cookie-section-helper {
  font-size: 12px;
  color: #6b7280;
}

.cookie-section-badge {
  font-size: 11px;
  color: #9ca3af;
}

.cookie-modal-footer {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cookie-modal-actions {
  display: flex;
  gap: 8px;
}

.cookie-button {
  min-width: 110px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background-color: #f9fafb;
  font-size: 13px;
  color: #4b5563;
  cursor: pointer;
}

.cookie-button-primary {
  border-color: #2563eb;
  background: linear-gradient(90deg, #2563eb, #4f46e5);
  color: #ffffff;
}

.cookie-toggle {
  width: 38px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background-color: #e5e7eb;
  position: relative;
  cursor: pointer;
  padding: 0;
}

.cookie-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background-color: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
  transition: transform 0.18s ease;
}

.cookie-toggle.cookie-toggle-on {
  background: linear-gradient(90deg, #2563eb, #4f46e5);
  border-color: #2563eb;
}

.cookie-toggle.cookie-toggle-on .cookie-toggle-knob {
  transform: translateX(14px);
}

.cookie-policy-link {
  font-size: 12px;
  color: #4f46e5;
  text-decoration: none;
}

.cookie-policy-link:hover {
  text-decoration: underline;
}

.cookie-modal-close-btn {
  position: absolute;
  top: 14px;
  right: 18px;
  border: none;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: #9ca3af;
}

.cookie-modal-close-btn:hover {
  color: #6b7280;
}

.settings-card {
  background-color: #ffffff;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  padding: 32px 32px 28px;
}

.settings-photo-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.settings-form {
  margin-top: 24px;
}

.settings-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
}

.settings-payment-section {
  margin-top: 24px;
}

.settings-payment-title {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 12px;
}

.settings-payment-logos {
  display: flex;
  gap: 16px;
}

.settings-button-row {
  margin-top: 24px;
}

.settings-button {
  max-width: 200px;
}

.page-auth {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f5f7fb;
}

.auth-wrapper {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.auth-card {
  width: 100%;
  max-width: 720px;
  background-color: #ffffff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  padding: 40px 64px 32px;
}

.auth-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
}

.auth-subtitle {
  margin: 0 0 24px;
  font-size: 13px;
  color: #6b7280;
  text-align: center;
}


/* Payment Methods Grid */
.payment-methods-grid {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.payment-option-card {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  background-color: #ffffff;
  position: relative;
}

.payment-option-card:hover {
  border-color: #b0b8c6;
  background-color: #f9fafb;
}

/* Style for when the radio inside is checked */
.payment-option-card:has(input:checked) {
  border-color: #2563eb;
  background-color: #eff6ff;
  box-shadow: 0 0 0 1px #2563eb;
}

.payment-option-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.payment-option-card img {
  max-height: 24px;
  width: auto;
  object-fit: contain;
}

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

.auth-password-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-link-button {
  border: none;
  background: transparent;
  padding: 0;
  font-size: 12px;
  color: #2563eb;
  cursor: pointer;
}

.auth-remember {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 12px;
  color: #4b5563;
}

.auth-checkbox {
  width: 14px;
  height: 14px;
}

.auth-remember-label {
  user-select: none;
}

.auth-button {
  margin-top: 8px;
}

.auth-footer-text {
  margin: 18px 0 0;
  font-size: 12px;
  color: #6b7280;
  text-align: center;
}

.auth-footer-text a {
  color: #2563eb;
  text-decoration: none;
}

.auth-footer-link {
  color: #2563eb;
  text-decoration: none;
}

.auth-footer-link:hover {
  text-decoration: underline;
}

.terms-checkbox-wrapper {
  border-radius: 8px;
  padding: 8px 10px;
  transition: box-shadow 0.2s ease, border 0.2s ease;
}

.terms-checkbox-wrapper.invalid {
  border: 1px solid #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
  background-color: rgba(220, 38, 38, 0.05);
}

.terms-checkbox-wrapper .auth-remember-label {
  color: #111827;
}

.terms-checkbox-wrapper.invalid .auth-remember-label {
  color: #b91c1c;
}

.checkbox-error-text {
  display: none;
  font-size: 13px;
  color: #b91c1c;
  margin-top: 4px;
}

.checkbox-error-text.active {
  display: block;
}

@media (max-width: 1024px) {

  /* Tablet Styles */
  .settings-card {
    padding: 24px;
  }

  .settings-section {
    grid-template-columns: 1fr;
  }

  .field-row {
    flex-direction: column;
  }

  .field-half {
    width: 100%;
  }
}

@media (max-width: 768px) {

  /* Mobile Landscape / Small Tablets */
  .settings-card {
    padding: 16px;
    margin: 16px;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .settings-button {
    padding: 10px 16px;
    font-size: 0.9rem;
  }

  /* Form fields */
  .field-input,
  .field-select {
    font-size: 16px;
    /* Verhindert automatische Zoom auf iOS */
    padding: 10px 12px;
  }

  /* Buttons */
  .save-button {
    width: 100%;
    margin-top: 16px;
  }

  /* PayPal Button Container */
  #paypal-button-container {
    width: 100%;
  }
}

@media (max-width: 480px) {

  /* Mobile Portrait */
  .app-root {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    padding: 16px;
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
  }

  .main-area {
    padding: 16px;
  }

  .settings-header h1 {
    font-size: 1.5rem;
  }

  .settings-header p {
    font-size: 0.875rem;
  }

  /* Form elements */
  .field-label {
    font-size: 0.875rem;
  }

  /* Danger Zone */
  .danger-zone {
    padding: 16px;
  }

  /* Footer links */
  .legal-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .legal-links a,
  .legal-links button {
    padding: 4px 0;
  }
}

@media (pointer: coarse) {

  .nav-item,
  .footer-item,
  .settings-button,
  button,
  [role="button"] {
    min-height: 44px;
    min-width: 44px;
  }

  input[type="checkbox"],
  input[type="radio"] {
    width: 24px;
    height: 24px;
  }
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

@media (max-width: 960px) {
  .app-root {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    height: auto;
    flex-wrap: wrap;
    gap: 16px;
  }

  .sidebar-header {
    margin-bottom: 0;
  }

  .sidebar-nav {
    margin-top: 0;
    flex-direction: row;
    gap: 8px;
    flex-wrap: wrap;
  }

  .sidebar-footer {
    flex-direction: row;
    margin-top: 0;
  }

  .nav-item,
  .footer-item {
    padding: 8px 12px;
  }

  .card-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .card-right {
    align-items: stretch;
  }
}

@media (max-width: 1100px) {
  .examples-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto minmax(400px, 1fr);
    overflow-y: auto;
  }

  .page-examples {
    height: auto;
    /* Allow full page scroll on mobile/tablet */
    overflow: visible;
  }

  .examples-column {
    height: auto;
    min-height: 300px;
  }
}

@media (max-width: 720px) {

  .auth-card {
    padding: 32px 20px 24px;
  }
}

/* Custom Modal Styles */
.custom-modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background-color: rgba(15, 23, 42, 0.45);
  z-index: 100;
  backdrop-filter: blur(2px);
}

.custom-modal-card {
  width: 100%;
  max-width: 400px;
  background-color: #ffffff;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.15);
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.custom-modal-icon {
  width: 48px;
  height: 48px;
  background-color: #eff6ff;
  color: #2563eb;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.custom-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px;
}

.custom-modal-text {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 24px;
  line-height: 1.5;
}

.custom-modal-footer {
  width: 100%;
  display: flex;
  gap: 12px;
}

.custom-modal-btn {
  flex: 1;
  height: 44px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.custom-modal-btn-primary {
  background: linear-gradient(90deg, #2563eb, #4f46e5);
  color: #ffffff;
}

.custom-modal-btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.custom-modal-btn-danger {
  background: linear-gradient(90deg, #ef4444, #dc2626);
  color: #ffffff;
}

.custom-modal-btn-danger:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.custom-modal-btn-secondary {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  color: #374151;
}

.custom-modal-btn-secondary:hover {
  background-color: #f9fafb;
  border-color: #d1d5db;
}

.danger-button {
  width: 100%;
  border-radius: 10px;
  border: none;
  background: linear-gradient(90deg, #ef4444, #dc2626);
  color: #ffffff;
  height: 48px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.danger-button:hover {
  opacity: 0.95;
}

/* Dark Modal Variant */
.custom-modal-card-dark {
  background-color: #2b2d31;
  /* Dark grey like the screenshot */
  color: #ffffff;
  max-width: 450px;
  padding: 24px;
  align-items: flex-start;
  text-align: left;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.custom-modal-header-row {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #ffffff;
  margin-bottom: 20px;
  font-weight: 500;
}

.custom-modal-url {
  font-family: monospace;
  /* Or generic sans-serif, keeping it simple */
}

.custom-modal-text-dark {
  font-size: 15px;
  color: #e5e7eb;
  margin: 0 0 24px;
  line-height: 1.5;
}

.custom-modal-btn-cyan {
  background-color: #06b6d4;
  /* Cyan color */
  color: #ffffff;
  border: none;
  font-weight: 600;
}

.custom-modal-btn-cyan:hover {
  background-color: #0891b2;
}

.custom-modal-btn-dark-grey {
  background-color: #4b5563;
  /* Dark grey button */
  color: #ffffff;
  border: none;
  font-weight: 600;
}

.custom-modal-btn-dark-grey:hover {
  background-color: #374151;
}

.custom-modal-card-dark .custom-modal-title {
  color: #ffffff;
}

.custom-modal-card-dark .custom-modal-text {
  color: #e5e7eb;
}

.tooltip-wrapper {
  position: relative;
  cursor: help;
}

.tooltip {
  position: absolute;
  bottom: 80%;
  left: 20;
  background: linear-gradient(50deg, #2563eb, #4f46e5);
  color: #ffffff;
  padding: 6px 6px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.tooltip-wrapper:hover .tooltip {
  opacity: 1;
}

/* Add to your existing CSS */
#mfa-setup-container {
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-top: 15px;
}

#mfa-setup-container .mfa-setup {
  max-width: 400px;
  margin: 0 auto;
}

#mfa-setup-container #qrcode {
  max-width: 200px;
  margin: 0 auto 20px;
  display: block;
}

#mfa-setup-container .form-group {
  margin-bottom: 15px;
}

#mfa-setup-container .form-control {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

#mfa-setup-container .btn {
  margin-top: 10px;
}