* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  background-color: #FDF4E3; /* Fondo beige cálido */
  color: #3E3E3E; /* Gris cálido */
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* NAV BAR SUPERIOR */
.navbar {
  background-color: #E57F4C; /* Naranja tenue */
  color: #fff;
  padding: 1rem 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-nav {
  list-style: none;
  display: flex;
}

.navbar-nav li {
  margin-left: 20px;
}

.navbar-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  padding: 8px 15px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.navbar-brand {
  text-decoration: none;
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
}

/*BOTONES DE LA NAV-BAR*/
.navbar-nav a.btn-login {
  background-color: #FFD8A8; /* Crema suave */
  color: #3E3E3E;
}

.navbar-nav a.btn-login:hover {
  background-color: #FFC085;
}

.navbar-nav a:not(.btn-login):hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* CONTENIDO PRINCIPAL */
.main-content {
  padding: 40px 0;
}

/* LOS TITULOS*/
.main-title {
  text-align: center;
  font-size: 2.8rem;
  color: #D96C2A; /* Naranja cálido */
  margin-bottom: 20px;
}

/* DESCRIPCIÓN */
.description {
  text-align: center;
  font-size: 1.1rem;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: #5C5C5C;
}

/* SECCIÓN DE GUÍAS (DEL INDEX.HTML*/
.guide-section {
  background-color: #FFF8EF; /* Fondo crema */
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.guide-section h2 {
  text-align: center;
  font-size: 2rem;
  color: #E57F4C;
  margin-bottom: 30px;
}

/* TARJETAS (IMAGENES) */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}

.guide-card {
  border: 1px solid #EBDCC3;
  border-radius: 8px;
  overflow: hidden;
  background-color: #FFFFFF;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.guide-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.guide-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.card-content {
  padding: 20px;
}

.card-content h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: #C7632A;
}

.card-content ul {
  list-style-position: inside;
  padding-left: 5px;
}

.card-content li {
  margin-bottom: 8px;
}

/* ESTILOSFORMULARIOS DE LOGIN, PERFIL Y REGISTRO */
.form-container {
  max-width: 500px;
  margin: 40px auto;
  padding: 30px;
  background-color: #FFF8EF;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  text-align: center;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #5C5C5C;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"] {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #D8C7B0;
  border-radius: 5px;
  font-size: 1rem;
  background-color: #FFF;
}

.form-btn {
  width: 100%;
  padding: 12px 20px;
  font-size: 1.1rem;
  font-weight: bold;
  color: #fff;
  background-color: #E57F4C;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.form-btn:hover {
  background-color: #D36F3E;
}

.form-error {
  background-color: #FEE0E0;
  color: #7B1E1E;
  border: 1px solid #F5C6C6;
  padding: 10px 15px;
  border-radius: 5px;
  margin-bottom: 20px;
}

.form-switch {
  margin-top: 20px;
  font-size: 0.95rem;
}

.form-switch a {
  color: #D96C2A;
  text-decoration: none;
  font-weight: bold;
}

.form-switch a:hover {
  text-decoration: underline;
}

/* ESTILOS CRUD DE CONTACTOS */
.crud-container {
  background: #FFFFFF;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  margin-top: 20px;
  border: 1px solid #EBDCC3;
}

/* FORMULARIO DE AGREGAR EDITAR DE CONTACTOS*/
.form-row {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px dashed #EBDCC3;
}

input.crud-input {
  padding: 12px;
  border: 2px solid #D8C7B0;
  border-radius: 6px;
  flex: 1;
  min-width: 220px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s;
}

input.crud-input:focus {
  border-color: #E57F4C;
}

/* BOTONES DEL CRUD */
button.btn-action {
  padding: 12px 25px;
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
  transition: transform 0.2s, background-color 0.2s;
}

button.btn-action:hover {
  transform: translateY(-2px);
}

.btn-add {
  background-color: #E57F4C; /* Naranja principal */
}

.btn-add:hover {
  background-color: #d35400;
}

.btn-cancel {
  background-color: #7f8c8d; /* Gris */
}

.btn-cancel:hover {
  background-color: #2c3e50;
}

/* BOTONES PEQUEÑOS (TABLA) */
.btn-small {
  padding: 6px 12px;
  font-size: 0.9rem;
  margin: 0 2px;
}

.btn-edit {
  background-color: #f39c12; /* Amarillo Naranja */
  color: #fff;
}

.btn-delete {
  background-color: #e74c3c; /* Rojo */
}

/* TABLA DE CONTACTOS */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

thead {
  background-color: #E57F4C;
  color: white;
}

th, td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

th {
  font-weight: 700;
  letter-spacing: 0.5px;
}

tbody tr:hover {
  background-color: #FFF8EF; /* Hover suave color crema */
}

/* GOOGLE SIGN-IN BUTTON STYLES */ 
/* SEPARADOR "O" */
.separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: #666;
}

.separator::before,
.separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ccc;
}

.separator span {
    padding: 0 10px;
    font-weight: bold;
    font-size: 14px;
}

/* AJUSTE PARA QUE GOOGLE LLENE EL ESPACIO EN EL CONTENEDOR */
.g_id_signin {
    margin-bottom: 15px;
    width: 100%;
}

/* CENTRAR EL BOTÓN DE GOOGLE */
.google-btn-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 20px;
}

/* ASEGURAR QUE EL BOTÓN DE GOOGLE RESPONDA AL FLEXBOX */
.g_id_signin {
    display: block;
}












/* --- CONFIGURACIÓN BASE --- */
:root {
    --naranja: #E57F4C;
    --crema: #FDF8F3;
    --blanco: #FFFFFF;
    --marron-texto: #5D4037;
}

body {
    background-color: var(--crema);
    font-family: 'Roboto Slab', serif;
    margin: 0;
    color: var(--marron-texto);
}

/* --- CONTENEDOR MAESTRO (El secreto del orden) --- */
.main-content {
    display: flex;
    justify-content: center; /* Centra todo el contenido horizontalmente */
    padding: 40px 20px;
    min-height: 100vh;
}

.container-principal {
    max-width: 800px; /* Evita que el diseño se estire feo en pantallas grandes */
    width: 100%;
}

/* --- TARJETAS PROFESIONALES --- */
.tarjeta-blanca {
    background: var(--blanco);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(93, 64, 55, 0.08); /* Sombra suave para profundidad */
    border: 1px solid rgba(229, 127, 76, 0.1);
}

/* --- TÍTULOS Y TEXTOS --- */
.titulo-impacto {
    font-family: 'Lilita One', cursive;
    color: var(--naranja);
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 10px;
}

.descripcion-suave {
    text-align: center;
    color: #888;
    margin-bottom: 40px;
}

/* --- FORMULARIO LINEAL (Ordenado) --- */
.formulario-lineal {
    display: flex;
    gap: 20px;
    background: #F9F6F3;
    padding: 25px;
    border-radius: 15px;
    align-items: flex-end; /* Alinea etiquetas y campos */
    margin-bottom: 30px;
}

.campo {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}

.campo label {
    font-weight: bold;
    font-size: 0.8rem;
    color: var(--naranja);
}

.campo input {
    padding: 12px;
    border: 1px solid #E0D5CC;
    border-radius: 8px;
    outline: none;
}

.btn-naranja {
    background-color: var(--naranja);
    color: white;
    border: none;
    padding: 13px 25px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s ease;
}

.btn-naranja:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(229, 127, 76, 0.3);
}

/* --- TABLA LIMPIA --- */
.tabla-sos {
    width: 100%;
    border-collapse: collapse;
}

.tabla-sos th {
    text-align: left;
    padding: 15px;
    color: var(--naranja);
    border-bottom: 2px solid var(--naranja);
}

.tabla-sos td {
    padding: 15px;
    border-bottom: 1px solid #EEE;
}







/* --- CONFIGURACIÓN DE LA BARRA NARANJA --- */
.navbar-sos {
    background-color: #E57F4C; /* Naranja vibrante de la referencia */
    width: 100%;
    height: 90px; /* Un poco más alta para dar aire a los componentes */
    display: flex;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px; /* Distribución ancha como en tu imagen */
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between; /* Separa el logo de los botones */
    align-items: center;
    padding: 0 40px;
}

.navbar-brand {
    font-family: 'Lilita One', cursive;
    color: #FFFFFF;
    font-size: 2.2rem; /* Tamaño grande y legible */
    text-transform: uppercase;
    margin: 0;
}

/* --- SECCIÓN DE USUARIO Y BOTONES --- */
.nav-user-info {
    display: flex;
    align-items: center;
    gap: 25px; /* Espacio entre el saludo y los botones */
}

.welcome-text {
    color: #FFFFFF;
    font-family: 'Roboto Slab', serif;
    font-size: 1.1rem;
    font-weight: 500;
}

#nombreUsuarioDisplay {
    font-weight: 900; /* Resalta el nombre del usuario */
    color: #FFFFFF;
}

/* --- DISEÑO DE BOTONES TIPO "CARD" --- */
.nav-buttons {
    display: flex;
    gap: 15px;
}

.btn-nav {
    background-color: #FBD3A9; /* Color crema suave de los botones en la referencia */
    color: #2D1B15; /* Texto oscuro para máxima legibilidad */
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 10px; /* Bordes redondeados suaves */
    font-weight: 800;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn-nav:hover {
    background-color: #FFFFFF;
    transform: translateY(-2px);
}

/* Botón de cerrar sesión con un tono sutilmente diferente si lo deseas */
.btn-logout {
    background-color: #FADBBF;
}





.tabla-sos {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.encabezado-tabla {
    background-color: #E57F4C; /* Color naranja de tus capturas */
    color: white;
    text-align: left;
}

.encabezado-tabla th {
    padding: 12px;
    font-size: 0.9rem;
}

.tabla-sos td {
    padding: 12px;
    border-bottom: 1px dashed #D1C4B9;
    color: #2D1B15;
}

/* Botones de acción */
.btn-accion {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-right: 5px;
}

.btn-borrar {
    background-color: #d9534f;
    color: white;
}

.btn-editar {
    background-color: #f0ad4e;
    color: white;
}