:root {
  --lateral-ancho: 250px;
  --lateral-fondo: #1f2a33;
  --lateral-texto: #c9d3db;
  --acento: #c4581f;
}

body { background: #f4f5f7; }

.app { display: flex; min-height: 100vh; }

.app-lateral {
  width: var(--lateral-ancho);
  background-color: var(--lateral-fondo) !important;
  color: var(--lateral-texto);
  flex-shrink: 0;
}
@media (min-width: 992px) {
  .app-lateral { position: sticky; top: 0; height: 100vh; overflow-y: auto; }
}
.app-lateral.offcanvas-lg { --bs-offcanvas-bg: var(--lateral-fondo); --bs-offcanvas-width: var(--lateral-ancho); }

.app-marca { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.2rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.app-marca a { color: #fff; text-decoration: none; font-weight: 600; }
.app-marca .bi { color: var(--acento); }
.app-logo { padding: .9rem .4rem; }
.app-logo img { display: block; width: 135px; max-width: 100%; height: auto; }
.marca-sistema { font-weight: 600; letter-spacing: .35em; font-size: .8rem; margin-top: .6rem; }
.app-logo .marca-sistema { display: block; color: var(--lateral-texto); opacity: .75; font-size: .7rem; text-align: center; width: 135px; }
.subtitulo-ingreso { font-size: .7rem; white-space: nowrap; letter-spacing: .01em; }
@media (max-width: 440px) { .subtitulo-ingreso { white-space: normal; } }
.logo-ingreso { display: block; width: 100%; max-width: 210px; height: auto; margin: 1.25rem auto .75rem; }

.app-menu { padding: .5rem 0 2rem; }
.app-menu-titulo { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; opacity: .55; padding: 1rem 1.2rem .35rem; }
.app-menu a { display: flex; align-items: center; gap: .65rem; padding: .5rem 1.2rem; color: var(--lateral-texto); text-decoration: none; border-left: 3px solid transparent; }
.app-menu a:hover { background: rgba(255,255,255,.05); color: #fff; }
.app-menu a.activo { background: rgba(255,255,255,.08); color: #fff; border-left-color: var(--acento); }

.app-cuerpo { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-barra { display: flex; align-items: center; gap: .25rem; background: #fff; border-bottom: 1px solid #e3e6ea; padding: .6rem 1rem; position: sticky; top: 0; z-index: 10; }
.app-contenido { padding: 1.25rem 1rem 3rem; max-width: 1400px; width: 100%; }
@media (min-width: 768px) { .app-contenido { padding: 1.5rem 2rem 3rem; } }

.breadcrumb { margin: 0; font-size: .9rem; }

.tarjeta { background: #fff; border: 1px solid #e3e6ea; border-radius: .6rem; }
.tarjeta-cabecera { padding: .8rem 1rem; border-bottom: 1px solid #e3e6ea; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.tarjeta-cabecera h2, .tarjeta-cabecera h3 { font-size: 1rem; margin: 0; font-weight: 600; }
.tarjeta-cuerpo { padding: 1rem; }

.pagina-titulo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1.25rem; }
.pagina-titulo h1 { font-size: 1.5rem; margin: 0; font-weight: 600; }

.dato-numero { font-size: 1.8rem; font-weight: 600; line-height: 1; }
.dato-etiqueta { font-size: .8rem; color: #6c757d; text-transform: uppercase; letter-spacing: .04em; }

.table > :not(caption) > * > * { vertical-align: middle; }
.table-tarjeta { margin: 0; }
.table-tarjeta thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: #6c757d; font-weight: 600; background: #fafbfc; }

.lista-vacia { text-align: center; color: #6c757d; padding: 2rem 1rem; }
.lista-vacia .bi { font-size: 2rem; display: block; margin-bottom: .5rem; opacity: .5; }

.zona-soltar { border: 2px dashed #b8c0c8; border-radius: .6rem; padding: 2rem 1rem; text-align: center; background: #fafbfc; cursor: pointer; transition: background .15s; }
.zona-soltar.encima { background: #eef4ff; border-color: #0d6efd; }

.linea-tiempo { list-style: none; padding: 0; margin: 0; }
.linea-tiempo li { position: relative; padding: 0 0 1rem 1.4rem; border-left: 2px solid #e3e6ea; margin-left: .4rem; }
.linea-tiempo li::before { content: ""; position: absolute; left: -6px; top: .35rem; width: 10px; height: 10px; border-radius: 50%; background: #adb5bd; }
.linea-tiempo li.importante::before { background: var(--acento); }

.pantalla-ingreso { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; background: var(--lateral-fondo); }
.pantalla-ingreso .tarjeta { width: 100%; max-width: 420px; }

@media print {
  .app-lateral, .app-barra, .no-imprimir { display: none !important; }
  body { background: #fff; }
  .app-contenido { padding: 0; }
}

/* Tabla editable de tareas (plantillas y avance de proyectos/obras) */
.tabla-tareas input[type=text] { min-width: 14rem; }
.tabla-tareas input[type=number] { min-width: 5.5rem; }
