:root {
    color-scheme: light;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    justify-content: center;
    background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
    padding: 2rem;
}

.login-grid {
    width: 100%;
    max-width: 1100px;
    background: #fff;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    overflow: hidden;
}

.login-hero {
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.9), rgba(30, 64, 175, 0.95));
    color: #fff;
    padding: 3rem;
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 420px;
}

.hero-content .badge {
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-content h1 {
    margin-top: 1.5rem;
    font-size: 2.5rem;
    font-weight: 700;
}

.hero-content p {
    margin-top: 1rem;
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.hero-content ul {
    margin-top: 1.5rem;
    list-style: none;
    padding: 0;
}

.hero-content ul li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.hero-content ul i {
    color: #a5b4fc;
}

.login-panel {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.panel-header img {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    border: 4px solid #eff6ff;
}

.panel-header .welcome {
    font-size: 0.95rem;
    color: #64748b;
}

.panel-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0f172a;
}

.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.alert i {
    font-size: 1rem;
}

.alert-error {
    background: #fef2f2;
    color: #b91c1c;
}

.alert-info {
    background: #eff6ff;
    color: #1d4ed8;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group label {
    font-size: 0.95rem;
    font-weight: 500;
    color: #0f172a;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.input-wrapper:focus-within {
    border-color: #2563eb;
    background: #fff;
}

.input-wrapper i {
    color: #94a3b8;
}

.input-wrapper input {
    border: none;
    flex: 1;
    background: transparent;
    font-size: 1rem;
    color: #0f172a;
}

.input-wrapper input:focus {
    outline: none;
}

.toggle-password {
    border: none;
    background: none;
    color: #94a3b8;
    cursor: pointer;
}

.input-group.has-error .input-wrapper {
    border-color: #dc2626;
    background: #fef2f2;
}

.input-error {
    font-size: 0.85rem;
    color: #b91c1c;
    margin-top: 0.35rem;
}

.form-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #475569;
}

.remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    user-select: none;
}

.forgot-link {
    color: #2563eb;
    font-weight: 500;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border-radius: 0.75rem;
    padding: 0.85rem;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-spinner {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    margin-left: 0.75rem;
    display: none;
    animation: spin 0.8s linear infinite;
}

.btn-spinner.is-visible {
    display: inline-block;
}

.panel-footer {
    margin-top: 2rem;
    background: #f8fafc;
    border-radius: 1rem;
    padding: 1.25rem;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}

.panel-footer small {
    display: block;
    margin-top: 0.25rem;
    color: #94a3b8;
}

@media (max-width: 1024px) {
    .login-body {
        padding: 1.5rem;
    }

    .login-hero {
        padding: 2rem;
    }

    .login-panel {
        padding: 2rem;
    }
}

@media (max-width: 640px) {
    .login-body {
        padding: 1rem;
    }

    .login-grid {
        border-radius: 1rem;
    }

    .login-hero {
        display: none;
    }

    .panel-header {
        flex-direction: column;
        text-align: center;
    }

    .form-meta {
        flex-direction: column;
        gap: 0.75rem;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
