/* ============================================================
   Khonecta — Shared Stylesheet
   Applies to all pages: index, form-tsm, form-clerk, confirm
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@700;900&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --k-navy:        rgb(25, 24, 96);
  --k-purple:      #6942E2;
  --k-purple-dark: #4D3E99;
  --k-teal:        #29EFC5;
  --k-white:       #ffffff;

  --k-bg-page:     #EEEDF5;
  --k-bg-form:     #F4F6FA;
  --k-bg-prefill:  #F5F2FF;
  --k-bg-confirm:  #F0FDF8;

  --k-border:      #DDD8F0;
  --k-border-confirm: #B8EDD9;
  --k-divider:     #E4DFF8;

  --k-text-body:   #222222;
  --k-text-label:  #555555;
  --k-text-prefill:#3A2A70;
  --k-text-muted:  rgba(255, 255, 255, 0.58);
  --k-text-faint:  rgba(255, 255, 255, 0.35);

  --k-green:       #0F9E75;
  --k-green-text:  #1A5E42;

  --k-radius-card: 16px;
  --k-radius-field: 8px;
  --k-radius-btn:  10px;
  --k-radius-pill: 20px;

  --k-shadow:      0 24px 64px rgba(25, 24, 96, 0.2);
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: var(--k-bg-page);
  color: var(--k-text-body);
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  -webkit-font-smoothing: antialiased;
}

/* ── Page wrapper (max-width constraint) ───────────────────── */
.k-page {
  width: 100%;
  max-width: 1000px;
  margin: auto;
}

/* ── Card shell (used by landing + forms) ──────────────────── */
.k-card {
  width: 100%;
  border-radius: var(--k-radius-card);
  overflow: hidden;
  box-shadow: var(--k-shadow);
}

/* ── Header (navy background, used on all pages) ───────────── */
.k-header {
  background: var(--k-navy);
  padding: 32px 40px 28px;
}

/* ── Logo lockup ───────────────────────────────────────────── */
.k-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.k-logo-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.k-logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.k-logo-wordmark {
  height: 22px;
}

.k-logo-wordmark img {
  height: 100%;
  width: auto;
  object-fit: contain;
}

/* ── Header text ───────────────────────────────────────────── */
.k-header-title {
  font-family: 'Gilroy', 'Barlow Condensed', 'Arial Black', sans-serif;
  font-weight: 700;
  font-size: 28px;
  color: var(--k-white);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 5px;
}

.k-header-sub {
  font-size: 14px;
  color: var(--k-text-muted);
  margin-bottom: 12px;
}

/* ── Role pill ─────────────────────────────────────────────── */
.k-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--k-radius-pill);
  padding: 4px 14px;
  font-size: 12px;
  color: var(--k-teal);
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* ── Landing page specific ─────────────────────────────────── */
.k-landing-header {
  background: var(--k-navy);
  padding: 48px 56px 52px;
  min-height: 560px;
}

.k-landing-logo {
  margin-bottom: 56px;
}

.k-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--k-radius-pill);
  padding: 5px 16px;
  font-size: 12px;
  color: var(--k-white);
  font-weight: 500;
  letter-spacing: 0.4px;
  margin-bottom: 20px;
}

.k-pill-dot {
  width: 8px;
  height: 8px;
  background: var(--k-teal);
  border-radius: 50%;
  flex-shrink: 0;
}

.k-landing-headline {
  font-family: 'Gilroy', 'Barlow Condensed', 'Arial Black', sans-serif;
  font-weight: 700;
  font-size: 48px;
  line-height: 1.0;
  color: var(--k-white);
  text-transform: uppercase;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.k-landing-headline em {
  font-style: normal;
  color: var(--k-teal);
}

.k-landing-sub {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.6;
  margin-bottom: 44px;
  max-width: 500px;
}

/* ── Role selector cards ───────────────────────────────────── */
.k-role-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 900px;
}

.k-role-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 26px 22px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: block;
}

.k-role-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.k-role-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.k-role-card--tsm .k-role-card-accent    { background: var(--k-teal); }
.k-role-card--clerk .k-role-card-accent  { background: rgba(255, 255, 255, 0.45); }
.k-role-card--owner .k-role-card-accent  { background: var(--k-teal); }
.k-role-card--super .k-role-card-accent  { background: rgba(255, 255, 255, 0.6); }

.k-role-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.14);
}

.k-role-card-title {
  font-family: 'Gilroy', 'Barlow Condensed', 'Arial Black', sans-serif;
  font-weight: 700;
  font-size: 21px;
  color: var(--k-white);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 7px;
}

.k-role-card-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.55;
  margin-bottom: 20px;
}

.k-role-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.26);
  color: var(--k-white);
}

.k-role-card--tsm .k-role-card-btn {
  background: rgba(41, 239, 197, 0.16);
  border-color: rgba(41, 239, 197, 0.45);
  color: var(--k-teal);
}

/* ── Landing start button ──────────────────────────────────── */
.k-start-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--k-teal);
  color: var(--k-navy);
  font-family: 'Gilroy', 'Barlow Condensed', 'Arial Black', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 32px;
  border-radius: var(--k-radius-btn);
  margin-bottom: 44px;
  transition: opacity 0.15s;
}

.k-start-btn:hover {
  opacity: 0.88;
}

/* ── Landing footer ────────────────────────────────────────── */
.k-landing-footer {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.k-landing-footer-top {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
}

.k-landing-footer span {
  font-size: 12px;
  color: var(--k-text-faint);
}

.k-landing-footer em {
  font-style: italic;
  color: rgba(255, 255, 255, 0.35);
  font-size: 12px;
}

.k-footer-contact {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  line-height: 1.6;
  width: 100%;
}

.k-landing-footer .k-footer-contact a {
  color: rgba(255, 255, 255, 0.55);
}

/* ── Form page footer ──────────────────────────────────────── */
.k-form-footer {
  padding: 16px 40px 24px;
  border-top: 1px solid #E4DFF8;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.k-form-footer-top {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
}

.k-form-footer span {
  font-size: 12px;
  color: #aaa;
}

.k-form-footer em {
  font-size: 12px;
  color: #aaa;
  font-style: italic;
}

.k-form-footer .k-footer-contact {
  color: #aaa;
}

.k-form-footer .k-footer-contact a {
  color: #6942E2;
}

/* ── Footer mobile: all items centred, each on own line ────── */
@media (max-width: 600px) {
  .k-landing-footer-top,
  .k-form-footer-top {
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
  .k-landing-footer,
  .k-form-footer {
    text-align: center;
  }
}

/* ── Form body ─────────────────────────────────────────────── */
.k-form-body {
  background: var(--k-bg-form);
  padding: 28px 40px 44px;
}

/* ── Progress bar ──────────────────────────────────────────── */
.k-progress {
  display: flex;
  gap: 5px;
  margin-bottom: 26px;
}

.k-progress-bar {
  height: 3px;
  flex: 1;
  border-radius: 2px;
  background: var(--k-purple);
}

.k-progress-bar.off {
  background: var(--k-border);
}

/* ── Form section headings ─────────────────────────────────── */
.k-section {
  font-family: 'Gilroy', 'Barlow Condensed', 'Arial Black', sans-serif;
  font-weight: 700;
  font-size: 11px;
  color: var(--k-purple);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 26px 0 12px;
  padding-bottom: 7px;
  border-bottom: 1.5px solid var(--k-divider);
}

.k-section:first-of-type {
  margin-top: 0;
}

/* ── Form fields ───────────────────────────────────────────── */
.k-field {
  margin-bottom: 16px;
}

.k-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--k-text-label);
  margin-bottom: 6px;
  letter-spacing: 0.1px;
}

.k-label .req {
  color: var(--k-purple);
  margin-left: 2px;
}

.k-input,
.k-select {
  width: 100%;
  background: var(--k-white);
  border: 1px solid var(--k-border);
  border-radius: var(--k-radius-field);
  padding: 11px 14px;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: var(--k-text-body);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.k-input:focus,
.k-select:focus {
  border-color: var(--k-purple);
  box-shadow: 0 0 0 3px rgba(105, 66, 226, 0.1);
}

.k-input.prefilled,
.k-select.prefilled {
  background: var(--k-bg-prefill);
  color: var(--k-text-prefill);
}

.k-select {
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236942E2' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-color: var(--k-white);
  cursor: pointer;
  padding-right: 36px;
}

.k-select.prefilled {
  background-color: var(--k-bg-prefill);
}

/* Email is always read-only — pre-populated from database, not editable */
#email.k-readonly {
  background: #F0EEF9;
  color: #6942E2;
  border-style: solid;
  cursor: default;
  font-weight: 500;
}


/* ── Two-column row ────────────────────────────────────────── */
.k-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ── Outlet confirmed display (Clerk) ──────────────────────── */
.k-outlet-confirmed {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--k-bg-prefill);
  border: 1px solid #D4CCF5;
  border-radius: var(--k-radius-field);
  padding: 12px 14px;
}

.k-outlet-tick {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: var(--k-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.k-outlet-label {
  font-size: 14px;
  color: var(--k-text-prefill);
  font-weight: 500;
}

/* ── Confirmation checkbox row ─────────────────────────────── */
.k-confirm-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--k-bg-confirm);
  border: 1px solid var(--k-border-confirm);
  border-radius: var(--k-radius-field);
  padding: 16px 18px;
  margin-top: 28px;
}

.k-confirm-tick {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: var(--k-green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.k-confirm-text {
  font-size: 13px;
  color: var(--k-green-text);
  line-height: 1.6;
}

/* ── Submit button ─────────────────────────────────────────── */
.k-submit {
  display: block;
  width: 100%;
  margin-top: 22px;
  background: var(--k-navy);
  border: none;
  border-radius: var(--k-radius-btn);
  padding: 16px;
  font-family: 'Gilroy', 'Barlow Condensed', 'Arial Black', sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--k-white);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.15s;
  text-align: center;
}

.k-submit:hover {
  opacity: 0.88;
}

/* ── Back link ─────────────────────────────────────────────── */
.k-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 13px;
  color: var(--k-purple);
  text-decoration: none;
  font-weight: 500;
}

.k-back:hover {
  text-decoration: underline;
}

/* ── Confirmation / thank-you page ────────────────────────── */
.k-thankyou {
  text-align: center;
  padding: 60px 40px;
}

.k-thankyou-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--k-bg-confirm);
  border: 2px solid var(--k-border-confirm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.k-thankyou h2 {
  font-family: 'Gilroy', 'Barlow Condensed', 'Arial Black', sans-serif;
  font-weight: 700;
  font-size: 28px;
  color: var(--k-navy);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.k-thankyou p {
  font-size: 15px;
  color: var(--k-text-label);
  line-height: 1.6;
  max-width: 420px;
  margin: 0 auto;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 640px) {
  .k-landing-header {
    padding: 32px 24px 40px;
    min-height: auto;
  }
  .k-landing-headline {
    font-size: 36px;
  }
  .k-role-cards {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
  .k-role-card-btn { width: 100%; justify-content: center; }
  .k-header {
    padding: 24px 22px 22px;
  }
  .k-form-body {
    padding: 22px 22px 36px;
  }
  .k-row {
    grid-template-columns: 1fr;
  }
  .k-header-title {
    font-size: 22px;
  }
  .k-thankyou {
    padding: 40px 24px;
  }
}
