/* BETONmonteur – design system
   Merkkleur: kubusblauw uit het logo. Neutralen: koel leigrijs (beton). */

@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-latin-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand: #1866a3;
  --brand-600: #155b93;
  --brand-700: #114b7a;
  --brand-800: #0d3a5f;
  --brand-900: #0a2b47;
  --brand-100: #dbe9f6;
  --brand-50: #eef5fb;

  --ink: #0f1c2b;
  --ink-2: #334155;
  --muted: #64748b;
  --subtle: #94a3b8;
  --line: #e4e8ee;
  --line-strong: #cfd6df;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;

  --danger: #c2362b;
  --danger-50: #fdf0ef;
  --success: #1f8a54;
  --success-50: #e9f7ef;
  --warning: #b86e00;
  --warning-50: #fff5e5;

  --phase-voor: #c27803;
  --phase-voor-50: #fff6e6;
  --phase-tijdens: #1866a3;
  --phase-tijdens-50: #eef5fb;
  --phase-na: #1f8a54;
  --phase-na-50: #e9f7ef;

  --radius-lg: 18px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-xs: 0 1px 2px rgb(15 28 43 / 5%);
  --shadow-sm: 0 1px 3px rgb(15 28 43 / 7%), 0 1px 2px rgb(15 28 43 / 4%);
  --shadow-md: 0 6px 16px -4px rgb(15 28 43 / 12%), 0 2px 4px rgb(15 28 43 / 4%);
  --shadow-lg: 0 24px 48px -12px rgb(15 28 43 / 28%);
  --ring: 0 0 0 4px rgb(24 102 163 / 16%);

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --sidebar-w: 256px;
  --tabbar-h: 64px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  color-scheme: light;
}

/* ---------- Reset & base ---------- */

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  min-height: 100dvh;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--brand-700);
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

h1 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 1.02rem;
  font-weight: 650;
}

h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

p {
  margin: 0;
}

b,
strong {
  font-weight: 620;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

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

.small {
  font-size: 0.85rem;
}

/* ---------- Boot ---------- */

.boot {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  animation: fade 0.4s ease-out;
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

/* ---------- Auth (login / setup) ---------- */

.auth {
  min-height: 100dvh;
  display: grid;
  background: var(--surface);
}

@media (min-width: 960px) {
  .auth {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  }
}

.auth-brand {
  display: none;
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(1200px 600px at -10% -10%, rgb(255 255 255 / 14%), transparent 60%),
    radial-gradient(800px 500px at 120% 120%, rgb(8 30 52 / 55%), transparent 60%),
    linear-gradient(150deg, var(--brand) 0%, var(--brand-800) 100%);
}

/* subtiel bekistings-/betonraster */
.auth-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgb(255 255 255 / 6%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 6%) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}

@media (min-width: 960px) {
  .auth-brand {
    display: flex;
  }
}

.auth-brand-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 56px 64px;
  max-width: 620px;
  width: 100%;
}

.auth-mark {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 30px rgb(0 0 0 / 20%);
}

.auth-mark img {
  width: 100%;
  height: 100%;
  transform: scale(1.45); /* the app icon has safe-zone padding; zoom in on the cube */
}

.auth-brand h2 {
  color: #fff;
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-top: auto;
}

.auth-brand ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.auth-brand li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  color: rgb(255 255 255 / 90%);
}

.auth-brand li .icon {
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: 10px;
  background: rgb(255 255 255 / 12%);
  border: 1px solid rgb(255 255 255 / 18%);
}

.auth-brand .auth-foot {
  margin-top: auto;
  font-size: 0.85rem;
  color: rgb(255 255 255 / 60%);
}

.auth-form-wrap {
  display: grid;
  place-items: center;
  padding: calc(32px + var(--safe-top)) 20px calc(32px + var(--safe-bottom));
}

.auth-form {
  width: 100%;
  max-width: 380px;
  display: grid;
  gap: 18px;
}

.auth-form .logo {
  width: 200px;
  margin-bottom: 12px;
}

.auth-form h1 {
  font-size: 1.65rem;
}

.auth-form .lead {
  color: var(--muted);
  margin-top: -10px;
}

.field.big > span {
  font-size: 1rem;
  color: var(--ink);
}

.input.input-lg {
  min-height: 58px;
  font-size: 18px;
  border-radius: 14px;
}

.password-field {
  position: relative;
}

.password-field .input {
  padding-right: 104px;
}

.password-field .btn {
  position: absolute;
  top: 50%;
  right: 6px;
  min-height: 46px;
  padding: 0 12px;
  transform: translateY(-50%);
  color: var(--ink-2);
}

/* Stays centred in the field while pressed (.btn:active would move it down by half its height). */
.password-field .btn:active:not([disabled]) {
  transform: translateY(calc(-50% + 1px));
}

/* Edge adds its own eye (click on, click off) to every password field. The app decides where an eye
   goes and how it works, so Edge's is hidden. */
.input::-ms-reveal {
  display: none;
}

/* Account page: a small eye that shows the password only while it is held down. */
.password-field.hold .input {
  padding-right: 52px;
}

.password-field.hold .btn {
  right: 4px;
  width: 40px;
  min-height: 38px;
  padding: 0;
  border-radius: 9px;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
}

.password-field.hold .btn[aria-pressed='true'] {
  color: var(--brand);
  background: var(--brand-50);
}

.auth-help {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.auth-help .icon {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

/* ---------- App shell ---------- */

.shell {
  min-height: 100dvh;
}

.sidebar {
  display: none;
}

.appbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  height: calc(60px + var(--safe-top));
  padding: var(--safe-top) 16px 0;
  background: rgb(255 255 255 / 88%);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.appbar .brand img {
  height: 32px;
  width: auto;
}

.appbar .avatar {
  margin-left: auto;
}

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  padding: 6px 8px calc(6px + var(--safe-bottom));
  background: rgb(255 255 255 / 92%);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--line);
}

.tabbar a {
  flex: 1;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  border-radius: 12px;
}

.tabbar a .icon {
  width: 22px;
  height: 22px;
}

.tabbar a.active {
  color: var(--brand);
}

.tabbar a.active .icon {
  stroke-width: 2.3;
}

main.view {
  padding: 20px 16px calc(var(--tabbar-h) + var(--safe-bottom) + 32px);
  max-width: 1240px;
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .appbar,
  .tabbar {
    display: none;
  }

  .shell {
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
    /* sidebar column stays white down to the bottom of long pages */
    background: linear-gradient(
      90deg,
      var(--surface) calc(var(--sidebar-w) - 1px),
      var(--line) calc(var(--sidebar-w) - 1px),
      var(--line) var(--sidebar-w),
      transparent var(--sidebar-w)
    );
  }

  .sidebar {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100dvh;
    padding: 22px 16px 16px;
  }

  .sidebar-brand {
    padding: 4px 10px 26px;
  }

  .sidebar-brand img {
    width: 168px;
  }

  .side-nav {
    display: grid;
    gap: 2px;
  }

  .side-nav .nav-label {
    font-size: 0.72rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--subtle);
    padding: 0 12px 8px;
  }

  .side-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 10px;
    color: var(--ink-2);
    font-weight: 550;
    position: relative;
  }

  .side-nav a:hover {
    background: var(--surface-2);
    color: var(--ink);
  }

  .side-nav a .icon {
    color: var(--subtle);
  }

  .side-nav a.active {
    background: var(--brand-50);
    color: var(--brand-700);
  }

  .side-nav a.active .icon {
    color: var(--brand);
  }

  .sidebar-foot {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
    border-top: 1px solid var(--line);
    padding-top: 14px;
  }

  .user-chip {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 12px;
    color: var(--ink);
  }

  .user-chip:hover {
    background: var(--surface-2);
    color: var(--ink);
  }

  .user-chip b {
    display: block;
    font-size: 0.9rem;
    line-height: 1.3;
  }

  .user-chip small {
    color: var(--muted);
    font-size: 0.8rem;
  }

  /* Uitloggen, right next to your name */
  .sidebar-foot .side-logout {
    flex: none;
    color: var(--muted);
  }

  .sidebar-foot .side-logout:hover:not([disabled]) {
    color: var(--danger);
    background: var(--danger-50);
  }

  main.view {
    padding: 36px 40px 56px;
  }
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--brand-700);
  background: var(--brand-100);
  letter-spacing: 0.02em;
}

.avatar.lg {
  width: 56px;
  height: 56px;
  font-size: 1.1rem;
}

.avatar.off {
  color: var(--muted);
  background: var(--line);
}

/* ---------- Page header ---------- */

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.page-title {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.page-title h1 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
}

.lead {
  color: var(--muted);
  font-size: 0.98rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lead .icon {
  width: 16px;
  height: 16px;
}

.page-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 550;
  color: var(--muted);
}

.back-link .icon {
  width: 18px;
  height: 18px;
}

/* ---------- Layout helpers ---------- */

.stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* brede kinderen mogen de pagina niet oprekken */
  gap: 16px;
  align-content: start;
}

.narrow {
  max-width: 760px;
}

.dash-grid,
.project-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

@media (min-width: 1200px) {
  .dash-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr);
  }

  .project-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
  }

  .project-layout > aside {
    position: sticky;
    top: 24px;
  }
}

/* ---------- Card ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  padding: 18px;
}

@media (min-width: 640px) {
  .card {
    padding: 22px;
  }
}

.card.flush {
  padding: 0;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.card-header h2 {
  flex: 1;
  min-width: 0;
}

.card-header a,
.card-header .link {
  font-size: 0.88rem;
  font-weight: 600;
}

.flush > .card-header {
  padding: 18px 18px 0;
}

@media (min-width: 640px) {
  .flush > .card-header {
    padding: 22px 22px 0;
  }
}

.icon-tile {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--brand-50);
  color: var(--brand);
}

.icon-tile.brand {
  color: #fff;
  background: linear-gradient(145deg, #2a7cc0, var(--brand-700));
  box-shadow: 0 6px 14px -4px rgb(24 102 163 / 55%);
}

.icon-tile.lg {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

.icon-tile.lg .icon {
  width: 24px;
  height: 24px;
}

/* ---------- Buttons ---------- */

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  font: inherit;
  font-weight: 600;
  font-size: 0.94rem;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition:
    background 0.15s,
    border-color 0.15s,
    box-shadow 0.15s,
    transform 0.06s;
}

.btn:active:not([disabled]) {
  transform: translateY(1px);
}

.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn .icon {
  width: 18px;
  height: 18px;
}

.btn-primary {
  color: #fff;
  background: var(--brand);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 14%),
    0 1px 2px rgb(15 28 43 / 12%);
}

.btn-primary:hover:not([disabled]) {
  color: #fff;
  background: var(--brand-600);
}

.btn-secondary {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover:not([disabled]) {
  color: var(--ink);
  background: var(--surface-2);
}

.btn-soft {
  color: var(--brand-700);
  background: var(--brand-50);
}

.btn-soft:hover:not([disabled]) {
  color: var(--brand-800);
  background: var(--brand-100);
}

.btn-ghost {
  color: var(--ink-2);
  background: transparent;
}

.btn-ghost:hover:not([disabled]) {
  color: var(--ink);
  background: var(--surface-2);
}

.btn-danger {
  color: var(--danger);
  background: var(--danger-50);
}

.btn-danger:hover:not([disabled]) {
  color: #fff;
  background: var(--danger);
}

.btn-sm {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.86rem;
  border-radius: 10px;
}

.btn-lg {
  min-height: 52px;
  font-size: 1rem;
  border-radius: 14px;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  width: 44px;
  padding: 0;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Forms ---------- */

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field > span,
.label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-2);
}

.field small,
.hint {
  font-size: 0.82rem;
  color: var(--muted);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  font: inherit;
  font-size: 16px; /* voorkomt inzoomen op iOS */
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-xs);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

@media (min-width: 1024px) {
  .input,
  .select,
  .textarea {
    font-size: 15px;
  }
}

.input::placeholder,
.textarea::placeholder {
  color: var(--subtle);
}

.textarea {
  min-height: 84px;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.5;
}

.select {
  appearance: none;
  padding-right: 42px;
  text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}

.select-lg {
  min-height: 54px;
  font-weight: 550;
  border-radius: 14px;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--subtle);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--ring);
}

.input[aria-invalid='true'] {
  border-color: var(--danger);
}

.input[aria-invalid='true']:focus {
  box-shadow: 0 0 0 4px rgb(194 54 43 / 14%);
}

.form-grid {
  display: grid;
  gap: 18px;
}

@media (min-width: 720px) {
  .form-grid.two {
    grid-template-columns: 1fr 1fr;
  }

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

.form-section {
  display: grid;
  gap: 4px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.form-error {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 550;
  color: var(--danger);
  background: var(--danger-50);
}

.form-error:empty {
  display: none;
}

.input-with-btn {
  display: flex;
  gap: 8px;
}

.input-with-btn .input {
  flex: 1;
  min-width: 0;
}

.search {
  position: relative;
}

.search .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--subtle);
  width: 18px;
  height: 18px;
}

.search .input {
  padding-left: 42px;
}

/* Toggle switch */
.toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  min-height: 44px;
}

.toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-ui {
  position: relative;
  width: 44px;
  height: 26px;
  flex: none;
  border-radius: 999px;
  background: var(--line-strong);
  transition: background 0.2s;
}

.toggle-ui::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 25%);
  transition: transform 0.2s;
}

.toggle input:checked + .toggle-ui {
  background: var(--brand);
}

.toggle input:checked + .toggle-ui::after {
  transform: translateX(18px);
}

.toggle input:focus-visible + .toggle-ui {
  box-shadow: var(--ring);
}

.toggle-text {
  display: grid;
  min-width: 0;
}

.toggle-text b {
  font-size: 0.92rem;
}

.toggle-text small {
  color: var(--muted);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Segmented control & badges ---------- */

.segmented {
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 12px;
  background: #eaeef3;
  overflow-x: auto;
  scrollbar-width: none;
}

.segmented button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: none;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}

.segmented button:hover {
  color: var(--ink);
}

.segmented button[aria-selected='true'] {
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.count {
  min-width: 20px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 650;
  line-height: 20px;
  text-align: center;
  color: var(--muted);
  background: rgb(15 28 43 / 7%);
}

[aria-selected='true'] .count {
  color: var(--brand-700);
  background: var(--brand-50);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: var(--ink-2);
  background: #eef1f5;
  border: 1px solid transparent;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}

.badge.plain::before {
  display: none;
}

.badge.actief {
  color: var(--success);
  background: var(--success-50);
}

.badge.afgerond {
  color: var(--muted);
}

.badge.inactive {
  color: var(--danger);
  background: var(--danger-50);
}

.badge.role-admin {
  color: var(--brand-700);
  background: var(--brand-50);
}

.badge.role-medewerker {
  color: var(--warning);
  background: var(--warning-50);
}

.badge.role-klant {
  color: var(--success);
  background: var(--success-50);
}

.badge.phase-voor {
  color: var(--phase-voor);
  background: var(--phase-voor-50);
}

.badge.phase-tijdens {
  color: var(--phase-tijdens);
  background: var(--phase-tijdens-50);
}

.badge.phase-na {
  color: var(--phase-na);
  background: var(--phase-na-50);
}

.badge.damage {
  color: #fff;
  background: var(--danger);
}

.badge.damage::before {
  background: #fff;
}

/* ---------- Upload card ---------- */

.upload {
  padding: 0;
  overflow: hidden;
  border-color: var(--line);
  box-shadow: var(--shadow-md);
}

.upload-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 20px 18px;
  background: linear-gradient(180deg, var(--brand-50), var(--surface));
  border-bottom: 1px solid var(--line);
}

.upload-head h2 {
  font-size: 1.15rem;
}

.upload-head p {
  color: var(--muted);
  font-size: 0.88rem;
}

.upload-body {
  display: grid;
  gap: 22px;
  padding: 20px;
}

@media (min-width: 640px) {
  .upload-head {
    padding: 24px 26px 20px;
  }

  .upload-body {
    padding: 24px 26px 26px;
  }
}

.step {
  display: grid;
  gap: 10px;
}

.step-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--ink);
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--brand-700);
  background: var(--brand-100);
}

.project-summary {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  font-size: 0.9rem;
}

.project-summary div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.project-summary .icon {
  width: 16px;
  height: 16px;
  color: var(--subtle);
}

.project-summary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-summary .client {
  font-weight: 650;
}

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

.phase-picker button {
  position: relative;
  display: grid;
  gap: 2px;
  justify-items: start;
  padding: 12px;
  min-height: 70px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  font: inherit;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s,
    box-shadow 0.15s;
}

.phase-picker button:hover {
  border-color: var(--subtle);
}

.phase-picker strong {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.95rem;
}

.phase-picker small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.3;
}

.phase-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--subtle);
}

[data-phase='voor'] .phase-dot {
  background: var(--phase-voor);
}

[data-phase='tijdens'] .phase-dot {
  background: var(--phase-tijdens);
}

[data-phase='na'] .phase-dot {
  background: var(--phase-na);
}

.phase-picker button[aria-pressed='true'] {
  border-color: var(--brand);
  background: var(--brand-50);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.phase-picker button[aria-pressed='true'][data-phase='voor'] {
  border-color: var(--phase-voor);
  background: var(--phase-voor-50);
  box-shadow: inset 0 0 0 1px var(--phase-voor);
}

.phase-picker button[aria-pressed='true'][data-phase='na'] {
  border-color: var(--phase-na);
  background: var(--phase-na-50);
  box-shadow: inset 0 0 0 1px var(--phase-na);
}

@media (max-width: 380px) {
  .phase-picker small {
    display: none;
  }

  .phase-picker button {
    min-height: 52px;
  }
}

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

.pick-buttons .btn {
  flex-direction: column;
  gap: 8px;
  min-height: 96px;
  border-radius: 16px;
  font-size: 0.95rem;
  white-space: normal;
  text-align: center;
}

.pick-buttons .btn .icon {
  width: 28px;
  height: 28px;
  stroke-width: 1.7;
}

.pick-buttons .btn-secondary {
  border-style: dashed;
  box-shadow: none;
}

.pick-buttons input {
  display: none;
}

.stamp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.pending {
  display: grid;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.queue {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
}

.queue li {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.queue img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.queue .placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--subtle);
}

.queue .remove {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgb(15 28 43 / 65%);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.queue .remove .icon {
  width: 15px;
  height: 15px;
}

.queue .status {
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 650;
  color: #fff;
  background: rgb(15 28 43 / 70%);
  backdrop-filter: blur(4px);
}

.queue .status .icon {
  width: 13px;
  height: 13px;
}

.queue .progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  background: var(--brand);
  transition: width 0.2s;
}

.queue li.done .status {
  background: var(--success);
}

.queue li.error {
  border-color: var(--danger);
}

.queue li.error .status {
  background: var(--danger);
}

.meta-note {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.84rem;
}

.meta-note .icon {
  width: 16px;
  height: 16px;
}

/* ---------- Stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  color: inherit;
}

a.stat:hover {
  color: inherit;
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.stat .icon-tile {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.stat > div {
  min-width: 0;
}

.stat b {
  display: block;
  margin-bottom: 3px;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat div > span {
  font-size: 0.82rem;
  color: var(--muted);
}

/* ---------- Rows (lijsten) ---------- */

.rows {
  display: grid;
}

.row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 68px;
  padding: 12px 18px;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition: background 0.12s;
}

.rows > .row:first-child,
.rows > li:first-child > .row {
  border-top: 0;
}

.rows > li {
  list-style: none;
}

.row:hover {
  color: inherit;
  background: var(--surface-2);
}

.row-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
  color: var(--brand);
  background: var(--brand-50);
}

.row-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 1px;
}

.row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 620;
  min-width: 0;
}

.row-title > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-sub {
  color: var(--muted);
  font-size: 0.86rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-meta {
  display: grid;
  justify-items: end;
  gap: 2px;
  flex: none;
  font-size: 0.82rem;
  color: var(--muted);
}

.row-meta .num {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  color: var(--ink-2);
}

.row-meta .icon {
  width: 15px;
  height: 15px;
}

.row > .chev {
  color: var(--subtle);
  width: 18px;
  height: 18px;
}

@media (max-width: 520px) {
  .row {
    padding: 12px 14px;
    gap: 12px;
  }

  .row-meta small {
    display: none;
  }
}

.list-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
  color: var(--muted);
}

.empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}

.empty .icon-tile {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: var(--subtle);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.empty .icon-tile .icon {
  width: 24px;
  height: 24px;
}

.empty h2,
.empty h3 {
  color: var(--ink);
}

.empty p {
  max-width: 340px;
}

.toolbar {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

@media (min-width: 760px) {
  .toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
}

/* ---------- Photos ---------- */

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

.thumb-grid a {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface-2);
}

.thumb-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s;
}

.thumb-grid a:hover img {
  transform: scale(1.04);
}

.thumb-grid .cap {
  position: absolute;
  inset: auto 0 0;
  padding: 18px 8px 6px;
  font-size: 0.7rem;
  font-weight: 550;
  line-height: 1.3;
  color: #fff;
  background: linear-gradient(transparent, rgb(10 20 30 / 72%));
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

@media (min-width: 640px) {
  .photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }
}

.photo-grid > .ph-tile {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface-2);
}

.photo-grid .ph-open {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.photo-grid .ph-del {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--danger);
  box-shadow: 0 2px 8px rgb(0 0 0 / 30%);
  cursor: pointer;
}

.photo-grid .ph-del .icon {
  width: 20px;
  height: 20px;
}

.photo-grid.editing .ph-open img {
  opacity: 0.85;
}

.photos-edit {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.photos-edit[hidden] {
  display: none;
}

.photos-edit p {
  flex: 1;
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.photos-edit .btn {
  flex: none;
}

.photos-edit .btn-block {
  flex: 1;
}

.project-subs {
  margin-top: 20px;
}

.photo-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s;
}

.photo-grid .ph-open:hover img {
  transform: scale(1.04);
}

.photo-grid .dmg-tag {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: var(--danger);
}

.photo-grid .vis {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--success);
  background: rgb(255 255 255 / 94%);
  box-shadow: var(--shadow-sm);
}

.photo-grid .vis .icon {
  width: 15px;
  height: 15px;
}

.photo-grid .cap {
  position: absolute;
  inset: auto 0 0;
  padding: 18px 8px 6px;
  font-size: 0.7rem;
  font-weight: 550;
  color: #fff;
  text-align: left;
  background: linear-gradient(transparent, rgb(10 20 30 / 70%));
}

.photos-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

/* ---------- Details & comments ---------- */

.details {
  display: grid;
  margin: 0;
}

.details > div {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 2px 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.details > div:first-child {
  border-top: 0;
  padding-top: 0;
}

.details .icon {
  grid-row: span 2;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--subtle);
}

.details dt {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.details dd {
  margin: 0;
  font-weight: 550;
  overflow-wrap: anywhere;
}

.notes {
  white-space: pre-wrap;
  font-weight: 450;
}

.comments {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.comments li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
}

.comments .avatar {
  width: 32px;
  height: 32px;
  font-size: 0.72rem;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}

.comment-meta b {
  color: var(--ink);
  font-size: 0.86rem;
}

.comment-body {
  white-space: pre-wrap;
  font-size: 0.92rem;
}

.link-btn {
  margin-left: auto;
  padding: 2px 4px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.78rem;
  color: var(--subtle);
  cursor: pointer;
}

.link-btn:hover {
  color: var(--danger);
}

/* ---------- Werknemer: foto's uploaden in stappen ---------- */
/* Gemaakt voor één duim op de bouwplaats: grote knoppen, grote tekst, actieknop altijd onderin. */

/* Room for the action bar, which sits on top of the tab bar. */
body.wiz-open main.view {
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 190px);
}

.wiz {
  max-width: 640px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.wiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  margin-top: -8px;
}

.wiz-back {
  min-height: 48px;
  margin-left: -10px;
  padding: 0 14px 0 8px;
  font-size: 1rem;
}

.wiz-back .icon {
  width: 22px;
  height: 22px;
}

.wiz-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
}

.wiz-steps {
  display: flex;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wiz-steps li {
  width: 18px;
  height: 6px;
  border-radius: 3px;
  background: var(--line-strong);
}

.wiz-steps li.done {
  background: var(--brand-100);
}

.wiz-steps li.current {
  width: 30px;
  background: var(--brand);
}

.wiz-body {
  display: grid;
  gap: 16px;
}

.wiz-heading {
  display: grid;
  gap: 6px;
}

.wiz-title {
  margin: 0;
  font-size: 1.65rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.wiz-lead {
  margin: 0;
  font-size: 1.04rem;
  color: var(--ink-2);
}

.wiz-search .input {
  min-height: 56px;
  font-size: 17px;
  border-radius: 14px;
}

/* Stap 1: project kiezen */

.pick-list {
  display: grid;
  gap: 10px;
}

.pick-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 88px;
  padding: 14px 14px 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  font: inherit;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
}

.pick-card:hover {
  border-color: var(--subtle);
}

.pick-card:active {
  background: var(--brand-50);
  border-color: var(--brand);
}

.pick-card.last {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.pick-card.loading {
  opacity: 0.55;
  pointer-events: none;
}

.pick-icon {
  flex: none;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--brand);
  background: var(--brand-50);
}

.pick-icon .icon {
  width: 26px;
  height: 26px;
}

.pick-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 3px;
}

.pick-main b {
  font-size: 1.12rem;
  line-height: 1.3;
}

.pick-main span {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.96rem;
  line-height: 1.35;
  color: var(--ink-2);
}

.pick-main span .icon {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--subtle);
}

.pick-main small {
  font-size: 0.85rem;
  color: var(--muted);
}

.pick-tag {
  justify-self: start;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 650;
  color: var(--brand-700);
  background: var(--brand-100);
}

.pick-card .chev {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--subtle);
}

/* Wat er al is gestuurd, per fase: "Voor 3 · Tijdens 0 · Na 1" */

.phase-counts,
.pick-main .phase-counts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}

.phase-counts .pc,
.pick-main .phase-counts .pc {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.phase-counts .pc b {
  font-size: inherit;
}

.phase-counts .pc.zero {
  font-weight: 500;
  color: var(--subtle);
}

.phase-counts .phase-dot,
.pick-main .phase-counts .phase-dot {
  display: inline-block;
  flex: none;
  width: 8px;
  height: 8px;
}

.pc.phase-voor:not(.zero) {
  color: var(--phase-voor);
  background: var(--phase-voor-50);
  border-color: transparent;
}

.pc.phase-tijdens:not(.zero) {
  color: var(--phase-tijdens);
  background: var(--phase-tijdens-50);
  border-color: transparent;
}

.pc.phase-na:not(.zero) {
  color: var(--phase-na);
  background: var(--phase-na-50);
  border-color: transparent;
}

.pc.phase-voor .phase-dot {
  background: var(--phase-voor);
}

.pc.phase-tijdens .phase-dot {
  background: var(--phase-tijdens);
}

.pc.phase-na .phase-dot {
  background: var(--phase-na);
}

.pc.zero .phase-dot {
  background: var(--line-strong);
}

.pick-main .pick-have {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.check-row .phase-counts {
  margin-top: 4px;
}

/* Stap 3: wat er al is gestuurd, ingeklapt */

.earlier {
  border-top: 1px solid var(--brand-100);
  background: var(--surface);
}

.earlier[hidden] {
  display: none;
}

.earlier-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 8px 14px;
  border: 0;
  font: inherit;
  color: var(--ink);
  text-align: left;
  background: none;
  cursor: pointer;
}

.earlier-title {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 6px;
}

.earlier-title {
  gap: 4px;
}

.earlier-title > small {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.earlier .phase-counts .pc {
  padding: 1px 8px;
  font-size: 0.8rem;
}

.earlier-head .link {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--brand);
}

.earlier-head .link .icon {
  width: 16px;
  height: 16px;
}

.earlier-body {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 4px 14px 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

p.earlier-body {
  display: flex;
  align-items: center;
  gap: 8px;
}

.earlier-phase {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.earlier-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}

.earlier-thumbs button {
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--surface-2);
  cursor: zoom-in;
}

.earlier-thumbs img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.earlier-none {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 12px 14px;
  font-size: 0.92rem;
  color: var(--muted);
}

.earlier-none .icon {
  width: 18px;
  height: 18px;
}

/* Fase aanpassen in de fotoviewer (beheerder) */

.lightbox .phase-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  color: rgb(255 255 255 / 75%);
}

.lightbox .phase-chips span {
  margin-right: 4px;
}

.lightbox .phase-chips .btn {
  color: #fff;
  background: rgb(255 255 255 / 8%);
  border-color: rgb(255 255 255 / 14%);
}

.lightbox .phase-chips .btn[aria-pressed='true'] {
  color: var(--ink);
  background: #fff;
}

/* Stap 2: controleren */

.check-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.check-row {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
}

.check-row:first-child {
  border-top: 0;
}

.check-icon {
  flex: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--brand);
  background: var(--brand-50);
}

.check-icon .icon {
  width: 22px;
  height: 22px;
}

.check-row > div {
  min-width: 0;
  display: grid;
  gap: 2px;
  justify-items: start;
}

.check-row small {
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.check-row b {
  font-size: 1.08rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.check-row.big b {
  font-size: 1.32rem;
}

.check-row span {
  font-size: 0.94rem;
  color: var(--ink-2);
}

.check-row .btn {
  margin-top: 10px;
}

.check-notes {
  padding: 14px 16px;
  border: 1px solid #f1d7a6;
  border-radius: var(--radius);
  background: var(--warning-50);
}

.check-notes b {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--warning);
}

.check-notes p {
  margin: 6px 0 0;
  white-space: pre-line;
  color: var(--ink);
}

/* Stap 3: foto's */

/* Project and what was already sent, in one card */
.proj-card {
  overflow: hidden;
  border: 1px solid var(--brand-100);
  border-radius: var(--radius);
  background: var(--surface);
}

.proj-card .wiz-project {
  border: 0;
  border-radius: 0;
}

.wiz-project {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 10px 14px;
  border: 1px solid var(--brand-100);
  border-radius: var(--radius);
  background: var(--brand-50);
  font: inherit;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.wiz-project > .icon {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--brand);
}

.wiz-project > span:not(.link) {
  flex: 1;
  min-width: 0;
  display: grid;
}

.wiz-project b,
.wiz-project small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wiz-project small {
  font-size: 0.88rem;
  color: var(--ink-2);
}

.wiz-project .link {
  flex: none;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--brand);
}

.add-area {
  display: grid;
  gap: 10px;
}

.add-area:empty {
  display: none;
}

.add-area input[type='file'] {
  display: none;
}

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

.add-tile {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  min-height: 112px;
  padding: 14px 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, transform 0.06s;
}

.add-tile:active {
  transform: translateY(1px);
}

.add-tile input[type='file'] {
  display: none;
}

.add-tile-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 6px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--brand);
  background: var(--brand-50);
}

.add-tile-icon .icon {
  width: 24px;
  height: 24px;
}

.add-tile b {
  font-size: 1.02rem;
}

.add-tile small {
  font-size: 0.82rem;
  color: var(--muted);
}

.add-tile.primary {
  border-color: transparent;
  color: #fff;
  background: var(--brand);
}

.add-tile.primary:hover {
  background: var(--brand-600);
}

.add-tile.primary .add-tile-icon {
  color: #fff;
  background: rgb(255 255 255 / 16%);
}

.add-tile.primary small {
  color: rgb(255 255 255 / 80%);
}

.shot-count {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.shots-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.shots-head .wiz-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shots-head-add {
  flex: none;
  display: flex;
  gap: 6px;
}

.shots-head-add:empty {
  display: none;
}

.shots-head-add .add-small {
  min-height: 42px;
  padding: 0 10px;
  gap: 6px;
  font-size: 0.85rem;
}

@media (max-width: 400px) {
  .shots-head:has(.add-small) .wiz-title {
    font-size: 1.3rem;
  }
}

.add-small input[type='file'] {
  display: none;
}

/* Fase kiezen zonder uitlegregel: alleen de naam en wat er al is */
/* Fase kiezen: drie simpele knoppen, alleen de naam */
.phase-picker.compact button {
  min-height: 52px;
  padding: 10px;
  justify-items: center;
  align-content: center;
}

.phase-picker.compact strong {
  font-size: 1rem;
}

.shot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.shot-grid:empty {
  display: none;
}

@media (min-width: 560px) {
  .shot-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.shot {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
}

.shot-view {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shot .placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--subtle);
}

.shot-num {
  position: absolute;
  top: 8px;
  left: 8px;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  background: rgb(15 28 43 / 68%);
  pointer-events: none;
}

.shot-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--danger);
  box-shadow: 0 2px 8px rgb(0 0 0 / 30%);
  cursor: pointer;
}

/* Three photos per row on a phone: slightly smaller badges, still easy to tap. */
.shot .shot-num {
  top: 6px;
  left: 6px;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  font-size: 0.8rem;
}

.shot .shot-remove {
  top: 4px;
  right: 4px;
  width: 40px;
  height: 40px;
}

.shot-remove .icon {
  width: 21px;
  height: 21px;
}

.shot.error {
  border-color: var(--danger);
  box-shadow: inset 0 0 0 2px var(--danger);
}

/* Versturen: rustig. Wachtende foto's iets vager, een spinner op de foto die nu gaat, een vinkje als hij er is. */
.shot.waiting img {
  opacity: 0.55;
}

.shot-busy {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgb(15 28 43 / 35%);
  pointer-events: none;
}

.shot-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 2px 6px rgb(0 0 0 / 25%);
  pointer-events: none;
  animation: pop 0.25s ease-out;
}

.shot-badge .icon {
  width: 17px;
  height: 17px;
  stroke-width: 2.6;
}

.shot-badge.ok {
  background: var(--success);
}

.shot-badge.error {
  background: var(--danger);
}

.shot-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  background: #fff;
  transition: width 0.2s;
}

.spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid var(--line-strong);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner.light {
  width: 20px;
  height: 20px;
  border-color: rgb(255 255 255 / 35%);
  border-top-color: #fff;
}

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

.wiz-body .step-label {
  font-size: 1rem;
}

/* Schade bij het uploaden: alleen foto's via 'Schadefoto toevoegen' zijn schade */
.damage-box {
  display: grid;
  gap: 10px;
}

.damage-box:empty,
.damage-box[hidden] {
  display: none;
}

.damage-box input[type='file'] {
  display: none;
}

.damage-add-btn {
  justify-self: start;
}

.damage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.damage-head b {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--danger);
}

.damage-head b .icon {
  width: 18px;
  height: 18px;
}

.damage-note > span {
  color: var(--danger);
  font-weight: 650;
}

.damage-note .textarea {
  border-color: var(--danger);
}

.shot-dmg {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: var(--danger);
  pointer-events: none;
}

.done-details .damage-yes {
  color: var(--danger);
}

.subview-note.damage {
  border-color: transparent;
  color: var(--danger);
  background: var(--danger-50);
}

/* Schade op de projectpagina */
/* Overzicht op de projectpagina: alles in één oogopslag */
.overview-card .card-header h2 {
  flex: none;
}

.overview-last {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  font-size: 0.82rem;
  line-height: 1.3;
  text-align: right;
  color: var(--muted);
}

.overview-last .icon {
  flex: none;
  width: 14px;
  height: 14px;
}

.overview {
  display: grid;
  margin: 0;
}

.overview > div {
  display: grid;
  gap: 6px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.overview > div:first-child {
  padding-top: 0;
  border-top: 0;
}

.overview > div:last-child {
  padding-bottom: 0;
}

.overview dt {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.overview dt .icon {
  width: 16px;
  height: 16px;
}

.overview dd {
  margin: 0;
  min-width: 0;
}

.overview .has-damage dt {
  color: var(--danger);
}

.note-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.note-list button {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  font: inherit;
  text-align: left;
  color: var(--ink);
  background: var(--surface-2);
  cursor: pointer;
}

.note-list b {
  font-weight: 600;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.note-list small {
  font-size: 0.8rem;
  color: var(--muted);
}

.damage-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.damage-list li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.damage-list [data-damage-open] {
  flex: none;
  width: 64px;
  height: 64px;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--surface-2);
  cursor: zoom-in;
}

.damage-list [data-not-damage] {
  flex: none;
}

.damage-list img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.damage-list li > div {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.damage-list b {
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.damage-list small {
  font-size: 0.82rem;
  color: var(--muted);
}

.note-toggle {
  justify-self: start;
  margin-left: -8px;
}

.spinner.small {
  width: 20px;
  height: 20px;
  border-width: 2.5px;
}

/* Actiebalk onderin, direct boven het menu */

.wiz-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--tabbar-h) + 1px + var(--safe-bottom));
  z-index: 39;
  display: grid;
  gap: 10px;
  padding: 12px max(16px, calc((100% - 640px) / 2));
  border-top: 1px solid var(--line);
  background: rgb(255 255 255 / 96%);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 -10px 24px -14px rgb(15 28 43 / 22%);
}

.wiz-bar-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.wiz-bar-hint {
  margin: 0;
  text-align: center;
  font-size: 0.86rem;
  color: var(--muted);
}

@media (min-width: 1024px) {
  body.wiz-open main.view {
    padding-bottom: 56px;
  }

  .wiz-bar {
    position: sticky;
    bottom: 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
  }
}

.btn-xl {
  min-height: 62px;
  gap: 10px;
  border-radius: 16px;
  font-size: 1.12rem;
}

.btn-xl .icon {
  width: 24px;
  height: 24px;
}

.btn-send {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--success);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 14%),
    0 1px 2px rgb(15 28 43 / 12%);
}

.btn-send:hover:not([disabled]) {
  color: #fff;
  background: #1a7849;
}

.btn-send.sending[disabled] {
  opacity: 1;
  cursor: progress;
}

.btn-send > span {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-send > .send-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  border-radius: 0 2px 2px 0;
  background: rgb(255 255 255 / 85%);
  transition: width 0.25s;
}

.preview-actions .btn {
  flex: 1;
}

/* Klaar */

.wiz-done {
  justify-items: center;
  padding-top: 8px;
  text-align: center;
}

.done-mark {
  width: 100px;
  height: 100px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--success);
  box-shadow: 0 0 0 12px var(--success-50);
  animation: pop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}

.done-mark.empty {
  background: var(--muted);
  box-shadow: 0 0 0 12px var(--surface-2);
}

.done-fix {
  color: var(--danger);
}

.done-mark .icon {
  width: 54px;
  height: 54px;
  stroke-width: 2.6;
}

@keyframes pop {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
}

.done-thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.done-thumbs img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 10px;
}

.done-details {
  width: 100%;
  margin: 0;
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: left;
}

.done-details > div {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-top: 1px solid var(--line);
}

.done-details > div:first-child {
  border-top: 0;
}

.done-details .icon {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--subtle);
}

.done-details dt {
  flex: 1;
  color: var(--muted);
}

.done-details dd {
  margin: 0;
  font-weight: 650;
  text-align: right;
}

/* Grote startknop (home werknemer, projectpagina) */

.big-action {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 116px;
  padding: 20px;
  margin-bottom: 18px;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-700) 100%);
  box-shadow: var(--shadow-md);
}

.stack > .big-action {
  margin-bottom: 0;
}

.big-action:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-800) 100%);
}

.big-action:active {
  transform: translateY(1px);
}

.big-action-icon {
  flex: none;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgb(255 255 255 / 16%);
}

.big-action-icon .icon {
  width: 34px;
  height: 34px;
}

.big-action b {
  display: block;
  font-size: 1.4rem;
  line-height: 1.2;
}

.big-action small {
  display: block;
  margin-top: 4px;
  font-size: 0.95rem;
  opacity: 0.88;
}

.big-action .chev {
  flex: none;
  width: 26px;
  height: 26px;
  margin-left: auto;
  opacity: 0.8;
}

/* Inzendingen */

.sub-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sub-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 -10px;
  padding: 14px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.sub-item + .sub-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10px;
  right: 10px;
  border-top: 1px solid var(--line);
}

.sub-item:hover,
.sub-item:active {
  background: var(--surface-2);
}

.sub-item:has(.sub-open:focus-visible) {
  box-shadow: var(--ring);
}

/* The title button covers the whole item, so a tap anywhere opens it. */
.sub-open {
  min-width: 0;
  padding: 0;
  border: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  background: none;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sub-open::after {
  content: '';
  position: absolute;
  inset: 0;
}

.sub-open:focus-visible {
  outline: none;
}

.sub-meta a {
  position: relative;
  z-index: 1;
}

.sub-chev {
  flex: none;
  align-self: center;
  width: 22px;
  height: 22px;
  color: var(--subtle);
}

.sub-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 6px;
}

.sub-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.sub-head b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sub-count {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-2);
}

.sub-line {
  margin: -4px 0 0;
  overflow: hidden;
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sub-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: 0.86rem;
  color: var(--ink-2);
}

.sub-meta > span:not(.badge),
.sub-meta > a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.sub-meta a small {
  font-weight: 500;
  color: var(--muted);
}

.sub-count .icon,
.sub-meta .icon {
  width: 15px;
  height: 15px;
}

.sub-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 76px));
  gap: 6px;
  margin-top: 2px;
}

.sub-thumbs > span {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface-2);
}

.sub-thumbs img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sub-thumbs .more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  background: rgb(15 28 43 / 55%);
}

/* Inloggegevens versturen (beheerder) */

.credentials {
  display: grid;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.credentials > div {
  display: grid;
  gap: 2px;
  padding: 11px 14px;
  border-top: 1px solid var(--line);
}

.credentials > div:first-child {
  border-top: 0;
}

.credentials dt {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.credentials dd {
  display: grid;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.credentials dd small {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}

.credentials .mono {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
}

.credentials-actions {
  display: grid;
}

/* ---------- Inzending bekijken ---------- */

.subview {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--bg);
  animation: sheet-in 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.subview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(8px + var(--safe-top)) max(12px, calc((100% - 680px) / 2)) 8px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.subview-back {
  margin-left: -6px;
  font-size: 1rem;
}

.subview-back .icon {
  width: 22px;
  height: 22px;
}

.subview-count {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.subview-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 16px;
  padding: 18px max(16px, calc((100% - 640px) / 2)) 28px;
}

.subview-head {
  display: grid;
  gap: 4px;
}

.subview-head h2 {
  font-size: 1.45rem;
  line-height: 1.2;
}

.subview-head p:not(.eyebrow) {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--ink-2);
}

.subview-head .icon {
  width: 16px;
  height: 16px;
  color: var(--subtle);
}

.subview .done-details dd {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 4px 8px;
}

.subview .done-details dd small {
  font-weight: 500;
  color: var(--muted);
}

.subview-note,
.subview-hint {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.93rem;
  line-height: 1.45;
}

.subview-note {
  border: 1px solid var(--line);
  background: var(--surface);
  white-space: pre-line;
}

.subview-hint {
  color: #7a4a00;
  background: var(--warning-50);
}

.subview-hint.muted {
  color: var(--ink-2);
  background: var(--surface-2);
}

.subview-note .icon,
.subview-hint .icon {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.subview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 560px) {
  .subview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.subview-photo {
  display: grid;
  gap: 8px;
}

.subview-img {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
  cursor: zoom-in;
}

.subview-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.subview-delete {
  min-height: 48px;
  border-radius: 12px;
  font-size: 1rem;
}

.subview-bar {
  padding: 12px max(16px, calc((100% - 640px) / 2)) calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface);
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  color: #fff;
  background: #060c14;
  animation: fade 0.18s ease-out;
}

.lightbox header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(10px + var(--safe-top)) 12px 10px;
}

.lightbox .counter {
  flex: 1;
  text-align: center;
  font-size: 0.88rem;
  color: rgb(255 255 255 / 70%);
  font-variant-numeric: tabular-nums;
}

.lightbox .btn-icon {
  color: #fff;
  border-radius: 50%;
  background: rgb(255 255 255 / 10%);
}

.lightbox .btn-icon:hover {
  color: #fff;
  background: rgb(255 255 255 / 18%);
}

.lightbox .stage {
  position: relative;
  display: grid;
  /* A definite track, so the photo's max-height: 100% works and it always fits between the bars. */
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  min-height: 0;
  overflow: hidden;
  padding: 0 8px;
  touch-action: pan-y;
}

.lightbox .stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.lightbox .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox .nav.prev {
  left: 12px;
}

.lightbox .nav.next {
  right: 12px;
}

.lightbox footer {
  display: grid;
  gap: 12px;
  padding: 14px 16px calc(14px + var(--safe-bottom));
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

.lightbox .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  font-size: 0.86rem;
  color: rgb(255 255 255 / 80%);
}

.lightbox .meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lightbox .meta .icon {
  width: 15px;
  height: 15px;
}

.lightbox .meta a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lightbox .note {
  font-size: 0.95rem;
}

.lightbox .btn-row .btn {
  color: #fff;
  background: rgb(255 255 255 / 8%);
  border-color: rgb(255 255 255 / 14%);
}

.lightbox .btn-row .btn:hover {
  color: #fff;
  background: rgb(255 255 255 / 16%);
}

/* ---------- Sheet / dialog ---------- */

dialog.sheet {
  width: 100%;
  max-width: 520px;
  max-height: 92dvh;
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: 22px 22px 0 0;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

@media (min-width: 640px) {
  dialog.sheet {
    margin: auto;
    border-radius: 22px;
  }
}

dialog.sheet[open] {
  animation: sheet-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes sheet-in {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
}

dialog.sheet::backdrop {
  background: rgb(10 20 32 / 45%);
  backdrop-filter: blur(2px);
}

dialog.sheet form {
  display: grid;
  gap: 18px;
  padding: 22px 20px calc(20px + var(--safe-bottom));
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.sheet-head > div {
  flex: 1;
  display: grid;
  gap: 2px;
}

.sheet-head h2 {
  font-size: 1.15rem;
}

.sheet-head p {
  color: var(--muted);
  font-size: 0.88rem;
}

.sheet-actions {
  display: flex;
  gap: 10px;
  padding-top: 4px;
}

.sheet-actions .btn-primary {
  flex: 1;
}

/* ---------- Toasts ---------- */

/* Pagina en server zijn niet dezelfde versie */
.version-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 16px 0;
  padding: 12px 14px;
  border: 1px solid #f1d7a6;
  border-radius: var(--radius);
  font-size: 0.9rem;
  line-height: 1.4;
  color: #7a4a00;
  background: var(--warning-50);
}

.version-banner[hidden] {
  display: none;
}

.version-banner > .icon {
  flex: none;
  width: 20px;
  height: 20px;
}

.version-banner span {
  flex: 1;
}

.version-banner .btn {
  flex: none;
}

@media (min-width: 1024px) {
  .version-banner {
    margin: 20px 32px 0;
  }
}

#toasts {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 18px);
  z-index: 200;
  display: grid;
  gap: 8px;
  width: min(92vw, 420px);
  transform: translateX(-50%);
  pointer-events: none;
}

@media (min-width: 1024px) {
  #toasts {
    left: auto;
    right: 24px;
    bottom: 24px;
    transform: none;
  }
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 550;
  color: #fff;
  background: var(--ink);
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.toast .icon {
  width: 18px;
  height: 18px;
}

.toast.ok .icon {
  color: #6ee7a8;
}

.toast.error {
  background: var(--danger);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* ---------- Account ---------- */

.profile {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile h2 {
  font-size: 1.2rem;
}

/* ---------- Report ---------- */

.report {
  max-width: 900px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
}

.report-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 3px solid var(--brand);
}

.report-head img {
  width: 180px;
}

.report-head .doc-title {
  text-align: right;
}

.report-head .doc-title h1 {
  font-size: 1.3rem;
}

.report-head .doc-title p {
  color: var(--muted);
  font-size: 0.9rem;
}

.report table {
  width: 100%;
  margin-bottom: 20px;
  border-collapse: collapse;
  font-size: 0.93rem;
}

.report th,
.report td {
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.report th {
  width: 34%;
  font-weight: 600;
  color: var(--muted);
}

.report h2 {
  margin: 24px 0 12px;
  padding: 8px 12px;
  border-radius: 10px;
}

.report h2.phase-voor {
  color: var(--phase-voor);
  background: var(--phase-voor-50);
}

.report h2.phase-tijdens {
  color: var(--phase-tijdens);
  background: var(--phase-tijdens-50);
}

.report h2.phase-na {
  color: var(--phase-na);
  background: var(--phase-na-50);
}

.report h2.damage {
  color: var(--danger);
  background: var(--danger-50);
}

.report-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.report-photos figure {
  margin: 0;
  break-inside: avoid;
}

.report-photos img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: var(--surface-2);
}

.report-photos figcaption {
  margin-top: 5px;
  font-size: 0.8rem;
  color: var(--muted);
  /* A long word or link in a note must not make the page wider than the phone. */
  overflow-wrap: anywhere;
}

.report-photos figcaption b {
  color: var(--ink);
}

.report-foot {
  margin-top: 28px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 599px) {
  .report {
    padding: 16px;
  }

  .report-head .doc-title {
    text-align: left;
  }

  .report th {
    width: 42%;
  }
}

/* ---------- Laptop en desktop: compacter ----------
   Op de telefoon blijft alles groot voor duimen op de bouwplaats; met een muis kan het kleiner en rustiger. */

@media (min-width: 1024px) {
  .btn-xl {
    min-height: 46px;
    gap: 8px;
    border-radius: 12px;
    font-size: 0.98rem;
  }

  .btn-xl .icon {
    width: 20px;
    height: 20px;
  }

  .btn-lg {
    min-height: 42px;
    font-size: 0.94rem;
    border-radius: 12px;
  }

  /* Home werknemer: de startknop als nette balk in plaats van een grote kaart */
  .big-action {
    min-height: 0;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 16px;
  }

  .big-action-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .big-action-icon .icon {
    width: 22px;
    height: 22px;
  }

  .big-action b {
    font-size: 1.08rem;
  }

  .big-action small {
    margin-top: 2px;
    font-size: 0.86rem;
  }

  .sub-thumbs {
    grid-template-columns: repeat(6, minmax(0, 60px));
  }

  /* Uploaden in stappen */
  .wiz {
    gap: 14px;
  }

  .wiz-body {
    gap: 14px;
  }

  .wiz-title {
    font-size: 1.35rem;
  }

  .wiz-lead {
    font-size: 0.95rem;
  }

  .wiz-search .input {
    min-height: 44px;
    font-size: 15px;
  }

  .pick-card {
    min-height: 0;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius);
  }

  .pick-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .pick-main b {
    font-size: 1rem;
  }

  .pick-main span {
    font-size: 0.9rem;
  }

  .check-row {
    padding: 12px 16px;
  }

  .check-row.big b {
    font-size: 1.1rem;
  }

  .check-icon {
    width: 36px;
    height: 36px;
  }

  .add-tile {
    min-height: 84px;
    padding: 10px;
    border-radius: 14px;
  }

  .add-tile-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 4px;
    border-radius: 10px;
  }

  .add-tile-icon .icon {
    width: 20px;
    height: 20px;
  }

  .add-tile b {
    font-size: 0.95rem;
  }

  .shot-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }

  .shot .shot-remove {
    width: 32px;
    height: 32px;
  }

  .shot .shot-remove .icon {
    width: 16px;
    height: 16px;
  }

  .phase-picker.compact button {
    min-height: 40px;
    padding: 8px;
  }

  .phase-picker.compact strong {
    font-size: 0.94rem;
  }

  .done-mark {
    width: 72px;
    height: 72px;
    box-shadow: 0 0 0 10px var(--success-50);
  }

  .done-mark .icon {
    width: 38px;
    height: 38px;
  }

  /* Knoppen onderin naast elkaar in plaats van onder elkaar */
  .wiz-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .wiz-bar > * {
    flex: 1 1 220px;
  }

  .wiz-bar > .wiz-bar-hint {
    flex-basis: 100%;
  }

  .done-details > div {
    padding: 9px 14px;
  }

  /* Projectpagina: meer, kleinere foto's per rij */
  .photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
  }

  /* Inzending bekijken */
  .subview-head h2 {
    font-size: 1.25rem;
  }

  .subview-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
  }

  .subview-delete {
    min-height: 36px;
    font-size: 0.88rem;
  }

  /* Beheerder: uploaden vanaf het dashboard */
  .upload-body {
    gap: 16px;
  }

  .select-lg {
    min-height: 44px;
  }

  .pick-buttons .btn {
    min-height: 72px;
    gap: 6px;
  }

  .pick-buttons .btn .icon {
    width: 22px;
    height: 22px;
  }
}

@media print {
  @page {
    margin: 14mm;
  }

  body {
    background: #fff;
  }

  .sidebar,
  .appbar,
  .tabbar,
  .no-print,
  #toasts {
    display: none !important;
  }

  .shell {
    display: block;
    background: none;
  }

  main.view {
    padding: 0;
    max-width: none;
  }

  .report {
    max-width: none;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .report h2 {
    break-after: avoid;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ---------- Klanten & Team ---------- */

.segmented button .icon {
  width: 16px;
  height: 16px;
}

/* Clients get a square tile, people a round avatar: easy to tell apart in lists. */
.avatar.client-avatar {
  border-radius: 12px;
  color: var(--brand-700);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
}

.client-row .badge .icon {
  width: 13px;
  height: 13px;
}

.contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--muted);
}

.contact-line > * {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.contact-line .icon {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--subtle);
}

.contact-line a .icon {
  color: var(--brand);
}

/* Contactpersonen: in het klantformulier, bij een project kiezen, en op de projectpagina */
.contact-rows {
  display: grid;
  gap: 12px;
}

.contact-row {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.contact-row .form-grid {
  gap: 10px;
}

.contact-row [data-remove-contact] {
  justify-self: end;
}

.contact-line b {
  color: var(--ink);
  font-weight: 600;
}

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

.contact-picks {
  display: grid;
  gap: 6px;
}

.contact-pick {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
}

.contact-pick:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-50);
}

.contact-pick input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--brand);
}

.contact-pick span {
  display: grid;
  gap: 1px;
}

.contact-pick small {
  font-size: 0.82rem;
  color: var(--muted);
}

.project-contacts {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-contacts small {
  font-weight: 500;
  color: var(--muted);
}

.project-contacts span {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  font-size: 0.9rem;
  font-weight: 500;
}

.project-contacts a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.project-contacts .icon {
  width: 14px;
  height: 14px;
}

.client-project {
  display: grid;
  gap: 14px;
}

.client-project-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* The block's top line is one button: icon, number, status and photos; a click opens or closes it. */
.client-project-toggle {
  appearance: none;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin: -6px;
  padding: 6px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  text-align: left;
  color: inherit;
  background: none;
  cursor: pointer;
}

.client-project-toggle:hover {
  background: var(--surface-2);
}

.client-project-toggle:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.client-project-title {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  min-width: 0;
}

.client-project-name {
  font-size: 1.05rem;
  white-space: nowrap;
}

/* Phone: the number keeps its line; the folder icon makes room for it. */
@media (max-width: 480px) {
  .client-project-toggle > .icon-tile {
    display: none;
  }

  .client-project-name {
    font-size: 1rem;
  }
}

.client-project-stats {
  font-size: 0.86rem;
  color: var(--muted);
}

.client-project-chevron {
  flex: none;
  display: grid;
  color: var(--subtle);
  transition: transform 0.15s;
}

.client-project-chevron .icon {
  width: 20px;
  height: 20px;
}

.client-project.open .client-project-chevron {
  transform: rotate(90deg);
}

.client-project-body {
  display: grid;
  gap: 14px;
}

.client-project-body[hidden] {
  display: none;
}

.client-project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
}

.client-project-meta a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  overflow-wrap: anywhere;
}

.client-project-meta .icon {
  width: 15px;
  height: 15px;
  flex: none;
}

.client-subs-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.login-list {
  list-style: none;
  margin: 14px 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.login-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.login-list .avatar {
  width: 32px;
  height: 32px;
  font-size: 0.72rem;
}

.login-main {
  flex: 1;
  display: grid;
  min-width: 0;
}

.login-main small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-btn.inline {
  margin: 0;
  padding: 0;
  font-size: inherit;
  font-weight: 600;
  color: var(--brand);
}

.link-btn.inline:hover {
  color: var(--brand-700);
}

.btn.danger-link {
  justify-self: start;
  color: var(--danger);
}

.btn.danger-link:hover:not([disabled]) {
  color: var(--danger);
  background: var(--danger-50);
}

/* "+ Nieuwe klant" in the project form */
.new-client {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
}

.new-client .full {
  grid-column: 1 / -1;
}

/* Role choice for team members: two cards instead of a dropdown */
.role-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.role-option {
  position: relative;
  cursor: pointer;
}

.role-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.role-option > span {
  display: grid;
  gap: 2px;
  height: 100%;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  transition:
    border-color 0.15s,
    background 0.15s,
    box-shadow 0.15s;
}

.role-option .icon {
  width: 20px;
  height: 20px;
  margin-bottom: 4px;
  color: var(--subtle);
}

.role-option b {
  font-size: 0.95rem;
}

.role-option small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.role-option input:checked + span {
  border-color: var(--brand);
  background: var(--brand-50);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.role-option input:checked + span .icon {
  color: var(--brand);
}

.role-option input:focus-visible + span {
  box-shadow: var(--ring);
}

@media (max-width: 380px) {
  .role-picker,
  .new-client {
    grid-template-columns: minmax(0, 1fr);
  }
}

.client-notes {
  margin: -6px 0 18px;
}

.sub-note {
  display: flex;
  gap: 8px;
  margin: 2px 0 0;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.88rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--surface-2);
}

.sub-note.damage {
  color: var(--danger);
  background: var(--danger-50);
}

.sub-note.damage .icon {
  color: var(--danger);
}

.sub-note .icon {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 2px;
  color: var(--subtle);
}

/* ---------- Agenda ---------- */

.agenda {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  max-width: 760px;
}

.agenda .page-header {
  margin-bottom: 0;
}


.agenda-nav {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.agenda-week-head {
  display: flex;
  align-items: center;
  gap: 4px;
}

.agenda-week-title {
  appearance: none;
  flex: 1;
  display: grid;
  justify-items: center;
  min-width: 0;
  padding: 4px 10px;
  border: 0;
  border-radius: 10px;
  font: inherit;
  line-height: 1.3;
  color: inherit;
  background: none;
  cursor: pointer;
}

.agenda-week-title:hover {
  background: var(--surface-2);
}

.agenda-week-title .agenda-title-main {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  white-space: nowrap;
}

@media (max-width: 420px) {
  .agenda-week-title {
    padding: 4px 4px;
  }

  .agenda-week-title .agenda-title-main {
    gap: 4px;
  }

  .agenda-week-title b {
    font-size: 0.94rem;
  }
}

.agenda-title-main .icon {
  width: 16px;
  height: 16px;
  color: var(--brand);
}

/* Month picker: jump to any month, also far ahead */
dialog.month-picker {
  max-width: 440px;
}

.mp-year {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mp-year b {
  font-size: 1.15rem;
}

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

.mp-months button {
  appearance: none;
  min-height: 46px;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
}

.mp-months button:hover {
  background: var(--surface-2);
}

.mp-months button.now {
  color: var(--brand-700);
  border-color: var(--brand);
}

.mp-months button.chosen {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.mp-quick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--muted);
}

.agenda-week-title b {
  font-size: 1rem;
  text-transform: capitalize;
}

.agenda-week-title span {
  font-size: 0.8rem;
  color: var(--muted);
}

.agenda-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.agenda-daypill {
  appearance: none;
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 8px 0 7px;
  border: 1px solid transparent;
  border-radius: 12px;
  font: inherit;
  color: var(--ink-2);
  background: transparent;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}

.agenda-daypill:hover {
  background: var(--surface-2);
}

.agenda-daypill .dn {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.agenda-daypill .dd {
  font-size: 1.08rem;
  font-weight: 650;
}

.agenda-daypill .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
}

.agenda-daypill .dot.none {
  visibility: hidden;
}

.agenda-daypill.today {
  color: var(--brand-700);
  border-color: var(--brand-100);
}

.agenda-daypill.selected {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.agenda-daypill.selected .dn {
  color: rgb(255 255 255 / 80%);
}

.agenda-daypill.selected .dot {
  background: #fff;
}

.agenda-day {
  display: grid;
  gap: 10px;
}

.agenda-day-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 2px 0;
  font-size: 1.05rem;
}

.agenda-day-title > span:first-child::first-letter {
  text-transform: uppercase;
}

.agenda-today-badge {
  color: var(--brand-700);
  background: var(--brand-50);
}

.agenda-list {
  display: grid;
  gap: 10px;
}

.appt {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--job, var(--brand));
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}

.appt-time {
  display: grid;
  align-content: start;
  gap: 2px;
  font-variant-numeric: tabular-nums;
}

.appt-time b {
  font-size: 1.05rem;
}

.appt-time span {
  font-size: 0.82rem;
  color: var(--muted);
}

.appt-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.appt-body h3 {
  margin: 0;
  font-size: 1rem;
}

.appt-task {
  margin: 0;
  font-weight: 550;
  color: var(--ink-2);
}

.appt-place {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.appt-place .icon {
  flex: none;
  width: 15px;
  height: 15px;
}

.appt-place span,
.appt-names {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appt-people {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.appt-avatars {
  display: flex;
}

.appt-avatars .avatar {
  width: 28px;
  height: 28px;
  font-size: 0.68rem;
  border: 2px solid var(--surface);
}

.appt-avatars .avatar + .avatar {
  margin-left: -8px;
}

.appt-names {
  font-size: 0.85rem;
  color: var(--muted);
}

.agenda-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
}

.agenda-empty .icon {
  width: 28px;
  height: 28px;
  color: var(--subtle);
}

.agenda-empty p {
  margin: 0;
}

/* Account (beheerder): the way to Team */
.account-link {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  text-decoration: none;
}

.account-link:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.account-link-text {
  flex: 1;
  display: grid;
  gap: 2px;
  min-width: 0;
}

.account-link > .icon {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--subtle);
}

/* Account (werknemer): "Zo werkt het" starts the tour again */
button.account-link {
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

/* "Aan de slag": a tour through the upload screens. A dark layer with a hole over what to tap,
   a ring around the hole, and a text balloon pointing at it. Above everything but the toasts. */
.tour-shade {
  position: fixed;
  inset: 0;
  z-index: 150;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.tour-shade path {
  fill: rgb(10 20 32 / 62%);
  pointer-events: visiblePainted;
}

.tour-ring {
  position: fixed;
  z-index: 151;
  pointer-events: none;
  box-shadow: 0 0 0 3px #fff, 0 0 0 7px rgb(24 102 163 / 60%);
  animation: tour-pulse 1.6s ease-in-out infinite;
}

@keyframes tour-pulse {
  50% {
    box-shadow: 0 0 0 3px #fff, 0 0 0 13px rgb(24 102 163 / 0%);
  }
}

.tour-bubble {
  position: fixed;
  z-index: 152;
  width: min(340px, calc(100vw - 24px));
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}

/* The arrow: on top when the balloon is below the target, at the bottom when it is above. */
.tour-bubble::before {
  content: '';
  position: absolute;
  left: calc(var(--arrow-x, 50%) - 8px);
  width: 16px;
  height: 16px;
  background: var(--surface);
  transform: rotate(45deg);
}

.tour-bubble[data-side='below']::before {
  top: -7px;
}

.tour-bubble[data-side='above']::before {
  bottom: -7px;
}

.tour-bubble[data-side='center']::before {
  display: none;
}

.tour-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -6px -8px -4px 0;
}

.tour-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brand);
}

.tour-close {
  width: 36px;
  min-height: 36px;
  color: var(--muted);
}

.tour-kicker {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand);
}

.tour-text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.tour-text b {
  color: var(--ink);
}

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

/* Where on the road: one dot per part, the current one wide. */
.tour-dots {
  display: flex;
  gap: 5px;
  margin-right: auto;
}

.tour-dots span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--line-strong);
}

.tour-dots span.done {
  background: rgb(24 102 163 / 40%);
}

.tour-dots span.on {
  width: 20px;
  background: var(--brand);
}

.tour-actions .btn {
  min-height: 46px;
}

@media (prefers-reduced-motion: reduce) {
  .tour-ring {
    animation: none;
  }
}

/* ---------- Agenda: day, week and month ---------- */

/* A laptop or computer only shows the month. */
@media (min-width: 1024px) {
  .agenda-views {
    display: none;
  }
}

.agenda-loading {
  padding: 24px 4px;
}

.agenda.wide {
  max-width: none;
}

.agenda-views {
  width: 100%;
  max-width: 340px;
}

/* Agenda: calm tones, one per appointment (black, blues, greys). --job is the stripe, --job-50 the
   background, --job-ink the text in that colour (darker where the stripe is light). */
.c1 {
  --job: #1e293b; /* bijna zwart */
  --job-50: #eef1f5;
  --job-ink: #1e293b;
}

.c2 {
  --job: var(--brand); /* blauw */
  --job-50: var(--brand-50);
  --job-ink: var(--brand-700);
}

.c3 {
  --job: #a3b1c2; /* lichtgrijs */
  --job-50: #f6f8fa;
  --job-ink: #52627a;
}

.c4 {
  --job: var(--brand-800); /* donkerblauw */
  --job-50: #e7eef6;
  --job-ink: var(--brand-800);
}

.c5 {
  --job: #64748b; /* leisteen */
  --job-50: #f1f4f7;
  --job-ink: #475569;
}

.c6 {
  --job: #5b84b8; /* staalblauw */
  --job-50: #eef3fa;
  --job-ink: #3c6597;
}

.c7 {
  --job: #3f4a5a; /* antraciet */
  --job-50: #eceff3;
  --job-ink: #3f4a5a;
}

.appt-days {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  vertical-align: 1px;
  white-space: nowrap;
  color: var(--job-ink, var(--brand));
  background: var(--job-50, var(--brand-50));
}

/* Week: one row per day on a phone, seven columns on a big screen. */
.agenda-weekgrid {
  display: grid;
  gap: 8px;
}

.wk-day {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.wk-day.today {
  border-color: var(--brand);
  box-shadow: var(--ring);
}

.wk-head {
  appearance: none;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 1px;
  padding: 4px 0;
  border: 0;
  border-radius: 10px;
  font: inherit;
  color: var(--ink);
  background: var(--surface-2);
  cursor: pointer;
}

.wk-head .dn,
.wk-month {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.wk-head b {
  font-size: 1.15rem;
}

.wk-day.today .wk-head {
  color: #fff;
  background: var(--brand);
}

.wk-day.today .wk-head .dn,
.wk-day.today .wk-month {
  color: rgb(255 255 255 / 80%);
}

.wk-items {
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
}

.wk-item {
  appearance: none;
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px 10px;
  border: 0;
  border-left: 3px solid var(--job);
  border-radius: 8px;
  font: inherit;
  font-size: 0.86rem;
  text-align: left;
  color: var(--ink);
  background: var(--job-50);
  cursor: pointer;
}

.wk-item b,
.wk-task {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wk-time,
.wk-task {
  font-size: 0.8rem;
  color: var(--ink-2);
}

.wk-time {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.wk-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.wk-foot .appt-avatars .avatar {
  width: 24px;
  height: 24px;
  font-size: 0.6rem;
}

.wk-foot .appt-days {
  margin: 0;
  background: var(--surface);
}

.wk-free {
  align-self: center;
  font-size: 0.86rem;
  color: var(--subtle);
}

@media (min-width: 960px) {
  .agenda-weekgrid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
  }

  .wk-day {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    min-height: 320px;
  }

  .wk-head {
    grid-auto-flow: column;
    justify-content: start;
    align-items: baseline;
    gap: 6px;
    padding: 6px 10px;
  }

  .wk-free {
    align-self: start;
    padding: 4px 2px;
  }

  /* Narrow columns: names and tasks may take a second line instead of being cut off. */
  .wk-item b,
  .wk-task {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* Agenda: appointments open their project. */
.appt {
  cursor: pointer;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.appt:hover {
  box-shadow: var(--shadow-sm);
  border-top-color: var(--line-strong);
  border-right-color: var(--line-strong);
  border-bottom-color: var(--line-strong);
}

.appt:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.appt-time .allday {
  font-size: 0.86rem;
  line-height: 1.3;
}

.appt-edit {
  align-self: start;
  margin: -6px -8px 0 0;
  color: var(--muted);
}

.appt-go {
  align-self: center;
  color: var(--subtle);
}

.appt-go .icon {
  width: 20px;
  height: 20px;
}

.appt-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 2px 0 0;
  font-size: 0.86rem;
  color: var(--ink-2);
}

.appt-note .icon {
  flex: none;
  width: 15px;
  height: 15px;
  margin-top: 2px;
  color: var(--muted);
}

/* Month: one grid per week. Days are the background; every appointment is one block over its days,
   on its own row, so a job of several days reads as one piece. */
.agenda-month {
  padding: 10px;
}

.mo-head {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.mo-head span {
  padding: 4px 0 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
  color: var(--muted);
}

.mo-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  row-gap: 3px;
  min-height: 70px;
  padding-bottom: 6px;
  border-top: 1px solid var(--line);
}

.mo-cell {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  margin: 0;
  padding: 4px 0 0;
  border: 0;
  font: inherit;
  color: var(--ink);
  background: none;
}

button.mo-cell {
  cursor: pointer;
}

.mo-cell + .mo-cell {
  box-shadow: inset 1px 0 0 var(--line);
}

.mo-cell.other {
  color: var(--subtle);
  background: var(--surface-2);
}

.mo-date {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.86rem;
  font-weight: 600;
}

.mo-cell.today .mo-date {
  color: #fff;
  background: var(--brand);
}

/* Phone: a thin line per appointment. */
.mo-ev {
  position: relative; /* above the day behind it */
  height: 6px;
  margin: 0 3px;
  border-radius: 4px;
  background: var(--job);
  pointer-events: none; /* tapping it opens the day underneath */
}

.mo-ev.from-before {
  margin-left: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.mo-ev.goes-on {
  margin-right: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.mo-more {
  position: relative;
  justify-self: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  pointer-events: none;
}

.mo-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 0;
  padding: 10px 4px 2px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}

.mo-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mo-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--job);
}

/* Laptop: the month fits the window. Each block is one line: start time and title; a click opens the
   day with everything in full. The weeks share the height the script gives the card. */
.agenda-month.big {
  display: flex;
  flex-direction: column;
  padding: 6px 10px 8px;
}

.agenda-month.big .mo-head span {
  padding: 2px 0 6px;
}

.agenda-month.big .mo-weeks {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-rows: repeat(var(--weeks), minmax(0, 1fr));
}

.agenda-month.big .mo-week {
  min-height: 0;
  row-gap: 2px;
  padding-bottom: 2px;
  overflow: hidden;
}

.agenda-month.big .mo-cell {
  align-items: flex-start;
  padding: 3px 0 0 6px;
}

.agenda-month.big .mo-date {
  width: 24px;
  height: 24px;
  font-size: 0.82rem;
}

.agenda-month.big .mo-ev {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  min-width: 0;
  margin: 0 4px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  box-shadow: inset 3px 0 0 var(--job);
  font: inherit;
  font-size: 0.78rem;
  text-align: left;
  color: var(--ink);
  background: var(--job-50);
  cursor: pointer;
  pointer-events: auto;
  overflow: hidden;
}

.agenda-month.big .mo-ev:hover {
  box-shadow:
    inset 3px 0 0 var(--job),
    0 0 0 1px var(--job);
}

.agenda-month.big .mo-ev:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

/* A job that started last week (or goes on next week) runs into the edge, without the coloured stripe. */
.agenda-month.big .mo-ev.from-before {
  margin-left: 0;
  box-shadow: none;
}

.agenda-month.big .mo-ev.goes-on {
  margin-right: 0;
}

.agenda-month.big .mo-ev.from-before:hover {
  box-shadow: 0 0 0 1px var(--job);
}

.agenda-month.big .mo-ev b {
  min-width: 0;
  overflow: hidden;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ev-time {
  flex: none;
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--job-ink);
}

.agenda-month.big .mo-more {
  align-self: center;
  justify-self: start;
  padding-left: 10px;
  font-size: 0.7rem;
}

/* The colours already name the clients in the blocks; on a laptop the legend would only cost room. */
.agenda-month.big .mo-legend {
  display: none;
}

.mo-cell.busy,
.mo-cell.plannable {
  position: relative;
  cursor: pointer;
}

.mo-cell.busy:hover,
.mo-cell.plannable:hover {
  background: var(--surface-2);
}

.mo-cell.plannable:hover::after {
  content: '+';
  position: absolute;
  top: 4px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-50);
}

/* Laptop: a compact header leaves the room to the month. */
@media (min-width: 1024px) {
  .agenda.wide {
    gap: 10px;
  }

  .agenda.wide .page-header .lead {
    display: none;
  }

  .agenda.wide .page-header {
    margin-bottom: 0;
  }

  /* The month navigation as a slim line instead of a card */
  .agenda.wide .agenda-nav {
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }
}

/* The window with one day's appointments */
dialog.agenda-dialog {
  max-width: 560px;
}

.agenda-dialog .agenda-list {
  max-height: min(62dvh, 560px);
  overflow-y: auto;
  padding: 2px;
}

/* Week view: the remark under the work. */
.wk-note {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  font-size: 0.76rem;
  color: var(--muted);
}

.wk-note .icon {
  flex: none;
  width: 12px;
  height: 12px;
  margin-top: 2px;
}

.wk-note span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The appointment form */
.appt-form-dates {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.appt-people-pick {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 6px;
}

/* Project page: Planning */
.planning-card .card-header {
  justify-content: space-between;
}

.planning-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.planning-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 4px 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.planning-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.planning-list li.past {
  opacity: 0.6;
}

.planning-date,
.planning-what {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.planning-what {
  grid-column: 1;
}

.planning-list li > .btn {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.planning-date b {
  font-size: 0.92rem;
}

.planning-list small {
  font-size: 0.82rem;
  color: var(--muted);
}

.planning-note {
  color: var(--ink-2) !important;
}

/* ---------- Shared report: the page a client opens from the e-mail, without logging in ---------- */
.shared-report-page {
  padding: 0 16px 40px;
  background: var(--bg);
}

.shared-report-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  max-width: 900px;
  margin: 0 auto 16px;
  padding: 12px 0;
  background: var(--bg);
}

.shared-report-page .report {
  margin: 0 auto;
}

.shared-report-page .report-photos a {
  display: block;
}

.shared-report-gone {
  display: grid;
  justify-items: center;
  gap: 12px;
  max-width: 480px;
  margin: 14vh auto 0;
  text-align: center;
}

.shared-report-gone p {
  color: var(--muted);
}

@media print {
  .shared-report-page {
    padding: 0;
    background: #fff;
  }
}

/* Report: sharing by e-mail (beheerder) */
.share-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: -8px;
}

.share-chip {
  appearance: none;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 0.82rem;
  text-align: left;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
}

.share-chip small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
}

.share-chip.chosen {
  border-color: var(--brand);
  background: var(--brand-50);
}

.share-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.86rem;
  color: var(--brand-800);
  background: var(--brand-50);
}

.share-note > span {
  display: block;
}

.share-note .btn {
  display: flex;
  margin-top: 8px;
}

.share-note.warn {
  color: var(--warning);
  background: var(--warning-50);
}

.share-note .icon {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.share-link {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.82rem !important;
}

.share-list {
  max-width: 900px;
  margin-bottom: 16px;
}

.share-list ul {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.share-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.share-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.share-list li > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.share-list li b {
  overflow: hidden;
  text-overflow: ellipsis;
}

.share-list li small {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Agenda: the tick on appointments of a finished project */
.appt-done {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  vertical-align: 2px;
  color: var(--success);
  background: var(--success-50);
}

.appt-done .icon {
  width: 12px;
  height: 12px;
}

.ev-done {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  margin-right: 5px;
  border-radius: 50%;
  vertical-align: -2px;
  color: #fff;
  background: var(--success);
}

.agenda-month.big .mo-ev .ev-done {
  margin-right: 0;
}

.ev-done .icon {
  width: 10px;
  height: 10px;
  stroke-width: 3;
}

/* ---------- Projectpagina op de computer (project-desktop.js) ---------- */

.pd {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pd .page-header {
  margin-bottom: 0;
}

.pd-sum {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 0;
}

.pd-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.pd-count .icon {
  width: 14px;
  height: 14px;
}

.pd-count.phase-voor:not(.zero) {
  color: var(--phase-voor);
  background: var(--phase-voor-50);
  border-color: transparent;
}

.pd-count.phase-tijdens:not(.zero) {
  color: var(--phase-tijdens);
  background: var(--phase-tijdens-50);
  border-color: transparent;
}

.pd-count.phase-na:not(.zero) {
  color: var(--phase-na);
  background: var(--phase-na-50);
  border-color: transparent;
}

.pd-count.zero {
  color: var(--subtle);
}

.pd-count.damage {
  color: var(--danger);
  background: var(--danger-50);
  border-color: transparent;
}

.pd .phase-dot {
  display: inline-block;
  flex: none;
}

.pd .phase-voor .phase-dot,
.pd .phase-dot.phase-voor {
  background: var(--phase-voor);
}

.pd .phase-tijdens .phase-dot,
.pd .phase-dot.phase-tijdens {
  background: var(--phase-tijdens);
}

.pd .phase-na .phase-dot,
.pd .phase-dot.phase-na {
  background: var(--phase-na);
}

.pd .zero .phase-dot {
  background: var(--line-strong);
}

/* Cards on top */
.pd-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

@media (min-width: 1280px) {
  .pd-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.pd-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 16px 18px;
}

.pd-card h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.pd-card h2 .icon {
  width: 15px;
  height: 15px;
}

.pd-card p {
  margin: 0;
}

.pd-big-line {
  font-size: 1rem;
  font-weight: 700;
}

.pd-contacts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
}

.pd-contacts li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
}

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

.pd-contacts a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  overflow-wrap: anywhere;
}

.pd-contacts .icon {
  width: 13px;
  height: 13px;
}

.pd-dl {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}

.pd-dl dt {
  font-size: 0.75rem;
  color: var(--muted);
}

.pd-dl dd {
  margin: 1px 0 0;
  font-size: 0.875rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.pd-plan-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 -8px;
  padding: 8px;
  border-radius: var(--radius-sm);
  color: inherit;
  text-decoration: none;
}

.pd-plan-link:hover {
  background: var(--brand-50);
}

.pd-plan-next {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.875rem;
}

.pd-plan-next small {
  color: var(--muted);
}

.pd-plan-next b {
  font-size: 0.95rem;
}

.pd-plan-after {
  font-size: 0.8rem;
  color: var(--muted);
}

.pd-plan-go {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand);
}

.pd-plan-go .icon {
  width: 14px;
  height: 14px;
}

.pd-plan .btn {
  align-self: flex-start;
  margin-top: auto;
}

.pd-special {
  background: var(--warning-50);
  border-color: #f2dcb3;
}

.pd-special h2 {
  color: var(--warning);
}

.pd-notes {
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-line;
  color: #5c3a00;
  overflow-wrap: anywhere;
}

/* Submissions: list on the left, the chosen one on the right */
.pd-split {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  min-height: 560px;
  padding: 0;
  overflow: hidden;
}

.pd-list {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-right: 1px solid var(--line);
}

.pd-list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px 6px;
}

.pd-list-head h2 {
  margin: 0;
  font-size: 1rem;
}

.pd-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 16px 12px;
  border-bottom: 1px solid var(--line);
}

.pd-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font: 600 0.78rem var(--font);
  color: var(--ink-2);
  cursor: pointer;
}

.pd-chip small {
  font-weight: 600;
  color: var(--muted);
}

.pd-chip[aria-pressed='true'] {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.pd-chip[aria-pressed='true'] small {
  color: #cbd5e1;
}

.pd-chip.damage {
  color: var(--danger);
  border-color: #f3c9c4;
}

.pd-chip.damage[aria-pressed='true'] {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}

.pd-items {
  flex: 1;
  max-height: 640px;
  overflow-y: auto;
}

.pd-pad {
  padding: 16px;
  margin: 0;
}

.pd-item {
  display: flex;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.pd-item:hover {
  background: var(--surface-2);
}

.pd-item.on {
  background: var(--brand-50);
  box-shadow: inset 3px 0 0 var(--brand);
}

.pd-item.is-damage .avatar {
  color: var(--danger);
  background: var(--danger-50);
}

.pd-item-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.pd-item-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  font-size: 0.875rem;
}

.pd-item-text {
  overflow: hidden;
  font-size: 0.85rem;
  color: var(--ink-2);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pd-item-text.damage {
  font-weight: 600;
  color: var(--danger);
}

.pd-item small {
  font-size: 0.75rem;
  color: var(--muted);
}

.pd-list-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--ink-2);
}

.pd-list-foot:empty {
  display: none;
}

.pd-list-foot > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pd-list-foot .icon {
  width: 14px;
  height: 14px;
}

.pd-vis-btns {
  display: flex;
  gap: 2px;
}

.pd-detail {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 20px 24px 24px;
}

.pd-detail > .empty {
  margin: auto;
}

.pd-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}

.pd-detail-head > div:nth-child(2) {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pd-detail-head small {
  font-size: 0.8rem;
  color: var(--muted);
}

.pd-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.pd-damage {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 10px 14px;
  border: 1px solid #f3c9c4;
  border-radius: var(--radius-sm);
  background: var(--danger-50);
  font-size: 0.9rem;
  color: #7d231b;
}

.pd-damage > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pd-damage .icon {
  width: 16px;
  height: 16px;
  color: var(--danger);
}

.pd-remark {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 0.9rem;
  line-height: 1.5;
}

.pd-remark .icon {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  color: var(--muted);
}

.pd-photo {
  margin: 0;
}

.pd-photo-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: #0f1c2b;
  cursor: zoom-in;
  overflow: hidden;
}

.pd-photo-btn img {
  display: block;
  width: 100%;
  height: min(52vh, 520px);
  object-fit: contain;
}

.pd-photo figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 18px;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}

.pd-photo figcaption span,
.pd-photo figcaption a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pd-photo figcaption a {
  margin-left: auto;
  font-weight: 600;
}

.pd-photo figcaption .icon {
  width: 14px;
  height: 14px;
}

.pd-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
}

.pd-thumbs button {
  position: relative;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: var(--surface-2);
  cursor: pointer;
  overflow: hidden;
}

.pd-thumbs button.on {
  border-color: var(--brand);
}

.pd-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-thumbs .dmg-tag {
  position: absolute;
  top: 4px;
  right: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  background: var(--danger);
}

/* Team notes */
.pd-team {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pd-team .card-header h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pd-team-form {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.pd-team-form .textarea {
  flex: 1;
  min-height: 0;
}

.pd-comments {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pd-comments > li {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.pd-comment {
  flex: 1;
  min-width: 0;
}

.pd-comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
}

.pd-comment-tools {
  display: flex;
  gap: 2px;
  margin-left: auto;
}

.pd-comment-body {
  margin: 2px 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.pd-comment-edit {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

/* ---------- Forgotten password ---------- */
.auth-steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--ink-2);
}

.auth-steps .icon {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: var(--brand);
}

.reset-requests {
  border-color: var(--warning);
  background: var(--warning-50);
}

.reset-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reset-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.reset-main {
  flex: 1;
  display: grid;
  gap: 2px;
  min-width: 0;
}

.reset-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.reset-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 16px;
  border: 1px solid var(--warning);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--warning-50);
  text-decoration: none;
}

.reset-alert:hover {
  color: var(--ink);
}

.reset-alert > .icon {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--warning);
}

.reset-alert span {
  flex: 1;
}

/* ---------- Dashboard beheerder: projecten en activiteit ---------- */

.dash-stats {
  margin-bottom: 20px;
}

@media (min-width: 900px) {
  .dash-stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.stat.is-damage {
  border-color: #f3c9c4;
  background: var(--danger-50);
}

.stat.is-damage b,
.stat.is-damage div > span {
  color: var(--danger);
}

.stat.is-damage .icon-tile {
  color: var(--danger);
  background: #fff;
}

.dash-projects .card-header {
  flex-wrap: wrap;
  gap: 10px;
}

.dash-period {
  flex: none;
  width: auto;
}

.dash-period button {
  flex: none;
  min-height: 32px;
}

.dash-pad {
  padding: 8px 0;
}

.card.flush .dash-pad {
  padding: 8px 16px 16px;
}

.dash-proj-list {
  display: flex;
  flex-direction: column;
}

.dash-proj {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.dash-proj:first-child {
  border-top: 0;
}

.dash-proj:hover .dash-proj-main b {
  color: var(--brand);
}

.dash-proj-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.dash-proj-main > b {
  font-size: 1rem;
}

.dash-proj-main > small {
  font-size: 0.82rem;
  color: var(--muted);
}

.dash-plan {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 2px;
  font-size: 0.85rem;
  color: var(--ink-2);
}

.dash-plan .icon {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 3px;
  color: var(--brand);
}

.dash-plan em {
  font-style: normal;
  font-weight: 600;
  color: var(--warning);
}

.dash-proj-meta {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
}

.dash-proj-meta .num {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.dash-proj-meta .num .icon {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.dash-proj-meta small {
  font-size: 0.78rem;
  color: var(--muted);
}

.dash-proj > .chev {
  flex: none;
  color: var(--subtle);
}

.dash-phases {
  margin-top: 6px;
}

.dash-phases .pc {
  font-size: 0.75rem;
  padding: 1px 8px;
}

.dash-att-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-att {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: inherit;
  text-decoration: none;
}

.dash-att:hover {
  color: inherit;
  filter: brightness(0.98);
}

.dash-att > .icon {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.dash-att > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dash-att b {
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.dash-att small {
  font-size: 0.8rem;
  color: var(--muted);
}

.dash-att.damage {
  background: var(--danger-50);
}

.dash-att.damage > .icon,
.dash-att.damage b {
  color: var(--danger);
}

.dash-att.warn {
  background: var(--warning-50);
}

.dash-att.warn > .icon,
.dash-att.warn b {
  color: var(--warning);
}

.dash-att.quiet > .icon {
  color: var(--muted);
}

.dash-ok {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.9rem;
  color: var(--success);
}

.dash-ok .icon {
  width: 18px;
  height: 18px;
}

/* Phone: projects, then what needs attention, then the rest. Laptop: two columns. */
.dash-areas {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

@media (min-width: 1200px) {
  .dash-areas {
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr);
    grid-template-areas:
      'proj att'
      'active act';
  }

  .dash-a-proj { grid-area: proj; }
  .dash-a-att { grid-area: att; }
  .dash-a-active { grid-area: active; }
  .dash-a-act { grid-area: act; }
}

/* Rapport nog sturen: finished projects whose report still has to go to the client */
.dash-reports-lead {
  margin: -4px 0 12px;
}

.dash-att.report {
  align-items: center;
  background: var(--brand-50);
}

.dash-att.report > .icon {
  margin-top: 0;
  color: var(--brand);
}

.dash-att.report {
  flex-wrap: wrap;
}

.dash-att.report > span:nth-child(2) {
  flex: 1 1 200px;
}

.dash-att.report > span:nth-child(2) a {
  color: inherit;
}

.dash-resend {
  color: var(--warning) !important;
  font-weight: 600;
}

/* The two buttons sit side by side (not in the column the other spans use). */
.dash-att.report > .dash-report-btns {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
}

.dash-report-btns .btn {
  white-space: nowrap;
}

/* "Al op een andere manier gestuurd?": a quiet link next to the one button. */
.dash-att.report > .dash-report-btns {
  align-items: center;
}

.dash-mark {
  font-size: 0.8rem;
  color: var(--muted);
}

.dash-reports .card-header {
  flex-wrap: wrap;
  gap: 10px;
}

.dash-reports .segmented .count {
  font-weight: 700;
}

.dash-reports .badge.to-send {
  color: var(--brand-700);
  background: var(--brand-50);
}

.dash-reports .badge.all-sent {
  color: var(--success);
  background: var(--success-50);
}

.dash-sub {
  margin: 16px 0 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.dash-sent-list {
  display: flex;
  flex-direction: column;
}

.dash-sent {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.dash-sent:first-child {
  border-top: 0;
}

.dash-sent > .icon {
  flex: none;
  width: 18px;
  height: 18px;
  padding: 3px;
  border-radius: 50%;
  color: #fff;
  background: var(--success);
}

.dash-sent > span {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.dash-sent a {
  color: inherit;
}

.dash-sent b {
  font-size: 0.9rem;
}

.dash-sent small {
  font-size: 0.8rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.dash-sent .link-btn {
  flex: none;
  font-size: 0.8rem;
}

.dash-mark.link-btn {
  margin-left: 0;
  color: var(--muted);
  text-decoration: underline;
}

.dash-reports .card-header h2 {
  flex: none;
  white-space: nowrap;
}

.dash-reports .card-header .segmented {
  margin-left: auto;
}

/* Rapporten on every width: icon and text side by side, the button on its own row underneath;
   on a phone the switch takes the full width under the title and the button the full width too. */
.dash-att.report {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: start;
}

.dash-att.report > .icon {
  margin-top: 2px;
}

.dash-att.report > .dash-report-btns {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
}

.dash-reports .card-header h2 {
  min-width: max-content;
  overflow: visible;
}

@media (max-width: 600px) {
  .dash-reports .card-header .segmented {
    flex: 1 1 100%;
    margin-left: 0;
  }

  .dash-reports .card-header .segmented button {
    flex: 1;
  }

  .dash-att.report > .dash-report-btns .btn {
    flex: 1 1 100%;
    justify-content: center;
    min-height: 44px;
  }

  .dash-att.report > .dash-report-btns .dash-mark {
    flex: 1 1 100%;
    text-align: center;
  }
}

/* Rapporten: a list of more than 4 scrolls inside the box; the arrow shows there is more below. */
.dash-report-wrap {
  position: relative;
}

.dash-report-scroll.is-long {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-width: thin;
}

.dash-scroll-hint {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  color: var(--brand);
  cursor: pointer;
}

.dash-scroll-hint[hidden] {
  display: none;
}

.dash-scroll-hint .icon {
  width: 18px;
  height: 18px;
  transform: rotate(90deg);
}

/* Report to the client: how to send it (the app or your own e-mail program) */
.share-how {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}

.share-how legend {
  margin-bottom: 6px;
  padding: 0;
  font-size: 0.86rem;
  font-weight: 600;
}

.share-how-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.share-how-option:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-50);
}

.share-how-option input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--brand);
}

.share-how-option span {
  display: grid;
  gap: 2px;
  font-size: 0.9rem;
}

.share-how-option small {
  font-size: 0.8rem;
  color: var(--muted);
}

/* What happened to a report that was sent: arrived, opened, bounced */
.report-badges {
  display: flex !important;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.report-badges:empty {
  display: none !important;
}

.report-badges .badge {
  font-size: 0.72rem;
}

.badge.st-ok {
  color: var(--success);
  background: var(--success-50);
}

.badge.st-wait {
  color: var(--brand-700);
  background: var(--brand-50);
}

.badge.st-warn {
  color: var(--warning);
  background: var(--warning-50);
}

.badge.st-bad {
  color: var(--danger);
  background: var(--danger-50);
}

.badge.st-none {
  color: var(--muted);
  background: var(--bg, #f1f4f8);
}

.dash-bounced {
  color: var(--danger) !important;
  font-weight: 600;
}

.share-pdf {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 12px 4px 40px;
  font-size: 0.86rem;
  cursor: pointer;
}

.share-pdf[hidden] {
  display: none;
}

.share-pdf input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--brand);
}

.share-pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 600;
}

.share-pdf-link .icon {
  width: 16px;
  height: 16px;
}

/* ---------- Own dropdowns, date and time pickers (lib/pickers.js) ---------- */
/* The real field stays in the form but is hidden; the button takes its place and look. */
.form-grid > .field:has(> .picker-trigger) {
  min-width: 0;
}

.picker-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden;
  clip-path: inset(50%);
  border: 0 !important;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}

.picker-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-align: left;
  cursor: pointer;
}

.picker-trigger:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.picker-trigger[aria-expanded='true'] {
  border-color: var(--brand);
  box-shadow: var(--ring);
}

.picker-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picker-value.is-placeholder {
  color: var(--subtle);
  font-weight: 400;
}

.picker-trigger > .icon {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.picker-pop {
  position: fixed;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 16px 40px rgb(15 28 43 / 18%), 0 2px 6px rgb(15 28 43 / 8%);
  animation: picker-in 0.12s ease-out;
}

@keyframes picker-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

/* Dropdown list */
.picker-search {
  position: sticky;
  top: -6px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -6px -6px 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.picker-search .icon {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.picker-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: transparent;
}

.picker-list {
  display: grid;
  gap: 2px;
}

.picker-opt {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: 0.93rem;
  text-align: left;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.picker-opt > span {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 1px;
}

.picker-opt b {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.picker-opt small {
  font-size: 0.8rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.picker-opt.is-placeholder b {
  font-weight: 400;
  color: var(--muted);
}

.picker-opt:hover,
.picker-opt:focus-visible {
  outline: none;
  background: var(--surface-2);
}

.picker-opt[aria-selected='true'] {
  color: var(--brand-700);
  background: var(--brand-50);
}

.picker-opt[aria-selected='true'] small {
  color: var(--brand-700);
  opacity: 0.8;
}

.picker-opt > .icon {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--brand);
}

.picker-opt[hidden],
.picker-none[hidden] {
  display: none;
}

.picker-none {
  margin: 0;
  padding: 12px;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

/* Calendar */
.picker-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 8px;
}

.picker-cal-head b {
  font-size: 0.95rem;
  text-transform: capitalize;
}

.picker-nav {
  appearance: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.picker-nav:hover {
  background: var(--surface-2);
}

.picker-nav .icon {
  width: 18px;
  height: 18px;
}

.picker-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.picker-wd {
  padding: 4px 0 6px;
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  color: var(--muted);
}

.picker-day {
  appearance: none;
  aspect-ratio: 1;
  min-height: 36px;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.picker-day.is-weekend {
  color: var(--muted);
}

.picker-day:hover:not(:disabled),
.picker-day:focus-visible {
  outline: none;
  background: var(--surface-2);
}

.picker-day.is-today {
  font-weight: 700;
  box-shadow: inset 0 0 0 1.5px var(--brand);
}

.picker-day.is-chosen,
.picker-day.is-chosen:hover {
  font-weight: 700;
  color: #fff;
  background: var(--brand);
}

.picker-day:disabled {
  color: var(--line-strong);
  cursor: not-allowed;
}

.picker-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  padding: 8px 4px 2px;
  border-top: 1px solid var(--line);
}

.picker-foot .link-btn {
  font-size: 0.88rem;
}

/* Time */
.picker-time-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.picker-time-label {
  display: block;
  padding: 2px 0 6px;
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  color: var(--muted);
}

.picker-time-col {
  display: grid;
  gap: 2px;
  max-height: 220px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.picker-time-col button {
  appearance: none;
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.picker-time-col button:hover,
.picker-time-col button:focus-visible {
  outline: none;
  background: var(--surface-2);
}

.picker-time-col button[aria-pressed='true'] {
  font-weight: 700;
  color: #fff;
  background: var(--brand);
}

.picker-foot .link-btn {
  margin-left: 0;
  font-weight: 600;
  color: var(--brand);
}

.picker-foot .link-btn:hover {
  color: var(--brand-700);
}

.picker-foot .link-btn:disabled {
  color: var(--subtle);
  cursor: not-allowed;
}

/* Agenda: "Vandaag" under the calendar, today's work in full */
.agenda-today {
  display: grid;
  gap: 10px;
}

.agenda-today[hidden] {
  display: none;
}

.agenda-today-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 8px 2px 0;
  font-size: 1.05rem;
}

.agenda-today-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.agenda-today-label .icon {
  width: 20px;
  height: 20px;
  color: var(--brand);
}

.agenda-today-date {
  font-weight: 500;
  color: var(--muted);
}

@media (min-width: 900px) {
  .agenda.wide .agenda-today-list {
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  }
}

.appt-extra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.appt-number {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.appt-number .icon,
.appt-route .icon {
  width: 14px;
  height: 14px;
}

.appt-route {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
  color: var(--brand-700);
  background: var(--brand-50);
}

.appt-route:hover {
  background: var(--brand-100, #dbeafe);
}

/* ---------- Meldingen ---------- */
/* The bell: top right on a phone, in the menu on a laptop; the red number counts unread ones. */
.appbar-bell {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-left: auto;
  border-radius: 12px;
  color: var(--ink);
}

.appbar-bell[hidden],
.side-nav a[data-bell][hidden] {
  display: none;
}

.appbar-bell:not([hidden]) + .avatar {
  margin-left: 0;
}

.appbar-bell .icon {
  width: 22px;
  height: 22px;
}

.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: var(--danger);
  box-shadow: 0 0 0 2px var(--surface);
}

.nav-badge[hidden] {
  display: none;
}

.appbar-bell .nav-badge {
  position: absolute;
  top: 3px;
  right: 1px;
}

.side-nav a .nav-badge {
  margin-left: auto;
}

@media (min-width: 1024px) {
  .appbar-bell {
    display: none;
  }
}

.notif-off {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notif-off > div {
  flex: 1;
  min-width: 0;
}

.notif-off p {
  margin: 2px 0 0;
}

.notif-filter {
  width: 100%;
  max-width: 320px;
}

.notif-filter .count {
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: var(--surface-2);
}

.notif-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.notif {
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--line);
}

.notif:first-child {
  border-top: 0;
}

.notif.is-unread {
  background: var(--brand-50);
}

.notif-main {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px 8px 12px 16px;
  color: inherit;
}

.notif-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: 12px;
  color: var(--muted);
  background: var(--surface-2);
}

.notif-icon .icon {
  width: 20px;
  height: 20px;
}

.notif-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.notif-icon.brand {
  color: var(--brand);
  background: var(--brand-50);
}

.notif.is-unread .notif-icon.brand {
  background: #fff;
}

.notif-icon.danger {
  color: var(--danger);
  background: var(--danger-50);
}

.notif-icon.success {
  color: var(--success);
  background: var(--success-50);
}

.notif-text {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
}

.notif-title {
  font-size: 0.93rem;
  line-height: 1.35;
}

.notif.is-read .notif-title {
  color: var(--ink-2, var(--ink));
}

.notif.is-read .notif-title b {
  font-weight: 600;
}

.notif-extra {
  overflow: hidden;
  font-size: 0.84rem;
  color: var(--ink-2, var(--ink));
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notif-sub {
  overflow: hidden;
  font-size: 0.8rem;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notif-when {
  flex: none;
  display: grid;
  justify-items: end;
  gap: 6px;
  align-self: flex-start;
  padding-top: 2px;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

.notif-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
}

.notif-toggle {
  appearance: none;
  flex: none;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  width: 64px;
  padding: 0 6px;
  border: 0;
  border-left: 1px solid var(--line);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.notif-toggle:hover {
  color: var(--brand-700);
  background: var(--surface-2);
}

.notif-toggle .icon {
  width: 18px;
  height: 18px;
}

.notif-time-inline {
  display: none;
}

/* Phone: the time moves into the grey line, so the text gets the whole width. */
@media (max-width: 600px) {
  .notif-main {
    gap: 10px;
    padding: 12px 6px 12px 12px;
  }

  .notif-icon {
    width: 40px;
    height: 40px;
  }

  .notif-time-inline {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
  }

  .notif-when {
    font-size: 0;
    gap: 0;
    padding-top: 6px;
  }

  .notif.is-read .notif-when {
    display: none;
  }

  .notif-toggle {
    width: 48px;
  }

  .notif-toggle span {
    display: none;
  }
}
