/* =========================================================
   Konnkt.in — Vendor Onboarding
   Design tokens
   ========================================================= */
:root{
  --k-yellow:        #FFCC00;
  --k-yellow-deep:    #E6B800;
  --k-yellow-soft:    #FFF3C4;
  --ink:              #14161A;
  --ink-soft:         #52565F;
  --ink-faint:        #9A9DA6;
  --paper:            #FBFAF6;
  --paper-dim:        #F2F0E9;
  --card:             #FFFFFF;
  --line:             #E7E3D8;
  --relay:            #0E7C66;
  --relay-soft:       #DCF2EC;
  --danger:           #D64545;
  --danger-soft:      #FCE9E9;

  --font-display: 'Space Grotesk', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-body:    'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;

  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 9px;

  /* the logo's signature corner: a rounded rect with the
     top-right corner sliced off — echoed on cards/chips */
  --notch: 26px;
}

/* =========================================================
   Self-contained utilities
   (No external framework required for structure or visibility —
   the layout must hold even if fonts/icon CDNs fail to load.)
   ========================================================= */
.is-hidden{ display: none !important; }

.mobile-only{ display: none; }
@media (max-width: 991.98px){
  .mobile-topbar.mobile-only{ display: flex; }
  .mobile-progress.mobile-only{ display: block; }
}

.spinner{
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(20,22,26,.25);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin{ to{ transform: rotate(360deg); } }

*{ box-sizing: border-box; }

html, body{
  height: 100%;
  background: var(--paper);
}

body{
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol{ margin: 0; }
ul, ol{ padding: 0; list-style: none; }

button{
  font-family: inherit;
  cursor: pointer;
}

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

input{ font-family: inherit; }

a{ color: var(--relay); text-decoration: none; }
a:hover{ color: var(--ink); }

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

/* =========================================================
   Shell layout
   ========================================================= */
.konnkt-shell{
  display: flex;
  min-height: 100vh;
}

/* ---------- Left rail ---------- */
.konnkt-rail{
  width: 400px;
  flex-shrink: 0;
  background: var(--ink);
  color: #fff;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background-image:
    radial-gradient(circle at 18% 8%, rgba(255,204,0,.14), transparent 45%),
    radial-gradient(circle at 90% 85%, rgba(14,124,102,.22), transparent 50%);
}

.rail-inner{
  padding: 44px 36px 32px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.rail-brand{ margin-bottom: 36px; }
.rail-logo{ height: 34px; width: auto; filter: brightness(1.02); }

.rail-eyebrow{
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--k-yellow);
  margin: 0 0 12px;
}

.rail-title{
  font-family: var(--font-display);
  font-size: 27px;
  line-height: 1.25;
  font-weight: 600;
  margin: 0 0 14px;
  color: #fff;
}

.rail-desc{
  font-size: 14.5px;
  line-height: 1.6;
  color: #C7C9CF;
  margin: 0 0 38px;
  max-width: 30ch;
}

/* ---------- Relay stepper (signature element) ---------- */
.relay-line{
  list-style: none;
  margin: 0 0 34px;
  padding: 0;
  position: relative;
}

.relay-node{
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 30px;
  opacity: .45;
  transition: opacity .25s ease;
}
.relay-node:last-child{ padding-bottom: 0; }

.relay-node::before{
  /* connecting dashed line */
  content: "";
  position: absolute;
  left: 15px;
  top: 34px;
  bottom: 0;
  width: 1px;
  background-image: linear-gradient(to bottom, rgba(255,255,255,.28) 0 4px, transparent 4px 9px);
  background-size: 1px 9px;
}
.relay-node:last-child::before{ display: none; }

.relay-node.is-active,
.relay-node.is-done{ opacity: 1; }

.node-dot{
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  font-size: 14px;
  color: #C7C9CF;
  transition: all .25s ease;
  z-index: 1;
}

.relay-node.is-active .node-dot{
  background: var(--k-yellow);
  border-color: var(--k-yellow);
  color: var(--ink);
  box-shadow: 0 0 0 4px rgba(255,204,0,.18);
}

.relay-node.is-done .node-dot{
  background: var(--relay);
  border-color: var(--relay);
  color: #fff;
}
.relay-node.is-done .node-dot i::before{ content: "\f272"; } /* checkmark */

.node-text{ display: flex; flex-direction: column; padding-top: 4px; }
.node-label{
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--ink-faint);
  text-transform: uppercase;
}
.relay-node.is-active .node-label{ color: var(--k-yellow); }

.node-title{
  font-size: 14.5px;
  font-weight: 600;
  color: #fff;
  margin-top: 2px;
}

/* ---------- Signal strength card ---------- */
.signal-card{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius-md);
  padding: 18px 18px 16px;
  margin-top: auto;
}

.signal-head{
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #C7C9CF;
  margin-bottom: 10px;
}
#signalPct{ color: var(--k-yellow); font-weight: 600; }

.signal-bars{
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 26px;
  margin-bottom: 10px;
}
.signal-bars .bar{
  flex: 1;
  background: rgba(255,255,255,.14);
  border-radius: 2px;
  transition: background .3s ease, box-shadow .3s ease;
}
.signal-bars .bar:nth-child(1){ height: 25%; }
.signal-bars .bar:nth-child(2){ height: 35%; }
.signal-bars .bar:nth-child(3){ height: 45%; }
.signal-bars .bar:nth-child(4){ height: 55%; }
.signal-bars .bar:nth-child(5){ height: 65%; }
.signal-bars .bar:nth-child(6){ height: 75%; }
.signal-bars .bar:nth-child(7){ height: 88%; }
.signal-bars .bar:nth-child(8){ height: 100%; }
.signal-bars .bar.is-live{
  background: var(--k-yellow);
  box-shadow: 0 0 10px rgba(255,204,0,.5);
}

.signal-hint{
  font-size: 12px;
  line-height: 1.5;
  color: #A9ABB3;
  margin: 0;
}

.rail-foot{
  font-size: 12.5px;
  color: #9A9DA6;
  margin: 26px 0 0;
}
.rail-foot a{ color: var(--k-yellow); }

/* =========================================================
   Main panel
   ========================================================= */
/*.konnkt-main{*/
/*  flex: 1;*/
/*  min-width: 0;*/
/*  display: flex;*/
/*  justify-content: center;*/
/*  padding: 56px 32px 80px;*/
/*}*/

.konnkt-main{
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 56px 32px 80px;
}

.form-stage{
  width: 100%;
  max-width: 680px;
}
.mobile-topbar{
    align-items:center;
    justify-content:space-between;
    width:100%;
}

.mobile-progress{
    width:100%;
}

.mobile-only{
    display:none;
}

@media (max-width:991.98px){
    .mobile-topbar.mobile-only{
        display:flex;
    }

    .mobile-progress.mobile-only{
        display:block;
    }
}

/* ---------- Mobile top bar ---------- */
.mobile-topbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 18px;
}
.mobile-logo{ height: 40px; }
.mobile-step-tag{
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink-soft);
  background: var(--paper-dim);
  padding: 5px 10px;
  border-radius: 20px;
}
.mobile-progress{
  height: 3px;
  background: var(--paper-dim);
  border-radius: 3px;
  margin-bottom: 30px;
  overflow: hidden;
}
.mobile-progress-fill{
  height: 100%;
  width: 25%;
  background: var(--k-yellow);
  transition: width .3s ease;
}

/* ---------- Step card ---------- */
.step-card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px 40px 34px;
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%);
  box-shadow: 0 1px 2px rgba(20,22,26,.03);
  animation: rise .38s ease both;
}

@keyframes rise{
  from{ opacity: 0; transform: translateY(10px); }
  to{ opacity: 1; transform: translateY(0); }
}

.step-card-head{ margin-bottom: 30px; }

.step-chip{
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--relay);
  background: var(--relay-soft);
  padding: 5px 11px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.step-card-head h2{
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--ink);
}

.step-sub{
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
  max-width: 52ch;
}

/* ---------- Field grid (self-contained, replaces bootstrap row/col) ---------- */
.field-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px 24px;
}
@media (max-width: 767.98px){
  .field-grid{ grid-template-columns: 1fr; gap: 22px; }
}

/* ---------- Fields ---------- */
.k-label{
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 7px;
}
.req{ color: var(--danger); }

.k-input{
  width: 100%;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.k-input::placeholder{ color: var(--ink-faint); }
.k-input:focus{
  outline: none;
  border-color: var(--k-yellow-deep);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255,204,0,.16);
}
.k-input.is-invalid{
  border-color: var(--danger);
  background: var(--danger-soft);
}
.k-input.is-valid{
  border-color: var(--relay);
}
.k-mono{ font-family: var(--font-mono); letter-spacing: .03em; text-transform: uppercase; }

.k-input-group{ position: relative; }
.k-input-group .k-input{ padding-left: 40px; }
.k-input-icon{
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  color: var(--ink-faint);
  font-size: 14px;
  pointer-events: none;
}
.k-input-prefix{
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-soft);
  left: 12px;
}

.k-hint{
  font-size: 12.5px;
  color: var(--ink-faint);
  margin-top: 6px;
  line-height: 1.5;
}

.invalid-feedback{
  display: none;
  font-size: 12.5px;
  color: var(--danger);
  margin-top: 6px;
}
.k-input.is-invalid ~ .invalid-feedback,
.was-validated-field .invalid-feedback{ display: block; }

/* ---------- Step actions ---------- */
.step-actions{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px dashed var(--line);
}

.btn-next, .btn-submit{
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink);
  background: var(--k-yellow);
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 22px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn-next:hover, .btn-submit:hover{
  background: var(--k-yellow-deep);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255,204,0,.35);
}
.btn-next:active, .btn-submit:active{ transform: translateY(0); }

.btn-back{
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink-soft);
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: border-color .15s ease, color .15s ease;
}
.btn-back:hover{ border-color: var(--ink-soft); color: var(--ink); }

.btn-submit{ position: relative; }
.btn-submit:disabled{ opacity: .7; pointer-events: none; }

/* =========================================================
   Documents step
   ========================================================= */
.doc-types{
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 22px;
}

.doc-type-chip{
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 24px;
  padding: 9px 15px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all .15s ease;
}
.doc-type-chip:hover{ border-color: var(--ink-soft); color: var(--ink); }
.doc-type-chip.is-selected{
  background: var(--ink);
  border-color: var(--ink);
  color: var(--k-yellow);
}

.dropzone{
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  padding: 30px 20px;
  text-align: center;
  transition: border-color .18s ease, background .18s ease;
}
.dropzone.is-dragover{
  border-color: var(--k-yellow-deep);
  background: var(--k-yellow-soft);
}
.dropzone.is-armed{
  border-color: var(--relay);
}

.dropzone-inner i{
  font-size: 26px;
  color: var(--ink-faint);
  margin-bottom: 8px;
  display: block;
}
.dropzone-inner p{
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 4px;
}
.dz-browse{
  background: none;
  border: none;
  padding: 0;
  color: var(--relay);
  font-weight: 600;
  text-decoration: underline;
}
.dz-note{
  font-size: 12px;
  color: var(--ink-faint);
}

.file-list{
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.file-row{
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.file-row i.bi-file-earmark-check{ color: var(--relay); font-size: 17px; }
.file-row .file-meta{ flex: 1; min-width: 0; }
.file-row .file-name{
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-row .file-tag{
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--relay);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.file-row .file-size{
  font-size: 11.5px;
  color: var(--ink-faint);
  flex-shrink: 0;
}
.file-row .file-remove{
  background: none;
  border: none;
  color: var(--ink-faint);
  font-size: 16px;
  padding: 4px;
  line-height: 1;
}
.file-row .file-remove:hover{ color: var(--danger); }

/* =========================================================
   Review step
   ========================================================= */
.review-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 26px;
}
.review-cell{
  background: var(--card);
  padding: 14px 16px;
}
.review-cell.span-2{ grid-column: 1 / -1; }
.review-k{
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 4px;
}
.review-v{
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  word-break: break-word;
}
.review-v.is-empty{ color: var(--ink-faint); font-weight: 500; font-style: italic; }
.review-docs{ display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.review-doc-pill{
  font-size: 12px;
  font-family: var(--font-mono);
  background: var(--relay-soft);
  color: var(--relay);
  padding: 4px 9px;
  border-radius: 20px;
}

.k-check{
  display: flex;
  gap: 11px;
  align-items: flex-start;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 22px;
}
.k-check input{ margin-top: 3px; accent-color: var(--relay); flex-shrink: 0; }
.k-check label{ font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }

.submit-alert{
  border-radius: var(--radius-sm);
  padding: 12px 15px;
  font-size: 13.5px;
  margin-bottom: 18px;
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(214,69,69,.25);
}

/* =========================================================
   Success
   ========================================================= */
.success-card{ text-align: center; padding: 60px 40px; }
.success-mark{
  width: 62px; height: 62px;
  border-radius: 50%;
  background: var(--relay);
  color: #fff;
  font-size: 28px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 22px;
}
.success-card h2{ font-family: var(--font-display); font-size: 26px; margin-bottom: 10px; }
.success-card .step-sub{ margin: 0 auto 26px; }
#refCode{ font-family: var(--font-mono); color: var(--relay); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 991.98px){
  .konnkt-shell{ flex-direction: column; }
  .konnkt-rail{ display: none; }
  .konnkt-main{ padding: 20px 18px 60px; }
  .step-card{ padding: 26px 22px 24px; }
  .review-grid{ grid-template-columns: 1fr; }
}

@media (max-width: 480px){
  .step-card-head h2{ font-size: 22px; }
  .doc-types{ gap: 7px; }
  .doc-type-chip{ font-size: 12.5px; padding: 8px 12px; }
}
