/* =========================================================
   AUTH PAGE â€” STYLES
   Built entirely on the project's existing CSS variables
   (see :root / [data-theme="dark"] in the base stylesheet).
   ========================================================= */

.auth-page {
    padding: var(--spacing-4xl) var(--spacing-2xl);
    position: relative;
    overflow: hidden;
    background: var(--bg-secondary);
}

/* ---------- Page-level background decoration ---------- */
.page-shape {
    position: absolute;
    border-radius: var(--radius-full);
    z-index: 0;
    pointer-events: none;
    background: var(--primary-more-light);
}

.page-shape--tr { width: 260px; height: 260px; top: -120px; right: -80px; }
.page-shape--bl { width: 220px; height: 220px; bottom: -100px; left: -90px; }

/* ---------- Layout ---------- */
.auth-container {
    max-width: var(--main-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 780px) minmax(0, 640px);
    gap: var(--spacing-4xl);
    align-items: stretch;
    position: relative;
    z-index: 1;
}

/* ---------- Left: Visual Panel ---------- */
.auth-visual {
    position: relative;
    border-radius: var(--radius-xl);
    min-height: 680px;
}
.auth-visual__frame {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-heavy);
}

.auth-visual__frame::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.397) 0%,
        rgba(0, 0, 0, 0.35) 35%,
        rgba(0, 0, 0, 0.05) 70%,
        rgba(0, 0, 0, 0) 100%
    );
}

.auth-visual__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.auth-visual__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20, 14, 8, 0.06) 0%, rgba(20, 14, 8, 0) 35%);
    pointer-events: none;
}

.auth-visual__caption {
    position: absolute;
    top: 42%;
    left: 44px;
    color: var(--text-white);
    z-index: 100;
    bottom: 0px;
}
@media (max-width:800px){
  .auth-visual__caption {
    top: 35%;
  }
}
@media (max-width:680px){
  .auth-visual__caption {
    top: 28%;
  }
}
@media (max-width:590px){
  .auth-visual__caption {
    top: 19%;
  }
}
.auth-visual__title {
    margin: 0 0 var(--spacing-lg);
    max-width: 320px;

    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(2.6rem, 4vw, 3.6rem);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.02em;

    color: var(--text-white);
    text-decoration: none;
}

.auth-visual__subtitle {
    display: inline-block;
    max-width: 300px;

    font-size: var(--font-size-base);
    font-weight: 400;
    line-height: 1.8;

    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;

    transition: color 0.25s ease;
}
.trust-badges {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-top: auto;
    position: absolute;
    bottom: 44px;
}

.trust-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;

    color: rgba(255,255,255,.95);
    text-align: center;
}

.trust-badge-icon {
    width: 2.5rem;
    height: 2.5rem;

    display: flex;
    align-items: center;
    justify-content: center;
}

.trust-badge-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
}

.trust-badge span:last-child {
    max-width: 70px;

    font-size: .78rem;
    font-weight: 500;
    line-height: 1.4;
    color: rgba(255,255,255,.92);
}
.ring-outline { position: absolute; width: 150px; height: 150px; border: 1.5px solid rgba(255,255,255,.75); border-radius: var(--radius-full); top: -28px; right: 70px; z-index: 2; }

/* ---------- Right: Form Panel ---------- */
.auth-form-panel {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-heavy);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-4xl) var(--spacing-3xl);
}

.auth-form-wrap {
    width: 100%;
    max-width: 440px;
}

/* Tabs â€” only one visible at a time */
.auth-tab { display: none; }
.auth-tab.is-active { display: block; animation: authTabFade 350ms ease; }

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

.auth-form__eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin: 0 0 var(--spacing-md);
    color: var(--primary-color);
    font-size: var(--font-size-xs);
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    text-align: center;
}

.eyebrow-plus { color: var(--primary-access); }
.eyebrow-plus svg{
    width: 14px;
    height: 14px;
}
.auth-form__heading {
    text-align: center;
    font-size: var(--font-size-3xl);
    font-weight: 700;
    margin: 0 0 var(--spacing-md);
    color: var(--text-primary);
}

.auth-form__subtitle {
    text-align: center;
    font-size: var(--font-size-base);
    line-height: 1.7;
    color: var(--text-muted);
    margin: 0 0 var(--spacing-3xl);
}

/* ---------- Form Fields ---------- */
.auth-form { display: flex; flex-direction: column; gap: var(--spacing-lg); }

.form-field label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: var(--spacing-xs);
}

.input-wrap { position: relative; display: flex; align-items: center; }

.input-icon {
    position: absolute;
    left: 14px;
    width: 17px;
    height: 17px;
    color: var(--text-muted);
    pointer-events: none;
}

.input-wrap input {
    width: 100%;
    padding: 13px var(--spacing-lg) 13px 42px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    font-family: inherit;
    font-size: var(--font-size-base);
    color: var(--text-color);
    background: var(--bg-primary);
    transition: var(--transition-normal);
}

.input-wrap input::placeholder { color: var(--text-placeholder-light); }

.input-wrap input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-more-light);
}

.toggle-password {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    padding: 0;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: var(--transition-normal);
}

.toggle-password svg { width: 18px; height: 18px; }
.toggle-password:hover { color: var(--primary-color); }
.icon-eye{
    display: none;
    grid-template-columns: repeat(4, 1fr);
}
/* ---------- Row: Remember / Forgot ---------- */
.form-row { display: flex; align-items: center; justify-content: space-between; margin-top: -4px; }

.checkbox-field {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    font-size: var(--font-size-sm);
    color: var(--text-color);
    cursor: pointer;
    user-select: none;
    line-height: 1.5;
}

.checkbox-field--terms { margin-top: -4px; }

.checkbox-field input { position: absolute; opacity: 0; width: 0; height: 0; }

.checkbox-box {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1.5px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    transition: var(--transition-normal);
    flex-shrink: 0;
    margin-top: 1px;
}

.checkbox-box svg { width: 11px; height: 11px; opacity: 0; transition: var(--transition-normal); }

.checkbox-field input:checked + .checkbox-box { background: var(--primary-color); border-color: var(--primary-color); }
.checkbox-field input:checked + .checkbox-box svg { opacity: 1; }
.checkbox-field input:focus-visible + .checkbox-box { box-shadow: 0 0 0 3px var(--primary-light); }

.checkbox-field a { color: var(--primary-color); text-decoration: underline; }

/* ---------- Link-style buttons (used instead of <a> for JS tab switches) ---------- */
.link-btn {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--primary-color);
    cursor: pointer;
}

.link-btn:hover { text-decoration: underline; }

.link-btn--back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.link-btn--back svg { width: 14px; height: 14px; }

/* ---------- Primary Button ---------- */
.btn-auth-primary {
    width: 100%;
    padding: var(--spacing-lg);
    border: none;
    border-radius: var(--radius-sm);
    background: var(--primary-color);
    color: var(--text-white);
    font-family: inherit;
    font-size: var(--font-size-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
}

.btn-auth-primary:hover { background: var(--primary-hover); }
.btn-auth-primary:active { transform: scale(0.99); }

/* ---------- Divider ---------- */
.divider {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    color: var(--text-muted);
    font-size: var(--font-size-xs);
    font-weight: 600;
    letter-spacing: 1px;
}

.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border-light); }

/* ---------- Social Buttons ---------- */
.btn-social {
    width: 100%;
    padding: 13px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    background: var(--bg-primary);
    color: var(--text-color);
    font-family: inherit;
    font-size: var(--font-size-base);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    cursor: pointer;
    transition: var(--transition-normal);
}

.btn-social svg { width: 18px; height: 18px; }
.btn-social:hover { background: var(--bg-hover); border-color: var(--primary-access); }

/* ---------- Switch prompt / resend row ---------- */
.switch-prompt, .resend-row {
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin: 0;
}

/* ---------- OTP code inputs ---------- */
.otp-field {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    justify-content: center;
    gap: var(--spacing-md);
}

.otp-input {
    width: 52px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    transition: var(--transition-normal);
}

.otp-input::placeholder{
    font-size: 24px;
}

.otp-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-more-light);
}

.form-message {
    display: none;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.form-message.active { display: flex; }

.form-message.error { background: var(--error-bg); color: var(--error-color); border: 1px solid var(--error-border); }
.form-message.success { background: var(--success-bg); color: var(--success-color); border: 1px solid var(--success-border); }
.form-message.warning { background: var(--warning-bg); color: var(--warning-color); border: 1px solid var(--warning-border); }
.form-message.info { background: var(--info-bg); color: var(--info-color); border: 1px solid var(--info-border); }

.field-error-text {
    display: none;
    font-size: var(--font-size-xs);
    color: var(--error-mes-color, var(--error-color));
    margin: 6px 0 0;
}

.field-error-text.active { display: block; }

.strength-meter { display: flex; gap: 6px; margin-top: 8px; }
.strength-bar { flex: 1; height: 4px; border-radius: 3px; background: var(--bg-tertiary); transition: var(--transition-normal); }

.btn-auth-primary.loading { opacity: 0.75; cursor: not-allowed; }
/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .auth-container { grid-template-columns: 1fr; }
    .auth-visual { min-height: 380px; }
    .blob-cluster, .ring-outline, .pin-shape, .page-shape--tr, .page-shape--bl { display: none; }
}

@media (max-width: 640px) {
    .auth-page { padding: var(--spacing-2xl) var(--spacing-lg); }
    .auth-form-panel { padding: var(--spacing-3xl) var(--spacing-xl); }
    .auth-form__heading { font-size: var(--font-size-2xl); }
    .otp-input { width: 42px; height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}