/* 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); }

/* Ticket layout */
.ticket-wrap { max-width: 380px; margin: 0 auto; }
.ticket {
  border: 1px dashed #bbb;
  border-radius: 10px;
  padding: 14px;
  background: #fff;
}
.ticket h1 { font-size: 18px; margin: 0 0 6px; }
.ticket .muted { color: #666; font-size: 12px; }
.ticket .rowline { display:flex; justify-content:space-between; gap:10px; font-size: 13px; }
.ticket .rowline strong { font-weight: 700; }
.ticket hr { border: 0; border-top: 1px dashed #ddd; margin: 10px 0; }

@media print {
  body { background: #fff; }
  .no-print { display:none !important; }
  .ticket-wrap { max-width: 100% !important; margin: 0 !important; }
  .ticket { border: none; padding: 0; }
}

/* ---- TPV Look & Feel ---- */
.tpv-page {
  padding-bottom: calc(var(--tpv-bottom-h, 140px) + env(safe-area-inset-bottom, 0px));
}

/* iPhone notch/home bar safe area */
.tpv-bottom-bar {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.tpv-header .tpv-title { font-size: 1.1rem; }
.tpv-header .tpv-sub { font-size: .85rem; }

.tpv-grid .tpv-tile {
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  padding: 14px 12px;
  text-align: left;
  width: 100%;
  min-height: 96px;
  position: relative;
  transition: transform .08s ease, box-shadow .08s ease, border-color .08s ease;
}

.tpv-grid .tpv-tile:hover { transform: translateY(-1px); }

.tpv-grid .tpv-tile .tpv-concept {
	color: GrayText;
  font-weight: 800;
  font-size: 1.2rem;
  line-height: 1.15;
}

.tpv-grid .tpv-tile .tpv-price {
  font-size: .8rem;
  font-weight: 400;
  opacity: .9;
  margin-top: 8px;
}

.tpv-grid .tpv-tile .tpv-hint {
  font-size: .75rem;
  opacity: .65;
  margin-top: 2px;
}

.tpv-grid .tpv-tile.selected {
  box-shadow: 0 10px 24px rgba(0,0,0,.10);
  border-color: rgba(0,0,0,.12);
  transform: translateY(-1px);
}

.tpv-grid .tpv-tile .tpv-check {
  position:absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  opacity: 0;
  transform: scale(.9);
  transition: opacity .08s ease, transform .08s ease;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.75);
}

.tpv-grid .tpv-tile.selected .tpv-check {
  opacity: 1;
  transform: scale(1);
}

/* Colores engamados (suaves) */
.tpv-tile.variant-1 { background: rgba(13,110,253,.10); } /* blue */
.tpv-tile.variant-2 { background: rgba(25,135,84,.10); }  /* green */
.tpv-tile.variant-3 { background: rgba(255,193,7,.14); }  /* amber */
.tpv-tile.variant-4 { background: rgba(13,202,240,.12); } /* cyan */
.tpv-tile.variant-5 { background: rgba(108,117,125,.10); }/* gray */
.tpv-tile.variant-6 { background: rgba(102,16,242,.10); } /* indigo-ish */
.tpv-tile.variant-7 { background: rgba(220,53,69,.08); }  /* red */
.tpv-tile.variant-8 { background: rgba(253,126,20,.10); } /* orange */

/* Barra inferior fija */
/* iPhone notch/home bar safe area */
.tpv-bottom-bar {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.tpv-bottom-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 12px;
}

.tpv-total-input {
  font-weight: 800;
  letter-spacing: .2px;
}

.tpv-selected-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(0,0,0,.03);
  font-size: .85rem;
}

@media (min-width: 992px) {
  .tpv-page { padding-bottom: 110px; }
  .tpv-bottom-inner { padding: 12px 16px; }
}

.tpv-total-input {
  height: 64px;
  font-size: 2rem;          /* grande, estilo TPV */
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.05em;
  background-color: #f8f9fa;
  border: 2px solid #dee2e6;
}

.tpv-total-input:focus {
  box-shadow: none;
  border-color: #0d6efd;
}

.tpv-btn-send {
  height: 64px;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(25, 135, 84, 0.35);
}

.tpv-btn-send:active {
  transform: scale(0.98);
}

.tpv-lock-overlay{
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(15, 18, 22, .72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.tpv-lock-card{
  width: min(420px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 16px;
}

.tpv-page{
  padding-bottom: calc(var(--tpv-bottom-h, 170px) + 12px + env(safe-area-inset-bottom));
}

/* Barra inferior realmente fija */
.tpv-bottom-bar{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1200;
  padding-bottom: env(safe-area-inset-bottom);
}

/* Que no quede pegada a los bordes */
.tpv-bottom-inner{
  max-width: 980px;
  margin: 0 auto;
  padding: 12px;
}

/* Ticket más alto y más “TPV” */
.tpv-ticket-btn{
  min-height: 72px;           /* ~1.5x de un btn-lg */
  font-size: 1.25rem;
  border-radius: 14px;
}
.tpv-ticket-btn .fs-4{
  font-size: 1.6rem !important;
}

.tpv-stats-fab{
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 1500;
  border-radius: 999px;
  width: 52px;
  height: 52px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.tpv-lock-overlay.tpv-lock-full{
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(255,255,255,.90);
  display: none; /* lo controla JS */
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.tpv-lock-full-inner{
  width: min(520px, 100%);
  text-align: center;
}

.tpv-lock-title{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  font-weight:800;
  font-size:22px;
  margin-bottom:12px;
}

.tpv-pin-display{
  width: 100%;
  font-size: 72px;
  text-align: center;
  padding: 16px 12px;
  letter-spacing: 22px;
  border-radius: 18px;
  border: 2px solid rgba(0,0,0,.15);
  background: #fff;
}

.tpv-pin-pad{
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.tpv-pin-key{
  height: 82px;
  font-size: 30px;
  font-weight: 800;
  border-radius: 18px;
  border: 0;
  background: rgba(0,0,0,.06);
}

.tpv-pin-key:active{ transform: scale(.98); }

.tpv-pin-key-ghost{ background: rgba(0,0,0,.03); }

.tpv-pin-error{
  margin-top: 10px;
  color: #b00020;
  font-size: 14px;
  min-height: 18px;
}

.tpv-pin-hint{
  margin-top: 12px;
  font-size: 13px;
}

.tpv-total-row{
  display:flex;
  gap:.5rem;
  align-items:stretch;
}

.tpv-qty{
  position:relative;
  flex:0 0 auto;
}

.tpv-qty-pill{
  height: 56px;             /* similar a form-control-lg */
  min-width: 56px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.15);
  background: #fff;
  font-weight: 700;
  padding: 0 .65rem;
  display:flex;
  align-items:center;
  justify-content:center;
}

.tpv-qty-panel{
  position:absolute;
  left:0;
  bottom: calc(100% + .45rem);
  display:none;
  gap:.4rem;
  align-items:center;
  padding:.45rem .5rem;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,.15);
  background:#fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 20;
}

.tpv-qty.open .tpv-qty-panel{ display:flex; }

.tpv-qty-btn{
  width:44px;
  height:44px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.15);
  background:#f8f9fa;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.tpv-qty-val{
  min-width: 44px;
  text-align:center;
  font-weight: 800;
  font-size: 18px;
}

.tpv-qty-close{
  width:38px;
  height:38px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  opacity:.65;
}
.tpv-qty-close:active{ opacity:1; }

.tpv-cart-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  padding:.6rem .6rem;
  border-bottom:1px solid rgba(0,0,0,.08);
}

.tpv-cart-main{ min-width:0; }
.tpv-cart-name{
  font-weight:700;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.tpv-cart-meta{ font-size:.85rem; color:#6c757d; }

.tpv-cart-right{
  display:flex;
  align-items:center;
  gap:.5rem;
}

.tpv-cart-price{
  font-weight:800;
  min-width:74px;
  text-align:right;
}

.tpv-cart-qty{
  display:flex;
  align-items:center;
  gap:4px;
}


.tpv-cart-qtyval{
  min-width:22px;
  text-align:center;
  font-weight:700;
}


.tpv-cart-del{ padding:.2rem .5rem; }

/* Carrito: no full-screen en móvil */
#tpvCartCanvas.offcanvas {
  --bs-offcanvas-width: 82vw;  /* ajusta 70-85 según te guste */
}

@media (min-width: 768px) {
  #tpvCartCanvas.offcanvas {
    --bs-offcanvas-width: 420px; /* desktop fijo */
  }
}


