/* Estilos propios de la plataforma Garber. */

:root {
    --garber-primary: #0d1b2a;
    --garber-accent: #415a77;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.tool-card {
    transition: transform 0.12s ease-in-out, box-shadow 0.12s ease-in-out;
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
}

.navbar-dark {
    background-color: var(--garber-primary) !important;
}

/* ------------------------------------------------------------------
   Estilo general más fino (24 oct 2026): Inter, tamaños contenidos,
   bordes suaves y sin sombras pesadas.
   ------------------------------------------------------------------ */
body { font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: .9375rem; color: #1f2937; background: #f6f7f9 !important; }
.navbar { padding-top: .3rem; padding-bottom: .3rem; }
.navbar .nav-link { font-size: .875rem; }
/* Barra en una sola línea: lo que no cabe pasa al desplegable «Más» (static/js/navbar-mas.js). */
@media (min-width: 992px) {
    .navbar .nav-link, .navbar .navbar-brand { white-space: nowrap; }
    #mainNav { min-width: 0; }  /* que mida lo que de verdad cabe junto al logo */
    #mainNav > .navbar-nav { flex-wrap: nowrap; flex-shrink: 0; }
}
.navbar .navbar-brand { font-size: 1.05rem; }
.card { border-color: #e6e8ec; border-radius: .75rem; }
.card.shadow-sm, .shadow-sm.card { box-shadow: none !important; border: 1px solid #e6e8ec !important; }
.card-header { border-bottom-color: #eef0f3; font-size: .875rem; }
.btn { border-radius: .5rem; }
.btn-sm { font-size: .8125rem; }
.badge { font-weight: 500; }

.pagina-titulo { font-size: .95rem; color: #6b7280; margin-bottom: .9rem; }
.pagina-titulo > span:first-child { color: #111827; font-weight: 600; }
.pagina-titulo-sep { color: #c0c4cc; margin: 0 .4rem; }

.estado-punto { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; margin-right: .4rem; vertical-align: middle; }
.estado-punto.conectado { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.2); }

/* ------------------------------------------------------------------
   Ficha tipo Odoo (templates/platform/ficha.html): barra de control
   con ruta, acciones, estado y paginador; la hoja con los botones
   inteligentes a la izquierda y el lateral (historial, acciones) a la
   derecha. Pensada para todas las apps de la plataforma.
   ------------------------------------------------------------------ */
.ficha-control { margin: -.75rem 0 1rem; }
.ficha-ruta { font-size: .8125rem; color: #6b7280; }
.ficha-ruta a { text-decoration: none; color: #6b7280; }
.ficha-ruta a:hover { color: #0b5ed7; }
.ficha-ruta b { color: #111827; font-weight: 600; }
.ficha-ruta .ficha-ruta-sep { color: #c0c4cc; margin: 0 .35rem; }
.ficha-paginador .btn { padding: .1rem .45rem; }

.ficha-estado { display: inline-flex; border: 1px solid #e3e6ea; border-radius: .5rem; overflow: hidden; background: #fff; }
.ficha-estado span { position: relative; padding: .28rem .8rem .28rem 1.1rem; font-size: .78rem; color: #6b7280; white-space: nowrap; background: #fff; }
.ficha-estado span:first-child { padding-left: .8rem; }
.ficha-estado span:not(:last-child)::after {
    content: ""; position: absolute; right: -8px; top: 50%; width: 16px; height: 16px; z-index: 1;
    transform: translateY(-50%) rotate(45deg); border-top: 1px solid #e3e6ea; border-right: 1px solid #e3e6ea; background: inherit;
}
.ficha-estado span.activo { background: #eef4ff; color: #1d4ed8; font-weight: 600; }

.ficha-hoja { background: #fff; border: 1px solid #e6e8ec; border-radius: .75rem; padding: 1.25rem 1.4rem; }
.ficha-hoja h2 { font-weight: 600; letter-spacing: -.01em; }
.ficha-inteligentes { display: flex; flex-wrap: wrap; justify-content: flex-end; margin: -1.25rem -1.4rem 1.1rem; border-bottom: 1px solid #eef0f3; }
.ficha-inteligentes:empty { display: none; }
.ficha-inteligente { display: flex; align-items: center; gap: .55rem; padding: .55rem 1rem; min-width: 7.5rem; max-width: 13rem; border-left: 1px solid #eef0f3;
    color: #374151; text-decoration: none; }
.ficha-inteligente:hover { background: #f8f9fb; color: #111827; }
.ficha-inteligente i { font-size: 1.1rem; color: #9ca3af; }
/* Un valor largo (el nombre de un tipo, el título de un reel) se corta con puntos en vez de empujar los demás botones a otra fila. */
.ficha-inteligente span { min-width: 0; }
.ficha-inteligente b, .ficha-inteligente small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ficha-inteligente b { display: block; line-height: 1.15; font-weight: 600; font-size: .875rem; }
.ficha-inteligente small { display: block; color: #6b7280; line-height: 1.15; font-size: .72rem; }

.ficha-lateral .card { border: 1px solid #e6e8ec; }
@media (min-width: 1200px) { .ficha-lateral { position: sticky; top: 1rem; align-self: flex-start; max-height: calc(100vh - 2rem); overflow: auto; } }

/* Inicio con iconos de aplicación, como Odoo (platform_dashboard/home.html). */
.apps-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 1.75rem 1rem; max-width: 980px; margin: 1.5rem auto 0; }
.app-icono { display: flex; flex-direction: column; align-items: center; gap: .55rem; text-decoration: none; color: #1f2937; }
.app-icono-azulejo { width: 68px; height: 68px; border-radius: 18px; display: grid; place-items: center; color: #fff; font-size: 1.9rem;
    box-shadow: 0 1px 2px rgba(16,24,40,.08), inset 0 -2px 0 rgba(0,0,0,.08); transition: transform .12s ease, box-shadow .12s ease; }
.app-icono:hover .app-icono-azulejo { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(16,24,40,.14); }
.app-icono-nombre { font-size: .82rem; text-align: center; line-height: 1.25; max-width: 120px; }
.app-icono:hover .app-icono-nombre { color: #111827; }
.paleta-1 { background: #714B67; } .paleta-2 { background: #F09721; } .paleta-3 { background: #1F8F8F; } .paleta-4 { background: #3F7CC4; }
.paleta-5 { background: #D2423B; } .paleta-6 { background: #4E8C3A; } .paleta-7 { background: #5B6CC9; } .paleta-8 { background: #B5487A; }

/* ------------------------------------------------------------------
   Systray de la barra (9 nov 2026): bocadillo de notificaciones y
   reloj de pendientes, al estilo de Odoo. Lo pinta static/js/systray.js.
   ------------------------------------------------------------------ */
.systray .nav-link { line-height: 1; padding-top: .55rem; padding-bottom: .55rem; }
.systray-badge { position: absolute; top: .1rem; right: -.15rem; font-size: .62rem; padding: .2em .45em; }
.systray-menu { width: 340px; max-width: calc(100vw - 2rem); }
.systray-menu [data-lista] { max-height: 60vh; overflow-y: auto; }
.systray-item { white-space: normal; border-bottom: 1px solid #f1f2f4; }
.systray-no-leida { background: #f4f8ff; }
.systray-fecha { font-size: .72rem; }
.systray-punto { width: .5rem; height: .5rem; border-radius: 50%; background: var(--bs-primary); flex: 0 0 auto; }
