/* =========================================
   ACCOUNTS - REGISTER PAGE
   ========================================= */

.auth-page {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
}

.auth-card {
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    padding: 1.75rem 1.75rem 1.5rem;
}

.auth-card-wide {
    width: 100%;
    max-width: 820px;
}

/* Header */
.auth-header {
    text-align: left;
    margin-bottom: 1.25rem;
}

.auth-badge {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #0ea5e9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    margin-bottom: 0.75rem;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.25rem;
}

.auth-subtitle {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
}

/* Messages */
.auth-messages {
    margin-bottom: 0.75rem;
}

.auth-alert {
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

.auth-alert-success {
    background-color: #ecfdf3;
    color: #166534;
    border: 1px solid #bbf7d0;
}

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

.auth-alert-info {
    background-color: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

/* Form layout */
.register-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Sections */
.form-sections {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-section {
    padding: 0.75rem 0.9rem 0.9rem;
    border-radius: 10px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
}

.section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 0.6rem;
}

.section-grid {
    display: grid;
    gap: 0.75rem 1rem;
}

.section-grid.two-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Form controls */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #4b5563;
}

/* Use same form-control styling as login */
.form-control,
.form-select {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    color: #111827;
    background-color: #f9fafb;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: #3498db;
    background-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.15);
}

/* Password field wrapper */
.password-field {
    position: relative;
    display: flex;
    align-items: stretch;
}

.password-field input {
    padding-right: 2.2rem;
}

.password-toggle {
    position: absolute;
    right: 0.45rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle i {
    font-size: 0.85rem;
}

/* Errors & help */
.field-error,
.form-error .error-message {
    font-size: 0.78rem;
    color: #b91c1c;
    margin: 0.1rem 0 0;
}

.form-error-general {
    margin-bottom: 0.5rem;
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
}

.field-help {
    font-size: 0.78rem;
    color: #6b7280;
}

/* Actions */
.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.3rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 0.55rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn-primary {
    background-color: #3498db;
    color: #ffffff;
    border-color: #3498db;
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #ffffff;
    color: #4b5563;
    border-color: #d1d5db;
}

.btn-secondary:hover {
    background-color: #f3f4f6;
    border-color: #cbd5e1;
}

.terms-text {
    margin: 0.5rem 0 0;
    font-size: 0.78rem;
    color: #9ca3af;
}

/* Loading state for JS (register.js) */
.btn-register.loading {
    opacity: 0.7;
    cursor: wait;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-card-wide {
        max-width: 100%;
    }

    .section-grid.two-cols {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .auth-page {
        padding-inline: 0.75rem;
    }
}
