/* AuspicesAI Authentication Pages Styling */

.auth-wrapper {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(98, 48, 107, 0.08);
    padding: 50px;
    width: 100%;
    max-width: 600px;
    border: 1px solid rgba(98, 48, 107, 0.1);
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(135deg, #261429 0%, #7d0fbd 100%);
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-header h2 {
    color: #261429;
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 10px;
}

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

.auth-header p a {
    color: #7d0fbd;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-header p a:hover {
    color: #813d8a;
    text-decoration: underline;
}

/* Form Styling */
.auth-form {
    margin-top: 30px;
}

.auth-form .form-group {
    margin-bottom: 25px;
}

.auth-form label {
    color: #261429;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form select,
.auth-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus {
    outline: none;
    border-color: #7d0fbd;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(98, 48, 107, 0.1);
}

/* Button Styling */
.auth-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 30px;
    gap: 20px;
    flex-wrap: wrap;
}

/* AuspicesAI SSO Button */
.auspicesai-sso-btn {
    background: #ffffff;
    color: #261429;
    border: 2px solid #e0e0e0;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 300px;
    margin: 10px auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auspicesai-sso-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(98, 48, 107, 0.15);
    border-color: #7d0fbd;
    color: #261429;
    text-decoration: none;
}

.auspicesai-sso-btn img {
    width: 24px;
    height: 24px;
    margin-right: 12px;
}

/* Auth divider styling */
.auth-divider {
    width: 100%;
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #e0e0e0;
    z-index: 1;
}

.auth-divider span {
    background-color: white;
    padding: 0 15px;
    font-size: 14px;
    color: #666;
    font-weight: 500;
    position: relative;
    z-index: 2;
}

.auth-btn {
    background: linear-gradient(135deg, #7d0fbd 0%, #813d8a 100%);
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 150px;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(98, 48, 107, 0.3);
    color: white;
    text-decoration: none;
}

.auth-btn-secondary {
    background: transparent;
    color: #7d0fbd;
    border: 2px solid #7d0fbd;
    padding: 12px 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.auth-btn-secondary:hover {
    background: #7d0fbd;
    color: white;
    text-decoration: none;
}

.auth-link {
    color: #7d0fbd;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: #813d8a;
    text-decoration: underline;
}

/* Horizontal form layout for wider forms */
.auth-form-horizontal {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.auth-form-horizontal .form-group {
    flex: 1;
    min-width: 200px;
}

/* Success and Error Messages */
.auth-message {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    text-align: center;
}

.auth-message.success {
    background-color: #e7f5e7;
    color: #2e7d2e;
    border: 1px solid #b3d9b3;
}

.auth-message.error {
    background-color: #ffe6e6;
    color: #cc0000;
    border: 1px solid #ffb3b3;
}

.auth-message.info {
    background-color: #e6f2ff;
    color: #0066cc;
    border: 1px solid #b3d9ff;
}

/* Checkbox styling */
.auth-form input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.auth-checkbox-label {
    display: flex;
    align-items: center;
    color: #666;
    font-weight: normal;
}

/* Help text */
.auth-help-text {
    color: #888;
    font-size: 14px;
    margin-top: 5px;
}

/* Divider */
.auth-divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #e0e0e0;
}

.auth-divider span {
    background-color: #ffffff;
    padding: 0 15px;
    color: #888;
    position: relative;
}

/* Email list styling */
.auth-email-list {
    background-color: #f8f8fb;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
}

.auth-email-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
}

.auth-email-item:last-child {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-container {
        padding: 30px;
    }
    
    .auth-header h2 {
        font-size: 26px;
    }
    
    .auth-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .auth-btn,
    .auth-btn-secondary {
        width: 100%;
    }
}

/* Override crispy forms styling */
.auth-container .crispy-form .form-group {
    margin-bottom: 25px;
}

.auth-container .crispy-form label {
    color: #261429;
    font-weight: 500;
    margin-bottom: 8px;
}

.auth-container .alert {
    border-radius: 10px;
    margin-bottom: 25px;
}

/* Loading spinner */
.auth-loading {
    display: none;
    text-align: center;
    padding: 40px;
}

.auth-loading.active {
    display: block;
}

.auth-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #7d0fbd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
