/* Modern reset and design tokens */
:root {
    --bg-dark: #090d16;
    --card-bg: rgba(13, 20, 35, 0.45);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-primary: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.15);
    --input-bg: rgba(15, 23, 42, 0.6);
    --input-border: rgba(255, 255, 255, 0.1);
    --input-focus: #60a5fa;
    --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* Ambient background mesh */
.ambient-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.45;
    mix-blend-mode: screen;
    animation: float 25s infinite alternate ease-in-out;
}

.orb-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.4) 0%, transparent 80%);
    animation-duration: 20s;
}

.orb-2 {
    bottom: -15%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(147, 51, 234, 0.3) 0%, transparent 80%);
    animation-duration: 28s;
    animation-delay: -5s;
}

.orb-3 {
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, transparent 80%);
    animation-duration: 25s;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(5%, 8%) scale(1.12);
    }
    100% {
        transform: translate(-3%, -5%) scale(0.95);
    }
}

/* Login Container */
.login-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    padding: 24px;
}

.login-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 40px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 
        0 4px 30px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Brand / Header */
.brand-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 36px;
    text-align: center;
}

.brand-logo {
    font-size: 2.5rem;
    color: var(--accent-primary);
    margin-bottom: 12px;
    animation: pulse-logo 4s infinite ease-in-out;
    cursor: default;
    user-select: none;
}

@keyframes pulse-logo {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0px var(--accent-glow)); }
    50% { transform: scale(1.08); filter: drop-shadow(0 0 12px var(--accent-primary)); }
}

.brand-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.brand-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Form Controls */
.form-group {
    position: relative;
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
    transition: color 0.2s ease;
}

.form-control-input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 14px 16px;
    font-family: var(--font-family);
    font-size: 0.95rem;
    color: var(--text-primary);
    outline: none;
    transition: 
        border-color 0.2s ease, 
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.form-control-input:focus {
    border-color: var(--input-focus);
    background-color: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.form-control-input:focus + .form-label {
    color: var(--input-focus);
}

/* Remember Me section */
.options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.checkbox-container input {
    display: none;
}

.custom-checkbox {
    width: 18px;
    height: 18px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--input-bg);
    transition: all 0.2s ease;
}

.checkbox-container input:checked + .custom-checkbox {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.custom-checkbox::after {
    content: "";
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.15s ease;
    margin-bottom: 2px;
}

.checkbox-container input:checked + .custom-checkbox::after {
    opacity: 1;
}

.checkbox-container:hover .custom-checkbox {
    border-color: var(--text-secondary);
}

/* Submit Button */
.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-primary) 0%, #1d4ed8 100%);
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 
        0 6px 20px rgba(59, 130, 246, 0.45),
        0 0 0 2px rgba(59, 130, 246, 0.2);
}

.btn-submit:active {
    transform: translateY(1px);
}

/* Errors / Validation */
.validation-summary {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 24px;
    font-size: 0.875rem;
    color: #fca5a5;
}

.validation-summary ul {
    list-style-type: none;
    padding-left: 0;
}

.validation-error-span {
    font-size: 0.75rem;
    color: #fca5a5;
    display: block;
    margin-top: 6px;
}
