/* =========================================================
   RESPONSIVE / MOBILE ANPASSUNGEN
   ========================================================= */

@media (max-width: 980px) {
  .db-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .header-inner { flex-wrap: wrap; }
  .global-search { order: 3; max-width: 100%; flex-basis: 100%; }
  #menu-toggle {
    display: inline-flex;
  }
  .main-nav { display: none; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 6px 0; }
  .main-nav a { display: block; padding: 12px 20px; border-bottom: 1px solid var(--border); }
  .main-nav a.active { border-bottom: 1px solid var(--gold); background: rgba(201,162,75,0.08); }
  .main-nav details.nav-drop summary { display: block; padding: 12px 20px; border-bottom: 1px solid var(--border); }
  .main-nav .nav-drop-menu { border: none; border-radius: 0; box-shadow: none; background: var(--bg-0); padding: 0; }
  .main-nav .nav-drop-menu a { padding: 10px 20px 10px 34px; border-radius: 0; border-bottom: 1px solid var(--border); }
}

@media (max-width: 640px) {
  .hero { padding: 30px 4px 16px; }
  .hero h1 { font-size: 2rem; }
  main { padding: 16px 12px 60px; }
  .detail-hero { flex-direction: column; padding: 18px; }
  .detail-hero .actions { margin-left: 0; }
  .card-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .info-grid { grid-template-columns: 1fr; }
  .assistant-select-row { flex-direction: column; }
  .header-actions .label-text { display: none; }
}

@media (max-width: 420px) {
  .card-grid { grid-template-columns: 1fr; }
  .db-grid { grid-template-columns: 1fr; }
  .brand-text .t2 { display: none; }
}

/* Tabellen auf Mobilgeräten als Karten darstellen */
@media (max-width: 620px) {
  .prose table, .prose table thead, .prose table tbody, .prose table tr, .prose table td, .prose table th,
  table.data-table, table.data-table thead, table.data-table tbody, table.data-table tr, table.data-table td, table.data-table th {
    display: block;
  }
  .prose table thead, table.data-table thead { display: none; }
  .prose table tr, table.data-table tr { border: 1px solid var(--border); border-radius: 8px; margin: 8px; padding: 6px 0; }
  .prose table td, table.data-table td {
    border: none;
    padding: 6px 12px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    white-space: normal;
    text-align: right;
  }
  .prose table td::before, table.data-table td::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-weight: 600;
    flex-shrink: 0;
    text-align: left;
  }
  table.data-table td.name-cell { font-size: 0.95rem; }
}

/* Große Touch-Flächen */
@media (pointer: coarse) {
  .check-item { padding: 12px 10px; }
  .check-item input[type=checkbox] { width: 22px; height: 22px; }
  .filter-chip { padding: 9px 16px; }
  .icon-btn { padding: 10px 12px; }
}
