/* Händlerbackend - zentrales Stylesheet */

/* login.html (scoped: nur wenn body NICHT dashboard-page ist) */
body:not(.dashboard-page) { margin: 0; min-height: 100vh; display: grid; place-items: center; background: linear-gradient(145deg, #020617, #0f172a); font: 16px system-ui,sans-serif; color: #f8fafc; }
.language-switcher { position: absolute; top: 16px; right: 16px; }
.language-switcher { display: flex; align-items: center; gap: 8px; }
.language-flag { display: inline-block; width: 18px; height: 12px; flex: 0 0 18px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.16); }
.language-flag--de { background: url('./assets/flags/de.svg') center / cover no-repeat; }
.language-flag--en { background: url('./assets/flags/gb.svg') center / cover no-repeat; }
.language-flag--es { background: url('./assets/flags/es.svg') center / cover no-repeat; }
.language-flag--it { background: url('./assets/flags/it.svg') center / cover no-repeat; }
.login-language-dropdown { position: relative; }
.login-theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 1px solid #334155; border-radius: 8px; background: #1e293b; color: #e2e8f0; cursor: pointer; }
.login-theme-toggle:hover { background: #334155; color: #ffffff; }
.language-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 11px; border: 1px solid #334155; border-radius: 8px; background: #1e293b; color: #e2e8f0; font-size: 13px; font-weight: 600; cursor: pointer; }
.language-toggle:hover { background: #334155; }
.language-menu { display: none; position: absolute; top: calc(100% + 8px); right: 0; min-width: 130px; padding: 6px; border: 1px solid #334155; border-radius: 10px; background: #1e293b; box-shadow: 0 10px 24px rgba(2, 6, 23, 0.5); }
.language-switcher.open .language-menu { display: grid; gap: 4px; }
.language-option { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; border: 0; border-radius: 7px; background: transparent; color: #cbd5e1; text-align: left; cursor: pointer; }
.language-option:hover, .language-option.active { background: #334155; color: #f8fafc; font-weight: 700; }
body:not(.dashboard-page) .panel { position: relative; width: min(520px,calc(100% - 32px)); padding: 36px 28px 28px; background: #0f172a; border: 1px solid #1e293b; border-radius: 12px; box-shadow: 0 18px 36px rgba(2, 6, 23, 0.5); }
body:not(.dashboard-page) h1 { margin-top: 0; font-size: 24px; color: #ffffff; }
body:not(.dashboard-page) label { display: block; margin: 14px 0 6px; font-size: 13px; font-weight: 700; color: #cbd5e1; }
body:not(.dashboard-page) input, .submit-button { width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid #334155; border-radius: 8px; font-size: 16px; }
body:not(.dashboard-page) input { background: #1e293b; color: #ffffff; }
body:not(.dashboard-page) input:focus { outline: none; border-color: #0f766e; box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.35); }
body:not(.dashboard-page) input:-webkit-autofill,
body:not(.dashboard-page) input:-webkit-autofill:hover,
body:not(.dashboard-page) input:-webkit-autofill:focus { -webkit-text-fill-color: #ffffff; -webkit-box-shadow: 0 0 0 1000px #1e293b inset; transition: background-color 5000s ease-in-out 0s; }
.submit-button { margin-top: 18px; background: #0f766e; color: #fff; border: 0; font-weight: 700; cursor: pointer; }
.submit-button:hover { background: #115e59; }
body:not(.dashboard-page) .error { min-height: 20px; color: #991b1b; font-size: 13px; margin-top: 12px; }

html:not(.dark) body:not(.dashboard-page) { background: linear-gradient(145deg, #e8f5f2, #f5f7fb); color: #1f2937; }
html:not(.dark) .login-theme-toggle,
html:not(.dark) .language-toggle { background: #ffffff; border-color: #cbd5e1; color: #334155; }
html:not(.dark) .login-theme-toggle:hover,
html:not(.dark) .language-toggle:hover { background: #f8fafc; color: #0f172a; }
html:not(.dark) .language-menu { background: #ffffff; border-color: #dbe4ee; box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14); }
html:not(.dark) .language-option { color: #334155; }
html:not(.dark) .language-option:hover,
html:not(.dark) .language-option.active { background: #eef2ff; color: #0f172a; }
html:not(.dark) body:not(.dashboard-page) .panel { background: #ffffff; border-color: #dbe4e8; box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08); }
html:not(.dark) body:not(.dashboard-page) h1 { color: #1f2937; }
html:not(.dark) body:not(.dashboard-page) label { color: #1f2937; }
html:not(.dark) body:not(.dashboard-page) input { background: #ffffff; border-color: #cbd5e1; color: #1f2937; }
html:not(.dark) body:not(.dashboard-page) input:-webkit-autofill,
html:not(.dark) body:not(.dashboard-page) input:-webkit-autofill:hover,
html:not(.dark) body:not(.dashboard-page) input:-webkit-autofill:focus { -webkit-text-fill-color: #1f2937; -webkit-box-shadow: 0 0 0 1000px #ffffff inset; }

/* DB-Haendler-Konfiguration.html */
:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #0f766e;
  --primary-2: #115e59;
  --warn: #b45309;
  --danger: #991b1b;
  --ok: #166534;
  --border: #e5e7eb;
}

* { box-sizing: border-box; }

body.dashboard-page {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(160deg, #eef7f5 0%, var(--bg) 45%, #eef2ff 100%);
  color: var(--text);
  min-height: 100vh;
  padding: 24px;
}

body.has-sticky-bar {
  padding-bottom: 114px;
}

.container {
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

body.dashboard-page .panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 120px;
  padding: 18px;
}

.header-actions {
  display: grid;
  justify-items: end;
  align-items: end;
  text-align: right;
  gap: 8px;
}

.central-connection {
  margin-top: 0;
  text-align: right;
  display: grid;
  gap: 4px;
}

#posBackendPage .central-connection {
  margin-top: 8px;
}

#posBackendPage .central-connection-item {
  font-size: 13px;
  color: #1f2937;
  line-height: 1.35;
}

.central-connection-title-row {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.central-connection-title {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.central-connection-item {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  line-height: 1.4;
}

.central-online-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
}

.central-online-dot.online {
  background: #16a34a;
  animation: centralPulse 1.8s ease-out infinite;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.55);
}

@keyframes centralPulse {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

.dashboard-header-navigation {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

#posBackendPage .dashboard-header-navigation {
  flex-wrap: nowrap;
  overflow: visible;
}

.dashboard-language {
  position: relative;
}

.dashboard-language-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 11px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  min-width: 62px;
  justify-content: center;
  transition: all 0.2s ease-in-out;
}

.dashboard-language-toggle:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.dashboard-language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  min-width: 150px;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  padding: 6px;
  display: none;
}

.dashboard-language-menu.is-open {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dashboard-language.open .dashboard-language-menu {
  display: block;
}

.dashboard-language-option {
  width: 100%;
  border: none;
  background: transparent;
  border-radius: 8px;
  padding: 8px 10px;
  text-align: left;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-language-option:hover,
.dashboard-language-option.active {
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 700;
}

.header-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 11px;
  background-color: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  width: auto;
  flex: 0 0 auto;
  white-space: nowrap;
}

.header-nav-btn:hover {
  background-color: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.header-nav-btn .nav-icon {
  color: #64748b;
  flex-shrink: 0;
}

.header-nav-btn:hover .nav-icon {
  color: #0f172a;
}

.language-dropdown {
  position: relative;
}

.lang-menu-content {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  min-width: 150px;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  padding: 6px;
  display: none;
}

.lang-menu-content.hidden {
  display: none;
}

.language-dropdown.open .lang-menu-content {
  display: block;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-option {
  width: 100%;
  border: none;
  background: transparent;
  border-radius: 8px;
  padding: 8px 10px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-option:hover,
.lang-option.active {
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 700;
}

body.dashboard-page h1 { margin: 0; font-size: 24px; }
.muted { color: var(--muted); font-size: 13px; }

.fee-banner {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 700;
  font-size: 14px;
}

body.dashboard-page label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
}

#posBackendPage label {
  font-weight: 600;
}

body.dashboard-page input, select, button {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 15px;
}

button {
  border: none;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

button:hover { background: var(--primary-2); }
button:focus { outline: none; }
body.dashboard-page button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px #0f766e;
}
body.dashboard-page button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { background: #9ca3af; cursor: not-allowed; }

#accessSettings [data-save-user],
#accessSettings .user-create-form button[type="submit"] {
  background: #0f766e !important;
  color: #ffffff;
}

#accessSettings [data-save-user]:hover,
#accessSettings .user-create-form button[type="submit"]:hover {
  background: #115e59 !important;
}

#accessSettings [data-save-user]:focus-visible,
#accessSettings .user-create-form button[type="submit"]:focus-visible {
  box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px #0f766e;
}

#accessSettings [data-toggle-user] {
  background: #334155 !important;
  color: #ffffff;
}

#accessSettings [data-toggle-user]:hover {
  background: #475569 !important;
}

#accessSettings [data-toggle-user]:focus-visible {
  box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px #64748b;
}

#accessSettings [data-delete-user] {
  background: #b91c1c !important;
  color: #ffffff;
}

#accessSettings [data-delete-user]:hover {
  background: #991b1b !important;
}

#accessSettings [data-delete-user]:focus-visible {
  box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px #dc2626;
}

.evm-help {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  font-family: Consolas, monospace;
}

body.dashboard-page .error {
  color: var(--danger);
  font-size: 12px;
  margin-top: 6px;
  font-weight: 700;
  min-height: 18px;
}

.ok {
  color: var(--ok);
  font-size: 13px;
  min-height: 18px;
  font-weight: 700;
}

.row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.chip {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
}

.chip.new {
  background: #fef3c7;
  color: #92400e;
}

.chip.disabled {
  background: #fee2e2;
  color: #991b1b;
}

.chain-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #fafafa;
  display: grid;
  gap: 10px;
}

.chain-title {
  font-size: 16px;
  font-weight: 800;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.chain-title .chain-switch {
  display: flex !important;
  margin-left: auto;
  margin-right: 50px;
  width: 180px;
  justify-content: center;
  flex-shrink: 0;
  align-self: center;
  align-items: center !important;
  line-height: 1;
}

.chain-title .chain-switch .switch {
  float: none !important;
  margin-top: 0 !important;
  vertical-align: middle;
}

.chain-title .chain-switch span {
  margin: 0 !important;
  line-height: 1;
}

@media (max-width: 640px) {
  .chain-title .chain-switch {
    width: 100%;
    margin: 8px 0 0;
  }
}

.chain-card > summary {
  cursor: pointer;
  list-style-position: inside;
}

.chain-card > summary::-webkit-details-marker {
  color: #64748b;
}

.token-grid {
  display: grid;
  gap: 8px;
}

.token-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  background: #ffffff;
  align-items: center;
  flex-wrap: wrap;
}

.token-item.central-disabled {
  background: #f8fafc;
  border-color: #cbd5e1;
  opacity: 0.78;
}

.token-meta {
  display: grid;
  gap: 3px;
}

.token-symbol {
  font-weight: 800;
  font-size: 15px;
}

.token-sub {
  color: var(--muted);
  font-size: 12px;
  font-family: Consolas, monospace;
  word-break: break-all;
}

.price-list-option {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: #f8fafc;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.price-list-option-text {
  display: grid;
  gap: 4px;
}

.price-list-option-title {
  font-weight: 800;
  color: var(--text);
}

.price-list-option-help {
  color: var(--muted);
  font-size: 12px;
}

.switch-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  flex-shrink: 0;
}

.switch {
  appearance: none;
  width: 42px !important;
  height: 24px !important;
  border-radius: 9999px !important;
  background: #cbd5e1;
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border: none;
  padding: 0;
  margin: 0;
}

.switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.switch:checked {
  background-color: #15803d !important;
}

.switch:checked::after {
  transform: translateX(18px);
}

.footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.secondary-link {
  display: inline-block;
  text-decoration: none;
  color: var(--primary);
  font-weight: 700;
}

.form-group {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.form-control {
  width: 100%;
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 15px;
  background: #fff;
}

.form-hint {
  color: var(--muted);
  font-size: 12px;
}

.sticky-save-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #ffffff;
  padding: 12px 20px;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sticky-save-bar.is-visible {
  opacity: 1;
  visibility: visible;
}

.sticky-save-bar .sticky-save-btn {
  width: min(100%, 420px);
  margin: 0;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.18);
}

.wallets-accordion {
  padding: 0;
}

.wallets-accordion > details > summary {
  padding: 18px;
  cursor: pointer;
  list-style-position: inside;
  font-size: 18px;
  font-weight: 800;
}

.wallets-accordion-content {
  padding: 0 18px 18px;
}

.evm-wallet-accordion {
  padding: 0;
}

.evm-wallet-accordion > details > summary {
  padding: 18px;
  cursor: pointer;
  list-style-position: inside;
  font-size: 18px;
  font-weight: 800;
}

.evm-wallet-accordion-content {
  padding: 0 18px 18px;
}

.payment-router-accordion > details > summary {
  padding: 18px;
  cursor: pointer;
  list-style-position: inside;
  font-size: 18px;
  font-weight: 800;
}

.update-window-accordion > details > summary {
  padding: 18px;
  cursor: pointer;
  list-style-position: inside;
  font-size: 18px;
  font-weight: 800;
}

.update-window-content {
  display: grid;
  gap: 12px;
  padding: 0 18px 18px;
}

.update-window-content .muted {
  margin: 0;
}

.update-window-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  max-width: 520px;
}

.update-window-fields input {
  width: 100%;
}

.payment-router-panel {
  display: grid;
  gap: 8px;
  padding: 0 18px 18px;
}

.payment-router-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.payment-router-heading .muted {
  margin: 4px 0 0;
}

.payment-router-fields {
  display: grid;
  gap: 12px;
}

.payment-router-field {
  display: grid;
  gap: 6px;
}

.payment-router-field label {
  font-weight: 700;
  color: #1f2937;
}

.payment-router-address-input[readonly] {
  background: #f1f5f9;
  color: #475569;
  cursor: not-allowed;
}

.payment-router-address-input.field-error {
  border-color: #dc2626;
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.15);
}

.router-edit-button,
.router-cancel-button {
  width: auto;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
}

.router-edit-button:hover,
.router-cancel-button:hover {
  background: #e2e8f0;
}

.router-modal[hidden] {
  display: none;
}

.router-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.router-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
}

.router-modal-content {
  position: relative;
  width: min(520px, 100%);
  padding: 20px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  color: #1f2937;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.28);
}

.router-modal-content h2 {
  margin: 0 0 12px;
  font-size: 19px;
}

.router-modal-content p {
  margin: 0 0 12px;
  line-height: 1.5;
}

.router-confirmation {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin: 16px 0 !important;
  color: #334155 !important;
  font-size: 13px !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.router-confirmation input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.router-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.router-modal-actions button {
  width: auto;
}

html.dark .payment-router-panel,
html.dark .router-modal-content {
  background: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}

html.dark .payment-router-field label {
  color: #f8fafc;
}

html.dark .router-edit-button,
html.dark .router-cancel-button,
html.dark .payment-router-address-input[readonly] {
  background: #0f172a;
  border-color: #475569;
  color: #cbd5e1;
}

html.dark .router-edit-button:hover,
html.dark .router-cancel-button:hover {
  background: #334155;
}

html.dark .router-confirmation {
  color: #cbd5e1 !important;
}

#maintenance-overlay[hidden] {
  display: none;
}

#maintenance-overlay {
  position: fixed;
  inset: 0;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.78);
  pointer-events: all;
}

#maintenance-overlay .maintenance-overlay-card {
  width: min(460px, 100%);
  padding: 32px;
  border-radius: 12px;
  background: #ffffff;
  color: #1f2937;
  text-align: center;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.32);
}

#maintenance-overlay .maintenance-hourglass {
  margin-bottom: 12px;
  font-size: 48px;
}

#maintenance-overlay .maintenance-overlay-card h2 {
  margin: 0 0 10px;
}

#maintenance-overlay .maintenance-overlay-card p {
  margin: 0;
  line-height: 1.5;
}

html.dark #maintenance-overlay .maintenance-overlay-card {
  background: #1e293b;
  color: #f8fafc;
}

.communication-accordion {
  padding: 0;
}

.communication-accordion > details > summary {
  padding: 18px;
  cursor: pointer;
  list-style-position: inside;
  font-size: 18px;
  font-weight: 800;
}

.communication-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 0 18px 18px;
}

.communication-field {
  display: grid;
  gap: 6px;
}

@media (max-width: 700px) {
  .communication-content { grid-template-columns: 1fr; }
}

/* DB-Pos-Backend.html */
.layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.amount-terminal {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #f8fafc;
  display: grid;
  gap: 12px;
}

.amount-toggle {
  width: 100%;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #ffffff;
  font-weight: 700;
}

.amount-toggle:hover {
  background: #334155;
}

#releaseBtn {
  min-height: 44px;
  padding: 12px 16px;
  border-radius: 8px;
  color: #ffffff;
  font-weight: 700;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

#releaseBtn:hover {
  background: #a34f00 !important;
}

#releaseBtn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px #f59e0b;
}

.amount-panel {
  display: none;
  gap: 12px;
}

.amount-panel.open {
  display: grid;
}

.amount-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.amount-currency {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
  min-width: 36px;
  text-align: center;
}

.amount-input-row input {
  font-size: 34px;
  font-weight: 800;
  padding: 14px 14px;
  border-radius: 10px;
  border: 2px solid #cbd5e1;
  background: #ffffff;
  text-align: right;
  letter-spacing: 0.02em;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.keypad-btn {
  min-height: 52px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
}

.keypad-btn:hover {
  background: #cbd5e1;
}

.keypad-zero {
  grid-column: 2;
}

.keypad-action {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  padding: 8px;
}

.preset-btn {
  min-height: 48px;
  border-radius: 10px;
  border: 1px solid #99f6e4;
  background: #ccfbf1;
  color: #134e4a;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.preset-btn:hover {
  background: #99f6e4;
}

.send-order-btn {
  min-height: 56px;
  font-size: 20px;
  border-radius: 8px;
  letter-spacing: 0.01em;
}

.terminal-list {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.system-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.system-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
}

button.system-pill {
  width: auto;
  cursor: pointer;
  min-height: 36px;
  padding: 6px 11px;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  border-color: #d1d5db;
}

button.system-pill:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

button.system-pill.active {
  background: #0f766e;
  color: #ffffff;
  border-color: #0f766e;
}

.terminal-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  display: grid;
  gap: 5px;
  background: #fafafa;
}

.status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.online { background: #dcfce7; color: var(--ok); }
.offline { background: #fee2e2; color: var(--danger); }

.queue-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 13px;
}

.queue-panel {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.queue-table th, .queue-table td {
  border-bottom: 1px solid var(--border);
  padding: 9px 6px;
  text-align: left;
}

.pill {
  display: inline-block;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
}

.queued { background: #fef3c7; color: var(--warn); }
.awaiting_selection { background: #fef9c3; color: #854d0e; }
.claimed { background: #dbeafe; color: #1e40af; }
.completed { background: #dcfce7; color: var(--ok); }
.cancelled { background: #fee2e2; color: var(--danger); }
.released_by_operator { background: #ffedd5; color: #9a3412; }

.queue-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.merchant-prices-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.merchant-prices-toggle:hover {
  background: transparent;
}

.merchant-prices-toggle-main {
  display: grid;
  gap: 4px;
  text-align: left;
}

.merchant-prices-toggle-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.merchant-prices-toggle-chevron {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 18px;
  flex: 0 0 auto;
  transition: transform 0.2s ease, background 0.2s ease;
}

.merchant-prices-toggle[aria-expanded="true"] .merchant-prices-toggle-chevron {
  transform: rotate(180deg);
  background: #d1fae5;
}

.merchant-prices-panel {
  display: none;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  gap: 14px;
}

.merchant-prices-panel.open {
  display: grid;
}

.merchant-prices-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.merchant-prices-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.merchant-price-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  background: #e2e8f0;
  color: #0f172a;
}

.merchant-price-pill.ok {
  background: #dcfce7;
  color: #166534;
}

.merchant-price-pill.warn {
  background: #fef3c7;
  color: #92400e;
}

.merchant-price-pill.error {
  background: #fee2e2;
  color: #991b1b;
}

.merchant-price-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.merchant-price-tab {
  width: auto;
  min-width: 110px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  font-weight: 700;
}

.merchant-price-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.merchant-price-tab.inactive {
  border-color: #fecaca;
  background: repeating-linear-gradient(135deg, #fff1f2 0, #fff1f2 7px, #ffe4e6 7px, #ffe4e6 14px);
  color: #991b1b;
}

.merchant-price-tab.active.inactive {
  background: repeating-linear-gradient(135deg, #991b1b 0, #991b1b 7px, #7f1d1d 7px, #7f1d1d 14px);
  border-color: #991b1b;
  color: #fff;
}

.merchant-price-tab-status {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.merchant-price-tab:hover {
  background: #dbeafe;
}

.merchant-price-activation-warning {
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fff1f2;
  color: #991b1b;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.merchant-price-content {
  display: grid;
  gap: 12px;
}

.merchant-price-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.merchant-price-table th,
.merchant-price-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  font-size: 15px;
}

.merchant-price-table th {
  background: #f8fafc;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 13px;
}

.merchant-price-table tbody tr:last-child td {
  border-bottom: 0;
}

.merchant-price-address {
  font-family: "Consolas", "Courier New", monospace;
  font-size: 14px;
  word-break: break-all;
  color: #334155;
}

.merchant-price-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 700;
  background: #e2e8f0;
  color: #0f172a;
}

.merchant-price-badge.source-live {
  background: #dcfce7;
  color: #166534;
}

.merchant-price-badge.source-cache {
  background: #fef3c7;
  color: #92400e;
}

.merchant-price-badge.source-provider {
  background: #dbeafe;
  color: #1d4ed8;
}

.merchant-price-badge.source-manual {
  background: #e5e7eb;
  color: #374151;
}

.merchant-price-badge.source-unknown {
  background: #f1f5f9;
  color: #475569;
}

.merchant-price-badge.activation-active {
  background: #dcfce7;
  color: #166534;
}

.merchant-price-badge.activation-chain-disabled,
.merchant-price-badge.activation-token-disabled,
.merchant-price-badge.activation-central-disabled {
  background: #fee2e2;
  color: #991b1b;
}

.merchant-price-badge.activation-unknown {
  background: #f1f5f9;
  color: #475569;
}

.merchant-price-empty {
  padding: 16px;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
}

.merchant-price-error {
  color: var(--danger);
}

.merchant-notification-banner {
  display: none;
  position: relative;
  border: 1px solid #fde68a;
  background: #fffbeb;
  border-radius: 12px;
  padding: 12px 14px;
  color: #92400e;
  font-size: 14px;
  line-height: 1.45;
}

.merchant-notification-close {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid #fcd34d;
  background: #fff7cc;
  color: #92400e;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.merchant-notification-close:hover {
  background: #fef3c7;
}

.merchant-notification-banner.open {
  display: block;
}

.merchant-notification-banner.warning {
  border-color: #fca5a5;
  background: #fff1f2;
  color: #9f1239;
}

.hidden {
  display: none !important;
}

html:not(.dark) #theme-icon-moon {
  display: block;
}

html.dark #theme-icon-moon {
  display: none !important;
}

html.dark #theme-icon-sun {
  display: block !important;
}

html.dark {
  --bg: #0f172a;
  --panel: #1e293b;
  --text: #f8fafc;
  --muted: #94a3b8;
  --border: #334155;
  background: #0f172a;
  color: #f8fafc;
}

html.dark body.dashboard-page {
  background: linear-gradient(160deg, #0f172a 0%, #111c31 45%, #172033 100%);
  color: #f8fafc;
}

html.dark body.dashboard-page .panel,
html.dark .card,
html.dark .chain-card,
html.dark .token-item,
html.dark .price-list-option,
html.dark .transactions-table-wrap,
html.dark .merchant-price-table {
  background: #1e293b;
  border-color: #334155;
}

html.dark body.dashboard-page h1,
html.dark .token-symbol,
html.dark .price-list-option-title,
html.dark .chain-title {
  color: #f8fafc;
}

html.dark .muted,
html.dark .token-sub,
html.dark .price-list-option-help,
html.dark .central-connection-item,
html.dark .central-connection-title,
html.dark body.dashboard-page label {
  color: #94a3b8;
}

html.dark .header-nav-btn,
html.dark .dashboard-language-toggle {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}

html.dark .header-nav-btn:hover,
html.dark .dashboard-language-toggle:hover {
  background: #334155;
  border-color: #475569;
  color: #f8fafc;
}

html.dark .header-nav-btn .nav-icon,
html.dark .header-nav-btn:hover .nav-icon {
  color: #f1f5f9;
}

html.dark .lang-menu-content,
html.dark .dashboard-language-menu {
  background: #1e293b;
  border-color: #334155;
}

html.dark .lang-option,
html.dark .dashboard-language-option {
  color: #cbd5e1;
}

html.dark .lang-option:hover,
html.dark .lang-option.active,
html.dark .dashboard-language-option:hover,
html.dark .dashboard-language-option.active {
  background: #334155;
  color: #f8fafc;
}

html.dark .fee-banner {
  background: #172554;
  border-color: #1d4ed8;
  color: #38bdf8;
}

html.dark body.dashboard-page input,
html.dark body.dashboard-page select,
html.dark body.dashboard-page textarea {
  background: #0f172a;
  border-color: #475569;
  color: #f8fafc;
}

html.dark .chip {
  background: #334155;
  color: #cbd5e1;
}

html.dark .token-item.central-disabled {
  background: #172033;
  border-color: #475569;
}

html.dark .sticky-save-bar {
  background: #1e293b;
  border-top: 1px solid #334155;
}

html.dark #posBackendPage .amount-terminal,
html.dark #posBackendPage .terminal-card {
  background: #0f172a;
  border-color: #334155;
}

html.dark #posBackendPage .amount-toggle {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

html.dark #posBackendPage .amount-toggle:hover {
  background: #334155;
}

html.dark #posBackendPage .amount-currency,
html.dark #posBackendPage .section-head h2,
html.dark #posBackendPage .queue-table td {
  color: #f1f5f9;
}

html.dark #posBackendPage .queue-table thead,
html.dark #posBackendPage .queue-table th {
  background: #1e293b;
  color: #cbd5e1;
  border-color: #334155;
}

html.dark #posBackendPage .queue-table td {
  border-color: #334155;
}

html.dark #posBackendPage .system-pill,
html.dark #posBackendPage button.system-pill {
  background: #334155;
  border-color: #475569;
  color: #cbd5e1;
}

html.dark #posBackendPage button.system-pill:hover {
  background: #475569;
}

html.dark #posBackendPage button.system-pill.active {
  background: #15803d;
  border-color: #15803d;
  color: #f8fafc;
}

html.dark #transaktionsPage th {
  background: #334155;
  color: #cbd5e1;
}

html.dark #transaktionsPage td {
  border-color: #334155;
  color: #f1f5f9;
}

html.dark #transaktionsPage tr {
  background: #1e293b;
}

html.dark .switch:checked {
  background-color: #15803d !important;
}

.merchant-notification-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

.merchant-notification-link {
  text-decoration: none;
  font-weight: 700;
  color: #0f766e;
  border: 1px solid #99f6e4;
  background: #ecfeff;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
}

.merchant-notification-link:hover {
  background: #cffafe;
}

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .preset-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .preset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .amount-input-row input { font-size: 28px; }
}

/* DB-Transaktionsverwaltung.html */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.container > .card:first-child {
  min-height: 120px;
  padding: 18px;
}

h2 { margin-top: 0; }

.transactions-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

table { width: 100%; min-width: 1180px; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { background: #f8fafc; }

.badge { display: inline-block; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: bold; }
.success { background: #dcfce7; color: #166534; }
.pending { background: #fef3c7; color: #92400e; }

.actions { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; width: 100%; }

#transaktionsPage button:not(.header-nav-btn) { padding: 12px 16px; border: none; border-radius: 8px; cursor: pointer; background: #0f766e; color: #ffffff; font-weight: 700; }
#transaktionsPage button:not(.header-nav-btn):hover { background: #115e59; }
#transaktionsPage button:not(.header-nav-btn):disabled { opacity: 0.6; cursor: not-allowed; }

.address { font-family: monospace; word-break: break-all; }
.export-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.export-tools button { width: auto; }
.export-notice {
  color: #ff0000;
  font-size: 16px;
  line-height: 1.35;
  text-align: center;
  max-width: none;
  flex: 1 1 320px;
}
.export-notice-backup {
  color: #0F766E;
  font-weight: 700;
}
.export-filter { display: none; align-items: center; gap: 8px; flex-wrap: wrap; }
.export-filter input { padding: 8px 10px; border-radius: 6px; border: 1px solid #cbd5e1; font-size: 14px; }

@media (max-width: 900px) {
  #transaktionsPage { padding: 16px; }
  .actions { align-items: flex-start; }
  #transaktionsPage .header-actions { width: 100%; justify-items: start; }
  #transaktionsPage .dashboard-header-navigation { justify-content: flex-start; }
  .export-tools, .export-filter { align-items: stretch; }
  .export-notice { max-width: 100%; flex-basis: 100%; }
  .export-filter input, .export-tools button { width: auto; }
}

@media (max-width: 700px) {
  #transaktionsPage .container { gap: 12px; }
  .card { padding: 14px; }
  .transactions-table-wrap { border: 0; overflow: visible; background: transparent; }
  table, thead, tbody, tr, th, td { display: block; width: 100%; min-width: 0; }
  thead { display: none; }
  tbody { display: grid; gap: 12px; }
  tr { border: 1px solid var(--border); border-radius: 12px; background: #ffffff; padding: 10px; }
  td { display: grid; grid-template-columns: minmax(110px, 38%) minmax(0, 1fr); gap: 10px; border-bottom: 1px solid #eef2f7; padding: 8px 4px; }
  td:last-child { border-bottom: 0; }
  td::before { content: attr(data-label); color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
  .address { word-break: break-all; }
}
