/* Sanora Büro – Bildschirmgrößen: großes/mehrere Monitore, iPad, iPhone. Ergänzt style.css, ändert sie nicht. */

/* ---------- Elemente der mobilen Bedienung (am Desktop ausgeblendet) ---------- */
.menu-toggle, .mobile-tabs { display: none; }
.window-button { white-space: nowrap; }
.nav-drawer { position: fixed; inset: 0; z-index: 60; display: none; }
.nav-drawer.open { display: block; }
.nav-drawer-backdrop { position: absolute; inset: 0; background: #14232b66; }
.nav-drawer-panel { position: absolute; inset: 0 auto 0 0; width: min(86vw, 340px); background: #fafbf7; border-right: 1px solid var(--line);
  padding: calc(16px + env(safe-area-inset-top)) 14px calc(16px + env(safe-area-inset-bottom)); overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.nav-drawer-panel .nav-item { display: flex; align-items: center; justify-content: flex-start; text-align: left; gap: 13px; width: 100%;
  padding: 12px 13px; border-radius: 9px; color: #748177; font-size: 15px; background: none; border: 0; min-height: 46px; }
.nav-drawer-panel .nav-item.active { background: #e6edde; color: var(--green); font-weight: 600; }
.nav-drawer-panel .nav-item span { width: 18px; text-align: center; }
[data-op-banner] { margin-bottom: 14px; }
.nav-drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.nav-drawer-head img { width: 120px; height: auto; }
.nav-drawer-account { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.nav-drawer-account small { color: var(--muted, #64765f); }

/* ---------- Touch (iPad, iPhone): ausreichend große Tippflächen, kein Zoom beim Tippen ---------- */
@media (pointer: coarse) {
  button, .text-button, select, input:not([type=checkbox]):not([type=radio]), textarea { min-height: 44px; }
  input, select, textarea { font-size: 16px; }
  nav button, .nav-item { min-height: 44px; }
  .check-field input { width: 22px; height: 22px; }
}

/* ---------- große und mehrere Bildschirme ---------- */
@media (min-width: 1900px) {
  .work-grid { grid-template-columns: minmax(0, 1fr) 440px; }
  .settings-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  main { padding: 36px 56px; }
}
@media (min-width: 2500px) {
  .settings-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .customer-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
}

/* ---------- iPad hochkant und kleine Laptops ---------- */
@media (max-width: 1100px) and (min-width: 761px) {
  .window-button { display: none; }
}

/* ---------- iPhone und schmale Fenster ---------- */
@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar { position: sticky; top: 0; z-index: 30; width: 100%; display: flex; flex-direction: row; align-items: center; justify-content: space-between;
    padding: calc(8px + env(safe-area-inset-top)) calc(14px + env(safe-area-inset-right)) 8px calc(14px + env(safe-area-inset-left));
    border-right: 0; border-bottom: 1px solid var(--line); background: #fafbf7; }
  .sidebar .brand { margin: 0; }
  .sidebar .brand-logo { width: 112px; }
  .sidebar .brand-sub, .sidebar .nav-label, .sidebar-bottom, .sidebar #navigation { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; gap: 6px; }
  .workspace { margin: 0; }
  .topbar { height: auto; padding: 10px 14px; gap: 8px; flex-wrap: wrap; }
  .breadcrumb, .layout-bar, .window-button { display: none; }
  .top-actions { width: 100%; display: flex; gap: 8px; }
  .top-actions .search { flex: 1; min-width: 0; }
  .search input { width: 100%; }
  .top-actions > .primary { padding-left: 12px; padding-right: 12px; }
  .account-controls { display: none; }
  main { padding: 16px 14px calc(88px + env(safe-area-inset-bottom)); }
  .mobile-tabs { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: #fafbf7f2; border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
  .mobile-tabs button { display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: 0; padding: 6px 2px; font-size: 11px;
    color: var(--muted, #64765f); min-height: 48px; border-radius: 10px; }
  .mobile-tabs button span { font-size: 18px; line-height: 1; }
  .mobile-tabs button.active { color: var(--ink); background: #e7efe2; font-weight: 600; }
  dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; border: 0;
    padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
  dialog .form-foot { position: sticky; bottom: 0; background: #fff; box-shadow: 0 -8px 16px #fff; padding: 10px 0; flex-wrap: wrap; z-index: 2; }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .beta-banner { padding: 8px 14px; }
}

/* ---------- KI-Vorschläge ---------- */
.ai-block { margin-top: 18px; }
.ai-job .detail-row strong { user-select: all; }
.ai-positions { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.ai-positions th, .ai-positions td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
@media (max-width: 760px) { .ai-positions { display: block; overflow-x: auto; } }
