@charset "UTF-8";

/* ---------- Reset & base ---------- */
.auth-body,
.auth-body * {
    box-sizing: border-box;
}

.auth-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    position: relative;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #0f172a;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.auth-body img {
    max-width: 100%;
    display: block;
}

.auth-body a {
    color: #1d6fe3;
    text-decoration: none;
    transition: color .2s ease;
}

.auth-body a:hover {
    color: #0d4eae;
}

/* ---------- Full-bleed background ---------- */
.auth-background {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(135deg, rgba(17, 24, 39, 0.82) 0%, rgba(30, 41, 59, 0.68) 50%, rgba(71, 85, 105, 0.55) 100%),
        url("/turnautoMotive.jpg") center/cover no-repeat;
}

.auth-background-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 82% 18%, rgba(148, 163, 184, 0.18), transparent 55%),
        radial-gradient(circle at 12% 88%, rgba(255, 255, 255, 0.12), transparent 50%);
}

/* ---------- Layout ---------- */
.auth-shell {
    display: grid;
    grid-template-rows: 1fr auto;
    min-height: 100vh;
    position: relative;
}

.auth-footer {
    padding: 24px 40px;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
}

/* ---------- Card ---------- */
.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 24px 40px;
}

.auth-card {
    width: 100%;
    max-width: 360px;
    padding: 26px 26px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.06),
        0 25px 60px -15px rgba(10, 25, 60, 0.45),
        0 40px 80px -20px rgba(10, 25, 60, 0.35);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: authCardIn .5s cubic-bezier(.2,.8,.2,1) both;
}

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

.auth-card-logo {
    display: flex;
    justify-content: center;
    margin: 0 0 14px;
}

.auth-card-logo img {
    width: 120px;
    height: auto;
}

.auth-card-header {
    margin-bottom: 16px;
    text-align: center;
}

.auth-card-header h2 {
    margin: 0 0 3px;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.auth-card-header p {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
}

/* ---------- Alert ---------- */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #b91c1c;
    font-size: 0.9rem;
}

.auth-alert svg {
    flex-shrink: 0;
    margin-top: 1px;
}

.auth-alert p {
    margin: 0;
}

.auth-alert p + p {
    margin-top: 4px;
}

/* ---------- Fields ---------- */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-field {
    display: block;
}

.auth-field-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.auth-field-link {
    font-size: 0.8rem;
    font-weight: 500;
    color: #1d6fe3;
}

.auth-input {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.auth-input:hover {
    border-color: #cbd5e1;
}

.auth-input:focus-within {
    background: #fff;
    border-color: #1d6fe3;
    box-shadow: 0 0 0 4px rgba(29, 111, 227, 0.12);
}

.auth-input > svg {
    margin-left: 18px;
    margin-right: 14px;
    color: #94a3b8;
    flex-shrink: 0;
}

.auth-input:focus-within > svg {
    color: #1d6fe3;
}

.auth-input input {
    flex: 1;
    width: 100%;
    border: 0;
    background: transparent;
    padding: 14px 16px 14px 4px;
    font: inherit;
    color: #0f172a;
    outline: none;
    min-width: 0;
}

.auth-input input::placeholder {
    color: #94a3b8;
}

.auth-toggle-pw {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 10px;
    transition: color .2s ease, background .2s ease;
}

.auth-toggle-pw:hover {
    color: #1d6fe3;
    background: rgba(29, 111, 227, 0.06);
}

.auth-toggle-pw .icon-eye-off { display: none; }
.auth-toggle-pw.is-visible .icon-eye { display: none; }
.auth-toggle-pw.is-visible .icon-eye-off { display: block; }

/* ---------- Submit ---------- */
.auth-submit {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    padding: 13px 20px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #1d6fe3 0%, #0d4eae 100%);
    color: #fff;
    font: inherit;
    font-weight: 600;
    font-size: 0.98rem;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(29, 111, 227, 0.28);
    transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
    overflow: hidden;
}

.auth-submit:hover:not(.is-loading):not(:disabled) {
    filter: brightness(1.05);
    box-shadow: 0 12px 28px rgba(29, 111, 227, 0.35);
    transform: translateY(-1px);
}

.auth-submit:active:not(.is-loading):not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(29, 111, 227, 0.25);
}

.auth-submit-label,
.auth-submit-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity .2s ease, transform .2s ease;
}

.auth-submit-label svg {
    transition: transform .2s ease;
}

.auth-submit:hover:not(.is-loading):not(:disabled) .auth-submit-label svg {
    transform: translateX(2px);
}

.auth-submit-loading {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(4px);
    pointer-events: none;
}

.auth-submit.is-loading {
    cursor: progress;
    filter: saturate(0.9) brightness(0.98);
    box-shadow: 0 6px 16px rgba(29, 111, 227, 0.22);
}

.auth-submit.is-loading .auth-submit-label {
    opacity: 0;
    transform: translateY(-4px);
}

.auth-submit.is-loading .auth-submit-loading {
    opacity: 1;
    transform: translateY(0);
}

.auth-submit:disabled {
    cursor: not-allowed;
}

.auth-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    animation: authSpin .7s linear infinite;
}

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

/* ---------- Links ---------- */
.auth-signup {
    margin: 24px 0 0;
    text-align: center;
    font-size: 0.92rem;
    color: #64748b;
}

.auth-signup a {
    font-weight: 600;
    margin-left: 4px;
}

/* ---------- Divider & stores ---------- */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 28px 0 18px;
    color: #94a3b8;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: calc(50% - 80px);
    height: 1px;
    background: #e2e8f0;
}

.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

.auth-stores {
    display: flex;
    justify-content: center;
    gap: 14px;
}

.auth-stores a {
    display: inline-flex;
    transition: transform .2s ease, opacity .2s ease;
    opacity: 0.92;
}

.auth-stores a:hover {
    transform: translateY(-1px);
    opacity: 1;
}

.auth-stores img {
    height: 40px;
    width: auto;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
    .auth-topbar { display: none; }
    .auth-mobile-logo { display: block; }
    .auth-panel { padding: 24px 16px; }
    .auth-card { padding: 36px 26px; }
    .auth-footer { padding: 18px 20px; font-size: 12px; }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 28px 20px;
        border-radius: 18px;
    }

    .auth-card-header h2 {
        font-size: 1.5rem;
    }

    .auth-stores img {
        height: 36px;
    }
}
