/* ============================================
   Design-Tokens — make you RISE
   Premium, dunkel, roségold. Aus dem Brand Kit übernommen:
   Roségold #D4AF91, Tiefschwarz #121212, Soft-Beige #F4EFEA, Reinweiß #FFFFFF.
   ============================================ */
:root {
  --cream: #F4EFEA;
  --cream-deep: #EAE1D5;
  --ink: #121212;
  --ink-soft: #6E665D;
  --forest: #D4AF91;
  --forest-deep: #B8916F;
  --ochre: #D4AF91;
  --ochre-soft: #EDE0D3;
  --coral: #A8402E;
  --line: #E3D9CC;
  --white: #FFFFFF;

  --font-display: "Playfair Display", Georgia, serif;
  --font-script: "Parisienne", cursive;
  --font-body: "Montserrat", -apple-system, sans-serif;

  --radius: 10px;
  --shadow: 0 1px 2px rgba(18, 18, 18, 0.08), 0 4px 16px rgba(18, 18, 18, 0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.5;
}

.hidden { display: none !important; }
.muted { color: var(--ink-soft); }
code {
  background: var(--cream-deep);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

/* ---------- Topbar ---------- */
.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding: 14px 20px;
  background: var(--ink);
  border-bottom: 1px solid #262626;
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: flex;
  border-radius: 50%;
  overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }

.brand-text h1 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  line-height: 1.1;
  color: var(--white);
  letter-spacing: 0.02em;
}
.brand-script {
  font-family: var(--font-script);
  font-weight: 400;
  color: var(--forest);
  font-size: 1.2em;
  margin-right: 8px;
  display: inline-block;
}
.brand-tag { margin: 2px 0 0; font-size: 12px; color: #B5AB9D; }

.topnav { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.nav-btn {
  border: none;
  background: transparent;
  padding: 8px 14px;
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  color: #CFC6BA;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.nav-btn:hover { background: rgba(212, 175, 145, 0.16); color: var(--white); }
.nav-btn.active { background: var(--forest); color: var(--ink); }

.btn-primary {
  background: var(--forest);
  color: var(--ink);
  border: none;
  padding: 9px 18px;
  border-radius: 20px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.btn-primary:hover { background: var(--forest-deep); }
.btn-primary:active { transform: scale(0.98); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  padding: 9px 18px;
  border-radius: 20px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13.5px;
  color: var(--ink-soft);
  cursor: pointer;
}
.btn-ghost:hover { background: var(--cream-deep); }

.icon-btn {
  background: transparent;
  border: none;
  font-size: 18px;
  color: var(--ink-soft);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.icon-btn:hover { color: var(--forest-deep); }
.topbar .icon-btn { color: #CFC6BA; }
.topbar .icon-btn:hover { color: var(--forest); }

/* ---------- Layout ---------- */
main { padding: 24px 28px 60px; max-width: 1400px; margin: 0 auto; }

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.stat-card .num {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--forest-deep);
}
.stat-card .label {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 2px;
}

/* ---------- Board ---------- */
.board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
}

.column {
  background: var(--cream-deep);
  border-radius: 12px;
  min-width: 260px;
  max-width: 280px;
  flex-shrink: 0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 220px);
}

.column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 12px;
}
.column-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
}
.column-count {
  background: var(--white);
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 10px;
  padding: 2px 8px;
}

.column-cards {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 40px;
}
.column-cards.drag-over { background: var(--ochre-soft); border-radius: 8px; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: grab;
  box-shadow: var(--shadow);
  transition: transform 0.1s;
}
.card:active { cursor: grabbing; }
.card.dragging { opacity: 0.4; }

.card-name { font-weight: 600; font-size: 13.5px; }
.card-meta {
  font-size: 11.5px;
  color: var(--ink-soft);
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  background: var(--ochre-soft);
  color: #7A5540;
  padding: 1px 7px;
  border-radius: 8px;
  font-size: 10.5px;
  font-weight: 600;
}

.column-empty {
  color: var(--ink-soft);
  font-size: 12px;
  text-align: center;
  padding: 18px 6px;
  font-style: italic;
}

/* ---------- List view ---------- */
.list-controls { margin-bottom: 14px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
#listSearch {
  width: 100%;
  max-width: 380px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 13.5px;
  background: var(--white);
}
#listNetworkFilter { max-width: 220px; }
#columnPickerMenu { min-width: 210px; }
.column-picker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--ink);
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.column-picker-item:hover { background: var(--cream-deep); }
.column-picker-item input { width: auto; margin: 0; }
.sortable-th { cursor: pointer; user-select: none; }
.sortable-th:hover { color: var(--ink); }
.bulk-delete-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.table-scroll { overflow-x: auto; border-radius: var(--radius); }
.contact-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.contact-table th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.contact-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.contact-table tr:last-child td { border-bottom: none; }
.contact-table tr:hover { background: var(--cream); }

.status-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.status-Neu { background: var(--ochre-soft); color: #7A5540; }
.status-Kontaktiert { background: #E7DFD3; color: var(--forest-deep); }
.status-Interessiert { background: #F0DFCF; color: var(--forest-deep); }
.status-Kunde { background: var(--forest); color: var(--ink); }
.status-Kein-Interesse { background: #F2DAD4; color: var(--coral); }
.status-Businesspartner { background: var(--ink); color: var(--forest); }

/* ---------- Import ---------- */
.import-layout { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.import-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 560px;
  box-shadow: var(--shadow);
}
.import-layout .import-card { flex: 1 1 460px; }
.import-sheet-card { flex: 2 1 560px; max-width: none; min-width: 0; }
.import-card h2 { font-family: var(--font-display); margin-top: 0; }

.sheet-scroll { overflow: auto; max-height: 70vh; border: 1px solid var(--line); border-radius: 8px; }
.sheet-table { border-collapse: collapse; font-size: 12px; white-space: nowrap; }
.sheet-table th, .sheet-table td {
  border: 1px solid var(--line);
  padding: 5px 9px;
  text-align: left;
}
.sheet-table thead th {
  position: sticky;
  top: 0;
  background: var(--cream-deep);
  font-weight: 700;
  color: var(--ink-soft);
  z-index: 1;
}
.sheet-table .sheet-rownum {
  position: sticky;
  left: 0;
  background: var(--cream-deep);
  color: var(--ink-soft);
  text-align: center;
  font-weight: 600;
  z-index: 1;
}
.sheet-table thead .sheet-rownum { z-index: 2; }
.sheet-table tbody tr:nth-child(even) td { background: var(--cream); }
#importForm { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
#csvFile {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 16px;
  font-family: var(--font-body);
  font-size: 13px;
}
.import-result {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--cream-deep);
  font-size: 13px;
}

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(18, 18, 18, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-card {
  background: var(--white);
  border-radius: 14px;
  padding: 24px;
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.modal-head h2 { font-family: var(--font-display); margin: 0; font-size: 19px; }

/* flex-wrap + flex-basis statt starrem 2-Spalten-Zwang: Felder brechen von selbst
   auf jeder Bildschirmbreite um, sobald sie nicht mehr nebeneinander passen -
   robuster als ein fester Media-Query-Umbruchpunkt. */
.form-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.form-row label { flex: 1 1 200px; min-width: 0; }
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
label.full { margin-bottom: 12px; }
input, select, textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--ink);
  background: var(--cream);
}
/* iOS Safari lässt Datumsfelder sonst gern über den Rand hinausragen, da das
   eingebaute Kalender-Widget eine eigene Mindestbreite mitbringt. */
input[type="date"], input[type="datetime-local"] {
  min-width: 0;
  max-width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--forest);
  outline-offset: 1px;
}
textarea { resize: vertical; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.detail-row { margin-bottom: 10px; font-size: 13.5px; }
.detail-label { font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.03em; }
.detail-notes {
  white-space: pre-wrap;
  background: var(--cream);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 4px;
  font-size: 13px;
}

/* ---------- Lead-Fenster (Kontakt-Detail) ---------- */
#cardModal .modal-card { max-width: min(620px, 100%); }

.optin-box {
  background: var(--ochre-soft);
  border-radius: 10px;
  padding: 12px 14px 2px;
  margin-bottom: 12px;
}
.optin-box label { color: #7A5540; }
.optin-box select, .optin-box input {
  background: var(--white);
}

.screening-box {
  background: var(--cream-deep);
  border-radius: 10px;
  padding: 4px 14px 12px;
  margin-bottom: 12px;
}
.screening-box summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 13.5px;
  padding: 10px 0;
  color: var(--forest-deep);
}
.screening-box[open] summary { margin-bottom: 8px; }
.screening-box label { margin-top: 10px; }

.dynamic-fields-box {
  background: var(--cream-deep);
  border-radius: 10px;
  padding: 12px 14px 2px;
  margin-bottom: 12px;
}

.activity-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.activity-section h3 {
  font-family: var(--font-display);
  font-size: 15px;
  margin: 0 0 12px;
}
.activity-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.activity-form-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.activity-form select {
  width: auto;
  flex-shrink: 0;
  max-width: 110px;
}
.activity-form input[type="datetime-local"] {
  width: auto;
  flex-shrink: 0;
  max-width: 185px;
}
.activity-form textarea {
  width: 100%;
  resize: vertical;
}
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 260px;
  overflow-y: auto;
}
.activity-item {
  background: var(--cream);
  border-radius: 8px;
  padding: 10px 12px;
}
.activity-item.type-question {
  background: var(--ochre-soft);
}
.activity-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  margin-bottom: 4px;
}
.activity-type { font-weight: 700; color: var(--forest-deep); }
.activity-content { font-size: 13px; white-space: pre-wrap; }

/* ---------- Login ---------- */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
}
.login-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px 30px;
  width: 100%;
  max-width: 360px;
  box-shadow: var(--shadow);
  text-align: center;
}
.login-card .brand-mark { margin: 0 auto 14px; }
.login-card h1 {
  font-family: var(--font-display);
  font-size: 21px;
  margin: 0 0 2px;
}
.login-card .brand-tag { margin-bottom: 22px; color: var(--ink-soft); }
.login-card label {
  text-align: left;
  margin-bottom: 12px;
  display: block;
}
.login-error {
  background: #F2DAD4;
  color: var(--coral);
  font-size: 12.5px;
  padding: 8px 12px;
  border-radius: 7px;
  margin-bottom: 12px;
  text-align: left;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 8px;
}
.user-name { font-size: 12.5px; color: #CFC6BA; font-weight: 500; }
.user-name-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  padding: 4px 8px;
  border-radius: 12px;
}
.user-name-btn:hover { background: rgba(212, 175, 145, 0.16); }

.org-switcher {
  background: rgba(212, 175, 145, 0.12);
  color: #CFC6BA;
  border: 1px solid rgba(212, 175, 145, 0.35);
  border-radius: 8px;
  padding: 5px 8px;
  font-family: var(--font-body);
  font-size: 12px;
  cursor: pointer;
}
.org-switcher:hover { background: rgba(212, 175, 145, 0.2); }
.org-switcher option { color: #1a1a1a; }

/* ---------- Einstellungen-Dropdown ---------- */
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  padding: 6px;
  display: flex;
  flex-direction: column;
  min-width: 160px;
  z-index: 50;
}
.nav-dropdown-menu .nav-btn { text-align: left; border-radius: 8px; color: var(--ink-soft); }
.nav-dropdown-menu .nav-btn:hover { background: var(--cream-deep); color: var(--ink); }
.nav-dropdown-menu .nav-btn.active { background: var(--forest); color: var(--ink); }

/* ---------- Kanban-Spalten verschieben ---------- */
.column.dragging-col { opacity: 0.4; }

/* ---------- Google view ---------- */
.google-btn-row { display: flex; gap: 10px; }
.status-connected { color: var(--forest-deep); font-weight: 600; }
.status-disconnected { color: var(--ink-soft); }

/* ---------- Team view ---------- */
.role-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
  background: var(--ochre-soft);
  color: #7A5540;
}
.role-badge.admin { background: var(--forest); color: var(--ink); }

.team-list { display: flex; flex-direction: column; gap: 14px; margin: 16px 0 8px; }
.team-user-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 20px;
  background: var(--cream);
}
.team-user-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-bottom: 10px;
}
.team-user-head strong { font-size: 16px; margin-right: 10px; }
.team-user-email { color: var(--ink-soft); font-size: 13px; }
.permission-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  margin: 12px 0 8px;
}
.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px 18px;
}
.permissions-note { font-size: 12.5px; color: var(--ink-soft); font-style: italic; }
.permission-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink);
  cursor: pointer;
}
.permission-toggle input { width: auto; margin: 0; }
.team-user-actions {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 18px;
}

/* ---------- Famulor-Karte ---------- */
.famulor-info code {
  background: var(--cream-deep);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 12px;
}
.copy-row { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.copy-row input { flex: 1 1 auto; font-family: monospace; font-size: 12.5px; }
.copy-row .btn-ghost { flex: 0 0 auto; white-space: nowrap; }

.opt-out-flag { font-size: 13px; }
.opt-out-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--coral);
  background: color-mix(in srgb, var(--coral) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--coral) 35%, transparent);
  border-radius: 8px;
  padding: 9px 12px;
  margin: 4px 0 14px;
  cursor: pointer;
}
.opt-out-toggle input { width: auto; margin: 0; }
.invalid-marker { cursor: help; font-size: 12px; }
.link-danger {
  background: none;
  border: none;
  color: var(--coral);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}
.link-edit {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}
.activity-actions { margin-top: 6px; display: flex; gap: 14px; }

/* ---------- Rufnummern-Prüfung ---------- */
.phone-check-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
}
.phone-check-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 13.5px;
}
.phone-check-numbers {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.phone-old { color: var(--coral); font-family: monospace; }
.phone-arrow { color: var(--ink-soft); }
.phone-new { color: var(--forest-deep); font-weight: 600; font-family: monospace; }
.phone-manual-input { flex: 1 1 200px; max-width: 260px; font-family: monospace; }

/* ---------- Felder verwalten ---------- */
.field-admin-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
}
.field-admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
}
.field-admin-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.add-option-form {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.add-option-form input {
  flex: 1;
  padding: 6px 10px;
  font-size: 12.5px;
}
.add-option-form button {
  padding: 6px 12px;
  font-size: 13px;
}

/* ---------- Board-Tabs ---------- */
.board-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.board-tab {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 7px 14px;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
}
.board-tab.active {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--ink);
}
.board-tab-add {
  border: 1px dashed var(--line);
  background: transparent;
  padding: 7px 14px;
  border-radius: 18px;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
}
.board-tab-add:hover { background: var(--cream-deep); }

/* ---------- Editierbare Spalten ---------- */
.column-title-input {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  border: none;
  background: transparent;
  padding: 2px 4px;
  width: 100%;
  color: var(--ink);
}
.column-title-input:focus {
  outline: none;
  background: var(--white);
  border-radius: 4px;
}
.column-delete-btn {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 13px;
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.5;
}
.column-delete-btn:hover { opacity: 1; color: var(--coral); }

.add-column {
  min-width: 220px;
  flex-shrink: 0;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13px;
  cursor: pointer;
  padding: 12px;
  align-self: flex-start;
}
.add-column:hover { background: var(--cream-deep); }

.column-title { cursor: pointer; }
.column-title:hover { text-decoration: underline dotted; }

.column-delete {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 12px;
  cursor: pointer;
  padding: 0 2px;
  opacity: 0.5;
}
.column-delete:hover { opacity: 1; color: var(--coral); }

.column-add {
  min-width: 200px;
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  padding-top: 4px;
}
.column-add-btn {
  border: 1px dashed var(--line);
  background: transparent;
  border-radius: 10px;
  color: var(--ink-soft);
  font-size: 13px;
  cursor: pointer;
  padding: 12px 16px;
  width: 100%;
}
.column-add-btn:hover { background: var(--cream-deep); }

.board-tab-icon {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink-soft);
}
.board-tab-icon:hover { background: var(--cream-deep); }

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

/* ---------- Responsive ---------- */
/* .topbar/.topnav/.form-row/.stats-row sind bereits fluid (flex-wrap bzw. grid
   auto-fit) und passen sich ohne Media-Query jeder Breite an. Hier nur noch
   Feinschliff für sehr schmale Bildschirme (Smartphones). */
@media (max-width: 720px) {
  main { padding: 16px 14px 40px; }
  .topbar { padding: 12px 14px; }
  .topnav { order: 3; width: 100%; justify-content: flex-start; }
  .brand-text h1 { font-size: 17px; }
  .contact-table { font-size: 12px; }
  .contact-table th, .contact-table td { padding: 10px; white-space: nowrap; }
  .modal { padding: 0; align-items: flex-end; }
  .modal-card {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
    padding: 18px;
  }
  .board { gap: 10px; }
  .column { min-width: 220px; max-width: 240px; }
  .nav-dropdown-menu { right: -14px; }
}

@media (max-width: 420px) {
  .form-row label { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
