:root {
  --navy-1: #0A0F1A;
  --navy-2: #142140;
  --body-bg: #F5F5F5;
  --card-bg: #ffffff;
  --card-border: #EAEAEA;
  --text: #212121;
  --text-secondary: #616161;
  --text-muted: #9AA1AF;
  --primary: #2A5FD8;
  --primary-dark: #1e49ac;
  --danger: #C0392B;
  --card-shadow: 0 2px 1px -1px rgba(0,0,0,.2), 0 1px 1px 0 rgba(0,0,0,.14), 0 1px 3px 0 rgba(0,0,0,.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  background: var(--body-bg);
  font-family: 'Open Sans', Helvetica, Arial, sans-serif;
  color: var(--text);
}

a { color: var(--primary); }

.topbar {
  background: linear-gradient(125deg, var(--navy-1), var(--navy-2));
  color: #ffffff;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: bold;
}

.topbar img.logo { height: 22px; display: block; }

.topbar nav a {
  color: #ffffff;
  text-decoration: none;
  opacity: 0.8;
  margin-left: 22px;
  font-size: 14px;
}

.topbar nav a.active,
.topbar nav a:hover {
  opacity: 1;
  font-weight: bold;
}

.topbar .logout {
  color: #ffffff;
  opacity: 0.65;
  text-decoration: none;
  font-size: 13px;
  margin-left: 22px;
}

.nav-menu {
  position: relative;
  display: inline-block;
  margin-left: 22px;
}

.nav-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #ffffff;
  opacity: 0.8;
  font-size: 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.nav-menu-trigger::-webkit-details-marker { display: none; }
.nav-menu-trigger::after { content: '▾'; font-size: 10px; }

.nav-menu-trigger:hover,
.nav-menu-trigger.active,
.nav-menu[open] .nav-menu-trigger {
  opacity: 1;
  font-weight: bold;
}

.nav-menu-list {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  background: var(--card-bg);
  border-radius: 6px;
  box-shadow: var(--card-shadow);
  min-width: 170px;
  padding: 6px 0;
  z-index: 50;
  text-align: left;
}

.topbar .nav-menu-list a {
  display: block;
  padding: 9px 16px;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  opacity: 1;
  margin-left: 0;
  font-weight: normal;
}

.topbar .nav-menu-list a:hover { background: #f5f5f5; }
.topbar .nav-menu-list a.active { color: var(--primary); font-weight: 600; }

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 28px 24px 60px 24px;
}

.container-wide {
  max-width: 1400px;
}

h1 {
  font-size: 32px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 18px 0;
}

.card {
  background: var(--card-bg);
  border: none;
  border-radius: 4px;
  box-shadow: var(--card-shadow);
  padding: 24px;
  margin-bottom: 20px;
}

.card-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 14px 0;
}

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

.page-header h1 { margin: 0; }

.page-header-actions {
  display: flex;
  gap: 10px;
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.dash-card {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.stat-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 4px 0 12px 0;
}

.card-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.card-link:hover { text-decoration: underline; }

.quicklist {
  list-style: none;
  margin: 0 0 16px 0;
  padding: 0;
}

.quicklist li + li { border-top: 1px solid var(--card-border); }

.quicklist a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 4px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.quicklist a:hover { color: var(--primary); }
.quicklist a span { color: var(--text-muted); font-weight: 400; }

.btn {
  display: inline-block;
  background: var(--primary);
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
}

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

.btn-secondary {
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--card-border);
}

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

.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #9c2d21; }

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

.article-type-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--card-border);
  margin-bottom: 20px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}

.article-type-tab {
  display: inline-block;
  padding: 10px 2px 12px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.article-type-tab:hover { color: var(--text); }

.article-type-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.search-box input[type="text"] {
  padding: 9px 14px;
  border: 1px solid var(--card-border);
  border-radius: 100px;
  font-size: 14px;
  min-width: 260px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  overflow: hidden;
}

th, td {
  text-align: left;
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--card-border);
  white-space: nowrap;
}

th {
  background: #FAFBFC;
  color: var(--text-secondary);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

tr:last-child td { border-bottom: none; }

td.actions { text-align: right; white-space: nowrap; }

.col-description {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}
td.actions a { margin-left: 12px; font-size: 13px; text-decoration: none; }
td.actions a.danger,
td.actions .danger { color: var(--danger); text-decoration: underline; }

th.num, td.num { text-align: right; }

.sort-link {
	color: inherit;
	text-decoration: none;
	cursor: pointer;
}
.sort-link:hover { color: var(--primary); }
.sort-arrow { margin-left: 4px; font-size: 9px; }

.inline-price-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.price-input {
  width: 80px;
  padding: 6px 8px;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  text-align: right;
}

.price-input:hover { border-color: var(--text-muted); }
.price-input:focus { outline: none; border-color: var(--primary); }

.price-suffix { color: var(--text-secondary); font-size: 14px; }

.price-readonly { color: var(--text-secondary); }

.row-menu {
  position: relative;
  display: inline-block;
}

.row-menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1;
  list-style: none;
  user-select: none;
}

.row-menu-trigger::-webkit-details-marker { display: none; }
.row-menu-trigger:hover { background: #f0f1f4; color: var(--text); }
.row-menu[open] .row-menu-trigger { background: #f0f1f4; color: var(--text); }

.row-menu-list {
  position: fixed;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  box-shadow: var(--card-shadow);
  min-width: 170px;
  padding: 6px 0;
  z-index: 20;
  text-align: left;
}

.row-menu-list a,
.row-menu-list button {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 9px 16px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: none;
  border: none;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.row-menu-list a:hover,
.row-menu-list button:hover { background: #f5f5f5; }

.row-menu-list .danger-item { color: var(--danger); }
.row-menu-list .confirm-item { color: #1E7A3A; }

.article-row-pending td { background: #F1FAF3; }
.article-row-pending .price-input { background: #ffffff; }

.user-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--card-border);
}
.user-row:last-child { border-bottom: none; }

.user-avatar {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e0e0e0;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.user-info { flex: 1 1 auto; min-width: 0; }
.user-name { font-weight: 600; color: var(--text); }
.user-perms { font-size: 13px; color: var(--text-muted); }

.row-icon {
  flex: 0 0 auto;
  width: 22px;
  text-align: center;
  color: var(--text-muted);
  font-size: 16px;
}

.token-chip {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--card-border);
  background: #f5f6f8;
  color: var(--text-secondary);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}
.token-chip:hover { background: #eceef2; color: var(--text); }

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 20px;
}

form.form-card label {
  display: block;
  font-size: 13px;
  font-weight: bold;
  color: var(--text-secondary);
  margin: 14px 0 6px 0;
}

form.form-card label:first-child { margin-top: 0; }

form.form-card input[type="text"],
form.form-card input[type="email"],
form.form-card input[type="number"],
form.form-card input[type="password"],
form.form-card textarea,
form.form-card select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}

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

.form-row {
  display: flex;
  gap: 16px;
}
.form-row > div { flex: 1; }
.form-row[hidden] { display: none !important; }

.form-hint {
	  font-size: 13px;
	  color: var(--text-muted);
	  margin: 6px 0 0 0;
}
.form-hint a { color: var(--primary); }

.form-actions {
  margin-top: 22px;
  display: flex;
  gap: 10px;
}

.flash {
  background: #E7F6EC;
  color: #1E7A3A;
  border: 1px solid #BFE6CB;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 14px;
}

.flash-error {
  background: #FBEAE8;
  color: #A02E22;
  border-color: #F0C4BE;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(125deg, var(--navy-1), var(--navy-2));
}

.login-box {
	  background: #ffffff;
	  border-radius: 16px;
	  padding: 36px 32px;
	  width: 100%;
	  max-width: 380px;
	  box-shadow: 0 24px 60px -12px rgba(10, 15, 26, 0.35), var(--card-shadow);
}

.login-box img.logo { height: 26px; display: block; margin: 0 auto 18px auto; }

.login-avatar {
	  width: 54px;
	  height: 54px;
	  border-radius: 50%;
	  background: linear-gradient(125deg, var(--navy-1), var(--navy-2));
	  color: #ffffff;
	  display: flex;
	  align-items: center;
	  justify-content: center;
	  margin: 0 auto 16px auto;
}

.login-box h1 { text-align: center; font-size: 19px; margin: 0 0 4px 0; }

.login-sub {
	  text-align: center;
	  font-size: 13.5px;
	  color: var(--text-secondary);
	  margin: 0 0 22px 0;
}

.login-box button:not(.eye-toggle) { width: 100%; padding: 12px; margin-top: 4px; }

.login-field { margin-bottom: 16px; }

.login-field label {
	  display: block;
	  font-size: 13px;
	  font-weight: bold;
	  color: var(--text-secondary);
	  margin-bottom: 6px;
}

.input-icon-wrap { position: relative; display: flex; align-items: center; }

.input-icon-wrap .field-icon {
	  position: absolute;
	  left: 13px;
	  color: var(--text-muted);
	  pointer-events: none;
}

.login-field input {
	  width: 100%;
	  border: 1.5px solid var(--card-border);
	  border-radius: 10px;
	  font-family: inherit;
	  color: var(--text);
	  transition: border-color 0.15s ease;
}

.login-field input:focus { outline: none; border-color: var(--primary); }

.login-field-lg input {
	  font-size: 17px;
	  font-weight: 600;
	  padding: 14px 14px 14px 42px;
}

.login-field-sm input {
	  font-size: 14px;
	  padding: 11px 14px 11px 38px;
}

.login-field-sm .field-icon { left: 12px; }

.password-row { display: flex; align-items: center; gap: 8px; }
.password-row .input-icon-wrap { flex: 1; min-width: 0; }

.eye-toggle {
	  flex: 0 0 auto;
	  display: flex;
	  align-items: center;
	  justify-content: center;
	  width: 40px;
	  height: 40px;
	  padding: 0;
	  background: none;
	  border: 1.5px solid var(--card-border);
	  border-radius: 10px;
	  color: var(--text-muted);
	  cursor: pointer;
}

.eye-toggle:hover { background: #f0f1f4; color: var(--text); }

.help-text {
  color: var(--text-muted);
  font-size: 12.5px;
  margin-top: 6px;
}

/* ---------- Status-Badges (Rechnungen) ---------- */

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.status-entwurf   { background: #EEEFF2; color: var(--text-secondary); }
.status-versendet { background: #E5EDFC; color: var(--primary-dark); }
.status-bezahlt   { background: #E7F6EC; color: #1E7A3A; }
.status-storniert { background: #F1F1F1; color: var(--text-muted); text-decoration: line-through; }
.status-ueberfaellig { background: #FBEAE8; color: var(--danger); }

/* ---------- Status-Badges (Angebote, zusaetzlich zu obigen) ---------- */
.status-angenommen { background: #E7F6EC; color: #1E7A3A; }
.status-abgelehnt  { background: #F1F1F1; color: var(--text-muted); text-decoration: line-through; }
.status-abgelaufen { background: #FBEAE8; color: var(--danger); }

/* ---------- Finanzen (Konten/Umsaetze) ---------- */
.amount-pos { color: #1E7A3A; }
.amount-neg { color: var(--danger); }
.finanzen-total {
	  display: flex;
	  align-items: baseline;
	  gap: 10px;
	  margin-bottom: 4px;
}
.finanzen-total .stat-num { font-size: 28px; }
.status-verbunden     { background: #E7F6EC; color: #1E7A3A; }
.status-nicht-verbunden { background: #EEEFF2; color: var(--text-secondary); }
.status-lead { background: #FDF3D8; color: #8A6A0A; }

/* ---------- Rechnungsformular (Layout nach Vorbild app.lexware.de/voucher) ---------- */

fieldset.field {
  border: 1px solid var(--card-border);
  border-radius: 6px;
  margin: 0;
  padding: 0 10px 8px;
  min-width: 0;
}

fieldset.field legend {
  padding: 0 4px;
  font-size: 11.5px;
  color: var(--text-secondary);
}

fieldset.field input,
fieldset.field select,
fieldset.field textarea {
  display: block;
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  padding: 4px 2px 6px;
  box-sizing: border-box;
}

fieldset.field select { cursor: pointer; }
fieldset.field textarea { resize: vertical; min-height: 60px; }

fieldset.field:focus-within {
  border-color: var(--primary);
  border-width: 2px;
  padding: 0 9px 7px;
}

.invoice-header-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 20px;
}

.invoice-header-grid .card { margin-bottom: 0; }

.invoice-field-stack { display: flex; flex-direction: column; gap: 14px; }
.invoice-field-row { display: flex; gap: 14px; }
.invoice-field-row > fieldset { flex: 1; min-width: 0; }

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

.lex-item-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--card-border);
}
.lex-item-row:first-child { padding-top: 0; }
.lex-item-row:last-child { border-bottom: none; }

.lex-item-badge {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--navy-2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 4px;
}

.lex-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.lex-item-fields { display: flex; gap: 10px; flex-wrap: wrap; }
.lex-item-fields .f-desc { flex: 2 1 220px; }
.lex-item-fields .f-qty { flex: 0 0 80px; }
.lex-item-fields .f-unit { flex: 0 0 90px; }
.lex-item-fields .f-price { flex: 0 0 110px; }
.lex-item-fields .f-tax { flex: 0 0 80px; }

.lex-item-fields .f-qty input,
.lex-item-fields .f-price input,
.lex-item-fields .f-tax input { text-align: right; }

.lex-item-total {
  flex: 0 0 110px;
  text-align: right;
  font-weight: 700;
  padding-top: 12px;
  white-space: nowrap;
}

.lex-item-remove { margin-top: 8px; }

.row-remove-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 6px;
}
.row-remove-btn:hover { color: var(--danger); }

/* ---------- Toggle-Switch (Kundencenter, E-Rechnung o.ae.) ---------- */

.switch-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.switch {
  position: relative;
  flex: 0 0 auto;
  display: inline-block;
  width: 42px;
  height: 24px;
}
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch-track {
  position: absolute;
  inset: 0;
  background: #CBD0D8;
  border-radius: 100px;
  transition: background .15s;
  pointer-events: none;
}
.switch-track::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,.3);
  transition: transform .15s;
}
.switch input:checked + .switch-track { background: #1E7A3A; }
.switch input:checked + .switch-track::before { transform: translateX(18px); }
.switch-label { font-weight: 600; font-size: 14px; }

/* ---------- Vorteile-Liste mit Haken (Kundencenter) ---------- */

.benefit-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; }
.benefit-icon { flex: 0 0 20px; color: #1E7A3A; margin-top: 2px; }
.benefit-text strong { display: block; color: var(--text); margin-bottom: 2px; }
.benefit-text span { color: var(--text-secondary); font-size: 13.5px; }

/* ---------- Datei-Dropzone (Kundencenter AGB/Widerruf) ---------- */

.upload-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 26px 16px;
  border: 2px dashed var(--card-border);
  border-radius: 10px;
  cursor: pointer;
  color: var(--text-secondary);
  text-align: center;
  transition: border-color .15s, background .15s;
}
.upload-dropzone:hover { border-color: var(--primary); background: #F7F9FE; }
.upload-dropzone svg { color: var(--text-muted); }
.upload-dropzone .upload-main { font-size: 14px; }
.upload-dropzone .upload-main a { text-decoration: underline; }
.upload-dropzone .upload-hint { font-size: 12px; color: var(--text-muted); }
.upload-file-input { display: none; }

.uploaded-file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  margin-bottom: 14px;
}
.uploaded-file-row .file-icon { flex: 0 0 auto; color: var(--text-muted); }
.uploaded-file-row .file-name { flex: 1; min-width: 0; font-weight: 600; }

.lex-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: 6px;
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 14px;
}
.lex-add-btn:hover { background: #F0F4FE; }
.lex-add-btn .plus-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
}

.lex-totals-bar {
  background: linear-gradient(125deg, var(--navy-1), var(--navy-2));
  color: #ffffff;
  margin: 20px -24px -24px;
  padding: 20px 24px;
  border-radius: 0 0 4px 4px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.lex-totals-bar .lex-total-row { display: flex; gap: 14px; font-size: 13.5px; opacity: .8; }
.lex-totals-bar .lex-total-row span:first-child { min-width: 150px; text-align: left; }
.lex-totals-bar .lex-total-row.grand { opacity: 1; font-size: 22px; font-weight: 700; margin-top: 4px; }

/* ---------- Druckansicht ---------- */

.print-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  max-width: 1100px;
  margin: 0 auto;
}

.print-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px;
  background: #fff;
  color: #111;
  position: relative;
}

.print-layout .print-page { margin: 0; flex: 1 1 auto; min-width: 0; }

.print-sidebar {
  width: 260px;
  flex: 0 0 260px;
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  padding: 18px;
  font-size: 13px;
  color: var(--text);
}

.sidebar-block { padding: 12px 0; border-top: 1px solid var(--card-border); }
.sidebar-block:first-child { padding-top: 0; border-top: none; }
.sidebar-title { font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .3px; color: var(--text-secondary); margin-bottom: 8px; }
.sidebar-row { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.sidebar-row span { color: var(--text-secondary); }
.sidebar-row strong { text-align: right; font-weight: 600; }
.sidebar-empty { color: var(--text-muted); font-size: 12.5px; margin-bottom: 8px; }
.sidebar-paid-note { color: #1E7A3A; font-weight: 600; font-size: 12.5px; margin-top: 8px; }

.sidebar-actions { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-top: 1px solid var(--card-border); }
.sidebar-actions .btn, .sidebar-actions form { width: 100%; }
.sidebar-actions .btn-secondary { width: 100%; text-align: center; box-sizing: border-box; }
.sidebar-actions form button { width: 100%; }

.sidebar-payment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 0;
  border-bottom: 1px solid var(--card-border);
  font-size: 12.5px;
}
.sidebar-payment-row span { color: var(--text-secondary); flex: 1; min-width: 0; }
.sidebar-payment-row form { flex: 0 0 auto; }

.sidebar-payment-form { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.sidebar-payment-form input, .sidebar-payment-form select {
  padding: 6px 8px;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
}

.sidebar-subtitle { font-size: 12px; font-weight: 700; color: var(--text-secondary); margin: 12px 0 6px; }
.sidebar-subtitle:first-of-type { margin-top: 0; }
.sidebar-inline-form { display: flex; flex-direction: column; gap: 6px; }
.sidebar-inline-form input, .sidebar-inline-form textarea {
  padding: 6px 8px;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
}

@media (max-width: 900px) {
  .print-layout { flex-direction: column; }
  .print-sidebar { width: 100%; flex-basis: auto; }
}

.sidebar-icon-row { display: flex; gap: 6px; margin-bottom: 12px; }
.icon-form { display: contents; }
.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid var(--card-border);
  background: #ffffff;
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
}
.icon-btn:hover { background: #f0f1f4; color: var(--text); }
.icon-btn-danger:hover { background: #FBEAE8; color: var(--danger); }

.sidebar-duplicate-btn { width: 100%; box-sizing: border-box; text-align: center; margin-bottom: 4px; }

.print-toolbar {
	  max-width: 800px;
	  margin: 16px auto;
	  padding: 0 40px;
	  display: flex;
	  justify-content: flex-end;
	  gap: 10px;
}

.print-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 36px;
}
.print-header-brand { display: flex; align-items: center; }
.print-header-brand img { height: 34px; display: block; }
.print-header-contact { text-align: left; font-size: 12.5px; line-height: 1.6; color: #333; white-space: nowrap; }

.print-letterhead {
	  display: flex;
	  justify-content: space-between;
	  margin-bottom: 40px;
}

.print-sender-line {
	  font-size: 10.5px;
	  color: #666;
	  text-decoration: underline;
	  margin-bottom: 12px;
}

.print-recipient { font-size: 13px; line-height: 1.5; }

.print-meta-list { font-size: 13px; line-height: 1.9; }
.print-meta-row { display: flex; justify-content: flex-end; gap: 10px; }
.print-meta-label { font-weight: 700; min-width: 140px; text-align: left; }
.print-meta-value { min-width: 90px; text-align: right; }

.print-title {
	  font-size: 24px;
	  font-weight: 700;
	  margin: 30px 0 18px 0;
}

.print-intro, .print-closing { font-size: 13px; margin: 16px 0; }

.print-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; table-layout: fixed; }
.print-table th { overflow: hidden; }
.print-table th, .print-table td {
	  padding: 8px 6px;
	  font-size: 13px;
	  border-bottom: 1px solid #ddd;
	  text-align: left;
	  white-space: normal;
}
.print-table th { border-bottom: 2px solid #333; font-size: 11.5px; text-transform: uppercase; }
.print-table .num { text-align: right; }
.print-table .item-detail { color: #777; font-size: 12px; margin-top: 2px; }

.print-totals { width: 280px; margin-left: auto; font-size: 13.5px; }
.print-totals .totals-row { display: flex; justify-content: space-between; padding: 5px 0; }
.print-totals .totals-row.grand { border-top: 2px solid #333; margin-top: 6px; padding-top: 10px; font-size: 16px; font-weight: 700; }

.print-total-simple {
	  width: 280px;
	  margin-left: auto;
	  display: flex;
	  justify-content: space-between;
	  border-top: 2px solid #333;
	  padding-top: 10px;
	  font-size: 16px;
	  font-weight: 700;
	  margin-bottom: 20px;
}

.print-footer-cols {
	  margin-top: 50px;
	  padding-top: 16px;
	  border-top: 1px solid #ddd;
	  display: flex;
	  justify-content: space-between;
	  gap: 20px;
	  font-size: 11.5px;
	  color: #555;
	  line-height: 1.6;
}
.print-footer-cols > div { flex: 1; }
.print-footer-cols strong { color: #333; }
.print-footer-stacked { flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.print-footer-stacked > div { flex: none; }

.print-notes { margin: 24px 0; font-size: 13px; white-space: pre-wrap; overflow-wrap: break-word; word-break: break-word; }

/* ---------- Drucklayout: Basislayout-Varianten, Tabellen-/Fusszeilen-Galerien ---------- */

.print-header-stack { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }

.print-meta-table {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 24px;
  border-top: 1px solid #333;
  border-bottom: 1px solid #333;
  padding: 10px 0;
  margin: 24px 0;
}
.print-meta-table-title { font-size: 20px; font-weight: 700; margin-right: auto; }
.print-meta-table-col { display: flex; flex-direction: column; }
.print-meta-table-col span { color: #777; text-transform: uppercase; font-size: 9.5px; margin-bottom: 2px; letter-spacing: .3px; }
.print-meta-table-col strong { font-size: 13px; font-weight: 600; }

.print-table-bordered th, .print-table-bordered td { border: 1px solid #999; }
.print-table-striped tr:nth-child(even) { background: #F7F7F7; }

.print-total-left { margin-left: 0; margin-right: auto; }
.print-total-shaded { background: #F2F2F2; border-top: none !important; padding: 10px 14px; border-radius: 4px; }

.print-falzmarke { position: absolute; left: 0; width: 5mm; border-top: 0.25pt solid #000; }

.print-page-number { margin-top: 16px; font-size: 10px; color: #777; }
.print-page-number-left { text-align: left; }
.print-page-number-center { text-align: center; }
.print-page-number-right { text-align: right; }

.print-table .item-detail { color: #777; font-size: 12px; margin-top: 2px; }

.print-payment-boxes {
  display: flex;
  gap: 20px;
  margin: 20px 0 8px;
}
.print-payment-box {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 14px;
  font-size: 13px;
}
.print-payment-box strong { display: block; margin-bottom: 8px; }
.print-payment-box .qr-target { width: 90px; height: 90px; margin: 4px 0 8px; }
.print-payment-box .qr-target svg { display: block; width: 90px; height: 90px; }
.print-payment-hint { color: #555; font-size: 12px; }
.print-payment-link { font-size: 11px; color: #777; margin-bottom: 16px; }

@media print {
	.no-print { display: none !important; }
	body { background: #fff; }
	.print-page { padding: 0; }
}

.nav-menu-trigger-icon {
	  width: 30px;
	  height: 30px;
	  border-radius: 6px;
	  justify-content: center;
}
.nav-menu-trigger-icon::after { content: none; }
.nav-menu-trigger-icon:hover,
.nav-menu-trigger-icon.active { background: rgba(255,255,255,0.12); }

.nav-menu-settings .nav-menu-list { min-width: 220px; right: 0; left: auto; }
.topbar .nav-menu-list span.nav-menu-disabled {
	  display: block;
	  padding: 9px 16px;
	  font-size: 14px;
	  color: #b0b0b0;
	  cursor: default;
}

.settings-row {
	  display: flex;
	  flex-wrap: wrap;
	  gap: 8px 16px;
	  padding: 10px 0;
	  border-top: 1px solid var(--card-border);
}
.settings-row:first-of-type { border-top: none; padding-top: 14px; }
.settings-row span {
	  flex: 0 0 170px;
	  font-size: 11.5px;
	  font-weight: 700;
	  text-transform: uppercase;
	  letter-spacing: 0.3px;
	  color: var(--text-secondary);
}
.settings-row strong { flex: 1; min-width: 200px; font-weight: 400; color: var(--text); }

.logo-preview {
	  margin-top: 14px;
	  padding-top: 14px;
	  border-top: 1px solid var(--card-border);
}

/* ---------- Belege-Seitenleiste (analog Lexware-Belegliste) ---------- */

.belege-layout {
  display: flex;
  gap: 20px;
  align-items: stretch;
}

.belege-sidebar {
  width: 230px;
  flex: 0 0 230px;
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  padding: 16px 14px;
}

.belege-content { flex: 1; min-width: 0; }

.belege-nav-icon { flex-shrink: 0; color: var(--text-muted); }

.belege-nav-toplevel {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 8px;
  border-radius: 8px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.belege-nav-toplevel:hover { background: #f0f1f4; color: var(--primary); }
.belege-nav-toplevel.active { background: #EEF3FF; color: var(--primary); }
.belege-nav-toplevel.active .belege-nav-icon { color: var(--primary); }

.belege-nav-group-label {
  padding: 12px 8px 4px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-muted);
}

.belege-nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px 7px 20px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--text-secondary);
  text-decoration: none;
}
.belege-nav-link:hover { background: #f0f1f4; color: var(--primary); }
.belege-nav-link.active { background: #EEF3FF; color: var(--primary); font-weight: 600; }
.belege-nav-link.active .belege-nav-icon { color: var(--primary); }

.belege-nav-filter { padding-left: 8px; justify-content: space-between; }
.belege-nav-filter span { display: flex; align-items: center; gap: 9px; }

.belege-nav-badge {
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 100px;
  padding: 1px 7px;
  line-height: 1.5;
}

.belege-nav-divider { border-top: 1px solid var(--card-border); margin: 10px 4px; }

@media (max-width: 900px) {
  .belege-layout { flex-direction: column; }
  .belege-sidebar { width: 100%; flex-basis: auto; }
}

.belege-newbeleg { display: block; margin: 0 0 14px; }
.belege-newbeleg-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  opacity: 1;
  font-weight: 700;
  font-size: 13.5px;
  text-align: center;
  padding: 10px 12px;
  border-radius: 100px;
  cursor: pointer;
  list-style: none;
  box-shadow: 0 4px 10px -2px rgba(42, 95, 216, 0.45);
}
.belege-newbeleg-btn::after { content: '▾'; font-size: 10px; margin-left: 6px; }
.belege-newbeleg-btn:hover,
.belege-newbeleg[open] .belege-newbeleg-btn { background: var(--primary-dark); font-weight: 700; }
.belege-newbeleg-list {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: 6px 0;
}
.belege-newbeleg-item {
  padding: 8px 14px;
  font-size: 13.5px;
  color: var(--text);
  text-decoration: none;
  border-radius: 0;
}
a.belege-newbeleg-item:hover { background: #f5f5f5; color: var(--primary); }
.belege-newbeleg-item.is-inactive { color: var(--text-muted); cursor: not-allowed; }
.logo-preview img { max-height: 60px; max-width: 260px; display: block; }

/* ---------- Dashboard (Layout nach Vorbild app.lexware.de/dashboard) ---------- */
.page-header-actions .belege-newbeleg { display: inline-block; margin: 0; }

.dash-layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(240px, 300px) minmax(320px, 1fr);
  grid-auto-rows: min-content;
  gap: 20px;
  align-items: start;
  margin-bottom: 20px;
}
.dash-finanzen { grid-column: 1; grid-row: 1; }
.dash-posten   { grid-column: 1; grid-row: 2; }
.dash-info     { grid-column: 2; grid-row: 1; }
.dash-uebersicht { grid-column: 3; grid-row: 1 / span 2; }

@media (max-width: 900px) {
  .dash-layout { grid-template-columns: 1fr; }
  .dash-finanzen, .dash-posten, .dash-info, .dash-uebersicht { grid-column: 1; grid-row: auto; }
}

.card-title-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.card-title-row .card-title { margin: 0; }

.dash-year-label { font-size: 13px; color: var(--text-muted); }
.dash-year-select select {
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 13px;
  background: #fff;
  color: var(--text);
}

.account-list { list-style: none; margin: 0 0 14px 0; padding: 0; }
.account-row + .account-row { border-top: 1px solid var(--card-border); }
.account-row-link { display: flex; align-items: center; gap: 12px; padding: 10px 0; text-decoration: none; color: inherit; }
.account-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.account-icon-bank { background: var(--danger); }
.account-icon-paypal { background: #003087; }
.account-icon-kasse, .account-icon-sonstiges { background: var(--text-muted); }
.account-row-name { flex: 1; min-width: 0; }
.account-row-title { display: block; font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-row-sub { display: block; font-size: 12.5px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-row-amount { font-size: 14px; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.account-row-chevron { color: var(--text-muted); margin-left: 2px; }

.dash-posten-group + .dash-posten-group { margin-top: 16px; }
.dash-posten-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.dash-posten-row { display: block; padding: 6px 0; font-size: 14px; text-decoration: none; color: var(--text); }
a.dash-posten-row:hover { text-decoration: underline; }
.dash-posten-ok { color: #1E7A3A; }
.dash-posten-warn { color: var(--danger); font-weight: 600; }
.dash-posten-amount { color: var(--text-secondary); font-weight: 400; margin-left: 4px; }

.dash-info-list { list-style: none; margin: 0; padding: 0; }
.dash-info-list li + li { border-top: 1px solid var(--card-border); }
.dash-info-list a { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; text-decoration: none; color: var(--text); font-size: 14px; }
.dash-info-list a:hover { color: var(--primary); }
.dash-info-list .dash-info-num { font-weight: 700; }

.dash-stats-row { display: flex; gap: 28px; margin-bottom: 12px; flex-wrap: wrap; }
.dash-stat { font-size: 13px; color: var(--text-secondary); }
.dash-stat strong { display: block; font-size: 18px; color: var(--text); margin-top: 2px; }
.dash-stat-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dash-dot-green { background: #1E7A3A; }
.dash-dot-red { background: var(--danger); }

.dash-chart { width: 100%; height: 230px; display: block; }
.dash-chart-grid { stroke: var(--card-border); stroke-width: 1; }
.dash-chart-axis-label { font-size: 10px; fill: var(--text-muted); font-family: 'Open Sans', sans-serif; }
.dash-chart-area { fill: rgba(30, 122, 58, 0.12); }
.dash-chart-line { stroke: #1E7A3A; stroke-width: 2; }
.dash-chart-line-expense { stroke: var(--danger); stroke-width: 2; }
.dash-chart-hint { font-size: 12.5px; color: var(--text-muted); margin-top: 6px; }

/* ---------- Drucklayout-Einstellungen (Aufbau nach Vorbild app.lexware.de/salesdocgen/settings) ---------- */
.drucklayout-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.drucklayout-nav {
  width: 170px;
  flex: 0 0 170px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 20px;
}
.drucklayout-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
}
.drucklayout-nav-icon { flex-shrink: 0; }

.dl-subsection-title {
  padding-top: 16px;
  margin-top: 18px !important;
  border-top: 1px solid var(--card-border);
}
.dl-subsection-title-first { padding-top: 0; margin-top: 0 !important; border-top: none; }
.drucklayout-nav-link:hover { background: #F0F1F4; color: var(--text); }
.drucklayout-nav-link.active { color: var(--text); font-weight: 700; }

.drucklayout-preview {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.drucklayout-preview-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 100px;
  padding: 6px 14px;
  box-shadow: var(--card-shadow);
}
.drucklayout-zoom-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: #ffffff;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: var(--text);
}
.drucklayout-zoom-btn:hover { background: #F0F1F4; }
.drucklayout-preview-toolbar span { font-size: 13px; color: var(--text-secondary); min-width: 38px; text-align: center; }

.drucklayout-preview-frame {
  width: 100%;
  max-width: 760px;
  height: 78vh;
  min-height: 500px;
  overflow: auto;
  background: #EAEAEA;
  border-radius: 8px;
  display: flex;
  justify-content: center;
}
.drucklayout-preview-frame iframe {
  width: 760px;
  height: 1075px;
  flex: 0 0 auto;
  border: none;
  display: block;
  transform-origin: top center;
}

.drucklayout-settings {
  width: 360px;
  flex: 0 0 360px;
}
.drucklayout-settings .card { margin-bottom: 16px; }

.drucklayout-drag-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--card-border);
  background: #fff;
}
.drucklayout-drag-row:first-child { border-top: none; }
.drucklayout-drag-row.dragging { opacity: 0.4; }
.drucklayout-drag-handle { cursor: grab; color: var(--text-muted); flex-shrink: 0; user-select: none; display: flex; align-items: center; }
.drucklayout-drag-icon { display: block; }
.drucklayout-drag-row input[type="text"] { flex: 1; min-width: 0; }
.drucklayout-drag-row label { flex-shrink: 0; white-space: nowrap; }

/* ---------- Spaltenbreiten-Ziehgriffe (nur in drucklayout_preview.php aktiv) ---------- */
.dl-resize-handle {
  position: absolute;
  width: 10px;
  margin-left: -5px;
  cursor: col-resize;
  z-index: 20;
}
.dl-resize-handle::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--primary);
  opacity: 0;
  transition: opacity .15s;
}
.dl-resize-handle:hover::after,
.dl-resize-handle.dl-resizing::after { opacity: 1; }

@media (max-width: 1200px) {
  .drucklayout-layout { flex-direction: column; }
  .drucklayout-nav { position: static; width: 100%; flex-direction: row; flex-wrap: wrap; }
  .drucklayout-preview, .drucklayout-settings { width: 100%; flex-basis: auto; }
  .drucklayout-preview-frame { height: 60vh; }
}

/* ---------- Artikelbild (article_form.php) ---------- */
.form-hint-inline { font-size: 12px; font-weight: normal; color: var(--text-muted); }

.article-image-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.article-image-preview img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--card-border);
}
.article-image-remove {
  display: flex !important;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: normal !important;
  color: var(--text-secondary);
  margin: 0 !important;
}
.article-image-remove input { width: auto !important; }

/* ---------- Werbemails (werbeemails.php) ---------- */
.we-grid {
  display: grid;
  grid-template-columns: 280px 1fr 300px;
  gap: 20px;
  align-items: start;
}

.we-panel { display: flex; flex-direction: column; min-width: 0; }

.we-filter {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  margin-bottom: 10px;
  box-sizing: border-box;
}

.we-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 520px;
  overflow-y: auto;
}

.we-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-radius: 6px;
  cursor: pointer;
}
.we-list-item:hover { background: #F7F8FA; }
.we-list-item input[type="checkbox"] { flex-shrink: 0; width: 16px; height: 16px; }
.we-list-item-disabled { opacity: 0.5; cursor: not-allowed; }

.we-thumb {
  width: 34px;
  height: 34px;
  border-radius: 5px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--card-border);
}
.we-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: #F5F5F5;
}

.we-list-item-text { display: flex; flex-direction: column; min-width: 0; }
.we-list-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.we-list-item-sub {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.we-col-email label,
.we-panel > label {
  display: block;
  font-size: 13px;
  font-weight: bold;
  color: var(--text-secondary);
  margin: 14px 0 6px 0;
}
.we-panel > label:first-of-type { margin-top: 0; }

.we-col-email input[type="text"],
.we-panel input[type="text"]:not(.we-filter),
.we-col-email textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}
.we-col-email textarea { min-height: 90px; resize: vertical; }

.we-preview {
  margin-top: 18px;
  padding: 16px;
  background: #FAFAFA;
  border: 1px solid var(--card-border);
  border-radius: 8px;
}

.we-empty-hint { color: var(--text-muted); font-size: 13px; margin: 0; }

.we-preview-product {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  margin-bottom: 8px;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  cursor: grab;
}
.we-preview-product.we-dragging { opacity: 0.4; }
.we-drag-handle {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1;
  user-select: none;
}
.we-preview-product img,
.we-preview-product-thumb-empty {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 5px;
  flex-shrink: 0;
}
.we-preview-product-thumb-empty { background: #F5F5F5; }
.we-preview-product-body { min-width: 0; }
.we-preview-product-name { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.we-preview-product-desc { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.we-preview-product-desc-missing { color: var(--text-muted); font-style: italic; }
.we-preview-product-desc-missing a { font-style: normal; }
.we-preview-product-price { font-size: 13px; font-weight: 700; color: var(--primary); }
.we-preview-product-link { font-size: 12px; font-weight: 600; color: var(--text-secondary); }

.we-preview-signature {
  padding-top: 14px;
  margin-top: 6px;
  border-top: 1px solid var(--card-border);
  font-size: 13px;
  color: var(--text-secondary);
}
.we-preview-signature-empty { font-style: italic; color: var(--text-muted); }
.we-sig-logo { max-height: 44px; display: block; margin-bottom: 8px; }
.we-sig-edit { display: inline-block; margin-top: 10px; font-size: 12px; }

.we-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}
.we-actions .btn { width: 100%; text-align: center; box-sizing: border-box; }

@media (max-width: 1150px) {
  .we-grid { grid-template-columns: 1fr; }
  .we-list { max-height: 320px; }
}

.table-customers { table-layout: fixed; }
.table-customers th, .table-customers td { white-space: normal; word-break: break-word; }
.table-customers td.actions { white-space: nowrap; }
.table-customers th:nth-child(1), .table-customers td:nth-child(1) { width: 7%; }
.table-customers th:nth-child(2), .table-customers td:nth-child(2) { width: 19%; }
.table-customers th:nth-child(3), .table-customers td:nth-child(3) { width: 16%; }
.table-customers th:nth-child(4), .table-customers td:nth-child(4) { width: 17%; }
.table-customers th:nth-child(5), .table-customers td:nth-child(5) { width: 11%; }
.table-customers th:nth-child(6), .table-customers td:nth-child(6) { width: 13%; }
.table-customers th:nth-child(7), .table-customers td:nth-child(7) { width: 6%; }
.table-customers th:nth-child(8), .table-customers td:nth-child(8) { width: 8%; }
.table-customers th:nth-child(9), .table-customers td:nth-child(9) { width: 40px; }
/* Aktualisieren-Symbol im Finanzen-Feld (dashboard.php -> konten_sync.php) */
.sync-all-form { margin: 0; }
.icon-refresh { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--card-border); border-radius: 8px; background: transparent; color: var(--text-muted); cursor: pointer; }
.icon-refresh:hover { color: var(--primary); border-color: var(--primary); }
.icon-refresh:disabled { cursor: wait; }
.icon-refresh.is-spinning svg { animation: icon-refresh-spin 1s linear infinite; color: var(--primary); }
@keyframes icon-refresh-spin { to { transform: rotate(360deg); } }

/* ===== Umsatzliste im Lexware-Stil (finanzen_umsaetze.php) ===== */
.tx-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.tx-head h1 { margin: 0; }
.tx-head-actions { display: flex; gap: 10px; align-items: center; }
.tx-head-actions form { margin: 0; }
.tx-btn-outline, .tx-btn-primary {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px;
  border-radius: 4px; font-size: 13.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; font-family: inherit;
}
.tx-btn-outline { background: #fff; color: #1a9c5b; border: 1px solid #1a9c5b; }
.tx-btn-outline:hover { background: #eef8f2; }
.tx-btn-outline:disabled { cursor: wait; }
.tx-btn-outline.is-spinning svg { animation: icon-refresh-spin 1s linear infinite; }
.tx-btn-primary { background: #1a9c5b; color: #fff; border: 1px solid #1a9c5b; }
.tx-btn-primary:hover { background: #158048; }

.tx-subnav { display: flex; gap: 4px; border-bottom: 1px solid var(--card-border); margin-bottom: 16px; }
.tx-subnav a {
  padding: 12px 16px; font-size: 13.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-secondary); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tx-subnav a.active { color: #1a9c5b; border-bottom-color: #1a9c5b; }
.tx-subnav a:hover { color: #1a9c5b; }

.tx-card { padding: 16px 0 0 0; overflow: hidden; }

.tx-tabs { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 16px; border: 1px solid #dfe3e6; border-radius: 4px; overflow: hidden; }
.tx-tab {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-size: 16px; font-weight: 600;
  color: var(--text); text-decoration: none; background: #fff;
}
.tx-tab + .tx-tab { border-left: 1px solid #dfe3e6; }
.tx-tab:hover { background: #f7f9f8; }
.tx-tab.active { background: #eaf6ef; }
.tx-tab-icon { display: inline-flex; }
.tx-tab-icon-blue { color: #2f86c8; }
.tx-tab-icon-orange { color: #e8760f; }
.tx-tab-icon-green { color: #1a9c5b; }
.tx-badge { display: inline-block; min-width: 26px; padding: 2px 9px; border-radius: 12px; color: #fff; font-size: 13px; font-weight: 700; text-align: center; }
.tx-badge-blue { background: #2f86c8; }
.tx-badge-orange { background: #e8760f; }

.tx-filters { display: grid; grid-template-columns: 1fr 1fr 1fr 1.5fr; gap: 16px; padding: 18px 16px 8px; }
.tx-field { position: relative; display: flex; align-items: center; gap: 6px; border: 1px solid #c9ced3; border-radius: 4px; padding: 0 12px; min-height: 52px; background: #fff; margin: 0; font-weight: 400; }
.tx-field:focus-within { border-color: #1a9c5b; }
.tx-field-label { position: absolute; top: -9px; left: 10px; padding: 0 4px; background: #fff; font-size: 12px; color: var(--text-secondary); line-height: 16px; }
.tx-field select, .tx-field input { border: none; outline: none; background: transparent; width: 100%; font-size: 15px; font-family: inherit; color: var(--text); padding: 12px 0; box-shadow: none; margin: 0; }
.tx-field-range input { min-width: 0; }
.tx-range-sep { color: var(--text-muted); }

.tx-list { margin-top: 8px; }
.tx-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 150px minmax(280px, 34%); align-items: stretch; border-bottom: 1px solid #e6e8ea; min-height: 78px; }
.tx-row > div { display: flex; align-items: center; }
.tx-row-head { min-height: 48px; font-size: 14px; font-weight: 600; color: var(--text); }
.tx-row-head > div:first-child { justify-content: center; }
.tx-assign-head { padding-left: 16px; }
.tx-konto { justify-content: center; }
.tx-main { flex-direction: column; align-items: flex-start !important; justify-content: center; min-width: 0; padding: 10px 16px 10px 4px; }
.tx-title { font-size: 15px; font-weight: 600; color: var(--text); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-title a { color: inherit; text-decoration: none; }
.tx-title a:hover { text-decoration: underline; }
.tx-sub { display: flex; gap: 16px; font-size: 14px; color: var(--text-secondary); margin-top: 3px; max-width: 100%; min-width: 0; }
.tx-date { flex-shrink: 0; }
.tx-purpose { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tx-amount { justify-content: flex-end; padding-right: 18px; font-size: 17px; font-weight: 500; white-space: nowrap; color: var(--text); }
.tx-amount.neg { color: #d32f2f; }
.tx-row-head .tx-amount { font-size: 14px; font-weight: 600; }

.tx-logo { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 16px; flex-shrink: 0; }
.tx-logo-paypal { background: #0b2f86; }
.tx-logo-sparkasse { background: #e3000f; }
.tx-logo-bank { background: #5b6b7f; }
.tx-logo-other { background: #9aa1af; }

/* Zuordnungs-Spalte */
.tx-assign { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 16px; border: none; text-align: left; font-family: inherit; cursor: pointer; min-width: 0; }
.tx-assign-open { background: none; }
.tx-assign-manual { background: #fff5e6; }
.tx-assign-manual:hover { background: #ffecd1; }
.tx-assign-suggest { background: #e8f3fb; cursor: default; padding-right: 10px; }
.tx-assign-done { background: #f0f4f7; }
.tx-assign-done:hover { background: #e6edf2; }
.tx-assign-open { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; border: none; padding: 0; text-align: left; cursor: pointer; font-family: inherit; }
.tx-assign-icon { width: 44px; height: 44px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: #fff; border-radius: 3px; font-size: 22px; }
.tx-assign-icon-plus { color: #e8760f; font-weight: 400; font-size: 26px; }
.tx-assign-icon-sparkle { color: #2f86c8; }
.tx-assign-icon-cat { color: #1a9c5b; }
.tx-assign-icon-check { color: #9aa1af; font-size: 20px; }
.tx-assign-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tx-assign-title { font-size: 15px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-assign-sub { font-size: 14px; color: var(--text-secondary); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-assign-manual-label { font-size: 15px; font-weight: 600; color: #7a4a00; }
.tx-assign-count { font-size: 15px; color: var(--text-secondary); }
.tx-assign-amount { font-size: 15px; font-weight: 600; color: var(--text); white-space: nowrap; align-self: flex-end; padding-bottom: 2px; }
.tx-thumb { width: 44px; height: 52px; flex-shrink: 0; background: #fff; border: 1px solid #dde2e6; border-radius: 2px; padding: 7px 6px; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.tx-thumb i { display: block; height: 2px; background: #cfd6dc; }
.tx-thumb i:first-child { background: #e3000f; width: 45%; height: 3px; margin-bottom: 3px; }
.tx-thumb i.short { width: 60%; }
.tx-suggest-actions { display: flex; gap: 6px; flex-shrink: 0; }
.tx-suggest-actions form { margin: 0; }
.tx-mini { height: 30px; min-width: 30px; padding: 0 8px; border: 1px solid #c9d6e0; background: #fff; border-radius: 4px; cursor: pointer; font-size: 13px; color: var(--text-secondary); font-family: inherit; }
.tx-mini:hover { border-color: #9aa1af; color: var(--text); }
.tx-mini-ok { color: #fff; background: #1a9c5b; border-color: #1a9c5b; font-weight: 700; }
.tx-mini-ok:hover { background: #158048; color: #fff; }
.tx-pagination { padding: 14px 16px; }

/* Zuordnen-Fenster */
.txa-dialog { border: none; border-radius: 6px; padding: 0; width: min(640px, calc(100vw - 32px)); box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.txa-dialog::backdrop { background: rgba(10, 15, 26, .45); }
.txa-dialog-head { display: flex; align-items: flex-start; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--card-border); }
.txa-dialog-head > div:first-child { flex: 1; min-width: 0; }
.txa-dialog-title { font-size: 17px; font-weight: 700; }
.txa-dialog-sub { font-size: 13.5px; color: var(--text-secondary); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.txa-dialog-amount { font-size: 18px; font-weight: 600; white-space: nowrap; }
.txa-dialog-amount.neg { color: #d32f2f; }
.txa-close { border: none; background: none; font-size: 18px; cursor: pointer; color: var(--text-muted); }
.txa-existing { padding: 0 20px; }
.txa-existing-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--card-border); font-size: 14px; color: #1a7a47; }
.txa-tabs { display: flex; gap: 4px; padding: 10px 20px 0; border-bottom: 1px solid var(--card-border); }
.txa-tab { border: none; background: none; padding: 10px 14px; font-size: 13.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-secondary); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; font-family: inherit; }
.txa-tab.active { color: #1a9c5b; border-bottom-color: #1a9c5b; }
.txa-pane { padding: 16px 20px 20px; }
.txa-search { width: 100%; margin-bottom: 10px; }
.txa-invoices { max-height: 320px; overflow-y: auto; border: 1px solid var(--card-border); border-radius: 4px; }
.txa-inv { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid #eef0f2; cursor: pointer; font-weight: 400; margin: 0; }
.txa-inv:last-child { border-bottom: none; }
.txa-inv:hover { background: #f5f8fa; }
.txa-inv.match { background: #eaf6ef; }
.txa-inv input { margin: 0; flex-shrink: 0; width: auto; }

@media (max-width: 900px) {
  .tx-tabs { grid-template-columns: 1fr; }
  .tx-tab + .tx-tab { border-left: none; border-top: 1px solid #dfe3e6; }
  .tx-filters { grid-template-columns: 1fr 1fr; }
  .tx-row { grid-template-columns: 52px minmax(0, 1fr) auto; }
  .tx-row-head .tx-assign-head { display: none; }
  .tx-row > .tx-assign, .tx-row > button.tx-assign { grid-column: 1 / -1; }
}

/* ===== Kontenuebersicht im Lexware-Stil (finanzen_konten.php) ===== */
.kt-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; margin-bottom: 16px; }
.kt-card { padding: 20px 16px 8px; margin: 0; }
.kt-card-title { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.kt-card-text { font-size: 15px; color: var(--text-secondary); margin: 0 0 12px; }
.kt-link-row { display: flex; align-items: center; gap: 12px; padding: 22px 16px; border-top: 1px solid #e6e8ea; text-decoration: none; color: var(--text); }
.kt-link-row:hover { background: #f7f9f8; }
.kt-link-icon { display: inline-flex; }
.kt-link-label { font-size: 15px; font-weight: 600; }
.kt-chevron { margin-left: auto; font-size: 22px; color: var(--text); line-height: 1; }
.kt-total { padding-bottom: 20px; }
.kt-total-num { font-size: 34px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.kt-total-num.neg { color: #d32f2f; }
.kt-bars { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.kt-bar-row { display: grid; grid-template-columns: 40px 140px minmax(0, 1fr) 110px; align-items: center; gap: 12px; }
.kt-bar-row .tx-logo { width: 32px; height: 32px; font-size: 14px; }
.kt-bar-row .tx-logo svg { width: 17px; height: 17px; }
.kt-bar-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kt-bar-track { height: 8px; background: #eef0f2; border-radius: 4px; overflow: hidden; }
.kt-bar-fill { display: block; height: 100%; border-radius: 4px; background: #1a9c5b; }
.kt-bar-paypal { background: #0b2f86; }
.kt-bar-bank { background: #e3000f; }
.kt-bar-amount { text-align: right; font-size: 14px; font-weight: 600; white-space: nowrap; }
.kt-bar-amount.neg { color: #d32f2f; }

.kt-accounts { padding: 20px 0 0; }
.kt-accounts-head { display: flex; justify-content: space-between; align-items: center; padding: 0 16px 12px; }
.kt-add { font-size: 14px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-secondary); text-decoration: none; }
.kt-add:hover { color: #1a9c5b; }
.kt-row { display: grid; grid-template-columns: 56px minmax(160px, 1.2fr) minmax(200px, 1.3fr) minmax(170px, 1fr) 130px 48px; align-items: center; border-top: 1px solid #e6e8ea; min-height: 84px; padding: 0 0 0 16px; }
.kt-row:last-child { border-bottom: none; }
.kt-name { display: flex; flex-direction: column; text-decoration: none; min-width: 0; }
.kt-name-title { font-size: 17px; font-weight: 600; color: var(--text); }
.kt-name:hover .kt-name-title { text-decoration: underline; }
.kt-name-sub { font-size: 14px; color: var(--text-secondary); margin-top: 2px; }
.kt-bank { display: flex; flex-direction: column; font-size: 14px; color: var(--text); gap: 2px; min-width: 0; }
.kt-iban { display: inline-flex; align-items: center; gap: 6px; }
.kt-copy { border: none; background: none; padding: 2px; cursor: pointer; color: var(--text-secondary); display: inline-flex; }
.kt-copy:hover, .kt-copy.copied { color: #1a9c5b; }
.kt-status { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.kt-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 12px; font-size: 13px; font-weight: 600; color: #fff; }
.kt-pill-ok { background: #1a9c5b; }
.kt-pill-warn { background: #e8760f; }
.kt-pill-manual { background: #9aa1af; }
.kt-updated { font-size: 13.5px; color: var(--text-secondary); }
.kt-balance { text-align: right; font-size: 18px; font-weight: 600; white-space: nowrap; }
.kt-balance.neg { color: #d32f2f; }
.kt-menu { display: flex; justify-content: center; }

@media (max-width: 1000px) {
  .kt-top { grid-template-columns: 1fr; }
  .kt-row { grid-template-columns: 52px minmax(0, 1fr) auto 40px; row-gap: 6px; padding: 12px 0 12px 16px; }
  .kt-bank, .kt-status { grid-column: 2 / 3; }
  .kt-balance { grid-column: 3; grid-row: 1; }
  .kt-menu { grid-column: 4; grid-row: 1; }
  .kt-bar-row { grid-template-columns: 36px minmax(0, 1fr) 100px; }
  .kt-bar-track { display: none; }
}

/* Konto-Logos (txa_account_logo) im Finanzen-Feld des Dashboards */
.account-row .tx-logo { width: 32px; height: 32px; font-size: 14px; }
.account-row .tx-logo svg { width: 17px; height: 17px; }

/* ===== Abos (abos.php) ===== */
.abo-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.abo-stat { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; margin: 0; }
.abo-stat-label { font-size: 13px; color: var(--text-secondary); }
.abo-stat-num { font-size: 24px; font-weight: 600; color: var(--text); }
.abo-error { font-size: 12px; color: #b35c00; margin-top: 3px; }
@media (max-width: 900px) { .abo-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.abo-toolbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.abo-toolbar .search-box { margin: 0; min-width: 260px; }
.abo-tabs { display: flex; gap: 22px; flex-wrap: wrap; }
.abo-tab { font-size: 14px; color: var(--text-secondary); text-decoration: none; padding: 6px 2px; border-bottom: 2px solid transparent; }
.abo-tab span { color: var(--text-muted); margin-left: 3px; }
.abo-tab.active { color: #e8760f; border-bottom-color: #e8760f; font-weight: 600; }
.abo-status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; white-space: nowrap; }
.abo-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #9aa1af; }
.abo-status-aktiv::before { background: #1a9c5b; }
.abo-status-pausiert::before { background: #e8760f; }
.abo-status-beendet::before { background: #555; }
.abo-email { display: inline-block; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

/* ===== Cron Job (einstellungen_cron.php) ===== */
.cron-facts { width: 100%; margin-top: 8px; }
.cron-facts th { width: 220px; text-align: left; vertical-align: top; color: var(--text-secondary); font-weight: 600; }
.cron-facts td { vertical-align: top; }
.cron-url { display: inline-block; background: #f3f4f6; padding: 4px 8px; border-radius: 4px; font-size: 13px; margin-right: 8px; word-break: break-all; }
.cron-output { margin: 0; white-space: pre-wrap; font-family: inherit; font-size: 12.5px; color: var(--text-secondary); max-width: 520px; }

/* ===== GoBD: Festschreibung + Protokollierung ===== */
.lock-note { margin: 10px 0; padding: 8px 10px; background: #f3f4f6; border-radius: 8px; font-size: 13px; color: var(--text-secondary); }
.lock-icon { font-size: 12px; opacity: .7; }
.lock-rules { margin: 8px 0 0; padding-left: 20px; line-height: 1.6; }
.history-row { padding: 6px 0; border-bottom: 1px solid var(--card-border); font-size: 13px; }
.history-row:last-child { border-bottom: none; }
.history-meta { color: var(--text-secondary); font-size: 12px; }
.audit-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.audit-filter input[type="text"] { flex: 1; min-width: 200px; }
.audit-changes { margin: 4px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--text-secondary); }
.audit-data summary { cursor: pointer; font-size: 12.5px; color: var(--text-secondary); }
.audit-data pre { max-width: 560px; max-height: 300px; overflow: auto; font-size: 11.5px; background: #f3f4f6; padding: 8px; border-radius: 6px; }
.audit-pager { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.print-flash { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.print-flash:empty { display: none; }
.protokoll-tabs { margin: 0 0 18px; border-bottom: 1px solid var(--card-border); }

/* ===== Erweiterungen (einstellungen_erweiterungen.php), Aufbau wie Lexware-Add-ons ===== */
.ext-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ext-missing { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-secondary); text-decoration: none; }
.ext-missing:hover { color: var(--primary); }
.ext-tabs .abo-tab { text-transform: uppercase; font-size: 13px; font-weight: 700; letter-spacing: .03em; padding: 10px 16px; }
.ext-tabs .abo-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.ext-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 16px; }
.ext-search { margin: 0; flex: 0 1 320px; }
.ext-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ext-chip { border: 1px solid var(--card-border); background: #fff; border-radius: 16px; padding: 6px 14px; font-size: 13px; font-family: inherit; color: var(--text-secondary); cursor: pointer; }
.ext-chip:hover { border-color: #c9ced6; }
.ext-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.ext-section { margin-bottom: 26px; }
.ext-section-title { font-size: 17px; font-weight: 600; margin: 8px 0 12px; }
.ext-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.ext-card { display: flex; flex-direction: column; background: var(--card-bg); border-radius: 4px; box-shadow: var(--card-shadow); text-decoration: none; color: inherit; padding: 20px 20px 0; transition: box-shadow .15s, transform .15s; }
.ext-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.14); transform: translateY(-2px); }
.ext-card[hidden] { display: none; }
.ext-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.ext-logo { width: 56px; height: 56px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--brand, #2A5FD8) 10%, #fff); }
.ext-logo svg { width: 32px; height: 32px; }
.ext-logo-lg { width: 84px; height: 84px; border-radius: 16px; flex: 0 0 84px; }
.ext-logo-lg svg { width: 48px; height: 48px; }
/* WooCommerce-Logo ist ein breiter Schriftzug - groesser darstellen */
.ext-logo svg.ext-icon-woocommerce { width: 48px; height: 48px; }
.ext-logo-lg svg.ext-icon-woocommerce { width: 70px; height: 70px; }
.ext-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
.ext-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #c3c8d0; }
.ext-status-ok { color: #1a9c5b; }
.ext-status-ok::before { background: #1a9c5b; }
.ext-status-warn { color: #e8760f; }
.ext-status-warn::before { background: #e8760f; }
.ext-title { font-weight: 700; font-size: 16px; }
.ext-category { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin: 2px 0 8px; }
.ext-desc { font-size: 13.5px; color: var(--text-secondary); line-height: 1.5; flex: 1; }
.ext-card-footer { margin: 16px -20px 0; padding: 12px 20px; border-top: 1px solid var(--card-border); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--primary); }
.ext-back { margin: 0 0 12px; }
.ext-hero { display: flex; gap: 22px; align-items: center; }
.ext-hero-title { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 22px; font-weight: 700; }
.ext-meta { margin-top: 10px; font-size: 13px; color: var(--text-secondary); }
.ext-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; align-items: start; }
.ext-detail-grid .card { margin-bottom: 0; }
.ext-steps ol { counter-reset: step; list-style: none; padding: 0; margin: 12px 0 0; }
.ext-steps li { counter-increment: step; position: relative; padding: 0 0 18px 44px; line-height: 1.5; font-size: 14px; }
.ext-steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.ext-how { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--card-border); font-size: 13.5px; color: var(--text-secondary); }
.ext-how .card-subtitle { font-weight: 600; color: var(--text); }
.ext-check { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; }
.ext-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding-top: 16px; border-top: 1px solid var(--card-border); }
.ext-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 16px; margin-top: 12px; }
@media (max-width: 800px) {
  .ext-detail-grid { grid-template-columns: 1fr; }
  .ext-hero { flex-direction: column; align-items: flex-start; }
}
.tax-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 10px; font-weight: 600; }

/* ===== Mein Steuerberater (einstellungen_steuerberater.php) ===== */
.tax-ico { width: 22px; height: 22px; flex: 0 0 auto; }
.tax-logo { color: var(--brand); }
.tax-logo .tax-ico { width: 28px; height: 28px; }
.tax-hero { display: flex; gap: 22px; align-items: center; }
.tax-hero-icon { flex: 0 0 72px; width: 72px; height: 72px; border-radius: 50%; background: color-mix(in srgb, var(--primary) 10%, #fff); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.tax-hero-icon .tax-ico { width: 38px; height: 38px; }
.tax-hero-title { font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.tax-hero p { margin: 0; color: var(--text-secondary); line-height: 1.55; }
.tax-search-grid { margin-bottom: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.tax-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.tax-cta .card-title { margin-bottom: 8px; }
.tax-benefits { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 14px; color: var(--text-secondary); }
.tax-benefits li { display: flex; align-items: center; gap: 8px; }
.tax-benefits .tax-ico { width: 18px; height: 18px; color: #1a9c5b; }
.tax-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.tax-section-head .card-title { margin: 0; }
.tax-ico-wrap { width: 36px; height: 36px; border-radius: 10px; background: color-mix(in srgb, var(--primary) 10%, #fff); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.tax-ico-wrap .tax-ico { width: 20px; height: 20px; }
.tax-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.tax-zip-row { display: grid; grid-template-columns: 120px 1fr; gap: 0 12px; }
.tax-zip-row-even { grid-template-columns: 1fr 1fr; }
.tax-task-options { display: grid; gap: 8px; }
.tax-task-option { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--card-border); border-radius: 8px; cursor: pointer; font-size: 14px; line-height: 1.4; }
.tax-task-option:hover { border-color: #c9ced6; }
.tax-task-option:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, #fff); }
.tax-task-option input { margin-top: 2px; }
.tax-profile { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.tax-avatar { flex: 0 0 76px; width: 76px; height: 76px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--navy-2)); color: #fff; font-size: 26px; font-weight: 700; display: flex; align-items: center; justify-content: center; letter-spacing: .02em; }
.tax-profile-body { flex: 1 1 320px; min-width: 0; }
.tax-profile-name { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 22px; font-weight: 700; }
.tax-profile-sub { color: var(--text-secondary); margin-top: 2px; }
.tax-contact { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; font-size: 14px; }
.tax-contact a, .tax-contact span { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); text-decoration: none; }
.tax-contact a:hover { color: var(--primary); }
.tax-contact .tax-ico { width: 17px; height: 17px; color: var(--primary); }
.tax-datev { display: flex; gap: 10px; }
.tax-datev-item { min-width: 130px; padding: 12px 14px; border-radius: 8px; background: #f3f5f8; }
.tax-datev-item span { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.tax-datev-item strong { font-size: 18px; letter-spacing: .03em; }
.tax-two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.tax-two-col .card { margin-bottom: 20px; }
.tax-tasks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.tax-tasks li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.4; }
.tax-tasks li.off { color: var(--text-muted); }
.tax-task-mark { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #d5d9e0; display: flex; align-items: center; justify-content: center; }
.tax-tasks li.on .tax-task-mark { background: #1a9c5b; border-color: #1a9c5b; color: #fff; }
.tax-task-mark .tax-ico { width: 14px; height: 14px; stroke-width: 3; }
.tax-facts { display: grid; gap: 10px; }
.tax-facts div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--card-border); font-size: 14px; }
.tax-facts div:last-child { border-bottom: none; }
.tax-facts span { color: var(--text-secondary); }
.tax-facts strong { text-align: right; }
.tax-notes { font-size: 14px; line-height: 1.55; color: var(--text-secondary); }
.tax-remove { margin-top: 26px; text-align: right; }
.tax-remove-btn { border: none; background: none; color: var(--danger); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; }
@media (max-width: 800px) {
  .tax-form-grid, .tax-two-col { grid-template-columns: 1fr; }
  .tax-hero { flex-direction: column; align-items: flex-start; }
  .tax-datev { width: 100%; }
}

/* Registrierung (registrieren.php) */
.register-box { max-width: 480px; }
.plan-choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.plan-option { display: block; border: 1px solid var(--border, #d9dee7); border-radius: 10px; padding: 10px; font-size: 13px; text-align: center; cursor: pointer; }
.plan-option input { display: block; margin: 0 auto 6px auto; }
.plan-option:has(input:checked) { border-color: var(--navy-2); box-shadow: 0 0 0 2px rgba(30, 60, 120, 0.15); }
