﻿
:root {
    --primary: #073980;
    --primary-dark: #052a5f;
    --primary-light: #4f8fd1;
    --primary-pale: #eaf1fa;
    --accent: #1a56b0;
    --text-dark: #0d1b2e;
    --text-medium: #0d3d7a;
    --text-muted: #7fa8d6;
    --border: #b7d0ea;
    --border-focus: #1a56b0;
    --white: #ffffff;
    --success: #22c55e;
    --error: #ef4444;
    --shadow-sm: 0 2px 8px rgba(7, 57, 128, 0.1);
    --shadow-md: 0 8px 24px rgba(7, 57, 128, 0.14);
    --shadow-lg: 0 20px 48px rgba(5, 42, 95, 0.18);
    --radius: 14px;
    --radius-lg: 22px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    color: var(--text-dark);
    position: relative;
    overflow-x: hidden;
}

.bg-photo {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/dist/images/simadbackground.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(6px) saturate(0.6) brightness(1.05) contrast(0.95);
    transform: scale(1.03);
    pointer-events: none;
    z-index: -2;
}

.bg-photo-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.55) 0%, rgba(240, 255, 246, 0.4) 45%, rgba(255, 255, 255, 0.6) 100%);
    pointer-events: none;
    z-index: -1;
}

/* Page wrapper */
.register-page {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    padding: 32px 24px;
    position: relative;
    z-index: 1;
}

.back-home-btn {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(7, 57, 128, 0.18);
    text-decoration: none;
    backdrop-filter: blur(4px);
    transition: background 0.2s ease, transform 0.2s ease;
}

    .back-home-btn:hover {
        background: #ffffff;
        color: var(--primary-dark);
        transform: translateX(-2px);
    }

/* Register card */
.register-card {
    display: grid;
    grid-template-columns: 340px 1fr;
    width: 100%;
    max-width: 980px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid rgba(79, 143, 209, 0.5);
}

/* Branding aside */
.register-aside {
    background: linear-gradient(160deg, var(--accent) 0%, var(--primary) 55%, var(--primary-dark) 100%);
    color: white;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

    .register-aside::before {
        content: '';
        position: absolute;
        top: -30%;
        right: -30%;
        width: 70%;
        height: 70%;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
        pointer-events: none;
    }

.aside-top {
    text-align: center;
}

.logo-container {
    margin: 0 auto 1.25rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 84px;
    height: 84px;
    background: white;
    border-radius: 50%;
    padding: 8px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.5);
}

.logo-img {
    max-width: 100%;
    height: auto;
    border-radius: 50%;
}

.aside-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    letter-spacing: 0.3px;
}

.aside-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.aside-benefits {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

    .aside-benefits li {
        display: flex;
        align-items: flex-start;
        gap: 0.6rem;
        font-size: 0.88rem;
        color: rgba(255, 255, 255, 0.92);
        line-height: 1.4;
    }

    .aside-benefits i {
        color: #86e0b0;
        margin-top: 0.1rem;
        flex-shrink: 0;
    }

.aside-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    z-index: 1;
}

.aside-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    opacity: 0.55;
}

    .aside-step.active {
        opacity: 1;
    }

.aside-step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.aside-step.active .aside-step-dot {
    background: white;
    color: var(--primary);
}

.aside-step-label {
    font-size: 0.85rem;
    font-weight: 500;
}

.aside-step-line {
    width: 2px;
    height: 20px;
    background: rgba(255, 255, 255, 0.25);
    margin-left: 14px;
}

/* Form panel */
.register-form-panel {
    padding: 2.5rem 2.75rem;
    overflow-y: auto;
    max-height: calc(100vh - 64px);
}

.form-panel-header {
    margin-bottom: 1.5rem;
}

.form-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.form-subtitle {
    color: var(--text-medium);
    font-size: 0.9rem;
    margin: 0;
}

/* Form grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

    .form-group.full-width {
        grid-column: 1 / -1;
    }

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
    font-size: 0.88rem;
}

.label-optional {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.78rem;
}

/* Icon inputs */
.input-icon-container {
    position: relative;
}

.input-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 14px;
    color: #9ab8dc;
    font-size: 1rem;
    pointer-events: none;
    transition: color 0.2s;
}

.input-icon-container:focus-within .input-icon {
    color: var(--primary);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    font-size: 0.93rem;
    transition: all 0.25s ease;
    background: #fafffe;
    color: var(--text-dark);
    font-family: 'Poppins', sans-serif;
}

.icon-input {
    padding-left: 42px;
}

.password-input-container .icon-input {
    padding-right: 42px;
}

    .form-input:focus {
        outline: none;
        border-color: var(--border-focus);
        background: white;
        box-shadow: 0 0 0 3px rgba(79, 143, 209, 0.35);
    }

    .form-input::placeholder {
        color: #9ab8dc;
        font-size: 0.9rem;
    }

.needs-validation .form-input:invalid.was-validated-field,
.was-validated .form-input:invalid {
    border-color: var(--error);
}

.input-hint {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

    .input-hint i {
        color: var(--accent);
    }

.field-error {
    color: var(--error);
    font-size: 0.8rem;
    margin-top: 0.4rem;
}

/* Password toggle */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    transition: color 0.2s ease;
}

    .password-toggle:hover {
        color: var(--primary);
    }

.password-strength {
    margin-top: 0.6rem;
}

.strength-bar {
    width: 100%;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.4rem;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-text {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* Checkbox */
.checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.form-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.checkbox-label {
    font-weight: 500;
    color: var(--text-medium);
    line-height: 1.5;
    cursor: pointer;
    font-size: 0.88rem;
}

.terms-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

    .terms-link:hover {
        text-decoration: underline;
    }

/* Actions */
.form-actions {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--primary-pale);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, #1a56b0 0%, #0d4ea6 60%, #073980 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(7, 57, 128, 0.4);
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 22px rgba(7, 57, 128, 0.48);
        color: white;
    }

.btn-large {
    padding: 0.9rem 2.5rem;
    font-size: 1rem;
    width: 100%;
    max-width: 320px;
}

.btn-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn.loading {
    pointer-events: none;
    opacity: 0.85;
}

    .btn.loading .btn-loading {
        opacity: 1;
    }

    .btn.loading > *:not(.btn-loading) {
        opacity: 0;
    }

.spin {
    display: inline-block;
    animation: spin 1s linear infinite;
}

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

.login-link {
    margin-top: 1.25rem;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.link-primary {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.3s ease;
}

    .link-primary:hover {
        color: var(--primary-dark);
        text-decoration: underline;
    }

.footer-text {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--primary-pale);
    text-align: center;
}

.footer-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

    .footer-link:hover {
        color: var(--primary-dark);
        text-decoration: underline;
    }

/* Alerts */
.alert {
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-weight: 500;
    font-size: 0.88rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #b91c1c;
}

.alert-success {
    background: rgba(79, 143, 209, 0.25);
    border: 1px solid rgba(7, 57, 128, 0.3);
    color: var(--primary-dark);
}

/* Modal */
.modal-content {
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(79, 143, 209, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, #1a56b0 0%, #073980 100%);
    color: white;
    border-top-left-radius: calc(var(--radius) - 1px);
    border-top-right-radius: calc(var(--radius) - 1px);
    padding: 16px 20px;
    border-bottom: none;
}

.modal-title {
    font-weight: 600;
    font-size: 1rem;
}

.modal-body {
    padding: 24px;
    font-size: 0.92rem;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 900px) {
    .register-card {
        grid-template-columns: 1fr;
        max-width: 560px;
    }

    .register-aside {
        padding: 2rem;
    }

    .aside-benefits {
        margin: 1.5rem 0;
    }

    .register-form-panel {
        max-height: none;
        padding: 2rem;
    }
}

@media (max-width: 560px) {
    .register-page {
        padding: 16px;
    }

    .register-form-panel {
        padding: 1.5rem;
    }

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

    .back-home-btn {
        top: 10px;
        left: 10px;
    }
}
