/* ================================================================
   auth.css  –  Dial For Astro  |  Login · Register · Forgot Pwd
   ================================================================ */

/* ── Keyframes ───────────────────────────────────────────────── */
@keyframes dfa-auth-fade-in-left {
    from { opacity: 0; transform: translateX(-36px) }
    to   { opacity: 1; transform: translateX(0) }
}
@keyframes dfa-auth-fade-in-right {
    from { opacity: 0; transform: translateX(36px) }
    to   { opacity: 1; transform: translateX(0) }
}
@keyframes dfa-auth-ring-spin {
    from { transform: rotate(0deg) }
    to   { transform: rotate(360deg) }
}
@keyframes dfa-auth-ring-spin-rev {
    from { transform: rotate(360deg) }
    to   { transform: rotate(0deg) }
}
@keyframes dfa-auth-spinner {
    0%   { transform: rotate(0deg) }
    100% { transform: rotate(360deg) }
}
@keyframes dfa-auth-pulse {
    0%, 100% { box-shadow: 0 0 6px rgba(240,120,32,.4) }
    50%       { box-shadow: 0 0 18px rgba(240,120,32,.9) }
}

/* ── Body / Layout ───────────────────────────────────────────── */
.dfa-auth-body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: var(--dfa-bg-page)
}

.dfa-auth-body .dfa-topbar { position: relative; z-index: 10 }

.dfa-auth-main {
    display: flex;
    min-height: calc(100vh - 38px);
    width: 100%
}

/* ── Left panel ──────────────────────────────────────────────── */
.dfa-auth-left {
    position: relative;
    flex: 0 0 50%;
    min-height: 100%;
    background-image: url("../images/bannerhome.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    display: flex;
    flex-direction: column
}

.dfa-auth-left__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        108deg,
        rgba(26,  8,  0,.88)  0%,
        rgba(58, 18,  0,.82) 18%,
        rgba(80, 30,  0,.75) 36%,
        rgba(100,40,  0,.65) 54%,
        rgba(26,  8,  0,.55) 72%,
        rgba(26,  8,  0,.45) 86%,
        rgba(26,  8,  0,.38) 100%
    )
}

.dfa-auth-left__top-line {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    z-index: 3;
    background: linear-gradient(90deg, transparent, #f07820, #c84a08, #b01820, transparent)
}

/* Rings */
.dfa-auth-left__ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px dashed rgba(240,120,32,.2);
    pointer-events: none;
    z-index: 2
}
.dfa-auth-left__ring--1 {
    width: 520px; height: 520px;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    animation: dfa-auth-ring-spin 28s linear infinite
}
.dfa-auth-left__ring--2 {
    width: 360px; height: 360px;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    border-color: rgba(176,24,32,.18);
    animation: dfa-auth-ring-spin-rev 20s linear infinite
}
.dfa-auth-left__ring--3 {
    width: 180px; height: 180px;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    border-color: rgba(250,160,64,.25);
    animation: dfa-auth-ring-spin 14s linear infinite
}

.dfa-auth-left__inner {
    position: relative;
    z-index: 4;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 2.5rem 2.8rem;
    gap: 2.5rem
}

.dfa-auth-left__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 460px;
    width: 100%;
    animation: dfa-auth-fade-in-left .9s .1s ease both
}

/* ── Hero copy (left panel) ──────────────────────────────────── */
.dfa-auth-hero__badge {
    display: inline-block;
    padding: var(--dfa-badge-pad);
    border-radius: var(--dfa-radius-btn);
    background: rgba(240,120,32,.2);
    box-shadow: inset 0 0 0 1.5px rgba(240,120,32,.55);
    backdrop-filter: blur(10px);
    font-family: var(--dfa-font);
    font-size: var(--dfa-badge-font);
    font-weight: 600;
    letter-spacing: var(--dfa-badge-ls);
    text-transform: uppercase;
    color: #fcebd8;
    margin-bottom: 18px
}

.dfa-auth-hero__title {
    font-family: var(--dfa-font);
    font-size: clamp(2rem,3.2vw,2.8rem);
    font-weight: 800;
    line-height: 1.18;
    color: #fff;
    margin-bottom: 10px;
    letter-spacing: var(--dfa-heading-ls)
}

.dfa-auth-hero__sub {
    font-family: var(--dfa-font);
    font-size: .85rem;
    font-weight: 500;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: #faa040;
    margin-bottom: 18px
}

.dfa-auth-hero__divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 18px
}

.dfa-auth-hero__divider-line {
    width: 60px; height: 1.5px;
    border-radius: 2px;
    background: linear-gradient(90deg, rgba(240,120,32,.9), transparent)
}

.dfa-auth-hero__divider-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #f07820;
    animation: dfa-auth-pulse 2s ease-in-out infinite
}

.dfa-auth-hero__para {
    font-family: var(--dfa-font);
    font-size: .92rem;
    color: rgba(255,247,237,.85);
    line-height: 1.9;
    margin-bottom: 28px
}

.dfa-auth-hero__chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px
}

.dfa-auth-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border-radius: var(--dfa-radius-btn);
    background: rgba(255,255,255,.1);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,.22);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 4px 16px rgba(0,0,0,.18);
    font-family: var(--dfa-font);
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255,247,237,.92)
}

.dfa-auth-chip i { color: #faa040; font-size: 12px }

/* ── Brand logo (both panels) ────────────────────────────────── */
.dfa-auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0
}

/* Left panel: large logo */
.dfa-auth-brand__logo {
    width: 72px; height: 72px;
    border-radius: 50%;
    border: 2px solid var(--dfa-primary);
    box-shadow: 0 0 22px rgba(240,120,32,.5);
    object-fit: cover;
    animation: dfa-rotate-cw 22s linear infinite;
    flex-shrink: 0
}

/* Brand text is NEVER shown on any view */
.dfa-auth-brand__text { display: none !important }

/* ── Right panel ─────────────────────────────────────────────── */
.dfa-auth-right {
    flex: 0 0 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dfa-bg-page);
    overflow-y: auto;
    min-height: 100%
}

.dfa-auth-right__inner {
    width: 100%;
    max-width: 580px;
    margin: 0 auto;
    padding: 2rem 2rem 2.8rem;
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: dfa-auth-fade-in-right .85s .15s ease both
}

/* ── Back button ─────────────────────────────────────────────── */
.dfa-auth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--dfa-font);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--dfa-text-muted);
    text-decoration: none;
    transition: color .2s, gap .2s;
    align-self: flex-start;        /* stay left */
    margin-right: auto             /* push right if needed */
}

.dfa-auth-back:hover {
    color: var(--dfa-primary);
    gap: 10px
}

/* desktop-only back button → hidden on mobile */
.dfa-auth-back--desktop { display: inline-flex }

/* ── Mobile logo ─────────────────────────────────────────────── */
.dfa-auth-brand--mobile {
    display: none;
    justify-content: center;
    align-self: center
}

/* ── Card ────────────────────────────────────────────────────── */
.dfa-auth-card {
    background: var(--dfa-bg-card);
    border: 1.5px solid var(--dfa-border);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 16px 56px rgba(232,96,16,.1), 0 2px 8px rgba(0,0,0,.06)
}

.dfa-auth-card__top-bar {
    height: 5px;
    background: linear-gradient(90deg, #faa040, #f07820, #c84a08, #b01820)
}

.dfa-auth-card__head {
    padding: 2rem 2rem 1.4rem;
    text-align: center
}

.dfa-auth-card__title {
    font-family: var(--dfa-font);
    font-size: clamp(1.3rem,2.5vw,1.75rem);
    font-weight: 800;
    color: var(--dfa-dark);
    line-height: 1.2;
    margin-bottom: 8px;
    letter-spacing: var(--dfa-heading-ls)
}

.dfa-auth-card__title span {
    background: var(--dfa-grad-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text
}

.dfa-auth-card__subtitle {
    font-family: var(--dfa-font);
    font-size: .8rem;
    color: var(--dfa-text-muted);
    letter-spacing: .05em
}

/* ── Form ────────────────────────────────────────────────────── */
.dfa-auth-form {
    padding: 0 2rem 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 18px
}

/* Two-column row (register first/last name) */
.dfa-auth-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px
}

.dfa-auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px
}

.dfa-auth-field__label {
    font-family: var(--dfa-font);
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--dfa-primary-dark)
}

.dfa-auth-field__label-row {
    display: flex;
    align-items: center;
    justify-content: space-between
}

.dfa-auth-field__forgot {
    font-family: var(--dfa-font);
    font-size: .65rem;
    font-weight: 600;
    letter-spacing: .06em;
    color: var(--dfa-primary-dark);
    text-decoration: none;
    transition: color .2s
}

.dfa-auth-field__forgot:hover { color: var(--dfa-primary) }

.dfa-auth-field__wrap {
    position: relative;
    display: flex;
    align-items: center
}

.dfa-auth-field__icon {
    position: absolute;
    left: 13px;
    font-size: 15px;
    color: var(--dfa-text-muted);
    pointer-events: none;
    transition: color .2s
}

.dfa-auth-field__wrap:focus-within .dfa-auth-field__icon { color: var(--dfa-primary) }

.dfa-auth-field__input {
    width: 100%;
    padding: 12px 42px;
    border: 1.5px solid var(--dfa-border);
    border-radius: var(--dfa-radius-input);
    background: var(--dfa-bg-surface);
    font-family: var(--dfa-font);
    font-size: .88rem;
    color: var(--dfa-dark);
    outline: none;
    transition: border-color .2s, background .2s, box-shadow .2s
}

.dfa-auth-field__input::placeholder { color: var(--dfa-text-muted); opacity: .65 }

.dfa-auth-field__input:focus {
    border-color: var(--dfa-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(240,120,32,.12)
}

.dfa-auth-field__input.dfa-err {
    border-color: var(--dfa-logo-red);
    box-shadow: 0 0 0 3px rgba(176,24,32,.1)
}

.dfa-auth-field__eye {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--dfa-text-muted);
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    transition: color .2s
}

.dfa-auth-field__eye:hover { color: var(--dfa-primary) }

.dfa-auth-field__err {
    font-family: var(--dfa-font);
    font-size: .66rem;
    color: var(--dfa-logo-red);
    letter-spacing: .04em;
    min-height: 14px
}

/* ── Remember / Terms ────────────────────────────────────────── */
.dfa-auth-remember { display: flex; align-items: center }

.dfa-auth-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer
}

.dfa-auth-check input[type="checkbox"] { display: none }

.dfa-auth-check__box {
    width: 18px; height: 18px;
    border: 2px solid var(--dfa-border);
    border-radius: 5px;
    background: var(--dfa-bg-surface);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .2s, background .2s
}

.dfa-auth-check__box::after {
    content: "";
    width: 10px; height: 10px;
    border-radius: 2px;
    background: var(--dfa-grad-main);
    transform: scale(0);
    transition: transform .2s
}

.dfa-auth-check input:checked + .dfa-auth-check__box { border-color: var(--dfa-primary) }
.dfa-auth-check input:checked + .dfa-auth-check__box::after { transform: scale(1) }

.dfa-auth-check__label {
    font-family: var(--dfa-font);
    font-size: .74rem;
    color: var(--dfa-text-muted);
    letter-spacing: .04em
}

.dfa-auth-terms-link {
    color: var(--dfa-primary-dark);
    font-weight: 600;
    text-decoration: none;
    transition: color .2s
}

.dfa-auth-terms-link:hover { color: var(--dfa-primary) }

/* ── Submit button ───────────────────────────────────────────── */
.dfa-auth-submit {
    width: 100%;
    padding: 14px;
    border-radius: var(--dfa-radius-btn);
    background: var(--dfa-grad-main);
    border: none;
    color: #fff;
    font-family: var(--dfa-font);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform .25s, box-shadow .25s;
    box-shadow: 0 8px 28px rgba(200,74,8,.38);
    position: relative;
    overflow: hidden
}

.dfa-auth-submit::before {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.18), transparent);
    transition: left .55s ease
}

.dfa-auth-submit:hover::before { left: 140% }

.dfa-auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(200,74,8,.55)
}

.dfa-auth-submit:active { transform: translateY(0) }

.dfa-auth-submit__text,
.dfa-auth-submit__loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px
}

.dfa-auth-spinner {
    display: inline-block;
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: dfa-auth-spinner .7s linear infinite
}

/* ── Success banner ──────────────────────────────────────────── */
.dfa-auth-success {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px;
    border-radius: var(--dfa-radius-input);
    background: rgba(34,197,94,.1);
    border: 1px solid rgba(34,197,94,.35);
    font-family: var(--dfa-font);
    font-size: .78rem;
    font-weight: 600;
    color: #16a34a
}

.dfa-auth-success i { font-size: 16px }

/* ── Card footer ─────────────────────────────────────────────── */
.dfa-auth-card__foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 1rem 2rem;
    border-top: 1px solid var(--dfa-border);
    background: var(--dfa-bg-surface);
    font-family: var(--dfa-font);
    font-size: .74rem;
    color: var(--dfa-text-muted)
}

.dfa-auth-card__foot-link {
    font-family: var(--dfa-font);
    font-size: .74rem;
    font-weight: 700;
    color: var(--dfa-primary-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color .2s
}

.dfa-auth-card__foot-link:hover { color: var(--dfa-primary) }

/* ── Trust bar ───────────────────────────────────────────────── */
.dfa-auth-trust {
    display: flex;
    justify-content: center;
    gap: 0;
    padding: .7rem 2rem .9rem;
    border-top: 1px solid var(--dfa-border)
}

.dfa-auth-trust__item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 16px;
    font-family: var(--dfa-font);
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--dfa-text-muted)
}

.dfa-auth-trust__item + .dfa-auth-trust__item { border-left: 1px solid var(--dfa-border) }
.dfa-auth-trust__item i { color: var(--dfa-primary); font-size: 13px }

/* ── Forgot-password specific ────────────────────────────────── */
.dfa-auth-fp-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: rgba(240,120,32,.1);
    border: 2px solid rgba(240,120,32,.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 26px;
    color: var(--dfa-primary)
}

.dfa-auth-fp-note {
    font-family: var(--dfa-font);
    font-size: .8rem;
    color: var(--dfa-text-muted);
    line-height: 1.7;
    text-align: center;
    margin-bottom: 4px
}

.dfa-auth-fp-sent {
    margin: 0 2rem 1.4rem
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 991.98px) {
    /* Hide left panel */
    .dfa-auth-left { display: none }

    .dfa-auth-right {
        flex: 0 0 100%;
        align-items: flex-start
    }

    .dfa-auth-right__inner {
        max-width: 580px;
        margin: 0 auto;
        padding: 1.8rem 1.2rem 2.4rem
    }

    /* Hide desktop back button, show mobile logo */
    .dfa-auth-back--desktop { display: none }

    .dfa-auth-brand--mobile { display: flex }

    /* Mobile logo: smaller */
    .dfa-auth-brand--mobile .dfa-auth-brand__logo {
        width: 52px; height: 52px
    }
}

@media (max-width: 768px) {
    .dfa-auth-right__inner { padding: 1.4rem 1rem 2rem }
    .dfa-auth-card__head   { padding: 1.4rem 1.4rem .9rem }
    .dfa-auth-form         { padding: 0 1.4rem 1.2rem; gap: 14px }
    .dfa-auth-card__foot   { padding: .85rem 1.4rem }
    .dfa-auth-trust        { padding: .6rem 1.4rem .8rem }
}

@media (max-width: 576px) {
    /* Name row stacks vertically */
    .dfa-auth-field-row { grid-template-columns: 1fr }

    .dfa-auth-trust {
        flex-wrap: wrap;
        justify-content: center
    }
    .dfa-auth-trust__item + .dfa-auth-trust__item { border-left: none }
    .dfa-auth-trust__item { padding: 3px 10px }
    .dfa-auth-card__title { font-size: 1.25rem }

    /* Mobile logo even smaller */
    .dfa-auth-brand--mobile .dfa-auth-brand__logo { width: 46px; height: 46px }
}

@media (max-width: 360px) {
    .dfa-auth-field__input { font-size: .82rem }
}