/* Variables */
:root {
    --primary-color: #0d6efd;
    --primary-dark: #0a58ca;
    --light-blue: #e3f2fd;
}

/* Body y fondo */
body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(13, 110, 253, 0.8), rgba(13, 110, 253, 0.6)),
        url('https://images.unsplash.com/photo-1629909613654-28e377c37b09?q=80&w=2068&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    position: relative;
    padding: 20px;
}

body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 2%, transparent 2%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.1) 2%, transparent 2%),
        radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.1) 2%, transparent 2%);
    background-size: 300px 300px;
    z-index: 0;
}

/* Contenedor principal */
.register-container {
    width: 100%;
    max-width: 500px;
    min-height: 550px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

/* Tarjeta */
.register-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    width: 100%;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.register-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), #0dcaf0);
    z-index: 2;
}

/* Logo */
.logo-container {
    margin: 0 auto 1.2rem auto;
    text-align: center;
    position: relative;
}

.logo-wrapper {
    display: inline-block;
    position: relative;
    margin-bottom: 0.8rem;
}

.logo-background {
    width: 85px;
    height: 85px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 6px 15px rgba(13, 110, 253, 0.15);
    border: 2px solid rgba(13, 110, 253, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: pulse 3s ease-in-out infinite;
}

.logo-background:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 10px 25px rgba(13, 110, 253, 0.25);
}

.logo-img {
    width: 60%;
    height: 60%;
    object-fit: contain;
}

/* Formularios */
.form-control,
.form-select {
    border: 1px solid #dee2e6;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    width: 100%;
}

.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
    border-color: var(--primary-color);
    background-color: white;
    outline: none;
}

/* Input con icono */
.input-with-icon {
    position: relative;
    margin-bottom: 1rem;
}

.input-with-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    z-index: 2;
}

.input-with-icon .form-control,
.input-with-icon .form-select {
    padding-left: 45px;
}

/* Contenedor de contraseña */
.password-container {
    position: relative;
    margin-bottom: 1rem;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    z-index: 2;
    padding: 5px;
}

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

/* Botón de registro */
.btn-register {
    background: linear-gradient(135deg, var(--primary-color), #0a58ca);
    border: none;
    border-radius: 10px;
    padding: 13px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
    margin-top: 0.5rem;
    color: white;
}

.btn-register:hover {
    background: linear-gradient(135deg, #0a58ca, var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.3);
    color: white;
}

.btn-register:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Alerta personalizada */
.alert-custom {
    border-radius: 10px;
    border: none;
    background-color: rgba(220, 53, 69, 0.1);
    border-left: 4px solid #dc3545;
    padding: 0.8rem 1rem;
    margin-bottom: 1.5rem;
}

/* Footer de seguridad */
.security-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

/* Contenido del registro */
.register-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 480px;
}

.register-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Versión del sistema */
.system-version {
    position: fixed;
    bottom: 10px;
    right: 15px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    z-index: 1;
}

/* Animaciones */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Links */
a.text-primary:hover {
    color: var(--primary-dark) !important;
    text-decoration: underline !important;
}

/* Responsive */
@media (max-width: 768px) {
    .register-container { max-width: 90%; min-height: 500px; }
    .register-card { padding: 2rem 1.5rem; }
    .logo-background { width: 75px; height: 75px; }
    body { padding: 15px; }
}

@media (max-width: 576px) {
    .register-container { max-width: 95%; min-height: 480px; }
    .register-card { padding: 1.5rem; }
    .system-version { display: none; }
}
