/* Control365 — base styles (sin romper Bootstrap) */
:root{
  --c365-green: #0B6B3A;
  --c365-green-dark: #07512C;
  --c365-text: #1F2937;
  --c365-muted: #6B7280;

  --c365-radius: 18px;
  --c365-radius-sm: 14px;

  --c365-font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.c365-guest {
  font-family: var(--c365-font);
  color: var(--c365-text);
}

.c365-card{
  border-radius: var(--c365-radius);
}

.c365-title{
  letter-spacing: -0.02em;
}

.c365-subtitle{
  max-width: 52ch;
}

.c365-btn{
  border-radius: 12px;
  font-weight: 700;
  padding: .6rem 1rem;
}

/* Asegura el verde de marca incluso si cambias tema */
.btn-success.c365-btn{
  background-color: var(--c365-green);
  border-color: var(--c365-green);
}
.btn-success.c365-btn:hover{
  background-color: var(--c365-green-dark);
  border-color: var(--c365-green-dark);
}

.c365-feature-card{
  border-radius: var(--c365-radius-sm);
  background: #f8f9fa;      /* similar a bg-light */
  box-shadow: none;
}

.c365-icon{
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,.06);
  font-size: 20px;
}

.c365-note{
  border-radius: 14px;
}

/* ===== FICHAJE (site/time) ===== */

.c365-time{
  font-family: var(--c365-font, system-ui);
}

/* Inputs más redondos */
.c365-input{
  border-radius: 12px;
  padding: .75rem .9rem;
}

/* Botones marca */
.c365-btn{
  border-radius: 12px;
  font-weight: 800;
}

.c365-btn-lg{
  padding: .85rem 1rem;
}

.c365-btn-xl{
  padding: 1.1rem 1rem;
  font-size: 1.1rem;
  letter-spacing: .02em;
}

/* Cards / paneles */
.c365-status{
  border-radius: 18px;
}

.c365-status-neutral{
  background: #f6f6f6;
}

.c365-status-in{
  background: #eaf7ee;       /* verde claro */
  border: 1px solid #cfead6;
}

.c365-status-out{
  background: #fdecec;       /* rojo claro */
  border: 1px solid #f6caca;
}

/* Horas */
.c365-hours{
  border-radius: 18px;
  background: #f0f4ff;
  border: 1px solid #dbe4ff;
}

.c365-hours-value{
  margin-top: .25rem;
  font-size: 1.6rem;
  font-weight: 800;
}

/* Mapa */
.c365-mapbox{
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.08);
}

/* Lista hoy */
.c365-today-body .border-bottom:last-child{
  border-bottom: 0 !important;
}

/* ===== ITSS VIEW ===== */
.c365-itss-view{
  font-family: var(--c365-font, system-ui);
}

.c365-card{
  border-radius: var(--c365-radius, 18px);
}

.c365-btn{
  border-radius: 12px;
  font-weight: 800;
}

/* Pills IN/OUT (reutilizables en todo el sistema) */
.c365-pill{
  padding: .35rem .7rem;
  border: 1px solid transparent;
  font-weight: 800;
}

.c365-pill-in{
  background: #eaf7ee;
  border-color: #cfead6;
  color: #0b6b3a;
}

.c365-pill-out{
  background: #fdecec;
  border-color: #f6caca;
  color: #8a1f1f;
}

/* Hash monospace */
.c365-mono{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  word-break: break-all;
}

/* Table padding touch */
.c365-itss-table td, .c365-itss-table th{
  padding: .75rem .75rem;
}
/* ITSS audit visual */
.c365-row-warn{
  background: rgba(255, 193, 7, .12); /* amarillo suave */
}

.c365-ok{ font-size: 16px; }
.c365-bad{ font-size: 16px; }

.c365-mono{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  word-break: break-all;
}

.c365-admin-companies,
.c365-company-signup{
  font-family: var(--c365-font, system-ui);
}

.c365-card{
  border-radius: var(--c365-radius, 18px);
}

.c365-btn{
  border-radius: 12px;
  font-weight: 800;
}

.c365-input{
  border-radius: 12px;
}

.c365-note{
  border-radius: 12px;
}

.c365-pill-neutral{
  background: #f3f4f6;
  border: 1px solid rgba(0,0,0,.08);
  color: #111;
}

.c365-status-in {
  background: #eaf7ee;
  border-left: 4px solid #2ecc71;
}

.c365-status-pausa {
  background: #fff6e0;
  border-left: 4px solid #f1c40f;
}

.c365-status-out {
  background: #fdecec;
  border-left: 4px solid #e74c3c;
}

/* ===========================
   PWA Install UI
   =========================== */

.pwa-install-btn{
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1055;
}

.pwa-ios-hint{
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 1055;
  padding: 1rem;
  border-radius: .75rem;
  background: #212529;
  color: #fff;
}

/* Mejor lectura en móvil */
.pwa-ios-hint strong {
  font-weight: 600;
}

.c365-btn-xl .material-symbols-outlined{
  font-size: 22px;
  margin-right: .5rem;
}
  /* Banner */
  .c365-cookie {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 9999;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,.20);
    overflow: hidden;
  }
  .c365-cookie-inner {
    background: #111827; /* gris muy oscuro */
    color: #fff;
    padding: 18px 18px 14px 18px;
  }
  .c365-cookie-title { font-weight: 700; font-size: 1.05rem; margin-bottom: 6px; }
  .c365-cookie-text { font-size: .92rem; opacity: .92; margin-bottom: 12px; line-height: 1.35; }
  .c365-cookie-links a { color: #fff; text-decoration: underline; opacity: .95; }
  .c365-cookie-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
  }

  /* Botón flotante para reabrir preferencias */
  .c365-cookie-fab {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 9998;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111827;
    color: #fff;
    border: 1px solid rgba(255,255,255,.15);
    box-shadow: 0 12px 28px rgba(0,0,0,.22);
    cursor: pointer;
  }
  .c365-cookie-fab:hover { filter: brightness(1.08); }

  /* Ajustes responsive */
  @media (min-width: 992px) {
    .c365-cookie { left: auto; right: 16px; width: 520px; }
  }

/* ===== EMPLOYEE DASHBOARD ===== */
.c365-employee{
  font-family: var(--c365-font, system-ui);
}

.c365-card{
  border-radius: var(--c365-radius, 18px);
}

.c365-btn{
  border-radius: 12px;
  font-weight: 800;
}

.c365-kpi{
  font-size: 1.6rem;
  font-weight: 900;
  margin-top: .25rem;
}

/* Estados (reutiliza los de fichaje si ya los tienes) */
.c365-status-in{
  background: #eaf7ee;
  border: 1px solid #cfead6;
}

.c365-status-out{
  background: #fdecec;
  border: 1px solid #f6caca;
}

.c365-employee-hours{
  background: #fafafa;
  border: 1px solid rgba(0,0,0,.06);
}

/* Timeline */
.c365-timeline{
  position: relative;
  height: 22px;
  background: #f3f4f6;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.08);
  overflow: hidden;
}

.c365-now{
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(17,17,17,.35);
}

.c365-seg{
  position: absolute;
  top: 2px;
  bottom: 2px;
  border-radius: 10px;
  background: #bfe8c9;
  border: 1px solid #9fd7ad;
}

/* Tabla */
.c365-row td{
  padding: .55rem .6rem;
}

/* ===== YEARS ===== */
.c365-years{
  font-family: var(--c365-font, system-ui);
}

.c365-card{
  border-radius: var(--c365-radius, 18px);
}

.c365-btn{
  border-radius: 12px;
  font-weight: 800;
}

/* ===== REPORTS (today/day/yesterday) ===== */
.c365-report{
  font-family: var(--c365-font, system-ui);
}

.c365-card{
  border-radius: var(--c365-radius, 18px);
}

/* Timeline reusable */
.c365-timeline{
  position: relative;
  height: 22px;
  border-radius: 12px;
  background: #f3f4f6;
  border: 1px solid rgba(0,0,0,.08);
  overflow: hidden;
}

.c365-now{
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(17,17,17,.35);
}

.c365-seg{
  position: absolute;
  top: 2px;
  bottom: 2px;
  border-radius: 10px;
  background: #bfe8c9;
  border: 1px solid #9fd7ad;
}

.c365-report-table td, .c365-report-table th{
  padding: .75rem .8rem;
}

/* Timeline base */
.c365-timeline .c365-bar{
  position: relative;
  height: 22px;
  background: #f3f4f6;
  border-radius: 999px;
  border: 1px solid #e6e6e6;
  overflow: hidden;
}

.c365-timeline .c365-seg{
  position:absolute;
  top:2px;
  bottom:2px;
  border-radius: 999px;
}

/* Base jornada (azul suave) */
.c365-seg-base{
  background: rgba(59,130,246,.25);
  border: 1px solid rgba(59,130,246,.35);
}

/* Trabajo (verde) */
.c365-seg-work{
  background: rgba(34,197,94,.35);
  border: 1px solid rgba(34,197,94,.45);
}

/* Pausa (naranja) */
.c365-seg-pause{
  background: rgba(245,158,11,.35);
  border: 1px solid rgba(245,158,11,.45);
}

/* Pausa computable (amarillo más claro) */
.c365-seg-pause-paid{
  background: rgba(250,204,21,.45);
  border: 1px solid rgba(250,204,21,.55);
}

/* Marcador "ahora" */
.c365-now{
  position:absolute;
  top:0;
  bottom:0;
  width:2px;
  background:#111;
  opacity:.35;
}

/* Leyenda */
.c365-legend{
  font-weight: 600;
  border: 1px solid rgba(0,0,0,.08);
}
.c365-legend-base{ background: rgba(59,130,246,.18); color:#1e3a8a; }
.c365-legend-work{ background: rgba(34,197,94,.22); color:#14532d; }
.c365-legend-pause{ background: rgba(245,158,11,.22); color:#7c2d12; }
.c365-legend-pause-paid{ background: rgba(250,204,21,.28); color:#713f12; }

/* Tabla mini de fichajes */
.c365-events-mini {
  max-width: 260px;
}

.c365-events-mini table {
  line-height: 1.1;
}

.c365-events-mini td {
  padding: 2px 0;
}

.c365-events-mini tr + tr td {
  border-top: 1px dotted rgba(0,0,0,.08);
}

.c365-events-inline {
  line-height: 1.25;
  white-space: nowrap;
  overflow-x: auto;
}

/* Fichajes compactos, multilínea, sin scroll horizontal */
.c365-events-wrap{
  line-height: 1.25;
  white-space: normal;          /* permite varias líneas */
  word-break: break-word;
  overflow: hidden;             /* evita que “empuje” el layout */
}

.c365-events-wrap .c365-ev{
  display: inline;              /* texto compacto */
  white-space: nowrap;          /* cada token no se parte */
}

.c365-events-wrap .c365-ev-sep{
  display: inline-block;
  margin: 0 .35rem;
  opacity: .55;
}

.c365-timeline {
  position: relative;
  height: 22px;
  background: #f1f3f5;
  border-radius: 6px;
  overflow: hidden;
}

.c365-workday {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(13,110,253,.12);
}

.c365-seg {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 4px;
}

.c365-seg-in {
  background: #198754;
}

.c365-seg-pausa {
  background: #ffc107;
}

.c365-now {
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: 2px;
  background: #dc3545;
}

.c365-events {
  font-size: 12px;
  line-height: 1.4;
  color: #495057;
}

.c365-events span {
  margin-right: 10px;
  white-space: nowrap;
}

.vf-hero{
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
  border-radius: 1.25rem;
}
.vf-badge{
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  padding:.35rem .7rem;
  border-radius: 999px;
  background:#e8f5e9;
  color:#1b5e20;
  font-weight:600;
  font-size:.9rem;
}
.vf-card{
  border:0;
  border-radius: 1rem;
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
}
.vf-icon{
  font-size: 28px;
  line-height: 1;
}
.vf-kpi{
  font-size: 1.6rem;
  font-weight: 800;
}
.vf-muted{ color: rgba(0,0,0,.6); }


  .c365-time{ padding-bottom: 140px; }

  .c365-cta-bar{
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1055;

    background: rgba(255,255,255,.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0,0,0,.08);

    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .c365-btn-cta{
    padding: 18px 16px;
    font-size: 1.25rem;
    font-weight: 800;
    border-radius: 16px;
  }

  .c365-time{
    max-width: 100%;
  }

  /* Desktop / pantallas grandes */
  @media (min-width: 992px){
    .c365-time{
      max-width: 890px;      /* ← ajustable: 420 / 480 / 520 */
      margin-left: auto;
      margin-right: auto;
    }
  }
  
  /* Espacio para que el CTA no tape contenido */


/* Barra fija base (mobile first) */
.c365-cta-bar{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1055;

  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0,0,0,.08);

  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
}

/* Botones */
.c365-btn-cta{
  padding: 18px 16px;
  font-size: 1.25rem;
  font-weight: 800;
  border-radius: 16px;
}

/* ===== DESKTOP: limitar ancho de la barra ===== */
@media (min-width: 992px){
  .c365-cta-bar{
    max-width: 890px;      /* MISMO valor que .c365-time */
    margin-left: auto;
    margin-right: auto;


  }
}

#todayList .text-muted{
  font-size: 0.7rem;
  line-height: 1.15;
  opacity: 0.7; /* opcional */
}


.c365-month-row{
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.c365-daybox{
  text-align: center;
  line-height: 1.1;
}

.c365-daynum{
  font-size: 1.4rem;
  font-weight: 800;
}

.c365-dow{
  font-size: .75rem;
  text-transform: uppercase;
  color: #6c757d;
}

.c365-worked{
  margin-top: 4px;
  font-size: .75rem;
  font-weight: 600;
  color: #198754;
}

.c365-timeline{
  position: relative;
  height: 10px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 4px;
}

.c365-workday{
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(13,110,253,.25);
}

.c365-seg{
  position: absolute;
  top: 0;
  bottom: 0;
}

.c365-seg-in{ background: #198754; }
.c365-seg-pausa{ background: #ffc107; }

.c365-tiny-events{
  font-size: .75rem;
  line-height: 1.15;
  white-space: nowrap;
overflow: hidden;
  text-overflow: ellipsis;
}

<style>
/* ===== ESTADO EMPLEADO (solo esta vista) ===== */

.vf-state-in {
  background: linear-gradient(135deg, #eafaf1, #f6fffb);
  border-left: 6px solid #198754;
}

.vf-state-pause {
  background: linear-gradient(135deg, #fff8e1, #fffdf6);
  border-left: 6px solid #ffc107;
}

.vf-state-out {
  background: linear-gradient(135deg, #fdecea, #fff5f4);
  border-left: 6px solid #dc3545;
}

/* Texto y badge dentro del card */
.vf-state-in .badge {
  background-color: #198754;
  color: #fff;
}

.vf-state-pause .badge {
  background-color: #ffc107;
  color: #000;
}

.vf-state-out .badge {
  background-color: #dc3545;
  color: #fff;
}

/* KPI más contundente */
.vf-state-in .vf-kpi,
.vf-state-pause .vf-kpi,
.vf-state-out .vf-kpi {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: .5px;
}
</style>
