*, *::before, *::after { box-sizing: border-box; }

html:has(body[data-page="auth"]) {
  height: 100%;
  overflow-x: hidden;
}

body[data-page="auth"] {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  margin: 0;
  color: var(--text, #111827);
  background: var(--bg, #fff);
  font-family: var(--font-body, 'Arkan Graphik', sans-serif);
  --orange: #fd8a00;
  --oh: #e07a00;
  --ol: #fff4e6;
  --dark: #0d1b2a;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #fff;
  --green: #16a34a;
  --red: #dc2626;
}

body[data-page="auth"] #site-header {
  flex-shrink: 0;
  position: relative;
  z-index: 100;
}

body[data-page="auth"] .auth-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

body[data-page="auth"] .auth-site-footer {
  flex-shrink: 0;
  background: var(--dark, #0d1b2a);
}

body[data-page="auth"] .auth-footer-strip {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

body[data-page="auth"] .auth-footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

body[data-page="auth"] .auth-footer-logo img { height: 28px; }

body[data-page="auth"] .auth-footer-logo span {
  font-size: 15px;
  font-weight: 800;
  color: white;
}

body[data-page="auth"] .auth-footer-copy {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
}

body[data-page="auth"] .auth-footer-links {
  display: flex;
  gap: 20px;
}

body[data-page="auth"] .auth-footer-links a {
  font-size: 12.5px;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: color .15s;
}

body[data-page="auth"] .auth-footer-links a:hover {
  color: var(--orange, #fd8a00);
}

/* SPLIT BODY */

body[data-page="auth"] .auth-wrap {
      flex: 1;
      display: grid;
      grid-template-columns: 1fr 1fr;
      min-height: 0;
      width: 100%;
      max-width: 100%;
      overflow: visible;
    }

/* LEFT */

body[data-page="auth"] .auth-photo { position: relative; overflow: hidden; min-height: 0; z-index: 1; }

body[data-page="auth"] .auth-photo img { width: 100%; height: 100%; -o-object-fit: cover; object-fit: cover; -o-object-position: center top; object-position: center top; display: block; }

.auth-photo-overlay { position: absolute; inset: 0; background: linear-gradient(160deg, rgba(13,27,42,0.6) 0%, rgba(13,27,42,0.25) 50%, rgba(13,27,42,0.75) 100%); }

.auth-photo-content { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 40px 44px; }

/* Stat pills on photo */

.photo-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }

.photo-stat {
      background: rgba(255,255,255,0.12);
      backdrop-filter: blur(16px) saturate(1.6);
      -webkit-backdrop-filter: blur(16px) saturate(1.6);
      border: 1px solid rgba(255,255,255,0.2);
      border-radius: 12px; padding: 10px 16px;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
    }

.photo-stat-num { font-size: 20px; font-weight: 800; color: var(--orange); line-height: 1; margin-bottom: 2px; }

.photo-stat-lbl { font-size: 11px; color: rgba(255,255,255,0.55); font-weight: 600; }

.photo-tagline { font-size: 24px; font-weight: 800; color: white; line-height: 1.2; letter-spacing: -0.5px; margin-bottom: 0; text-shadow: 0 2px 12px rgba(0,0,0,0.4); }

.photo-tagline em { color: var(--orange); font-style: normal; }

/* RIGHT */

.auth-form-side {
      display: flex; align-items: center; justify-content: center;
      padding: 48px 64px;
      background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
      overflow: visible;
      min-height: 0;
      min-width: 0;
      position: relative;
      z-index: 5;
    }

.form-box { width: 100%; max-width: 400px; min-width: 0; }

.field, .pw-wrap, .row2 { min-width: 0; max-width: 100%; }

.form-hd { margin-bottom: 28px; }

.form-hd h1 { font-size: 25px; font-weight: 800; letter-spacing: -0.5px; color: var(--text); margin-bottom: 6px; }

.form-hd p { font-size: 14px; color: var(--muted); }

.form-hd p a { color: var(--orange); font-weight: 700; text-decoration: none; }

.form-hd p a:hover { text-decoration: underline; }

/* Inputs */

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

.field { margin-bottom: 15px; }

.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--text); margin-bottom: 5px; }

.field input {
      width: 100%; padding: 12px 14px;
      border: 1.5px solid var(--border); border-radius: 11px;
      font-size: 14.5px; font-family: inherit; color: var(--text);
      background: #fafafa; outline: none;
      transition: border-color .2s, background .2s, box-shadow .2s;
    }

.field select {
      width: 100%; padding: 12px 14px;
      border: 1.5px solid var(--border); border-radius: 11px;
      font-size: 14.5px; font-family: inherit; color: var(--text);
      background: #fafafa; outline: none;
      transition: border-color .2s, background .2s, box-shadow .2s;
      -webkit-appearance: none;
         -moz-appearance: none;
              appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 14px center;
      padding-inline-end: 40px;
      cursor: pointer;
    }

[dir="rtl"] .field select {
      background-position: left 14px center;
    }

.field select:focus { border-color: var(--orange); background-color: white; box-shadow: 0 0 0 3px rgba(253,138,0,0.1); }

.field select.err { border-color: var(--red); background-color: #fff8f8; }

.field input:focus { border-color: var(--orange); background: white; box-shadow: 0 0 0 3px rgba(253,138,0,0.1); }

.field input.err { border-color: var(--red); background: #fff8f8; }

.field input.ok { border-color: var(--green); }

.field-err { font-size: 11.5px; color: var(--red); margin-top: 4px; font-weight: 500; display: none; }

.field-err.on { display: block; }

/* Password */

.pw-wrap { position: relative; }

.pw-wrap input { padding-inline-end: 44px !important; }

.pw-eye { position: absolute; top: 50%; inset-inline-end: 13px; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--muted); padding: 4px; display: flex; transition: color .15s; }

.pw-eye:hover { color: var(--orange); }

/* Strength */

.strength { margin-top: 7px; }

.str-bar { display: flex; gap: 4px; margin-bottom: 3px; }

.str-seg { flex: 1; height: 3px; border-radius: 2px; background: var(--border); transition: background .25s; }

.str-lbl { font-size: 11px; font-weight: 600; color: var(--muted); }

/* Terms */

.terms { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 16px; cursor: pointer; }

.terms-box { width: 17px; height: 17px; border-radius: 5px; border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; transition: background .15s, border-color .15s; }

.terms-box.on { background: var(--orange); border-color: var(--orange); }

.terms-box.on::after {
      content: '';
      display: block;
      width: 9px;
      height: 5px;
      border-left: 2px solid #fff;
      border-bottom: 2px solid #fff;
      transform: rotate(-45deg) translateY(-1px);
    }

.terms-txt { font-size: 12.5px; color: var(--muted); line-height: 1.55; }

.terms-txt a { color: var(--orange); font-weight: 600; text-decoration: none; }

.terms-txt a:hover { text-decoration: underline; }

.terms-err { font-size: 11.5px; color: var(--red); margin-top: -8px; margin-bottom: 10px; display: none; }

.terms-err.on { display: block; }

.submit {
      width: 100%; padding: 14px;
      background: var(--orange); color: white; font-size: 15px; font-weight: 700;
      border: none; border-radius: 11px; cursor: pointer; font-family: inherit;
      display: flex; align-items: center; justify-content: center; gap: 8px;
      transition: background .18s, transform .15s, box-shadow .2s;
    }

.submit:hover { background: var(--oh); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(253,138,0,0.28); }

.submit.loading { opacity: .7; pointer-events: none; }

/* Success */

.success { display: none; text-align: center; padding: 16px 0; }

.success.on { display: block; }

.suc-icon { width: 68px; height: 68px; border-radius: 50%; background: #f0fdf4; border: 2px solid #bbf7d0; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }

.suc-title { font-size: 21px; font-weight: 800; margin-bottom: 6px; }

.suc-sub { font-size: 14px; color: var(--muted); line-height: 1.6; }

.forgot { display: flex; justify-content: flex-end; margin: -8px 0 16px; }

.forgot a { font-size: 12.5px; font-weight: 600; color: var(--orange); text-decoration: none; }

.forgot a:hover { text-decoration: underline; }

.field-icon-wrap { position: relative; }

.field-icon {
      position: absolute; top: 50%; inset-inline-start: 14px; transform: translateY(-50%);
      color: #9ca3af; pointer-events: none; display: flex; align-items: center;
    }

.field-icon-wrap input { padding-inline-start: 44px !important; }

.pw-wrap.field-icon-wrap input { padding-inline-end: 46px !important; }

.auth-card { display: contents; }

.auth-brand { display: none; }

.mobile-alt { display: none; }

.form-section { margin-bottom: 4px; }

.form-section-title {
      display: none;
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: #9ca3af;
      margin-bottom: 12px;
      padding-bottom: 8px;
      border-bottom: 1px solid #f0f2f5;
    }

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

@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 900px) {
      html:has(body[data-page="auth"]) { overflow-x: hidden; }
      body[data-page="auth"] {
        min-height: 100dvh;
        background:
          radial-gradient(ellipse 120% 60% at 50% -10%, rgba(253,138,0,0.14) 0%, transparent 55%),
          linear-gradient(180deg, #fff9f3 0%, #f3f5f8 45%, #eef1f5 100%);
      }

      body[data-page="auth"] .auth-main { overflow: visible; }

      body[data-page="auth"] #site-header {
        background: rgba(255,255,255,0.82);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(229,231,235,0.8);
        width: 100%;
        max-width: 100%;
      }

      body[data-page="auth"] .auth-wrap {
        display: block;
        flex: 1;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
      }
      body[data-page="auth"] .auth-photo { display: none; }

      body[data-page="auth"] .auth-form-side {
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding: 24px 18px 28px;
        width: 100%;
        overflow: visible;
        background: transparent;
      }

      .auth-card {
        display: block;
        width: 100%;
        max-width: 440px;
        min-width: 0;
        background: #fff;
        border-radius: 22px;
        border: 1px solid rgba(255,255,255,0.9);
        box-shadow:
          0 1px 2px rgba(13,27,42,0.04),
          0 8px 32px rgba(13,27,42,0.08),
          0 24px 48px rgba(253,138,0,0.06);
        padding: 26px 20px 24px;
        animation: fadeUp 0.45s ease both;
      }

      .auth-brand {
        display: flex;
        align-items: center;
        gap: 14px;
        margin-bottom: 22px;
        padding-bottom: 20px;
        border-bottom: 1px solid #f0f2f5;
      }
      .auth-brand-logo {
        width: 52px;
        height: 52px;
        border-radius: 16px;
        background: linear-gradient(145deg, var(--ol) 0%, #fff 100%);
        border: 1px solid rgba(253,138,0,0.2);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        box-shadow: 0 4px 14px rgba(253,138,0,0.15);
      }
      .auth-brand-logo img { height: 30px; width: auto; }
      .auth-brand-text { min-width: 0; }
      .auth-brand-text h2 {
        font-size: 21px;
        font-weight: 800;
        letter-spacing: -0.4px;
        color: var(--text);
        line-height: 1.3;
        margin-bottom: 4px;
      }
      .auth-brand-text p {
        font-size: 13px;
        color: var(--muted);
        line-height: 1.5;
      }

      .form-box { max-width: none; width: 100%; min-width: 0; }
      .form-hd { display: none; }
      .form-section-title { display: block; }

      .row2 { grid-template-columns: 1fr 1fr; gap: 10px; }
      .field { margin-bottom: 12px; }
      .field label {
        font-size: 12px;
        font-weight: 700;
        color: #374151;
        margin-bottom: 6px;
        letter-spacing: 0.02em;
        text-transform: uppercase;
      }
      .field input {
        padding: 13px 14px;
        font-size: 16px;
        border-radius: 12px;
        background: #f8fafc;
        border-color: #e8ecf1;
        max-width: 100%;
      }
      .field select {
        padding: 13px 14px;
        padding-inline-end: 40px;
        font-size: 16px;
        border-radius: 12px;
        background-color: #f8fafc;
        border-color: #e8ecf1;
        max-width: 100%;
      }
      .field input:focus {
        background: #fff;
        border-color: var(--orange);
        box-shadow: 0 0 0 4px rgba(253,138,0,0.12);
      }

      .terms {
        margin-bottom: 16px;
        min-width: 0;
        max-width: 100%;
        padding: 12px 14px;
        background: #f8fafc;
        border-radius: 12px;
        border: 1px solid #e8ecf1;
      }
      .terms-box { width: 20px; height: 20px; border-radius: 6px; }
      .terms-txt { min-width: 0; word-break: break-word; overflow-wrap: anywhere; font-size: 12px; }

      .submit {
        padding: 16px;
        min-height: 54px;
        border-radius: 14px;
        font-size: 16px;
        background: linear-gradient(135deg, #fd8a00 0%, #f07000 100%);
        box-shadow: 0 6px 20px rgba(253,138,0,0.35);
      }
      .submit:hover {
        background: linear-gradient(135deg, #f07000 0%, #e06500 100%);
        box-shadow: 0 8px 28px rgba(253,138,0,0.4);
      }

      .mobile-alt {
        display: block;
        text-align: center;
        margin-top: 20px;
        padding-top: 18px;
        border-top: 1px solid #f0f2f5;
        font-size: 14px;
        color: var(--muted);
        line-height: 1.6;
      }
      .mobile-alt a { color: var(--orange); font-weight: 700; text-decoration: none; }

      .forgot { margin: 2px 0 22px; }
      .forgot a { font-size: 13px; }

      body[data-page="auth"] .auth-site-footer {
        background: transparent;
        border-top: none;
        width: 100%;
        max-width: 100%;
      }
      body[data-page="auth"] .auth-footer-strip {
        padding: 0 18px calc(16px + env(safe-area-inset-bottom));
        justify-content: center;
        max-width: 100%;
      }
      body[data-page="auth"] .auth-footer-logo,
      body[data-page="auth"] .auth-footer-links { display: none; }
      body[data-page="auth"] .auth-footer-copy {
        color: #9ca3af;
        font-size: 11.5px;
        text-align: center;
        word-break: break-word;
      }
      [dir="rtl"] .auth-brand-text h2 { font-size: 19px; letter-spacing: 0; }
      [dir="rtl"] .row2 { grid-template-columns: 1fr; }
    }

@media (max-width: 400px) {
      .row2 { grid-template-columns: 1fr; gap: 0; }
    }

@media (min-width: 901px) and (max-width: 1100px) {
      body[data-page="auth"] .auth-form-side { padding: 40px 32px; }
    }

.photo-quote {
      background: rgba(255,255,255,0.1);
      backdrop-filter: blur(20px) saturate(1.6);
      -webkit-backdrop-filter: blur(20px) saturate(1.6);
      border: 1px solid rgba(255,255,255,0.18);
      border-radius: 18px;
      padding: 22px 24px;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
      max-width: 400px;
    }

.photo-quote-text { font-size: 15px; color: white; line-height: 1.7; font-style: italic; margin-bottom: 14px; opacity: 0.9; }

.photo-quote-author { display: flex; align-items: center; gap: 10px; }

.quote-dot { width: 32px; height: 32px; border-radius: 50%; background: var(--orange); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: white; flex-shrink: 0; }

.quote-name { font-size: 13px; font-weight: 700; color: white; }

.quote-role { font-size: 11.5px; color: rgba(255,255,255,0.55); margin-top: 2px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.terms input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

    