:root {
	--verde-whatsapp: #25D366;
	--verde-oscuro: #075E54;
	--gris-fondo: #f0f0f0;
	--gris-texto: #555;
	--ancho-estandar: 1200px;
}

body {
	margin: 0;
	font-family: 'Segoe UI', sans-serif;
	background-color: var(--gris-fondo);
	color: var(--gris-texto);
}

.logo-header {
  height: 80px;
  vertical-align: middle;
  margin-right: 10px;
}

header {
	background-color: var(--verde-oscuro);
	color: white;
	padding: 1rem;
	display: flex;
	align-items: center;
	margin: 0 auto;
}

.header-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}


nav {
	width: 100%;
	background-color: #25D366;
	padding: 10px 0;
	box-sizing: border-box;
}

.nav-contenedor {
	max-width: var(--ancho-estandar);
	margin: 0 auto;
	padding: 0 20px;
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	align-items: center;
}

.nav-contenedor a {
	color: white;
	text-decoration: none;
	padding: 8px 12px;
	border-radius: 6px;
	font-weight: bold;
	transition: background-color 0.3s ease;
}

.nav-contenedor a:hover, .nav-contenedor a.logout:hover {
	background-color: rgba(255, 255, 255, 0.3);
}

.nav-contenedor a.logout {
	margin-left: auto;
	background-color: transparent;
	color: #E6F4EA;
	font-weight: 700;
	transition: background-color 0.3s ease;
	padding: 8px 12px;
	border-radius: 6px;
	text-decoration: none;
}

main {
	padding: 2rem;
	max-width: var(--ancho-estandar);
	min-height: 400px;
	margin: auto;
	background-color: white;
	border-radius: 10px;
	box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

h2 {
	color: var(--verde-oscuro);
}

form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

label {
	font-weight: bold;
}

input[type="text"], input[type="email"], input[type="password"], textarea {
	padding: 0.5rem;
	border: 1px solid #ccc;
	border-radius: 5px;
	font-size: 1rem;
}

input[type="date"] {
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 0.375rem; /* igual que los select con border-radius de Bootstrap (6px aprox) */
  padding: 0.625rem 0.75rem;
  height: calc(2.5rem + 2px); /* igual a altura estándar de campos de Bootstrap */
  font-size: 1rem;
  color: var(--gris-texto);
  box-sizing: border-box;
  transition: border-color 0.2s ease-in-out;
  font-family: 'Segoe UI', sans-serif;
  appearance: none; /* Oculta el ícono nativo en algunos navegadores */
}

input[type="date"]:focus {
  border-color: var(--verde-whatsapp);
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(37, 211, 102, 0.25);
}



button {
	background-color: var(--verde-whatsapp);
	color: white;
	border: none;
	padding: 0.75rem;
	font-size: 1rem;
	border-radius: 5px;
	cursor: pointer;
	transition: background 0.3s;
}

button:hover {
	background-color: #1ebd57;
}

.back-link {
	margin-top: 1rem;
	display: inline-block;
	color: var(--verde-oscuro);
	text-decoration: none;
	font-weight: 500;
	transition: color 0.3s ease;
}

.back-link:hover {
	color: #128C7E;
}

footer {
	margin-top: 2rem;
	text-align: center;
	padding: 1rem;
	font-size: 0.9rem;
	color: #888;
}

footer a {
	color: inherit;
	text-decoration: none;
}

footer a:hover {
	text-decoration: underline;
}

@media (max-width: 600px) {
	nav {
		flex-direction: column;
		align-items: center;
	}
}

.tabla-container {
	overflow-x: auto;
	margin-top: 1.5rem;
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
}

thead {
	background-color: var(--verde-whatsapp);
	color: white;
}

th, td {
	text-align: left;
	padding: 0.75rem;
	border-bottom: 1px solid #ddd;
}

tbody tr:hover {
	background-color: #f9f9f9;
}

@media (max-width: 600px) {
	table, thead, tbody, th, td, tr {
		display: block;
	}

	thead {
		display: none;
	}

	tr {
		margin-bottom: 1rem;
		background: white;
		border-radius: 5px;
		box-shadow: 0 0 5px rgba(0,0,0,0.05);
		padding: 1rem;
	}

	td {
		position: relative;
		padding-left: 50%;
		text-align: left;
		border-bottom: none;
	}

	td::before {
		position: absolute;
		top: 0.75rem;
		left: 1rem;
		width: 45%;
		white-space: nowrap;
		font-weight: bold;
		color: var(--gris-texto);
	}
}

.editar, .eliminar {
	display: inline-block;
	padding: 0.3rem 0.6rem;
	border-radius: 6px;
	font-weight: bold;
	text-decoration: none;
	font-size: 0.85rem;
}

.editar {
	color: #075E54;
	background-color: rgba(37, 211, 102, 0.12);
}

.editar:hover {
	background-color: rgba(37, 211, 102, 0.22);
}

.eliminar {
	color: #B00020;
	background-color: rgba(176, 0, 32, 0.1);
	margin-left: 0.5rem;
}

.eliminar:hover {
	background-color: rgba(176, 0, 32, 0.2);
}

.paginacion {
	margin-top: 1.5rem;
	text-align: center;
}

.pagina {
	display: inline-block;
	margin: 0 4px;
	padding: 6px 12px;
	text-decoration: none;
	color: #075E54;
	background-color: rgba(37, 211, 102, 0.1);
	border-radius: 4px;
	font-weight: bold;
	font-size: 0.9rem;
	transition: background-color 0.2s ease;
}

.pagina:hover {
	background-color: rgba(37, 211, 102, 0.2);
}

.pagina.activa {
	background-color: #25D366;
	color: white;
}

.breadcrumb {
	font-size: 0.95rem;
	color: #4F4F4F;
	margin-bottom: 0.5rem;
}

.breadcrumb a {
	color: #075E54;
	text-decoration: none;
	font-weight: bold;
}

.breadcrumb a:hover {
	text-decoration: underline;
}

.breadcrumb span {
	color: #333;
}

#mensaje_res {
	max-width: 1200px;
	margin: 1rem auto;
	padding: 12px 20px;
	border-radius: 6px;
	font-weight: 600;
	text-align: center;
	box-sizing: border-box;
}

.mensaje-exito {
	background-color: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.mensaje-error {
	background-color: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

.form-group label {
	margin-bottom: 10px;
	display: inline-block;
}

.form-group select {
	width: 100%;
	padding: 0.5rem;
	border: 1px solid #ccc;
	border-radius: 5px;
	font-size: 1rem;
	font-family: 'Segoe UI', sans-serif;
	font-weight: 400;
	color: var(--gris-texto);
	background-color: #fff;
	line-height: 1.5;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	box-sizing: border-box;
	cursor: pointer;
}

.form-group select:focus {
	border-color: #25D366;
	outline: none;
}

.connection-note {
  font-size: 1.2rem;
  margin-bottom: 20px;
  border-radius: 8px;
  color: #075E54;
}

.connection-note strong {
  color: #25D366;
  font-weight: bold;
}

.connection-note .username {
  color: #128C7E;
  font-weight: bold;
}

.formulario-importacion {
	display: flex;
	justify-content: center;
	margin: 0 0 20px 0;
	max-width:350px;
}

.formulario-importacion form {
	text-align: center;
	padding: 20px;
	border: 1px solid #ccc;
	border-radius: 10px;
	background-color: #f9f9f9;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.formulario-importacion form span {
	font-size: 12px;
	text-align: left;
}

.btn-importar {
	background-color: rgba(37, 211, 102, 0.1);
	color: #2b7a4b;
	border: 1px solid #7dd7a6;
	padding: 10px 20px;
	border-radius: 5px;
	cursor: pointer;
	font-weight: bold;
	transition: all 0.3s ease;
}

.btn-importar:hover {
	background-color: rgba(37, 211, 102, 0.2);
}

.btn-toggle-import {
	display: inline-block;
	margin-bottom: 10px;
	padding: 6px 12px;
	background-color: rgba(37, 211, 102, 0.1);
	color: #2b7a4b;
	text-decoration: none;
	border-radius: 4px;
	font-size: 0.9rem;
	transition: background-color 0.2s ease;
	border: 1px solid #7dd7a6;
}

.btn-toggle-import:hover {
	background-color: rgba(37, 211, 102, 0.2);
}

.set-bold{
	font-weight: bold;
}

.error-border {
	border: 2px solid #e74c3c;
	border-radius: 4px;
	box-shadow: 0 0 5px rgba(231, 76, 60, 0.5);
}

.error-message {
	color: #e74c3c;
	font-size: 0.9em;
	margin-top: 5px;
}

@media (max-width: 600px) {
	table, thead, tbody, th, td, tr {
		display: block;
	}

	thead {
		display: none;
	}

	tr {
		margin-bottom: 1rem;
		background: white;
		border-radius: 5px;
		box-shadow: 0 0 5px rgba(0,0,0,0.05);
		padding: 1rem;
	}

	td {
		position: relative;
		padding-left: 50%;
		text-align: left;
		border-bottom: none;
	}

	td::before {
		content: attr(data-label);
		position: absolute;
		top: 0.75rem;
		left: 1rem;
		width: 45%;
		white-space: nowrap;
		font-weight: bold;
		color: var(--gris-texto);
	}
}

/* ***** */

/* Contenedor principal */
.nav-contenedor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  
}

/* Links por defecto (escritorio) */
.nav-links a {
  color: white;
  margin: 0 10px;
  text-decoration: none;
  font-weight: bold;
}

/* Botón hamburguesa oculto en escritorio */
.menu-toggle {
  display: none;
  font-size: 24px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

/* Responsive para celular */
@media (max-width: 768px) {
	nav{
		padding:0;
	}

	.nav-contenedor {
		flex-direction: column;
		align-items: flex-start;
		background-color: #004d40;
		padding: 5px;
	}

	.menu-toggle {
		display: block;
		margin-bottom: 8px;
	}

	.nav-links {
		display: none;
		flex-direction: column;
		width: 100%;
	}

	.nav-links a {
		padding: 10px;
		width: 100%;
		border-top: 1px solid rgba(255, 255, 255, 0.2);
	}

	.nav-links.show {
		display: flex;
	}
	
	.editar, .eliminar {
		margin: 5px;
		padding: 10px;
	}
}
