/* CRC Federal Registration Center – Modern Design Overhaul */

/* ===== CSS Variables ===== */
:root {
  --navy:       #0D2B5A;
  --blue:       #2563EB;
  --blue-dark:  #1d4ed8;
  --red:        #D92D20;
  --bg:         #F8FAFC;
  --white:      #ffffff;
  --border:     #E5E7EB;
  --text:       #111827;
  --text-sec:   #6B7280;
  --text-muted: #9CA3AF;
  --shadow:     0 4px 32px rgba(0,0,0,0.09);
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06);
  --radius:     10px;
  --radius-lg:  16px;
  --inp-h:      36px;
}

/* ===== Base Reset ===== */
*, *::before, *::after { box-sizing: border-box; }

html {
  border: none !important;
  height: 100%;
  overflow: hidden;
}

/* Hide scrollbars globally while keeping scroll functionality */
*::-webkit-scrollbar { display: none; }
* { scrollbar-width: none; -ms-overflow-style: none; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg) !important;
  background-image: none !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.6;
  height: 100%;
  overflow: hidden;
}

/* ===== HEADER ===== */
.crc-header {
  background: var(--navy);
  height: 52px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.crc-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.crc-logo-crc {
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
  line-height: 1;
}

.crc-logo-crc .crc-red { color: #fff; }

.crc-logo-sep {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.25);
  margin: 0 16px;
}

.crc-logo-label {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.crc-logo-label .ll-top {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.crc-logo-label .ll-bot {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.crc-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.crc-h-icon {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.crc-h-icon svg { width: 20px; height: 20px; }

.crc-h-help {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.crc-h-help .hh-top {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
}

.crc-h-help .hh-phone {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
}

/* ===== PAGE OUTER ===== */
.crc-page-outer {
  height: calc(100vh - 52px);
  margin: 0;
  padding: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Mobile top bar (hidden on desktop) */
.crc-mobile-top {
  display: none;
}

/* ===== LAYOUT CARD ===== */
.crc-layout-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: flex;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

/* ===== SIDEBAR ===== */
.crc-sidebar {
  width: 260px;
  min-width: 260px;
  background: #F9FAFB;
  border-right: 1px solid var(--border);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
}

.crc-sb-top {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.crc-sb-top h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 4px;
  line-height: 1.3;
  letter-spacing: -0.2px;
}

.crc-sb-top p {
  font-size: 12px;
  color: var(--text-sec);
  margin: 0;
  line-height: 1.4;
}

.crc-sb-steps {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 14px;
  flex: 1;
}

/* Sidebar step item */
.crc-sb-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
}

.crc-sb-step:hover { background: rgba(37,99,235,0.04); }

.crc-sb-step.sb-active {
  background: rgba(37,99,235,0.07);
  border-color: rgba(37,99,235,0.18);
}

/* Numbered circle */
.sb-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #E5E7EB;
  color: var(--text-sec);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.crc-sb-step.sb-active .sb-num {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.2);
}

.crc-sb-step.sb-done .sb-num { background: #10B981; color: #fff; }

/* Locked step — not yet reachable */
.crc-sb-step.sb-locked {
  opacity: 0.45;
  cursor: not-allowed !important;
  pointer-events: none;
}
.crc-sb-step.sb-locked:hover { background: transparent; }

/* Icon box */
.sb-ico {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #F3F4F6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

.crc-sb-step.sb-active .sb-ico { background: #DBEAFE; }

.sb-ico svg {
  width: 14px;
  height: 14px;
  stroke: var(--text-sec);
  fill: none;
  transition: stroke 0.2s;
}

.crc-sb-step.sb-active .sb-ico svg { stroke: var(--blue); }

/* Text */
.sb-txt { flex: 1; min-width: 0; }

.sb-txt strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  transition: color 0.2s;
}

.crc-sb-step.sb-active .sb-txt strong { color: var(--blue); }

.sb-txt small {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
  display: block;
}

/* Security badge */
.crc-security {
  padding: 10px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.crc-security > svg {
  width: 22px;
  height: 22px;
  stroke: #10B981;
  fill: none;
  flex-shrink: 0;
  margin-top: 2px;
}

.crc-sec-txt strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.crc-sec-txt p {
  font-size: 11px;
  color: var(--text-sec);
  margin: 0;
  line-height: 1.4;
}

/* Help box */
.crc-sb-help {
  padding: 10px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 10px;
}

.crc-sb-help-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.crc-sb-help-hdr svg {
  width: 18px;
  height: 18px;
  stroke: var(--blue);
  fill: none;
}

.crc-sb-help-hdr strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}

.crc-sb-help p {
  font-size: 11px;
  color: var(--text-sec);
  margin: 0 0 6px;
  line-height: 1.4;
}

.crc-sb-help a {
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
  text-decoration: none;
  display: block;
}

.crc-sb-help a:hover { text-decoration: underline; }

/* ===== MAIN CONTENT ===== */
.crc-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* ===== PROGRESS BAR (Stepwizard restyle) ===== */
.stepwizard {
  display: block !important;
  width: 100%;
  padding: 10px 20px 8px;
  border-bottom: 1px solid var(--border);
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
}

.stepwizard-row {
  display: flex !important;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  padding: 0;
}

.stepwizard-row::before {
  content: '';
  position: absolute;
  top: 17px;
  left: 48px;
  right: 48px;
  height: 2px;
  background: #E5E7EB;
  z-index: 0;
}

/* Override Bootstrap float */
.stepwizard-step,
.stepwizard-step.col-xs-3 {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  float: none !important;
  width: auto !important;
  padding: 0 !important;
  position: relative;
  z-index: 1;
  text-align: center;
}

.btn-circle {
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
  position: relative;
  z-index: 1;
}

/* Active step */
.btn-circle.btn-success {
  background: var(--blue) !important;
  border-color: var(--blue) !important;
  color: #fff !important;
  box-shadow: 0 0 0 5px rgba(37,99,235,0.18) !important;
}

/* Inactive step */
.btn-circle.btn-default {
  background: var(--white) !important;
  border: 2px solid #D1D5DB !important;
  color: #9CA3AF !important;
  box-shadow: none !important;
}

.stepwizard-step p {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-sec);
  line-height: 1.3;
  white-space: nowrap;
}

/* Highlighted label for active step - toggled via JS */
.stepwizard-step p.sw-active-lbl {
  color: var(--blue) !important;
  font-weight: 600 !important;
}

/* ===== STEP PANELS ===== */
.container {
  padding: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  flex: 1 !important;
  overflow-y: auto !important;
  min-height: 0 !important;
}

.panel {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  margin: 0 !important;
  border-radius: 0 !important;
}

.panel-primary { border: none !important; }

/* Hide old panel headings — override individually if needed */
.panel > .panel-heading { display: none !important; }

.panel-body { padding: 12px 20px !important; }

/* ===== SECTION HEADERS ===== */
.crc-sec-hdr {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #F1F5F9;
}

.crc-sec-ico {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #EFF6FF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.crc-sec-ico svg {
  width: 18px;
  height: 18px;
  stroke: var(--blue);
  fill: none;
}

.crc-sec-hdr-txt h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 1px;
  line-height: 1.2;
}

.crc-sec-hdr-txt p {
  font-size: 12px;
  color: var(--text-sec);
  margin: 0;
}

/* Sub-section dividers */
.crc-subsec {
  margin: 8px 0 6px;
  padding-top: 8px;
  border-top: 1px solid #F3F4F6;
}

.crc-subsec-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.crc-subsec-ico {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #ECFDF5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.crc-subsec-ico svg {
  width: 14px;
  height: 14px;
  stroke: #10B981;
  fill: none;
}

.crc-subsec-hdr h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
  line-height: 1.2;
}

.crc-subsec-hdr p {
  font-size: 11px;
  color: var(--text-sec);
  margin: 0;
}

/* ===== FORM CONTROLS ===== */
.form-group { margin-bottom: 7px !important; }

label,
.control-label {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  margin-bottom: 3px !important;
  display: block;
  font-family: 'Inter', sans-serif !important;
}

.form-control {
  height: var(--inp-h) !important;
  border: 1.5px solid #D1D5DB !important;
  border-radius: var(--radius) !important;
  background: var(--white) !important;
  color: var(--text) !important;
  font-size: 13px !important;
  font-family: 'Inter', sans-serif !important;
  padding: 0 12px !important;
  width: 100% !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
  outline: none !important;
  box-shadow: var(--shadow-sm) !important;
  display: block;
}

.form-control:focus {
  border-color: var(--blue) !important;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12) !important;
  outline: none !important;
}

.form-control::placeholder { color: var(--text-muted) !important; }

select.form-control {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 16px !important;
  padding-right: 40px !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

textarea.form-control {
  height: auto !important;
  min-height: 70px;
  padding: 8px 12px !important;
  resize: vertical;
}

.form-group.has-error .form-control {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 3px rgba(217,45,32,0.10) !important;
}

/* Inline field validation errors */
.crc-field-error {
  display: block;
  color: var(--red);
  font-size: 11px;
  font-weight: 500;
  margin-top: 3px;
  line-height: 1.4;
}

/* Grid */
.row {
  margin-left: -8px !important;
  margin-right: -8px !important;
}

[class*="col-sm-"],
[class*="col-xs-"] {
  padding-left: 8px !important;
  padding-right: 8px !important;
}

/* Amount field */
#cal_amount {
  font-weight: 400 !important;
  color: var(--text) !important;
}

/* Hint text */
small.form-text,
.form-text.text-muted {
  font-size: 12px !important;
  color: var(--blue) !important;
  margin-top: 6px !important;
  display: block !important;
}

/* Expiry selects */
td select.form-control {
  width: auto !important;
  min-width: 85px;
  display: inline-flex !important;
  height: 46px !important;
}

/* ===== BUTTONS ===== */
.btn {
  font-family: 'Inter', sans-serif !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
  cursor: pointer;
  border-radius: var(--radius) !important;
}

.btn-primary {
  background: linear-gradient(135deg, #2563EB 0%, #1d4ed8 100%) !important;
  border-color: #2563EB !important;
  color: #fff !important;
  height: var(--inp-h);
  padding: 0 20px !important;
  font-size: 13px !important;
  box-shadow: 0 4px 14px rgba(37,99,235,0.32) !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Goto trigger button — must stay hidden at all times */
#submitbtn { display: none !important; }

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
  border-color: #1d4ed8 !important;
  color: #fff !important;
  box-shadow: 0 6px 20px rgba(37,99,235,0.42) !important;
  transform: translateY(-1px);
  text-decoration: none !important;
  outline: none !important;
}

.btn-primary:active { transform: translateY(0); }

/* Next button - override pull-right float */
.nextBtn.pull-right { float: none !important; }

/* Submit / Goto buttons */
#step4.submitbtn,
.submitbtn {
  background: linear-gradient(135deg, var(--navy) 0%, #1a3a70 100%) !important;
  border-color: var(--navy) !important;
}

/* Auto-sign */
#autoSign {
  height: 40px !important;
  padding: 0 18px !important;
  font-size: 14px !important;
  border-radius: 8px !important;
}

#resignsignaturestep4 {
  margin: 10px 0 4px;
}


/* Button row */
.crc-btn-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  gap: 10px;
}

/* Back button */
.btn-crc-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: var(--inp-h);
  padding: 0 18px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-crc-back:hover,
.btn-crc-back:focus {
  border-color: var(--navy);
  background: #f1f5f9;
  color: var(--navy);
  outline: none;
}

/* Arrow icon inside next button */
.btn-next-arrow {
  width: 18px;
  height: 18px;
  stroke: #fff;
  fill: none;
  flex-shrink: 0;
}

/* ===== SERVICES CARDS ===== */
.crc-svc-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.crc-svc-card {
  background: #F9FAFB;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: all 0.2s ease;
}

.crc-svc-card:hover { border-color: #BFDBFE; background: #F0F7FF; }

.crc-svc-card .row {
  display: flex !important;
  align-items: center;
  margin: 0 !important;
  flex-wrap: nowrap;
}

.crc-svc-card .form-group { margin: 0 !important; }

.crc-svc-card label {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  margin: 0 !important;
  cursor: pointer;
}

.crc-svc-card input[type="checkbox"] {
  width: 20px !important;
  height: 20px !important;
  cursor: pointer;
  accent-color: var(--blue);
  margin: 0 !important;
  display: block;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

/* Appointment sub-fields inside service card */
.crc-svc-card .form-control {
  height: 40px !important;
  font-size: 13px !important;
}

.crc-svc-card select.form-control { height: 40px !important; }

/* ===== PAYMENT SECTION ===== */
#accountpay,
#cardpay {
  background: #F9FAFB;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

/* Show Payment Details panel-heading */
.panel-body > .panel-heading {
  display: block !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  margin-bottom: 12px;
}

.panel-body > .panel-heading .panel-title {
  font-size: 17px !important;
  font-weight: 700 !important;
  color: var(--navy) !important;
  margin: 16px 0 12px !important;
  padding: 0 !important;
}

/* ===== TERMS & CHECKBOXES ===== */
#agree_terms,
#opt_in_email {
  width: 20px !important;
  height: 20px !important;
  accent-color: var(--blue);
  cursor: pointer;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  border: none !important;
}

.crc-terms-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.crc-terms-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  background: #F9FAFB;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  margin: 0;
  font-weight: 400;
}

.crc-terms-item input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.crc-terms-item strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 2px;
}

.crc-terms-row a { color: var(--blue); }

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

/* Side-by-side layout: pad on left, auto-sign panel on right */
.crc-sig-layout {
  display: flex;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 12px;
}

#IDmySignature {
  flex: 1;
  border: 2px dashed #D1D5DB !important;
  border-radius: 12px !important;
  background: #F9FAFB !important;
  padding: 16px !important;
  margin: 0 !important;
  width: auto !important;
  max-width: none !important;
}

.sign-field {
  min-height: 120px;
  width: 100% !important;
}

/* Right panel */
.crc-sig-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

#signatureImage {
  width: 100%;
  max-height: 160px;
  object-fit: contain;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: #F9FAFB;
  padding: 8px;
}

/* Auto-sign hint row */
.crc-autosign-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #EFF6FF;
  border: 1.5px solid #BFDBFE;
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 0;
}

.crc-autosign-text {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 13px;
  color: #1e40af;
  flex: 1;
  line-height: 1.5;
}

.crc-autosign-text svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: #2563EB;
}

/* ===== LEAD EXPIRED / CONVERTED ===== */
.crc-expired-wrap {
  min-height: calc(100% - 52px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.crc-expired-card {
  width: 100%;
  max-width: 480px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 36px 32px;
  text-align: center;
}

.crc-expired-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #FEF2F2;
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
}

.crc-expired-icon svg { width: 28px; height: 28px; }

.crc-expired-card h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
}

.crc-expired-card p {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--text-sec);
  line-height: 1.6;
}

.crc-expired-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

@media (max-width: 480px) {
  .crc-expired-actions { flex-direction: column; }
  .crc-expired-actions .btn-primary,
  .crc-expired-actions .btn-crc-back { width: 100%; justify-content: center; }
}

/* ===== LOADER ===== */
#loadersub {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 43, 90, 0.35);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.crc-loader-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 20px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(13,43,90,0.10);
}

/* Spinner ring */
.crc-spinner {
  position: relative;
  width: 72px;
  height: 72px;
}

.crc-spinner-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 5px solid #E2E8F0;
  border-top-color: var(--blue);
  border-right-color: var(--navy);
  animation: crc-spin 0.9s linear infinite;
}

.crc-spinner-logo {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: 0.05em;
}

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

.crc-loader-title {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin: 4px 0 0;
}

.crc-loader-sub {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--text-sec);
  margin: 0;
}

/* Bouncing dots */
.crc-loader-dots {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.crc-loader-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  animation: crc-dot-bounce 1.2s ease-in-out infinite both;
}

.crc-loader-dots span:nth-child(1) { animation-delay: 0s; }
.crc-loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.crc-loader-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes crc-dot-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%            { transform: scale(1);   opacity: 1; }
}

/* Success state inside loader */
.crc-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #DCFCE7;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: crc-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.crc-success-icon svg {
  width: 34px;
  height: 34px;
  color: #16a34a;
  stroke: #16a34a;
}

@keyframes crc-pop {
  0%   { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ===== BOOTSTRAP SUCCESS / DEFAULT overrides ===== */
.btn-success {
  background-color: var(--blue) !important;
  border-color: var(--blue) !important;
  color: #fff !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .crc-page-outer { padding: 12px; }
  .crc-sidebar { width: 256px; min-width: 256px; }
}

@media (max-width: 820px) {
  html, body { height: auto; overflow: auto; }

  .crc-header { padding: 0 16px; height: 52px; }
  .crc-logo-label,
  .crc-logo-sep { display: none; }
  .crc-h-help .hh-top { display: none; }
  .crc-h-help .hh-phone { font-size: 15px; }

  .crc-page-outer { height: auto; padding: 0; overflow: visible; }
  .crc-layout-card { border-radius: 0; flex-direction: column; flex: none; min-height: 0; }

  .crc-sidebar {
    width: 100%;
    min-width: 100%;
    height: auto;
    overflow-y: visible;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 20px;
  }

  .crc-main { height: auto; overflow: visible; }

  .container {
    flex: none !important;
    overflow-y: visible !important;
  }

  .stepwizard { position: relative; top: auto; }

  .crc-sb-help { display: none; }
  .crc-sb-steps { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .crc-sb-step { flex: 1; min-width: 120px; padding: 10px 12px; }

  .stepwizard { padding: 14px 16px 12px; }
  .stepwizard-row::before { top: 17px; left: 36px; right: 36px; }

  .panel-body { padding: 20px !important; }

  .col-sm-6,
  .col-sm-4 { width: 100% !important; float: none !important; }

  .crc-btn-row { flex-direction: column-reverse; gap: 10px; }
  .btn-primary,
  .btn-crc-save { width: 100%; justify-content: center; }

  .form-control { height: 44px !important; }
}

@media (max-width: 480px) {
  .crc-sidebar { display: none; }

  .crc-mobile-top {
    display: flex !important;
    padding: 16px;
    gap: 12px;
    align-items: flex-start;
    border-bottom: 1px solid var(--border);
    background: var(--white);
  }

  .crc-mob-title { flex: 1; min-width: 0; }

  .crc-mob-title h2 {
    font-size: 18px;
    font-weight: 800;
    color: var(--navy);
    margin: 0 0 3px;
    line-height: 1.2;
  }

  .crc-mob-title p {
    font-size: 12px;
    color: var(--text-sec);
    margin: 0;
  }

  .crc-mob-help {
    flex-shrink: 0;
    padding: 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    text-align: center;
    background: var(--white);
  }

  .crc-mob-help p {
    font-size: 11px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 2px;
  }

  .crc-mob-help a {
    font-size: 13px;
    font-weight: 700;
    color: var(--blue);
    text-decoration: none;
  }

  .crc-sec-hdr-txt h3 { font-size: 15px; }
  .btn-circle { width: 30px !important; height: 30px !important; font-size: 12px !important; }
  .stepwizard { padding: 12px 14px 10px; }
  .stepwizard-row::before { top: 15px; left: 24px; right: 24px; }
  .stepwizard-step p { font-size: 10px; }
  .panel-body { padding: 16px !important; }

  .crc-sig-layout { flex-direction: column; }

  .crc-autosign-row { flex-direction: column; align-items: stretch; }
  .crc-autosign-row .btn-primary { width: 100%; justify-content: center; }
}
