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

.main-content {
    padding: 0;
}

.login-page {
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(180deg, #eef2f7 0%, #f8fafc 100%);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(29,78,216,0.08)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
}

.login-page .main-content {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.login-wrapper {
    width: 100%;
    max-width: 720px;
}

.login-page .page-header {
    max-width: 450px;
    margin: 0 auto 2rem;
    text-align: center;
    justify-content: center;
}

.login-page .page-header > div {
    width: 100%;
}

.login-page .page-pill {
    margin: 0 auto;
}

.login-container {
    position: relative;
    z-index: 1;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: 0 16px 40px var(--shadow);
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    margin: 2rem auto;
    overflow: hidden;
    border: 2px solid var(--border);
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.logo {
    text-align: center;
    margin-bottom: 2rem;
}

.logo h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.logo p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    position: relative;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

.form-control:hover {
    border-color: var(--primary);
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    background: rgba(29, 78, 216, 0.1);
    transform: translateY(-50%) scale(1.1);
}

.password-toggle img {
    width: 20px;
    height: 20px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.password-toggle:hover img {
    opacity: 1;
}

.capslock-indicator {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #b45309;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    padding: 0.35rem 0.75rem;
    display: none;
}

.capslock-indicator.is-visible {
    display: inline-block;
}

.btn-login {
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    box-shadow: 0 8px 16px var(--shadow);
}

.btn-login:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px var(--shadow);
}

.demo-access {
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f8fafc;
}

.btn-demo-access {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #0f172a;
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.6rem 0.85rem;
    text-decoration: none;
    font-weight: 600;
}

.btn-demo-access:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e3a8a;
}

.demo-access-hint {
    margin-top: 0.6rem;
    margin-bottom: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.86rem;
}

.demo-access-credentials {
    color: #334155;
    font-size: 0.82rem;
}

.form-options {
    display: flex;
    justify-content: right;
    align-items: center;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.forgot-password {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
    color: #718096;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.divider span {
    background: rgba(255, 255, 255, 0.95);
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

.register-link {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
}

.register-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.register-link a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.social-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: white;
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.social-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.error-message {
    background: rgba(255, 82, 82, 0.1);
    color: #e53e3e;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 82, 82, 0.2);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-align: center;
}

.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading .btn-login {
    background: #a0aec0;
}

@media (max-width: 480px) {
    .login-container {
        padding: 2rem;
        margin: 1rem auto;
        border-radius: 20px;
    }

    .logo h1 {
        font-size: 1.8rem;
    }

    .social-login {
        grid-template-columns: 1fr;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-container {
    animation: fadeInUp 0.6s ease forwards;
}

.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.shape {
    position: absolute;
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.12), rgba(14, 165, 233, 0.12));
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.shape:nth-child(1) {
    width: 100px;
    height: 100px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.shape:nth-child(3) {
    width: 80px;
    height: 80px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}
