/* Authentication Pages Styles - Login & Register */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #064e3b 0%, #047857 50%, #059669 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
}

/* Wider container for register page */
body:has(#registerForm) .auth-container {
    max-width: 600px;
}

.auth-box {
    background: #ffffff;
    border-radius: 1.5rem;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Logo/Header */
.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo img {
    max-width: 250px;
    height: auto;
    margin-bottom: 1rem;
}

.auth-box h1 {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.auth-box h2 {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    text-align: center;
    font-size: 0.95rem;
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: start;
    gap: 0.75rem;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

.alert-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.alert strong {
    font-weight: 700;
}

/* Form Sections */
.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 1.5rem;
}

.form-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    font-weight: 600;
    color: #374151;
    font-size: 1rem;
}

.section-icon {
    width: 20px;
    height: 20px;
    color: #047857;
    flex-shrink: 0;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

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

.form-group input.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Form Row for side-by-side inputs */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-row .form-group {
    margin-bottom: 0;
}

.form-row:not(:last-child) {
    margin-bottom: 1.5rem;
}

/* Checkbox Styles */
.form-group-checkbox {
    margin-bottom: 1.5rem;
}

.checkbox-container {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    cursor: pointer;
    position: relative;
    padding-left: 0;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: relative;
    height: 20px;
    width: 20px;
    background-color: white;
    border: 2px solid #e5e7eb;
    border-radius: 0.375rem;
    flex-shrink: 0;
    transition: all 0.3s;
    margin-top: 2px;
}

.checkbox-container:hover .checkmark {
    border-color: #059669;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #059669;
    border-color: #059669;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-label {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.5;
}

.checkbox-label a {
    color: #047857;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.checkbox-label a:hover {
    color: #059669;
    text-decoration: underline;
}

/* Button Styles */
.btn {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    padding: 0.875rem 1.5rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(4, 120, 87, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    box-shadow: 0 6px 16px rgba(4, 120, 87, 0.35);
    transform: translateY(-2px);
}

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

.btn-block {
    width: 100%;
    text-align: center;
}

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

/* Loading state */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    right: 1rem;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

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

/* Auth Link */
.auth-link {
    text-align: center;
    margin-top: 1.5rem;
    color: #6b7280;
    font-size: 0.95rem;
}

.auth-link a {
    color: #047857;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.auth-link a:hover {
    color: #059669;
    text-decoration: underline;
}

/* Back to Home Link */
.back-home {
    text-align: center;
    margin-top: 1.5rem;
}

.back-home a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.back-home a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
}

/* Responsive */
@media (max-width: 640px) {
    .auth-box {
        padding: 2rem 1.5rem;
    }

    .auth-box h1 {
        font-size: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .auth-logo img {
        max-width: 200px;
    }
}
