:root {
  --color-primary:     #1e3a8a;  /* deep blue */
  --color-primary-600: #16306a;
  --color-secondary:   #f59e0b;  /* warm amber */
  --color-accent:      #10b981;  /* emerald */
  --color-bg:          #f9fafb;
  --color-surface:     #ffffff;
  --text-primary:      #0f1724;
  --text-secondary:    #4b5563;
  --text-tertiary:     #6b7280;
  --muted:             #e5e7eb;
  --danger:            #dc2626;

  --radius: 12px;
  --page-max: 1200px;
  --card-max-width: 980px;

  --gap: 18px;
  --shadow: 0 10px 30px rgba(15,23,36,0.06);

  --input-height: 48px;
  --input-padding: 14px;
  --input-icon-left: 14px;
  --input-action-space: 110px;
  --control-transition: 180ms ease;

  /* layer control */
  --z-preloader: 10040;
  --z-toast:     10045;
  --z-panel:     10046; /* dropdown panels above toast/preloader but below modal */
  --z-modal:     10050;
}

/* Basic reset */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html,body { height:100%; margin:0; padding:0; }
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-primary);
  background: linear-gradient(180deg, var(--color-bg) 0%, #ffffff 100%);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.4;
  padding: 32px 16px;
}

/* Page wrapper & container */
.page-wrap {
  display:flex;
  align-items:center;
  justify-content:center;
  min-height: calc(100vh - 64px);
  padding: 24px 16px;
}
.signup-container {
  width:100%;
  max-width: var(--page-max);
  margin-inline:auto;
  display:flex;
  justify-content:center;
  gap: var(--gap);
}

/* Card */
.card {
  width:100%;
  max-width: min(var(--card-max-width), 960px);
  background: var(--color-surface);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: 20px;
  overflow: visible; /* allow panels to show */
}

/* Steps area */
.steps-top {
  border-radius: calc(var(--radius) - 6px);
  background: linear-gradient(90deg, rgba(30,58,138,0.05), rgba(22,48,106,0.03));
  padding: 10px 12px;
  margin-bottom: 14px;
}
.steps-inline { list-style:none; display:flex; gap:12px; padding:0; margin:0; overflow:auto; }
.steps-inline li { display:flex; gap:10px; align-items:center; min-width:180px; color:var(--text-secondary); font-size:13px; }
.steps-inline .tick { width:28px; height:28px; display:inline-grid; place-items:center; background:#ecf0ff; color:var(--color-primary); border-radius:8px; }

/* Header centered */
.card-header {
  padding: 6px 4px 18px 4px;
  border-bottom: 1px solid rgba(15,23,36,0.04);
  margin-bottom: 16px;
  text-align:center;
}
.card-header h2 { font-size:22px; margin:0 0 6px 0; color:var(--text-primary); line-height:1.1; }
.card-header .card-sub { margin:0; color:var(--text-secondary); font-size:13px; }

/* Role-toggle centered + hover interactions */
.role-toggle { display:flex; gap:8px; margin:14px 0; justify-content:center; align-items:center; flex-wrap:wrap; }
.role-btn {
  border:1px solid rgba(15,23,36,0.06);
  background:transparent;
  padding:8px 14px;
  border-radius:10px;
  font-size:14px;
  cursor:pointer;
  transition: transform var(--control-transition), box-shadow var(--control-transition), background var(--control-transition), color var(--control-transition);
  color:var(--text-secondary);
  min-width:120px;
  text-align:center;
  user-select:none;
}
.role-btn:hover:not(.active) {
  transform: translateY(-4px);
  border-color: rgba(30,58,138,0.12);
  background: rgba(30,58,138,0.04);
  color: var(--text-primary);
  box-shadow: 0 8px 20px rgba(22,48,106,0.06);
}
.role-btn:active:not(.active) { transform: translateY(-1px); }
.role-btn.active,
.role-btn[aria-pressed="true"],
.role-btn:focus { background: linear-gradient(180deg,var(--color-primary),var(--color-primary-600)); color:#fff; border-color:transparent; box-shadow: 0 6px 18px rgba(30,58,138,0.12); }

/* Social buttons centered, reduced width and hover states */
.social-row { display:flex; gap:10px; margin:8px 0 12px; justify-content:center; flex-wrap:wrap; }
.social {
  display:flex; align-items:center; gap:10px; border-radius:10px; padding:10px 12px;
  font-weight:600; cursor:pointer; border:1px solid rgba(15,23,36,0.04); background:#fff;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
  flex:0 0 220px; justify-content:center; user-select:none; position:relative; z-index:1100;
}
.social .social-icon { width:20px; height:20px; object-fit:contain; }
.social:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(2,6,23,0.08); border-color: rgba(30,58,138,0.12); background: linear-gradient(180deg, rgba(30,58,138,0.04), rgba(30,58,138,0.02)); }
.social:active { transform: translateY(-1px); }
@media (max-width:420px) { .social { flex:1 1 100%; max-width:100%; } }

/* Divider */
.divider { display:flex; align-items:center; gap:12px; margin:16px 0; color:var(--text-secondary); font-size:13px; }
.divider::before, .divider::after { content:""; height:1px; background: rgba(15,23,36,0.04); flex:1; }

/* Form layout */
form#signupForm { width:100%; display:block; }
.two-cols { display:grid; grid-template-columns:1fr; gap:12px; margin-bottom:12px; }
@media (min-width:720px) { .two-cols { grid-template-columns: repeat(2,1fr); } }

/* Generic field */
.field { margin-bottom:12px; position:relative; }
.field-label { display:block; font-size:13px; color:var(--text-secondary); margin-bottom:6px; }

/* Input styling */
.input-wrap { position:relative; display:block; }
.input-wrap input[type="text"], .input-wrap input[type="email"], .input-wrap input[type="password"], .input-wrap input[type="tel"], .input-wrap input[type="search"], .input-wrap textarea, .input-wrap select {
  width:100%; height:var(--input-height);
  padding: 0 var(--input-padding) 0 calc(var(--input-icon-left) + 28px);
  border-radius:10px; border:1px solid rgba(15,23,36,0.08); outline:none;
  transition: border var(--control-transition), box-shadow var(--control-transition), color var(--control-transition);
  font-size:15px; color:var(--text-primary); background:#fff;
  -webkit-appearance:none; -moz-appearance:none; appearance:none; box-sizing:border-box;
}
.input-wrap textarea { min-height:100px; height:auto; padding: 12px var(--input-padding) 12px calc(var(--input-icon-left) + 28px); resize:vertical; line-height:1.45; }
.input-wrap select { padding-right: 40px; }

/* placeholder */
.input-wrap input::placeholder, .input-wrap textarea::placeholder { color: rgba(75,85,99,0.45); }

/* input icon (left) */
.input-icon { position:absolute; left:var(--input-icon-left); top:50%; transform:translateY(-50%); pointer-events:none; color:var(--text-secondary); font-size:18px; display:inline-flex; align-items:center; gap:8px; }

/* Show/hide button for password */
.input-wrap .show-pass {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  height: calc(var(--input-height) - 12px);
  padding: 6px 10px;
  border-radius: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: 600;
  color: var(--color-primary-600);
  transition: color var(--control-transition);
}
.input-wrap .show-pass:hover,
.input-wrap .show-pass:focus {
  transform: translateY(-50%);
  background: transparent;
  outline: none;
  box-shadow: none;
}
.input-wrap .show-pass[aria-pressed="true"],
.input-wrap .show-pass.active { color: var(--danger); font-weight: 700; }

/* Field messages */
.field-message { margin-top:6px; font-size:13px; line-height:1.2; }
.field-message.error { color: var(--danger); font-weight:700; }
.field-message.success { color: var(--color-accent); font-weight:700; }
.field-message.hint { color: var(--text-secondary); font-weight:600; }

/* Error / success input states (JS toggles inline classes) */
.input-error { border-color: var(--danger) !important; box-shadow: 0 6px 18px rgba(220,38,38,0.06); }
.input-success { border-color: var(--color-accent) !important; box-shadow: 0 6px 18px rgba(16,185,129,0.06); }

/* Password reveal hint */
.input-wrap.is-revealed input { border-color: var(--danger) !important; color: var(--danger); box-shadow: 0 8px 24px rgba(220,38,38,0.06); }
.password-revealed .pwd-help, form.password-revealed .pwd-help { color: var(--danger); font-weight:700; }

/* Pwd help: HIDDEN by default; JS must show it (.visible OR aria-hidden="false") */
.pwd-help {
  display:none;
  font-size:13px;
  margin:6px 0 12px;
  text-align:center;
  color: var(--danger);
  font-weight:600;
  transition: color 160ms ease, transform 160ms ease, opacity 160ms ease;
}
.pwd-help.visible,
.pwd-help[aria-hidden="false"] {
  display:block;
  opacity:1;
}
.pwd-help.valid { color: var(--color-accent); font-weight:700; }

/* Strength bar container */
.pwd-strength { display:flex; align-items:center; gap:12px; margin-bottom:12px; justify-content:center; }
.strength-bar { display:flex; gap:6px; align-items:center; transition: all 220ms ease; }
.strength-bar .level {
  width: 60px; height:8px; background: rgba(15,23,36,0.06); border-radius:4px;
  transition: background 220ms ease, transform 180ms ease;
  transform-origin: center;
}
.strength-bar .level.active { background: linear-gradient(90deg,var(--color-primary),var(--color-primary-600)); transform: scaleY(1.06); }
.strength-bar.strength-1 .level:nth-child(-n+1), .strength-bar[data-strength="1"] .level:nth-child(-n+1) { background: linear-gradient(90deg, var(--danger), #ff8a8a); transform: scaleY(1.06); }
.strength-bar.strength-2 .level:nth-child(-n+2), .strength-bar[data-strength="2"] .level:nth-child(-n+2) { background: linear-gradient(90deg, var(--color-secondary), #f97316); transform: scaleY(1.06); }
.strength-bar.strength-3 .level:nth-child(-n+3), .strength-bar[data-strength="3"] .level:nth-child(-n+3) { background: linear-gradient(90deg, var(--color-accent), #059669); transform: scaleY(1.06); }

/* ToS area: pointer + centered */
.tos { display:flex; gap:8px; align-items:center; margin:6px 0 12px; font-size:14px; color:var(--text-secondary); justify-content:center; text-align:center; cursor:pointer; }
.tos input { transform: translateY(2px); cursor:pointer; }

/* Actions */
.form-actions { margin-top:6px; display:flex; gap:12px; align-items:center; justify-content:center; }
.btn { background: var(--muted); padding:10px 16px; border-radius:10px; border:none; cursor:pointer; font-weight:700; transition: transform var(--control-transition), box-shadow var(--control-transition), opacity var(--control-transition); }
.btn-primary { background: linear-gradient(180deg,var(--color-primary),var(--color-primary-600)); color:#fff; box-shadow:0 8px 18px rgba(30,58,138,0.12); }
.btn-primary:hover:not([disabled]) { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(22,48,106,0.12); }
.btn[disabled] { opacity:0.6; cursor:not-allowed; transform:none; box-shadow:none; }

/* tiny text (Already have an account?) center and remove underline */
.tiny { font-size:13px; color:var(--text-secondary); margin-top:10px; text-align:center; }
.tiny a { text-decoration:none; color: var(--color-primary); font-weight:600; cursor:pointer; }

/* Links - remove underline globally, visible focus */
a { text-decoration:none; color:var(--color-primary); }
a:hover { color:var(--color-primary-600); }
a:focus { outline: 3px solid rgba(30,58,138,0.08); border-radius:6px; }

/* Modal */
/* Make modal top-most so it blocks the page and appears above preloader/toast */
.modal { position:fixed; inset:0; display:none; align-items:center; justify-content:center; background: rgba(2,6,23,0.6); z-index: var(--z-modal); pointer-events: auto; }
.modal[aria-hidden="false"] { display:flex; }
.modal-panel { width: calc(100% - 48px); max-width:520px; background:#fff; border-radius:12px; padding:18px; box-shadow: 0 40px 120px rgba(2,6,23,0.32); max-height: 90vh; overflow:auto; }
.modal-close { background:transparent; border:none; float:right; font-size:18px; cursor:pointer; }

/* Focus states */
input:focus, textarea:focus, .cd-toggle:focus, .role-btn:focus, button:focus { box-shadow: 0 4px 18px rgba(30,58,138,0.08); }

/* ========== Base Mobile First ========== */
.signup-container {
  width: 100%;
  max-width: 420px;    /* don’t let it stretch too much on small phones */
  margin: 0 auto;
  padding: 16px;
}

.card {
  width: 100%;
  padding: 20px;
  border-radius: 12px;
  background: var(--color-surface);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.steps-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.steps-inline li {
  flex: 1 1 100%;      /* full width on very small screens */
  min-width: 140px;
  text-align: center;
}

/* ========== Small tablets (≥480px) ========== */
@media (min-width: 480px) {
  .signup-container {
    padding: 20px;
  }
  .card {
    padding: 24px;
    border-radius: 14px;
  }
  .steps-inline li {
    flex: 1 1 45%;     /* two in a row */
    min-width: 160px;
  }
}

/* ========== Tablets (≥720px) ========== */
@media (min-width: 720px) {
  .signup-container {
    max-width: 600px;
    padding: 24px;
  }
  .card {
    padding: 28px;
    border-radius: 16px;
  }
  .steps-inline li {
    flex: 1 1 30%;     /* three in a row */
    min-width: 180px;
  }
}

/* ========== Desktops (≥980px) ========== */
@media (min-width: 980px) {
  .signup-container {
    max-width: 760px;
    padding: 28px;
  }
  .card {
    padding: 32px;
    border-radius: 18px;
  }
  .steps-inline li {
    flex: 1 1 25%;     /* four in a row if space allows */
    min-width: 200px;
  }
}

/* ========== Country/Phone & Location dropdown specifics ========== */
/* phone/country */
.phone-wrap { display:flex; gap:8px; align-items:center; width:100%; }
.country-dropdown { display:flex; align-items:center; gap:8px; background:#fff; border-radius:10px; border:1px solid rgba(15,23,36,0.06); padding:6px 8px; min-width:120px; height:var(--input-height); position:relative; box-sizing:border-box; }
.country-dropdown .cd-toggle { display:flex; align-items:center; gap:8px; width:100%; background:transparent; border:none; cursor:pointer; color:var(--text-primary); font-weight:600; text-align:left; padding:0; margin:0; }
.country-dropdown .cd-toggle:focus { outline:none; box-shadow: 0 6px 18px rgba(30,58,138,0.06); }

/* panel */
.cd-panel {
  position:absolute;
  top: calc(100% + 8px);
  left:0;
  width:320px;
  max-width:90vw;
  background:#fff;
  border-radius:10px;
  box-shadow:0 10px 30px rgba(2,6,23,0.12);
  border:1px solid rgba(15,23,36,0.06);
  z-index: var(--z-panel);
  padding:8px;
  display:none;
  box-sizing:border-box;
}
.cd-panel[aria-hidden="false"] { display:block; }

/* search & list */
.cd-search { width:100%; height:40px; border-radius:8px; border:1px solid rgba(15,23,36,0.06); padding:8px 12px; margin-bottom:8px; box-sizing:border-box; }
.cd-list{ max-height:220px; overflow:auto; padding:0; margin:0; list-style:none; -webkit-overflow-scrolling: touch; }
.cd-list .cd-item{ display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:6px; cursor:pointer; font-size:14px; color:var(--text-primary); box-sizing:border-box; }
.cd-list .cd-item .flag { width:28px; flex:0 0 28px; text-align:center; font-size:16px; }
.cd-list .cd-item .label { flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cd-list .cd-item .code { flex:0 0 auto; color:var(--text-secondary); font-weight:700; margin-left:6px; }
.cd-list .cd-item:hover, .cd-list .cd-item[aria-selected="true"] { background: rgba(30,58,138,0.04); }

/* scrollbars */
.cd-list::-webkit-scrollbar { width:10px; height:10px; }
.cd-list::-webkit-scrollbar-thumb { background: rgba(15,23,36,0.06); border-radius:8px; }
.cd-list { scrollbar-width: thin; scrollbar-color: rgba(15,23,36,0.06) transparent; }

/* caret */
.cd-toggle .caret { margin-left:auto; display:inline-block; width:20px; height:20px; flex:0 0 20px; align-self:center; }

/* floating panel helper (JS may move panel to body and add this) */
.floating-panel { position:fixed !important; z-index: var(--z-panel) !important; max-width:92vw !important; left:auto !important; top:auto !important; }

/* Location dropdown variations (use same classes) */
.location-dropdown .cd-panel { z-index: var(--z-panel); }
.location-dropdown .cd-toggle .cd-value { display:inline-block; max-width: calc(100% - 32px); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; vertical-align:middle; }
.location-dropdown .flag { width:28px; display:inline-block; margin-right:8px; text-align:center; font-size:16px; }

/* region select (native-styled) */
.region-select {
  height: var(--input-height);
  border-radius:10px;
  border:1px solid rgba(15,23,36,0.08);
  background:#fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path fill="%23163a6a" d="M6 8L0 0h12z"/></svg>') no-repeat right 12px center;
  padding: 0 36px 0 calc(var(--input-icon-left) + 28px);
  -webkit-appearance:none; -moz-appearance:none; appearance:none;
  display:inline-block; width:100%; box-sizing:border-box;
}
.region-select:focus { outline:none; box-shadow: 0 6px 18px rgba(30,58,138,0.06); border-color: rgba(30,58,138,0.12); }

/* If the region dropdown is hidden and text input is shown, align icons */
#locationRegionText { padding-left: calc(var(--input-icon-left) + 28px); height: var(--input-height); border-radius:10px; border:1px solid rgba(15,23,36,0.08); background:#fff; font-size:15px; box-sizing:border-box; }

/* Address input (multi-line) */
.address-input {
  width:100%;
  min-height:96px;
  padding: 12px var(--input-padding) 12px calc(var(--input-icon-left) + 28px);
  border-radius:10px;
  border:1px solid rgba(15,23,36,0.08);
  background:#fff;
  font-size:15px;
  line-height:1.45;
  resize:vertical;
  box-sizing:border-box;
}
.address-input::placeholder { color: rgba(75,85,99,0.45); }
.address-input:focus { outline:none; box-shadow: 0 6px 22px rgba(22,48,106,0.06); border-color: rgba(30,58,138,0.12); }

/* ToS area: pointer + centered */
.tos { display:flex; gap:8px; align-items:center; margin:6px 0 12px; font-size:14px; color:var(--text-secondary); justify-content:center; text-align:center; cursor:pointer; }
.tos input { transform: translateY(2px); cursor:pointer; }

/* Actions & Buttons repeated for clarity */
.form-actions { margin-top:6px; display:flex; gap:12px; align-items:center; justify-content:center; }

/* tiny text (Already have an account?) center and remove underline */
.tiny { font-size:13px; color:var(--text-secondary); margin-top:10px; text-align:center; }
.tiny a { text-decoration:none; color: var(--color-primary); font-weight:600; cursor:pointer; }

/* Preloader & Spinner */
/* Preloader overlay (full-screen): sits below modal but above page */ 
.preloader-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(2,6,23,0.35);
  z-index: var(--z-preloader);
  backdrop-filter: blur(4px);
}
.preloader-overlay[aria-hidden="false"] { display:flex; }

/* Preloader panel */
.preloader {
  background: rgba(255,255,255,0.98);
  padding: 18px 22px;
  border-radius: 12px;
  display:flex;
  gap:12px;
  align-items:center;
  box-shadow: 0 12px 36px rgba(2,6,23,0.16);
  min-width: 240px;
}
.spinner {
  width:48px;
  height:48px;
  border-radius:50%;
  border:5px solid rgba(30,58,138,0.12);
  border-top-color: var(--color-primary);
  animation: fp-spin 900ms linear infinite;
}
@keyframes fp-spin { to { transform: rotate(360deg); } }
.preloader .msg { font-weight:700; color:var(--text-primary); font-size:15px; }

/* Toast */
.fp-toast {
  position: fixed;
  right: 20px;
  top: 24px;
  z-index: var(--z-toast);
  min-width: 300px;
  max-width: 420px;
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: 0 10px 30px rgba(2,6,23,0.12);
  display:none;
  color:#fff;
  font-weight:700;
  align-items:center;
  gap:10px;
  pointer-events:auto;
}
.fp-toast[aria-hidden="false"] { display:flex; animation: toast-in 220ms ease; }
@keyframes toast-in { from { transform: translateY(-6px); opacity:0 } to { transform:none; opacity:1 } }
.fp-toast.success { background: linear-gradient(90deg,var(--color-accent), #059669); }
.fp-toast.error   { background: linear-gradient(90deg,var(--danger), #ff6b6b); }
.fp-toast .icon { width:20px; height:20px; opacity:0.95; }
.fp-toast #fpToastMsg { font-weight:700; }

/* small page-level card override for forgot page */
.forgot-card .card-header { text-align:center; }
.forgot-card .card-sub { color: var(--text-secondary); }

/* Navbar & Branding */
.navbar-brand {
  margin-top:50px;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 1000;
  text-decoration: none;
  color: var(--color-primary);
  -webkit-font-smoothing: antialiased;
  font-family: "Poppins", Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  font-weight: 700;
}
.brand-badge {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(180deg, var(--color-primary), var(--color-primary-600));
  box-shadow: var(--shadow);
  user-select: none;
  font-size: 0.95rem;
}
.navbar-brand .fw-semibold { color: var(--text-primary); letter-spacing: 0.2px; font-size: 1rem; }
.navbar-brand:focus, .navbar-brand:focus-visible { outline: 3px solid rgba(30,58,138,0.12); border-radius: 8px; box-shadow: 0 6px 18px rgba(30,58,138,0.06); }

/* If something else overlaps clickable controls, raise them */
.social, .btn, .show-pass, .cd-toggle { position: relative; z-index: 1100; }

/* Slightly smaller badge on very small screens */
@media (max-width:420px) {
  .brand-badge { width: 40px; height: 40px; min-width: 40px; font-size: 0.9rem; }
  .navbar-brand { gap: 0.4rem; font-size: 0.95rem; }
}

/* =========================
   Footer update (fixed)
   Full-width primary background, centered content, professional layout
   ========================= */
.footer-bottom {
  width: 100%;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, var(--color-primary), var(--color-primary-600));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  border-radius: 0;
  position: relative;
  z-index: 100;
  padding: 32px 0;
  margin: 0;
  overflow: hidden;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.footer-left small { color: #ffffff; font-size: 13px; font-weight: 600; letter-spacing: 0.2px; line-height: 1.4; }
.footer-right { display: flex; align-items: center; gap: 16px; justify-content: flex-end; }
.footer-right a { color: rgba(255,255,255,0.95); text-decoration: none; font-weight: 600; font-size: 13px; }
.footer-right a:hover, .footer-right a:focus { text-decoration: none; opacity: 0.95; }
.footer-sep { color: rgba(255, 255, 255, 0.3); }
@media (max-width: 720px) {
  .footer-inner { flex-direction: column; gap: 10px; text-align: center; padding: 0 20px; }
  .footer-right { justify-content: center; }
}
.navbar-brand .fw-semibold { color: var(--color-primary) !important; }

/* Accessibility & print */
@media print {
  body { background: #fff; color:#000; }
  .card { box-shadow:none; border:1px solid #ddd; }
  .social-row, .steps-top { display:none; }
}

/* small helpers */
.hidden { display:none !important; }
.raise-above { z-index: calc(var(--z-panel) + 30) !important; }

/* =========================
   OTP SPECIFIC (jobseeker)
   Stable, single-line 6-digit layout + mobile stacked buttons
   Centralized content
   ========================= */

/* Slightly smaller card variant used by your jobseeker HTML */
.otp-modal-card { padding: 22px; border-radius: 14px; max-width:520px; margin:0 auto; box-shadow: 0 20px 40px rgba(2,6,23,0.12); text-align: center; }

/* ensure card-body centered text */
.otp-modal-card .card-body { text-align: center; }

/* central email hint */
.email-hint { color: var(--text-secondary); font-weight:600; font-size:14px; margin-bottom:6px; }

/* OTP input group - keep 6 fields on one line (no wrap) */
.otp-input-group {
  display:flex;
  gap: 10px;
  justify-content:center;
  margin: 1.2rem 0;
  flex-wrap: nowrap;            /* enforce single horizontal row */
  overflow: hidden;             /* prefer fit, allow horizontal scroll only as last-resort */
  -webkit-overflow-scrolling: touch;
  padding-inline: 6px;
}

/* Responsive sizing using calc so 6 inputs fit horizontally; reduced height for slimmer boxes */
.otp-field {
  flex: 0 0 calc((100% - 50px) / 6);  /* subtract gap space (5 gaps * 10px = 50px) */
  width: calc((100% - 50px) / 6);
  max-width: 64px;
  min-width: 34px;
  /* reduced height */
  height: clamp(36px, 5.5vw, 46px);
  text-align: center;
  font-size: clamp(1.0rem, 3.2vw, 1.25rem);
  font-weight: 700;
  border:2px solid rgba(15,23,36,0.08);
  border-radius:8px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  -moz-appearance: textfield;
  appearance: none;
  caret-color: var(--color-primary);
  background: #fff;
  outline: none;
  box-sizing: border-box;
  padding: 4px;
}

/* hide native number spinners if used */
.otp-field::-webkit-outer-spin-button,
.otp-field::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.otp-field:focus {
  border-color: var(--color-primary);
  box-shadow: 0 6px 20px rgba(30,58,138,0.08);
  transform: translateY(-2px);
  outline: none;
}
.otp-field:hover { transform: translateY(-1px); }
.otp-field:focus-visible { outline: 3px solid rgba(30,58,138,0.12); outline-offset: 3px; }

/* expire/resend block centered
   Resend link placed under the "Code expires in" line by default as requested.
*/
.expiry-resend {
  margin-bottom: 8px;
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:center;
  flex-direction: column; /* stack: expires on top, resend link below */
  flex-wrap:nowrap;
}
.expire-text { color: var(--text-secondary); font-weight:600; font-size:14px; text-align:center; }
/* countdown uses faint dark color (text-tertiary) not red */
#countdown {
  font-weight:600;
  color: var(--text-tertiary);
  margin-left:0;
  display:inline-block;
}

/* resend link (ordinary anchor) — initial faint color, stronger on hover */
.resend-wrap { display:inline-block; margin-top:6px; }
.resend-link {
  color: var(--text-tertiary); /* faint initial color */
  text-decoration: none;
  font-weight:600;
  cursor: pointer;
  font-size: 0.95rem;
  transition: color 160ms ease, opacity 140ms ease;
  opacity: 0.95;
}
.resend-link:hover,
.resend-link:focus {
  color: var(--color-primary-600); /* stronger on hover */
  text-decoration: none;
  opacity: 1;
}

/* central error block */
.error-text { display:block; min-height:20px; margin-top:8px; font-size:13px; color: var(--danger); line-height:1.2; word-break:break-word; white-space:normal; text-align:center; }

/* Button row default (desktop): side-by-side */
.form-actions {
  display:flex;
  gap:12px;
  justify-content:center;
  align-items:center;
  margin-bottom:10px;
}

/* Desktop: set reasonable fixed widths for buttons */
.form-actions .btn { min-width: 130px; }

/* Mobile behavior:
   - Stack buttons vertically
   - Make Verify & Continue appear above Back
   - Make buttons full-width and large tap targets
*/
@media (max-width:420px) {
  /* Make the OTP input group slightly denser on small screens */
  .otp-input-group { gap: 8px; padding-inline: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .otp-field {
    flex: 0 0 calc((100% - 40px) / 6);  /* 5 gaps * 8px = 40px */
    width: calc((100% - 40px) / 6);
    min-width: 30px;
    max-width: 52px;
    /* mobile reduced height */
    height: clamp(34px, 7.5vw, 42px);
    font-size: 1.1rem;
  }

  .form-actions {
    flex-direction: column;        /* vertical stack */
    align-items: stretch;          /* full width buttons */
    gap: 10px;
    margin-bottom: 12px;
  }

  /* Make buttons full width (large tap targets) */
  .form-actions .btn {
    width: 100%;
    display:block;
    padding: 12px 14px;
    border-radius: 12px;
    box-sizing: border-box;
  }

  /* Move Verify (primary) visually above Back using order */
  .form-actions .btn.btn-primary { order: -1; }

  .tiny { margin-top: 12px; }
}

/* Tablets and up: standard horizontal layout, slightly larger otp boxes */
@media (min-width:720px) {
  .otp-modal-card { padding: 28px; }
  .otp-input-group { gap: 14px; }
  .otp-field { flex: 0 0 50px; width:50px; height:50px; font-size: 1.25rem; }
  .form-actions .btn { min-width: 140px; }
}

/* Desktop polish */
@media (min-width:980px) {
  .signup-container { max-width:760px; padding:28px; }
  .otp-modal-card { max-width:480px; padding:32px; }
  .otp-field { max-width:56px; height:56px; font-size:1.35rem; }
}

/* Accessibility helpers and final polish */
.btn:focus-visible { outline: 3px solid rgba(30,58,138,0.12); outline-offset: 2px; border-radius: 10px; }
.otp-field.input-error { border-color: var(--danger) !important; box-shadow: 0 6px 18px rgba(220,38,38,0.06); }
.verify-state {
  display: grid;
  place-items: center;
  text-align: center;
  gap: .9rem;
  padding: 1.4rem 0;
}

.verify-icon {
  font-size: 3rem;
}

.verify-icon.success {
  color: #059669;
}

.verify-icon.error {
  color: #dc2626;
}
/* =========================================================
   JOBSEEKER SIGNUP — MOBILE DROPDOWN + FOOTER WIDTH FIX
   Safe CSS only. Keeps API field names and JS IDs unchanged.
   ========================================================= */

/* Body padding was preventing footer from stretching full width */
html,
body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  padding: 0 !important;
  background: linear-gradient(180deg, var(--color-bg) 0%, #ffffff 100%);
}

.navbar-brand {
  width: fit-content;
  margin: 24px auto 0;
}

.page-wrap {
  width: 100%;
  padding: 24px 16px 32px !important;
  min-height: auto !important;
}

.signup-section,
.signup-form-wrap {
  width: 100%;
}

.signup-container {
  width: 100% !important;
  max-width: 980px !important;
  padding: 0 !important;
}

.card {
  width: 100%;
  max-width: 960px !important;
  margin: 0 auto;
  overflow: visible !important;
}

/* Fix location input icon overlay */
.input-wrap:has(.location-dropdown) .input-icon {
  z-index: 2;
}

.location-dropdown {
  width: 100%;
  min-width: 0 !important;
  padding-left: calc(var(--input-icon-left) + 28px) !important;
}

.location-dropdown .cd-toggle {
  min-width: 0;
}

.country-dropdown .cd-value,
.location-dropdown .cd-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-dropdown .cd-caret,
.country-dropdown .caret {
  margin-left: auto;
  flex: 0 0 auto;
}

/* Better tap target for dropdown items */
.cd-list .cd-item {
  min-height: 42px;
  user-select: none;
}

.cd-list .cd-item[hidden] {
  display: none !important;
}

/* Region text fallback must align like dropdown */
#locationRegionText {
  width: 100%;
  display: block;
}

/* Footer full width */
.footer-bottom {
  width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  left: 0;
  right: 0;
}

/* Mobile dropdown behavior */
@media (max-width: 640px) {
  .page-wrap {
    padding: 18px 12px 28px !important;
  }

  .navbar-brand {
    margin-top: 18px;
  }

  .card {
    padding: 16px !important;
    border-radius: 16px !important;
  }

  .two-cols {
    gap: 10px;
  }

  .phone-wrap {
    display: grid !important;
    grid-template-columns: minmax(116px, 0.42fr) minmax(0, 1fr);
    gap: 8px;
  }

  .country-dropdown {
    height: 48px;
    min-width: 0 !important;
    width: 100%;
    border-radius: 12px;
  }

  .location-dropdown {
    padding-left: calc(var(--input-icon-left) + 28px) !important;
  }

  .cd-panel {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    top: calc(100% + 8px) !important;
    padding: 8px !important;
    border-radius: 14px !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12) !important;
  }

  .country-dropdown:not(.location-dropdown) .cd-panel {
    width: min(360px, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px) !important;
  }

  .cd-search {
    height: 44px !important;
    border-radius: 11px !important;
    font-size: 15px;
  }

  .cd-list {
    max-height: min(42vh, 320px) !important;
  }

  .cd-list .cd-item {
    min-height: 46px;
    padding: 10px 8px !important;
    border-radius: 10px;
    font-size: 14px;
  }

  .cd-list .cd-item .flag {
    width: 26px;
    flex-basis: 26px;
  }

  .cd-list .cd-item .label {
    max-width: 100%;
  }

  .footer-inner {
    width: 100%;
    max-width: 1180px;
    margin-inline: auto;
  }
}

@media (max-width: 420px) {
  .page-wrap {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .card {
    padding: 14px !important;
  }

  .phone-wrap {
    grid-template-columns: 1fr;
  }

  .country-dropdown:not(.location-dropdown) {
    width: 100%;
  }

  .country-dropdown:not(.location-dropdown) .cd-panel {
    width: 100% !important;
    max-width: 100% !important;
  }

  .steps-inline {
    gap: 8px;
  }

  .steps-inline li {
    text-align: left;
  }
}
/* =========================================================
   SIGNUP LOCATION/COUNTRY DROPDOWN FINAL POLISH
   Mobile-safe and API-safe.
   ========================================================= */

/* Let selected country text show properly with flag + name */
.country-dropdown .cd-value,
.location-dropdown .cd-value {
  display: inline-block;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Phone dropdown can be a little wider because it now shows country name + code */
.phone-wrap .country-dropdown:not(.location-dropdown) {
  min-width: 172px;
}

/* Better list item structure */
.cd-list .cd-item {
  display: grid !important;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
}

.cd-list .cd-item .flag {
  width: 30px;
  min-width: 30px;
  text-align: center;
  font-size: 1.05rem;
}

.cd-list .cd-item .label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cd-list .cd-item .code {
  color: var(--text-secondary);
  font-weight: 700;
  white-space: nowrap;
}

/* Location country/state dropdown does not always have code column */
.location-dropdown .cd-list .cd-item {
  grid-template-columns: 30px minmax(0, 1fr);
}

/* Hide empty flag space for state/province list */
#locationRegionDropdown .cd-list .cd-item .flag:empty {
  display: none;
}

#locationRegionDropdown .cd-list .cd-item {
  grid-template-columns: minmax(0, 1fr);
}

/* Mobile: make country/state fields clean and prevent icon overlap */
@media (max-width: 640px) {
  .phone-wrap {
    grid-template-columns: 1fr !important;
  }

  .phone-wrap .country-dropdown:not(.location-dropdown) {
    min-width: 0;
    width: 100%;
  }

  .phone-wrap .phone-input {
    width: 100%;
  }

  /*
    Mobile location fields:
    hide the left icon so the selected flag/name has enough room.
  */
  .input-wrap:has(.location-dropdown) .input-icon,
  #regionContainerWrap .input-icon {
    display: none !important;
  }

  .location-dropdown {
    padding-left: 12px !important;
  }

  #locationRegionText {
    padding-left: 12px !important;
  }

  .location-dropdown .cd-toggle {
    min-height: 46px;
  }

  .country-dropdown .cd-value,
  .location-dropdown .cd-value {
    font-size: 0.95rem;
  }

  .cd-panel {
    z-index: 10060 !important;
  }

  .cd-list .cd-item {
    min-height: 48px;
  }
}

@media (min-width: 641px) {
  /*
    Desktop can keep the icon. Mobile hides it only.
  */
  .input-wrap:has(.location-dropdown) .input-icon {
    display: inline-flex;
  }
}
/* Real flag icon support for signup dropdowns */
.flag-real {
  width: 24px;
  height: 18px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
  flex: 0 0 24px;
}

.flag-fallback {
  width: 24px;
  height: 18px;
  display: inline-block;
  border-radius: 3px;
  background: rgba(15, 23, 42, 0.08);
  flex: 0 0 24px;
}

.country-dropdown .cd-value {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.country-dropdown .selected-country-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-dropdown .selected-country-code {
  flex: 0 0 auto;
  font-weight: 800;
  color: var(--text-secondary);
}

.cd-list .cd-item {
  display: grid !important;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
}

.cd-list .cd-item .label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cd-list .cd-item .code {
  font-weight: 800;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* Location dropdown has no calling code column */
.location-dropdown .cd-list .cd-item {
  grid-template-columns: 28px minmax(0, 1fr);
}

@media (max-width: 640px) {
  .phone-wrap .country-dropdown:not(.location-dropdown) {
    min-width: 0;
    width: 100%;
  }

  .country-dropdown .cd-value {
    width: 100%;
  }
}
/* Location dropdown selected flag/name display */
.location-dropdown .cd-value {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.location-dropdown .selected-country-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-dropdown .flag-empty {
  width: 0;
  height: 0;
  display: none;
}

/* Region/state list should not leave empty flag space */
#locationRegionDropdown .cd-list .cd-item {
  grid-template-columns: minmax(0, 1fr) !important;
}

#locationRegionDropdown .cd-list .cd-item .flag-empty,
#locationRegionDropdown .cd-list .cd-item .flag,
#locationRegionDropdown .cd-list .cd-item .flag-real,
#locationRegionDropdown .cd-list .cd-item .flag-fallback {
  display: none !important;
}
/* =========================================================
   GOOGLE AUTH BUTTON SLOT
   ========================================================= */

.google-auth-row {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 8px 0 12px;
}

.google-auth-slot {
  min-height: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.google-auth-slot > div {
  max-width: 100%;
}
.google-auth-loading {
  min-height: 44px;
  min-width: 260px;
  padding: 10px 14px;
  border: 1px solid rgba(15, 23, 36, 0.08);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text-primary);
  background: #fff;
}

.google-auth-loading .social-icon {
  width: 20px;
  height: 20px;
}