/* Authentication Pages Shared Styles */

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #333333;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.auth-container {
    width: 100%;
    max-width: 440px;
    padding: 2rem;
}

.auth-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 2.5rem;
    border: 1px solid #e5e7eb;
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo img {
    height: 60px;
    width: auto;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.auth-header p {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"],
.auth-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #ffffff;
    transition: all 0.2s ease;
    color: #374151;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #1a5490;
    box-shadow: 0 0 0 3px rgba(26, 84, 144, 0.1);
}

.form-group input::placeholder {
    color: #9ca3af;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"],
.auth-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.checkbox-group label {
    font-size: 0.9rem;
    color: #374151;
    cursor: pointer;
    user-select: none;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forgot-password-link {
    font-size: 0.9rem;
    color: #1a5490;
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-password-link:hover {
    color: #164673;
}

.auth-button {
    width: 100%;
    height: 46px;
    padding: 0 1.5rem;
    background: #1a5490;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.auth-button:hover {
    background: #164673;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(26, 84, 144, 0.2);
}

.auth-button:active {
    transform: translateY(0);
}

.auth-button:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.auth-footer p {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
}

.auth-footer a {
    color: #1a5490;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.auth-footer a:hover {
    color: #164673;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #1a5490;
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: #164673;
}

.back-link svg {
    width: 16px;
    height: 16px;
}

/* Messages */
.message {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.message.info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.message a {
    color: inherit;
    font-weight: 500;
    text-decoration: underline;
}

.message a:hover {
    text-decoration: none;
}

.error-text {
    font-size: 0.85rem;
    color: #dc2626;
    margin-top: 0.25rem;
}

/* Info Box */
.info-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.info-box p {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 480px) {
    .auth-container {
        padding: 1rem;
    }

    .auth-card {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* Focus Visible */
*:focus-visible {
    outline: 2px solid #1a5490;
    outline-offset: 2px;
}

/* Loading State Styles */
.auth-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: auth-spin 0.8s linear infinite;
    vertical-align: -2px;
    margin-right: 0.4rem;
}

@keyframes auth-spin {
    to {
        transform: rotate(360deg);
    }
}

.auth-spinner-dark {
    border-color: rgba(26, 84, 144, 0.2);
    border-top-color: #1a5490;
}

.btn-text {
    display: inline;
}

.btn-loading {
    display: none !important;
}

.auth-button.loading .btn-text {
    display: none !important;
}

.auth-button.loading .btn-loading {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

.auth-button.loading {
    background: #4a7db8;
    cursor: wait;
    transform: none;
    box-shadow: none;
}
