/* ═══════════════════════════════════════════
   LEX EXCHANGE — FRONTEND CSS v3.0
   Matches UI v4 design system exactly
═══════════════════════════════════════════ */

:root {
  --Y: #FFDD21;
  --Y2: #FFE84A;
  --Yd: #7A5C00;
  --Yb: #FFFBE6;
  --B: #026DB6;
  --B2: #0180D5;
  --Bd: #014E82;
  --Bb: #E8F4FC;
  --B3: #C8E6FA;
  --R: #DC2626;
  --Rb: #FEF2F2;
  --Gn: #16A34A;
  --Gnb: #F0FDF4;
  --Or: #EA580C;
  --D: #1A1D23;
  --D2: #2D3340;
  --W: #FFFFFF;
  --G: #F5F7FA;
  --G2: #ECEEF3;
  --Br: #DDE2EC;
  --M: #6B7280;
  --Ls: #9CA3AF;
  --r: 10px;
  --rl: 16px;
  --rx: 22px;
  --sh: 0 1px 3px rgba(0, 0, 0, .06), 0 4px 16px rgba(0, 0, 0, .08);
  --shb: 0 8px 32px rgba(0, 0, 0, .10), 0 24px 60px rgba(0, 0, 0, .08);
  --shY: 0 4px 20px rgba(255, 221, 33, .35);
  --shB: 0 4px 20px rgba(2, 109, 182, .25);
  --ff: 'Sora', 'Segoe UI', sans-serif;
  --fm: 'JetBrains Mono', 'Courier New', monospace;
}

/* ── Reset ── */
.lex-spa *,
.lex-spa *::before,
.lex-spa *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.lex-spa {
  font-family: var(--ff);
  font-size: 14px;
  line-height: 1.5;
  color: var(--D);
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shb);
  border: 1px solid var(--Br);
  overflow: hidden;
}

/* ── Header ── */
.lex-header {
  background: linear-gradient(135deg, var(--Bd) 0%, var(--B) 60%, #0591D8 100%);
  padding: 0 16px;
  height: 60px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.lex-header::before {
  content: '';
  position: absolute;
  right: -30px;
  top: -30px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(255, 221, 33, .08);
}

.lex-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lex-mark {
  width: 34px;
  height: 34px;
  background: var(--Y);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  color: var(--D);
  flex-shrink: 0;
  box-shadow: var(--shY);
}

.lex-brand-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--W);
  letter-spacing: -.3px;
}

.lex-brand-name em {
  color: var(--Y);
  font-style: normal;
}

.lex-header-center {
  text-align: center;
}

.lex-header-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--W);
  letter-spacing: -.2px;
  white-space: nowrap;
}

.lex-header-title span {
  color: var(--Y);
}

.lex-header-right {
  display: flex;
  justify-content: flex-end;
}

.lex-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  color: rgba(255, 255, 255, .8);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}

.lex-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ADE80;
  animation: lex-pulse 2s infinite;
}

@keyframes lex-pulse {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: .3
  }
}

/* ── Loading ── */
.lex-loading {
  padding: 60px 24px;
  text-align: center;
  color: var(--M);
}

.lex-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--Br);
  border-top-color: var(--B);
  border-radius: 50%;
  animation: lex-spin .7s linear infinite;
  margin: 0 auto 14px;
}

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

/* ── Sections ── */
.lex-section {
  animation: lex-fade .22s ease;
}

@keyframes lex-fade {
  from {
    opacity: 0;
    transform: translateY(8px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

/* ── Rate Table View ── */
.lex-rt-view {
  padding: 0;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  box-sizing: border-box;
}

.lex-rt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.lex-rt-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lex-rt-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--D);
  letter-spacing: -.3px;
}

.lex-rt-title span {
  color: var(--B);
}

.lex-live-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--Gnb);
  border: 1px solid #BBF7D0;
  color: var(--Gn);
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}

.lex-live-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--Gn);
  animation: lex-pulse 2s infinite;
}

.lex-search {
  padding: 7px 12px;
  border: 1.5px solid var(--Br);
  border-radius: 8px;
  font-family: var(--ff);
  font-size: 12.5px;
  color: var(--D);
  background: var(--G);
  outline: none;
  transition: border .13s;
  width: 180px;
}

.lex-search:focus {
  border-color: var(--B);
  background: var(--W);
}

.lex-search::placeholder {
  color: var(--Ls);
}

/* ── Rate Table ── */
.lex-table-wrap {
  border: 1px solid var(--Br);
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}

.lex-rate-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.lex-rate-table thead tr {
  background: var(--Bd);
}

.lex-rate-table thead th {
  padding: 8px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: rgba(255, 255, 255, .85);
  white-space: nowrap;
  vertical-align: middle;
  text-align: left;
}

.lex-th-ccy {
  padding: 8px 8px 8px 12px !important;
}

.lex-th-name {
  padding: 8px 8px !important;
}

.lex-th-buy {
  padding: 8px 12px !important;
  text-align: center !important;
}

.lex-th-sell {
  padding: 8px 12px !important;
  text-align: center !important;
}

.lex-th-action {
  padding: 8px 8px !important;
  text-align: center !important;
}

.lex-th-logo {
  width: 180px;
  padding: 0 !important;
  vertical-align: middle;
}

.lex-th-logo-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, .15);
}

.lex-th-mark {
  width: 30px;
  height: 30px;
  background: var(--Y);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
  color: var(--D);
  flex-shrink: 0;
}

.lex-th-brand {
  font-size: 12px;
  font-weight: 800;
  color: var(--W);
  line-height: 1.2;
}

.lex-th-brand strong {
  color: var(--Y);
}

.lex-th-brand small {
  display: block;
  font-size: 9px;
  font-weight: 500;
  color: rgba(255, 255, 255, .5);
  letter-spacing: .3px;
}

.lex-th-buy {
  padding: 10px 16px !important;
  text-align: right;
  color: var(--W) !important;
}

.lex-th-sell {
  padding: 10px 16px !important;
  text-align: right;
  color: var(--W) !important;
}

.lex-th-ccy {
  width: 80px;
  min-width: 80px;
}

.lex-th-buy {
  width: 90px;
  min-width: 90px;
}

.lex-th-sell {
  width: 90px;
  min-width: 90px;
}

.lex-th-action {
  padding: 12px 8px !important;
  text-align: center !important;
  width: 90px;
  min-width: 90px;
  max-width: 90px;
}

.lex-rate-table tbody tr {
  border-bottom: 1px solid var(--G2);
  transition: background .12s;
}

.lex-rate-table tbody tr:last-child {
  border-bottom: none;
}

.lex-rate-table tbody tr:nth-child(even) {
  background: var(--G);
}

.lex-rate-table tbody tr:hover {
  background: var(--Bb);
}

.lex-rate-table tbody td {
  padding: 2px 5px;
  vertical-align: middle;
  font-size: 14px;
}

.lex-rate-table tbody td:nth-child(3),
.lex-rate-table tbody td:nth-child(4) {
  text-align: right;
}

.lex-cc-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lex-cc-flag {
  font-size: 22px;
}

.lex-cc-code {
  font-size: 13px;
  font-weight: 700;
  color: var(--D);
  display: block;
}

.lex-cc-name {
  font-size: 11px;
  color: var(--M);
}

.lex-rate-buy {
  font-family: var(--fm);
  font-size: 14px;
  font-weight: 600;
  color: var(--D);
  background: none;
  padding: 0;
  border-radius: 0;
  border: none;
  display: inline-block;
}

.lex-rate-sell {
  font-family: var(--fm);
  font-size: 14px;
  font-weight: 600;
  color: var(--D);
  background: none;
  padding: 0;
  border-radius: 0;
  border: none;
  display: inline-block;
}

.lex-rate-unavail {
  font-size: 11px;
  font-weight: 700;
  color: var(--M);
  background: var(--G2);
  padding: 3px 10px;
  border-radius: 6px;
  display: inline-block;
}

.lex-book-btn {
  background: linear-gradient(135deg, var(--Y) 0%, var(--Y2) 100%);
  color: var(--D);
  border: none;
  padding: 5px !important;
  border-radius: 7px;
  font-family: var(--ff);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all .14s;
  white-space: nowrap;
  box-shadow: var(--shY);
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.lex-book-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 221, 33, .4);
  color: var(--B);
}

.lex-book-btn:disabled {
  background: var(--G2);
  color: var(--M);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* ── Table Footer / Pagination ── */
.lex-table-footer {
  background: linear-gradient(135deg, var(--Yb) 0%, var(--Bb) 100%);
  border-top: 1.5px solid var(--Br);
  padding: 8px 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.lex-footer-note {
  font-size: 11px;
  color: var(--Yd, #7A5C00);
}

.lex-pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lex-pg-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1.5px solid var(--Br);
  background: var(--W);
  color: var(--M);
  font-family: var(--ff);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .12s;
}

.lex-pg-btn:hover {
  border-color: var(--B);
  color: var(--B);
}

.lex-pg-btn.on {
  background: var(--Bd);
  border-color: var(--Bd);
  color: var(--Y);
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(1, 78, 130, .35);
}

.lex-pg-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

/* ── Booking Form ── */
.lex-fv-top {
  background: linear-gradient(135deg, var(--Bd) 0%, var(--B) 100%);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.lex-back-btn {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  color: var(--W);
  font-family: var(--ff);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .13s;
  white-space: nowrap;
  flex-shrink: 0;
}

.lex-back-btn:hover {
  background: rgba(255, 255, 255, .22);
}

.lex-fv-info {
  flex: 1;
}

.lex-fv-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--W);
  letter-spacing: -.3px;
}

.lex-fv-sub {
  font-size: 11.5px;
  color: rgba(255, 255, 255, .55);
  margin-top: 2px;
}

/* ── Steps ── */
.lex-steps-track {
  background: var(--G);
  border-bottom: 1px solid var(--Br);
  padding: 0 24px;
  overflow-x: auto;
}

.lex-steps-track::-webkit-scrollbar {
  display: none;
}

.lex-steps-inner {
  display: flex;
  align-items: center;
  height: 50px;
  min-width: max-content;
}

.lex-step {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.lex-step-n {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--G2);
  color: var(--M);
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .25s;
  flex-shrink: 0;
  border: 2px solid transparent;
}

.lex-step.done .lex-step-n {
  background: var(--B);
  color: var(--W);
  border-color: var(--B);
}

.lex-step.curr .lex-step-n {
  background: var(--Y);
  color: var(--D);
  border-color: var(--Yd, #7A5C00);
  box-shadow: var(--shY);
}

.lex-step-lbl {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--M);
  transition: color .2s;
}

.lex-step.done .lex-step-lbl {
  color: var(--B);
}

.lex-step.curr .lex-step-lbl {
  color: var(--D);
  font-weight: 700;
}

.lex-step-conn {
  width: 28px;
  height: 2px;
  background: var(--Br);
  margin: 0 4px;
  flex-shrink: 0;
  border-radius: 2px;
  transition: background .25s;
}

.lex-step-conn.done {
  background: var(--B);
}

/* ── Form Body ── */
.lex-fbody {
  padding: 24px;
  overflow-y: auto;
  max-height: 520px;
}

.lex-fbody::-webkit-scrollbar {
  width: 3px;
}

.lex-fbody::-webkit-scrollbar-thumb {
  background: var(--Br);
  border-radius: 3px;
}

.lex-fs {
  margin-bottom: 24px;
}

.lex-fs:last-child {
  margin-bottom: 0;
}

.lex-fs-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--M);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.lex-fs-label::before {
  content: '';
  width: 3px;
  height: 14px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--Y) 0%, var(--B) 100%);
  flex-shrink: 0;
}

.lex-fs-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--G2);
}

.lex-fg {
  margin-bottom: 0;
}

/* .lex-fg+.lex-fg {
  margin-top: 12px;
} */

.lex-fg+.lex-fg {
  margin-top: 12px;
}

.lex-frow .lex-fg+.lex-fg {
  margin-top: 0;
}


.lex-fg label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--D);
  margin-bottom: 6px;
}

.lex-req {
  color: var(--R);
}

.lex-fg input,
.lex-fg select,
.lex-fg textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--Br);
  border-radius: 9px;
  font-family: var(--ff);
  font-size: 13px;
  color: var(--D);
  background: var(--W);
  outline: none;
  transition: border .13s, box-shadow .13s;
  -webkit-appearance: none;
}

.lex-fg input:focus,
.lex-fg select:focus,
.lex-fg textarea:focus {
  border-color: var(--B);
  box-shadow: 0 0 0 3px rgba(2, 109, 182, .1);
}

.lex-fg input::placeholder {
  color: #CBD5E1;
}

.lex-fg textarea {
  resize: none;
  min-height: 76px;
}

.lex-fg select {
  cursor: pointer;
}

.lex-field-hint {
  font-size: 11px;
  color: var(--M);
  margin-top: 5px;
}

.lex-frow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.lex-faddon {
  display: flex;
  border: 1.5px solid var(--Br);
  border-radius: 9px;
  overflow: hidden;
  transition: border .13s, box-shadow .13s;
}

.lex-faddon:focus-within {
  border-color: var(--B);
  box-shadow: 0 0 0 3px rgba(2, 109, 182, .1);
}

.lex-fpre {
  background: var(--G);
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--M);
  border-right: 1.5px solid var(--Br);
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  font-family: var(--fm);
}

.lex-faddon input {
  border: none;
  border-radius: 0;
  flex: 1;
  box-shadow: none !important;
}

/* ── Step 1: Type cards ── */
.lex-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.lex-type-card {
  border: 2px solid var(--Br);
  border-radius: var(--rl);
  padding: 18px 16px;
  cursor: pointer;
  transition: all .18s;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.lex-type-card:hover {
  border-color: var(--B2);
  transform: translateY(-2px);
  box-shadow: var(--sh);
}

.lex-type-card.on.buy-card {
  border-color: var(--Y);
  background: var(--Yb);
}

.lex-type-card.on.sell-card {
  border-color: var(--B);
  background: var(--Bb);
}

.lex-type-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.lex-type-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--D);
  margin-bottom: 4px;
}

.lex-type-desc {
  font-size: 11.5px;
  color: var(--M);
  line-height: 1.5;
}

.lex-type-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.lex-type-card.on .lex-type-check {
  display: flex;
}

.buy-card.on .lex-type-check {
  background: var(--Y);
  color: var(--D);
}

.sell-card.on .lex-type-check {
  background: var(--B);
  color: var(--W);
}

/* ── Step 2: Purpose chips ── */
.lex-purpose-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.lex-pur-chip {
  border: 1.5px solid var(--Br);
  border-radius: var(--r);
  padding: 13px 10px;
  cursor: pointer;
  text-align: center;
  transition: all .14s;
}

.lex-pur-chip:hover {
  border-color: var(--B);
  background: var(--Bb);
}

.lex-pur-chip.on {
  border-color: var(--B);
  background: var(--B);
}

.lex-pur-icon {
  font-size: 20px;
  display: block;
  margin-bottom: 5px;
}

.lex-pur-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--D);
  transition: color .14s;
}

.lex-pur-chip.on .lex-pur-name {
  color: var(--W);
}

/* ── Step 3: Calculator ── */
.lex-calc-section {
  background: linear-gradient(135deg, var(--Bd) 0%, var(--B) 100%);
  border-radius: var(--rl);
  padding: 16px;
  margin-top: 12px;
}

.lex-calc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lex-calc-side {
  flex: 1;
}

.lex-calc-label {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: rgba(255, 255, 255, .45);
  margin-bottom: 4px;
}

.lex-calc-value {
  font-family: var(--fm);
  font-size: 22px;
  font-weight: 600;
  color: var(--Y);
}

.lex-calc-arrow {
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, .12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, .5);
  font-size: 14px;
  flex-shrink: 0;
}

.lex-calc-rate {
  margin-top: 10px;
  background: rgba(255, 255, 255, .08);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, .6);
  font-family: var(--fm);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lex-calc-rate strong {
  color: rgba(255, 255, 255, .9);
}

.lex-limit-warn {
  margin-top: 10px;
  background: var(--Rb);
  border: 1px solid #FCA5A5;
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 12px;
  color: var(--R);
  display: none;
}

.lex-limit-warn.show {
  display: block;
}

/* ── Step 5: T&C ── */
.lex-tc-box {
  background: var(--G);
  border: 1.5px solid var(--Br);
  border-radius: var(--r);
  padding: 16px;
  max-height: 180px;
  overflow-y: auto;
  font-size: 12px;
  color: var(--M);
  line-height: 1.8;
  margin-bottom: 14px;
}

.lex-tc-accept {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--Yb);
  border: 1.5px solid var(--Y);
  border-radius: var(--r);
  padding: 13px 14px;
  cursor: pointer;
  user-select: none;
}

.lex-tc-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid var(--Yd, #7A5C00);
  border-radius: 4px;
  background: var(--W);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all .13s;
}

.lex-tc-checkbox.on {
  background: var(--B);
  border-color: var(--B);
}

.lex-tc-checkbox.on::after {
  content: '✓';
  font-size: 11px;
  color: var(--W);
  font-weight: 800;
}

.lex-tc-text {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--Yd, #7A5C00);
  line-height: 1.6;
}

/* ── Step 6: Preview ── */
.lex-preview-card {
  background: linear-gradient(135deg, var(--Yb) 0%, var(--Bb) 100%);
  border: 1.5px solid var(--Br);
  border-radius: var(--rl);
  overflow: hidden;
}

.lex-preview-head {
  background: linear-gradient(135deg, var(--B) 0%, var(--B2) 100%);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lex-preview-head-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--W);
}

.lex-preview-ref {
  font-family: var(--fm);
  font-size: 13px;
  font-weight: 600;
  color: var(--Y);
  background: rgba(0, 0, 0, .2);
  padding: 3px 10px;
  border-radius: 6px;
}

.lex-preview-body {
  padding: 18px;
}

.lex-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--Br);
  border: 1px solid var(--Br);
  border-radius: 10px;
  overflow: hidden;
}

.lex-pv-cell {
  background: var(--W);
  padding: 12px 14px;
}

.lex-pv-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--M);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 4px;
}

.lex-pv-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--D);
}

.lex-pv-val.accent {
  color: var(--B);
  font-family: var(--fm);
  font-size: 15px;
}

.lex-pv-val.yellow {
  color: var(--Yd, #7A5C00);
  font-family: var(--fm);
  font-size: 15px;
}

.lex-type-buy {
  color: var(--Gn);
  font-weight: 700;
}

.lex-type-sell {
  color: var(--R);
  font-weight: 700;
}

/* ── Notices ── */
.lex-notice {
  padding: 12px 14px;
  border-radius: 9px;
  font-size: 12px;
  display: flex;
  gap: 10px;
  line-height: 1.65;
  margin-bottom: 14px;
}

.lex-notice-icon {
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}

.lex-notice-y {
  background: var(--Yb);
  border-left: 3px solid var(--Y);
  color: var(--Yd, #7A5C00);
}

.lex-notice-b {
  background: var(--Bb);
  border-left: 3px solid var(--B);
  color: #034E82;
}

.lex-notice-r {
  background: var(--Rb);
  border-left: 3px solid var(--R);
  color: #8B0000;
}

/* ── Action Bar ── */
.lex-act-bar {
  padding: 14px 24px;
  background: var(--W);
  border-top: 1.5px solid var(--G2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lex-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 10px;
  font-family: var(--ff);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all .14s;
  white-space: nowrap;
}

.lex-btn-y {
  background: linear-gradient(135deg, var(--Y) 0%, var(--Y2) 100%);
  color: var(--D);
  box-shadow: var(--shY);
}

.lex-btn-y:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(255, 221, 33, .45);
  color: var(--Bd);
  transform: scale(1.1);
}

.lex-btn-b {
  background: linear-gradient(135deg, var(--Bd) 0%, var(--B) 100%);
  color: var(--W);
  box-shadow: var(--shB);
}

.lex-btn-b:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(2, 109, 182, .4);
}

.lex-btn-b:disabled {
  opacity: .4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.lex-btn-g {
  background: transparent;
  color: var(--M);
  border: 1.5px solid var(--Br);
}

.lex-btn-g:hover {
  border-color: var(--D);
  color: var(--D);
}

.lex-btn-lg {
  padding: 12px 26px;
  font-size: 14px;
  border-radius: 11px;
}

/* ── Success Screen ── */
.lex-success-body {
  padding: 48px 24px;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.lex-success-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--Y) 0%, var(--Y2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin: 0 auto 20px;
  animation: lex-pop .45s cubic-bezier(.22, .68, 0, 1.4);
  box-shadow: var(--shY);
}

@keyframes lex-pop {
  from {
    opacity: 0;
    transform: scale(.3)
  }

  to {
    opacity: 1;
    transform: scale(1)
  }
}

.lex-success-body h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--D);
  margin-bottom: 8px;
  letter-spacing: -.4px;
}

.lex-success-body>p {
  font-size: 13px;
  color: var(--M);
  line-height: 1.75;
  margin-bottom: 24px;
}

.lex-ref-box {
  background: var(--G);
  border: 1.5px solid var(--Br);
  border-radius: var(--rx);
  padding: 20px 24px;
  margin: 0 auto 20px;
  display: inline-block;
  min-width: 260px;
}

.lex-ref-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--M);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 6px;
}

.lex-ref-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--D);
  font-family: var(--fm);
  letter-spacing: 2px;
}

.lex-ref-sub {
  font-size: 11.5px;
  color: var(--M);
  margin-top: 4px;
}

.lex-next-steps {
  background: var(--Bb);
  border: 1px solid var(--B3);
  border-radius: var(--r);
  padding: 16px 18px;
  text-align: left;
  margin-bottom: 20px;
}

.lex-next-steps h4 {
  font-size: 10px;
  font-weight: 800;
  color: var(--B);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 12px;
}

.lex-ns {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  color: var(--D);
  margin-bottom: 9px;
  line-height: 1.55;
}

.lex-ns:last-child {
  margin-bottom: 0;
}

.lex-ns-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--B);
  color: var(--W);
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Tracking ── */
.lex-track-view {
  padding: 32px 24px;
}

.lex-track-intro {
  text-align: center;
  margin-bottom: 28px;
}

.lex-track-intro h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--D);
  margin-bottom: 6px;
  letter-spacing: -.4px;
}

.lex-track-intro p {
  font-size: 13px;
  color: var(--M);
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.7;
}

.lex-track-form {
  max-width: 500px;
  margin: 0 auto 28px;
  background: var(--G);
  border: 1.5px solid var(--Br);
  border-radius: var(--rx);
  padding: 24px;
}

.lex-track-form .lex-fg {
  margin-bottom: 14px;
}

.lex-track-form .lex-fg:last-child {
  margin-bottom: 0;
}

.lex-track-btn {
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  background: linear-gradient(135deg, var(--B) 0%, var(--B2) 100%);
  color: var(--W);
  border: none;
  border-radius: 10px;
  font-family: var(--ff);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shB);
  transition: all .14s;
}

.lex-track-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(2, 109, 182, .4);
}

.lex-track-result {
  max-width: 500px;
  margin: 0 auto;
  background: var(--W);
  border: 1.5px solid var(--Br);
  border-radius: var(--rx);
  overflow: hidden;
  box-shadow: var(--sh);
}

.lex-tr-head {
  background: linear-gradient(135deg, var(--B) 0%, var(--B2) 100%);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lex-tr-ref {
  font-family: var(--fm);
  font-size: 16px;
  font-weight: 700;
  color: var(--Y);
}

.lex-tr-date {
  font-size: 11px;
  color: rgba(255, 255, 255, .55);
}

.lex-tr-body {
  padding: 20px;
}

.lex-tr-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 12px 16px;
  border-radius: 10px;
}

.lex-tr-status.pending {
  background: var(--Yb);
  border: 1px solid var(--Y);
}

.lex-tr-status.processing {
  background: var(--Bb);
  border: 1px solid var(--B3);
}

.lex-tr-status.completed {
  background: var(--Gnb);
  border: 1px solid #BBF7D0;
}

.lex-tr-status.cancelled,
.lex-tr-status.fake_expired {
  background: var(--Rb);
  border: 1px solid #FECACA;
}

.lex-tr-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.lex-tr-status.pending .lex-tr-dot {
  background: var(--Y);
  animation: lex-pulse 2s infinite;
}

.lex-tr-status.processing .lex-tr-dot {
  background: var(--B);
  animation: lex-pulse 2s infinite;
}

.lex-tr-status.completed .lex-tr-dot {
  background: var(--Gn);
}

.lex-tr-status.cancelled .lex-tr-dot,
.lex-tr-status.fake_expired .lex-tr-dot {
  background: var(--R);
}

.lex-tr-status-text {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--D);
}

.lex-tr-hint {
  font-size: 11px;
  color: var(--M);
  margin-left: auto;
}

.lex-tr-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--G2);
  font-size: 13px;
}

.lex-tr-row:last-child {
  border-bottom: none;
}

.lex-tr-key {
  color: var(--M);
  font-weight: 500;
}

.lex-tr-val {
  font-weight: 700;
  color: var(--D);
}

/* ── Footer ── */
.lex-footer {
  background: linear-gradient(135deg, var(--G) 0%, var(--G2) 100%);
  border-top: 1px solid var(--Br);
  padding: 10px 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.lex-footer p {
  font-size: 11px;
  color: var(--M);
}

.lex-footer a {
  color: var(--B);
  text-decoration: none;
  font-weight: 600;
}

.lex-footer a:hover {
  text-decoration: underline;
}

/* ── Print / PDF ── */
@media print {
  body>*:not(#lex-print-area) {
    display: none !important;
  }

  #lex-print-area {
    display: block !important;
  }

  .lex-print-only {
    display: block;
  }
}

.lex-print-only {
  display: none;
}

/* ── Mobile ── */
@media (max-width:600px) {

  /* ── Rate Table Mobile — Single Row Compact (325px safe) ── */
  .lex-rt-view {
    padding: 8px;
  }

  .lex-table-wrap {
    border-radius: 8px;
  }

  .lex-rate-table thead {
    display: none;
  }

  .lex-rate-table,
  .lex-rate-table tbody {
    display: block;
    width: 100%;
  }

  /* Single row: [Flag+Code] [BUY] [SELL] [Book] */
  /* 305px usable: 68px + 72px + 72px + 58px + 3×gap(5px) = 285px ✓ */
  .lex-rate-table tbody tr {
    display: grid;
    grid-template-columns: 68px 1fr 1fr 58px;
    column-gap: 5px;
    padding: 8px 8px;
    border-bottom: 1px solid var(--G2);
    align-items: center;
    min-height: 48px;
  }

  .lex-rate-table tbody tr:last-child {
    border-bottom: none;
  }

  .lex-rate-table tbody td {
    display: block;
    padding: 0 !important;
    border: none;
  }

  /* Col 1: Flag + Code (no full name) */
  .lex-rate-table tbody td:nth-child(1) {
    grid-column: 1;
  }

  .lex-cc-wrap {
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .lex-cc-flag {
    font-size: 18px;
    flex-shrink: 0;
    line-height: 1;
  }

  .lex-cc-code {
    font-size: 12px;
    font-weight: 800;
    display: block;
    line-height: 1;
    color: var(--D);
  }

  .lex-cc-name {
    display: none;
  }

  .lex-td-name {
    display: none !important;
  }

  /* Col 2: Currency name — completely hidden */
  .lex-rate-table tbody td:nth-child(2) {
    display: none !important;
    width: 0;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Col 3: BUY */
  .lex-rate-table tbody td:nth-child(3) {
    grid-column: 2;
  }

  /* Col 4: SELL */
  .lex-rate-table tbody td:nth-child(4) {
    grid-column: 3;
  }

  /* Col 5: Book Now */
  .lex-rate-table tbody td:nth-child(5) {
    grid-column: 4;
  }

  /* thead grid — must be in outer @media to be valid */
  .lex-rate-table thead {
    display: block;
    width: 100%;
  }

  .lex-rate-table thead tr {
    display: grid;
    grid-template-columns: 72px 1fr 1fr 64px;
    column-gap: 5px;
    padding: 6px 6px;
    align-items: center;
  }

  .lex-rate-table thead th {
    display: block;
    font-size: 8px !important;
    padding: 0 4px !important;
    text-align: center !important;
    letter-spacing: .3px;
    color: rgba(255, 255, 255, .85) !important;
  }

  .lex-rate-table thead th:nth-child(1) {
    grid-column: 1;
    text-align: left !important;
  }

  .lex-rate-table thead th:nth-child(2) {
    display: none !important;
  }

  .lex-rate-table thead th:nth-child(3) {
    grid-column: 2;
  }

  .lex-rate-table thead th:nth-child(4) {
    grid-column: 3;
  }

  .lex-rate-table thead th:nth-child(5) {
    grid-column: 4;
  }

  .lex-rate-buy,

  .lex-rate-buy,
  .lex-rate-sell,
  .lex-rate-unavail {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    width: 100%;
    padding: 4px 4px;
    font-size: 11px;
    font-family: var(--fm);
    box-sizing: border-box;
    border-radius: 5px;
  }

  .lex-rate-buy::before {
    content: 'BUY';
    font-size: 7px;
    font-weight: 700;
    opacity: .55;
    letter-spacing: .5px;
    font-family: var(--ff);
  }

  .lex-rate-sell::before {
    content: 'SELL';
    font-size: 7px;
    font-weight: 700;
    opacity: .55;
    letter-spacing: .5px;
    font-family: var(--ff);
  }

  /* Col 4: Book Now */
  .lex-rate-table tbody td:nth-child(4) {
    grid-column: 4;
  }

  .lex-book-btn {
    width: 100%;
    padding: 7px 4px;
    font-size: 9px;
    font-weight: 800;
    text-align: center;
    white-space: normal;
    line-height: 1.25;
    border-radius: 6px;
  }

  .lex-frow {
    grid-template-columns: 1fr;
  }

  .lex-type-grid {
    grid-template-columns: 1fr;
  }

  .lex-purpose-grid {
    grid-template-columns: 1fr 1fr;
  }

  .lex-preview-grid {
    grid-template-columns: 1fr;
  }

  .lex-act-bar {
    flex-direction: column;
  }

  .lex-act-bar .lex-btn {
    width: 100%;
    justify-content: center;
  }

  .lex-step-lbl {
    display: none;
  }

  .lex-rt-view,
  .lex-track-view {
    padding: 14px 12px;
  }

  .lex-fbody {
    padding: 14px 12px;
    max-height: none;
  }

  .lex-header {
    height: 52px;
    padding: 0 10px;
  }

  .lex-mark {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .lex-brand-name {
    font-size: 13px;
  }

  /* ── Mobile ── */
  @media (max-width:600px) {

    .lex-rt-view {
      padding: 0;
    }

    .lex-table-wrap {
      border-radius: 0;
    }

    /* Hide thead on mobile */
    .lex-rate-table thead {
      display: block;
      width: 100%;
    }

    .lex-rate-table thead tr {
      display: grid;
      grid-template-columns: 72px 1fr 1fr 64px;
      column-gap: 5px;
      padding: 6px 6px;
      align-items: center;
    }

    .lex-rate-table thead th {
      display: block;
      font-size: 8px !important;
      padding: 0 4px !important;
      text-align: center !important;
      letter-spacing: .3px;
      vertical-align: middle;
      color: rgba(255, 255, 255, .85) !important;
    }

    /* Hide Currency column header on mobile */
    .lex-rate-table thead th:nth-child(2) {
      display: none !important;
    }

    /* CCY left aligned */
    .lex-rate-table thead th:nth-child(1) {
      text-align: left !important;
      grid-column: 1;
    }

    /* BUY */
    .lex-rate-table thead th:nth-child(3) {
      grid-column: 2;
    }

    /* SELL */
    .lex-rate-table thead th:nth-child(4) {
      grid-column: 3;
    }

    /* BOOK NOW */
    .lex-rate-table thead th:nth-child(5) {
      grid-column: 4;
    }

    .lex-rate-table,
    .lex-rate-table tbody {
      display: block;
      width: 100%;
    }

    /* 5 td columns → hide col 2 (name) → 4 visible: flag|buy|sell|book */
    .lex-rate-table tbody tr {
      display: grid;
      grid-template-columns: 72px 1fr 1fr 64px;
      grid-template-rows: 1fr;
      column-gap: 6px;
      padding: 10px 8px;
      border-bottom: 1px solid var(--G2);
      align-items: center;
      min-height: 48px;
    }

    .lex-rate-table tbody tr:last-child {
      border-bottom: none;
    }

    .lex-rate-table tbody td {
      display: block;
      padding: 0 !important;
      border: none;
    }

    /* Col 1 — Flag + Code */
    .lex-rate-table tbody td:nth-child(1) {
      grid-column: 1;
      grid-row: 1;
    }

    /* Col 2 — Currency Name: completely hidden, takes no space */
    /* Hide Currency column header on mobile */
    .lex-rate-table thead th:nth-child(2) {
      display: none !important;
      width: 0 !important;
      padding: 0 !important;
      margin: 0 !important;
      overflow: hidden !important;
    }

    /* Col 3 — BUY */
    .lex-rate-table tbody td:nth-child(3) {
      grid-column: 2;
      grid-row: 1;
      text-align: center;
    }

    /* Col 4 — SELL */
    .lex-rate-table tbody td:nth-child(4) {
      grid-column: 3;
      grid-row: 1;
      text-align: center;
    }

    /* Col 5 — Book Now */
    .lex-rate-table tbody td:nth-child(5) {
      grid-column: 4;
      grid-row: 1;
    }

    .lex-cc-wrap {
      display: flex;
      align-items: center;
      gap: 5px;
    }

    .lex-cc-flag {
      font-size: 18px;
      flex-shrink: 0;
    }

    .lex-cc-code {
      font-size: 12px;
      font-weight: 800;
      display: block;
      line-height: 1;
    }

    .lex-cc-name {
      display: none;
    }

    .lex-td-name {
      display: none !important;
    }

    .lex-rate-buy,
    .lex-rate-sell,
    .lex-rate-unavail {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 1px;
      width: 100%;
      font-size: 11px;
      font-family: var(--fm);
    }

    .lex-rate-buy::before {
      content: 'BUY';
      font-size: 7px;
      font-weight: 700;
      opacity: .55;
      letter-spacing: .5px;
      font-family: var(--ff);
    }

    .lex-rate-sell::before {
      content: 'SELL';
      font-size: 7px;
      font-weight: 700;
      opacity: .55;
      letter-spacing: .5px;
      font-family: var(--ff);
    }

    .lex-book-btn {
      width: 100%;
      padding: 6px 3px;
      font-size: 9px;
      font-weight: 800;
      text-align: center;
      white-space: normal;
      line-height: 1.3;
      border-radius: 6px;
    }

    .lex-frow {
      grid-template-columns: 1fr;
    }

    .lex-type-grid {
      grid-template-columns: 1fr;
    }

    .lex-purpose-grid {
      grid-template-columns: 1fr 1fr;
    }

    .lex-preview-grid {
      grid-template-columns: 1fr;
    }

    .lex-act-bar {
      flex-direction: column;
    }

    .lex-act-bar .lex-btn {
      width: 100%;
      justify-content: center;
    }

    .lex-step-lbl {
      display: none;
    }

    .lex-rt-view,
    .lex-track-view {
      padding: 12px;
    }

    .lex-fbody {
      padding: 14px 12px;
      max-height: none;
    }
  }

}

/* ── Zone Bar (v3.1) ──────────────────────────────────────────────────────── */
#lex-zone-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 8px;
  padding: 8px 14px;
  margin-bottom: 10px;
  font-size: 12.5px;
  color: #1E40AF;
}

/* ── Booking Card Wrapper (v3.1.2) ─────────────────────────────────────── */
.lex-booking-card {
  background: #FFFFFF;
  border: 1.5px solid var(--Br);
  border-radius: var(--rl);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .07), 0 8px 32px rgba(0, 0, 0, .05);
  overflow: hidden;
  margin: 0 auto;
}

/* Form top bar sits flush at top of card — square off top corners to match card */
.lex-booking-card .lex-fv-top {
  border-radius: 0;
}

/* Step track flush inside card */
.lex-booking-card .lex-steps-track {
  border-radius: 0;
}

/* Action bar sits flush at bottom — no separate border-radius */
.lex-booking-card .lex-act-bar {
  border-radius: 0;
}

/* Card footer — visually part of the card */
.lex-footer-card {
  border-top: 1.5px solid var(--G2);
  background: var(--G);
  border-radius: 0;
  margin: 0;
}

/* Rate table footer stays attached to table, not floating */
.lex-rt-view>.lex-footer {
  border-top: 1px solid var(--Br);
  border-radius: 0;
  margin-top: 0;
}

/* ── Notice: remove green zone-loaded box completely ───────────────────── */
#lex-zone-notice {
  display: none !important;
}

.lex-td-name {
  font-size: 13px;
  color: var(--D);
  font-weight: 400;
  width: 100px;
  min-width: 75px;
  max-width: 150px;
}

.lex-spa>*:first-child {
  border-top-left-radius: 12px !important;
}

.lex-spa>*:last-child {
  border-top-right-radius: 12px !important;
}