/* 
 * File: /var/www/uprompt-v1/web-app/css/auth.css
 * Stili per pagine di autenticazione (login, register, register_authors)
 */

/* Container principale */
.auth-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: #f7f7f7;
}

/* Box principale */
.auth-box {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 30px;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

/* Logo */
.auth-logo {
    text-align: center;
    margin-bottom: 25px;
}

.auth-logo img {
    height: 50px;
    width: auto;
}

/* Header */
.auth-header {
    text-align: center;
    margin-bottom: 25px;
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 400;
    color: #0F1111;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.auth-header h2 {
    font-size: 24px;
    font-weight: 400;
    color: #0F1111;
    margin: 0 0 8px 0;
}

.auth-header p {
    font-size: 14px;
    color: #565959;
    margin: 0;
}

/* Form */
.auth-form {
    margin: 0;
}

.form-group {
    margin-bottom: 2px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #0F1111;
    margin-bottom: 2px;
}

.form-input {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #949494;
    border-radius: 3px;
    background: white;
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #E77600;
    box-shadow: 0 0 3px 2px rgba(228, 121, 17, 0.5);
}

.form-input.error {
    border-color: #CC0C39;
}

.form-input.error:focus {
    box-shadow: 0 0 3px 2px rgba(204, 12, 57, 0.3);
}

/* Textarea */
textarea.form-input {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

/* Error messages */
.error-message {
    display: block;
    color: #CC0C39;
    font-size: 12px;
    margin-top: 4px;
    min-height: 16px;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.3;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    margin-top: 2px;
    cursor: pointer;
}

.checkbox-label span {
    flex: 1;
    color: #0F1111;
}

/* Form row (per remember me e forgot password) */
.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 400;
    text-align: center;
    text-decoration: none;
    border: 1px solid;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    line-height: 19px;
    position: relative;
}

.btn-primary {
    background: #FFD814;
    border-color: #FCD200;
    color: #0F1111;
}

.btn-primary:hover {
    background: #F7CA00;
    border-color: #F2C200;
}

.btn-primary:disabled {
    background: #F7F8F8;
    border-color: #D5D9D9;
    color: #D2D2D2;
    cursor: not-allowed;
}

.btn-secondary {
    background: white;
    border-color: #D5D9D9;
    color: #0F1111;
}

.btn-secondary:hover {
    background: #F7F8F8;
    border-color: #C7CBCB;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Button loader */
.btn-loader {
    display: none;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-left-color: #0F1111;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Links */
.link-text {
    color: #007185;
    text-decoration: none;
    font-size: inherit;
}

.link-text:hover {
    color: #C45500;
    text-decoration: underline;
}

.link-primary {
    color: #007185;
    text-decoration: none;
    font-weight: 500;
}

.link-primary:hover {
    color: #C45500;
    text-decoration: underline;
}

/* Footer */
.auth-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #E7E7E7;
    text-align: center;
}

.auth-footer p {
    font-size: 13px;
    color: #565959;
    margin: 0;
}

/* Alert messages */
.alert {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.alert-success {
    background: #F0F8F0;
    border: 1px solid #067D62;
    color: #067D62;
}

.alert-warning {
    background: #FFF5E6;
    border: 1px solid #FFA41C;
    color: #C45500;
}

.alert-info {
    background: #E6F7FF;
    border: 1px solid #007185;
    color: #007185;
}

.alert-error {
    background: #FFF5F5;
    border: 1px solid #CC0C39;
    color: #CC0C39;
}

.alert-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-close:hover {
    opacity: 1;
}

/* Account info box (per upgrade) */
.account-info {
    background: #F7F7F7;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.account-info p {
    margin: 0;
    color: #565959;
    font-size: 14px;
}

.account-info small {
    font-size: 12px;
    color: #747474;
}

/* Step indicator */
.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background: #E7E7E7;
    z-index: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    background: white;
    padding: 0 10px;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #E7E7E7;
    color: #565959;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
}

.step.active .step-number {
    background: #FF9900;
    color: white;
}

.step.completed .step-number {
    background: #007600;
    color: white;
}

.step.completed .step-number::before {
    content: '✓';
}

.step-label {
    font-size: 12px;
    color: #565959;
    text-align: center;
}

.step.active .step-label {
    color: #0F1111;
    font-weight: 600;
}

/* Form steps */
.form-step {
    display: none;
}

.form-step h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #0F1111;
}

/* Password requirements */
.password-requirements {
    background: #FFF5E6;
    border: 1px solid #FFA41C;
    border-radius: 4px;
    padding: 10px;
    margin-top: 5px;
}

.password-requirements small {
    display: block;
    color: #565959;
    margin-bottom: 5px;
}

.password-requirements ul {
    margin: 5px 0 0 20px;
    padding: 0;
}

.password-requirements ul li {
    color: #565959;
    list-style: none;
    padding: 2px 0;
    font-size: 12px;
}

.password-requirements ul li.valid {
    color: #007600;
}

.password-requirements ul li.valid::before {
    content: "✓ ";
    color: #007600;
    font-weight: bold;
}

.password-requirements ul li:not(.valid)::before {
    content: "• ";
    color: #565959;
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 0;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    margin: 0;
    color: #2d3748;
    font-size: 20px;
}

.modal-header p {
    margin: 5px 0 0 0;
    font-size: 14px;
    color: #565959;
}

.modal-body {
    padding: 20px 25px;
}

.modal-footer {
    padding: 15px 25px;
    border-top: 1px solid #e2e8f0;
    text-align: right;
}

/* Code inputs for 2FA */
.code-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.code-input {
    width: 45px;
    height: 45px;
    text-align: center;
    font-size: 20px;
    border: 1px solid #949494;
    border-radius: 3px;
}

.code-input:focus {
    outline: none;
    border-color: #E77600;
    box-shadow: 0 0 3px 2px rgba(228, 121, 17, 0.5);
}

/* Message boxes */
.message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
}

.message.success {
    background: #d1fae5;
    color: #065f46;
}

.message.error {
    background: #fee2e2;
    color: #991b1b;
}

/* Info box */
.info-box {
    margin-top: 15px;
    padding: 10px;
    background: #f0f8ff;
    border-radius: 4px;
    font-size: 13px;
    color: #565959;
}

/* Resend section */
.resend-section {
    margin-top: 20px;
    text-align: center;
}

/* Hero section for creators */
.auth-container > div[style*="gradient"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: -20px -20px 20px -20px;
    padding: 30px;
    border-radius: 8px 8px 0 0;
    text-align: center;
    color: white;
}

/* Quick actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.action-card {
    background: white;
    border: 1px solid #D5D9D9;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    text-decoration: none;
    color: #0F1111;
    transition: all 0.2s;
}

.action-card:hover {
    border-color: #FF9900;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.action-card i {
    font-size: 24px;
    color: #FF9900;
    margin-bottom: 10px;
    display: block;
}

.action-card span {
    font-size: 14px;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-container {
        padding: 20px 15px;
    }
    
    .auth-box {
        padding: 20px;
    }
    
    .auth-header h1 {
        font-size: 24px;
    }
    
    .step-label {
        display: none;
    }
    
    .form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
}

/* Alert form specifico */
.alertForm {
    margin: 10px 0;
    padding: 15px;
    background: #FF9900;
    color: #FFF;
    border-radius: 10px;
    display: none;
}

.alertForm h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}