:root {
  --mint: #3ecfb2;
  --mint-dark: #22a891;
  --mint-soft: #dff6ef;
  --gold: #f5c842;
  --gold-soft: #fff5d2;
  --ink: #1a1714;
  --dark: #2c2c2a;
  --muted: #6f7774;
  --line: #d9dfdc;
  --surface: #ffffff;
  --page: #f7f9f8;
  --sidebar: #161d1c;
  --sidebar-2: #222b29;
  --danger: #b24c4c;
  --danger-soft: #fff0ee;
  --ok-soft: #e7f7ef;
  --shadow: 0 12px 28px rgba(26, 23, 20, 0.06);
  font-family: "Gill Sans MT", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--page);
  color: var(--ink);
  font-family: "Gill Sans MT", Arial, sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.auth-hidden {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(62, 207, 178, 0.12), rgba(245, 200, 66, 0.1)),
    var(--page);
}

.login-card {
  width: min(440px, 100%);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 26px;
  display: grid;
  gap: 14px;
}

.login-card img {
  width: 138px;
  height: auto;
}

.login-card h1 {
  margin: 0;
  color: var(--dark);
  font-size: 26px;
  line-height: 1.1;
}

.login-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.login-card small {
  color: var(--muted);
  line-height: 1.4;
}

.microsoft-button {
  min-height: 46px;
  border: 1px solid var(--dark);
  border-radius: 8px;
  background: var(--dark);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 800;
}

.microsoft-mark {
  width: 18px;
  height: 18px;
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}

.microsoft-mark {
  background:
    linear-gradient(90deg, #f25022 0 48%, transparent 48% 52%, #7fba00 52% 100%) top / 100% 48% no-repeat,
    linear-gradient(90deg, #00a4ef 0 48%, transparent 48% 52%, #ffb900 52% 100%) bottom / 100% 48% no-repeat;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
}

.sidebar {
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
  color: #ffffff;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  padding: 2px 2px 16px;
}

.brand-logo {
  display: block;
  width: 154px;
  max-width: 100%;
  height: 130px;
  border-radius: 8px;
  background: #ffffff url("./assets/logo_24Thuis_final_clean.png") center / contain no-repeat;
  padding: 8px;
}

.sidebar-brand small {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-list hr {
  width: 100%;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  margin: 12px 0;
}

.nav-item,
.logout-button {
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  padding: 11px 12px;
  text-align: left;
  color: rgba(255, 255, 255, 0.88);
  background: transparent;
  display: flex;
  align-items: center;
}

.nav-item:hover,
.logout-button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  background: var(--mint);
  color: #102824;
  font-weight: 800;
}

.logout-button {
  margin-top: auto;
}

.main {
  min-width: 0;
  padding: 18px 22px 82px;
}

.topbar {
  min-height: 72px;
  border-bottom: 1px solid var(--line);
  margin: -18px -22px 16px;
  padding: 14px 22px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(360px, 1.1fr);
  align-items: center;
  gap: 18px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
}

.product-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-logo {
  display: none;
  width: 66px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 4px;
  background: #ffffff;
}

.topbar-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-title strong {
  display: block;
  font-size: 22px;
  color: var(--dark);
}

.product-title strong span {
  color: var(--mint-dark);
}

.product-title small {
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.user-chip,
.icon-button,
.compact-button {
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--dark);
  font-weight: 800;
}

.user-chip {
  padding: 8px 10px;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button {
  width: 38px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

.compact-button {
  padding: 8px 10px;
}

.context-panel {
  min-width: 0;
}

.context-panel summary {
  display: none;
}

.controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

label {
  display: grid;
  gap: 4px;
  min-width: 170px;
}

label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

select,
input,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 9px 12px;
  outline: none;
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(62, 207, 178, 0.18);
}

textarea {
  resize: vertical;
  line-height: 1.45;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.flow-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.42fr);
  gap: 14px;
  margin-bottom: 14px;
}

.flow-copy,
.next-action-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.flow-copy {
  border-left: 5px solid var(--mint);
}

.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--mint-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.flow-copy h1,
.next-action-card h2 {
  margin: 0;
  color: var(--dark);
  line-height: 1.1;
}

.flow-copy h1 {
  font-size: clamp(28px, 3.2vw, 44px);
}

.flow-copy p,
.next-action-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.flow-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.status-chip {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--mint-soft);
  color: var(--dark);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 800;
}

.next-action-card {
  display: grid;
  align-content: start;
  gap: 10px;
}

.next-action-card small {
  color: var(--muted);
  font-weight: 800;
}

.journey-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.journey-step {
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--dark);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 8px;
  align-items: center;
  padding: 10px;
  text-align: left;
}

.journey-step span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f1f3f2;
  color: var(--dark);
  font-weight: 800;
}

.journey-step strong {
  font-size: 15px;
}

.journey-step small {
  grid-column: 2;
  color: var(--muted);
  line-height: 1.25;
}

.journey-step.active {
  border-color: var(--mint);
  background: var(--mint-soft);
  box-shadow: inset 0 0 0 1px rgba(62, 207, 178, 0.3);
}

.journey-step.done span {
  background: var(--mint);
  color: #102824;
}

.pilot-guide {
  display: none;
}

.pilot-guide strong {
  display: block;
  color: var(--dark);
  margin-bottom: 2px;
}

.pilot-guide small {
  color: var(--muted);
}

.pilot-guide button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--mint-soft);
  color: var(--dark);
  padding: 7px 10px;
  font-family: Arial, sans-serif;
  font-weight: 800;
  white-space: nowrap;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1.15fr) minmax(280px, 0.72fr);
  gap: 14px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 14px;
  min-width: 0;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.panel-title h2 {
  margin: 0;
  color: var(--dark);
  font-size: 20px;
  line-height: 1.15;
}

.panel-title small {
  color: var(--muted);
}

.panel-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--dark);
  border: 1px solid var(--line);
  background: #ffffff;
  font-weight: 800;
  flex: 0 0 auto;
}

.panel-icon.ok {
  color: var(--mint-dark);
  border-color: rgba(62, 207, 178, 0.6);
}

.card-start {
  grid-column: 1;
}

.card-ons {
  grid-column: 2;
}

.card-quality {
  grid-column: 3;
}

.card-checklist {
  grid-column: 1 / span 2;
}

.card-close {
  grid-column: 3;
}

.split-row,
.progress-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--dark);
  flex-wrap: wrap;
}

.staff-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.staff-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 6px;
  min-height: 66px;
}

.staff-grid span {
  color: var(--muted);
  font-size: 12px;
}

.staff-grid strong {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--mint-soft);
  color: var(--dark);
}

.notice-list {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 4px;
}

.notice-list strong {
  color: var(--dark);
}

.notice-list button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
  padding: 9px 12px;
  color: var(--dark);
}

.text-link {
  border: 0;
  background: transparent;
  color: var(--mint-dark);
  font-weight: 800;
  justify-self: end;
  display: block;
  margin-left: auto;
  margin-top: 12px;
  padding: 6px 0;
}

.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.tabs button {
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--dark);
  padding: 6px 10px;
}

.tabs button.active {
  background: var(--mint);
  border-color: var(--mint);
  font-weight: 800;
}

.ons-table,
.actions-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.ons-row,
.action-row {
  display: grid;
  grid-template-columns: 0.8fr 1.3fr 1.3fr auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
}

.ons-row:last-child,
.action-row:last-child {
  border-bottom: 0;
}

.ons-row.header,
.action-row.header {
  background: #f1f3f2;
  font-weight: 800;
  color: var(--dark);
}

.pill {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid transparent;
}

.pill.ok {
  background: var(--ok-soft);
  color: #25765a;
}

.pill.gold {
  background: var(--gold-soft);
  color: #896b00;
  border-color: rgba(245, 200, 66, 0.6);
}

.pill.red {
  background: var(--danger-soft);
  color: var(--danger);
}

.ring {
  width: 154px;
  height: 154px;
  border-radius: 50%;
  margin: 18px auto 14px;
  background: conic-gradient(var(--mint) 0 85%, #ebecea 85% 100%);
  display: grid;
  place-items: center;
  position: relative;
}

.ring::after {
  content: "";
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: #ffffff;
  position: absolute;
}

.ring span,
.ring small {
  position: relative;
  z-index: 1;
  display: block;
  text-align: center;
}

.ring span {
  font-size: 30px;
  font-weight: 800;
  color: var(--dark);
}

.ring small {
  color: var(--muted);
}

.ring.small {
  width: 150px;
  height: 150px;
  margin: 0 auto;
}

.ring.small::after {
  width: 112px;
  height: 112px;
}

.large-ring {
  width: 220px;
  height: 220px;
}

.large-ring::after {
  width: 168px;
  height: 168px;
}

.quality-list {
  display: grid;
  gap: 9px;
}

.quality-list div {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  color: var(--dark);
}

.quality-list.expanded {
  margin-top: 40px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot.mint {
  background: var(--mint);
}

.dot.gold {
  background: var(--gold);
}

.dot.gray {
  background: #b6bab8;
}

.progress-line {
  margin-bottom: 10px;
}

.progress-track {
  height: 14px;
  border-radius: 999px;
  background: #eeefed;
  overflow: hidden;
  flex: 1;
}

.progress-track b {
  display: block;
  height: 100%;
  width: 0;
  background: var(--mint);
}

.check-table,
.close-list,
.check-list,
.timeline-list,
.module-grid,
.placeholder-list,
.close-summary,
.report-output,
.ai-output {
  display: grid;
  gap: 8px;
}

.check-row,
.timeline-item,
.module-card,
.placeholder-row,
.summary-box,
.report-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 12px;
}

.support-header {
  border-left: 4px solid var(--mint);
}

.ai-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.ai-mode-card {
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--dark);
  padding: 11px;
  text-align: left;
  display: grid;
  gap: 5px;
}

.ai-mode-card strong {
  color: var(--dark);
}

.ai-mode-card span {
  color: var(--muted);
  line-height: 1.3;
}

.ai-mode-card.active {
  border-color: var(--mint);
  background: var(--mint-soft);
  box-shadow: inset 0 0 0 1px rgba(62, 207, 178, 0.35);
}

.check-row {
  min-height: 42px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 10px;
  align-items: center;
}

.check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--mint);
}

.check-row strong {
  color: var(--dark);
}

.check-row small,
.timeline-item small,
.module-card small,
.summary-box span,
.report-block span {
  color: var(--muted);
}

.time-cell {
  color: var(--muted);
  min-width: 48px;
  text-align: right;
}

.gate-note,
.demo-banner {
  border: 1px solid var(--mint);
  background: linear-gradient(90deg, rgba(62, 207, 178, 0.1), rgba(62, 207, 178, 0.02));
  color: var(--dark);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.close-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.close-button {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eeeae5;
  color: #aaa29a;
  font-weight: 800;
  margin-top: 12px;
  cursor: not-allowed;
}

.close-button.ready {
  cursor: pointer;
  color: #102824;
  border-color: var(--mint);
  background: var(--mint);
}

.demo-banner {
  margin-top: 14px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
}

.demo-banner strong {
  color: var(--mint-dark);
}

.demo-banner span {
  color: var(--muted);
}

.demo-banner button {
  border: 0;
  background: transparent;
  color: var(--mint-dark);
  font-weight: 800;
}

.subpage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.subpage-grid.two {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.65fr);
}

.panel.wide {
  width: 100%;
}

.module-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.module-card {
  display: grid;
  gap: 8px;
}

.module-card header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.action-form,
.stacked {
  display: grid;
  gap: 10px;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.primary-button,
.secondary-button {
  min-height: 42px;
  border-radius: 8px;
  padding: 9px 12px;
  font-weight: 800;
}

.primary-button {
  border: 1px solid var(--mint);
  background: var(--mint);
  color: #102824;
}

.primary-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.secondary-button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--dark);
}

.wide-button {
  width: 100%;
}

.action-row {
  grid-template-columns: 1.4fr 1fr 1fr 0.8fr auto;
}

.feedback-list {
  display: grid;
  gap: 8px;
}

.feedback-item {
  border: 1px solid var(--line);
  border-left: 4px solid var(--mint);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 12px;
}

.feedback-item strong {
  display: block;
  color: var(--dark);
  margin-bottom: 3px;
}

.feedback-item small {
  color: var(--muted);
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 14px;
  color: var(--muted);
  background: #ffffff;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 78px;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  background: var(--dark);
  color: #ffffff;
  border-radius: 8px;
  padding: 10px 14px;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 20;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.bottom-nav {
  display: none;
}

.help-drawer,
.modal-layer {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 30;
}

.help-drawer.visible,
.modal-layer.visible {
  display: block;
}

.help-drawer {
  background: rgba(26, 23, 20, 0.22);
}

.help-card,
.modal-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(26, 23, 20, 0.2);
}

.help-card {
  position: absolute;
  right: 18px;
  top: 18px;
  width: min(380px, calc(100vw - 36px));
  padding: 18px;
}

.help-card small,
.modal-card p {
  color: var(--muted);
}

.help-card h2,
.modal-card h2 {
  margin: 6px 42px 8px 0;
  color: var(--dark);
  font-size: 22px;
}

.help-card p {
  margin: 0 0 12px;
  color: var(--ink);
  line-height: 1.45;
}

.help-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 10px;
}

.help-step b {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--mint-soft);
  color: var(--mint-dark);
  font-family: Arial, sans-serif;
}

.close-help {
  position: absolute;
  right: 12px;
  top: 12px;
}

.modal-layer {
  background: rgba(26, 23, 20, 0.3);
  place-items: center;
  padding: 20px;
}

.modal-layer.visible {
  display: grid;
}

.modal-card {
  position: relative;
  width: min(500px, 100%);
  padding: 20px;
}

.modal-card p {
  margin: 0 0 14px;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: minmax(220px, 1fr) auto;
  }

  .flow-hero {
    grid-template-columns: 1fr;
  }

  .controls {
    grid-column: auto;
  }

  .context-panel {
    grid-column: 1 / -1;
  }

  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-start,
  .card-ons,
  .card-quality,
  .card-checklist,
  .card-close {
    grid-column: auto;
  }

  .card-checklist,
  .card-close {
    grid-column: span 2;
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-radius: 0;
    padding: 18px 16px;
  }

  .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-list hr,
  .logout-button {
    display: none;
  }

  .topbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .topbar-logo {
    display: block;
    width: 78px;
    height: 54px;
  }

  .topbar-actions {
    justify-content: stretch;
  }

  .user-chip,
  .compact-button {
    flex: 1;
  }

  .controls {
    justify-content: stretch;
  }

  .pilot-guide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .journey-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pilot-guide div {
    grid-column: 1 / -1;
  }

  label {
    min-width: 0;
  }

  .subpage-grid.two,
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .card-checklist,
  .card-close {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  button,
  select,
  input,
  textarea {
    font-size: 16px;
  }

  .topbar,
  .topbar-actions,
  .controls,
  .pilot-guide,
  .flow-hero,
  .journey-strip,
  .bottom-nav,
  .bottom-nav button,
  .pilot-guide button,
  .user-chip,
  .icon-button,
  .compact-button {
    min-width: 0;
    max-width: 100%;
  }

  .app-shell,
  .main,
  .overview-grid,
  .subpage-grid,
  .panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  html,
  body,
  .app-shell {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .main {
    padding: 12px 12px 104px;
    overflow-x: hidden;
  }

  .topbar {
    margin: -12px -12px 12px;
    padding: 12px;
    gap: 10px;
  }

  .sidebar {
    display: none;
  }

  .product-title strong {
    font-size: 19px;
  }

  .product-title small {
    display: none;
  }

  .topbar-logo {
    width: 78px;
    height: 54px;
  }

  .controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .topbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 78px minmax(0, 1fr);
    gap: 8px;
  }

  .user-chip {
    grid-column: auto;
    max-width: none;
  }

  .user-chip,
  .icon-button,
  .compact-button {
    width: 100%;
    min-height: 52px;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #tourButton {
    font-size: 0;
  }

  #tourButton::after {
    content: "Uitleg";
    font-size: 15px;
  }

  .user-chip,
  .compact-button {
    min-width: 0;
  }

  .context-panel {
    width: 100%;
  }

  .context-panel summary {
    display: block;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--dark);
    font-weight: 800;
    padding: 12px 42px 12px 12px;
    list-style: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    position: relative;
  }

  .context-panel summary::-webkit-details-marker {
    display: none;
  }

  .context-panel summary::after {
    content: "+";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-family: Arial, sans-serif;
    color: var(--mint-dark);
    font-weight: 800;
  }

  .context-panel[open] summary::after {
    content: "-";
  }

  .context-panel[open] .controls {
    margin-top: 10px;
  }

  label {
    gap: 6px;
  }

  label span {
    font-size: 13px;
  }

  select,
  input {
    min-height: 54px;
    border-radius: 8px;
    padding: 11px 14px;
  }

  textarea {
    min-height: 150px;
    border-radius: 8px;
    padding: 12px 14px;
  }

  .pilot-guide small {
    display: block;
    overflow-wrap: anywhere;
  }

  .pilot-guide {
    display: none;
  }

  .pilot-guide div {
    grid-column: 1 / -1;
  }

  .pilot-guide strong {
    font-size: 17px;
  }

  .pilot-guide button {
    width: 100%;
    min-height: 58px;
    padding: 10px 8px;
    white-space: normal;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  .staff-grid,
  .module-grid,
  .ai-mode-grid,
  .journey-strip {
    grid-template-columns: 1fr;
  }

  .flow-copy,
  .next-action-card {
    padding: 16px;
  }

  .flow-copy h1 {
    font-size: 29px;
    overflow-wrap: anywhere;
  }

  .flow-status {
    display: none;
  }

  .next-action-card .primary-button {
    min-height: 58px;
    font-size: 17px;
  }

  .status-chip {
    width: 100%;
    justify-content: center;
  }

  .journey-step {
    min-height: 70px;
    grid-template-columns: 34px 1fr;
    padding: 12px;
  }

  .journey-step small,
  .journey-step strong {
    overflow-wrap: anywhere;
  }

  .panel {
    padding: 14px;
    border-radius: 8px;
  }

  .panel-title h2 {
    font-size: 21px;
  }

  .panel-icon {
    width: 34px;
    height: 34px;
  }

  .panel-title {
    align-items: flex-start;
  }

  .split-row,
  .progress-line {
    display: grid;
    grid-template-columns: 1fr;
    align-items: flex-start;
    justify-content: start;
    gap: 6px;
  }

  .text-link {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--mint);
    border-radius: 8px;
    background: var(--mint-soft);
    color: var(--dark);
    margin: 12px 0 0;
    padding: 12px;
    text-align: center;
    font-weight: 800;
  }

  .ons-row,
  .action-row {
    grid-template-columns: 1fr;
    padding: 13px 14px;
    gap: 7px;
  }

  .check-row {
    min-height: 78px;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 6px 12px;
    padding: 14px;
  }

  .check-row input {
    width: 26px;
    height: 26px;
    grid-row: 1 / span 3;
    align-self: start;
    margin-top: 2px;
  }

  .check-row .time-cell {
    grid-column: 2;
    text-align: left;
    min-width: 0;
  }

  .check-row .pill {
    grid-column: 2;
    justify-self: start;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
  }

  .ons-row.header,
  .action-row.header {
    display: none;
  }

  .close-layout,
  .demo-banner {
    grid-template-columns: 1fr;
  }

  .notice-list button,
  .tabs button,
  .primary-button,
  .secondary-button,
  .close-button,
  .microsoft-button {
    min-height: 54px;
    font-size: 16px;
  }

  .tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .tabs button {
    text-align: center;
  }

  .ring.small {
    margin: 0 auto;
  }

  .bottom-nav {
    position: fixed;
    left: 0;
    right: auto;
    bottom: 0;
    width: 100dvw;
    max-width: 100dvw;
    display: flex;
    gap: 0;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--line);
    z-index: 10;
    padding-bottom: env(safe-area-inset-bottom);
    overflow: hidden;
  }

  .bottom-nav button {
    flex: 1 1 0;
    min-width: 0;
    min-height: 70px;
    border: 0;
    background: transparent;
    color: var(--dark);
    font-size: 11px;
    font-weight: 800;
    padding: 8px 4px;
    line-height: 1.1;
    overflow-wrap: anywhere;
  }

  .bottom-nav button.active {
    color: var(--mint-dark);
    background: var(--mint-soft);
  }
}
