/* Estilos para el login - Diseño estilo Apple */
:root {
    --apple-blue: #0071e3;
    --apple-light-gray: #f5f5f7;
    --apple-dark-gray: #1d1d1f;
    --apple-border: #d2d2d7;
    --apple-text: #1d1d1f;
    --apple-text-secondary: #86868b;
    --apple-bg: #ffffff;
    --apple-card-bg: #ffffff;
    --apple-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.login-page {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--apple-bg);
    background-image: 
        radial-gradient(circle at 1px 1px, rgba(0, 0, 0, 0.15) 1px, transparent 0),
        radial-gradient(circle at 100% 1px, rgba(0, 0, 0, 0.15) 1px, transparent 0),
        radial-gradient(circle at 1px 100%, rgba(0, 0, 0, 0.15) 1px, transparent 0),
        radial-gradient(circle at 100% 100%, rgba(0, 0, 0, 0.15) 1px, transparent 0);
    background-size: 30px 30px;
    background-position: 0 0, 29px 0, 0 29px, 29px 29px;
    color: var(--apple-text);
    font-size: 17px;
    line-height: 1.47059;
    font-weight: 400;
    letter-spacing: -0.022em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Efecto de ruido sutil */
body.login-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background: 
        linear-gradient(45deg, rgba(255,255,255,0.05) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255,255,255,0.05) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.05) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.05) 75%);
    background-size: 20px 20px;
    transform: translate(-25%, -25%) rotate(45deg);
    pointer-events: none;
    opacity: 0.6;
    z-index: 0;
}

/* Contenedor principal */
.inner-bg {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

/* Sección de texto */
.top-content .text {
    text-align: center;
    margin-bottom: 40px;
    color: var(--apple-text);
    padding: 20px;
    max-width: 600px;
}

.top-content h1 {
    font-size: 44px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.022em;
    margin-bottom: 16px;
    color: var(--apple-text);
}

.top-content p {
    font-size: 24px;
    font-weight: 400;
    line-height: 1.33341;
    letter-spacing: 0.009em;
    color: var(--apple-text-secondary);
    margin-top: 10px;
}

/* Tarjeta de formulario */
.form-box {
    width: 100%;
    max-width: 480px;
    background: var(--apple-card-bg);
    border-radius: 18px;
    box-shadow: var(--apple-shadow);
    overflow: hidden;
    margin: 0 auto;
}

/* Encabezado del formulario */
.form-top {
    padding: 30px 30px 15px;
    text-align: center;
}

.form-top h3 {
    font-size: 28px;
    font-weight: 600;
    color: var(--apple-text);
    margin-bottom: 8px;
}

.form-top p {
    color: var(--apple-text-secondary);
    font-size: 17px;
    margin: 0;
}

/* Cuerpo del formulario */
.form-bottom {
    padding: 15px 30px 30px;
}

/* Grupos de formulario */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

/* Grupos de entrada */
.input-group {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    margin-bottom: 22px;
    align-items: stretch;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.input-group-text {
    background-color: #f5f5f7;
    border: 1px solid var(--apple-border);
    border-right: none;
    border-radius: 12px 0 0 12px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #86868b;
    font-size: 18px;
    min-width: 56px; /* Ancho mínimo para los iconos */
    height: 52px; /* Misma altura que los campos de entrada */
}

/* Asegurar que los iconos tengan un tamaño consistente */
.input-group-text i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

/* Campos de formulario */
.form-control {
    height: 52px;
    padding: 0 20px;
    font-size: 17px;
    color: var(--apple-text);
    background-color: #fff;
    background-image: none;
    border: 1px solid var(--apple-border);
    border-left: none; /* Eliminar borde izquierdo para que se una con el ícono */
    border-radius: 0 12px 12px 0 !important;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
    line-height: 1.47059;
}

.form-control:focus {
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 3px rgba(0, 125, 250, 0.15);
    outline: none;
}

/* Placeholder */
.form-control::placeholder {
    color: #86868b;
    opacity: 1;
}

/* Botón de inicio de sesión */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    padding: 0 22px;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.47059;
    letter-spacing: -0.022em;
    color: #fff;
    background-color: var(--apple-blue);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.btn:hover {
    background-color: #0077ed;
    transform: translateY(-1px);
}

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

/* Enlaces */
.login-links {
    margin-top: 24px;
    text-align: center;
    font-size: 15px;
}

.login-links a {
    color: var(--apple-blue);
    text-decoration: none;
    transition: color 0.2s;
}

.login-links a:hover {
    text-decoration: underline;
}

/* Mensajes de error */
.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.4;
}

.alert-danger {
    background-color: #ffebee;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
}

/* Checkbox personalizado */
.checkbox-remember {
    display: flex;
    align-items: center;
    margin: 15px 0;
    font-size: 15px;
    color: var(--apple-text);
}

.checkbox-remember input[type="checkbox"] {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    border: 2px solid var(--apple-border);
    border-radius: 4px;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

.checkbox-remember input[type="checkbox"]:checked {
    background-color: var(--apple-blue);
    border-color: var(--apple-blue);
}

.checkbox-remember input[type="checkbox"]:checked::after {
    content: "✓";
    position: absolute;
    color: white;
    font-size: 14px;
    font-weight: 600;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Versión responsive */
@media (max-width: 768px) {
    .top-content h1 {
        font-size: 36px;
    }
    
    .top-content p {
        font-size: 20px;
    }
    
    .form-box {
        max-width: 100%;
        border-radius: 12px;
    }
    
    .form-top, .form-bottom {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 480px) {
    body.login-page {
        padding: 10px;
    }
    
    .top-content h1 {
        font-size: 28px;
    }
    
    .top-content p {
        font-size: 18px;
    }
    
    .form-top h3 {
        font-size: 24px;
    }
    
    .form-control, .btn {
        height: 48px;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
}
