*{ margin:0; padding:0; box-sizing:border-box; }

body{
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,system-ui,sans-serif;
    min-height:100vh;
    display:flex;
    /* column layout ensures the universal footer appended by sokoni-footer.js
       renders BELOW the auth card and never beside it */
    flex-direction:column;
    align-items:center;
    justify-content:flex-start;
    background:#0a0a0a;
    /* overflow-y intentionally unset — setting it breaks position:fixed on iOS */
    overflow-x:hidden;
}

/* BACKGROUND */

/* Decorative only. It must NEVER receive a pointer event.
 *
 * This layer is an empty <div> painting a background image. It was intercepting every tap on
 * the login page — email, password, Remember Me, Sign In, Google, Facebook, Phone — because it
 * is position:fixed, covers the viewport, and defaulted to pointer-events:auto.
 *
 * pointer-events:none is the correct fix for a decorative layer, and it is also load-bearing
 * defence: sokoni-sheet.js promotes full-screen fixed elements above the header, and it skips
 * anything that cannot receive pointer events. Belt and braces — the design is untouched. */
.auth-bg{
    position:fixed;
    inset:0;
    background:url("assets/backG2.jpeg") center/cover no-repeat;
    filter:brightness(0.3) saturate(1.2);
    z-index:0;
    pointer-events:none;
}

/* OVERLAY GRADIENT */

/* The gradient wash. Decorative, and it inherits nothing — a pseudo-element gets its own
   pointer-events, so it must be told explicitly or it keeps eating taps. */
.auth-bg::after{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    background:radial-gradient(
        circle at 30% 50%,
        rgba(113,255,0,0.08),
        transparent 60%
    ),radial-gradient(
        circle at 70% 50%,
        rgba(0,100,255,0.06),
        transparent 60%
    );
}

/* PAGE */

.auth-page{
    position:relative;
    z-index:1;
    display:flex;
    align-items:flex-start;
    justify-content:center;
    width:100%;
    min-height:100vh;
    padding:20px;
    padding-top:max(20px, env(safe-area-inset-top));
    padding-bottom:max(20px, env(safe-area-inset-bottom));
}

/* CARD */

.auth-card{
    background:rgba(255,255,255,0.06);
    backdrop-filter:blur(32px);
    -webkit-backdrop-filter:blur(32px);
    border:1px solid rgba(255,255,255,0.12);
    border-radius:32px;
    padding:32px 30px;
    width:100%;
    max-width:420px;
    max-height:calc(100vh - 40px);
    overflow-y:auto;
    overflow-x:hidden;
    scrollbar-width:thin;
    scrollbar-color:rgba(113,255,0,0.3) transparent;
    box-shadow:
        0 24px 64px rgba(0,0,0,0.55),
        inset 0 1px 0 rgba(255,255,255,0.1);
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:10px;
    animation:cardIn 0.5s ease;
}
.auth-card::-webkit-scrollbar{ width:4px; }
.auth-card::-webkit-scrollbar-track{ background:transparent; }
.auth-card::-webkit-scrollbar-thumb{ background:rgba(113,255,0,0.3); border-radius:4px; }

@keyframes cardIn{
    from{ opacity:0; transform:translateY(24px) scale(0.97); }
    to{   opacity:1; transform:translateY(0)    scale(1); }
}

/* BRAND — SVG icon + typographic wordmark. No image card, no black rectangle. */

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.auth-brand-icon {
    width: 54px;
    height: 54px;
    display: block;
    object-fit: contain;
    flex-shrink: 0;
    /* Transparent SVG renders on the glass card with no background rectangle */
    user-select: none;
    -webkit-user-drag: none;
}

.auth-brand-word {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.22em;
    color: #fff;
    text-transform: uppercase;
    line-height: 1;
}

.auth-brand-tag {
    font-size: 12px;
    color: rgba(255,255,255,0.42);
    letter-spacing: 0.03em;
    text-align: center;
    line-height: 1.5;
    margin-top: -2px;
}

@media(max-width:480px){
    .auth-brand-icon { width: 46px; height: 46px; }
    .auth-brand-word { font-size: 18px; }
}

/* TITLE */

.auth-title{
    font-size:24px;
    font-weight:800;
    color:white;
    text-align:center;
}

.auth-sub{
    color:rgba(255,255,255,0.42);
    font-size:13px;
    text-align:center;
    margin-top:-4px;
    line-height:1.5;
}

/* FIELDS */

.auth-field{
    width:100%;
    position:relative;
}

.auth-field i{
    position:absolute;
    left:16px;
    top:50%;
    transform:translateY(-50%);
    color:rgba(255,255,255,0.35);
    font-size:14px;
    pointer-events:none;
}

.auth-field input{
    width:100%;
    padding:15px 15px 15px 44px;
    background:rgba(255,255,255,0.06);
    border:1px solid rgba(255,255,255,0.1);
    border-radius:14px;
    color:white;
    font-size:16px;
    outline:none;
    transition:0.3s ease;
    font-family:inherit;
}

.auth-field input::placeholder{ color:rgba(255,255,255,0.32); }

.auth-field input:focus{
    border-color:rgba(113,255,0,0.45);
    background:rgba(255,255,255,0.09);
    box-shadow:0 0 0 3px rgba(113,255,0,0.08);
}

/* BUTTON */

.auth-btn{
    width:100%;
    padding:16px;
    background:linear-gradient(135deg,#71ff00,#4fc800);
    color:black;
    font-weight:800;
    font-size:15px;
    border:none;
    border-radius:14px;
    cursor:pointer;
    transition:0.3s ease;
    box-shadow:0 8px 24px rgba(113,255,0,0.25);
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    font-family:inherit;
    margin-top:4px;
}

.auth-btn:hover{
    transform:translateY(-3px);
    box-shadow:0 14px 32px rgba(113,255,0,0.4);
}

.auth-btn:active{ transform:scale(0.98); }

/* MESSAGE */

.auth-msg{
    width:100%;
    padding:12px 16px;
    border-radius:12px;
    font-size:14px;
    font-weight:600;
    display:none;
    text-align:center;
    font-family:inherit;
}

.auth-msg.error{
    display:block;
    background:rgba(255,61,61,0.12);
    border:1px solid rgba(255,61,61,0.28);
    color:#ff6b6b;
}

.auth-msg.success{
    display:block;
    background:rgba(113,255,0,0.1);
    border:1px solid rgba(113,255,0,0.28);
    color:#71ff00;
}

/* SWITCH */

.auth-switch{
    color:rgba(255,255,255,0.42);
    font-size:14px;
    text-align:center;
}

.auth-switch a{
    color:#71ff00;
    text-decoration:none;
    font-weight:700;
}

.auth-switch a:hover{ text-decoration:underline; }

/* SKIP / GUEST */

.auth-skip{
    color:rgba(255,255,255,0.3);
    font-size:13px;
    text-decoration:none;
    display:flex;
    align-items:center;
    gap:6px;
    transition:0.2s;
    margin-top:4px;
}

.auth-skip:hover{ color:rgba(255,255,255,0.6); }

@media(max-width:480px){
    .auth-card{ padding:26px 18px; }
}

/* ── Auth pages extra breakpoints ── */
@media(max-width:600px){
  .auth-page{
    padding:16px 10px;
    /* accommodate bottom-nav and KASS FAB */
    padding-bottom:max(80px, calc(env(safe-area-inset-bottom, 0px) + 80px));
    align-items:stretch;        /* card stretches full column width */
  }
  .auth-card{
    max-width:100%;             /* full available width on mobile */
    width:100%;
    margin:0;
    border-radius:20px;
    padding:28px 18px;
    max-height:none;            /* allow natural scroll, not internal clip */
    overflow-y:visible;
  }
  .auth-title{font-size:22px;}
  .auth-input{padding:13px 14px;font-size:16px;}
  .auth-btn{padding:14px;font-size:15px;}
  .auth-social-btn{font-size:13px;padding:11px;}
}
@media(max-width:380px){
  .auth-page{padding:10px 8px;}
  .auth-card{padding:22px 14px;border-radius:16px;}
  .auth-title{font-size:18px;}
  .auth-input{padding:11px 12px;font-size:16px;}
  .auth-btn{padding:12px;font-size:14px;}
}
@media(max-width:320px){
  .auth-card{padding:18px 12px;border-radius:14px;}
  .auth-title{font-size:17px;}
  .auth-social-grid{grid-template-columns:1fr;} /* stack buttons vertically at 320px */
}

/* ══════════════════════════════════════════════════════════════
   GOOGLE OAUTH BUTTON + DIVIDER
══════════════════════════════════════════════════════════════ */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  font-size: 11px;
  color: rgba(255,255,255,0.28);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.09);
}

.auth-google-btn {
  width: 100%;
  padding: 14px 16px;
  background: #ffffff;
  color: #3c4043;
  font-weight: 600;
  font-size: 14px;
  border: 1.5px solid #dadce0;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  transition: background .2s, box-shadow .2s, border-color .2s, transform .15s;
  margin-top: 4px;
  letter-spacing: .01em;
  -webkit-tap-highlight-color: transparent;
}
.auth-google-btn:hover {
  background: #f8f9fa;
  box-shadow: 0 2px 16px rgba(0,0,0,0.18);
  border-color: #c6c9cc;
}
.auth-google-btn:active { transform: scale(0.98); }
.auth-google-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.auth-google-btn svg { flex-shrink: 0; }
.auth-google-btn .g-btn-text { flex: 1; text-align: center; }

@media (max-width: 380px) {
  .auth-google-btn { font-size: 13px; padding: 12px 14px; }
}

/* ══════════════════════════════════════════════════════════════
   SOCIAL PROVIDER GRID — 3 columns, icon + label
══════════════════════════════════════════════════════════════ */
.auth-social-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 2px 0 6px;
}

.auth-social-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 13px 8px;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(255,255,255,0.09);
  border-radius: 14px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.65);
  font-family: inherit;
  transition: background .18s, border-color .18s, transform .14s, color .18s;
  -webkit-tap-highlight-color: transparent;
  line-height: 1.2;
  letter-spacing: .01em;
}
.auth-social-btn:hover  { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); transform: translateY(-2px); }
.auth-social-btn:active { transform: scale(0.96); }
.auth-social-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.auth-social-btn svg,
.auth-social-btn .ssb-icon { flex-shrink: 0; display: block; }

/* Provider accent colours */
.auth-social-btn.google-btn  { border-color: rgba(66,133,244,0.22); }
.auth-social-btn.google-btn:hover  { background: rgba(66,133,244,0.08); border-color: rgba(66,133,244,0.45); }
.auth-social-btn.phone-btn   { border-color: rgba(113,255,0,0.22); }
.auth-social-btn.phone-btn:hover   { background: rgba(113,255,0,0.08); border-color: rgba(113,255,0,0.5); color: #71ff00; }
.auth-social-btn.fb-btn      { border-color: rgba(24,119,242,0.22); }
.auth-social-btn.fb-btn:hover      { background: rgba(24,119,242,0.08); border-color: rgba(24,119,242,0.45); }

@media (max-width: 380px) {
  .auth-social-grid { gap: 8px; }
  .auth-social-btn  { padding: 11px 6px; font-size: 10px; }
}

/* ══════════════════════════════════════════════════════════════
   REMEMBER ME CHECKBOX ROW
══════════════════════════════════════════════════════════════ */
.auth-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 10px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}
.auth-remember input[type="checkbox"] {
  accent-color: #71ff00;
  width: 15px;
  height: 15px;
  cursor: pointer;
  flex-shrink: 0;
}
.auth-remember label { cursor: pointer; user-select: none; }
.auth-remember .auth-forgot-link {
  margin-left: auto;
  color: rgba(113,255,0,0.75);
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
}
.auth-remember .auth-forgot-link:hover { color: #71ff00; }

/* ══════════════════════════════════════════════════════════════
   PHONE OTP SECTION (collapsible, slides open)
══════════════════════════════════════════════════════════════ */
#phoneAuthSection {
  max-height: 0;
  overflow: hidden;
  transition: max-height .32s ease, opacity .32s ease;
  opacity: 0;
  margin-top: 0;
}
#phoneAuthSection.open {
  max-height: 420px;
  opacity: 1;
  margin-top: 4px;
}

.phone-section-label {
  font-size: 10px;
  font-weight: 800;
  color: rgba(255,255,255,0.35);
  letter-spacing: .09em;
  text-transform: uppercase;
  margin: 12px 0 8px;
  text-align: center;
}

.phone-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.phone-code-input {
  width: 78px;
  flex-shrink: 0;
  padding: 15px 10px;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 13px;
  color: white;
  font-size: 14px;
  font-weight: 800;
  font-family: inherit;
  text-align: center;
  transition: border-color .2s;
}
.phone-code-input:focus { outline: none; border-color: rgba(113,255,0,0.55); }

/* The six-digit grid (.otp-row / .otp-digit) is gone — replaced by the single
   verification field in sokoni-otp.js, which owns its own styling so login,
   onboarding and provider-onboarding cannot drift apart again. */
.otp-resend-row {
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.32);
  margin-top: 2px;
}
.otp-resend-row a {
  color: rgba(113,255,0,0.75);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.otp-resend-row a:hover { color: #71ff00; }

/* ══════════════════════════════════════════════════════════════
   TRUST BADGES — inline SVG icons, never emoji
══════════════════════════════════════════════════════════════ */
.auth-trust {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.auth-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
}
.auth-trust-badge svg {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}
.auth-trust-badge.trust-green {
  background: rgba(113,255,0,0.07);
  border: 1px solid rgba(113,255,0,0.18);
  color: rgba(113,255,0,0.85);
}
.auth-trust-badge.trust-blue {
  background: rgba(0,180,255,0.07);
  border: 1px solid rgba(0,180,255,0.18);
  color: rgba(0,180,255,0.85);
}
.auth-trust-badge.trust-muted {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.45);
}

/* FIELD ICONS — Font Awesome <i> tags, absolutely positioned */
.auth-field i.fa,
.auth-field i.fas,
.auth-field i.far,
.auth-field i.fab {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.35);
  font-size: 14px;
  pointer-events: none;
}

/* Show/hide password button */
.auth-pw-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,0.38);
  cursor: pointer;
  font-size: 14px;
  padding: 6px;
  line-height: 1;
  transition: color .18s;
}
.auth-pw-toggle:hover { color: rgba(255,255,255,0.7); }
