
: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; }
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; }

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;
  padding: .5rem .95rem;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: #fde68a;
  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-sidebar,
.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;
}
.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);
}

.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;
}

