/* ═══════════════════════════════════════════════════════════
   User Login — Premium UX  (prefix: ul-)
   ═══════════════════════════════════════════════════════════ */

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

html,
body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0c1929 0%, #0f2847 40%, #0c1929 100%);
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: absolute;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    top: -250px;
    right: -150px;
    animation: ulFloat 9s ease-in-out infinite;
}

body::after {
    content: '';
    position: absolute;
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.10) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -180px;
    left: -120px;
    animation: ulFloat 11s ease-in-out infinite reverse;
}

@keyframes ulFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(35px, -25px) scale(1.08); }
}

.ul-ambient {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: ulFloat 13s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.ul-wrap {
    position: relative;
    z-index: 1;
    width: 860px;
    padding: 24px;
}

.ul-card {
    display: grid;
    grid-template-columns: 340px 1fr;
    grid-template-rows: 1fr auto;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 24px;
    overflow: hidden;
    box-shadow:
        0 30px 70px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.ul-header {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 40px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(6, 182, 212, 0.06) 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
}

.ul-header::after {
    content: '';
    position: absolute;
    top: 36px;
    bottom: 36px;
    right: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.06), transparent);
}

.ul-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 32px;
    color: #fff;
    box-shadow: 0 14px 36px rgba(59, 130, 246, 0.3);
    position: relative;
}

.ul-logo::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 27px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), transparent);
    z-index: -1;
    filter: blur(10px);
}

.ul-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: -0.025em;
}

.ul-subtitle {
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.5;
}

.ul-body {
    grid-column: 2;
    grid-row: 1;
    padding: 36px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ul-group {
    margin-bottom: 20px;
}

.ul-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 8px;
}

.ul-label .ul-required {
    color: #f87171;
    margin-left: 2px;
}

.ul-forgot {
    font-size: 0.78rem;
    color: #60a5fa;
    text-decoration: none;
    transition: color .2s;
}

.ul-forgot:hover {
    color: #93c5fd;
}

.ul-input-wrap {
    position: relative;
}

.ul-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 0.9rem;
    pointer-events: none;
    transition: color .2s;
}

.ul-input {
    width: 100%;
    padding: 13px 16px 13px 44px;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    font-size: 0.88rem;
    color: #f1f5f9;
    transition: border-color .2s, box-shadow .2s, background .2s;
    outline: none;
}

.ul-input::placeholder {
    color: #475569;
}

.ul-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    background: rgba(15, 23, 42, 0.8);
}

.ul-input:focus ~ .ul-input-icon {
    color: #60a5fa;
}

.ul-input.error {
    border-color: #ef4444;
}

.ul-input.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.ul-pw-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    font-size: 0.9rem;
    padding: 4px;
    transition: color .2s;
}

.ul-pw-toggle:hover {
    color: #94a3b8;
}

.ul-error {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #f87171;
    margin-top: 6px;
}

.ul-remember {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.ul-remember input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #3b82f6;
    border-radius: 4px;
    cursor: pointer;
}

.ul-remember label {
    font-size: 0.82rem;
    color: #94a3b8;
    cursor: pointer;
}

.ul-submit {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s, opacity .2s;
    position: relative;
    overflow: hidden;
}

.ul-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.35);
}

.ul-submit:active { transform: translateY(0); }
.ul-submit:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.ul-submit-text { transition: opacity .2s; }
.ul-submit .ul-spinner {
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 22px; height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ulSpin .6s linear infinite;
    display: none;
}
@keyframes ulSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.ul-submit.loading .ul-submit-text { opacity: 0; }
.ul-submit.loading .ul-spinner { display: block; }

.ul-recaptcha {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.ul-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 20px 0;
}

.ul-divider::before,
.ul-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
}

.ul-divider span {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.ul-register {
    text-align: center;
}

.ul-register p {
    font-size: 0.85rem;
    color: #94a3b8;
}

.ul-register a {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 600;
    transition: color .2s;
}

.ul-register a:hover {
    color: #93c5fd;
}

.ul-footer {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: center;
    padding: 14px 36px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.ul-footer p {
    font-size: 0.75rem;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.ul-footer i {
    color: #3b82f6;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
    .ul-card {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
    }

    .ul-header {
        grid-column: 1;
        grid-row: 1;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        padding: 32px 24px 24px;
    }

    .ul-header::after {
        display: none;
    }

    .ul-body {
        grid-column: 1;
        grid-row: 2;
        padding: 28px 24px;
    }

    .ul-footer {
        grid-column: 1;
        grid-row: 3;
    }
}

@media (max-width: 540px) {
    .ul-wrap {
        width: 100%;
        padding: 12px;
    }

    .ul-header {
        padding: 28px 20px 20px;
    }

    .ul-body {
        padding: 24px 20px;
    }

    .ul-logo {
        width: 60px;
        height: 60px;
        font-size: 24px;
        border-radius: 16px;
    }

    .ul-title {
        font-size: 1.25rem;
    }
}
