/* ============================================================
   JUSTANDERSSON - Konto-Dashboard (U17)
   ============================================================ */

:root {
  --blue: #3D5E77;
  --blue-dark: #2C4A5E;
  --blue-light: #5A8BA6;
  --lime: #C6CF15;
  --gray: #A2A2A2;
  --gray-light: #E8E8E8;
  --white: #FFFFFF;
  --bg: #F8F9FA;
  --text: #1A1A2E;
  --text-light: #555566;
  --glass-bg: rgba(255,255,255,0.75);
  --glass-border: rgba(255,255,255,0.4);
  --glass-shadow: 0 8px 32px rgba(61,94,119,0.12);
  --sidebar-w: 240px;
  --radius: 16px;
  --radius-sm: 10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

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

.konto-layout {
  display: flex;
  min-height: calc(100vh - 70px);
  padding-top: 70px; /* Nav-Hoehe */
}

/* -- Sidebar ------------------------------------------------ */

.konto-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-right: 1px solid var(--glass-border);
  box-shadow: 4px 0 20px rgba(61,94,119,0.06);
  display: flex;
  flex-direction: column;
  padding: 24px 0 32px;
  position: sticky;
  top: 70px;
  height: calc(100vh - 70px);
  overflow-y: auto;
}

.konto-sidebar-header {
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--gray-light);
  margin-bottom: 12px;
}

.konto-sidebar-greeting {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 2px;
}

.konto-sidebar-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--blue-dark);
}

.konto-sidebar-email {
  font-size: 12px;
  color: var(--gray);
  margin-top: 2px;
  word-break: break-all;
}

/* Sidebar Navigation */

.konto-nav {
  list-style: none;
  padding: 0 10px;
  flex: 1;
}

.konto-nav li {
  margin-bottom: 2px;
}

.konto-nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
  position: relative;
}

.konto-nav-btn:hover {
  background: rgba(61,94,119,0.07);
  color: var(--blue-dark);
}

.konto-nav-btn.active {
  background: var(--blue);
  color: #fff;
  font-weight: 600;
}

.konto-nav-btn .nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.konto-nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #e53e3e;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile-Toggle fuer Sidebar */

.konto-sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 500;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  border: none;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(61,94,119,0.35);
}

/* -- Haupt-Content ------------------------------------------ */

.konto-content {
  flex: 1;
  min-width: 0;
  padding: 32px;
  max-width: 900px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.tab-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gray-light);
}

.tab-placeholder {
  background: var(--glass-bg);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  color: var(--text-light);
  font-size: 15px;
}

/* -- Profil-Formular ---------------------------------------- */

.profile-form {
  background: var(--glass-bg);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
}

.profile-form h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-field.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
}

.form-label span {
  color: #e53e3e;
  margin-left: 2px;
}

.form-hint {
  font-size: 11px;
  color: var(--gray);
  margin-top: 2px;
}

.form-input,
.form-select {
  padding: 9px 13px;
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: #fff;
  transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus {
  border-color: var(--blue);
}

.form-actions {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-primary {
  padding: 10px 24px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover { background: var(--blue-dark); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.form-success {
  color: #276749;
  font-size: 13px;
  font-weight: 600;
  display: none;
}

.form-error-msg {
  color: #c53030;
  font-size: 13px;
  display: none;
}

/* -- Community-Bereich -------------------------------------- */

.community-section {
  border-top: 2px solid var(--gray-light);
  margin-top: 24px;
  padding-top: 20px;
}

.community-section h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 12px;
}

.community-rules-toggle {
  background: none;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  color: var(--blue);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.community-rules-text {
  display: none;
  background: #f7f9fc;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 14px;
}

.community-rules-text.open { display: block; }

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.checkbox-row input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.checkbox-row label {
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  line-height: 1.4;
}

.community-fields {
  display: none;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
  padding: 16px;
  background: #f0f4f8;
  border-radius: var(--radius-sm);
}

.community-fields.open { display: flex; }

.radio-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  cursor: pointer;
}

.community-note {
  font-size: 12px;
  color: var(--text-light);
  font-style: italic;
}

/* -- Konto loeschen ----------------------------------------- */

.danger-zone {
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-top: 8px;
}

.danger-zone h3 {
  font-size: 15px;
  font-weight: 700;
  color: #c53030;
  margin-bottom: 8px;
}

.danger-zone p {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 16px;
  line-height: 1.5;
}

.btn-danger {
  padding: 9px 20px;
  background: #e53e3e;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-danger:hover { background: #c53030; }

/* -- Delete-Dialog ------------------------------------------ */

.delete-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
}

.delete-dialog-overlay.open { display: flex; }

.delete-dialog {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px;
  max-width: 440px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.delete-dialog h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 12px;
}

.delete-dialog p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 16px;
}

.delete-dialog-step { display: none; }
.delete-dialog-step.active { display: block; }

.delete-dialog-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-secondary {
  padding: 9px 20px;
  background: none;
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  color: var(--text-light);
  transition: border-color 0.2s;
}

.btn-secondary:hover { border-color: var(--blue); color: var(--blue); }

/* -- Loading-Spinner ---------------------------------------- */

.konto-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--text-light);
  font-size: 15px;
  gap: 10px;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-light);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

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

@media (max-width: 768px) {
  .konto-sidebar {
    position: fixed;
    left: -100%;
    top: 70px;
    z-index: 400;
    height: calc(100vh - 70px);
    transition: left 0.3s ease;
    width: 260px;
  }

  .konto-sidebar.open { left: 0; }

  .konto-sidebar-toggle { display: flex; align-items: center; justify-content: center; }

  .konto-content { padding: 20px 16px; }

  .form-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Phase 6 - Tickets & Anfragen
   ============================================================ */

/* -- SVG Nav-Icons mit Lime-Glow ---------------------------- */

.konto-nav-btn .nav-icon svg {
  display: block;
  color: currentColor;
  transition: filter 0.2s, color 0.2s;
}

.konto-nav-btn.active .nav-icon svg {
  color: #C6CF15;
  filter: drop-shadow(0 0 6px rgba(198,207,21,0.8));
}

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

.tickets-layout {
  display: grid !important;
  grid-template-columns: 280px 1fr;
  gap: 0;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 520px;
  background: #fff;
}

.tickets-sidebar {
  border-right: 1px solid var(--gray-light);
  display: flex;
  flex-direction: column;
}

.tickets-toolbar {
  padding: 12px;
  border-bottom: 1px solid var(--gray-light);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ticket-filter {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.tfilter-btn {
  padding: 3px 8px;
  border: 1px solid var(--gray-light);
  border-radius: 20px;
  background: none;
  font-size: 11px;
  font-family: inherit;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.15s;
}

.tfilter-btn.active,
.tfilter-btn:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

#ticket-list {
  flex: 1;
  overflow-y: auto;
}

.ticket-item {
  padding: 12px 14px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background 0.12s;
}

.ticket-item:hover { background: #f8f9fa; }
.ticket-item.active { background: rgba(61,94,119,0.06); border-left: 3px solid var(--blue); }

.ticket-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 5px;
}

.ticket-betreff {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-unread {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #e53e3e;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 6px;
}

.ticket-item-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ticket-date {
  font-size: 11px;
  color: var(--gray);
}

/* Status-Badges */

.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.status-open    { background: #ebf8f0; color: #276749; }
.status-wip     { background: #fef9e7; color: #9c6f00; }
.status-done    { background: #f0f0f0; color: #666; }
.status-alert   { background: #fff3cd; color: #c2410c; font-weight:700; }
.status-transit { background: #e0e7ff; color: #4338ca; }

/* Rückmeldungs-Box */
.inq-rueckmeldung-box {
  background: #fffbeb;
  border: 2px solid #f59e0b;
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.inq-rueckmeldung-title {
  font-size: 14px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 8px;
}
.inq-upload-zone-k {
  border: 2px dashed #fcd34d;
  border-radius: 8px;
  padding: 10px 14px;
  text-align: center;
  cursor: pointer;
  font-size: 12px;
  color: #92400e;
  margin-bottom: 8px;
  transition: border-color .15s;
}
.inq-upload-zone-k:hover, .inq-upload-zone-k.drag {
  border-color: #f59e0b;
  background: #fef3c7;
}
.inq-upload-previews-k { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:8px; }

/* DHL-Block */
.inq-dhl-block {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 13px;
}
.btn-dhl-check {
  padding: 4px 12px;
  background: #ffcb00;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  color: #222;
  white-space: nowrap;
}
.btn-dhl-check:hover { background: #f0be00; }

/* Dringende Anfrage-Card */
.inquiry-card-urgent {
  border-color: #f59e0b !important;
  background: #fffbeb !important;
}

/* -- Ticket-Detail ------------------------------------------ */

.tickets-detail {
  display: flex;
  flex-direction: column;
}

.ticket-detail-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  gap: 10px;
  font-size: 14px;
}

.ticket-detail-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-light);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.ticket-detail-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--blue-dark);
  margin-bottom: 4px;
}

/* Nachrichten-Verlauf */

.msg-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 300px;
  max-height: 380px;
}

.msg-bubble {
  max-width: 75%;
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  position: relative;
}

.msg-admin {
  align-self: flex-start;
  background: #f0f4f8;
  border-bottom-left-radius: 3px;
}

.msg-kunde {
  align-self: flex-end;
  background: var(--blue);
  color: #fff;
  border-bottom-right-radius: 3px;
}

.msg-time {
  display: block;
  font-size: 10px;
  color: rgba(0,0,0,0.35);
  margin-top: 4px;
  text-align: right;
}

.msg-kunde .msg-time { color: rgba(255,255,255,0.55); }

/* Spezial-Nachrichten */

.msg-zahlung {
  background: #fffbeb;
  border: 1px solid #f6e05e;
  border-left: 4px solid #d4a017;
  border-radius: 8px;
  padding: 14px 16px;
  max-width: 460px;
}

.msg-zahlung-title {
  font-weight: 700;
  font-size: 13px;
  color: #9c6f00;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.msg-zahlung-note {
  font-size: 13px;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.5;
}

.msg-zahlung-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg-zahlung-bank,
.msg-zahlung-pp {
  background: rgba(255,255,255,.7);
  border: 1px solid #f0dfa0;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text);
}

.msg-zahlung-bank strong,
.msg-zahlung-pp strong {
  color: var(--blue-dark);
  font-size: 13px;
  display: block;
  margin-bottom: 2px;
}

.msg-zahlung-amounts {
  border-top: 1px solid #f0dfa0;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.msg-zahlung-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  color: var(--text);
  flex-wrap: wrap;
}

.msg-zahlung-row span { flex: 1; min-width: 160px; }
.msg-zahlung-row em   { font-size: 11px; color: var(--text-light); }

.msg-zahlung-row-pp {
  color: var(--text-light);
  font-size: 11px;
}

.msg-zahlung-sum {
  font-size: 15px;
  font-weight: 700;
  color: var(--blue-dark);
  white-space: nowrap;
}

.msg-dhl-link {
  display: inline-block;
  padding: 6px 12px;
  background: #ffcb00;
  color: #222;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  margin-top: 4px;
}

.msg-img {
  max-width: 200px;
  border-radius: 6px;
  cursor: zoom-in;
  transition: max-width 0.2s;
}
.msg-img.msg-img-full { max-width: 100%; cursor: zoom-out; }

.msg-pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f7f9fc;
  border: 1px solid var(--gray-light);
  border-radius: 6px;
  font-size: 12px;
  color: var(--blue);
  text-decoration: none;
}

/* Eingabe-Bereich */

.msg-input-area {
  padding: 12px;
  border-top: 1px solid var(--gray-light);
}

.msg-input-area.msg-closed { background: #fafafa; }
.msg-closed-note { font-size: 13px; color: var(--gray); text-align: center; padding: 8px 0; }

.msg-textarea {
  width: 100%;
  resize: vertical;
  min-height: 70px;
  margin-bottom: 8px;
}

.msg-input-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* -- Anfragen-Tab ------------------------------------------- */

.inquiry-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  gap: 12px;
  transition: border-color 0.2s, background 0.2s;
}
.inquiry-card:hover { border-color: var(--blue-light); background: #f7fafc; }
.inquiry-card.active { border-color: var(--blue); background: #eef4f8; }

.inquiries-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 700px) {
  .inquiries-layout { grid-template-columns: 1fr; }
  .inquiry-detail-panel { margin-top: 0; }
}

.inquiry-detail-panel {
  background: #fff;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
  padding: 24px;
}
.inq-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-light);
}
.inq-detail-title { font-size: 17px; font-weight: 700; color: var(--blue-dark); }
.inq-detail-date  { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.inq-section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-light); margin-bottom: 12px; }
.inq-items-section { margin-bottom: 20px; }
.inq-item { padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.inq-item:last-child { border-bottom: none; }
.inq-item-name { font-weight: 600; font-size: 14px; display: flex; justify-content: space-between; }
.inq-item-price { color: var(--blue); font-weight: 700; }
.inq-item-details { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.inq-item-detail-table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 12px; }
.inq-item-detail-table td { padding: 2px 6px 2px 0; vertical-align: top; }
.inq-detail-label { color: var(--text-light); white-space: nowrap; width: 130px; font-weight: 500; }
.inq-detail-val { color: var(--text-dark, #2d3748); }
.inq-item-note { font-size: 12px; color: var(--text-light); font-style: italic; margin-top: 4px; }
.inq-note-global { font-size: 13px; color: var(--text-light); background: #f8f9fa; padding: 10px 14px; border-radius: 8px; margin-bottom: 20px; }
.inq-messages { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--gray-light); }
.inq-messages-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-light); margin-bottom: 12px; }
.inq-msg { padding: 10px 14px; border-radius: 8px; margin-bottom: 8px; max-width: 85%; }
.inq-msg-admin { background: #eef4f8; margin-right: auto; }
.inq-msg-kunde { background: #f0f5e8; margin-left: auto; }
.inq-msg-meta { font-size: 11px; color: var(--text-light); margin-bottom: 4px; }
.inq-msg-text { font-size: 14px; white-space: pre-wrap; }
.inq-detail-actions { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--gray-light); }
.inq-inline-reply { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--gray-light); }



.inquiry-number {
  font-size: 15px;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 3px;
}

.inquiry-meta {
  font-size: 12px;
  color: var(--text-light);
}

.inquiry-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

/* -- Allgemein ---------------------------------------------- */

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
}

.empty-note {
  text-align: center;
  color: var(--gray);
  font-size: 14px;
  padding: 32px;
}

/* -- Modal -------------------------------------------------- */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 8000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open { display: flex; }

.modal-box {
  background: #fff;
  border-radius: var(--radius);
  width: 90%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-light);
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--blue-dark);
}

.modal-body { padding: 20px; }

/* -- Responsive Phase 6 ------------------------------------- */

@media (max-width: 768px) {
  .tickets-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .tickets-sidebar { border-right: none; border-bottom: 1px solid var(--gray-light); max-height: 220px; }
  .msg-list { max-height: 240px; }
  .inquiry-card { flex-direction: column; align-items: flex-start; }
  .inquiry-card-right { align-items: flex-start; }
}

/* Modal-Close-Button */
.modal-close-btn {
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-light);
  padding: 0 4px;
  transition: color 0.15s;
}
.modal-close-btn:hover { color: var(--blue-dark); }

/* Datei-Upload Button im Chat */
.msg-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-light);
  background: #fff;
  transition: all .15s;
  margin-left: 4px;
}
.msg-upload-btn:hover {
  color: var(--blue);
  border-color: var(--blue-light);
  background: #f0f4f8;
}
