/* ═══════════════════════════════════════════════════════════════
   QualityHub — Módulo LOCALES (prototipo independiente)
   Estilos propios. Complementa css/main.css sin modificarlo.
   ═══════════════════════════════════════════════════════════════ */

.app { display: flex; min-height: 100vh; }
.lc-nav-group .nav-group-items { max-height: none !important; }
.lc-proto-tag {
  margin: 0 0 8px; padding: 8px 10px; border-radius: 8px;
  background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.35);
  color: #fbbf24; font-size: 11px; font-weight: 700; line-height: 1.4;
}
.lc-proto-tag span { font-weight: 500; color: rgba(255,255,255,.6); }
.lc-proto-tag i { margin-right: 4px; }

/* Marca pills */
.lc-brand { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 800; letter-spacing: .02em; white-space: nowrap; border: 1px solid transparent; }
.lc-brand-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.lc-logo { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 13px; color: #fff; flex-shrink: 0; }

/* KPI por marca */
.lc-brand-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 22px; }
.lc-brand-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; display: flex; gap: 14px; align-items: center; box-shadow: var(--shadow); border-left: 4px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.lc-brand-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.lc-brand-card .lc-logo { width: 46px; height: 46px; font-size: 15px; }
.lc-brand-card .n { font-size: 26px; font-weight: 900; line-height: 1; }
.lc-brand-card .l { font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-top: 3px; }
.lc-brand-card .f { font-size: 11px; color: var(--text-secondary); margin-top: 4px; }

/* Semáforo cumplimiento */
.lc-sem { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13px; }
.lc-sem-dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(0,0,0,.05); }
.lc-sem.ok .lc-sem-dot { background: #10b981; } .lc-sem.ok { color: #047857; }
.lc-sem.warn .lc-sem-dot { background: #f59e0b; } .lc-sem.warn { color: #b45309; }
.lc-sem.bad .lc-sem-dot { background: #ef4444; } .lc-sem.bad { color: #b91c1c; }

/* Mini stat */
.lc-mini { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 8px; }
.lc-mini.ok { background: #d1fae5; color: #065f46; }
.lc-mini.warn { background: #fef3c7; color: #92400e; }
.lc-mini.bad { background: #fee2e2; color: #991b1b; }
.lc-mini.gray { background: #f1f5f9; color: #475569; }

/* Layout detalle local */
.lc-detail-head { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 18px 20px; background: linear-gradient(135deg, rgba(37,99,235,.06), rgba(37,99,235,.01)); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; }
.lc-detail-head .lc-logo { width: 60px; height: 60px; font-size: 20px; border-radius: 14px; }
.lc-detail-head h3 { font-size: 20px; font-weight: 800; margin: 0 0 4px; }
.lc-detail-head .meta { font-size: 12.5px; color: var(--text-secondary); display: flex; flex-wrap: wrap; gap: 6px 16px; }
.lc-detail-head .meta i { color: var(--primary); width: 14px; }
.lc-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px 20px; }
.lc-info-row { display: flex; gap: 8px; font-size: 12.5px; padding: 6px 0; border-bottom: 1px solid var(--border-light); }
.lc-info-row b { color: var(--text-muted); font-weight: 600; min-width: 130px; }

/* Tabs internos del detalle */
.lc-subtabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin: 6px 0 16px; flex-wrap: wrap; }
.lc-subtab { padding: 9px 14px; font-size: 12.5px; font-weight: 700; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -2px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; border-radius: 6px 6px 0 0; }
.lc-subtab:hover { color: var(--text-primary); background: var(--surface-2); }
.lc-subtab.active { color: var(--primary); border-bottom-color: var(--primary); }
.lc-subtab .cnt { background: var(--surface-2); color: var(--text-secondary); border-radius: 10px; padding: 0 7px; font-size: 10px; }
.lc-subtab .cnt.bad { background: #fee2e2; color: #991b1b; }

/* Documentos legales */
.lc-doc-group { margin-bottom: 18px; }
.lc-doc-group-title { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--text-secondary); padding-bottom: 8px; border-bottom: 2px solid var(--border-light); margin-bottom: 8px; }
.lc-doc-group-title .lc-mini { margin-left: auto; }
.lc-doc { display: grid; grid-template-columns: 10px 1fr auto auto auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--border-light); border-radius: 8px; margin-bottom: 6px; background: var(--surface); }
.lc-doc:hover { background: var(--surface-2); }
.lc-doc .bar { width: 4px; height: 100%; min-height: 34px; border-radius: 3px; }
.lc-doc .nm { font-size: 13px; font-weight: 700; }
.lc-doc .nr { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.lc-doc .dt { font-size: 11.5px; color: var(--text-secondary); text-align: right; white-space: nowrap; }
.lc-doc .dt b { display: block; color: var(--text-primary); }
.lc-doc.vigente .bar { background: #10b981; }
.lc-doc.por_vencer .bar { background: #f59e0b; }
.lc-doc.vencido .bar { background: #ef4444; }
.lc-doc.faltante .bar { background: #94a3b8; }
.lc-doc.faltante .nm { color: var(--text-muted); }
.lc-doc-crit { font-size: 9px; font-weight: 800; color: #b91c1c; background: #fee2e2; border-radius: 4px; padding: 1px 5px; margin-left: 6px; vertical-align: middle; }
.lc-file { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border: 1px solid var(--border); border-radius: 6px; font-size: 11px; background: var(--surface-2); color: var(--text-secondary); }
.lc-file i.pdf { color: #dc2626; } .lc-file i.foto { color: #2563eb; }

/* Drop area */
.lc-drop { border: 2px dashed var(--border); border-radius: 8px; padding: 18px; text-align: center; cursor: pointer; color: var(--text-muted); font-size: 12px; transition: all .15s; }
.lc-drop:hover, .lc-drop.over { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.lc-drop i { font-size: 22px; display: block; margin-bottom: 6px; }

/* Visitas */
.lc-visit { border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; background: var(--surface); }
.lc-visit:hover { box-shadow: var(--shadow-md); }
.lc-visit-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lc-visit-head .aut { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13px; }
.lc-visit-head .aut i { width: 26px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; }
.lc-visit-head .right { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.lc-visit .motivo { font-size: 13px; margin: 8px 0 4px; font-weight: 600; }
.lc-visit .sub { font-size: 11.5px; color: var(--text-muted); display: flex; gap: 14px; flex-wrap: wrap; }
.lc-crit { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 800; padding: 2px 9px; border-radius: 10px; text-transform: uppercase; letter-spacing: .03em; }
.lc-task { display: grid; grid-template-columns: 22px 1fr auto auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--border-light); border-radius: 7px; margin-bottom: 5px; font-size: 12.5px; }
.lc-task.completada { background: #f0fdf4; } .lc-task.vencida { background: #fef2f2; } .lc-task.pendiente { background: #fffbeb; }
.lc-task .chk { width: 20px; height: 20px; border-radius: 5px; border: 2px solid var(--border); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; cursor: pointer; }
.lc-task.completada .chk { background: #10b981; border-color: #10b981; color: #fff; }
.lc-task .meta { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

/* Controles diarios */
.lc-ctrl-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.lc-ctrl { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; border: 1px solid var(--border-light); border-radius: 10px; background: var(--surface); }
.lc-ctrl .ic { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 15px; background: var(--primary-light); color: var(--primary); }
.lc-ctrl .nm { font-size: 13px; font-weight: 700; }
.lc-ctrl .ds { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.lc-slots { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.lc-slot { min-width: 54px; text-align: center; font-size: 10.5px; font-weight: 800; padding: 4px 7px; border-radius: 6px; border: 1px solid transparent; cursor: pointer; }
.lc-slot.ok { background: #d1fae5; color: #065f46; border-color: #a7f3d0; }
.lc-slot.dev { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.lc-slot.miss { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.lc-slot.wait { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }
.lc-slot.na { background: #fff; color: #94a3b8; border-color: #e2e8f0; border-style: dashed; }
.lc-heat { display: grid; grid-template-columns: 200px repeat(14, 1fr); gap: 3px; align-items: center; font-size: 11px; }
.lc-heat .h { font-size: 10px; color: var(--text-muted); text-align: center; font-weight: 700; }
.lc-heat .lbl { font-size: 12px; font-weight: 700; padding-right: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-heat .c { height: 22px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 9.5px; font-weight: 800; color: #fff; cursor: pointer; }
.lc-ring { width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 13px; }

/* Reclamos */
.lc-money { font-variant-numeric: tabular-nums; font-weight: 800; }
.lc-grav { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 800; padding: 2px 8px; border-radius: 10px; text-transform: uppercase; }

/* Panel general */
.lc-alert-list { display: flex; flex-direction: column; gap: 6px; }
.lc-alert { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border-light); font-size: 12.5px; background: var(--surface); }
.lc-alert i.lead { width: 28px; height: 28px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 12px; }
.lc-alert.bad i.lead { background: #fee2e2; color: #b91c1c; }
.lc-alert.warn i.lead { background: #fef3c7; color: #b45309; }
.lc-alert.info i.lead { background: #dbeafe; color: #1d4ed8; }
.lc-alert .t { font-weight: 700; }
.lc-alert .s { color: var(--text-muted); font-size: 11.5px; margin-top: 2px; }
.lc-alert .go { margin-left: auto; flex-shrink: 0; }

.lc-two { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; }
.lc-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.lc-two > *, .lc-three > * { min-width: 0; }
.lc-two canvas, .lc-three canvas { max-width: 100%; }
.lc-rank { display: flex; flex-direction: column; gap: 6px; }
.lc-rank-row { display: grid; grid-template-columns: 26px 1fr 110px 44px; gap: 10px; align-items: center; font-size: 12.5px; }
.lc-rank-row .pos { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: var(--text-secondary); }

/* Util */
.lc-muted { color: var(--text-muted); }
.lc-right { text-align: right; }
.lc-nowrap { white-space: nowrap; }
.lc-clickable { cursor: pointer; }
.lc-clickable:hover { text-decoration: underline; color: var(--primary); }
.lc-section-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin: 18px 0 10px; display: flex; align-items: center; gap: 8px; }
.lc-section-title i { color: var(--primary); }
.lc-total-box { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.lc-total-box div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.lc-total-box small { display: block; font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; font-weight: 700; letter-spacing: .04em; }
.lc-total-box b { font-size: 16px; }
.lc-total-box .tot { background: var(--primary-light); border-color: #bfdbfe; }

@media (max-width: 1024px) {
  .lc-two, .lc-three { grid-template-columns: 1fr; }
  .lc-heat { grid-template-columns: 140px repeat(14, 1fr); }
}
@media (max-width: 768px) {
  .sidebar { position: fixed; left: -280px; top: 0; bottom: 0; z-index: 100; transition: left .25s; }
  .sidebar.open { left: 0; }
  .mobile-menu-btn { display: inline-flex; }
  .topbar-search { display: none; }
  .lc-detail-head { grid-template-columns: auto 1fr; }
  .lc-detail-head > :last-child { grid-column: 1 / -1; }
  .lc-doc { grid-template-columns: 10px 1fr; }
  .lc-doc .dt { text-align: left; }
  .lc-ctrl { grid-template-columns: 40px 1fr; }
  .lc-slots { grid-column: 1 / -1; justify-content: flex-start; }
  .lc-total-box { grid-template-columns: 1fr 1fr; }
  .lc-heat { display: none; }
  .lc-rank-row { grid-template-columns: 26px 1fr 44px; }
  .lc-rank-row .bar-wrap { display: none; }
}
