:root {
  --color-primary: #fff554;
  --color-primary-dark: #e6d900;
  --color-primary-ink: #10203a;
  --color-link: #005a9b;
  --color-danger: #b42318;
  --color-text: #1d1d1f;
  --color-muted: #6e6e73;
  --color-bg: #f5f5f7;
  --color-border: #d2d2d7;
  --color-surface: #ffffff;
  --color-navy: #10203a;
  --color-navy-light: #1c3153;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.09);
  --shadow-lg: 0 20px 54px rgba(0, 0, 0, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  font: 100%/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
::selection { color: #10203a; background: #fff554; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- Header / Navigation ---------- */

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 12px 32px;
  color: #fff;
  background: linear-gradient(180deg, var(--color-navy) 0%, var(--color-navy-light) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 50;
}

.app-header__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
}

.brand-logo {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}

.brand-logo--center {
  width: 100%;
  justify-content: center;
  margin: 0 0 22px;
}

.brand-logo__img {
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.app-header .brand-logo__img { height: 30px; width: 195px; }
.auth-card .brand-logo__img { height: 42px; width: 273px; }

.brand-claim {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0;
  white-space: nowrap;
}

.app-header .brand-claim { color: rgba(255, 255, 255, 0.78); }
.auth-card .brand-claim { color: var(--color-navy); opacity: 0.65; }

.app-header__title {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
}

.app-nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.app-nav a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  transition: background-color 100ms ease, color 100ms ease;
}

.app-nav a:hover { background: rgba(255, 245, 84, 0.14); color: #fff; }

.app-nav__logout button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 8px;
  transition: background-color 100ms ease, border-color 100ms ease;
}

.app-nav__logout button:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-primary-ink);
}

/* ---------- Layout ---------- */

.app-main {
  width: min(100% - 48px, 1120px);
  margin: 0 auto;
  padding: 36px 0 72px;
}

.app-main h1 {
  font-size: 30px;
  line-height: 1.16;
  font-weight: 680;
  color: var(--color-navy);
  margin: 0 0 24px;
  letter-spacing: 0;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 120ms ease, border-color 120ms ease;
}

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

.style-page-heading, .style-section-heading, .style-row-actions, .style-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.style-page-heading { margin-bottom: 24px; }
.style-page-heading h1 { margin: 0; }
.style-table-scroll { overflow-x: auto; }
.style-table { min-width: 760px; background: #fff; }
.style-table-logo { display: block; width: 140px; height: 48px; object-fit: contain; }
.style-table-note { display: block; color: var(--color-muted); }
.style-row-actions { justify-content: flex-start; }
.style-row-actions form { margin: 0; }
.style-delete { color: var(--color-danger); }
.style-swatches { display: flex; gap: 6px; }
.style-swatch { display: block; width: 22px; height: 22px; border: 1px solid #bbb; border-radius: 4px; }
.style-edit-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); gap: 32px; align-items: start; }
.style-form-section { padding: 0 0 24px; margin: 0 0 24px; border-bottom: 1px solid var(--color-border); }
.style-form-section h2, .style-preview h2 { font-size: 18px; margin: 0 0 18px; }
.style-section-heading { margin-bottom: 18px; }
.style-section-heading h2 { margin: 0; }
.style-color-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
.style-color-control { display: flex; align-items: center; gap: 12px; }
.style-color-control input[type="color"] { width: 48px; height: 40px; padding: 3px; cursor: pointer; }
.style-color-control output { font-size: 14px; font-family: monospace; }
.style-footer-row { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(140px, 2fr) auto; gap: 12px; align-items: end; margin-bottom: 16px; }
.style-footer-row .form-group { margin: 0; }
.style-footer-row button { min-height: 42px; }
.style-footer-row input { min-width: 0; }
.style-form-actions { justify-content: flex-start; }
.style-preview { position: sticky; top: 110px; min-width: 0; }
.style-preview-brand { background: #fff; padding: 28px 20px; text-align: center; }
.style-preview-brand img { display: block; object-fit: contain; max-width: 100%; margin: 0 auto; }
.style-preview-brand p { margin: 18px 0 0; font-size: 12px; overflow-wrap: anywhere; }
.style-preview-accent { height: 5px; }
.style-preview-content { padding: 32px 16px; background: #fff; text-align: center; }
.style-preview-content .btn { max-width: 100%; white-space: normal; }
.style-preview-footer { padding: 24px 20px; color: #b8c3d3; font-size: 12px; text-align: center; overflow-wrap: anywhere; }
.style-preview-footer a { color: #dbe3ee; }
.style-preview-footer p { margin: 12px 0 0; }
.style-preview-footer p:empty { display: none; }
@media (max-width: 900px) {
  .style-edit-layout { grid-template-columns: minmax(0, 1fr); }
  .style-preview { position: static; max-width: 600px; width: 100%; }
}
@media (max-width: 540px) {
  .style-footer-row { grid-template-columns: minmax(0, 1fr); gap: 8px; padding-bottom: 16px; border-bottom: 1px solid var(--color-border); }
  .style-footer-row button { justify-self: start; }
  .style-color-grid { grid-template-columns: minmax(0, 1fr); }
}

.card h2 {
  margin-top: 0;
  font-size: 18px;
  color: var(--color-navy);
}

.stats-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stats-summary-item {
  display: grid;
  gap: 5px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.stats-summary-label,
.stats-summary-detail {
  color: var(--color-muted);
  font-size: 13px;
}

.stats-summary-item strong {
  color: var(--color-navy);
  font-size: 24px;
}

.stats-tracking-note {
  margin: 0 0 16px;
  color: var(--color-muted);
  font-size: 13px;
}

/* ---------- Auth / Standalone pages ---------- */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(900px 500px at 80% 0%, rgba(255, 245, 84, 0.16), transparent 60%),
    linear-gradient(160deg, var(--color-navy) 0%, #101722 100%);
}
.auth-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.auth-layout .auth-page { flex: 1 0 auto; min-height: 0; width: 100%; }
.auth-layout .inf-footer { flex: 0 0 auto; margin-top: 0; }

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 36px;
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: none;
}

.auth-card h1 {
  font-size: 24px;
  font-weight: 650;
  color: var(--color-navy);
  text-align: center;
  margin: 0 0 6px;
}

.auth-card p.auth-subtitle {
  text-align: center;
  color: var(--color-muted);
  font-size: 14px;
  margin: 0 0 24px;
}

/* ---------- Forms ---------- */

.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 13px;
  color: var(--color-navy);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #b8b8bd;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 14px;
  transition: border-color 100ms ease, box-shadow 100ms ease;
  background: #fff;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.16);
  background: #fff;
}
.form-group small {
  display: block;
  margin-top: 7px;
  color: var(--color-muted);
  font-size: 12px;
  line-height: 1.45;
}

input[type="checkbox"], input[type="radio"] { accent-color: var(--color-primary); }
input:disabled, select:disabled, textarea:disabled { background: #f2f2f4; color: var(--color-muted); }
.form-card--narrow { max-width: 520px; }
.auth-card--wide { max-width: 520px; }
.error-list { margin: 0; padding-left: 1.2rem; }
.permission-fieldset { border: 0; padding: 0; margin: 20px 0; }
.permission-fieldset legend { margin-bottom: 8px; font-weight: 650; }
.permission-option { display: flex !important; margin-top: 10px; }
.password-hint { margin: -8px 0 18px !important; }
.stats-filter { width: 100%; padding: 10px 12px; margin-bottom: 14px; }
.inline-action { display: inline-flex; vertical-align: middle; }
.text-action {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-link);
  cursor: pointer;
  font: inherit;
}
.text-action:hover { text-decoration: underline; }
.campaign-card__subject { margin: 0 0 16px; color: var(--color-muted); }
.campaign-card__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }

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

.campaign-form-section {
  padding: 8px 0 24px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}
.campaign-form-section:last-of-type { margin-bottom: 14px; }
.campaign-form-section__heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}
.campaign-form-section__heading h2 { margin: 0 0 3px; }
.campaign-form-section__heading p {
  margin: 0;
  color: var(--color-muted);
  font-size: 13px;
}
.campaign-form-section__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 30px;
  height: 30px;
  border-radius: 8px;
  background: #e8f2ff;
  color: var(--color-link);
  font-weight: 800;
  font-size: 13px;
}
.campaign-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 9px;
}
.checkbox-label input { width: auto; }
.header-image-preview {
  display: grid;
  gap: 10px;
  max-width: 600px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
}
.header-image-preview img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 6px;
}
.header-image-preview label { font-size: 13px; color: var(--color-muted); }

.editor-source { display: none; }

.mail-editor {
  border-radius: var(--radius-sm);
  overflow: visible;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
}

.mail-editor__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  background: rgba(250, 250, 252, 0.88);
  border-bottom: 1px solid var(--color-border);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  position: sticky;
  top: var(--mail-editor-toolbar-top, 72px);
  z-index: 40;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.mail-editor__group {
  display: flex;
  gap: 3px;
  padding-right: 6px;
  margin-right: 3px;
  border-right: 1px solid var(--color-border);
}
.mail-editor__group:last-child { border-right: 0; }
.mail-editor__group--blocks { margin-left: auto; border-right: 0; }

.mail-editor__btn {
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-navy);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 100ms ease, border-color 100ms ease;
}
.mail-editor__btn:hover { background: #f2f2f4; border-color: #8e8e93; }
.mail-editor__btn:active { transform: scale(0.98); }
.mail-editor__btn:focus-visible {
  outline: 3px solid rgba(0, 113, 227, 0.3);
  outline-offset: 1px;
}
.mail-editor__btn--media {
  color: #1d5f3b;
  border-color: #b9dac8;
  background: #f2f7f3;
}

.mail-editor__canvas-wrapper {
  padding: 24px;
  max-height: 560px;
  overflow-y: auto;
}

/* Vollstaendige Vorschau: Stil-Header, Akzentlinie, Inhalt, Footer - analog zum Mail-Wrapper. */
.mail-editor__preview {
  --preview-primary: #005a9b;
  --preview-primary-ink: #ffffff;
  --preview-dark: #303030;
  --preview-accent: #00a0e1;
  max-width: 600px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: #fff;
}
/* Markenband wie auf den Originalportalen: weisser Grund, da die Logos dunkle Typografie nutzen. */
.mail-editor__preview-header {
  background: #ffffff;
  color: var(--color-text);
}
.mail-editor__header-bar {
  padding: 26px 30px 20px;
  text-align: center;
}
.mail-editor__logo {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}
.mail-editor__header-claim {
  margin: 8px 0 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--preview-primary);
}
.mail-editor__header-image {
  display: block;
  width: 100%;
  height: auto;
}
.mail-editor__header-image[hidden] { display: none; }
.mail-editor__accent {
  height: 5px;
  background: var(--preview-accent);
}
.mail-editor__preview-footer {
  background: var(--preview-dark);
  padding: 20px 30px;
  text-align: center;
  color: #b8c3d3;
  font-size: 11px;
  line-height: 1.6;
}
.mail-editor__footer-link { color: #dbe3ee; text-decoration: underline; }
.mail-editor__footer-separator { margin: 0 8px; color: #6c7a8d; }
.mail-editor__footer-note { margin: 8px 0 0; }

.editor-upload-bucket,
.editor-upload-input { display: none; }

/* Editierbereich bewusst wie der spaetere Mail-Inhalt gestaltet (siehe templates/mail/campaign-default.html) */
.mail-editor__canvas {
  background: #fff;
  padding: 30px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #313a49;
  min-height: 320px;
}
.mail-editor__canvas:focus { outline: 2px solid var(--preview-primary); outline-offset: -2px; }
.mail-editor__canvas h1,
.mail-editor__canvas h2,
.mail-editor__canvas h3 { color: var(--preview-dark); margin: 0 0 12px; }
.mail-editor__canvas p { margin: 0 0 14px; }
.mail-editor__canvas a { color: var(--preview-primary); }
.mail-editor__canvas img {
  max-width: 100%;
  height: auto;
}
.mail-editor__canvas blockquote {
  margin: 20px 0;
  padding: 6px 0 6px 18px;
  border-left: 4px solid var(--color-primary-dark);
  color: var(--color-muted);
}
.mail-editor__consent {
  padding: 0 30px 24px;
  background: #fff;
  color: #5a6b85;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  line-height: 1.5;
}
.mail-editor__consent p { margin: 0 0 10px; }
.mail-editor__consent p:last-child { margin-bottom: 0; }
.mail-editor__consent a { color: var(--preview-primary); }
.mail-editor__consent-addendum-slot { margin: 8px 0; }
.mail-editor__consent-addendum {
  min-height: 1.5em;
  padding: 0;
  border: 0;
  border-radius: 2px;
  font: inherit;
  color: inherit;
}
.mail-editor__consent-addendum * {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}
.mail-editor__consent-addendum:hover,
.mail-editor__consent-addendum:focus {
  outline: 1px dashed #9aa8b8;
}
.mail-editor__consent-addendum[data-empty="true"]::before {
  content: attr(data-placeholder);
  color: #8491a2;
}
.mail-editor__cta [data-cta-label] { cursor: text; }
.mail-editor__cta [data-cta-label]:focus {
  outline: 2px solid var(--preview-primary);
  outline-offset: 3px;
}
.mail-editor__inline-link-menu {
  position: fixed;
  z-index: 10000;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  max-width: calc(100vw - 16px);
  padding: 8px;
  border: 1px solid var(--color-border, #cbd5e1);
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow-md);
}
.mail-editor__inline-link-menu[hidden] { display: none; }
.mail-editor__inline-link-menu input {
  width: min(280px, 52vw);
  min-width: 120px;
  padding: 7px 9px;
  border: 1px solid var(--color-border, #cbd5e1);
  border-radius: 4px;
  font: inherit;
  font-size: 13px;
}
.mail-editor__inline-link-menu .mail-editor__btn { white-space: nowrap; }

.mail-editor__preview--page {
  max-width: 100%;
  border-radius: var(--radius-lg);
}
.mail-editor__preview--page .mail-editor__canvas { padding: 40px; }

.thankyou-page {
  min-height: 100vh;
  padding: 40px 24px;
  background: var(--color-bg);
}
.thankyou-shell {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
}
.thankyou-card {
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.thankyou-card__brand {
  background: #ffffff;
  color: var(--color-text);
  padding: 28px 46px 22px;
  text-align: center;
}
.thankyou-card__logo {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}
.thankyou-card__claim {
  margin: 10px 0 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--style-primary, #005a9b);
}
.thankyou-card__header-image {
  display: block;
  width: 100%;
  height: auto;
}
.thankyou-card__accent {
  height: 7px;
  background: var(--style-accent, var(--color-primary));
}
.thankyou-card__content {
  padding: 40px;
}
.thankyou-card__content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-left: auto;
  margin-right: auto;
}
.thankyou-card__action {
  padding: 0 46px 46px;
  text-align: center;
}
.thankyou-card__action p { margin: 0; }
.thankyou-card__footer {
  background: var(--style-dark, #303030);
  color: #b8c3d3;
  padding: 22px 46px;
  text-align: center;
  font-size: 12px;
  line-height: 1.7;
}
.thankyou-card__footer-links { margin: 0; }
.thankyou-card__footer-links a { color: #dbe3ee; }
.thankyou-card__footer-separator { margin: 0 8px; color: #6c7a8d; }
.thankyou-card__footer-note { margin: 8px 0 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--color-primary);
  color: var(--color-primary-ink);
  border: 1px solid var(--color-primary);
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  box-shadow: none;
  transition: background-color 100ms ease, border-color 100ms ease, transform 100ms ease;
}
.btn:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); }
.btn:active { transform: scale(0.98); }

/* Nach .btn definiert, damit die Stilfarbe der Kampagne den Standard-Button ueberschreibt. */
.btn-style {
  background: var(--style-primary, var(--color-primary));
  color: var(--style-primary-ink, var(--color-primary-ink));
  box-shadow: none;
}
.btn-style:hover { filter: brightness(0.92); box-shadow: none; }

.btn-secondary {
  background: #fff;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  box-shadow: none;
}
.btn-secondary:hover {
  background: #f2f2f4;
  border-color: #a1a1a6;
  box-shadow: none;
}

.auth-card .btn { width: 100%; }
.auth-link {
  margin: 18px 0 0;
  text-align: center;
  font-size: 14px;
}
.auth-link a {
  color: var(--color-link);
  font-weight: 600;
}

/* ---------- Alerts ---------- */

.alert {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 14px;
  border: 1px solid transparent;
}
.alert-error {
  background: #fff2f1;
  color: #8e1b14;
  border-color: #f0c4c0;
}
.alert-success {
  background: #eff8f1;
  color: #245c32;
  border-color: #c6e4cc;
}

@media (max-width: 700px) {
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .mail-editor__canvas-wrapper { padding: 12px; }
  .mail-editor__canvas { padding: 22px 18px; min-height: 260px; }
  .campaign-form-actions { flex-direction: column-reverse; }
  .campaign-form-actions .btn { width: 100%; }
  .thankyou-page { padding: 24px 14px; }
  .thankyou-card__content { padding: 32px 24px; }
  .thankyou-card__action { padding: 0 24px 32px; }
  .thankyou-card__brand { padding: 22px 24px 18px; }
  .thankyou-card__footer { padding: 20px 24px; }
  .mail-editor__preview--page .mail-editor__canvas { padding: 22px 18px; }
}

/* ---------- Tables ---------- */

table.data-table { width: 100%; border-collapse: collapse; }
table.data-table th {
  text-align: left;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 650;
  text-transform: none;
  letter-spacing: 0;
  color: var(--color-muted);
  border-bottom: 2px solid var(--color-border);
}
table.data-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
}
table.data-table tbody tr { transition: background-color 100ms ease; }
table.data-table tbody tr:hover { background: #f5f8fc; }

/* ---------- Misc components ---------- */

.qr-box { text-align: center; margin: 20px 0; }
.qr-box img {
  border: 8px solid #fff;
  outline: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}
.badge-active { background: #e8f7ee; color: #146c3c; }
.badge-inactive { background: #f1f2f5; color: var(--color-muted); }

.campaign-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.campaign-grid > .card { display: flex; flex-direction: column; align-items: flex-start; }

/* ---------- Footer ---------- */

.inf-footer {
  margin-top: 32px;
  padding: 24px;
  border-top: 1px solid rgba(210, 210, 215, 0.8);
  font-size: 12px;
  color: var(--color-muted);
  background: rgba(255, 255, 255, 0.78);
}
.inf-footer__link { color: #4a4a4f; text-decoration: none; margin: 0 8px; }
.inf-footer__link:hover { color: var(--color-link); text-decoration: underline; }
.inf-text-center { text-align: center; }
.inf-text-mini { font-size: 11px; }
.inf-footer > .inf-text-center > .inf-text-mini {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0;
}
.inf-footer > .inf-text-center > .inf-text-mini .inf-footer__link { margin: 0; }
.inf-footer__logo {
  height: 26px;
  width: 130px;
  margin: 0 auto 8px;
  background: url("/assets/img/vogel-logo-dark.svg") center / contain no-repeat;
}

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  .app-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .app-header { padding: 12px 16px; }
  .app-nav { width: 100%; }
  .app-main { padding: 24px 16px 48px; }
  .auth-card { padding: 28px 22px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  table.data-table { display: block; overflow-x: auto; }
  table.data-table th, table.data-table td { padding: 10px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .app-header, .mail-editor__toolbar, .inf-footer {
    background: #fff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (prefers-contrast: more) {
  :root { --color-border: #85858b; }
  .card, .auth-card, .mail-editor, .mail-editor__toolbar { border-color: #85858b; }
}
