
:root {
  --bg: #0b1220;
  --bg-soft: #111a2e;
  --page: #f8fafc;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-solid: #ffffff;
  --text: #0f172a;
  --muted: #5b6b82;
  --muted-2: #94a3b8;
  --border: rgba(148, 163, 184, 0.2);
  --line: rgba(148, 163, 184, 0.2);
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --accent-strong: #fbbf24;
  --accent-soft: rgba(245, 158, 11, 0.16);
  --danger: #b91c1c;
  --success: #065f46;
  --success-bg: #ecfdf5;
  --success-text: #065f46;
  --danger-bg: #fef2f2;
  --danger-text: #991b1b;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.09);
  --shadow-strong: 0 30px 80px rgba(15, 23, 42, 0.18);
  --radius: 22px;
  --radius-sm: 14px;
  --container: 1220px;
  --transition: 220ms ease;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; scroll-behavior: smooth; overflow-x: hidden;}
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.08), transparent 28%),
    linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  line-height: 1.6;
}
body.menu-open { overflow: hidden; }

body.theme-regie {
  background:
    radial-gradient(circle at top left, color-mix(in srgb, #fbffc4 14%, transparent), transparent 32%),
    radial-gradient(circle at top right, color-mix(in srgb, #fbffc4 12%, transparent), transparent 26%),
    linear-gradient(180deg, #f7fbfa 0%, #edf6f4 100%);
  color: var(--brand-text);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
code { word-break: break-all; }
button, input, select, textarea { font: inherit; }

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.site-main,
.page-main { flex: 1; }

.container { width: min(100% - 2rem, var(--container)); margin: 0 auto; }
.narrow { max-width: 800px; }
.stack { display: grid; gap: 1.25rem; }
.gap-lg { gap: 1.5rem; }
.wrap { flex-wrap: wrap; }
.spaced-between { justify-content: space-between; align-items: center; }

/* Header / Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  padding: 16px 0;
  background: rgba(11, 18, 32, 0.78);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav-shell {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  min-height: 68px;
}
.logo,
.brand {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  color: #fff;
  font-weight: 800;
  letter-spacing: .01em;
}
.logo-mark,
.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #0f172a;
  box-shadow: 0 12px 30px rgba(245, 158, 11, .30);
}
.nav-menu {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
}
.nav-center-links,
.main-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
}
.nav-right-actions,
.nav-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: .8rem;
}
.nav-user { color: rgba(255,255,255,.80); }
.nav-login-btn { min-width: 132px; }

.nav-center-links a,
.nav-link,
.nav-group-toggle {
  color: rgba(255,255,255,.9);
  font-weight: 600;
  padding: .85rem 1rem;
  border-radius: 999px;
  transition: background var(--transition), color var(--transition), transform var(--transition);
  border: 0;
  background: transparent;
  cursor: pointer;
}
.nav-center-links a:hover,
.nav-center-links a:focus-visible,
.nav-link:hover,
.nav-link.is-active,
.nav-group.is-active .nav-group-toggle,
.nav-group-toggle:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
  transform: translateY(-1px);
}

.nav-group { position: relative; }
.nav-group-menu {
  position: absolute;
  top: calc(100% + .55rem);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  min-width: 240px;
  opacity: 0;
  pointer-events: none;
  background: rgba(10, 23, 40, 0.96);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  padding: .5rem;
  box-shadow: var(--shadow-strong);
  transition: .2s ease;
}
.nav-group:hover .nav-group-menu,
.nav-group:focus-within .nav-group-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-group-menu a {
  display: block;
  color: #fff;
  padding: .85rem .95rem;
  border-radius: 12px;
}
.nav-group-menu a:hover { background: rgba(255,255,255,.08); }

.nav-toggle {
  display: none;
  width: 52px;
  height: 52px;
  margin-left: auto;
  padding: 0;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  color: #fff;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
  border-radius: 999px;
  transition: transform var(--transition), opacity var(--transition);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 5.5rem 0 4rem;
}
.hero-modern {
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.2), transparent 20%),
    radial-gradient(circle at 85% 15%, rgba(59, 130, 246, 0.16), transparent 18%),
    linear-gradient(135deg, #0b1220 0%, #14213d 52%, #1e293b 100%);
  color: #fff;
}
.hero-backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 30%, rgba(255,255,255,.02) 100%);
  pointer-events: none;
}
.hero-grid,
.hero-grid-modern,
.two-cols {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr .9fr;
  gap: 2rem;
  align-items: center;
}
.hero-copy,
.hero-content { max-width: 720px; }
.hero-compact h1,
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 1.02;
  margin: 0 0 1rem;
  letter-spacing: -.03em;
}
.hero p,
.section-heading p,
.footer-text {
  color: rgba(255,255,255,.82);
}
.eyebrow,
.badge {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: #000000;
  border: 1px solid rgba(255,255,255,.08);
  font-weight: 700;
  margin-bottom: 1.2rem;
}
.lead { font-size: 1.08rem; color: var(--muted); max-width: 62ch; }
.hero-actions,
.inline-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}
.hero-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.hero-panel,
.hero-mini-grid { display: grid; gap: 1rem; }
.hero-mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.highlight-card,
.glass-card,
.service-card,
.about-card,
.card,
.auth-card,
.form-card,
.modern-table-card,
.crm-sidebar,
.crm-detail,
.hero-card,
.dashboard-card {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.highlight-card {
  padding: 1rem 1.1rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
}
.highlight-card strong,
.mini-card strong,
.service-card h3 { display: block; margin-bottom: .35rem; }
.highlight-card span,
.mini-card span,
.stat-card p { color: rgba(255,255,255,.72); font-size: .95rem; }

.glass-card,
.hero-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  color: #000000;
  padding: 1.4rem;
  box-shadow: var(--shadow-strong);
}
.stat-label {
  display: inline-block;
  margin-bottom: .8rem;
  color: #fcd34d;
  font-weight: 700;
  text-transform: uppercase;
  font-size: .8rem;
  letter-spacing: .08em;
}
.stat-value { display: block; font-size: 1.45rem; margin-bottom: .6rem; }

/* Sections */
.section,
.page-section { padding: 2.5rem 0 4rem; }
.section-soft { background: linear-gradient(180deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,.8) 100%); }
.section-heading { max-width: 760px; margin-bottom: 2rem; }
.section-kicker {
  display: inline-block;
  color: var(--accent-dark);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .8rem;
  margin-bottom: .8rem;
}
.section h2 { margin: 0 0 .8rem; font-size: clamp(1.8rem, 3vw, 3rem); letter-spacing: -.02em; }
.section p,
.page-head p,
.detail-item p,
.muted { color: var(--muted); }

.service-grid,
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
.about-grid { grid-template-columns: 1.1fr .9fr; align-items: start; }

.service-card,
.about-card,
.card,
.auth-card,
.form-card,
.modern-table-card,
.crm-detail,
.dashboard-card {
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.7);
  padding: 1.5rem;
}

.crm-sidebar {
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(12px);
  padding: 1.5rem;
}

.service-card {
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 45px rgba(15, 23, 42, 0.12);
  border-color: rgba(245, 158, 11, .24);
}
.service-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: var(--accent-soft);
  font-size: 1.4rem;
  margin-bottom: 1rem;
}
.feature-list { padding-left: 1.25rem; margin: 1rem 0 0; color: var(--muted); }
.feature-list li + li { margin-top: .55rem; }

/* Page heads */
.page-head,
.detail-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.2rem;
}
.page-head.compact { margin-bottom: 1.5rem; }
.page-head h1 {
  margin: .35rem 0 .5rem;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.form-card.wide {
  width: 100%;
  max-width: 1180px;
}

/* Forms */
.form-shell,
.auth-container { display: flex; justify-content: center; }
.form-card.wide,
.auth-card { width: 100%; }
.auth-wrap,
.auth-section { min-height: calc(100vh - 220px); display: flex; align-items: center; padding: 3rem 0; }
.auth-card { max-width: 480px; }
.modern-form,
.form-grid,
.auth-form { display: grid; gap: 1rem 1.2rem; }
.modern-form.two-column {  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.2rem; }
.modern-form .full-width { grid-column: 1 / -1; }

.modern-form label,
.auth-form label { display: block; font-weight: 700; margin-bottom: .45rem; color: black;}
.modern-form input,
.modern-form select,
.modern-form textarea,
.auth-form input,
input,
select,
textarea {
  width: 100%;
  min-height: 52px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.95);
  padding: .9rem 1rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.modern-form textarea,
textarea { min-height: 140px; resize: vertical; }
.modern-form input:focus,
.modern-form select:focus,
.modern-form textarea:focus,
.auth-form input:focus,
input:focus-visible,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(245, 158, 11, .8);
  box-shadow: 0 0 0 4px rgba(245,158,11,.12);
}
.button-row { display: flex; gap: .85rem; flex-wrap: wrap; }
.button-row.end { justify-content: flex-end; }
.checkbox-row {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: var(--muted);
}
.checkbox-row input { width: auto; min-height: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 50px;
  border-radius: 14px;
  padding: .9rem 1.25rem;
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #111827;
  box-shadow: 0 18px 35px rgba(245, 158, 11, 0.24);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-strong) 0%, var(--accent-dark) 100%);
}
.btn-secondary,
.btn-light {
  background: #fff;
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost,
.btn-ghost-light {
  border: 1px solid rgba(255,255,255,.14);
  color: #fff;
  background: rgba(255,255,255,.06);
}
.btn-danger { background: var(--danger); color: #fff; }
.btn-full { width: 100%; }
.btn-whatsapp {
  background: linear-gradient(135deg, #25d366 0%, #12b34f 100%);
  color: #fff;
  box-shadow: 0 20px 35px rgba(37, 211, 102, .25);
}

.alert {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
}
.alert.error {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid #fecaca;
}
.alert.success,
.alert-success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid #a7f3d0;
}
.callout {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #78350f;
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
}
.validation-summary {
    margin-bottom: 1rem;
}

.validation-summary-list {
    margin: 0.75rem 0 0;
    padding-left: 1.25rem;
}

.validation-summary-list li {
    margin: 0.25rem 0;
}

.error-text {
    display: block;
    margin-top: 0.35rem;
    color: #b91c1c;
    font-size: 0.875rem;
    font-weight: 600;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: 12px;
    padding: 0.9rem 1rem;
}

/* Tables */
.table-wrap { overflow-x: auto; }
.modern-table,
table { width: 100%; border-collapse: collapse; }
.modern-table th,
.modern-table td,
th,
td {
  text-align: left;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
}
.modern-table th,
th {
  color: var(--muted);
  font-size: .95rem;
}
.badge-role {
  background: rgba(245, 158, 11, .15);
  color: #9a6500;
  padding: .35rem .65rem;
  border-radius: 999px;
  font-size: .9rem;
}

/* CRM */
.crm-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1.4rem;
}
.client-list { display: grid; gap: .8rem; }
.client-list-item {
  display: grid;
  gap: .2rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.72);
  transition: .2s ease;
}
.client-list-item:hover,
.client-list-item.is-active {
  transform: translateY(-1px);
  border-color: rgba(245, 158, 11, .45);
  box-shadow: 0 10px 30px rgba(16,32,51,.08);
}
.client-list-item span,
.client-list-item small { color: var(--muted); }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 1rem;
}
.detail-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
}
.detail-item.full { grid-column: 1 / -1; }
.detail-item label {
  display: block;
  font-size: .9rem;
  color: var(--muted);
  margin-bottom: .4rem;
}
.detail-item p { margin: 0; white-space: normal; }
.documents-block { margin-top: 1.4rem; }
.document-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.document-sections-stack {
    display: grid;
    gap: 1.25rem;
}

.form-card .page-head{
  display: grid;
}

.form-card .page-head .button-row .btn{
  width: 29rem;
}

.doc-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  display: grid;
  gap: .45rem;
}

/* 2FA / Security */
.security-hero-card { padding: 2rem; }
.setup-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 1.25rem; }
.wizard-card { padding: 1.6rem; }
.wizard-steps { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.wizard-step {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem .8rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #334155;
  font-weight: 700;
}
.wizard-step span {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.7);
}
.wizard-step.is-active { background: #fff7ed; color: #9a3412; }
.wizard-step.is-complete { background: #ecfdf5; color: #166534; }

.qr-card {
  display: grid;
  place-items: center;
  padding: 1rem;
  border-radius: 20px;
  background: linear-gradient(180deg, #fff, #f8fafc);
  border: 1px solid var(--border);
  margin: 1rem 0;
}
.qr-image {
  width: 220px;
  height: 220px;
  border-radius: 16px;
  background: #fff;
  padding: .5rem;
}
.secret-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px dashed var(--border);
  border-radius: 16px;
  background: #f8fafc;
}
.details-card {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(248,250,252,.8);
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: .45rem .8rem;
  border-radius: 999px;
  font-weight: 700;
}
.pill-success { background: #dcfce7; color: #166534; }
.pill-muted { background: #e2e8f0; color: #334155; }
.pill-warning { background: #fef3c7; color: #92400e; }

.backup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .75rem;
}
.backup-code {
  padding: .8rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f8fafc;
  font-weight: 700;
  letter-spacing: .05em;
  text-align: center;
}

/* Footer */
.site-footer {
  background: linear-gradient(180deg, #101827 0%, #0b1220 100%);
  color: #fff;
  padding: 3rem 0 1.2rem;
  margin-top: auto;
}
.footer-grid,
.footer-row {
  display: grid;
  grid-template-columns: 1.1fr .7fr .8fr;
  gap: 1.5rem;
  align-items: start;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: .8rem 0 0;
}
.footer-links li + li { margin-top: .55rem; }
.footer-links a,
.footer-contact li { color: rgba(255,255,255,.76); }
.footer-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.62);
  text-align: center;
}

/* WhatsApp */
.whatsapp-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1100;
  display: grid;
  justify-items: end;
  gap: .9rem;
}
.whatsapp-fab {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  padding: .9rem 1rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #25d366 0%, #12b34f 100%);
  color: #fff;
  box-shadow: 0 24px 40px rgba(37, 211, 102, .28);
}
.whatsapp-fab-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
}
.whatsapp-popup {
  width: min(92vw, 360px);
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 30px 60px rgba(2, 6, 23, .22);
  transform: translateY(18px) scale(.96);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--transition), opacity var(--transition);
}
.whatsapp-popup.is-visible {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}
.whatsapp-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.15rem 1.15rem 1rem;
  color: #fff;
  background: linear-gradient(135deg, #25d366 0%, #12b34f 100%);
}
.whatsapp-popup-header p {
  margin: .35rem 0 0;
  color: rgba(255,255,255,.86);
  font-size: .95rem;
}
.whatsapp-popup-body { padding: 1.15rem; }
.whatsapp-close {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,.16);
  color: #fff;
  font-size: 1.35rem;
}

/* Reveal */
.reveal-up {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.delay-1 { transition-delay: .08s; }
.delay-2 { transition-delay: .16s; }

.break-all { word-break: break-all; }


.sidebar-title {margin-bottom: 1rem;}
/* ===== CRM responsive verbeteringen ===== */

.crm-layout {
  align-items: start;
}

.crm-sidebar,
.crm-detail,
.form-card,
.modern-table-card {
  min-width: 0;
}

.client-list-item {
  overflow: hidden;
}

.client-list-item strong,
.client-list-item span,
.client-list-item small {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.detail-grid {
  align-items: start;
}

.detail-item,
.doc-card {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.modern-table {
  min-width: 720px;
}

.button-row {
  align-items: stretch;
}

.button-row .btn {
  flex: 0 0 auto;
}

.modern-table .button-row .btn{
  width: 10rem;
}

.page-head .button-row,
.detail-head .button-row {
  justify-content: flex-start;
}

@media (max-width: 1200px) {
  .crm-layout {
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 980px) {
  .crm-layout {
    grid-template-columns: 1fr;
  }

  .crm-sidebar {
    order: 1;
  }

  .crm-detail {
    order: 2;
  }

  .modern-table {
    min-width: 640px;
  }

  .page-head,
  .detail-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-head .button-row,
  .detail-head .button-row {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .crm-sidebar,
  .crm-detail,
  .form-card,
  .modern-table-card {
    padding: 1rem;
    border-radius: 18px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-item.full {
    grid-column: auto;
  }

  .button-row {
    width: 100%;
    flex-direction: column;
  }

  .button-row .btn {
    width: 100%;
  }

  .modern-table {
    min-width: 560px;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 1rem, var(--container));
  }

  .page-section {
    padding: 1.5rem 0 2.5rem;
  }
}

  .crm-sidebar,
  .crm-detail,
  .form-card,
  .modern-table-card {
    padding: 0.9rem;
    border-radius: 16px;
  }

  .client-list-item,
  .detail-item,
  .doc-card {
    padding: 0.9rem;
    border-radius: 14px;
  }

  .page-head h1 {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }

  .modern-table {
    min-width: 520px;
  }

@media (max-width: 1024px) {
  .hero-grid,
  .hero-grid-modern,
  .about-grid,
  .footer-grid,
  .footer-row {
    grid-template-columns: 1fr;
  }
  .hero-highlights,
  .service-grid {
    grid-template-columns: 1fr 1fr;
  }
  .form-card .page-head .button-row .btn{
  width: 100%;
}
}

@media (max-width: 980px) {
  .two-cols,
  .crm-layout,
  .detail-grid,
  .modern-form.two-column,
  .setup-grid {
    grid-template-columns: 1fr;
  }
  .page-head,
  .detail-head {
    flex-direction: column;
    align-items: flex-start;
  }
    .modern-form.two-column {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .nav-shell {
    grid-template-columns: auto auto;
  }
  .nav-toggle { display: inline-block; }
  .nav-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 1rem;
    right: 1rem;
    display: none;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
    border-radius: 22px;
    background: rgba(11,18,32,.95);
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: var(--shadow-strong);
  }
  .nav-menu.is-open { display: grid; }
  .nav-center-links,
  .main-nav {
    flex-direction: column;
    align-items: stretch;
  }
  .nav-right-actions,
  .nav-actions { justify-content: stretch; }
  .nav-login-btn { width: 100%; }
  .secret-panel { flex-direction: column; align-items: stretch; }
}

@media (max-width: 720px) {
  .hero { padding: 5rem 0 4rem; }
  .hero-highlights,
  .hero-mini-grid,
  .service-grid {
    grid-template-columns: 1fr;
  }
  .whatsapp-fab-text { display: none; }
  .whatsapp-fab { padding: .9rem; }
}

.attachment-group {
  display: grid;
  gap: 0.6rem;
}

.attachment-list {
  display: grid;
  gap: 0.6rem;
}

.attachment-input-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,0.7);
}

.attachment-input-row input {
  flex: 1;
}

@media (max-width: 600px) {
  .attachment-input-row {
    flex-direction: column;
    align-items: stretch;
  }
}

.add-attachment-btn{
  width: 18rem;
}

.attachment-existing-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,0.7);
}

.attachment-existing-item a:first-child {
  flex: 1;
  text-decoration: none;
  color: var(--text);
}

input[readonly] {
    background: #f8fafc;
    color: #475569;
}

.btn-danger {
  background: #e5484d;
  color: #fff;
  border: none;
}

.btn-danger:hover {
  background: #c7383c;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.875rem 1rem;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: #fff;
    min-height: 58px;
}

.checkbox-row input[type="checkbox"] {
    margin-top: 0.2rem;
    flex: 0 0 auto;
}

.checklist-block {
    display: grid;
    gap: 0.75rem;
}

.attachment-existing-list {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.attachment-existing-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.875rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: #f8fafc;
}

.attachment-existing-item a:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 768px) {
    .checkbox-grid {
        grid-template-columns: 1fr;
    }

    .attachment-existing-item {
        flex-direction: column;
        align-items: flex-start;
    }
}

.print-page {
    padding: 2rem 0 3rem;
    background: #eef2f7;
}

.print-toolbar {
    width: min(1100px, calc(100% - 2rem));
    margin: 0 auto 1rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.print-document {
    width: min(1100px, calc(100% - 2rem));
    margin: 0 auto;
    background: #fff;
    color: #0f172a;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
    padding: 3rem 3rem 2rem;
}

.doc-header {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    align-items: flex-start;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.logo-wrap {
    max-width: 240px;
}

.logo-wrap img {
    display: block;
    max-width: 100%;
    max-height: 90px;
    object-fit: contain;
}

.company-card {
    text-align: right;
}

.company-card h2 {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
}

.company-card p {
    margin: 0.15rem 0;
    color: #334155;
    font-size: 0.95rem;
}

.doc-title-block {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    padding: 2rem 0 1.5rem;
    align-items: flex-start;
}

.doc-kicker {
    display: inline-block;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: #475569;
    margin-bottom: 0.5rem;
}

.doc-title-block h1 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.15;
}

.doc-subtitle {
    margin-top: 0.5rem;
    color: #475569;
}

.doc-meta-box {
    min-width: 290px;
    border: 1px solid #dbe2ea;
    border-radius: 14px;
    padding: 1rem 1.1rem;
    background: #f8fafc;
    display: grid;
    gap: 0.45rem;
    font-size: 0.95rem;
}

.doc-intro {
    padding: 0 0 1.5rem;
    color: #334155;
    line-height: 1.7;
}

.doc-section {
    margin-top: 1.5rem;
    page-break-inside: avoid;
}

.doc-section h2 {
    margin: 0 0 0.9rem;
    font-size: 1.2rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.55rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 1rem;
}

.info-row {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    background: #fcfdff;
}

.info-row.full {
    grid-column: 1 / -1;
}

.info-row span {
    display: block;
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.info-row strong {
    display: block;
    font-size: 0.98rem;
    color: #0f172a;
}

.official-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.official-table th,
.official-table td {
    border: 1px solid #dbe2ea;
    padding: 0.8rem 0.9rem;
    vertical-align: top;
    text-align: left;
}

.official-table thead th {
    background: #f1f5f9;
    font-weight: 700;
}

.notes-box {
    border: 1px solid #dbe2ea;
    border-radius: 12px;
    padding: 1rem;
    min-height: 90px;
    background: #fcfdff;
    line-height: 1.7;
}

.attachment-print-list {
    margin: 0;
    padding-left: 1.15rem;
}

.attachment-print-list li {
    margin: 0.2rem 0;
}

.signature-section {
    margin-top: 2rem;
}

.signature-intro {
    color: #334155;
    line-height: 1.7;
}

.signature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 1.25rem;
}

.signature-box {
    border: 1px solid #dbe2ea;
    border-radius: 14px;
    padding: 1rem;
    min-height: 170px;
    background: #fff;
}

.signature-label {
    display: block;
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.top-gap {
    margin-top: 1.5rem;
}

.signature-line {
    border-bottom: 1px solid #94a3b8;
    min-height: 2rem;
    padding-top: 0.35rem;
}

.signature-date {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.signature-block {
    display: grid;
    gap: 0.75rem;
}

.signature-pad-wrap {
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 14px;
    background: #fff;
    padding: 0.5rem;
}

.signature-pad {
    display: block;
    width: 100%;
    height: 220px;
    background: #fff;
    border-radius: 10px;
    touch-action: none;
    cursor: crosshair;
}

.signature-preview-card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: #fff;
    padding: 0.75rem;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.signature-preview-image {
    display: block;
    max-width: 100%;
    max-height: 110px;
    object-fit: contain;
}

.detail-grid.signature {

  display: contents;
}

.doc-footer {
    margin-top: 2.5rem;
    padding-top: 1rem;
    border-top: 2px solid #e2e8f0;
}

.doc-footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    font-size: 0.82rem;
    color: #475569;
}

@media (max-width: 900px) {
    .print-document {
        padding: 1.5rem;
    }

    .doc-header,
    .doc-title-block,
    .signature-grid,
    .info-grid {
        grid-template-columns: 1fr;
        display: grid;
    }

    .company-card {
        text-align: left;
    }

    .doc-meta-box {
        min-width: 0;
    }
}

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

    body {
        background: #fff !important;
    }

    .no-print,
    header,
    footer,
    .site-header,
    .site-footer {
        display: none !important;
    }

    .print-page {
        padding: 0;
        background: #fff;
    }

    .print-document {
        width: 100%;
        margin: 0;
        padding: 0;
        box-shadow: none;
        border-radius: 0;
    }

    .doc-section,
    .info-row,
    .signature-box {
        page-break-inside: avoid;
    }
}

.inline-delete-form {
    display: inline-flex;
    margin: 0;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.btn-danger {
    background: #b91c1c;
    color: #fff;
    border: 1px solid #b91c1c;
}

.btn-danger:hover {
    background: #991b1b;
    border-color: #991b1b;
    color: #fff;
}

.attachment-existing-list {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.attachment-existing-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.875rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: #f8fafc;
}

input[readonly] {
    background: #f8fafc;
    color: #475569;
}

@media (max-width: 768px) {


    .attachment-existing-item {
        flex-direction: column;
        align-items: flex-start;
    }
}

.survey-section-card {
    grid-column: 1 / -1;
    padding: 1.25rem 1.25rem 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.survey-section-card h2 {
    margin: 0 0 0.35rem;
    font-size: 1.2rem;
    color: #111827;
}

.survey-section-card p {
    margin: 0;
    color: #6b7280;
    line-height: 1.55;
}

.survey-question-card {
    grid-column: 1 / -1;
    padding: 1.1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    background: #fff;
    display: grid;
    gap: 0.95rem;
}

.survey-question-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.survey-question-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
}

.survey-question-subtitle {
    margin: 0.2rem 0 0;
    font-size: 0.92rem;
    color: #6b7280;
    line-height: 1.45;
}

.survey-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 1rem;
}

.survey-choice-card {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: #fff;
    min-height: 58px;
}

.survey-choice-card input[type="radio"],
.survey-choice-card input[type="checkbox"] {
    margin-top: 0.18rem;
    flex: 0 0 auto;
}

.survey-choice-card span {
    display: block;
    color: #111827;
    line-height: 1.4;
}

.survey-inline-other {
    display: grid;
    gap: 0.65rem;
}

.survey-inline-other input,
.survey-inline-other textarea {
    width: 100%;
}

.survey-readonly-box {
    background: #f8fafc;
    color: #475569;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.survey-photo-block {
    display: grid;
    gap: 0.75rem;
    padding-top: 0.25rem;
    border-top: 1px dashed rgba(15, 23, 42, 0.12);
}

.survey-photo-label {
    font-size: 0.92rem;
    font-weight: 600;
    color: #374151;
}

.attachment-group {
    display: grid;
    gap: 0.75rem;
}

.attachment-list {
    display: grid;
    gap: 0.75rem;
}

.attachment-input-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.attachment-input-row input[type="file"] {
    width: 100%;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: #fff;
}

.attachment-help {
    margin: 0;
    font-size: 0.88rem;
    color: #6b7280;
}

.survey-text-block textarea {
    min-height: 140px;
}

.survey-text-block textarea.small-textarea {
    min-height: 100px;
}

.survey-note-box {
    padding: 0.95rem 1rem;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 14px;
    background: #fffbea;
    color: #92400e;
    line-height: 1.55;
}

.survey-divider {
    grid-column: 1 / -1;
    height: 1px;
    background: rgba(15, 23, 42, 0.08);
    margin: 0.25rem 0;
}

.survey-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

input[readonly],
textarea[readonly] {
    background: #f8fafc;
    color: #475569;
}

@media (max-width: 768px) {
    .survey-choice-grid {
        grid-template-columns: 1fr;
    }

    .survey-question-head {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .survey-actions .btn {
        width: 100%;
    }
}

.attachment-existing-list {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.attachment-existing-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.875rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: #f8fafc;
}

.checkbox-row input[type="radio"],
.checkbox-row input[type="checkbox"] {
    margin-top: 0.2rem;
    flex: 0 0 auto;
}

@media (max-width: 768px) {
    .attachment-existing-item {
        flex-direction: column;
        align-items: flex-start;
    }
}

.survey-view-photos {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.survey-view-photos h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    color: #111827;
}


.attachment-print-list {
    margin: 0;
    padding-left: 1.15rem;
}

.attachment-print-list li {
    margin: 0.2rem 0;
}

.photo-dossier-section {
    page-break-inside: avoid;
}

.attachment-print-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.attachment-print-card {
    border: 1px solid #dbe2ea;
    border-radius: 12px;
    padding: 1rem;
    background: #fcfdff;
    min-height: 120px;
}

.attachment-print-card strong {
    display: block;
    margin-bottom: 0.5rem;
}

.attachment-print-card p {
    margin: 0 0 0.75rem;
    color: #475569;
    line-height: 1.5;
}

@media (max-width: 900px) {
    .attachment-print-cards {
      grid-template-columns: 1fr;
    }
  }

  .client-filter-form {
    display: grid;
    gap: 0.85rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.client-filter-form .filter-group {
    display: grid;
    gap: 0.35rem;
}

.client-filter-form label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}

.client-filter-form input,
.client-filter-form select {
    width: 100%;
}
.client-page-section .crm-page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
}

.client-view-switcher-wrap { margin-bottom: 1rem; }
.client-view-switcher { display:inline-flex; gap:0.4rem; padding:0.35rem; border-radius:999px; }
.client-view-pill { display:inline-flex; align-items:center; justify-content:center; min-width:8rem; padding:0.7rem 1rem; border-radius:999px; text-decoration:none; color:#475569; font-weight:600; }
.client-view-pill.is-active { background:#fff; box-shadow:0 8px 24px rgba(15,23,42,0.08); color:#0f172a; }

.crm-cards-layout { display:grid; grid-template-columns: 360px minmax(0,1fr); gap:1.25rem; align-items:start; }
.crm-cards-sidebar { padding:1rem; }
.sticky-detail-pane { position: sticky; top: 1rem; align-self:start; }
.client-toolbar { display:grid; gap:0.8rem; margin-bottom:1rem; }
.client-toolbar-cards { padding-bottom:1rem; border-bottom:1px solid rgba(15,23,42,0.08); }
.client-toolbar-table { align-items:center; padding:1rem; margin-bottom:1rem; }
.toolbar-search { width:100%; padding:0.85rem 1rem; border-radius:14px; border:1px solid rgba(15,23,42,0.12); background:#fff; }
.toolbar-selects { display:flex; gap:0.7rem; }
.toolbar-selects select { min-width: 12rem; }
.toolbar-actions { justify-content:flex-end; }
.client-card-list { display:grid; gap:0.85rem; max-height:calc(100vh - 18rem); overflow:auto; padding-right:0.15rem; }
.client-summary-card { display:grid; gap:0.35rem; padding:1rem; border-radius:18px; text-decoration:none; box-shadow:0 1px 0 rgba(255,255,255,0.35) inset; }
.client-summary-card.is-active { outline:2px solid rgba(15,23,42,0.12); }
.client-summary-top { display:flex; justify-content:space-between; gap:0.75rem; align-items:flex-start; }
.client-summary-card p, .client-summary-card small { margin:0; color:inherit; opacity:0.85; }

.crm-table-layout { display:grid; gap:1rem; }
.modern-table-clickable tbody tr { cursor:pointer; }
.modern-table-clickable tbody tr.is-active { background:rgba(15,23,42,0.04); }
.modern-table thead th a { color:inherit; text-decoration:none; }
.modern-table thead th a:hover { text-decoration:underline; }

.detail-head-modern { border-radius:20px; padding:1rem 1.1rem; margin-bottom:1rem; display:flex; justify-content:space-between; gap:1rem; align-items:flex-start; }
.detail-grid-modern { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:0.85rem; }
.detail-grid-modern .detail-item { padding:0.9rem 1rem; border-radius:16px; background:#fff; border:1px solid rgba(15,23,42,0.08); }
.detail-grid-modern .detail-item.full { grid-column:1 / -1; }
.detail-grid-modern .detail-item label { display:block; font-size:0.78rem; text-transform:uppercase; letter-spacing:0.04em; color:#64748b; margin-bottom:0.35rem; }
.detail-grid-modern .detail-item p { margin:0; line-height:1.55; }
.empty-detail-state { padding:2rem; text-align:center; }

.client-image-upload-form { margin-top:0.5rem; }
.inline-upload-row { display:flex; gap:0.75rem; align-items:center; }
.client-image-grid { display:grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap:1rem; margin-top:1rem; }
.client-image-card { border:1px solid rgba(15,23,42,0.08); background:#fff; border-radius:18px; overflow:hidden; display:grid; }
.client-image-card img { display:block; width:100%; height:180px; object-fit:cover; background:#f8fafc; }
.client-image-meta { padding:0.9rem 1rem 0.4rem; }
.client-image-meta strong { display:block; margin-bottom:0.3rem; }
.client-image-meta p { margin:0; color:#64748b; font-size:0.9rem; }
.client-image-card form { padding:0 1rem 1rem; }

.intake-card, .intake-review-card { max-width: 1100px; margin:0 auto; }
.intake-tip-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.intake-tip-card { border:1px solid rgba(15,23,42,0.08); border-radius:16px; padding:1rem; background:#fff; }
.intake-tip-card p { margin:0.4rem 0 0; color:#64748b; }
.intake-review-form .status-pill { align-self:center; }
.intake-photo-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:1rem; }
.intake-photo-card { border:1px solid rgba(15,23,42,0.08); border-radius:16px; overflow:hidden; background:#fff; }
.intake-photo-card img { width:100%; height:180px; object-fit:cover; display:block; background:#f8fafc; }
.intake-photo-card > div { padding:0.85rem 1rem; }
.intake-photo-card p { margin:0.35rem 0 0; color:#64748b; }
.empty-state-panel { border:1px dashed rgba(15,23,42,0.16); border-radius:16px; padding:1rem; background:#fff; }

@media (max-width: 1100px) {
    .crm-cards-layout { grid-template-columns: 1fr; }
    .sticky-detail-pane { position: static; }
    .client-card-list { max-height:none; overflow:visible; }
    .client-toolbar-table { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .client-page-section .crm-page-head { flex-direction:column; align-items:flex-start; }
    .toolbar-selects, .inline-upload-row, .detail-head-modern { flex-direction:column; align-items:stretch; }
    .detail-grid-modern, .intake-tip-grid { grid-template-columns:1fr; }
}

/* === clients page 1:1 mk-installatie transfer refinement === */
.crm-page-head-match {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}
.crm-page-head-copy p {
  max-width: 58rem;
}
.crm-page-head-actions {
  display: grid;
  gap: .9rem;
  justify-items: stretch;
}
.btn-head-action {
  width: 100%;
  min-height: 60px;
  border-radius: 999px;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 18px 35px rgba(15, 23, 42, .10);
}
.client-view-switcher-wrap {
  margin-top: .25rem;
  margin-bottom: 1rem;
}
.client-view-switcher {
  padding: .42rem;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  border: 1px solid var(--brand-border);
  box-shadow: 0 18px 40px rgba(15,23,42,.05);
}
.client-view-pill {
  min-width: 92px;
  padding: .82rem 1.15rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-text);
}
.client-view-pill.is-active {
  background: var(--brand-primary);
  color: #fff;
  box-shadow: 0 12px 28px rgba(15,118,110,.18);
}
.crm-cards-layout-match {
  grid-template-columns: minmax(320px, 500px) minmax(0, 1fr);
  gap: 1.35rem;
}
.crm-cards-sidebar {
  padding: 1.1rem;
  border-radius: 28px;
  box-shadow: 0 22px 50px rgba(15,23,42,.07);
}
.client-toolbar-cards-match {
  display: grid;
  gap: .95rem;
  margin-bottom: 1rem;
}
.search-shell {
  min-height: 64px;
  padding: .2rem 1rem;
  border-radius: 20px;
  background: rgba(255,255,255,.92);
  border: 1px solid color-mix(in srgb, var(--brand-primary) 16%, #d7e4e7);
}
.search-shell input {
  font-size: 1rem;
}
.toolbar-chip-field {
  gap: .4rem;
}
.toolbar-chip-field label {
  font-size: .82rem;
  font-weight: 700;
  color: var(--brand-muted);
}
.toolbar-chip-field select {
  min-height: 56px;
  border-radius: 16px;
  padding-inline: 1rem;
  background: rgba(255,255,255,.94);
}
.toolbar-compact-actions {
  margin-top: .1rem;
}
.toolbar-compact-actions .btn {
  min-height: 58px;
  min-width: 112px;
  border-radius: 999px;
}
.client-card-list-match {
  gap: .95rem;
}
.client-overview-card {
  padding: 1rem 1rem 1rem 1.05rem;
  border-radius: 22px;
  border: 1px solid var(--client-status-border, rgba(15,23,42,.08));
  background: var(--client-status-bg, rgba(255,255,255,.88));
  color: var(--client-status-text, var(--brand-text));
  box-shadow: 0 14px 30px rgba(15,23,42,.05);
}
.client-overview-card strong,
.client-overview-card p,
.client-overview-card small,
.client-overview-card span {
  color: inherit;
}
.client-overview-card p,
.client-overview-card small {
  margin: 0;
}
.client-overview-card .status-pill {
  box-shadow: none;
}
.client-card-meta {
  color: color-mix(in srgb, currentColor 84%, #6b7280);
}
.crm-detail-modern {
  padding: 1rem;
  border-radius: 28px;
  box-shadow: 0 22px 50px rgba(15,23,42,.07);
}
.sticky-detail-pane {
  position: sticky;
  top: 98px;
}
.detail-head-modern {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.15rem;
  border-radius: 24px;
  margin-bottom: 1rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
}
.detail-head-modern .button-row .btn {
  min-height: 58px;
  min-width: 168px;
  border-radius: 999px;
}
.detail-head-modern h2 {
  font-size: clamp(2rem, 2.8vw, 1.7rem);
  line-height: 1.06;
  margin-top: .15rem;
}
.detail-head-modern p {
  font-size: 1.02rem;
}
.detail-grid-modern {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .95rem;
}
.detail-grid-modern .detail-item {
  padding: 1.05rem 1rem;
  border-radius: 20px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(15,23,42,.08);
}
.detail-grid-modern .detail-item label {
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: none;
  color: #64748b;
  margin-bottom: .45rem;
}
.detail-grid-modern .detail-item p {
  font-size: 1rem;
}
.detail-grid-modern .status-pill {
  display: inline-flex;
}
.client-table-wrap,
.crm-table-layout .crm-detail-modern,
.crm-table-layout .client-toolbar-table {
  border-radius: 28px;
  box-shadow: 0 22px 50px rgba(15,23,42,.06);
}
.client-toolbar-table {
  gap: .9rem;
  padding: 1rem;
  align-items: end;
}
.search-shell-table {
  min-height: 60px;
}
.client-table-modern {
  border-collapse: separate;
  border-spacing: 0;
}
.client-table-modern th,
.client-table-modern td {
  vertical-align: middle;
}
.client-table-modern tbody tr.is-active {
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.06);
}
.client-table-modern tbody tr td:first-child,
.client-table-modern thead tr th:first-child {
  border-left: 0;
}
.client-table-modern tbody tr td:last-child,
.client-table-modern thead tr th:last-child {
  border-right: 0;
}

@media (max-width: 1100px) {
  .crm-page-head-match {
    grid-template-columns: 1fr;
  }
  .crm-page-head-actions {
    width: 100%;
    max-width: 420px;
  }
  .crm-cards-layout-match {
    grid-template-columns: 1fr;
  }
  .sticky-detail-pane {
    position: static;
  }
}

@media (max-width: 720px) {
  .btn-head-action {
    min-height: 54px;
  }
  .detail-head-modern,
  .detail-grid-modern {
    grid-template-columns: 1fr;
  }
  .detail-head-modern {
    flex-direction: column;
  }
}


/* === Strict 1-op-1 mk clients transfer for Elektricien (scoped) === */
.client-page-section { padding-top: 2rem; }
.client-page-section .crm-page-head { align-items: end; margin-bottom: 1rem; }
.client-page-section .client-view-switcher-wrap { margin-bottom: 1rem; }
.client-page-section .client-view-switcher {
  display: inline-flex;
  gap: .45rem;
  padding: .4rem;
  border-radius: 999px;
  background: rgba(255,255,255,.76);
  border: 1px solid var(--brand-border);
}
.client-page-section .client-view-pill {
  padding: .72rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  color: var(--brand-muted);
  transition: .2s ease;
}
.client-page-section .client-view-pill.is-active {
  background: var(--brand-primary);
  color: #fff;
  box-shadow: 0 10px 25px rgba(15,118,110,.18);
}
.client-page-section .client-toolbar {
  display: grid;
  gap: .9rem;
  margin-bottom: 1rem;
}
.search-shell {
  display: flex;
  align-items: center;
  gap: .65rem;
  background: rgba(255,255,255,.82);
  border: 1px solid var(--brand-border);
  border-radius: 18px;
  padding: .15rem .85rem;
  min-height: 56px;
}
.search-shell input {
  border: 0;
  outline: none;
  background: transparent;
  width: 100%;
  color: var(--brand-text);
}
.search-shell input::placeholder { color: #7b8a9f; }
.client-page-section .search-icon { color: var(--brand-muted); font-size: 1.05rem; }
.client-page-section .toolbar-inline-fields {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  align-items: end;
}
.client-page-section .toolbar-chip-field {
  display: grid;
  gap: .35rem;
  width: 100%;
  min-width: 190px;
}
.client-page-section .toolbar-chip-field label {
  font-size: .8rem;
  font-weight: 700;
  color: var(--brand-muted);
}
.client-page-section .toolbar-chip-field select {
  border-radius: 14px;
  border: 1px solid var(--brand-border);
  background: rgba(255,255,255,.9);
  color: var(--brand-text);
  min-height: 48px;
}
.client-page-section .toolbar-compact-actions {
  display: flex;
  gap: .65rem;
  align-items: center;
}
.client-page-section .crm-cards-layout {
  display: grid;
  grid-template-columns: minmax(320px, 470px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}
.client-page-section .crm-cards-sidebar,
.client-page-section .crm-table-shell,
.client-page-section .crm-detail-modern {
  background: rgba(255,255,255,.78);
  border: 1px solid var(--brand-border);
  backdrop-filter: blur(14px);
}
.client-page-section .crm-cards-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
    max-height: calc(100vh - 120px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.client-page-section .client-card-grid-compact {
  grid-template-columns: 1fr;
  gap: .85rem;
  margin-top: 0;
}
.client-page-section .client-overview-card {
  padding: 1rem 1rem 1rem 1.05rem;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  border-radius: 20px;
}
.client-page-section .client-overview-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(15,23,42,.09);
}
.client-page-section .client-overview-card.is-active {
  outline: 0;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-primary) 24%, white), 0 18px 34px rgba(15,23,42,.10);
}
.client-page-section .client-card-meta { color: color-mix(in srgb, var(--client-status-text) 76%, #64748b); }
.client-page-section .crm-detail-modern { padding: 1rem; }
.client-page-section .detail-head-modern {
  border: 1px solid var(--client-status-border, var(--brand-border));
  background: var(--client-status-bg, #fff);
  color: var(--client-status-text, var(--brand-text));
  border-radius: 20px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.client-page-section .detail-head-modern h2,
.client-page-section .detail-head-modern p,
.client-page-section .detail-head-modern .eyebrow { color: inherit; }
.client-page-section .detail-grid-modern .detail-item {
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.7);
}
.client-page-section .empty-state-panel,
.client-page-section .empty-detail-state {
  border: 1px dashed var(--brand-border);
  border-radius: 18px;
  padding: 1.1rem;
  background: rgba(255,255,255,.65);
}
.client-page-section .client-table-wrap { margin-top: .35rem; }
.client-page-section .client-table-modern th {
  white-space: nowrap;
  background: #f8fbfb;
}
.client-page-section .sort-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--brand-text);
  font-weight: 700;
}
.client-page-section .sort-link span {
  display: inline-flex;
  min-width: .75rem;
  color: var(--brand-primary);
}
.client-page-section .btn-small {
  min-height: 38px;
  padding: .5rem .8rem;
  font-size: .92rem;
}
.client-page-section .crm-detail-stack { margin-top: 1.25rem; }
.client-page-section .client-status-table tbody tr {
  transition: background-color .2s ease, transform .2s ease;
}
.client-page-section .client-status-table tbody tr:hover {
  filter: saturate(1.02);
}
@media (max-width: 1100px) {
  .client-page-section .crm-cards-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .client-page-section .client-view-switcher { width: 100%; justify-content: stretch; }
  .client-page-section .client-view-pill { flex: 1; text-align: center; }
  .client-page-section .toolbar-inline-fields,
  .client-page-section .toolbar-compact-actions { flex-direction: column; align-items: stretch; }
  .client-page-section .toolbar-chip-field { min-width: 100%; }
}


/* === FINAL clients page override for Elektricien (match mk-installatie layout, scoped only) === */
.client-page-section {
  padding-top: 2rem;
}

.client-page-section .crm-page-head {
  align-items: end;
  margin-bottom: 1rem;
}

.client-page-section .crm-page-head .button-row {
  align-items: stretch;
}

.client-page-section .crm-page-head .button-row .btn {
  min-width: 360px;
  justify-content: center;
  border-radius: 999px;
  min-height: 58px;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.10);
}

.client-page-section .client-view-switcher-wrap {
  margin-top: 0.15rem;
  margin-bottom: 1rem;
}

.client-page-section .client-view-switcher {
  display: inline-flex;
  gap: 0.45rem;
  padding: 0.42rem;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  border: 1px solid var(--brand-border, var(--line));
  box-shadow: 0 18px 40px rgba(15,23,42,.05);
}

.client-page-section .client-view-pill {
  min-width: 92px;
  padding: 0.82rem 1.15rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-text, var(--text));
  transition: .2s ease;
}

.client-page-section .client-view-pill.is-active {
  background: var(--brand-primary, var(--accent));
  color: #fff;
  box-shadow: 0 12px 28px rgba(15,118,110,.18);
}

.client-page-section .crm-cards-layout {
  display: grid;
  grid-template-columns: minmax(320px, 470px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.client-page-section .crm-cards-sidebar,
.client-page-section .crm-table-shell,
.client-page-section .crm-detail {
  padding: 1.15rem;
  border-radius: 28px;
  box-shadow: 0 22px 50px rgba(15,23,42,.06);
}

.client-page-section .crm-detail.sticky-detail-pane,
.client-page-section .sticky-detail-pane {
  position: sticky;
  top: 1rem;
  align-self: start;
}

.client-page-section .client-toolbar {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.client-page-section .search-shell {
  display: flex;
  align-items: center;
  gap: .65rem;
  background: rgba(255,255,255,.82);
  border: 1px solid var(--brand-border, var(--line));
  border-radius: 18px;
  padding: .15rem .85rem;
  min-height: 56px;
}

.client-page-section .search-shell input {
  border: 0 !important;
  outline: none;
  background: transparent !important;
  width: 100%;
  color: var(--brand-text, var(--text));
  box-shadow: none !important;
  min-height: auto;
  padding: 0;
}

.client-page-section .search-shell input::placeholder {
  color: #7b8a9f;
}

.client-page-section .search-icon {
  color: var(--brand-muted, var(--muted));
  font-size: 1.05rem;
}

.client-page-section .toolbar-inline-fields {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  align-items: end;
}

.client-page-section .toolbar-inline-fields-table {
  justify-content: flex-start;
}

.client-page-section .toolbar-chip-field {
  display: grid;
  gap: .35rem;
  width: 100%;
  min-width: 190px;
  flex: 1 1 220px;
}

.client-page-section .toolbar-chip-field label {
  font-size: .8rem;
  font-weight: 700;
  color: var(--brand-muted, var(--muted));
  margin-bottom: 0;
}

.client-page-section .toolbar-chip-field select {
  border-radius: 14px;
  border: 1px solid var(--brand-border, var(--line));
  background: rgba(255,255,255,.9);
  color: var(--brand-text, var(--text));
  min-height: 48px;
}

.client-page-section .toolbar-compact-actions {
  display: flex;
  gap: .65rem;
  align-items: center;
}

.client-page-section .toolbar-compact-actions .btn {
  min-height: 56px;
  border-radius: 999px;
  padding-left: 1.35rem;
  padding-right: 1.35rem;
}

.client-page-section .client-card-grid {
  display: grid;
  gap: .85rem;
}

.client-page-section .client-card-grid-compact {
  max-height: calc(100vh - 19rem);
  overflow: auto;
  padding-right: .2rem;
}

.client-page-section .client-overview-card {
  display: grid;
  gap: .3rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,.06);
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(255,255,255,.35) inset;
}

.client-page-section .client-overview-card.is-active {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-primary, var(--accent)) 24%, white), 0 18px 34px rgba(15,23,42,.10);
}

.client-page-section .client-card-head {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: flex-start;
}

.client-page-section .client-overview-card strong {
  display: block;
}

.client-page-section .client-overview-card p,
.client-page-section .client-overview-card small {
  margin: 0;
  color: inherit;
  opacity: .85;
}

.client-page-section .client-card-meta {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  font-size: .92rem;
}

.client-page-section .crm-detail-modern {
  padding: 1rem;
}

.client-page-section .detail-head-modern {
  border: 1px solid var(--client-status-border, var(--brand-border, var(--line)));
  background: var(--client-status-bg, #fff);
  color: var(--client-status-text, var(--brand-text, var(--text)));
  border-radius: 20px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}

.client-page-section .detail-head-modern h2,
.client-page-section .detail-head-modern p,
.client-page-section .detail-head-modern .eyebrow {
  color: inherit;
}

.client-page-section .detail-grid-modern {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .95rem;
}

.client-page-section .detail-grid-modern .detail-item {
  padding: 1.05rem 1rem;
  border-radius: 20px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(15,23,42,.08);
}

.client-page-section .detail-grid-modern .detail-item label {
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: none;
  color: #64748b;
  margin-bottom: .45rem;
}

.client-page-section .detail-grid-modern .detail-item p {
  font-size: 1rem;
}

.client-page-section .detail-grid-modern .status-pill {
  display: inline-flex;
}

.client-page-section .empty-state-panel,
.client-page-section .empty-detail-state {
  border: 1px dashed var(--brand-border, var(--line));
  border-radius: 18px;
  padding: 1.1rem;
  background: rgba(255,255,255,.65);
}

.client-page-section .crm-detail-stack {
  margin-top: 1.25rem;
}

.client-page-section .client-table-wrap {
  margin-top: .35rem;
  border-radius: 28px;
  box-shadow: 0 22px 50px rgba(15,23,42,.06);
}

.client-page-section .client-table-modern {
  border-collapse: separate;
  border-spacing: 0;
}

.client-page-section .client-table-modern {
    min-width: 1100px;
    width: max-content;
}

.client-page-section .client-table-modern th,
.client-page-section .client-table-modern td {
  vertical-align: middle;
  white-space: nowrap;
}

.client-page-section .client-table-modern th {
  white-space: nowrap;
  background: #f8fbfb;
}

.client-page-section .client-table-modern tbody tr.is-active {
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.06);
}

.client-page-section .client-table-modern tbody tr td:first-child,
.client-page-section .client-table-modern thead tr th:first-child {
  border-left: 0;
}

.client-page-section .client-table-modern tbody tr td:last-child,
.client-page-section .client-table-modern thead tr th:last-child {
  border-right: 0;
}

.client-page-section .sort-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--brand-text, var(--text));
  font-weight: 700;
}

.client-page-section .sort-link span {
  display: inline-flex;
  min-width: .75rem;
  color: var(--brand-primary, var(--accent));
}

.client-page-section .btn-small {
  min-height: 38px;
  padding: .5rem .8rem;
  font-size: .92rem;
}

@media (max-width: 1100px) {
  .client-page-section .crm-page-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .client-page-section .crm-page-head .button-row {
    width: 100%;
    max-width: 420px;
  }

  .client-page-section .crm-page-head .button-row .btn {
    min-width: 0;
    width: 100%;
  }

  .client-page-section .crm-cards-layout {
    grid-template-columns: 1fr;
  }

  .client-page-section .sticky-detail-pane,
  .client-page-section .crm-detail.sticky-detail-pane {
    position: static;
  }

  .client-page-section .client-card-grid-compact {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 900px) {
  .client-page-section .detail-grid-modern {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .client-page-section .client-view-switcher {
    width: 100%;
    justify-content: stretch;
  }

  .client-page-section .client-view-pill {
    flex: 1;
    text-align: center;
  }

  .client-page-section .toolbar-inline-fields,
  .client-page-section .toolbar-compact-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .client-page-section .toolbar-chip-field {
    min-width: 100%;
    flex: 1 1;
  }
}

.projectdocuments {
  display: grid;
}

.crm-page-head .button-row {
  display: grid;
}

/* === 2026 polish / env-driven brand system === */
:root {
  --bg: var(--brand-text, #0f172a);
  --bg-soft: color-mix(in srgb, var(--brand-primary-dark, #115e59) 70%, #0f172a);
  --page: var(--brand-surface, #f5fffd);
  --surface: rgba(255,255,255,.88);
  --surface-solid: #ffffff;
  --text: var(--brand-text, #0f172a);
  --muted: var(--brand-muted, #475569);
  --line: color-mix(in srgb, var(--brand-border, #ccefe9) 80%, white);
  --border: color-mix(in srgb, var(--brand-border, #ccefe9) 76%, white);
  --accent: var(--brand-primary, #0f766e);
  --accent-dark: var(--brand-primary-dark, #115e59);
  --accent-strong: var(--brand-accent, #14b8a6);
  --accent-soft: color-mix(in srgb, var(--brand-primary, #0f766e) 14%, white);
  --shadow: 0 20px 55px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 32px 90px rgba(15, 23, 42, 0.16);
}
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--brand-primary) 11%, transparent), transparent 30%),
    radial-gradient(circle at right top, color-mix(in srgb, var(--brand-accent) 10%, transparent), transparent 24%),
    linear-gradient(180deg, var(--brand-surface) 0%, color-mix(in srgb, var(--brand-surface-alt) 76%, white) 100%);
  color: var(--brand-text);
}
body.theme-regie {
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--brand-primary) 8%, transparent), transparent 32%),
    radial-gradient(circle at top right, color-mix(in srgb, var(--brand-accent) 8%, transparent), transparent 26%),
    linear-gradient(180deg, var(--brand-surface) 0%, color-mix(in srgb, var(--brand-surface-alt) 82%, white) 100%);
  color: var(--brand-text);
}
.site-header {
  background: color-mix(in srgb, var(--brand-text) 84%, transparent);
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 18px 50px rgba(15,23,42,.14);
}
.logo-mark,
.brand-mark {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-accent) 100%);
  color: #fff;
  box-shadow: 0 16px 38px color-mix(in srgb, var(--brand-primary) 34%, transparent);
}
.nav-center-links a,
.nav-link,
.nav-group-toggle,
.btn,
.status-pill,
.badge,
.eyebrow { transition: all var(--transition); }
.hero-modern {
  background:
    radial-gradient(circle at 16% 20%, color-mix(in srgb, var(--brand-accent) 16%, transparent), transparent 20%),
    radial-gradient(circle at 84% 12%, color-mix(in srgb, var(--brand-primary) 22%, transparent), transparent 20%),
    linear-gradient(135deg, color-mix(in srgb, var(--brand-primary-dark) 84%, #08111f) 0%, color-mix(in srgb, var(--brand-primary) 42%, #0f172a) 52%, color-mix(in srgb, var(--brand-text) 88%, #0f172a) 100%);
}
.hero p,
.section-heading p,
.footer-text { color: rgba(255,255,255,.84); }
.badge,
.eyebrow {
  padding: .58rem .95rem;
  color: var(--brand-primary-dark);
  background: color-mix(in srgb, var(--brand-secondary) 82%, white);
  border: 1px solid color-mix(in srgb, var(--brand-border) 85%, white);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
}
.glass-card,
.hero-card,
.card,
.auth-card,
.form-card,
.modern-table-card,
.crm-detail,
.dashboard-card,
.service-card,
.about-card {
  background: linear-gradient(180deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.84) 100%);
  border: 1px solid color-mix(in srgb, var(--brand-border) 84%, white);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.crm-sidebar {
  background: linear-gradient(180deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.84) 100%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.highlight-card {
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.08));
  border: 1px solid rgba(255,255,255,.14);
}
.btn {
  border-radius: 16px;
  font-weight: 700;
  min-height: 48px;
  padding: .82rem 1.2rem;
  border: 1px solid transparent;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-accent) 100%);
  color: #fff;
  box-shadow: 0 18px 34px color-mix(in srgb, var(--brand-primary) 24%, transparent);
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background: linear-gradient(135deg, var(--brand-accent) 0%, var(--brand-primary-dark) 100%);
  transform: translateY(-1px);
}
.btn-secondary,
.btn-ghost,
.btn-light,
.btn:not(.btn-primary) {
  background: rgba(255,255,255,.76);
  border-color: color-mix(in srgb, var(--brand-border) 78%, white);
  color: var(--brand-text);
}
.btn-secondary:hover,
.btn-ghost:hover,
.btn-light:hover,
.btn:not(.btn-primary):hover {
  border-color: color-mix(in srgb, var(--brand-primary) 24%, var(--brand-border));
  background: #fff;
}
input,
select,
textarea {
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--brand-border) 82%, white);
  background: rgba(255,255,255,.92);
  color: var(--brand-text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--brand-primary) 42%, white);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-primary) 14%, transparent);
}
.alert {
  border-radius: 18px;
  border-width: 1px;
  box-shadow: var(--shadow);
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem .82rem;
  font-size: .84rem;
  font-weight: 800;
  letter-spacing: .01em;
  border-radius: 999px;
  background: color-mix(in srgb, var(--client-status-bg, var(--brand-secondary)) 88%, white);
  color: var(--client-status-text, var(--brand-primary-dark));
  border: 1px solid var(--client-status-border, var(--brand-border));
}
.page-section {
  padding-top: 2.25rem;
  padding-bottom: 2.5rem;
}
.site-footer {
  margin-top: 3rem;
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand-primary-dark) 86%, #0f172a) 0%, color-mix(in srgb, var(--brand-text) 94%, #020617) 100%);
  color: rgba(255,255,255,.92);
  border-top: 1px solid rgba(255,255,255,.08);
}
.footer-links a,
.footer-bottom p { color: rgba(255,255,255,.78); }
.footer-links a:hover { color: #fff; }
.table-wrap,
.client-table-wrap {
  border-radius: 24px;
}

.client-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 960px) {
  .hero { padding-top: 4.2rem; }
  .hero-grid,
  .hero-grid-modern,
  .two-cols { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .site-header { padding: 12px 0; }
  .container { width: min(100% - 1.2rem, var(--container)); }
  .card,
  .glass-card,
  .auth-card,
  .form-card,
  .crm-detail,
  .crm-sidebar { border-radius: 20px; }
  .hero h1 { font-size: clamp(2rem, 9vw, 3rem); }
}

.client-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.client-image-card {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 0.9rem;
    border: 1px solid var(--brand-border);
    border-radius: 20px;
    background: #fff;
}

.client-image-card a {
    display: block;
    border-radius: 16px;
    overflow: hidden;
}

.client-image-card img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 220px;
    object-fit: cover;
}

.client-image-meta strong {
    display: block;
    font-size: 0.95rem;
    line-height: 1.35;
    word-break: break-word;
}

.client-image-meta p {
    margin: 0.25rem 0 0;
    font-size: 0.82rem;
    color: var(--brand-muted);
}

@media (max-width: 640px) {
    .client-image-grid {
        grid-template-columns: 1fr;
    }

    .client-image-card img {
        height: 180px;
    }
}


/* === clients page final override clean sidebar/cards === */
.client-page-section .crm-cards-layout {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.client-page-section .crm-cards-sidebar {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  min-width: 0;
}

.client-page-section .crm-cards-sidebar-inner {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: calc(100vh - 120px);
  padding: 1rem;
  border-radius: 26px;
  border: 1px solid var(--brand-border, rgba(15,23,42,.10));
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(14px);
  box-shadow: none;
  overflow: hidden;
}

.client-page-section .client-toolbar.client-toolbar-cards {
  flex: 0 0 auto;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(15,23,42,.08);
}

.client-page-section .client-card-grid.client-card-grid-compact {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 0;
  padding-right: .2rem;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}

.client-page-section .client-overview-card {
  position: relative;
  display: grid;
  gap: .42rem;
  padding: 1rem 1rem .95rem;
  border-radius: 18px;
  text-decoration: none;
  border: 1px solid var(--client-status-border, rgba(15,23,42,.10));
  background: var(--client-status-bg, rgba(255,255,255,.96));
  color: var(--client-status-text, var(--brand-text, var(--text)));
  box-shadow: none !important;
  transform: none !important;
  transition: background-color .16s ease, border-color .16s ease, filter .16s ease;
  isolation: isolate;
}

.client-page-section .client-overview-card:hover,
.client-page-section .client-overview-card:focus-visible {
  transform: none !important;
  box-shadow: none !important;
  border-color: color-mix(in srgb, var(--client-status-border, rgba(15,23,42,.18)) 78%, #0f172a);
  filter: saturate(1.02) brightness(.985);
  z-index: 1;
}

.client-page-section .client-overview-card.is-active {
  transform: none !important;
  box-shadow: none !important;
  border-color: color-mix(in srgb, var(--client-status-border, var(--brand-primary)) 80%, #0f172a);
  outline: 2px solid color-mix(in srgb, var(--client-status-border, var(--brand-primary)) 22%, transparent);
  outline-offset: 0;
}

.client-page-section .client-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
}

.client-page-section .client-card-head strong {
  margin: 0;
  font-size: .98rem;
  line-height: 1.34;
  font-weight: 700;
  color: inherit;
}

.client-page-section .client-overview-card p {
  margin: 0;
  font-size: .9rem;
  line-height: 1.42;
  color: inherit;
  opacity: .92;
}

.client-page-section .client-overview-card small {
  display: block;
  margin: 0;
  font-size: .79rem;
  line-height: 1.4;
  color: inherit;
  opacity: .78;
}

.client-page-section .client-card-meta {
  display: grid;
  gap: .2rem;
  margin-top: .15rem;
  padding-top: .72rem;
  border-top: 1px solid color-mix(in srgb, currentColor 16%, transparent);
  font-size: .8rem;
}

.client-page-section .client-card-meta span {
  display: block;
  color: inherit;
  opacity: .78;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-page-section .client-overview-card .status-pill {
  box-shadow: none !important;
  align-self: start;
  white-space: nowrap;
  max-width: 48%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-page-section .crm-detail-modern {
  box-shadow: none;
  border: 1px solid var(--brand-border, rgba(15,23,42,.10));
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(14px);
}

.client-page-section .sticky-detail-pane {
  position: sticky;
  top: 100px;
  align-self: start;
}

@media (max-width: 1100px) {
  .client-page-section .crm-cards-layout {
    grid-template-columns: 1fr;
  }

  .client-page-section .crm-cards-sidebar-inner,
  .client-page-section .sticky-detail-pane {
    position: static;
    top: auto;
    max-height: none;
  }

  .client-page-section .client-card-grid.client-card-grid-compact {
    overflow: visible;
    max-height: none;
    padding-right: 0;
  }
}

@media (max-width: 720px) {
  .client-page-section .crm-cards-sidebar-inner,
  .client-page-section .crm-detail-modern {
    border-radius: 20px;
    padding: .9rem;
  }

  .client-page-section .client-overview-card {
    padding: .9rem;
  }

  .client-page-section .client-card-head strong {
    font-size: .94rem;
  }
}

@media (max-width: 1100px) {
  .client-page-section .crm-cards-layout {
    grid-template-columns: 1fr;
  }

  .client-page-section .crm-cards-sidebar,
  .client-page-section .crm-cards-sidebar-inner,
  .client-page-section .sticky-detail-pane {
    position: static;
    top: auto;
    max-height: none;
    height: auto;
  }

  .client-page-section .crm-cards-sidebar-inner {
    overflow: visible;
  }

  .client-page-section .client-card-grid.client-card-grid-compact {
    overflow: visible;
    max-height: none;
    height: auto;
    padding-right: 0;
  }
}
/* CRM app layout - added for subdomain CRM experience */
body.is-crm-area {
  background: #eef2f7;
  color: #111827;
}

body.is-crm-area .site-header,
body.is-crm-area .site-footer {
  display: none;
}

.crm-app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, .11), transparent 30%),
    linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

.crm-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.2rem;
  background: #0f172a;
  color: #fff;
  box-shadow: 18px 0 55px rgba(15, 23, 42, .18);
  z-index: 50;
}

.crm-sidebar-brand { padding-bottom: 1rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.crm-logo {
  display: flex;
  align-items: center;
  gap: .85rem;
  color: #fff;
}
.crm-logo-mark {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 16px 34px rgba(245, 158, 11, .28);
}
.crm-logo strong { display: block; line-height: 1.2; }
.crm-logo small { display: block; color: rgba(255,255,255,.58); font-size: .82rem; }

.crm-side-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1.25rem 0;
  overflow-y: auto;
}
.crm-nav-label {
  margin: 1rem .75rem .35rem;
  color: rgba(255,255,255,.42);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.crm-side-link {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .82rem .9rem;
  border-radius: 16px;
  color: rgba(255,255,255,.76);
  font-weight: 700;
  transition: .2s ease;
}
.crm-side-link span { width: 24px; text-align: center; }
.crm-side-link:hover,
.crm-side-link.is-active {
  color: #fff;
  background: rgba(255,255,255,.10);
  transform: translateX(2px);
}
.crm-side-link.is-active {
  background: linear-gradient(135deg, rgba(245, 158, 11, .22), rgba(255,255,255,.10));
  box-shadow: inset 3px 0 0 var(--accent);
}

.crm-sidebar-footer {
  display: grid;
  gap: .75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.08);
}
.crm-user-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem;
  border-radius: 18px;
  background: rgba(255,255,255,.07);
}
.crm-user-avatar,
.crm-recent-avatar {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-weight: 900;
  background: rgba(245, 158, 11, .16);
  color: var(--accent-dark);
}
.crm-user-card strong { display: block; line-height: 1.2; }
.crm-user-card small { color: rgba(255,255,255,.58); }
.crm-logout-link {
  display: block;
  text-align: center;
  padding: .8rem;
  border-radius: 14px;
  color: #fff;
  background: rgba(255,255,255,.08);
  font-weight: 800;
}
.crm-logout-link:hover { background: rgba(255,255,255,.13); }

.crm-main-shell {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.crm-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(248, 250, 252, .86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, .22);
}
.crm-topbar-kicker {
  display: block;
  color: #64748b;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 900;
}
.crm-topbar-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.crm-topbar-user {
  padding: .55rem .85rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, .24);
  font-weight: 800;
}
.crm-menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
  font-size: 1.3rem;
}
.crm-content {
  width: min(100% - 2rem, 1420px);
  margin: 0 auto;
  padding: 1.5rem 0 2.5rem;
}

.crm-content .container {
  width: 100%;
  max-width: none;
}
.crm-content .section,
.crm-content .page-section {
  padding: 0;
}
.crm-content .card,
.crm-content .glass-card,
.crm-content .crm-detail-modern,
.crm-content .crm-cards-sidebar-inner,
.crm-content .sticky-detail-pane {
  border: 1px solid rgba(148, 163, 184, .22);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .07);
}

.crm-page-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  padding: 1.45rem;
  border-radius: 28px;
  background: linear-gradient(135deg, #fff 0%, #fff7ed 100%);
  border: 1px solid rgba(148, 163, 184, .22);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .07);
}
.crm-page-hero h1 {
  margin: .2rem 0 .35rem;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.1;
}
.crm-page-hero p { margin: 0; color: #64748b; max-width: 700px; }
.crm-page-label {
  color: var(--accent-dark);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.crm-page-actions { display: flex; gap: .7rem; flex-wrap: wrap; }

.crm-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.crm-stat-card {
  padding: 1.1rem;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, .22);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .06);
}
.crm-stat-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background: #f8fafc;
  margin-bottom: .75rem;
}
.crm-stat-card small { display: block; color: #64748b; font-weight: 800; }
.crm-stat-card strong { display: block; margin: .15rem 0; font-size: 2rem; line-height: 1; }
.crm-stat-card p { margin: 0; color: #64748b; font-size: .92rem; }

.crm-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  gap: 1rem;
}
.crm-panel {
  padding: 1.2rem;
  border-radius: 26px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, .22);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .06);
}
.crm-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.crm-panel h2 { margin: .15rem 0 0; font-size: 1.25rem; }
.crm-panel-link { color: var(--accent-dark); font-weight: 900; }
.crm-action-list,
.crm-recent-list { display: grid; gap: .75rem; }
.crm-action-list a,
.crm-recent-list a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .85rem;
  padding: .9rem;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, .18);
  transition: .2s ease;
}
.crm-action-list a:hover,
.crm-recent-list a:hover {
  transform: translateY(-1px);
  background: #fff7ed;
}
.crm-action-list span {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background: #fff;
}
.crm-action-list strong,
.crm-recent-list strong { display: block; line-height: 1.2; }
.crm-action-list small,
.crm-recent-list small { display: block; color: #64748b; }
.crm-recent-list em {
  font-style: normal;
  padding: .35rem .6rem;
  border-radius: 999px;
  background: #fff;
  color: #64748b;
  font-weight: 800;
  font-size: .78rem;
}
.crm-empty-state {
  padding: 1rem;
  border-radius: 18px;
  background: #f8fafc;
  color: #64748b;
}
.crm-empty-state strong { display: block; color: #111827; }
.crm-empty-state p { margin: .25rem 0 0; }

.crm-auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at 20% 10%, rgba(245, 158, 11, .20), transparent 24%),
    linear-gradient(135deg, #0f172a 0%, #172033 54%, #111827 100%);
}
.crm-auth-main { width: min(100%, 520px); }
.crm-auth-shell .auth-wrap,
.crm-auth-shell .section { padding: 0; }
.crm-auth-shell .container { width: 100%; }
.crm-auth-shell .auth-card {
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 30px 90px rgba(0,0,0,.28);
}
.crm-auth-shell .auth-card::before {
  content: 'CRM omgeving';
  display: inline-flex;
  margin-bottom: .85rem;
  padding: .35rem .7rem;
  border-radius: 999px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.crm-overlay { display: none; }

@media (max-width: 1180px) {
  .crm-app-shell { grid-template-columns: 1fr; }
  .crm-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(88vw, 318px);
    transform: translateX(-105%);
    transition: transform .25s ease;
  }
  body.crm-sidebar-open .crm-sidebar { transform: translateX(0); }
  .crm-overlay {
    position: fixed;
    inset: 0;
    display: block;
    opacity: 0;
    pointer-events: none;
    background: rgba(15, 23, 42, .48);
    z-index: 40;
    transition: opacity .2s ease;
  }
  body.crm-sidebar-open .crm-overlay { opacity: 1; pointer-events: auto; }
  .crm-menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .crm-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crm-dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .crm-topbar { padding: .85rem 1rem; }
  .crm-topbar-user,
  .crm-topbar-btn { display: none; }
  .crm-content { width: min(100% - 1rem, 1420px); padding-top: .75rem; }
  .crm-page-hero { display: grid; padding: 1rem; border-radius: 22px; }
  .crm-stat-grid { grid-template-columns: 1fr; }
  .crm-action-list a,
  .crm-recent-list a { grid-template-columns: auto minmax(0, 1fr); }
  .crm-recent-list em { grid-column: 2; justify-self: start; }
}

/* CRM layout refinements - full-height sidebar, sticky content, wider client list */
body.is-crm-area .crm-app-shell {
  min-height: 100vh;
  align-items: stretch;
}

body.is-crm-area .crm-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  border-radius: 0 !important;
  padding: 1rem;
}

body.is-crm-area .crm-sidebar-brand {
  flex: 0 0 auto;
}

body.is-crm-area .crm-side-nav {
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

body.is-crm-area .crm-sidebar-footer {
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  background: #0f172a;
  padding-bottom: .25rem;
}

body.is-crm-area .crm-logo-mark,
body.is-crm-area .crm-side-link,
body.is-crm-area .crm-user-card,
body.is-crm-area .crm-user-avatar,
body.is-crm-area .crm-logout-link {
  border-radius: 10px;
}

body.is-crm-area .crm-side-link:hover,
body.is-crm-area .crm-side-link.is-active {
  transform: none;
}

body.is-crm-area .crm-content {
  width: calc(100% - 2rem);
  max-width: none;
}

body.is-crm-area .crm-table-shell {
  width: 100%;
  max-width: none;
}

body.is-crm-area .client-table-wrap {
  width: 100%;
}

body.is-crm-area .client-table-modern {
  min-width: 100%;
}

.crm-topbar-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: .55rem .85rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, .24);
  color: #111827;
  font-weight: 900;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
}

.crm-topbar-logout:hover {
  background: #fff7ed;
  color: #111827;
}

@media (max-width: 1180px) {
  body.is-crm-area .crm-sidebar {
    position: fixed;
    height: 100dvh;
    max-height: 100dvh;
  }
}

@media (max-width: 720px) {
  body.is-crm-area .crm-content {
    width: calc(100% - 1rem);
  }

  .crm-topbar-logout {
    display: inline-flex;
    min-height: 40px;
    padding: .45rem .7rem;
    font-size: .86rem;
  }
}

/* === CRM patch: sticky full-height sidebar + clickable client rows === */
@media (min-width: 1181px) {
  body.is-crm-area .crm-app-shell {
    display: block;
    min-height: 100vh;
  }

  body.is-crm-area .crm-sidebar {
    position: fixed !important;
    inset: 0 auto 0 0;
    width: 286px;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    max-height: none;
    border-radius: 0 !important;
    overflow: hidden;
  }

  body.is-crm-area .crm-main-shell {
    min-width: 0;
    margin-left: 286px;
  }

  body.is-crm-area .crm-sidebar-brand,
  body.is-crm-area .crm-side-nav,
  body.is-crm-area .crm-sidebar-footer {
    position: relative;
    z-index: 1;
  }

  body.is-crm-area .crm-side-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: .25rem;
  }

  body.is-crm-area .crm-sidebar-footer {
    margin-top: auto;
    flex: 0 0 auto;
    position: sticky;
    bottom: 0;
    background: #0f172a;
  }
}

body.is-crm-area .client-clickable-row {
  cursor: pointer;
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

body.is-crm-area .client-clickable-row:hover {
  background: #fff7ed !important;
  box-shadow: inset 4px 0 0 var(--accent);
}

body.is-crm-area .client-clickable-row.is-selected {
  box-shadow: inset 4px 0 0 var(--accent-dark);
}

body.is-crm-area .client-clickable-row:focus-visible {
  outline: 3px solid rgba(245, 158, 11, .35);
  outline-offset: -3px;
}


/* Inline klantdetail onder geselecteerde lijstregel */
body.is-crm-area .client-clickable-row {
  scroll-margin-top: 1.25rem;
}

body.is-crm-area .client-inline-detail-row > td {
  padding: 0 1rem 1.5rem !important;
  border-bottom: 1px solid rgba(245, 158, 11, .2);
}

body.is-crm-area .client-inline-detail-panel {
  margin-top: .75rem;
  width: 100%;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .10);
  border: 1px solid rgba(245, 158, 11, .18);
}

body.is-crm-area .client-inline-detail-panel .detail-head-modern {
  border-radius: 18px;
}

body.is-crm-area .client-inline-detail-row .detail-item.full {
  grid-column: span 2;
}

@media (max-width: 1100px) {
  body.is-crm-area .client-inline-detail-row .detail-grid-modern {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body.is-crm-area .client-inline-detail-row > td {
    padding: 0 .75rem 1rem !important;
  }

  body.is-crm-area .client-inline-detail-row .detail-grid-modern,
  body.is-crm-area .client-inline-detail-row .detail-item.full {
    grid-template-columns: 1fr;
    grid-column: auto;
  }
}

/* === CRM patch: inline klantdetail passend binnen scherm + dichtklappen === */
body.is-crm-area .client-inline-detail-row > td {
  max-width: 100vw;
  overflow: visible;
}

body.is-crm-area .client-inline-detail-panel {
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
}

body.is-crm-area .client-inline-detail-panel * {
  max-width: 100%;
}

body.is-crm-area .client-inline-detail-panel .button-row,
body.is-crm-area .client-inline-detail-panel .detail-head-modern {
  flex-wrap: wrap;
}

body.is-crm-area .client-inline-detail-panel .btn {
  white-space: normal;
}

@media (min-width: 1181px) {
  body.is-crm-area .client-inline-detail-panel {
    position: sticky;
    left: 1rem;
    width: calc(100vw - 286px - 4rem);
    max-width: calc(100vw - 286px - 4rem);
  }
}

@media (max-width: 1180px) {
  body.is-crm-area .client-inline-detail-panel {
    position: sticky;
    left: .75rem;
    width: calc(100vw - 2.5rem);
    max-width: calc(100vw - 2.5rem);
  }
}

@media (max-width: 760px) {
  body.is-crm-area .client-inline-detail-panel {
    left: .5rem;
    width: calc(100vw - 1.5rem);
    max-width: calc(100vw - 1.5rem);
  }
}


/* === CRM patch: actieknoppen bovenaan formulieren === */
.form-action-bar {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1rem;
  margin: 0 0 0.35rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.94);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}
.form-action-bar-top { position: sticky; top: 0.75rem; z-index: 25; backdrop-filter: blur(14px); }
.form-action-copy { display: grid; gap: 0.2rem; min-width: 0; }
.form-action-copy strong { color: var(--text); line-height: 1.2; }
.form-action-copy small { color: var(--muted); line-height: 1.35; }
.form-action-bar .button-row { width: auto; flex: 0 0 auto; justify-content: flex-end; }
.form-action-bar .btn { white-space: nowrap; }

/* === CRM patch: klantentabel schermvullend desktop, scrollbaar mobiel === */
body.is-crm-area .client-page-section,
body.is-crm-area .crm-table-layout,
body.is-crm-area .crm-table-shell,
body.is-crm-area .client-table-wrap { min-width: 0; max-width: 100%; }
body.is-crm-area .crm-table-shell,
body.is-crm-area .client-table-wrap { box-sizing: border-box; width: 100%; overflow-x: hidden; }
body.is-crm-area .client-page-section .client-table-modern,
body.is-crm-area .client-table-modern {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  table-layout: fixed;
}
body.is-crm-area .client-page-section .client-table-modern th,
body.is-crm-area .client-page-section .client-table-modern td,
body.is-crm-area .client-table-modern th,
body.is-crm-area .client-table-modern td {
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: break-word;
  padding: .85rem .75rem;
}
body.is-crm-area .client-table-modern .button-row,
body.is-crm-area .client-table-modern td:last-child { min-width: 0; }
body.is-crm-area .client-table-modern .btn { max-width: 100%; white-space: normal; }
@media (min-width: 1181px) {
  body.is-crm-area .crm-main-shell { width: calc(100vw - 286px); max-width: calc(100vw - 286px); overflow-x: hidden; }
  body.is-crm-area .crm-content { width: calc(100% - 2rem); max-width: calc(100% - 2rem); }
}
@media (max-width: 760px) {
  body.is-crm-area .crm-table-shell,
  body.is-crm-area .client-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  body.is-crm-area .client-page-section .client-table-modern,
  body.is-crm-area .client-table-modern {
    min-width: 760px !important;
    width: max-content !important;
    max-width: none !important;
    table-layout: auto;
  }
  body.is-crm-area .client-page-section .client-table-modern th,
  body.is-crm-area .client-page-section .client-table-modern td,
  body.is-crm-area .client-table-modern th,
  body.is-crm-area .client-table-modern td {
    white-space: nowrap !important;
    overflow-wrap: normal;
    word-break: normal;
  }
}

/* === CRM patch: documentkolommen uitlijnen === */
body.is-crm-area .documents-block .document-grid,
body.is-crm-area .document-sections-stack .document-grid,
body.is-crm-area .crm-detail-modern .document-grid {
  align-items: stretch;
}
body.is-crm-area .documents-block .doc-card,
body.is-crm-area .document-sections-stack .doc-card,
body.is-crm-area .crm-detail-modern .doc-card {
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: .6rem;
}
body.is-crm-area .crm-detail-modern .doc-card h3,
body.is-crm-area .crm-detail-modern .doc-card h4 {
  margin: 0;
  min-height: 2.6rem;
  display: flex;
  align-items: flex-start;
  line-height: 1.25;
}
body.is-crm-area .documents-block .doc-card p,
body.is-crm-area .documents-block .doc-card small,
body.is-crm-area .document-sections-stack .doc-card p,
body.is-crm-area .document-sections-stack .doc-card small,
body.is-crm-area .crm-detail-modern .doc-card p,
body.is-crm-area .crm-detail-modern .doc-card small {
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
body.is-crm-area .documents-block .doc-card .button-row,
body.is-crm-area .document-sections-stack .doc-card .button-row,
body.is-crm-area .crm-detail-modern .doc-card .button-row,
body.is-crm-area .documents-block .doc-card > .btn,
body.is-crm-area .document-sections-stack .doc-card > .btn,
body.is-crm-area .crm-detail-modern .doc-card > .btn { align-self: end; margin-top: .35rem; }
body.is-crm-area .documents-block .doc-card .button-row,
body.is-crm-area .document-sections-stack .doc-card .button-row,
body.is-crm-area .crm-detail-modern .doc-card .button-row { width: 100%; justify-content: stretch; }
body.is-crm-area .documents-block .doc-card .button-row .btn,
body.is-crm-area .document-sections-stack .doc-card .button-row .btn,
body.is-crm-area .crm-detail-modern .doc-card .button-row .btn,
body.is-crm-area .documents-block .doc-card > .btn,
body.is-crm-area .document-sections-stack .doc-card > .btn,
body.is-crm-area .crm-detail-modern .doc-card > .btn {
  width: 100%;
  min-width: 0;
  white-space: normal;
}
@media (min-width: 1181px) {
  body.is-crm-area .documents-block .document-grid,
  body.is-crm-area .document-sections-stack .document-grid,
  body.is-crm-area .crm-detail-modern .document-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  body.is-crm-area .documents-block .document-grid,
  body.is-crm-area .document-sections-stack .document-grid,
  body.is-crm-area .crm-detail-modern .document-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body.is-crm-area .documents-block .document-grid,
  body.is-crm-area .document-sections-stack .document-grid,
  body.is-crm-area .crm-detail-modern .document-grid { grid-template-columns: 1fr; }
  body.is-crm-area .documents-block .doc-card h3,
  body.is-crm-area .documents-block .doc-card h4,
  body.is-crm-area .document-sections-stack .doc-card h3,
  body.is-crm-area .document-sections-stack .doc-card h4,
  body.is-crm-area .crm-detail-modern .doc-card h3,
  body.is-crm-area .crm-detail-modern .doc-card h4 { min-height: 0; }
}

/* === CRM mobiel: kaarten standaard prettig, lijstknop verbergen === */
#client-detail-panel,
.client-inline-detail-panel { scroll-margin-top: 1rem; }
@media (max-width: 768px) {
  .client-page-section .client-view-switcher a[href*="view=table"],
  .client-page-section .client-view-switcher a[href*="view=list"],
  .client-page-section .client-view-pill[href*="view=table"],
  .client-page-section .client-view-pill[href*="view=list"] { display: none !important; }
  .client-page-section .client-view-switcher { width: 100%; display: flex; }
  .client-page-section .client-view-switcher a[href*="view=cards"],
  .client-page-section .client-view-pill[href*="view=cards"] { width: 100%; justify-content: center; }
  .client-page-section .crm-cards-layout { grid-template-columns: 1fr !important; }
  .client-page-section .crm-cards-sidebar { position: static !important; max-height: none !important; overflow: visible !important; }
  .client-page-section .client-card-grid,
  .client-page-section .client-card-list { max-height: none !important; overflow: visible !important; }
  .client-page-section .crm-detail-modern { width: 100%; max-width: 100%; margin-top: 1rem; }
  .client-page-section .client-overview-card.is-active { outline: 2px solid rgba(245, 158, 11, 0.42); outline-offset: 2px; }
  .form-action-bar { align-items: stretch; flex-direction: column; padding: 0.9rem; border-radius: 16px; }
  .form-action-bar-top { top: 0.5rem; }
  .form-action-bar .button-row { width: 100%; flex-direction: column; }
  .form-action-bar .btn { width: 100%; white-space: normal; }
}


/* === CRM formulieren: materialen en bijlagen visueel verbeteren === */
.installer-admin-section {
  display: grid;
  gap: 1.2rem;
}

.installer-admin-head h2,
.material-card h3 {
  margin: 0 0 0.35rem;
}

.material-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98));
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.material-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.material-list {
  display: grid;
  gap: 0.8rem;
}

.material-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 0.9rem;
  align-items: center;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: #fff;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.material-row:hover {
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.material-row:has(input[type="checkbox"]:checked) {
  border-color: rgba(245, 158, 11, 0.42);
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.95), rgba(255,255,255,1));
}

.material-check {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-weight: 600;
  color: #0f172a;
}

.material-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.35rem;
  height: 1.35rem;
  margin: 0;
  border-radius: 0.45rem;
  border: 1.5px solid rgba(15, 23, 42, 0.2);
  background: #fff;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.material-check input[type="checkbox"]::after {
  content: "";
  width: 0.36rem;
  height: 0.68rem;
  border: solid #fff;
  border-width: 0 0.16rem 0.16rem 0;
  transform: rotate(45deg) scale(0);
  transition: transform 180ms ease;
  margin-top: -0.05rem;
}

.material-check input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  border-color: var(--accent-dark);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.material-check input[type="checkbox"]:checked::after {
  transform: rotate(45deg) scale(1);
}

.material-check input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.material-qty {
  display: grid;
  gap: 0.35rem;
}

.material-qty::before {
  content: "Aantal";
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  font-weight: 700;
}

.material-qty input {
  width: 100%;
  min-height: 50px;
  text-align: center;
  font-weight: 700;
  background: rgba(248, 250, 252, 0.95);
}

.material-free-rows {
  display: grid;
  gap: 0.8rem;
}

.material-free-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 48px;
  gap: 0.75rem;
  align-items: center;
}

.material-free-row input {
  background: #fff;
}

.material-free-row .btn,
.attachment-remove-btn,
.btn-small {
  min-height: 42px;
  padding: 0.65rem 0.9rem;
}

.material-summary-table {
  width: 100%;
  overflow-x: auto;
}

.material-summary-table table {
  width: 100%;
  border-collapse: collapse;
}

.material-summary-table th,
.material-summary-table td {
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  text-align: left;
}

.material-summary-table th {
  background: #f8fbfb;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

/* Oudere opleverdocument bijlagen */
.form-grid.full-width {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.attachment-group {
  display: grid;
  gap: 0.75rem;
  align-content: start;
  padding: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98));
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.attachment-group > label {
  display: block;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.attachment-list {
  display: grid;
  gap: 0.75rem;
}

.attachment-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #fff;
}

.attachment-input-row input,
.attachment-input-row input[type="file"] {
  width: 100%;
  min-width: 0;
  background: rgba(248,250,252,0.9);
}

.add-attachment-btn,
.attachment-add-btn {
  width: 100%;
  justify-content: center;
  min-height: 48px;
}

.attachment-existing-list {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.attachment-existing-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.875rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #f8fafc;
}

.attachment-existing-item a:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Warmtepomp schouw/oplever fotodossier */
.attachment-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.attachment-check-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98));
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
  display: grid;
  gap: 0.9rem;
}

.attachment-check-card.is-complete {
  border-color: rgba(245, 158, 11, 0.28);
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.92), #ffffff);
}

.attachment-check-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem;
  align-items: start;
}

.attachment-check-indicator {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  background: #eef2f7;
  color: #475569;
}

.attachment-check-card.is-complete .attachment-check-indicator {
  background: rgba(245, 158, 11, 0.14);
  color: #9a6500;
}

.attachment-check-copy h3 {
  margin: 0;
  font-size: 1rem;
  color: #0f172a;
}

.attachment-check-copy p {
  margin: 0.2rem 0 0;
  font-size: 0.92rem;
  color: #64748b;
}

.attachment-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.attachment-status-badge.is-complete {
  background: #dcfce7;
  color: #166534;
}

.attachment-status-badge.is-empty {
  background: #f8fafc;
  color: #475569;
}

.attachment-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.attachment-preview-card {
  display: grid;
  gap: 0.55rem;
  text-decoration: none;
  color: #0f172a;
}

.attachment-preview-card img,
.attachment-preview-fallback {
  width: 100%;
  height: 15rem;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(236, 254, 255, 0.55);
}

.attachment-preview-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #475569;
}

.attachment-preview-card span {
  font-size: 0.92rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.attachment-empty-state {
  padding: 0.85rem 0.95rem;
  border: 1px dashed rgba(15, 23, 42, 0.16);
  border-radius: 14px;
  color: #64748b;
  background: rgba(248,250,252,0.8);
}

.attachment-action-row {
  display: grid;
  gap: 0.75rem;
}

@media (max-width: 980px) {
  .form-grid.full-width,
  .attachment-check-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .material-card-head,
  .material-row,
  .material-free-row,
  .attachment-input-row,
  .attachment-check-head {
    grid-template-columns: 1fr;
  }

  .material-card-head .btn,
  .material-free-row .btn,
  .attachment-input-row .btn,
  .attachment-status-badge {
    width: 100%;
    justify-content: center;
  }

  .attachment-preview-grid {
    grid-template-columns: 1fr;
  }

  .attachment-existing-item {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* === Materialen: aantallen simpeler en rustiger === */
.material-row {
  grid-template-columns: minmax(0, 1fr) 105px;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
}

.material-qty {
  display: block;
}

.material-qty::before {
  display: none !important;
  content: none !important;
}

.material-qty input {
  min-height: 44px;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  text-align: left;
  font-weight: 600;
  background: #fff;
}

.material-free-row {
  grid-template-columns: minmax(0, 1fr) 105px 44px;
}

.material-free-row input[name="delivery_extra_material_qty[]"] {
  min-height: 44px;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  text-align: left;
  font-weight: 600;
  background: #fff;
}

@media (max-width: 720px) {
  .material-row,
  .material-free-row {
    grid-template-columns: 1fr;
  }

  .material-qty input,
  .material-free-row input[name="delivery_extra_material_qty[]"] {
    width: 100%;
  }
}

/* === Vereenvoudiging standaard materialen: rustige vinkjes en aantallen === */
.material-row {
  grid-template-columns: minmax(0, 1fr) 110px;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
}

.material-row:hover {
  transform: none;
  box-shadow: none;
  border-color: rgba(15, 23, 42, 0.12);
}

.material-row:has(input[type="checkbox"]:checked) {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.16);
}

.material-check {
  gap: 0.65rem;
  font-weight: 600;
}

.material-check input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: checkbox;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
}

.material-check input[type="checkbox"]::after {
  content: none;
}

.material-check input[type="checkbox"]:checked {
  background: initial;
  border-color: initial;
  box-shadow: none;
}

.material-check input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(245, 158, 11, 0.35);
  outline-offset: 2px;
  box-shadow: none;
}

.material-qty::before {
  content: none;
}

.material-qty input {
  min-height: 44px;
  padding: 0.65rem 0.75rem;
  text-align: left;
  font-weight: 600;
  background: #fff;
  border-radius: 12px;
}

.material-free-row {
  grid-template-columns: minmax(0, 1fr) 110px 44px;
}

@media (max-width: 720px) {
  .material-row,
  .material-free-row {
    grid-template-columns: 1fr;
  }

  .material-qty input {
    text-align: left;
  }
}

/* === Formulierhoofdstukken: meer ruimte en betere visuele hiërarchie === */
.form-card.wide .modern-form {
  gap: 1.35rem 1.25rem;
}

.form-card.wide .modern-form > .section-card,
.form-card.wide .modern-form .installer-admin-section,
.form-card.wide .modern-form > .full-width.section-card {
  margin-top: 0.75rem;
}

.form-card.wide .section-card {
  padding: 1.45rem 1.5rem;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96));
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.055);
}

.form-card.wide .section-card > h2,
.form-card.wide .installer-admin-head h2 {
  position: relative;
  margin: 0 0 1.15rem;
  padding-bottom: 0.85rem;
  font-size: clamp(1.15rem, 1.5vw, 1.45rem);
  line-height: 1.25;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.form-card.wide .section-card > h2::after,
.form-card.wide .installer-admin-head h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 4.5rem;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), rgba(245, 158, 11, 0.18));
}

.form-card.wide .section-card > p.muted,
.form-card.wide .installer-admin-head p.muted {
  margin-top: -0.65rem;
  margin-bottom: 1.1rem;
  max-width: 68rem;
}

.form-card.wide .section-card .compact-grid,
.form-card.wide .section-card .modern-form.two-column {
  gap: 1.05rem 1.2rem;
}

.form-card.wide .form-divider {
  margin: 0.65rem 0 0.25rem;
  padding: 0;
}

.form-card.wide .form-divider span {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
  font-weight: 800;
  font-size: 0.86rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.form-card.wide .form-divider span::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--accent);
}

.form-card.wide .installer-admin-section {
  padding: 1.45rem 1.5rem;
  border-radius: 22px;
  border: 1px solid rgba(245, 158, 11, 0.16);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.10), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(255,251,235,0.45));
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.055);
}

.form-card.wide .installer-admin-head {
  padding-bottom: 0.1rem;
}

.form-card.wide .material-card,
.form-card.wide .attachment-check-card,
.form-card.wide .attachment-group {
  margin-top: 0.15rem;
}

.form-card.wide .button-row.full-width,
.form-card.wide .modern-form > .button-row.full-width {
  margin-top: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

@media (max-width: 768px) {
  .form-card.wide .section-card,
  .form-card.wide .installer-admin-section {
    padding: 1.1rem;
    border-radius: 18px;
  }

  .form-card.wide .section-card > h2,
  .form-card.wide .installer-admin-head h2 {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
  }

  .form-card.wide .modern-form {
    gap: 1.1rem;
  }
}
