/* Authentication screens — login · register · forgot / reset password · account helpers.
   Loaded by auth_start() (inc/auth_layout.php). Everything lives under .tx so the rest of the app is untouched.
   Palette: midnight #06201d · electric blue #128c7e · violet #075e54 · teal #1fa593 · WhatsApp green #25D366. Plain CSS, no build step. */

.tx {
  --navy: #06201d; --navy-2: #0c332e; --blue: #128c7e; --violet: #075e54; --teal: #1fa593; --wa: #25d366;
  --ink: #0e1d22; --muted: #5b6d74; --line: #e0e8ea; --soft: #f5f8f8;
  --font-d: "Sora", "Inter", system-ui, sans-serif;
  position: relative; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; overflow-x: clip;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--soft);
}

/* ---------------------------------------------------------------- canvas */
.tx-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.tx-bg .orb { position: absolute; border-radius: 50%; filter: blur(80px); will-change: transform; }
.tx-bg .o1 { width: 560px; height: 560px; left: -140px; top: -160px; background: var(--blue); opacity: .55; animation: txDrift1 22s ease-in-out infinite alternate; }
.tx-bg .o2 { width: 520px; height: 520px; right: -140px; top: 5%; background: var(--violet); opacity: .45; animation: txDrift2 26s ease-in-out infinite alternate; }
.tx-bg .o3 { width: 420px; height: 420px; left: 30%; bottom: -200px; background: var(--teal); opacity: .32; animation: txDrift1 30s ease-in-out infinite alternate-reverse; }
.tx-bg .mesh { position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px); background-size: 28px 28px; mask-image: radial-gradient(ellipse at 50% 30%, #000, transparent 75%); }
@keyframes txDrift1 { to { transform: translate3d(90px, 60px, 0) scale(1.15); } }
@keyframes txDrift2 { to { transform: translate3d(-80px, 70px, 0) scale(1.1); } }

/* register: a gradient header band, the rest of the page is light */
.tx-register .tx-bg { height: 470px; bottom: auto; background: linear-gradient(135deg, #053f38 0%, #0a6d62 50%, #128c7e 100%); border-radius: 0 0 44px 44px; }
.tx-register .tx-bg .o1 { background: var(--blue); } .tx-register .tx-bg .o2 { background: var(--violet); } .tx-register .tx-bg .o3 { bottom: -240px; }
/* calm: quiet pastel light */

/* ---------------------------------------------------------------- top bar + footer */
.tx-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem clamp(1rem, 4vw, 2.6rem); }
.tx-brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.tx-brand .brand-name { font-family: var(--font-d); font-weight: 700; letter-spacing: -.01em; color: #fff; }
.tx-cta { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .95rem; border-radius: 999px; font-size: .88rem; font-weight: 600; text-decoration: none; color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(10px); transition: background .2s, transform .2s; }
.tx-cta:hover { background: rgba(255,255,255,.2); color: #fff; transform: translateY(-1px); }
.tx-cta i { transition: transform .2s; } .tx-cta:hover i { transform: translateX(3px); }
.tx-cta, .tx-brand .brand-name { white-space: nowrap; }
.tx-foot { position: relative; z-index: 1; text-align: center; padding: 1rem 1rem 1.4rem; font-size: .78rem; color: #86a8a0; }
.tx-foot a { color: inherit; text-underline-offset: 3px; }

.tx-main { position: relative; z-index: 1; flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 clamp(.8rem, 3vw, 1.5rem) 1.5rem; display: flex; flex-direction: column; align-items: center; justify-content: center; }

/* ---------------------------------------------------------------- hero (login + register) */
.tx-hero { text-align: center; max-width: 760px; margin: 0 auto 1.9rem; }
.tx-pill { display: inline-flex; align-items: center; gap: .5rem; padding: .38rem .85rem; border-radius: 999px; font-size: .8rem; font-weight: 600; letter-spacing: .02em; color: #d3efe8; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); margin-bottom: 1.1rem; }
.tx-pill i { color: var(--wa); }
.tx-display { font-family: var(--font-d); font-weight: 800; font-size: clamp(2.15rem, 5.4vw, 4.1rem); line-height: 1.04; letter-spacing: -.035em; color: #fff; margin: 0 0 1rem; }
.tx-display span { background: linear-gradient(120deg, #7ef0c6, #25d366 50%, #5fe0c2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tx-lead { font-size: clamp(.98rem, 1.6vw, 1.12rem); line-height: 1.6; color: #a9cdc4; max-width: 56ch; margin: 0 auto; }
.tx-journey { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: .6rem; padding: 0; margin: 1.3rem 0 0; }
.tx-journey li { display: inline-flex; align-items: center; gap: .55rem; padding: .45rem .9rem .45rem .5rem; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); font-size: .85rem; font-weight: 500; color: #e3f5f1; backdrop-filter: blur(8px); }
.tx-journey .s { display: none; }
.tx-journey b { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, var(--wa), var(--teal)); color: #06251a; font-size: .78rem; }

/* ---------------------------------------------------------------- the sheet */
.tx-stage { position: relative; width: 100%; display: flex; justify-content: center; }
.tx-panel { position: relative; width: 100%; max-width: 480px; background: #fff; color: var(--ink); border-radius: 26px; padding: clamp(1.35rem, 3.6vw, 2.3rem); box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 40px 80px -34px rgba(2,20,18,.7), 0 14px 30px -18px rgba(2,20,18,.4); }
.tx-login .tx-panel { max-width: 940px; }
.tx-register .tx-panel { max-width: 780px; margin-top: .2rem; box-shadow: 0 40px 80px -40px rgba(6,50,44,.45), 0 8px 24px -12px rgba(6,50,44,.18); border: 1px solid #e0e8ea; }
.tx-calm .tx-panel { max-width: 540px; border: 1px solid #e0e8ea; box-shadow: 0 40px 80px -44px rgba(6,50,44,.4), 0 8px 24px -12px rgba(6,50,44,.14); }
.tx .auth-card { animation: none; }   /* app.css sizing of the old card must not apply */
.tx-panel h1 { font-family: var(--font-d); font-weight: 700; letter-spacing: -.025em; color: var(--ink); }

/* login: two lanes — quick sign-in on the left, email on the right */
.tx-lanes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
.tx-lane-head { margin-bottom: .4rem; }
.tx-lane { display: flex; flex-direction: column; }
.tx-trust { margin: auto 0 0; padding-top: 1rem; display: flex; gap: .55rem; align-items: flex-start; font-size: .8rem; line-height: 1.4; color: var(--muted); }
.tx-trust i { color: var(--teal); font-size: 1rem; }
.tx-lane-head h1 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); margin: 0 0 .25rem; }
.tx-lane-head p { margin: 0; }
.tx-or { display: flex; align-items: center; gap: .75rem; color: #7a8f8b; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.tx-or::before, .tx-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
@media (min-width: 900px) {
  .tx-lanes { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.08fr); gap: 2rem; align-items: stretch; }
  .tx-or { flex-direction: column; }
  .tx-or::before, .tx-or::after { width: 1px; height: auto; flex: 1; }
  .tx-lane-head { grid-column: 1 / -1; }
}

/* register: names side by side */
.tx-grid2 { display: grid; grid-template-columns: 1fr; gap: 0 1rem; }
@media (min-width: 640px) { .tx-grid2 { grid-template-columns: 1fr 1fr; } }

/* ---------------------------------------------------------------- floating product chips (login, wide screens) */
.tx-float { display: none; }
@media (min-width: 1400px) {
  .tx-float { display: block; position: absolute; top: 0; bottom: 0; left: 50%; width: min(940px, 100%); transform: translateX(-50%); pointer-events: none; z-index: 3; }
  .tx-float .chip { position: absolute; color: #fff; font-size: .8rem; padding: .7rem .9rem; border-radius: 16px; background: rgba(7,40,36,.55); border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(14px); box-shadow: 0 18px 40px -18px rgba(0,0,0,.6); animation: txFloat 7s ease-in-out infinite; }
  .tx-float .c1 { left: -196px; top: 26px; display: grid; grid-template-columns: auto 1fr; gap: 0 .55rem; align-items: center; }
  .tx-float .c1 .dot { grid-row: span 2; width: 10px; height: 10px; border-radius: 50%; background: var(--wa); box-shadow: 0 0 0 5px rgba(37,211,102,.25); }
  .tx-float .c1 small { color: #9cc4ba; }
  .tx-float .c2 { left: -210px; bottom: 70px; display: grid; gap: .4rem; max-width: 220px; animation-delay: -2.4s; }
  .tx-float .bub { padding: .45rem .7rem; border-radius: 12px; line-height: 1.3; }
  .tx-float .bub.in { background: rgba(255,255,255,.95); color: #0c332e; border-top-left-radius: 4px; }
  .tx-float .bub.out { background: #d9fdd3; color: #123a2c; border-top-right-radius: 4px; justify-self: end; }
  .tx-float .bub em { font-style: normal; color: #2b8a6a; font-size: .7rem; }
  .tx-float .c3 { right: -190px; top: 34%; display: grid; gap: .5rem; animation-delay: -4.2s; }
  .tx-float .bars { display: flex; align-items: flex-end; gap: 4px; height: 34px; }
  .tx-float .bars i { width: 9px; border-radius: 3px; background: linear-gradient(180deg, #5fe0c2, var(--violet)); }
  .tx-float .bars i:nth-child(1) { height: 40%; } .tx-float .bars i:nth-child(2) { height: 62%; } .tx-float .bars i:nth-child(3) { height: 50%; } .tx-float .bars i:nth-child(4) { height: 82%; } .tx-float .bars i:nth-child(5) { height: 100%; background: linear-gradient(180deg, #25d366, var(--wa)); }
}
@keyframes txFloat { 50% { transform: translateY(-9px); } }

/* ---------------------------------------------------------------- entrance */
[data-rise] { animation: txRise .75s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 90ms + 60ms); }
.tx-hero > * { animation: txRise .75s cubic-bezier(.2, .8, .2, 1) both; }
.tx-hero > :nth-child(1) { animation-delay: .05s; } .tx-hero > :nth-child(2) { animation-delay: .14s; } .tx-hero > :nth-child(3) { animation-delay: .23s; }
.tx-hero[data-rise] { animation: none; }
@keyframes txRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.tx-panel.shake { animation: txShake .42s ease; }
@keyframes txShake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------------------------------------------------------------- forms (inside the sheet) */
.tx-panel .text-secondary { color: var(--muted) !important; }
.tx-panel a { color: var(--blue); text-underline-offset: 3px; }
.tx-panel a:hover { color: var(--violet); }
.tx-panel .form-label { font-weight: 600; font-size: .84rem; color: #1f3a36; margin-bottom: .4rem; }
.tx-panel .form-control, .tx-panel .form-select { min-height: 52px; border-radius: 14px; border: 1.5px solid var(--line); background: #f7fbfa; padding: .7rem 1rem; transition: border-color .18s, box-shadow .18s, background-color .18s; }
.tx-panel .form-control::placeholder { color: #9ab0ab; }
.tx-panel .form-control:hover { border-color: #c4d8d3; }
.tx-panel .form-control:focus, .tx-panel .form-select:focus { background: #fff; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(18,140,126,.16); }
.tx-panel .form-control.is-invalid { border-color: #e0455f; background-image: none; }
.tx-panel .form-control.is-invalid:focus { box-shadow: 0 0 0 4px rgba(224,69,95,.14); }
.tx-panel .input-group .form-control { border-radius: 14px 0 0 14px; }
.tx-panel .input-group > .btn { border-radius: 0 14px 14px 0; border: 1.5px solid var(--line); border-left: 0; background: #f7fbfa; color: #5b6d74; }
.tx-panel .input-group > .form-select { border-radius: 14px 0 0 14px; }
.tx-panel .invalid-feedback { font-size: .8rem; color: #c8304a; animation: txFade .2s ease; }
@keyframes txFade { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.tx-panel .form-check-input { width: 1.15rem; height: 1.15rem; border-color: #aab3cf; margin-top: .15rem; }
.tx-panel .form-check-input:checked { background-color: var(--blue); border-color: var(--blue); }
.tx-panel .form-check-input:focus { box-shadow: 0 0 0 4px rgba(18,140,126,.18); border-color: var(--blue); }

.auth-icon { position: relative; }
.auth-icon > i.lead { position: absolute; left: 16px; top: 26px; transform: translateY(-50%); color: #7a8f8b; font-size: 1.05rem; pointer-events: none; transition: color .18s; z-index: 3; }
.auth-icon .form-control { padding-left: 2.8rem; }
.auth-icon:focus-within > i.lead { color: var(--blue); }
.auth-pw { position: relative; }
.auth-pw .form-control { padding-right: 3.2rem; }
.auth-pw-btn { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 42px; height: 42px; border: 0; background: transparent; color: #5b6d74; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; transition: background .15s, color .15s; }
.auth-pw-btn:hover { background: #e3f5f1; color: var(--blue); }

/* password strength (auth.js adds it to inputs with data-strength) */
.tx-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: .55rem; }
.tx-meter i { height: 5px; border-radius: 4px; background: #e3ece9; transition: background-color .25s; }
.tx-meter[data-s="1"] i:nth-child(-n+1) { background: #e0455f; }
.tx-meter[data-s="2"] i:nth-child(-n+2) { background: #f59e0b; }
.tx-meter[data-s="3"] i:nth-child(-n+3) { background: #128c7e; }
.tx-meter[data-s="4"] i { background: var(--wa); }
.tx-meter-label { font-size: .78rem; color: var(--muted); margin-top: .35rem; min-height: 1.1em; }

/* buttons */
.tx-panel .btn { border-radius: 14px; font-weight: 600; transition: transform .15s, box-shadow .2s, background-color .2s, border-color .2s, filter .2s; }
.tx .btn:focus-visible, .tx a:focus-visible, .auth-pw-btn:focus-visible { outline: 3px solid rgba(18,140,126,.45); outline-offset: 2px; }
.tx-panel .btn:active:not(:disabled) { transform: translateY(1px) scale(.985); }
.tx-panel .btn-brand { min-height: 54px; color: #fff; border: 0; background: linear-gradient(135deg, #1fb86a 0%, var(--blue) 55%, var(--violet) 100%); box-shadow: 0 12px 26px -12px rgba(18,140,126,.8); }
.tx-panel .btn-brand:hover, .tx-panel .btn-brand:focus { color: #fff; filter: brightness(1.07); transform: translateY(-1px); box-shadow: 0 16px 30px -12px rgba(18,140,126,.95); }
.tx-panel .btn-brand:disabled, .tx-panel .btn-brand.is-loading { background: linear-gradient(120deg, #7cc9bb, #5fb3a4); box-shadow: none; transform: none; filter: none; cursor: progress; color: #fff; opacity: 1; }
.tx-panel .btn-outline-dark { min-height: 54px; background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.tx-panel .btn-outline-dark:hover { background: #eef7f5; border-color: #b5d6cf; color: var(--ink); transform: translateY(-1px); box-shadow: 0 10px 20px -14px rgba(6,50,44,.5); }
.tx-panel .btn-outline-dark:disabled { background: #f6f7fc; color: #7a8f8b; border-color: var(--line); }
.tx-panel .btn .spinner-border { --bs-spinner-width: 1rem; --bs-spinner-height: 1rem; --bs-spinner-border-width: .15em; }
.tx-panel .or-divider { color: #7a8f8b; font-size: .78rem; margin: 1.2rem 0; }
.tx-panel .or-divider::before, .tx-panel .or-divider::after { background: var(--line); }
.tx-panel .avatar-sm { background: linear-gradient(135deg, #d5f3e3, #e3f5f1); color: #0a6d62; font-weight: 700; }
.auth-foot-link { text-align: center; font-size: .9rem; color: var(--muted); margin: 1.2rem 0 0; }
.auth-foot-link a { font-weight: 600; }
.auth-back { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; font-weight: 600; text-decoration: none; margin-bottom: 1rem; }
.auth-back i { transition: transform .18s; } .auth-back:hover i { transform: translateX(-3px); }
.auth-note { display: flex; gap: .65rem; align-items: flex-start; background: #e3f5f1; border: 1px solid #cfeee6; color: #0a5a50; border-radius: 14px; padding: .8rem .95rem; font-size: .85rem; line-height: 1.45; margin-top: 1.1rem; }
.auth-note i { color: var(--blue); font-size: 1.05rem; margin-top: .05rem; }

/* messages (flash + errors) */
.tx-panel .alert { position: relative; display: flex; align-items: flex-start; gap: .6rem; border: 0; border-radius: 14px; padding: .8rem 2.5rem .8rem .95rem; font-size: .9rem; line-height: 1.4; animation: txToast .4s cubic-bezier(.2,.8,.2,1) both; }
.tx-panel .alert::before { font-family: "bootstrap-icons"; font-size: 1.05rem; line-height: 1.3; flex: 0 0 auto; }
.tx-panel .alert-success { background: #e8f9f0; color: #0b5e3a; } .tx-panel .alert-success::before { content: "\f26a"; color: #17a864; }
.tx-panel .alert-danger  { background: #fdecef; color: #8f2438; } .tx-panel .alert-danger::before  { content: "\f33a"; color: #e0455f; }
.tx-panel .alert-info    { background: #e3f5f1; color: #0a5a50; } .tx-panel .alert-info::before    { content: "\f431"; color: var(--blue); }
.tx-panel .alert-warning { background: #fff4de; color: #7a4d00; } .tx-panel .alert-warning::before { content: "\f33a"; color: #e0900b; }
.tx-panel .alert .btn-close { position: absolute; top: .6rem; right: .6rem; padding: .5rem; font-size: .7rem; opacity: .55; }
.tx-panel .alert.fade:not(.show) { transition: opacity .25s, transform .25s; transform: translateY(-6px); }
@keyframes txToast { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- recovery trail + art */
.tx-trail { list-style: none; display: flex; padding: 0; margin: 0 0 1.5rem; counter-reset: s; }
.tx-trail li { flex: 1; position: relative; text-align: center; font-size: .76rem; color: #7a8f8b; font-weight: 500; }
.tx-trail li::before { content: ""; position: absolute; top: 14px; left: -50%; width: 100%; height: 2px; background: #e3ece9; z-index: 0; }
.tx-trail li:first-child::before { display: none; }
.tx-trail li.done::before, .tx-trail li.now::before { background: linear-gradient(90deg, var(--blue), var(--violet)); }
.tx-trail b { position: relative; z-index: 1; display: grid; place-items: center; width: 30px; height: 30px; margin: 0 auto .4rem; border-radius: 50%; background: #e8f1ee; color: #6b807b; font-size: .8rem; border: 2px solid #fff; box-shadow: 0 0 0 1px #e3ece9; }
.tx-trail .now b { background: linear-gradient(135deg, var(--blue), var(--violet)); color: #fff; box-shadow: 0 0 0 4px rgba(18,140,126,.18); }
.tx-trail .now { color: var(--ink); font-weight: 600; }
.tx-trail .done b { background: var(--wa); color: #06331d; box-shadow: none; }
.auth-art { display: block; width: 168px; height: auto; margin: 0 auto 1rem; overflow: visible; }
.auth-art .pulse { transform-origin: 80px 56px; animation: txPulse 3.2s ease-out infinite; }
.auth-art .pulse.p2 { animation-delay: 1.6s; }
.auth-art .float { animation: txFloat 5s ease-in-out infinite; }
@keyframes txPulse { from { opacity: .45; transform: scale(.55); } to { opacity: 0; transform: scale(1.5); } }

/* ---------------------------------------------------------------- success screen */
.auth-done { text-align: center; padding: 1rem 0 .4rem; }
.auth-done .ring { width: 104px; height: 104px; margin: 0 auto 1.1rem; position: relative; }
.auth-done .ring::before { content: ""; position: absolute; inset: -14px; border-radius: 50%; background: radial-gradient(circle, rgba(37,211,102,.3), transparent 68%); animation: txGlow .9s ease-out both; }
.auth-done svg { position: relative; width: 104px; height: 104px; }
.auth-done .c { fill: none; stroke: #17b35e; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 289; stroke-dashoffset: 289; transform: rotate(-90deg); transform-origin: 50% 50%; animation: txDraw .45s ease-out .05s forwards; }
.auth-done .t { fill: none; stroke: #17b35e; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: txDraw .3s ease-out .4s forwards; }
.auth-done .fill { fill: #e8f9f0; transform-origin: 50% 50%; animation: txPop .35s cubic-bezier(.2,.9,.3,1.3) both; }
.auth-done h1 { font-size: 1.6rem; margin: 0 0 .3rem; }
.auth-done p { margin: 0; color: var(--muted); }
.auth-done .bar { height: 3px; border-radius: 3px; background: #e3ece9; margin: 1.3rem auto 0; max-width: 170px; overflow: hidden; }
.auth-done .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--violet)); transform-origin: left; animation: txBar .8s linear both; }
.auth-done .btn { margin-top: 1.3rem; min-width: 190px; }
@keyframes txDraw { to { stroke-dashoffset: 0; } }
@keyframes txPop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes txGlow { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
@keyframes txBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.auth-leave .tx-panel { animation: txLeave .28s ease forwards; }
@keyframes txLeave { to { opacity: 0; transform: translateY(-10px) scale(.985); } }

/* ---------------------------------------------------------------- tablet / phone */
@media (max-width: 991.98px) {
  .tx-hero { margin-bottom: 1.4rem; }
  .tx-register .tx-bg { height: 500px; border-radius: 0 0 32px 32px; }
}
@media (max-width: 575.98px) {
  .tx-top { padding: .8rem 1rem; }
  .tx-main { justify-content: flex-start; padding-bottom: 1rem; }
  .tx-hero { margin-bottom: 1.1rem; text-align: left; }
  .tx-display { font-size: clamp(1.95rem, 9vw, 2.4rem); }
  .tx-lead { display: none; }
  .tx-pill { margin-bottom: .8rem; }
  .tx-journey { justify-content: flex-start; gap: .4rem; }
  .tx-journey { flex-wrap: nowrap; }
  .tx-journey li { font-size: .78rem; padding-right: .7rem; flex: 0 1 auto; white-space: nowrap; }
  .tx-journey .l { display: none; } .tx-journey .s { display: inline; }
  .tx-cta { padding: .45rem .8rem; font-size: .82rem; }
  .tx-panel { border-radius: 22px; padding: 1.25rem 1.1rem 1.4rem; }
  .tx .form-control, .tx .form-select { font-size: 16px; }   /* no zoom-on-focus in iOS */
  .tx-register .tx-bg { height: 520px; }
  .tx-trail li span { font-size: .7rem; }
}

/* ---------------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  .tx *, .tx *::before, .tx *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .tx-bg .orb, .tx-float .chip, .auth-art .pulse, .auth-art .float { animation: none !important; }
  .auth-art .pulse { opacity: 0; }
  .auth-done .c, .auth-done .t { stroke-dashoffset: 0; }
}


/* ================================================================ theme: Light (default) / Dark
   auth_start() sets <html data-theme="light|dark"> before first paint from localStorage "wtp-theme" (same key as the app); the toggle is in the top bar. */
.tx-theme { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; font-size: 1.05rem; cursor: pointer; color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(10px); transition: background .2s, transform .2s, color .2s; }
.tx-theme:hover { background: rgba(255,255,255,.22); transform: rotate(14deg); }
.tx-theme .bi-sun { display: none; }
html[data-theme="dark"] .tx-theme .bi-sun { display: inline; } html[data-theme="dark"] .tx-theme .bi-moon-stars { display: none; }
.tx-actions { display: inline-flex; align-items: center; gap: .6rem; }

/* ---- Light: the login / plain / calm screens (register keeps its colourful band) */
html:not([data-theme="dark"]) .tx:not(.tx-register) .tx-bg .o1 { background: #b9eadb; opacity: .55; }
html:not([data-theme="dark"]) .tx:not(.tx-register) .tx-bg .o2 { background: #c9f2d6; opacity: .5; }
html:not([data-theme="dark"]) .tx:not(.tx-register) .tx-bg .o3 { background: #a7e3d8; opacity: .5; }
html:not([data-theme="dark"]) .tx:not(.tx-register) .tx-bg .mesh { background-image: radial-gradient(rgba(18,140,126,.1) 1px, transparent 1px); }
html:not([data-theme="dark"]) .tx:not(.tx-register) .tx-brand .brand-name { color: var(--ink); }
html:not([data-theme="dark"]) .tx:not(.tx-register) .tx-cta, html:not([data-theme="dark"]) .tx:not(.tx-register) .tx-theme { color: var(--ink); background: #fff; border-color: var(--line); backdrop-filter: none; }
html:not([data-theme="dark"]) .tx:not(.tx-register) .tx-cta:hover, html:not([data-theme="dark"]) .tx:not(.tx-register) .tx-theme:hover { color: var(--blue); background: #eef7f5; }
html:not([data-theme="dark"]) .tx:not(.tx-register) .tx-pill { color: #0a6d62; background: #e3f5f1; border-color: #cdebe4; }
html:not([data-theme="dark"]) .tx:not(.tx-register) .tx-display { color: var(--ink); }
html:not([data-theme="dark"]) .tx:not(.tx-register) .tx-display span { background: linear-gradient(120deg, #25d366, #128c7e 50%, #075e54); -webkit-background-clip: text; background-clip: text; color: transparent; }
html:not([data-theme="dark"]) .tx:not(.tx-register) .tx-lead { color: var(--muted); }
html:not([data-theme="dark"]) .tx .tx-foot { color: #6f8480; }
html:not([data-theme="dark"]) .tx:not(.tx-register) .tx-panel { border: 1px solid #e0e8ea; box-shadow: 0 40px 80px -44px rgba(6,50,44,.4), 0 8px 24px -12px rgba(6,50,44,.14); }
html:not([data-theme="dark"]) .tx-float .chip { color: var(--ink); background: rgba(255,255,255,.92); border-color: #e1e7fb; box-shadow: 0 18px 40px -22px rgba(6,50,44,.45); }
html:not([data-theme="dark"]) .tx-float .c1 small { color: var(--muted); }
html:not([data-theme="dark"]) .tx-float .bub.in { background: #e3f5f1; }

/* ---- Dark: the sheet, fields and helpers turn midnight (the canvas is already dark by default styles above) */
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="dark"] .tx { --soft: #06201d; --ink: #e6f4f0; --muted: #8fb3aa; --line: #25483f; background: #06201d; color: #fff; }
html[data-theme="dark"] .tx .tx-panel { background: #0e2a26; color: var(--ink); border: 1px solid rgba(255,255,255,.08); box-shadow: 0 40px 80px -34px rgba(0,0,0,.75), 0 14px 30px -18px rgba(0,0,0,.5); }
html[data-theme="dark"] .tx .tx-panel .form-label { color: #c4e0d8; }
html[data-theme="dark"] .tx .tx-panel .form-control, html[data-theme="dark"] .tx .tx-panel .form-select { background: #0a1f1c; border-color: #25483f; color: #fff; }
html[data-theme="dark"] .tx .tx-panel .form-control:hover { border-color: #2f5d52; }
html[data-theme="dark"] .tx .tx-panel .form-control:focus, html[data-theme="dark"] .tx .tx-panel .form-select:focus { background: #071a17; border-color: #3fd1b3; box-shadow: 0 0 0 4px rgba(63,209,179,.22); }
html[data-theme="dark"] .tx .tx-panel .form-control::placeholder { color: #5f8a80; }
html[data-theme="dark"] .tx .tx-panel .input-group > .btn { background: #0a1f1c; border-color: #25483f; color: #8fb3aa; }
html[data-theme="dark"] .tx .auth-icon > i.lead { color: #76a098; }
html[data-theme="dark"] .tx .auth-icon:focus-within > i.lead { color: #5fe0c2; }
html[data-theme="dark"] .tx .auth-pw-btn { color: #8fb3aa; } html[data-theme="dark"] .tx .auth-pw-btn:hover { background: #1c4139; color: #fff; }
html[data-theme="dark"] .tx .tx-panel .btn-outline-dark, html[data-theme="dark"] .tx .tx-panel .btn-light.border { background: #143530; color: #fff; border-color: #25483f; }
html[data-theme="dark"] .tx .tx-panel .btn-outline-dark:hover, html[data-theme="dark"] .tx .tx-panel .btn-light.border:hover { background: #1c4139; border-color: #2f6a5d; color: #fff; box-shadow: none; }
html[data-theme="dark"] .tx .tx-panel .btn-outline-dark:disabled { background: #141b36; color: #5f8a80; border-color: #25483f; }
html[data-theme="dark"] .tx .tx-panel a { color: #5fe0c2; } html[data-theme="dark"] .tx .tx-panel a:hover { color: #9be8cc; }
html[data-theme="dark"] .tx .tx-panel .btn-brand, html[data-theme="dark"] .tx .tx-panel .btn-brand:hover { color: #fff; }
html[data-theme="dark"] .tx .tx-panel .text-secondary, html[data-theme="dark"] .tx .tx-panel .auth-foot-link, html[data-theme="dark"] .tx .tx-trust { color: #8fb3aa !important; }
html[data-theme="dark"] .tx .tx-or, html[data-theme="dark"] .tx .tx-panel .or-divider { color: #86a8a0; }
html[data-theme="dark"] .tx .tx-panel .alert-success { background: rgba(37,211,102,.14); color: #9af0bf; }
html[data-theme="dark"] .tx .tx-panel .alert-danger { background: rgba(224,69,95,.17); color: #ffb9c5; }
html[data-theme="dark"] .tx .tx-panel .alert-info { background: rgba(18,140,126,.22); color: #cfeee6; }
html[data-theme="dark"] .tx .tx-panel .alert-warning { background: rgba(245,158,11,.16); color: #ffdc9f; }
html[data-theme="dark"] .tx .tx-panel .invalid-feedback { color: #ff9db0; }
html[data-theme="dark"] .tx .auth-note { background: rgba(18,140,126,.15); border-color: rgba(95,224,194,.25); color: #cfeee6; }
html[data-theme="dark"] .tx .auth-note i { color: #5fe0c2; }
html[data-theme="dark"] .tx .tx-trail li { color: #86a8a0; } html[data-theme="dark"] .tx .tx-trail li::before { background: #25483f; }
html[data-theme="dark"] .tx .tx-trail b { background: #1c4139; color: #9cc4ba; border-color: #0e2a26; box-shadow: 0 0 0 1px #25483f; }
html[data-theme="dark"] .tx .tx-trail .now { color: #fff; } html[data-theme="dark"] .tx .tx-trail .now b { background: linear-gradient(135deg, var(--blue), var(--violet)); color: #fff; box-shadow: 0 0 0 4px rgba(63,209,179,.25); }
html[data-theme="dark"] .tx .tx-trail .done b { background: var(--wa); color: #06331d; box-shadow: none; }
html[data-theme="dark"] .tx .tx-trail .done::before, html[data-theme="dark"] .tx .tx-trail .now::before { background: linear-gradient(90deg, var(--blue), var(--violet)); }
html[data-theme="dark"] .tx .tx-meter i { background: #25483f; } html[data-theme="dark"] .tx .tx-meter-label { color: #8fb3aa; }
html[data-theme="dark"] .tx .tx-panel .avatar-sm { background: #25483f; color: #cfeee6; }
html[data-theme="dark"] .tx .auth-art rect[fill="#d5f3e3"] { fill: #1c4139; } html[data-theme="dark"] .tx .auth-art rect[fill="#fff"] { fill: #0e2a26; }
html[data-theme="dark"] .tx .auth-done .fill { fill: #123a2a; } html[data-theme="dark"] .tx .auth-done .bar { background: #25483f; }
html[data-theme="dark"] .tx .tx-foot { color: #86a8a0; }
html[data-theme="dark"] .tx-calm .tx-bg .o1 { background: var(--blue); opacity: .45; } html[data-theme="dark"] .tx-calm .tx-bg .o2 { background: var(--violet); opacity: .4; } html[data-theme="dark"] .tx-calm .tx-bg .o3 { background: var(--teal); opacity: .28; }
@media (max-width: 575.98px) { .tx-theme { width: 38px; height: 38px; } .tx-actions { gap: .45rem; } }


/* ================================================================ phone fit (v4): no sideways overflow, right-sized controls */
.tx { max-width: 100vw; }
.tx-main, .tx-stage, .tx-panel, .tx-lane { min-width: 0; }
.tx .min-w-0 { min-width: 0; }
.tx-panel .btn { max-width: 100%; }
.tx-panel .btn-lg { font-size: 1.02rem; padding: .6rem 1.1rem; }
.tx-panel .btn-outline-dark .text-truncate, .tx-panel .btn-light .text-truncate { display: block; }
@media (max-width: 575.98px) {
  .tx-cta { display: none; }                                   /* the link to the other screen is also at the bottom of each sheet */
  .tx-top { padding: .7rem .9rem; }
  .tx-brand .brand-name { font-size: 1rem; }
  .tx-main { padding-left: .7rem; padding-right: .7rem; }
  .tx-hero { margin-bottom: .9rem; }
  .tx-display { font-size: clamp(1.7rem, 8.2vw, 2.1rem); margin-bottom: .2rem; }
  .tx-pill { font-size: .74rem; padding: .3rem .7rem; margin-bottom: .6rem; }
  .tx-panel { padding: 1.05rem .95rem 1.2rem; border-radius: 20px; }
  .tx-lane-head h1, .tx-panel h1 { font-size: 1.4rem; }
  .tx-lane-head { margin-bottom: 0; }
  .tx-lane-head p { font-size: .9rem; }
  .tx-lanes { gap: 1rem; }
  .tx-panel .form-control, .tx-panel .form-select { min-height: 46px; padding: .5rem .85rem; border-radius: 12px; }
  .auth-icon > i.lead { top: 23px; left: 14px; }
  .auth-icon .form-control { padding-left: 2.6rem; }
  .tx-panel .form-label { font-size: .8rem; margin-bottom: .3rem; }
  .tx-panel .btn { border-radius: 12px; }
  .tx-panel .btn-brand, .tx-panel .btn-outline-dark { min-height: 46px; font-size: .95rem; padding: .45rem .9rem; }
  .tx-panel .btn-lg { font-size: .95rem; }
  .tx-panel .btn-light.border { min-height: 50px; font-size: .9rem; }
  .tx-panel .or-divider { margin: .9rem 0; }
  .tx-trust { font-size: .75rem; padding-top: .6rem; }
  .auth-foot-link { font-size: .85rem; margin-top: 1rem; }
  .tx-trail b { width: 26px; height: 26px; font-size: .75rem; } .tx-trail li::before { top: 12px; }
  .auth-art { width: 120px; margin-bottom: .6rem; }
  .tx-foot { font-size: .72rem; padding: .8rem 1rem 1.2rem; }
}
@media (max-width: 575.98px) { .tx-register .tx-bg { height: 340px; border-radius: 0 0 24px 24px; } }
