/* =====================================================================
   CSS propio del sistema de apadrinamiento de arboles
   ===================================================================== */

body { font-family: 'Sen', sans-serif; }

/* colores de la plataforma */
.backgroundall { background-color: #F8F8F8; }
.backgroundblue { background-color: #2d3d70; }
.backgroundgold { background-color: #DC582A; }
.textcolorblue { color: #0961ae; }
.tectcolorgold { color: #DC582A; }
.textcolorpetroleo { color: #003E51; }

.btn.backgroundblue:hover, .btn.backgroundblue:focus { background-color: #24315c; color: #fff; }
.btn.backgroundgold:hover, .btn.backgroundgold:focus { background-color: #c44a20; color: #fff; }

/* footer siempre abajo */
html, body { height: 100%; }
.wrapper { min-height: calc(100% - 4.5rem); }

.table th { text-align: center; }

/* titulo de las ventanas (formato administracion) */
.titulo-ventana { font-size: calc(1.4rem + 1.2vw); }
@media (min-width: 1200px) { .titulo-ventana { font-size: 2.4rem; } }

/* iconos de acciones dentro de las tablas */
.accion { cursor: pointer; vertical-align: middle; user-select: none; }
.accion + .accion { margin-left: 8px; }

/* datatables */
table.dataTable thead th { white-space: nowrap; }
table.dataTable td { vertical-align: middle; }
.dataTables_wrapper .dataTables_filter input { border: 1px solid #ced4da; border-radius: 6px; padding: 4px 8px; }

/* botones de exportacion de datatables */
.dt-barra { margin-bottom: 10px; }
.dt-barra .dt-buttons { float: none; display: flex; flex-wrap: wrap; gap: 4px; }
.dt-barra .dt-buttons .btn { min-width: 70px; }
.dt-controles { display: flow-root; }

/* ---------------- login y paginas publicas ---------------- */
.login-page {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: linear-gradient(rgba(0, 62, 81, .55), rgba(0, 62, 81, .55)), url('../img/fondologin.jpg') center / cover no-repeat fixed;
}

.login-card {
	width: 100%;
	max-width: 380px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
	padding: 32px 28px 24px;
}

.login-card.ancho { max-width: 560px; }

.login-logo { display: block; width: 160px; max-width: 60%; margin: 0 auto 12px; }

.login-title { text-align: center; color: #003E51; font-size: 1.1rem; font-weight: bold; margin-bottom: 24px; }

.login-card .form-control:focus, .login-card .form-select:focus {
	border-color: #DC582A;
	box-shadow: 0 0 0 .2rem rgba(220, 88, 42, .25);
}

.btn-login { background-color: #003E51; color: #fff; padding: 10px; }
.btn-login:hover, .btn-login:focus { background-color: #00566f; color: #fff; }

.toggle-pass { cursor: pointer; user-select: none; }

.login-footer { text-align: center; color: #6c757d; font-size: .8rem; margin-top: 20px; }

/* campo trampa contra robots del formulario publico */
.campo-oculto { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------- dashboard ---------------- */
.kpi {
	border: 1px solid #dee2e6;
	border-left: 4px solid #2d3d70;
	border-radius: 8px;
	background: #fff;
	padding: 10px 14px;
	height: 100%;
}
.kpi-titulo { font-size: .85rem; color: #6c757d; display: flex; align-items: center; gap: 4px; }
.kpi-titulo .material-icons { font-size: 18px; }
.kpi-valor { font-size: 1.8rem; font-weight: bold; line-height: 1.2; color: #2d3d70; }
.kpi-destacado { border-left-color: #DC582A; }
.kpi-destacado .kpi-valor { color: #DC582A; }
.kpi-verde { border-left-color: #3EA46C; }
.kpi-verde .kpi-valor { color: #3EA46C; }

/* ---------------- siembra y seguimiento ---------------- */
.vista-foto {
	width: 100%;
	max-height: 320px;
	object-fit: contain;
	background: #f1f1f1;
	border-radius: 8px;
	border: 1px dashed #ced4da;
}

.btn-camara { padding: 14px; font-size: 1.05rem; }
.btn-camara .material-icons { vertical-align: middle; }

.estado-gps { font-size: .85rem; }

/* linea de tiempo (historial del arbol) */
.linea-tiempo { position: relative; padding-left: 22px; }
.linea-tiempo::before { content: ''; position: absolute; left: 7px; top: 4px; bottom: 4px; width: 2px; background: #3EA46C; }
.linea-item { position: relative; margin-bottom: 22px; }
.linea-item::before {
	content: ''; position: absolute; left: -20px; top: 6px; width: 12px; height: 12px;
	border-radius: 50%; background: #fff; border: 3px solid #3EA46C;
}
.linea-item img { width: 100%; max-width: 420px; border-radius: 8px; cursor: zoom-in; }

/* ---------------- ficha publica del arbol ---------------- */
.ficha-encabezado { background: #003E51; color: #fff; padding: 14px 0; }
.ficha-mapa { width: 100%; height: 280px; border: 0; border-radius: 8px; }
.ficha-dato { font-size: .8rem; color: #6c757d; margin-bottom: 0; }
.ficha-valor { font-weight: bold; color: #003E51; }

/* permisos */
.tabla-permisos td, .tabla-permisos th { text-align: center; vertical-align: middle; }
.tabla-permisos td:first-child { text-align: left; }

/* codigo QR */
#codigoqr { display: inline-block; padding: 12px; background: #fff; border: 1px solid #dee2e6; border-radius: 8px; }

@media (max-width: 576px) {
	.kpi-valor { font-size: 1.4rem; }
	.login-card { padding: 24px 18px 18px; }
}
