:root {
    --login-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    --login-card-bg: rgba(30, 41, 59, 0.85);
    --login-card-border: rgba(148, 163, 184, 0.15);
}

[data-theme="light"] {
    --login-gradient: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 30%, #dbeafe 70%, #e0e7ff 100%);
    --login-card-bg: rgba(255, 255, 255, 0.92);
    --login-card-border: rgba(59, 130, 246, 0.15);
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--login-gradient);
    position: relative;
    overflow: hidden;
}

/* Animated background grid dots */
.login-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(59,130,246,0.2) 1px, transparent 0);
    background-size: 40px 40px;
    animation: gridMove 20s linear infinite;
}
@keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 40px 40px; }
}

/* Animated orbs */
.login-page .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: orbFloat 12s ease-in-out infinite;
}
.login-page .orb-1 {
    width: 300px; height: 300px;
    background: #3b82f6;
    top: -50px; left: -100px;
    animation-delay: 0s;
}
.login-page .orb-2 {
    width: 250px; height: 250px;
    background: #8b5cf6;
    bottom: -80px; right: -80px;
    animation-delay: -4s;
}
.login-page .orb-3 {
    width: 200px; height: 200px;
    background: #22c55e;
    top: 40%; right: 20%;
    animation-delay: -8s;
}
@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

.login-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    padding: 2rem;
}

.login-card {
    background: var(--login-card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--login-card-border);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    animation: cardIn 0.6s ease-out;
}
[data-theme="light"] .login-card {
    box-shadow: 0 25px 60px rgba(0,0,0,0.1);
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}
.login-icon .house-icon {
    width: 56px;
    height: 56px;
    color: var(--accent);
    animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

.login-card h1 {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}
.login-card .subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

.login-card .tagline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 0.75rem 1rem;
    background: var(--accent-light);
    border-radius: 12px;
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
}
.login-card .tagline svg {
    flex-shrink: 0;
}

.form-group {
    margin-bottom: 1.25rem;
}
.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}
.form-group .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.form-group .input-wrapper svg {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    pointer-events: none;
}
.form-group input {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 2.8rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
}
.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(59,130,246,0.12);
}

.btn-login {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
}
.btn-login:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(59,130,246,0.3);
}
.btn-login:active {
    transform: translateY(0);
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Status indicators */
.login-status {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}
.login-status .status-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.login-status .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}
.login-status .dot.green {
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
}
.login-status .dot.blue {
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent);
}

@media (max-width: 480px) {
    .login-card { padding: 2rem 1.5rem; }
    .login-card h1 { font-size: 1.5rem; }
}
