:root{
  --bg:#f3f3f1;
  --bg-soft:#f7f7f5;
  --panel:#ffffff;
  --panel-2:#fafaf8;
  --text:#111111;
  --text-soft:#2a2a2a;
  --muted:#6b6b6b;
  --muted-2:#8a8a8a;
  --line:#e7e7e3;
  --line-strong:#d8d8d2;
  --dark:#0f0f10;
  --dark-2:#171718;
  --dark-3:#232326;
  --shadow-sm:0 8px 20px rgba(0,0,0,.05);
  --shadow:0 18px 45px rgba(0,0,0,.08);
  --shadow-lg:0 28px 70px rgba(0,0,0,.12);
  --radius:18px;
  --radius-lg:26px;
  --container:1180px;
}

*{box-sizing:border-box}
html,body{height:100%}

html{
  scroll-behavior:smooth;
}

body{
  margin:0;
  font:15px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Inter, Roboto, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.85), transparent 28%),
    linear-gradient(180deg, #f7f7f5 0%, #f1f1ee 100%);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* Links */
a{
  color:var(--text);
  text-decoration:none;
}
a:hover{
  opacity:.88;
  text-decoration:none;
}
small{
  color:var(--muted);
}

/* Layout */
.container{
  max-width:var(--container);
  margin:0 auto;
  padding:28px 20px 72px;
}

/* ===== TOP BAR ===== */
.topbar{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(15,15,16,.92);
  color:#fff;
  border-bottom:1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.topbar-inner{
  max-width:1240px;
  margin:0 auto;
  padding:14px 22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:max-content;
}

.brand img{
  height:34px;
  width:auto;
  display:block;
}

.brand-word{
  font-size:18px;
  font-weight:800;
  letter-spacing:.01em;
  color:#fff;
}

/* Nav */
.nav{
  display:flex;
  align-items:center;
  gap:16px;
  flex-wrap:wrap;
}

.nav a{
  color:rgba(255,255,255,.78);
  text-decoration:none;
  font-size:14px;
  font-weight:600;
  padding:8px 10px;
  border-radius:10px;
  transition:all .16s ease;
}

.nav a:hover{
  color:#fff;
  background:rgba(255,255,255,.06);
}

/* Logout */
.logout button{
  background:rgba(255,255,255,.04);
  color:#fff;
  border:1px solid rgba(255,255,255,.14);
  padding:9px 14px;
  border-radius:12px;
  cursor:pointer;
  font-size:13px;
  font-weight:700;
}
.logout button:hover{
  background:#fff;
  color:#111;
  border-color:#fff;
}

/* ===== CARDS ===== */
.card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow-sm);
  padding:18px;
  margin:12px 0 18px;
}

.card.soft{
  background:linear-gradient(180deg,#ffffff 0%, #fbfbf9 100%);
}

/* Headings */
h1,h2,h3,h4,h5,h6{
  margin:0 0 10px;
  color:var(--text);
  font-weight:800;
  letter-spacing:-0.02em;
}

h1{
  font-size:40px;
  line-height:1.08;
}

h2{
  font-size:24px;
  line-height:1.15;
}

h3{
  font-size:17px;
  color:var(--text-soft);
  font-weight:750;
}

/* Tables */
table{
  width:100%;
  border-collapse:collapse;
  background:#fff;
}

th, td{
  padding:12px 12px;
  border-bottom:1px solid #ecece8;
  text-align:left;
  vertical-align:top;
}

th{
  background:#f7f7f5;
  font-weight:800;
  color:#1a1a1a;
}

/* Forms */
label{
  display:block;
  font-weight:700;
  margin:0 0 7px;
  color:var(--text);
  font-size:14px;
}

input, select, textarea,
.input{
  width:100%;
  padding:12px 14px;
  border:1px solid #d8d8d2;
  border-radius:14px;
  background:#fff;
  color:var(--text);
  outline:none;
  font:inherit;
  transition:border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

textarea{
  min-height:100px;
  resize:vertical;
}

input:focus, select:focus, textarea:focus, .input:focus{
  border-color:#111;
  box-shadow:0 0 0 5px rgba(0,0,0,.06);
}

input::placeholder,
textarea::placeholder{
  color:#999;
}

/* Buttons */
.btn, button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:11px 16px;
  border-radius:14px;
  border:1px solid #111;
  background:#111;
  color:#fff;
  cursor:pointer;
  font-weight:800;
  letter-spacing:.01em;
  transition:all .16s ease;
}

.btn:hover, button:hover{
  background:#232323;
  border-color:#232323;
  transform:translateY(-1px);
}

.btn.primary{
  background:#fff;
  color:#111;
  border-color:#d6d6d0;
}
.btn.primary:hover{
  background:#f7f7f5;
  border-color:#c8c8c1;
}

.btn.ghost{
  background:transparent;
  color:#111;
  border-color:#d8d8d2;
}
.btn.ghost:hover{
  background:#f5f5f2;
}

/* Table links */
table a{
  display:inline-block;
  padding:8px 12px;
  border-radius:12px;
  border:1px solid #111;
  background:#111;
  color:#fff;
  text-decoration:none;
  font-size:13px;
  font-weight:800;
}
table a:hover{
  background:#232323;
  border-color:#232323;
}

/* ===== CONSULTATION TOOLS DROPDOWN ===== */
.topbar-tools{
  position:relative;
  display:inline-block;
  margin-left:12px;
}

.tools-btn{
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.12);
  color:#fff;
  padding:9px 12px;
  border-radius:12px;
  cursor:pointer;
  font-weight:800;
}
.tools-btn:hover{
  border-color:rgba(255,255,255,.22);
  background:rgba(255,255,255,.07);
}

.dropdown{
  position:absolute;
  right:0;
  top:52px;
  width:390px;
  background:#fff;
  border:1px solid #e6e6e0;
  border-radius:18px;
  padding:16px;
  z-index:9999;
  box-shadow:0 20px 50px rgba(0,0,0,.14);
}

.dropdown, .dropdown *{
  color:#111;
}

.dropdown hr{
  border:0;
  border-top:1px solid #efefea;
  margin:14px 0;
}

.dropdown-heading{
  margin:0 0 8px;
  font-weight:800;
  color:#111;
}

.dropdown-section small{
  color:#666;
}

/* Badges */
.rec-badge{
  margin-left:8px;
  padding:2px 8px;
  border-radius:999px;
  background:#c92828;
  color:#fff;
  font-weight:800;
  font-size:12px;
}

.timer-badge{
  margin-left:8px;
  padding:2px 8px;
  border-radius:999px;
  background:#4c4c4c;
  color:#fff;
  font-weight:800;
  font-size:12px;
}

/* ===== MODAL ===== */
.modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.55);
  z-index:10000;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding-top:6%;
}

.modal-content{
  background:#fff;
  width:min(720px, 92%);
  padding:18px;
  border-radius:18px;
  box-shadow:0 24px 60px rgba(0,0,0,.24);
}

.modal-content h1,
.modal-content h2,
.modal-content h3,
.modal-content h4{
  color:#111;
}

.btn,
button,
.tools-btn{
  color:#fff !important;
}

.btn.primary,
button.primary{
  color:#111 !important;
}

/* ===== FORM HELPERS ===== */
.form-row{
  width:100%;
  margin:0 0 14px;
}

.grid{
  display:grid;
  gap:14px;
  width:100%;
}

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

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

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

.form-row label.checkbox-inline{
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-weight:700;
  margin:0;
}

.form-row label.checkbox-inline input[type="checkbox"]{
  width:auto;
}

/* ===== Document capture ===== */
.capture-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

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

.capture-status{
  display:block;
  margin-top:8px;
  color:var(--muted);
}

.capture-row{
  padding-top:6px;
}

/* ===== Webcam modal ===== */
.cam-modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.55);
  z-index:10000;
  display:none;
  align-items:center;
  justify-content:center;
  padding:16px;
}
.cam-box{
  width:min(720px, 95vw);
  background:#fff;
  border-radius:18px;
  padding:16px;
  box-shadow:0 18px 40px rgba(0,0,0,.25);
}
.cam-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
#camVideo{
  width:100%;
  border-radius:14px;
  background:#000;
}
.cam-actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-top:10px;
}

/* ===== Add New Client page ===== */
.client-type-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:16px;
}

@media (max-width: 980px){
  .client-type-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}

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

.client-type-card{
  display:block;
  background:linear-gradient(180deg,#ffffff 0%, #fafaf8 100%);
  border:1px solid var(--line);
  border-radius:22px;
  box-shadow:var(--shadow-sm);
  padding:20px;
  text-decoration:none;
  color:var(--text);
  transition:transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.client-type-card:hover{
  transform:translateY(-3px);
  border-color:#d0d0ca;
  box-shadow:var(--shadow);
}

.client-type-icon{
  font-size:34px;
  line-height:1;
  margin-bottom:12px;
}

.client-type-title{
  font-size:19px;
  font-weight:800;
  margin-bottom:6px;
}

.client-type-sub{
  color:var(--muted);
  font-size:14px;
  margin-bottom:14px;
}

.client-type-cta{
  display:inline-block;
  padding:8px 12px;
  border-radius:12px;
  background:#111;
  color:#fff;
  font-weight:800;
  font-size:13px;
}

/* ===== AUTH / PUBLIC PREMIUM ===== */
.auth-shell{
  min-height:calc(100vh - 110px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:38px 0;
}

.auth-grid{
  width:100%;
  display:grid;
  grid-template-columns:1.05fr .95fr;
  gap:26px;
  align-items:stretch;
}

.auth-copy{
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.08), transparent 26%),
    radial-gradient(circle at bottom right, rgba(255,255,255,.05), transparent 30%),
    linear-gradient(135deg, #0f0f10 0%, #1a1a1c 100%);
  color:#fff;
  border-radius:28px;
  padding:36px;
  box-shadow:var(--shadow-lg);
  min-height:560px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  position:relative;
  overflow:hidden;
}

.auth-copy::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(transparent 0%, rgba(255,255,255,.02) 100%);
  pointer-events:none;
}

.auth-logo{
  display:flex;
  align-items:center;
  gap:14px;
  margin-bottom:22px;
}

.auth-logo img{
  height:42px;
  width:auto;
  display:block;
}

.auth-badge{
  display:inline-block;
  width:max-content;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:#fff;
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  margin-bottom:16px;
  text-transform:uppercase;
}

.auth-heading{
  font-size:46px;
  line-height:1.02;
  margin:0 0 16px;
  color:#fff;
}

.auth-subheading{
  font-size:16px;
  line-height:1.7;
  color:rgba(255,255,255,.78);
  margin:0 0 24px;
  max-width:620px;
}

.auth-feature-list{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-top:10px;
}

.auth-feature{
  border:1px solid rgba(255,255,255,.1);
  background:rgba(255,255,255,.045);
  border-radius:18px;
  padding:14px 16px;
}

.auth-feature strong{
  display:block;
  color:#fff;
  font-size:15px;
  margin-bottom:4px;
}

.auth-feature span{
  color:rgba(255,255,255,.74);
  font-size:14px;
}

.auth-card{
  background:rgba(255,255,255,.88);
  border:1px solid rgba(255,255,255,.7);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  border-radius:28px;
  padding:32px;
  box-shadow:var(--shadow-lg);
  align-self:center;
}

.auth-card-logo{
  text-align:center;
  margin-bottom:16px;
}

.auth-card-logo img{
  max-height:48px;
  width:auto;
}

.auth-title{
  font-size:32px;
  line-height:1.08;
  margin-bottom:8px;
  text-align:center;
}

.auth-text{
  color:var(--muted);
  text-align:center;
  margin:0 0 20px;
  font-size:15px;
}

.auth-alert{
  margin:0 0 14px;
  padding:12px 14px;
  border:1px solid #e3c0c0;
  background:#fbf1f1;
  color:#8b1f1f;
  border-radius:14px;
  font-weight:600;
}

.auth-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:16px;
}

.auth-divider{
  display:flex;
  align-items:center;
  gap:12px;
  margin:18px 0;
  color:#8a8a8a;
  font-size:13px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.auth-divider::before,
.auth-divider::after{
  content:"";
  flex:1;
  height:1px;
  background:#e2e2dd;
}

.auth-note{
  display:block;
  margin-top:14px;
  text-align:center;
  color:#777;
  font-size:13px;
}

.hero-shell{
  display:flex;
  flex-direction:column;
  gap:22px;
}

.hero-panel{
  position:relative;
  overflow:hidden;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.12), transparent 26%),
    linear-gradient(135deg,#0f0f10 0%, #1b1b1d 100%);
  color:#fff;
  border-radius:32px;
  padding:38px;
  box-shadow:var(--shadow-lg);
}

.hero-panel h1{
  color:#fff;
  font-size:56px;
  line-height:1;
  margin-bottom:16px;
}

.hero-panel p{
  color:rgba(255,255,255,.8);
  font-size:17px;
  max-width:760px;
  margin:0 0 22px;
}

.hero-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:18px;
}

.hero-metrics{
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:14px;
  margin-top:24px;
}

.metric-card{
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.1);
  border-radius:20px;
  padding:16px;
}

.metric-card strong{
  display:block;
  font-size:26px;
  line-height:1;
  margin-bottom:6px;
  color:#fff;
}

.metric-card span{
  color:rgba(255,255,255,.74);
  font-size:13px;
}

.section-title{
  margin-bottom:8px;
  font-size:30px;
}

.section-copy{
  color:var(--muted);
  max-width:760px;
  margin:0 0 18px;
}

.feature-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:16px;
}

.feature-card{
  background:linear-gradient(180deg,#fff 0%, #fbfbf8 100%);
  border:1px solid var(--line);
  border-radius:22px;
  padding:22px;
  box-shadow:var(--shadow-sm);
}

.feature-card h3{
  margin-bottom:8px;
  font-size:19px;
  color:#111;
}

.feature-card p{
  margin:0;
  color:var(--muted);
}

.feature-card ul{
  margin:12px 0 0;
  padding-left:18px;
  color:var(--muted);
}

.cta-band{
  background:linear-gradient(180deg,#ffffff 0%, #f9f9f6 100%);
  border:1px solid var(--line);
  border-radius:28px;
  padding:28px;
  box-shadow:var(--shadow-sm);
}

@media (max-width: 1100px){
  .hero-metrics{
    grid-template-columns:repeat(2, minmax(0,1fr));
  }
}

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

  .auth-copy{
    min-height:auto;
    padding:28px;
  }

  .auth-heading{
    font-size:34px;
  }

  .auth-card{
    padding:24px;
  }

  .hero-panel{
    padding:28px;
    border-radius:24px;
  }

  .hero-panel h1{
    font-size:40px;
  }
}

@media (max-width: 640px){
  .container{
    padding:20px 14px 56px;
  }

  .topbar-inner{
    padding:12px 14px;
  }

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

  h1{
    font-size:32px;
  }

  .auth-title{
    font-size:28px;
  }
}

/* ===== INDIVIDUAL FORM POLISH ===== */
.form-shell{
  max-width: 1180px;
  margin: 0 auto;
}

.form-hero{
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.14), transparent 34%),
    linear-gradient(135deg, #050505 0%, #161616 100%);
  color:#fff;
  border-radius:24px;
  padding:28px 30px;
  box-shadow:0 24px 60px rgba(0,0,0,.16);
  margin-bottom:18px;
}

.form-hero h1{
  color:#fff;
  margin:0 0 8px;
  font-size:34px;
  line-height:1.06;
}

.form-hero p{
  margin:0;
  color:rgba(255,255,255,.78);
  font-size:15px;
  max-width:800px;
}

.form-hero-badge{
  display:inline-block;
  margin-bottom:14px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.08);
  color:#fff;
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.form-section{
  margin:0 0 18px;
  padding:22px;
  border:1px solid #e8e8e8;
  border-radius:22px;
  background:#fff;
  box-shadow:0 14px 35px rgba(0,0,0,.05);
}

.form-section-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 0 16px;
  padding-bottom:12px;
  border-bottom:1px solid #ededed;
}

.form-section-title h2{
  margin:0;
  font-size:18px;
  letter-spacing:-0.01em;
}

.form-section-sub{
  color:#666;
  font-size:13px;
}

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

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

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

.form-help{
  display:block;
  margin-top:6px;
  color:#666;
  font-size:12px;
  line-height:1.45;
}

.consent-row{
  display:flex;
  align-items:flex-start;
  gap:12px;
  margin:0;
  padding:14px 16px;
  border:1px solid #e5e5e5;
  border-radius:16px;
  background:#fafafa;
}

.consent-row input[type="checkbox"]{
  appearance:none;
  -webkit-appearance:none;
  width:20px;
  height:20px;
  min-width:20px;
  margin:2px 0 0 0;
  border:1.5px solid #111;
  border-radius:6px;
  background:#fff;
  position:relative;
  cursor:pointer;
}

.consent-row input[type="checkbox"]:checked{
  background:#111;
  border-color:#111;
}

.consent-row input[type="checkbox"]:checked::after{
  content:"";
  position:absolute;
  left:6px;
  top:2px;
  width:5px;
  height:10px;
  border:solid #fff;
  border-width:0 2px 2px 0;
  transform:rotate(45deg);
}

.consent-row label{
  margin:0;
  font-weight:600;
  display:flex;
  gap:12px;
  align-items:flex-start;
  width:100%;
  cursor:pointer;
}

.consent-copy{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.consent-copy small{
  color:#666;
  line-height:1.45;
}

.signature-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:18px;
}

.signature-panel{
  display:none;
  margin-top:14px;
  padding:16px;
  border:1px solid #e7e7e7;
  border-radius:18px;
  background:#fbfbfb;
}

.signature-panel.is-open{
  display:block;
}

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

.signature-option{
  border:1px solid #e3e3e3;
  border-radius:16px;
  background:#fff;
  padding:14px;
}

.signature-option h4{
  margin:0 0 6px;
  font-size:14px;
}

.signature-option p{
  margin:0 0 10px;
  font-size:12px;
  color:#666;
  line-height:1.45;
}

.file-btn{
  position:relative;
  overflow:hidden;
}

.file-btn input[type="file"]{
  position:absolute;
  inset:0;
  opacity:0;
  cursor:pointer;
}

.sticky-actions{
  position:sticky;
  bottom:18px;
  z-index:20;
  margin-top:18px;
  padding:14px;
  border:1px solid #e8e8e8;
  border-radius:20px;
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(8px);
  box-shadow:0 18px 40px rgba(0,0,0,.08);
}

.sticky-actions-inner{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

@media (max-width: 980px){
  .form-grid,
  .form-grid-3,
  .signature-option-grid{
    grid-template-columns:1fr;
  }

  .form-hero{
    padding:22px;
  }

  .form-hero h1{
    font-size:28px;
  }
}

/* ===== INDIVIDUAL WIZARD / PRODUCTION ===== */

.wizard-shell{
  max-width:1180px;
  margin:0 auto 40px;
}

.wizard-topbar{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;
  margin-bottom:18px;
  flex-wrap:wrap;
}

.wizard-page-title{
  margin:0 0 6px;
  font-size:34px;
  line-height:1.08;
  letter-spacing:-0.02em;
}

.wizard-page-subtitle{
  margin:0;
  color:var(--muted);
  font-size:15px;
  max-width:760px;
}

.wizard-save-indicator{
  background:#fff;
  border:1px solid var(--line);
  border-radius:999px;
  padding:10px 14px;
  font-size:13px;
  font-weight:700;
  box-shadow:var(--shadow-sm);
}

.wizard-progress.card{
  padding:18px;
  margin-bottom:18px;
}

.wizard-progress-steps{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:14px;
}

.wizard-step-btn{
  background:#fff;
  color:#111 !important;
  border:1px solid #d8d8d8;
  border-radius:999px;
  padding:10px 14px;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
  transition:all .16s ease;
}

.wizard-step-btn:hover{
  border-color:#bfbfbf;
  transform:translateY(-1px);
}

.wizard-step-btn.is-active{
  background:#111;
  color:#fff !important;
  border-color:#111;
}

.wizard-progress-bar{
  width:100%;
  height:8px;
  background:#ececec;
  border-radius:999px;
  overflow:hidden;
}

.wizard-progress-bar-fill{
  height:100%;
  width:16.66%;
  background:#111;
  transition:width .25s ease;
}

.wizard-step{
  display:none;
}

.wizard-step.is-active{
  display:block;
}

.wizard-card{
  padding:24px;
  border-radius:24px;
}

.wizard-card-head{
  margin-bottom:20px;
}

.wizard-card-head h2{
  margin:0 0 6px;
  font-size:24px;
  line-height:1.15;
}

.wizard-card-head p{
  margin:0;
  color:var(--muted);
}

.wizard-subheading{
  margin:18px 0 10px;
  font-size:16px;
  font-weight:800;
  color:#111;
}

.wizard-note{
  color:var(--muted);
  font-size:14px;
  line-height:1.55;
}

.wizard-doc-list{
  margin:0 0 18px 20px;
  color:var(--muted);
}

.wizard-footer.card{
  margin-top:18px;
  padding:16px 18px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.wizard-footer-left,
.wizard-footer-right{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.wizard-legal-copy{
  color:#222;
  line-height:1.65;
}

.wizard-consent-box,
.wizard-signature-box{
  margin-top:18px;
}

.wizard-checkbox-card{
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px 16px;
  background:#fafafa;
  margin-bottom:12px;
}

.wizard-check-row{
  display:flex !important;
  align-items:flex-start;
  gap:12px;
  font-weight:700;
  margin:0;
  cursor:pointer;
}

.wizard-check-row input[type="checkbox"]{
  width:18px !important;
  height:18px !important;
  min-width:18px;
  margin-top:2px;
  accent-color:#111;
}

.wizard-signature-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:12px;
}

.wizard-signature-status{
  margin-top:12px;
  color:#666;
  font-weight:600;
}

.wizard-signature-status.ok{
  color:#15803d;
}

.wizard-office-checks{
  display:flex;
  gap:18px;
  flex-wrap:wrap;
  align-items:center;
}

/* ===== KYC ===== */

.kyc-stack{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-top:14px;
}

.kyc-card{
  border:1px solid #e5e7eb;
  border-radius:18px;
  background:#fff;
  padding:18px;
  box-shadow:0 4px 14px rgba(0,0,0,.03);
}

.kyc-top{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:14px;
  align-items:start;
}

.kyc-question{
  min-width:0;
  font-weight:700;
  line-height:1.5;
  color:#111827;
}

.kyc-answer{
  justify-self:end;
  width:auto;
}

.kyc-answer ul{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:nowrap;
}

.kyc-answer li{
  margin:0;
}

.kyc-answer label{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:8px 14px;
  border:1px solid #d1d5db;
  border-radius:999px;
  cursor:pointer;
  font-weight:700;
  background:#f9fafb;
  min-width:84px;
  white-space:nowrap;
}

.kyc-answer input[type="radio"]{
  appearance:auto;
  -webkit-appearance:radio;
  accent-color:#111827;
  margin:0;
  position:static;
  transform:none;
}

.kyc-detail-wrap{
  margin-top:12px;
  display:none;
}

.kyc-detail-wrap.show{
  display:block;
}

.kyc-help{
  margin-top:4px;
  font-size:13px;
  color:#6b7280;
}

.kyc-status{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:13px;
  font-weight:800;
  margin-top:8px;
}

.kyc-status.yes{
  color:#b45309;
}

.kyc-status.no{
  color:#15803d;
}

.kyc-status.empty{
  color:#6b7280;
}

/* ===== DOCUMENT UPLOADS ===== */

.capture-row{
  padding-top:6px;
  margin-bottom:18px;
}

.capture-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

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

.capture-status{
  display:block;
  margin-top:8px;
  color:#666;
  font-weight:600;
}

/* ===== CAMERA MODAL ===== */

.cam-modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.6);
  z-index:10060;
  display:none;
  align-items:center;
  justify-content:center;
  padding:16px;
}

.cam-box{
  width:min(820px, 96vw);
  background:#fff;
  border-radius:22px;
  padding:18px;
  box-shadow:0 20px 60px rgba(0,0,0,.28);
  border:1px solid #ececec;
}

.cam-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

#camVideo,
#camPreview{
  width:100%;
  max-height:58vh;
  object-fit:contain;
  border-radius:16px;
  background:#000;
}

.cam-actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-top:12px;
  flex-wrap:wrap;
}

/* ===== SIGNATURE POPUP ===== */

.sig-modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.58);
  z-index:10050;
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
}

.sig-modal-box{
  width:min(760px, 96vw);
  max-height:90vh;
  overflow:auto;
  background:#fff;
  border-radius:26px;
  box-shadow:0 30px 80px rgba(0,0,0,.28);
  border:1px solid #ececec;
  padding:24px;
}

.sig-modal-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:16px;
}

.sig-tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:10px 0 18px;
}

.sig-tab-btn{
  border:1px solid #dddddd;
  padding:11px 16px;
  border-radius:14px;
  cursor:pointer;
  font-weight:800;
  background:#f3f3f3;
  color:#111 !important;
}

.sig-tab-btn.active{
  background:#111;
  color:#fff !important;
  border-color:#111;
}

.sig-tab-panel{
  display:none;
}

.sig-tab-panel.active{
  display:block;
}

.sigbox{
  border:2px dashed #d6d6d6;
  border-radius:18px;
  overflow:hidden;
  background:#fff;
}

#sigPad{
  width:100%;
  height:260px;
  display:block;
  background:#fff;
  touch-action:none;
}

.upload-box{
  border:2px dashed #d6d6d6;
  border-radius:18px;
  padding:22px;
  background:#fafafa;
}

.upload-box input[type="file"]{
  width:100%;
}

.text-sign-wrap{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.font-picker{
  display:grid;
  gap:10px;
}

.font-option{
  border:1px solid #d9d9d9;
  border-radius:16px;
  padding:16px;
  background:#fff;
  cursor:pointer;
}

.font-option.active{
  border:2px solid #111;
  background:#f8f8f8;
}

.font-preview{
  font-size:42px;
  line-height:1.2;
  min-height:56px;
}

.font-1{ font-family:cursive; }
.font-2{ font-family:"Brush Script MT", cursive; }
.font-3{ font-family:"Segoe Script", cursive; }
.font-4{ font-family:"Lucida Handwriting", cursive; }

.msg{
  margin-top:14px;
  font-size:14px;
  font-weight:700;
}

.msg.ok{
  color:#15803d;
}

.msg.err{
  color:#b91c1c;
}

/* ===== HELPERS ===== */

.is-invalid{
  border-color:#c62828 !important;
  box-shadow:0 0 0 4px rgba(198,40,40,.08) !important;
}

.is-readonly{
  background:#f4f4f4 !important;
  color:#666 !important;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 980px){
  .wizard-card{
    padding:18px;
  }

  .kyc-top{
    grid-template-columns:1fr;
  }

  .kyc-answer{
    justify-self:start;
    width:100%;
  }

  .kyc-answer ul{
    flex-wrap:wrap;
  }
}

@media (max-width: 768px){
  .wizard-page-title{
    font-size:28px;
  }

  .wizard-progress-steps{
    gap:8px;
  }

  .wizard-step-btn{
    width:100%;
    justify-content:flex-start;
  }

  .wizard-footer.card{
    flex-direction:column;
    align-items:stretch;
  }

  .wizard-footer-left,
  .wizard-footer-right{
    width:100%;
  }

  .wizard-footer-right .btn,
  .wizard-footer-left .btn{
    width:100%;
  }

  .sig-modal-box,
  .cam-box{
    padding:16px;
  }
}
