.iphone-nav {
  display: none;
}

@media screen and (max-width: 700px) {
  html body {
    font-size: 16px;
    padding: 10px max(10px, env(safe-area-inset-right)) 28px max(10px, env(safe-area-inset-left));
    -webkit-text-size-adjust: 100%;
  }

  body .ticker-wrap,
  body .rs-watermark,
  body .topbar .brandtext .sub {
    display: none;
  }

  body .page-shell > .container {
    width: 100%;
    min-width: 0;
  }

  body .container .topbar {
    display: grid;
    gap: 12px;
    padding: 12px;
  }

  body .topbar .brand img {
    width: 42px;
    height: 42px;
    border-radius: 10px;
  }

  body .topbar .iphone-nav,
  body .topbar .rs-main-nav.rs-menu-open {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  body .topbar .rs-main-nav {
    display: none;
  }

  body .topbar .iphone-nav .btn,
  body main .btn,
  body .topbar .rs-main-nav .btn {
    box-sizing: border-box;
    min-height: 44px;
    padding: 8px 11px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.2;
  }

  body main .card {
    min-width: 0;
    padding: 12px;
    overflow-wrap: anywhere;
  }

  body main input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  body main textarea,
  body main select {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 44px;
    font-size: 16px;
  }

  body main .inline {
    flex-wrap: wrap;
  }

  body main .grid,
  body main .kpi {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body main .quote-layout .quote-col-product {
    order: 2;
  }

  body main .quote-layout .quote-col-product #product_select {
    height: auto !important;
    max-height: 215px;
  }

  body main .iphone-table,
  body main .card:has(> table) {
    max-width: 100%;
    overflow-x: auto;
  }

  body main .iphone-table table {
    min-width: 465px;
  }

  body main th,
  body main td {
    font-size: 14px;
    padding: 9px;
  }

  body main .iphone-quote-actions {
    justify-content: flex-start !important;
    gap: 6px;
  }

  body main .invoice-wrap,
  body main .quote-wrap {
    min-width: 0;
  }
}

/* Lichte weergave (per apparaat te kiezen met de knop in de bovenbalk): het donkere thema omgekeerd,
   foto's, logo's en tekeningen behouden hun echte kleuren. */
html[data-weergave="licht"] {
  filter: invert(1) hue-rotate(180deg);
  background: #fafafa;
}
html[data-weergave="licht"] img,
html[data-weergave="licht"] video,
html[data-weergave="licht"] canvas,
html[data-weergave="licht"] iframe,
html[data-weergave="licht"] object,
html[data-weergave="licht"] embed,
html[data-weergave="licht"] svg image {
  filter: invert(1) hue-rotate(180deg);
}
.rs-weergave-knop {
  min-width: 44px;
  white-space: nowrap;
}
.rs-weergave-paneel {
  position: absolute; top: calc(100% + 8px); right: 12px; z-index: 9000; width: 330px; text-align: left; max-width: calc(100vw - 16px); box-sizing: border-box;
  background: #10263c; color: #e8f1f8; border: 1px solid rgba(31, 184, 176, .55); border-radius: 16px;
  padding: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, .55); font-size: 14px;
}
.rs-weergave-paneel[hidden] { display: none; }
.rs-wp-kop { font-weight: 800; font-size: 15px; margin-bottom: 10px; }
.rs-wp-rij { margin: 10px 0; }
.rs-wp-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; opacity: .7; margin-bottom: 6px; }
.rs-wp-groep { display: flex; flex-wrap: wrap; gap: 6px; }
.rs-wp-keuze {
  flex: 1 1 auto; min-height: 36px; padding: 6px 10px; border-radius: 10px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .05); color: inherit; font: inherit; font-weight: 600;
}
.rs-wp-keuze.actief { background: #1FB8B0; border-color: #1FB8B0; color: #062a2c; font-weight: 800; }
.rs-wp-voet { font-size: 12px; opacity: .6; margin-top: 8px; }
@media screen and (max-width: 700px) {
  .rs-weergave-paneel { position: fixed; top: 70px; left: 8px; right: 8px; width: auto; }
}
.rs-offline-balk {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999;
  background: #5a1720; color: #ffe2e6; text-align: center; padding: 8px 12px; font-size: 15px;
}
