/* ==========================
   BASE
========================== */

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

body {
    background: #f1f5f9;
    font-family: 'Segoe UI', Arial, sans-serif;
}

/* ==========================
   TWO-COLUMN WRAPPER
========================== */

.auth-wrapper {
    min-height: 88vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    animation: wrapperIn .5s ease forwards;
}

@keyframes wrapperIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ==========================
   LEFT DECORATIVE PANEL
========================== */

.auth-panel {
    position: relative;
    background: linear-gradient(145deg, #0f172a 0%, #1e3a5f 55%, #1d4ed8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 50px 40px;
}

.panel-rings {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.p-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.07);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.r1 { width: 280px; height: 280px; }
.r2 { width: 460px; height: 460px; }
.r3 { width: 660px; height: 660px; animation: rotateSlow 20s linear infinite; }

@keyframes rotateSlow { to { transform: translate(-50%, -50%) rotate(360deg); } }

.panel-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    max-width: 320px;
    animation: slideInLeft .6s ease .1s both;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-24px); }
    to   { opacity: 1; transform: translateX(0); }
}

.panel-logo {
    width: 100px;
    height: 100px;
    background: transparent;
    border: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15), 0 10px 25px rgba(0, 0, 0, 0.35);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 22px;
    padding: 0;
    overflow: hidden;
}

.panel-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    display: block;
}

.panel-logo svg {
    stroke: #1e3a8a;
}

.panel-content h2 {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -.5px;
    margin-bottom: 8px;
}

.panel-content > p {
    color: #93c5fd;
    font-size: 13px;
    margin-bottom: 34px;
}

.panel-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
}

.pf-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #bfdbfe;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    padding: 10px 14px;
    border-radius: 10px;
    transition: .25s;
}

.pf-item svg { color: #4ade80; flex-shrink: 0; }

.pf-item:hover {
    background: rgba(255,255,255,.12);
    transform: translateX(4px);
}

/* ==========================
   RIGHT FORM SIDE
========================== */

.auth-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 30px;
    background: #f8fafc;
}

.auth-box {
    width: 100%;
    max-width: 400px;
    animation: slideInRight .6s ease .15s both;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(24px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Icon */
.auth-icon {
    width: 58px;
    height: 58px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    box-shadow: 0 6px 18px rgba(37,99,235,.35);
}

.auth-box h1 {
    font-size: 26px;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -.5px;
    margin-bottom: 4px;
}

.auth-sub {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 24px;
}

/* Alert banner */
.auth-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 18px;
    animation: shakeIn .4s ease;
}

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

.alert-error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* ==========================
   FORM FIELDS
========================== */

form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

label {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.req { color: #ef4444; }

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forgot-link {
    font-size: 12px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    transition: color .2s;
}

.forgot-link:hover { color: #1d4ed8; }

/* Input wrap */
.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    border: 1.5px solid #e2e8f0;
    border-radius: 11px;
    background: white;
    transition: border-color .2s, box-shadow .2s;
    overflow: hidden;
}

.input-wrap > svg {
    position: absolute;
    left: 13px;
    color: #94a3b8;
    pointer-events: none;
    flex-shrink: 0;
    transition: color .2s;
}

.input-wrap.focused {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37,99,235,.1);
}

.input-wrap.focused > svg { color: #2563eb; }

.input-wrap input {
    width: 100%;
    padding: 12px 42px 12px 40px;
    border: none;
    background: transparent;
    font-size: 14px;
    color: #0f172a;
    font-family: inherit;
    outline: none;
}

/* Eye toggle */
.eye-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
    padding: 4px;
    transition: color .2s;
}

.eye-btn:hover { color: #2563eb; }

/* ==========================
   PASSWORD STRENGTH
========================== */

.strength-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 2px;
}

.strength-fill {
    height: 100%;
    border-radius: 999px;
    width: 0;
    transition: width .4s ease, background .3s;
}

.strength-label, .match-label {
    font-size: 11px;
    font-weight: 700;
    min-height: 14px;
    transition: color .2s;
}

/* ==========================
   SUBMIT BUTTON
========================== */

.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: .25s;
    box-shadow: 0 4px 16px rgba(37,99,235,.35);
    margin-top: 4px;
}

.btn-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(37,99,235,.45);
}

.auth-btn:disabled {
    opacity: .7;
    cursor: not-allowed;
    transform: none;
}

/* Spinner */
.spinner {
    width: 16px;
    height: 16px;
    border: 2.5px solid rgba(255,255,255,.4);
    border-top-color: white;
    border-radius: 50%;
    display: inline-block;
    animation: spin .7s linear infinite;
}

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

/* ==========================
   DIVIDER & SWITCH
========================== */

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 14px;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 600;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.auth-switch {
    text-align: center;
    font-size: 13px;
    color: #64748b;
}

.auth-switch a {
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
    transition: color .2s;
}

.auth-switch a:hover { color: #1d4ed8; }

/* ==========================
   MOBILE
========================== */

@media (max-width: 768px) {

    .auth-wrapper {
        grid-template-columns: 1fr;
        min-height: unset;
    }

    .auth-panel {
        padding: 36px 24px;
        min-height: 220px;
    }

    .panel-logo {
        width: 80px;
        height: 80px;
        margin: 0 auto 16px;
    }

    .panel-content h2 { font-size: 20px; }

    .panel-features { display: none; }

    .r3 { display: none; }

    .auth-form-side {
        padding: 32px 18px 50px;
        background: #f8fafc;
    }

    .auth-box { max-width: 100%; }

    .auth-box h1 { font-size: 22px; }
}