:root {
  --tblr-primary: #5b5cf6;
  --tblr-primary-rgb: 91, 92, 246;
  --tblr-link-color: #5558e8;
  --brand: #5b5cf6;
  --brand-deep: #3136aa;
  --brand-cyan: #18b7e8;
  --ink: #12172a;
  --muted: #657089;
  --soft: #f5f7fc;
  --line: #e6e9f2;
  --shadow-sm: 0 8px 24px rgba(31, 38, 78, .07);
  --shadow-lg: 0 28px 80px rgba(35, 42, 92, .15);
}

html { scroll-behavior: smooth; }
body {
  overflow-x: hidden;
  color: var(--ink);
  background: var(--soft);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { text-underline-offset: 3px; }
.hide { display: none !important; }
.mono { font-family: var(--tblr-font-monospace); word-break: break-all; }
.cursor-pointer { cursor: pointer; }

.btn {
  border-radius: 11px;
  font-weight: 650;
  letter-spacing: -.01em;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  border: 0;
  background: linear-gradient(135deg, #655cf6, #4c6cf6 58%, #2f91eb);
  box-shadow: 0 8px 22px rgba(82, 87, 238, .24);
}
.btn-primary:hover { box-shadow: 0 12px 28px rgba(82, 87, 238, .34); }
.form-control, .form-select, .input-group-flat {
  border-radius: 11px;
  border-color: #dfe3ee;
}
.form-control:focus, .form-select:focus {
  border-color: rgba(91, 92, 246, .5);
  box-shadow: 0 0 0 3px rgba(91, 92, 246, .11);
}
.card {
  border-color: rgba(221, 225, 237, .92);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}
.card-header { min-height: 64px; border-color: var(--line); }
.card-title { letter-spacing: -.015em; }
.badge { border-radius: 999px; padding: .45rem .65rem; font-weight: 650; }
.alert { border-radius: 13px; }

/* Brand */
.navbar-brand { display: flex; align-items: center; gap: .65rem; }
.navbar-brand > a { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: inherit; }
.navbar-brand-image { width: 38px; height: 38px; border-radius: 12px; }
.brand-word { font-weight: 800; font-size: 1.15rem; letter-spacing: -.035em; }
.brand-word small { color: var(--muted); font-size: .65em; font-weight: 650; letter-spacing: 0; }

/* Landing navigation */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1020;
  min-height: 72px;
  border: 0;
  border-bottom: 1px solid rgba(222, 226, 238, .82);
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}
.site-nav .navbar-nav .nav-link {
  position: relative;
  color: #505a71;
  font-weight: 600;
}
.site-nav .navbar-nav .nav-link:hover { color: var(--brand); }
.site-nav .form-select { background-color: rgba(247, 248, 252, .9); }

/* Landing hero */
.landing-page .page-wrapper { background: #fff; }
.hero-section {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 6.25rem 0 5.75rem;
  background:
    radial-gradient(circle at 6% 10%, rgba(116, 96, 255, .16), transparent 30%),
    radial-gradient(circle at 91% 8%, rgba(25, 184, 232, .17), transparent 29%),
    linear-gradient(180deg, #fbfcff 0%, #f5f7ff 62%, #fff 100%);
}
.hero-section::before, .hero-section::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(2px);
}
.hero-section::before {
  width: 360px; height: 360px; right: -180px; top: 190px;
  border: 1px solid rgba(91, 92, 246, .13);
  box-shadow: 0 0 0 46px rgba(91, 92, 246, .025), 0 0 0 92px rgba(24, 183, 232, .02);
}
.hero-section::after {
  width: 130px; height: 130px; left: 46%; bottom: -92px;
  background: linear-gradient(145deg, rgba(91, 92, 246, .14), rgba(24, 183, 232, .06));
}
.hero-layout { position: relative; z-index: 1; }
.hero-copy { padding-right: 1rem; }
.hero-copy h1 {
  max-width: 580px;
  margin: 0;
  font-size: clamp(2.65rem, 5vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -.065em;
  font-weight: 820;
  color: #11162a;
}
.hero-copy > p { max-width: 555px; font-size: 1.08rem; line-height: 1.75; color: var(--muted) !important; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: #5256de;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.hero-eyebrow > span { width: 24px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--brand), var(--brand-cyan)); }
.hero-eyebrow.light { color: #cbd8ff; }
.hero-copy .badge {
  border: 1px solid rgba(255, 255, 255, .84);
  background: rgba(255, 255, 255, .74) !important;
  box-shadow: 0 5px 18px rgba(34, 43, 91, .06);
  backdrop-filter: blur(8px);
}
.hero-copy .btn { min-height: 46px; padding-inline: 1.15rem; }
.hero-code {
  max-width: 520px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 20px 45px rgba(18, 25, 55, .2);
}
.hero-code::before { content: "API REQUEST"; display: block; margin-bottom: .65rem; color: #7f8aa8; font: 700 .65rem/1 var(--tblr-font-sans-serif); letter-spacing: .12em; }

/* Translator */
.glass-card {
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
}
.translator-card .card-header {
  padding: 1rem 1.15rem;
  background: linear-gradient(180deg, #fff, #fafbff);
}
.translator-card .form-select { height: 42px; background-color: #fff; }
.translator-card .lang-select { flex: 1 1 0; min-width: 0; max-width: none; }
.translator-card #swap { border-radius: 50%; background: #f0f2ff; color: var(--brand); }
.translator-grid { display: grid; grid-template-columns: 1fr 1fr; min-height: 450px; }
.translator-pane { display: flex; flex-direction: column; min-width: 0; background: #fff; }
.translator-pane + .translator-pane { border-left: 1px solid var(--line); background: #fbfcff; }
.translator-pane textarea {
  flex: 1;
  width: 100%;
  min-height: 380px;
  border: 0;
  border-radius: 0;
  resize: none;
  box-shadow: none !important;
  background: transparent;
  font-size: 1.15rem;
  line-height: 1.65;
  padding: 1.45rem 1.4rem .65rem;
}
.translator-foot { display: flex; justify-content: space-between; align-items: center; padding: .55rem 1.15rem 1rem; color: var(--muted); font-size: .8rem; }

/* Landing sections */
.site-section { position: relative; padding: 6.4rem 0; margin: 0; }
.site-section h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -.045em; }
.flow-section { background: #fff; }
.flow-section::before {
  content: ""; position: absolute; left: 50%; top: 0; width: min(860px, 75%); height: 1px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(91, 92, 246, .25), transparent);
}
.flow-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border: 1px solid #e5e8f2;
  border-top: 0;
  box-shadow: none;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.flow-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--brand), var(--brand-cyan)); }
.flow-card::after { content: ""; position: absolute; width: 100px; height: 100px; right: -45px; bottom: -55px; border-radius: 50%; background: rgba(91, 92, 246, .055); }
.flow-card:hover { transform: translateY(-5px); border-color: rgba(91, 92, 246, .28); box-shadow: 0 18px 42px rgba(31, 38, 78, .1); }
.flow-card .card-body { padding: 1.65rem; }
.flow-num { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-bottom: 1.35rem; border-radius: 13px; color: #fff; background: linear-gradient(135deg, var(--brand), #3d9be9); box-shadow: 0 8px 18px rgba(91, 92, 246, .23); font-weight: 800; }

.pricing-section {
  background:
    radial-gradient(circle at 16% 35%, rgba(91, 92, 246, .10), transparent 28%),
    linear-gradient(180deg, #f7f8fc, #f2f5fb);
}
.pricing-section .list-group-item { padding-block: 1rem; border-color: rgba(209, 214, 228, .8); background: transparent; }
.pricing-card {
  overflow: hidden;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0%, rgba(69, 211, 244, .22), transparent 34%),
    linear-gradient(145deg, #171c3b, #282c6c 62%, #34488e);
  box-shadow: 0 28px 62px rgba(25, 30, 72, .25);
}
.pricing-card .card-body { padding: 2.25rem; }
.pricing-card .subheader, .pricing-card .text-secondary { color: #b9c1de !important; }
.pricing-card .price-num { color: #fff; }
.pricing-card .price-num small { color: #c8cfea; }
.pricing-card .text-green { color: #70efd1 !important; }
.price-num { font-size: 3rem; font-weight: 820; letter-spacing: -.055em; line-height: 1.1; }
.price-num small { font-size: .95rem; font-weight: 650; color: var(--muted); }

.api-section {
  overflow: hidden;
  color: #eaf0ff;
  background:
    radial-gradient(circle at 72% 20%, rgba(95, 105, 255, .27), transparent 28%),
    radial-gradient(circle at 95% 90%, rgba(20, 188, 232, .14), transparent 25%),
    #11152c;
}
.api-section h2 { color: #fff; }
.api-section .text-secondary, .api-section li { color: #aeb8d7 !important; }
.api-section code { color: #a9e8ff; }
.code-block { margin: 0; overflow: auto; border-radius: 14px; padding: 1.25rem 1.35rem; color: #dce7ff; background: #141a2e; font-size: .82rem; line-height: 1.65; }
.api-section .code-block { border: 1px solid rgba(170, 190, 255, .13); background: rgba(7, 11, 29, .78); box-shadow: 0 20px 50px rgba(0, 0, 0, .22); }

.desktop-section { background: #fff; }
.desktop-section .card-link { box-shadow: none; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.desktop-section .card-link:hover { transform: translateY(-4px); border-color: rgba(91, 92, 246, .3); box-shadow: 0 16px 38px rgba(31, 38, 78, .09); }
.dl-icon { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; color: var(--brand); background: linear-gradient(145deg, #efefff, #eaf8ff); font-size: 23px; }
.site-footer { padding-block: 2rem; border-top: 1px solid var(--line); background: #fff; }

/* Auth */
.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 8%, rgba(32, 184, 232, .13), transparent 24%),
    radial-gradient(circle at 8% 90%, rgba(91, 92, 246, .11), transparent 28%),
    #f5f7fc;
}
.auth-shell { width: min(1240px, calc(100% - 40px)); min-height: 100vh; margin: auto; display: flex; flex-direction: column; }
.auth-topbar { min-height: 86px; display: flex; align-items: center; justify-content: space-between; }
.auth-topbar #uiLang { width: auto; min-width: 126px; background-color: rgba(255,255,255,.85); }
.auth-layout { flex: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(390px, .7fr); gap: 3.25rem; align-items: center; padding: 2rem 0 5rem; }
.auth-story { position: relative; overflow: hidden; min-height: 650px; border-radius: 32px; color: #fff; background: linear-gradient(145deg, #171c3c, #292d72 60%, #35518f); box-shadow: 0 32px 90px rgba(28, 33, 78, .27); }
.auth-story::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 38px 38px; mask-image: linear-gradient(140deg, #000, transparent 75%); }
.auth-story-inner { position: relative; z-index: 2; max-width: 600px; padding: clamp(3rem, 7vw, 5.75rem); }
.auth-story h1 { max-width: 620px; margin-bottom: 1.4rem; color: #fff; font-size: clamp(2.6rem, 4.2vw, 4.4rem); line-height: 1.02; letter-spacing: -.06em; font-weight: 820; }
.auth-story > .auth-story-inner > p { max-width: 510px; color: #bcc6e5; font-size: 1.06rem; line-height: 1.7; }
.auth-benefits { display: grid; gap: .85rem; margin-top: 2.2rem; }
.auth-benefits > div { display: grid; grid-template-columns: 44px 1fr; column-gap: .85rem; align-items: center; padding: .85rem 1rem; border: 1px solid rgba(255,255,255,.09); border-radius: 15px; background: rgba(255,255,255,.055); backdrop-filter: blur(8px); }
.auth-benefits strong { align-self: end; color: #fff; }
.auth-benefits small { grid-column: 2; color: #aeb9d9; }
.benefit-icon { grid-row: 1 / span 2; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #dffaff; background: linear-gradient(135deg, rgba(104,92,246,.8), rgba(24,183,232,.72)); font-size: 19px; }
.auth-endpoint { display: inline-flex; align-items: center; gap: .65rem; margin-top: 1.6rem; padding: .65rem .8rem; border-radius: 10px; color: #aeb9d9; background: rgba(4,8,26,.28); font-size: .78rem; }
.auth-endpoint code { color: #d9e4ff; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #49e4b3; box-shadow: 0 0 0 5px rgba(73,228,179,.11); }
.auth-orb { position: absolute; z-index: 1; border-radius: 50%; filter: blur(1px); }
.auth-orb-one { width: 330px; height: 330px; right: -135px; top: -90px; background: rgba(28,190,232,.16); box-shadow: 0 0 0 70px rgba(98,93,247,.06); }
.auth-orb-two { width: 120px; height: 120px; left: -50px; bottom: 40px; background: rgba(105,93,249,.23); }
.auth-panel-wrap { max-width: 490px; width: 100%; justify-self: center; }
.auth-panel-heading { margin-bottom: 1.5rem; }
.auth-panel-heading h2 { margin: .35rem 0 .6rem; font-size: 2.25rem; font-weight: 800; letter-spacing: -.045em; }
.auth-panel-heading p { color: var(--muted); line-height: 1.65; }
.auth-card { border: 1px solid rgba(255,255,255,.92); border-radius: 24px; box-shadow: 0 24px 70px rgba(31,38,78,.12); }
.auth-card .card-body { padding: 2rem; }
.auth-segment { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; margin-bottom: 2rem; padding: .35rem; border-radius: 13px; background: #f0f2f8; }
.auth-segment button { border: 0; border-radius: 10px; padding: .7rem .8rem; color: #677187; background: transparent; font-weight: 700; }
.auth-segment button.active { color: var(--brand-deep); background: #fff; box-shadow: 0 5px 16px rgba(31,38,78,.09); }
.auth-card .form-control { min-height: 48px; }
.auth-card .input-group-text { border-color: #dfe3ee; background: #fafbfe; }
.auth-submit { min-height: 50px; margin-top: .5rem; }
.purchase-hint { display: flex; gap: .8rem; align-items: center; padding: 1rem; border: 1px solid #e1e4f4; border-radius: 14px; background: #f7f7ff; }
.purchase-hint .benefit-icon { flex: 0 0 40px; }
.auth-back { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.25rem; color: var(--muted); font-size: .86rem; }

/* Console */
.console-page { background: #f4f6fb; }
.console-page .navbar-vertical { border: 0; background: radial-gradient(circle at 10% 0%, rgba(98,93,247,.24), transparent 27%), linear-gradient(180deg, #151a36, #11152b 74%); box-shadow: 14px 0 40px rgba(22,27,61,.08); }
.console-page .navbar-vertical .navbar-brand { min-height: 82px; }
.console-page .navbar-vertical .navbar-brand-image { filter: none !important; opacity: 1 !important; }
.console-page .navbar-vertical .nav-link { margin: .2rem .65rem; border-radius: 11px; color: #aab4d2; }
.console-page .navbar-vertical .nav-link:hover { color: #fff; background: rgba(255,255,255,.055); }
.console-page .navbar-vertical .nav-link.active { color: #fff; background: linear-gradient(90deg, rgba(103,92,246,.33), rgba(50,149,232,.16)); box-shadow: inset 3px 0 #7e78ff; }
.console-page .page-header { padding: 2.25rem 0 1.2rem; background: transparent; }
.console-page .page-title { font-size: 2rem; font-weight: 800; letter-spacing: -.04em; }
.console-page .page-body { padding-top: .75rem; }
.console-page .card { border-color: #e3e6ef; }
.console-page .activation-banner { overflow: hidden; background: linear-gradient(130deg, #fff, #f1f2ff 64%, #edfaff); }
.step-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
.step-item { position: relative; border: 1px solid #e2e5ee; border-radius: 14px; padding: 1rem; background: rgba(255,255,255,.9); }
.step-item.done { border-color: rgba(46,190,147,.34); background: rgba(46,190,147,.06); }
.step-item.current { border-color: rgba(91,92,246,.44); box-shadow: 0 0 0 3px rgba(91,92,246,.07); }
.copy-row { display: flex; gap: .5rem; align-items: flex-start; }
.copy-row .copy-value { flex: 1; min-width: 0; }

/* Admin */
.admin-page { background: #f4f6fb; }
.admin-page > .page > .navbar { min-height: 74px; border: 0; border-bottom: 1px solid #e2e5ef; background: rgba(255,255,255,.9); backdrop-filter: blur(14px); }
.admin-page .page-body { padding-top: 2.25rem; }
.admin-page #loginBox .card { max-width: 520px; margin: 6vh auto 0; border-radius: 24px; box-shadow: var(--shadow-lg); }
.admin-page #loginBox .card-body { padding: 2.2rem; }
.admin-page #app > .card { margin-bottom: 1.15rem !important; }
.admin-page .page-header .page-title { font-size: 2rem; font-weight: 800; letter-spacing: -.04em; }
.admin-page .admin-metric { border: 0; box-shadow: 0 8px 28px rgba(31, 38, 78, .07); }
.admin-page .admin-metric .card-body { display: flex; align-items: center; gap: 1rem; min-height: 104px; }
.admin-page .metric-icon { display: grid; place-items: center; flex: 0 0 48px; width: 48px; height: 48px; border-radius: 15px; font-size: 1.35rem; }
.admin-page .admin-create-card { overflow: hidden; border-color: rgba(91, 92, 246, .2); background: linear-gradient(145deg, #fff, #f8f8ff); }
.admin-page .admin-create-card::before { content: ""; display: block; height: 3px; background: linear-gradient(90deg, var(--brand), var(--brand-cyan)); }
.admin-page .selected-customer-card { border-color: rgba(91, 92, 246, .25); box-shadow: 0 10px 34px rgba(31, 38, 78, .07); }
.admin-page .selected-customer-card .card-header { background: linear-gradient(180deg, #fff, #fbfbff); }
.admin-page #customerSearch { min-width: 280px; }
.admin-page table thead th { color: #727d92; background: #f8f9fc; font-size: .72rem; letter-spacing: .055em; text-transform: uppercase; }
.admin-page table tr.cursor-pointer:hover { background: #f2f3ff; }
.admin-page table tr.selected-row td { background: #eeefff; }
.admin-page table tr.selected-row td:first-child { box-shadow: inset 3px 0 var(--brand); color: var(--brand-deep); font-weight: 800; }
.admin-page .table-responsive { max-height: 540px; }
.admin-page .card-header { gap: 1rem; }

@media (max-width: 991.98px) {
  .hero-section { padding: 4.5rem 0; }
  .hero-copy { padding-right: 0; }
  .hero-copy h1 { max-width: 680px; }
  .hero-code { margin-bottom: 1rem !important; }
  .site-section { padding: 5rem 0; }
  .auth-layout { grid-template-columns: 1fr; gap: 2rem; padding-top: 1rem; }
  .auth-story { min-height: 430px; }
  .auth-story-inner { max-width: none; padding: 3.25rem; }
  .auth-story h1 { max-width: 700px; font-size: 3rem; }
  .auth-benefits { grid-template-columns: repeat(3, 1fr); }
  .auth-benefits > div { grid-template-columns: 40px 1fr; }
  .auth-benefits small { display: none; }
  .auth-panel-wrap { max-width: 620px; }
}

@media (max-width: 767.98px) {
  .site-nav { min-height: 64px; }
  .site-nav .navbar-brand-image { width: 34px; height: 34px; }
  .site-nav #uiLang { min-width: 92px !important; width: 92px !important; }
  .site-nav #navCta span { display: none; }
  .hero-section { padding: 3.7rem 0 4rem; }
  .hero-copy h1 { font-size: clamp(2.55rem, 13vw, 3.45rem); }
  .hero-copy > p { font-size: 1rem; }
  .translator-grid { grid-template-columns: 1fr; min-height: 0; }
  .translator-pane { min-height: 230px; }
  .translator-pane + .translator-pane { border-left: 0; border-top: 1px solid var(--line); }
  .translator-pane textarea { min-height: 205px; }
  .translator-card .card-header .lang-select { flex: 1; max-width: none; min-width: 0; }
  .translator-card #demoMsg { width: 100%; margin-left: 0 !important; }
  .site-section { padding: 4.25rem 0; }
  .step-track { grid-template-columns: 1fr; }
  .auth-shell { width: min(100% - 26px, 660px); }
  .auth-topbar { min-height: 72px; }
  .auth-story { display: none; }
  .auth-layout { display: block; padding: 2.2rem 0 4rem; }
  .auth-panel-heading h2 { font-size: 2rem; }
  .auth-card .card-body { padding: 1.35rem; }
  .auth-back { flex-direction: column; align-items: center; }
  .console-page .page-header { padding-top: 1.5rem; }
  .admin-page .page-body { padding-top: 1.25rem; }
  .admin-page #customerSearch { min-width: 0; width: 100%; }
  .admin-page .card-actions { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
