/* debitors.css – Profil-Tab Debitoren + Autocomplete-Modal */

/* ── Profil-Tab ────────────────────────────────────────────────────────── */
.deb-tab {
  display: flex; flex-direction: column; gap: 12px;
  padding: 16px; max-width: 800px;
}
.deb-tab-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap;
}
.deb-tab-head h3 { margin: 0; }
.deb-tab-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.deb-upload-btn {
  display: inline-block; padding: 6px 14px;
  border: 1px solid #c9a14a; border-radius: 6px;
  background: #1c1c25; color: #c9a14a; cursor: pointer;
  font-size: 13px; transition: all .15s;
}
.deb-upload-btn:hover { background: #c9a14a; color: #1c1c25; }

.deb-hint {
  font-size: 12px; color: #999;
  margin: 0 0 8px 0; line-height: 1.4;
}

.deb-search-input {
  width: 100%; padding: 8px 12px;
  background: #0f0f17; border: 1px solid #2b2b38; color: #eee;
  border-radius: 6px; font-size: 14px;
}
.deb-search-input:focus { outline: none; border-color: #c9a14a; }

.deb-list { min-height: 100px; }
.deb-loading, .deb-empty, .deb-error {
  padding: 24px; text-align: center; color: #999;
  background: #15151f; border-radius: 6px; font-size: 14px;
}
.deb-error { color: #f55; }

.deb-table {
  width: 100%; border-collapse: collapse; font-size: 14px;
}
.deb-table th, .deb-table td {
  padding: 8px 12px; border-bottom: 1px solid #2b2b38;
  text-align: left;
}
.deb-table th {
  background: #15151f; color: #c9a14a; font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.deb-table tr:hover td { background: #15151f; }
.deb-num { font-family: monospace; color: #c9a14a; width: 100px; }
.deb-name { color: #eee; }
.deb-act  { text-align: right; width: 50px; }
.deb-act .deb-edit {
  background: transparent; border: none; color: #999;
  cursor: pointer; font-size: 16px; padding: 4px 8px;
}
.deb-act .deb-edit:hover { color: #c9a14a; }
.deb-count {
  padding: 8px 12px; font-size: 12px; color: #777;
  text-align: right;
}

/* ── Modal-Erweiterungen (für askDebitorModal) ─────────────────────────── */
.askd-dropdown {
  max-height: 240px; overflow-y: auto;
  background: #0a0a12; border: 1px solid #2b2b38; border-top: none;
  border-radius: 0 0 6px 6px;
  margin-top: -1px; margin-bottom: 8px;
}
.askd-dropdown:empty { display: none; }
.askd-item {
  padding: 10px 12px; cursor: pointer; display: flex; gap: 14px;
  border-bottom: 1px solid #1c1c25;
  font-size: 13px;
}
.askd-item:last-child { border-bottom: none; }
.askd-item:hover { background: #15151f; }
.askd-item-num {
  font-family: monospace; color: #c9a14a; min-width: 60px;
}
.askd-item-name { color: #ddd; flex: 1; }
.askd-empty {
  padding: 12px; color: #999; font-style: italic; font-size: 13px;
  text-align: center;
}

/* ── Modal-Größe für Debitoren ─────────────────────────────────────────── */
.modal-md {
  max-width: 520px;
  width: 90vw;
}
.modal-md label {
  display: block; margin-bottom: 12px;
  font-size: 12px; color: #c9a14a; text-transform: uppercase;
  letter-spacing: 0.5px;
}
.modal-md label input {
  display: block; width: 100%; margin-top: 4px;
  padding: 8px 12px; background: #0a0a12;
  border: 1px solid #2b2b38; color: #eee; border-radius: 6px;
  font-size: 14px;
  text-transform: none; letter-spacing: 0;
}
.modal-md label input:focus { outline: none; border-color: #c9a14a; }
.modal-md .hint {
  font-size: 12px; color: #999; margin: 4px 0 16px 0;
}
.modal-md .modal-actions {
  display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px;
}

/* Modal-Overlay: muss über allem liegen, auch Batch-Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 16px;
}
.modal-overlay > .modal {
  background: #1c1c25;
  border: 1px solid #2b2b38;
  border-radius: 8px;
  padding: 24px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  color: #eee;
}
.modal-overlay h2 { margin: 0 0 12px 0; color: #c9a14a; font-size: 18px; }
.modal-overlay p  { margin: 8px 0; color: #ccc; font-size: 14px; }
.modal-overlay .btn-primary {
  background: #c9a14a; color: #1c1c25; border: none;
  padding: 8px 16px; border-radius: 6px; cursor: pointer; font-weight: 600;
}
.modal-overlay .btn-primary:hover { background: #d4af55; }
.modal-overlay .btn-secondary {
  background: transparent; color: #ccc; border: 1px solid #555;
  padding: 8px 16px; border-radius: 6px; cursor: pointer;
}
.modal-overlay .btn-secondary:hover { background: #2b2b38; color: #fff; }

/* ─── Modal-Card-Styling v2 (mit echten Theme-Variablen) ─────────
   Nutzt --card2 für den Modal-Hintergrund (eine Stufe heller als
   die Karten dahinter), sodass das Modal sich von der Seite abhebt
   ohne aufdringlich zu wirken. Inputs nutzen --card (eine Stufe
   dunkler als das Modal selbst) für den "vertieft"-Effekt.
   Stand: 20. Mai 2026.
   ───────────────────────────────────────────────────────────── */
.modal-overlay {
  background: rgba(0,0,0,.75) !important;   /* Backdrop minimal dunkler */
}

.modal-overlay > .modal-card {
  background: var(--card2);
  border: 1px solid var(--border2);
  border-radius: var(--r2);
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  overflow-y: auto;
  color: var(--text);
  box-shadow: 0 16px 56px rgba(0,0,0,.6),
              0 0 0 1px rgba(201,168,76,.05);
}

.modal-card .modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border2);
  background: linear-gradient(180deg, #2A2E2A 0%, var(--card2) 100%);
  border-radius: var(--r2) var(--r2) 0 0;
}
.modal-card .modal-head h3 {
  margin: 0;
  color: var(--gold);
  font-size: 1.05rem;
  font-weight: 600;
  font-family: 'Playfair Display', serif;
}
.modal-card .modal-x {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text2);
  width: 30px;
  height: 30px;
  border-radius: var(--r);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.modal-card .modal-x:hover {
  color: var(--text);
  border-color: var(--gold-dim);
  background: rgba(201,168,76,.1);
}

/* Inputs in der Modal-Card — etwas dunkler als die Card selbst,
   damit Felder als "vertieft" wahrgenommen werden */
.modal-card input[type="text"],
.modal-card input[type="email"],
.modal-card input[type="number"],
.modal-card input[type="date"],
.modal-card input[type="tel"],
.modal-card input[type="url"],
.modal-card textarea,
.modal-card select {
  width: 100%;
  padding: .55rem .7rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  font-size: .9rem;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color .15s;
}
.modal-card input:focus,
.modal-card textarea:focus,
.modal-card select:focus {
  outline: none;
  border-color: var(--gold);
}
.modal-card label {
  display: block;
  font-size: .72rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text2);
  margin-bottom: .35rem;
  font-weight: 500;
}

/* Section-Headlines im Modal (📍 Adresse, 📞 Kontakt, etc.) */
.modal-card h4 {
  color: var(--text2);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .02em;
  font-family: inherit;
}
