/* Authentication Pages Styles */

/* Auth Layout */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9fafb;
}

.auth-card {
    max-width: 28rem;
    width: 100%;
    padding: 2rem;
}

/* Form Styles */
.auth-form {
    margin-top: 2rem;
}

.auth-input {
    appearance: none;
    position: relative;
    display: block;
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    color: #111827;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input::placeholder {
    color: #6b7280;
}

.auth-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    z-index: 10;
}

.auth-input-group {
    margin-bottom: 1rem;
}

.auth-input-stacked:first-child {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.auth-input-stacked:last-child {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    margin-top: -1px;
}

.auth-input-stacked:not(:first-child):not(:last-child) {
    border-radius: 0;
    margin-top: -1px;
}

/* Button Styles */
.auth-button {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.75rem 1rem;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    color: white;
    background-color: #2563eb;
    transition: background-color 0.2s ease, transform 0.1s ease;
    cursor: pointer;
}

.auth-button:hover {
    background-color: #1d4ed8;
}

.auth-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

.auth-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-button-icon {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    padding-right: 0.75rem;
}

.auth-button-icon i {
    color: #93c5fd;
    transition: color 0.2s ease;
}

.auth-button:hover .auth-button-icon i {
    color: #bfdbfe;
}

/* Alert Styles */
.auth-alert {
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
}

.auth-alert-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.auth-alert-success {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}

.auth-alert i {
    margin-right: 0.5rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

/* Link Styles */
.auth-link {
    font-weight: 500;
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: #1d4ed8;
}

/* Label Styles */
.auth-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

/* Helper Text */
.auth-helper {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.auth-legal {
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
    margin-top: 1rem;
}

/* Loading State */
.auth-loading {
    position: relative;
    color: transparent;
}

.auth-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1rem;
    height: 1rem;
    margin: -0.5rem 0 0 -0.5rem;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 640px) {
    .auth-card {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .auth-container {
        padding: 1rem;
    }
}

/* Focus Management */
.auth-form input:focus + .auth-helper {
    color: #2563eb;
}

/* Validation States */
.auth-input-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.auth-input-success {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}