/* ══════════════════════════════════════════════════════════
   Auth pages – blue blurred fullscreen bg + centered card
   Company: Raktch Dynamic Forms
   ══════════════════════════════════════════════════════════ */

/* ── Page wrapper ─────────────────────────────────────── */
.auth-page {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}


/* ══════════════════════════════════════════════════════════
   FULL-SCREEN BLUE BLURRED BACKGROUND
   ══════════════════════════════════════════════════════════ */
.auth-bg {
    position: fixed;
    inset: 0;
    z-index: 1;
    background: linear-gradient(135deg, #1a237e 0%, #283593 25%, #1565c0 50%, #0d47a1 75%, #0a3d91 100%);
    overflow: hidden;
}

/* ── Animated blobs ────────────────────────────────────── */
.auth-blob {
    position: absolute;
    border-radius: 50%;
    opacity: .25;
    filter: blur(80px);
    animation: blobFloat 12s ease-in-out infinite;
}
.auth-blob--1 {
    width: 500px; height: 500px;
    top: -10%; left: -8%;
    background: #42a5f5;
    animation-duration: 14s;
}
.auth-blob--2 {
    width: 400px; height: 400px;
    top: 50%; right: -10%;
    background: #7c4dff;
    animation-duration: 16s;
    animation-delay: -4s;
}
.auth-blob--3 {
    width: 350px; height: 350px;
    bottom: -5%; left: 30%;
    background: #00e5ff;
    animation-duration: 13s;
    animation-delay: -7s;
}
.auth-blob--4 {
    width: 300px; height: 300px;
    top: 20%; right: 25%;
    background: #448aff;
    animation-duration: 15s;
    animation-delay: -2s;
}

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25%      { transform: translate(30px, -20px) scale(1.05); }
    50%      { transform: translate(-20px, 25px) scale(.95); }
    75%      { transform: translate(15px, 10px) scale(1.02); }
}

/* ── Floating particles ────────────────────────────────── */
.auth-particles {
    position: absolute;
    inset: 0;
    z-index: 2;
}
.auth-particle {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: calc(6px * var(--s));
    height: calc(6px * var(--s));
    border-radius: 50%;
    background: rgba(255, 255, 255, .35);
    animation: particleDrift var(--d) ease-in-out infinite;
}

@keyframes particleDrift {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: .35; }
    50%      { transform: translate(20px, -15px) scale(1.5); opacity: .6; }
}

/* ── Blurred background content ────────────────────────── */
.auth-bg__content {
    position: absolute;
    inset: 0;
    z-index: 3;
    filter: blur(3px);
    opacity: .45;
    pointer-events: none;
}

/* ── Pill groups – positioned in corners ───────────────── */
.auth-bg__pill-group {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 260px;
}
.auth-bg__pill-group--tl { top: 8%; left: 5%; }
.auth-bg__pill-group--tr { top: 8%; right: 5%; align-items: flex-end; }
.auth-bg__pill-group--bl { bottom: 10%; left: 5%; }
.auth-bg__pill-group--br { bottom: 10%; right: 5%; align-items: flex-end; }

/* ── Feature pills ─────────────────────────────────────── */
.auth-bg__pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 24px;
    color: #fff;
    font-size: .88rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    white-space: nowrap;
    animation: pillFloat 6s ease-in-out infinite;
}
.auth-bg__pill-group--tr .auth-bg__pill,
.auth-bg__pill-group--br .auth-bg__pill { animation-delay: -2s; }
.auth-bg__pill-group--bl .auth-bg__pill { animation-delay: -4s; }

@keyframes pillFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

/* ── Stat cards in background ──────────────────────────── */
.auth-bg__stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 22px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 16px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: pillFloat 7s ease-in-out infinite;
}
.auth-bg__stat-card strong {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}
.auth-bg__stat-card small {
    font-size: .75rem;
    color: rgba(255, 255, 255, .65);
    font-weight: 500;
    margin-top: 2px;
}

/* ── Mockup form cards ──────────────────────────────────── */
.auth-bg__mock {
    position: absolute;
    width: 190px;
    padding: 16px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 14px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: mockFloat 8s ease-in-out infinite;
}
.auth-bg__mock--1 {
    top: 18%;
    left: 3%;
    --r: -5deg;
    transform: rotate(-5deg);
}
.auth-bg__mock--2 {
    bottom: 22%;
    right: 3%;
    --r: 4deg;
    transform: rotate(4deg);
    animation-delay: -3s;
}
.auth-bg__mock--3 {
    top: 55%;
    left: 6%;
    width: 170px;
    --r: 3deg;
    transform: rotate(3deg);
    animation-delay: -5s;
}
.auth-bg__mock--4 {
    top: 12%;
    right: 6%;
    width: 175px;
    --r: -3deg;
    transform: rotate(-3deg);
    animation-delay: -1.5s;
}

.auth-bg__mock-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.auth-bg__mock-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .4);
    flex-shrink: 0;
}
.auth-bg__mock-title {
    height: 6px;
    width: 60%;
    border-radius: 3px;
    background: rgba(255, 255, 255, .25);
}
.auth-bg__mock-line {
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, .15);
    margin-bottom: 8px;
}
.auth-bg__mock-input {
    height: 18px;
    border-radius: 5px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    margin-bottom: 8px;
}
.auth-bg__mock-radio,
.auth-bg__mock-checkbox {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}
.auth-bg__mock-radio span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .25);
}
.auth-bg__mock-radio span:first-child {
    background: rgba(255, 255, 255, .3);
}
.auth-bg__mock-checkbox span {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    border: 2px solid rgba(255, 255, 255, .25);
}
.auth-bg__mock-checkbox span:first-child {
    background: rgba(255, 255, 255, .3);
}
.auth-bg__mock-btn {
    height: 20px;
    width: 55%;
    border-radius: 6px;
    background: rgba(255, 255, 255, .2);
    margin-top: 4px;
}

@keyframes mockFloat {
    0%, 100% { transform: translateY(0) rotate(var(--r, -5deg)); }
    50%      { transform: translateY(-12px) rotate(var(--r, -5deg)); }
}

/* ── Analytics chart cards ─────────────────────────────── */
.auth-bg__chart {
    position: absolute;
    padding: 14px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 14px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: chartFloat 9s ease-in-out infinite;
}
.auth-bg__chart-label {
    font-size: .65rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .5);
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-bottom: 8px;
}

/* Bar chart */
.auth-bg__chart--bar {
    width: 180px;
    top: 38%;
    left: 8%;
    --r: -2deg;
    transform: rotate(-2deg);
}
.auth-bg__chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    height: 60px;
}
.auth-bg__bar {
    flex: 1;
    height: var(--h, 50%);
    background: linear-gradient(to top, rgba(66, 165, 245, .5), rgba(0, 229, 255, .35));
    border-radius: 3px 3px 0 0;
    animation: barGrow 2s ease-out both;
}
@keyframes barGrow {
    0%   { height: 0; }
    100% { height: var(--h, 50%); }
}

/* Line chart */
.auth-bg__chart--line {
    width: 200px;
    bottom: 12%;
    left: 15%;
    --r: 2deg;
    transform: rotate(2deg);
    animation-delay: -4s;
}
.auth-bg__line-svg {
    width: 100%;
    height: 60px;
    display: block;
}

/* Pie / donut chart */
.auth-bg__chart--pie {
    width: 130px;
    top: 15%;
    right: 18%;
    --r: 3deg;
    transform: rotate(3deg);
    animation-delay: -2s;
}
.auth-bg__chart--donut {
    width: 130px;
    bottom: 18%;
    right: 15%;
    --r: -2deg;
    transform: rotate(-2deg);
    animation-delay: -6s;
}
.auth-bg__pie-svg {
    width: 80px;
    height: 80px;
    display: block;
    margin: 0 auto;
}

@keyframes chartFloat {
    0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
    50%      { transform: translateY(-10px) rotate(var(--r, 0deg)); }
}


/* ══════════════════════════════════════════════════════════
   CENTERED AUTH OVERLAY
   ══════════════════════════════════════════════════════════ */

/* ── Top branding banner ───────────────────────────────── */
.auth-top-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    background: rgba(10, 25, 80, .55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.auth-top-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.auth-top-brand span {
    font-size: 1.1rem;
    color: #fff;
    font-weight: 400;
    letter-spacing: .3px;
}
.auth-top-brand strong {
    font-weight: 700;
}
.auth-top-brand-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.auth-top-url {
    font-size: .72rem;
    color: rgba(255, 255, 255, .6);
    text-decoration: none;
    font-weight: 500;
    letter-spacing: .3px;
    transition: color .2s;
}
.auth-top-url:hover {
    color: #fff;
    text-decoration: underline;
}

/* ── Animated feature cycle ────────────────────────────── */
.auth-top-features {
    overflow: hidden;
    height: 24px;
    position: relative;
}
.auth-feature-cycle {
    display: flex;
    flex-direction: column;
    animation: featureCycle 12.5s ease-in-out infinite;
}
.auth-feature-word {
    height: 24px;
    line-height: 24px;
    font-size: .88rem;
    font-weight: 500;
    color: rgba(255, 255, 255, .85);
    white-space: nowrap;
    text-align: right;
}

/* 5 items × 2.5s each = 12.5s total. Each step = 20% */
@keyframes featureCycle {
    0%, 16%    { transform: translateY(0); }
    20%, 36%   { transform: translateY(-24px); }
    40%, 56%   { transform: translateY(-48px); }
    60%, 76%   { transform: translateY(-72px); }
    80%, 96%   { transform: translateY(-96px); }
    100%       { transform: translateY(0); }
}

.auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 20px;
    padding: 36px 32px;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, .25),
        0 0 0 1px rgba(255, 255, 255, .2) inset,
        0 0 60px rgba(21, 101, 192, .15);
    animation: cardSlideIn .5s ease-out both;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

@keyframes cardSlideIn {
    0%   { opacity: 0; transform: translateY(20px) scale(.97); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Brand mark (kept for backwards compat) ────────────── */
.auth-brand {
    display: none;
}

/* ── Auth card header ──────────────────────────────────── */
.auth-header {
    margin-bottom: 22px;
    text-align: center;
}
.auth-header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 6px;
}
.auth-header p {
    margin: 0;
    font-size: .86rem;
    color: #666;
}

/* ── Error banner ──────────────────────────────────────── */
.auth-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 18px;
    border-radius: 10px;
    background: #fce8e6;
    color: #d93025;
    font-size: .86rem;
    font-weight: 500;
    animation: authShake .4s ease;
}

@keyframes authShake {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-6px); }
    50%      { transform: translateX(6px); }
    75%      { transform: translateX(-4px); }
}

/* ── Form ──────────────────────────────────────────────── */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
}

.auth-field label {
    font-size: .82rem;
    font-weight: 600;
    color: #1a1a2e;
}

.auth-field input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    padding-right: 44px;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    font-size: .95rem;
    font-family: inherit;
    color: #1a1a2e;
    background: #fff;
    transition: border-color .2s, box-shadow .2s, transform .15s;
    outline: none;
}

.auth-field input:focus {
    border-color: #1565c0;
    box-shadow: 0 0 0 3px rgba(21, 101, 192, .12);
    transform: translateY(-1px);
}

.auth-field input::placeholder {
    color: #999;
    opacity: .7;
}

/* ── Password toggle ───────────────────────────────────── */
.auth-toggle-pw {
    position: absolute;
    right: 10px;
    bottom: 9px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    border-radius: 4px;
    transition: color .15s;
}
.auth-toggle-pw:hover {
    color: #1565c0;
}

/* ── Submit button ─────────────────────────────────────── */
.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    margin-top: 6px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #1565c0, #0d47a1);
    color: #fff;
    font-size: .95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .2s, box-shadow .2s, transform .15s;
}
.auth-submit:hover {
    background: linear-gradient(135deg, #1976d2, #1565c0);
    box-shadow: 0 6px 24px rgba(21, 101, 192, .4);
    transform: translateY(-2px);
}
.auth-submit:active {
    background: linear-gradient(135deg, #0d47a1, #0a3d91);
    transform: translateY(0);
    box-shadow: none;
}

/* ── Switch link ───────────────────────────────────────── */
.auth-switch {
    margin-top: 18px;
    font-size: .86rem;
    color: #666;
    text-align: center;
}
.auth-switch a {
    color: #1565c0;
    font-weight: 600;
    text-decoration: none;
    transition: color .15s;
}
.auth-switch a:hover {
    color: #0d47a1;
    text-decoration: underline;
}


/* ══════════════════════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .auth-top-banner { padding: 10px 16px; }
    .auth-top-brand svg { width: 28px; height: 28px; }
    .auth-top-brand span { font-size: .95rem; }
    .auth-top-features { display: none; }
    .auth-bg__pill-group { max-width: 200px; }
    .auth-bg__pill { font-size: .78rem; padding: 8px 14px; }
    .auth-bg__stat-card strong { font-size: 1.2rem; }
    .auth-bg__mock { width: 150px; padding: 14px; }
    .auth-card {
        padding: 28px 20px;
        border-radius: 16px;
    }
}

@media (max-width: 480px) {
    .auth-bg__pill-group--tr,
    .auth-bg__pill-group--br { display: none; }
    .auth-bg__mock--2,
    .auth-bg__mock--3,
    .auth-bg__mock--4 { display: none; }
    .auth-bg__chart--line,
    .auth-bg__chart--donut { display: none; }
    .auth-card {
        max-width: 100%;
        padding: 24px 16px;
    }
    .auth-header h1 {
        font-size: 1.25rem;
    }
    .auth-brand svg { width: 30px; height: 30px; }
    .auth-brand span { font-size: .92rem; }
}
