/* Estilos Globales */
* {
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    margin: 0;
    background: #f3f5f7;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Contenedor Principal */
.login {
    width: 400px;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.login h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
}

/* Etiquetas y Asterisco */
.login label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    font-size: 14px;
    color: #555;
}

.required {
    color: #d9534f;
    margin-left: 3px;
}

/* Inputs generales */
.login input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.login input:focus {
    border-color: #007BFF;
}

/* --- Grupo Especial para Password (El estilo que buscabas) --- */
.password-wrapper {
    display: flex;
    border: 1px solid #ccc;
    border-radius: 5px;
    overflow: hidden; /* Corta las esquinas del botón para que encajen */
    background: #fff;
    transition: border-color 0.2s;
}

.password-wrapper:focus-within {
    border-color: #007BFF;
}

.password-wrapper input {
    border: none !important; /* Quitamos el borde propio del input */
    margin-top: 0;
    flex: 1;
}

.toggle-password {
    background: #f9f9f9; /* Un tono apenas gris para el botón */
    border: none;
    border-left: 1px solid #ccc; /* La línea divisoria vertical */
    padding: 0 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    user-select: none;
    transition: background 0.2s;
}

.toggle-password:hover {
    background: #f0f0f0;
}

.toggle-password:active {
    background: #e5e5e5;
}

/* Botón de Login (Submit) */
.login button[type="submit"] {
    width: 100%;
    margin-top: 25px;
    padding: 12px;
    background: #007BFF;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
}

.login button[type="submit"]:hover {
    background: #0056b3;
}

/* Enlaces */
.login a {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: #007BFF;
    text-decoration: none;
    font-size: 14px;
}

.login a:hover {
    text-decoration: underline;
}

/* Cuadro de Error */
.error-box {
    background: #ffe5e5;
    color: #b30000;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 14px;
    border: 1px solid #f5c6cb;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}


/* Input con iconos estilo Bootstrap */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

/* Input */
.input-group input {
    width: 100%;
    padding: 10px 40px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
}

/* Icono izquierdo */
.input-icon {
    position: absolute;
    left: 12px;
    color: #777;
    font-size: 14px;
}

/* Icono derecho */
.toggle-icon {
    position: absolute;
    right: 12px;
    cursor: pointer;
    color: #777;
    font-size: 14px;
}

.toggle-icon:hover {
    color: #007BFF;
}

/* Focus */
.input-group input:focus {
    border-color: #007BFF;
    outline: none;
}


/* Select igual que input */
.input-group select {
    width: 100%;
    padding: 10px 40px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    appearance: none;
    background: #fff;
}

/* Alinear icono con select */
.input-group select:focus {
    border-color: #007BFF;
    outline: none;
}

.btn-secondary {
    display: block;
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    background: #6c757d;
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #5a6268;
}