/**
 * Groll AI - Login System CSS
 * Stili per pagina login viola
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Reset */
.groll-login-wrapper * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Wrapper principale */
.groll-login-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

/* Background animato */
.groll-login-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
}

@keyframes moveBackground {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

/* Container */
.groll-login-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
    animation: slideIn 0.5s ease-out;
}

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

/* Header */
.groll-login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.groll-login-logo {
    margin-bottom: 1.5rem;
}

.groll-login-logo svg {
    width: 100%;
    max-width: 180px;
    height: auto;
}

.groll-login-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.groll-login-subtitle {
    font-size: 1rem;
    color: #6b7280;
    font-weight: 500;
}

/* Alert */
.groll-alert {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.groll-alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.groll-alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.groll-alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Form */
.groll-login-form {
    margin-bottom: 1.5rem;
}

.groll-form-group {
    margin-bottom: 1.5rem;
}

.groll-form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.groll-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: #f9fafb;
}

.groll-input:focus {
    outline: none;
    border-color: #3600ff;
    background: white;
    box-shadow: 0 0 0 3px rgba(54, 0, 255, 0.1);
}

.groll-input::placeholder {
    color: #9ca3af;
}

/* Password wrapper */
.groll-password-wrapper {
    position: relative;
}

.groll-password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s;
}

.groll-password-toggle:hover {
    color: #3600ff;
}

.groll-form-help {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.813rem;
    color: #6b7280;
}

/* Form row */
.groll-form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* Checkbox */
.groll-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #4b5563;
}

.groll-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3600ff;
}

/* Link */
.groll-link {
    color: #3600ff;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: color 0.2s;
}

.groll-link:hover {
    color: #8b5cf6;
    text-decoration: underline;
}

/* Button */
.groll-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
}

.groll-btn-primary {
    background: linear-gradient(135deg, #3600ff 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(54, 0, 255, 0.3);
}

.groll-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(54, 0, 255, 0.4);
}

.groll-btn-primary:active {
    transform: translateY(0);
}

.groll-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.groll-btn-loader {
    display: none;
}

.groll-btn.loading .groll-btn-text {
    opacity: 0;
}

.groll-btn.loading .groll-btn-loader {
    display: block;
}

/* Footer */
.groll-login-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.groll-login-footer p {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Settings wrapper (cambio password) */
.groll-settings-wrapper {
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.groll-settings-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
}

.groll-settings-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #3600ff 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.groll-form {
    margin-top: 1.5rem;
}

/* Responsive */
@media (max-width: 480px) {
    .groll-login-wrapper {
        padding: 1rem;
    }
    
    .groll-login-container {
        padding: 2rem 1.5rem;
    }
    
    .groll-login-title {
        font-size: 1.5rem;
    }
    
    .groll-form-row {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

/* Animations */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.groll-shake {
    animation: shake 0.5s;
}