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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.split-container {
    display: flex;
    flex: 1;
}

/* LEFT SIDE - Branding */
.brand-side {
    flex: 1;
    background: #1e3a8a;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 4rem 5rem;
}

.brand-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.75rem;
    font-weight: 700;
}

.brand-header i {
    font-size: 2.5rem;
}

.brand-content {
    max-width: 480px;
}

.brand-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2rem;
}

.feature-list {
    margin-top: 3rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 2rem;
    font-size: 1.05rem;
    line-height: 1.5;
}

.feature-item i {
    font-size: 1.5rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.brand-footer {
    opacity: 0.8;
    font-size: 0.875rem;
}

/* RIGHT SIDE - Form */
.form-side {
    flex: 1;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    overflow-y: auto;
}

.form-card {
    background: white;
    border-radius: 1rem;
    padding: 3rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 480px;
}

.form-card.wide {
    max-width: 600px;
}

.form-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.form-logo i {
    font-size: 3rem;
    color: #2563eb;
    margin-bottom: 1rem;
}

.form-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.form-header h1 {
    font-size: 1.75rem;
    color: #111827;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-header h2 {
    font-size: 1.75rem;
    color: #111827;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: #6b7280;
    font-size: 0.95rem;
}

/* 2-Column Layout for Register */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-help {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.375rem;
}

.form-help.success {
    color: #10b981;
}

.form-help.error {
    color: #ef4444;
}

.alert {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    color: #991b1b;
    font-size: 0.875rem;
}

.password-input-wrapper {
    position: relative;
}

.password-toggle-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #9ca3af;
    transition: color 0.2s;
}

.password-toggle-icon:hover {
    color: #2563eb;
}

.btn-primary {
    width: 100%;
    padding: 0.875rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: #1e40af;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.divider {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.divider p {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.divider a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.divider a:hover {
    text-decoration: underline;
}

/* FOOTER */
.footer {
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 1.25rem 3rem;
    text-align: center;
    font-size: 0.75rem;
    color: #6b7280;
}

.footer-links {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #6b7280;
    text-decoration: none;
    margin: 0 0.5rem;
}

.footer-links a:hover {
    color: #2563eb;
}

/* Responsive */
@media (max-width: 968px) {
    .split-container {
        flex-direction: column;
    }

    .brand-side {
        min-height: 30vh;
        padding: 2rem;
    }

    .brand-content h1 {
        font-size: 1.75rem;
    }

    .feature-list {
        display: none;
    }

    .form-side {
        padding: 2rem 1.5rem;
    }

    .form-card {
        padding: 2rem;
    }

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

    .footer {
        padding: 1.25rem 1.5rem;
    }
}

/* UNE Preview */
.une-preview {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 0.5rem;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.une-preview-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.une-preview-domain {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2563eb;
}

/* Username Suggestions */
.username-suggestions {
    display: none;
    margin-top: 0.75rem;
    padding: 1rem;
    background: #fff8e1;
    border: 1px solid #ffc107;
    border-radius: 0.5rem;
}

.username-suggestions.show {
    display: block;
}

.suggestions-header {
    font-size: 0.875rem;
    font-weight: 600;
    color: #f59e0b;
    margin-bottom: 0.75rem;
}

.suggestion-item {
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.suggestion-item:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.suggestion-item .username {
    font-weight: 500;
    color: #374151;
}

.suggestion-item .badge {
    font-size: 0.75rem;
    color: #10b981;
    font-weight: 600;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 0.75rem;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #111827;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #6b7280;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #111827;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
}

.modal-footer button {
    padding: 0.5rem 1.5rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 500;
}

.modal-footer button:hover {
    background: #1e40af;
}

/* Validation feedback */
.validation-feedback {
    font-size: 0.75rem;
    margin-top: 0.375rem;
}

.validation-feedback.checking {
    color: #2563eb;
}

.validation-feedback.available {
    color: #10b981;
}

.validation-feedback.unavailable {
    color: #ef4444;
}

.validation-feedback.invalid {
    color: #ef4444;
}

.validation-feedback.error {
    color: #f59e0b;
}

/* Input states */
.form-input.valid-available {
    border-color: #10b981;
}

.form-input.valid-unavailable {
    border-color: #ef4444;
}

.form-input.invalid-format {
    border-color: #f59e0b;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #10b981;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 9999;
    animation: slideInRight 0.3s ease-out;
    max-width: 400px;
}

.toast.hiding {
    animation: slideOutRight 0.3s ease-in forwards;
}

.toast-password {
    font-family: monospace;
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    margin-top: 0.5rem;
    word-break: break-all;
    font-size: 0.75rem;
}

.toast-icon {
    font-size: 1.25rem;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}
