/* GASCA · Calendario de centros y Horarios del personal (INC-00731; gasca_calendario_centro.js). Prefijo .cc- sobre las piezas .ra- */
#calendario-centro-view .cc-root, #horario-personal-view .cc-root { gap: 16px; }
.cc-barra { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cc-sep { flex: 1 1 auto; }
.cc-chk { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--ra-ink2, #334155); cursor: pointer; }
.cc-chk input { margin: 0; }
.cc-mut { color: #64748b; }
.cc-esc { color: #b4000c; }
.cc-vacio-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 32px 16px; text-align: center; color: #475569; }
.cc-vacio-card > i { font-size: 2rem; color: #94a3b8; }

/* indicadores */
.cc-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.cc-kpi { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 12px 14px; min-width: 0; }
.cc-kpi > i { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: var(--k, #64748b); }
.cc-kpi div { display: grid; min-width: 0; }
.cc-kpi span { font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #64748b; }
.cc-kpi b { font-size: 1.25rem; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-kpi small { font-size: .74rem; color: #64748b; }

/* leyenda */
.cc-leyenda { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: #334155; }
.cc-leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.cc-leyenda i, .cc-pt { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -1px; margin-right: 4px; }
.cc-leyenda em { font-style: normal; font-size: .66rem; background: #f1f5f9; border-radius: 6px; padding: 1px 5px; color: #475569; }
.cc-def-m { background: repeating-linear-gradient(45deg, #e2e8f0 0 3px, #fff 3px 6px); border: 1px dashed #94a3b8; }

/* calendario */
.cc-cal { padding: 14px; }
.cc-anual { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px 18px; }
.cc-mes-t { font-weight: 800; font-size: .86rem; margin-bottom: 6px; color: #0f172a; }
.cc-sem, .cc-dias { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cc-sem span { text-align: center; font-size: .64rem; font-weight: 800; color: #94a3b8; }
.cc-vacio { display: block; }
.cc-d { position: relative; aspect-ratio: 1 / 1; border: 0; border-radius: 7px; cursor: pointer; padding: 2px; font: inherit; font-size: .74rem; font-weight: 700;
    color: #fff; background: var(--c, #64748b); display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; overflow: hidden; }
.cc-d:hover { outline: 2px solid #0f172a; outline-offset: 1px; }
.cc-d.cc-def { color: #334155; background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--c) 22%, #fff) 0 4px, #fff 4px 8px); border: 1px dashed color-mix(in srgb, var(--c) 70%, #fff); }
.cc-d.cc-hoy { box-shadow: 0 0 0 2px #b4000c; }
.cc-d.cc-fuera { visibility: hidden; }
.cc-mes-g .cc-dias { gap: 5px; }
.cc-mes-g .cc-d { aspect-ratio: auto; min-height: 74px; align-items: flex-start; justify-content: flex-start; text-align: left; padding: 6px 7px; gap: 2px; font-weight: 600; }
.cc-mes-g .cc-n { font-weight: 800; font-size: .86rem; }
.cc-tn, .cc-mt { display: block; font-size: .68rem; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cc-mt { opacity: .85; font-weight: 500; }
.cc-h { font-size: .9rem; font-weight: 800; }
.cc-d.cc-libre:not(.cc-def) { opacity: .55; }
.cc-d.cc-trab { box-shadow: inset 0 0 0 3px rgba(255,255,255,.35); }
.cc-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 10px; }

/* listas de selección, avisos, detalles */
.cc-busca { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 10px; }
.cc-busca .ra-in { flex: 1 1 240px; }
.cc-lista { max-height: 55vh; overflow: auto; display: grid; gap: 6px; }
.cc-item { display: grid; gap: 2px; text-align: left; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; padding: 9px 12px; cursor: pointer; font: inherit; }
.cc-item:hover { border-color: #0f172a; }
.cc-item span { font-size: .78rem; color: #64748b; }
.cc-item em { font-style: normal; font-size: .72rem; color: #0f7b48; font-weight: 700; }
.cc-aviso { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: 10px; padding: 9px 12px; font-size: .84rem; margin-bottom: 8px; }
.cc-cals { display: grid; gap: 4px; font-size: .82rem; margin-bottom: 10px; }
.cc-chkall { margin: 6px 0; }
.cc-det { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: .84rem; max-height: 60vh; overflow: auto; }
.cc-det code { white-space: pre-wrap; word-break: break-word; font-size: .74rem; }
.cc-sub { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 6px; }
.cc-sub h4 { font-size: .9rem; font-weight: 800; margin: 0; }
.cc-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; font-size: .78rem; color: #64748b; }
.cc-dsem { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.cc-dsem label { display: inline-flex; gap: 4px; align-items: center; font-size: .84rem; }
.cc-form1 { margin-top: 12px; }
.cc-est { font-size: .72rem; font-weight: 800; border-radius: 999px; padding: 2px 8px; background: #f1f5f9; color: #475569; white-space: nowrap; }
.cc-est-vigente { background: #dcfce7; color: #166534; } .cc-est-futura { background: #dbeafe; color: #1e40af; } .cc-est-baja { background: #fee2e2; color: #991b1b; }
.cc-acc { display: inline-flex; gap: 4px; }

/* editor de tramos y «aplica» */
.cc-tramos { display: grid; gap: 6px; }
.cc-tr-dia { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 8px; align-items: center; border-bottom: 1px solid #f1f5f9; padding-bottom: 6px; }
.cc-tr-dia b { font-size: .82rem; }
.cc-tr-l { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-tr { display: inline-flex; align-items: center; gap: 4px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 3px 4px 3px 6px; }
.cc-tr .ra-in { height: 30px; width: 100px; padding: 0 6px; }
.cc-tr .ra-x { border: 0; background: none; color: #94a3b8; cursor: pointer; padding: 2px 4px; }
.cc-tr-ayuda { font-size: .78rem; color: #64748b; }
.cc-tr-ayuda [data-total] { font-weight: 800; color: #0f172a; }
.cc-aplica { display: grid; gap: 4px; }
.cc-ap-tipos { display: flex; flex-wrap: wrap; gap: 6px 14px; padding-left: 22px; }
.cc-gente { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px; max-height: 40vh; overflow: auto; margin-top: 6px; }
.cc-per { align-items: flex-start; border: 1px solid #e2e8f0; border-radius: 10px; padding: 7px 9px; }
.cc-per span { display: grid; } .cc-per small { color: #64748b; font-size: .72rem; }

/* móvil (375 px) */
@media (max-width: 640px) {
    .cc-barra > .ra-btn, .cc-barra > .ra-sel { flex: 1 1 auto; }
    .cc-barra .ra-btn { white-space: normal; height: auto; min-height: 36px; }
    .cc-sep { display: none; }
    .cc-anual { grid-template-columns: 1fr; }
    .cc-cal { padding: 8px; }
    .cc-mes-g .cc-dias { gap: 3px; }
    .cc-mes-g .cc-d { min-height: 54px; padding: 3px; }
    .cc-mes-g .cc-tn { display: none; }
    .cc-mt { font-size: .58rem; }
    .cc-h { font-size: .72rem; }
    .cc-tr-dia { grid-template-columns: 1fr auto; }
    .cc-tr-dia .cc-tr-l { grid-column: 1 / -1; grid-row: 2; }
    .cc-tr .ra-in { width: 88px; }
    .cc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .cc-root .cc-kpi { flex-direction: row; align-items: center; text-align: left; padding: 9px 10px; gap: 8px; }
    .cc-root .cc-kpi > i { width: 30px; height: 30px; flex-basis: 30px; font-size: .85rem; }
    .cc-kpi span { font-size: .58rem; }
    .cc-kpi b { font-size: 1.05rem; }
    .cc-kpi small { font-size: .66rem; }
    .cc-root .cc-barra > .ra-btn { flex: 1 1 140px; justify-content: center; }
}

/* INC-00731 fase 2: quién mantiene cada centro, tramos por tipo de día y aviso para Pedidos, Menús y Reparto (.ccav, se usa fuera del módulo) */
.ra-modal-b > .cc-mc { min-width: 0; }          /* que las tablas de las ventanas no ensanchen la ventana en el móvil (scroll dentro de .ra-tw) */
.cc-mc .ra-tw { max-width: 100%; overflow-x: auto; }
.cc-resp { display: flex; gap: 8px; align-items: flex-start; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 10px; padding: 8px 12px; font-size: .82rem; color: #334155; margin: 0 0 10px; }
.cc-resp i { color: #2563eb; margin-top: 2px; }
.cc-resp em { color: #a15c00; font-style: normal; font-weight: 700; }
.cc-item em.cc-tuyo { color: #2563eb; }
.cc-chip { display: inline-block; background: #eef2ff; color: #3730a3; border-radius: 999px; padding: 2px 9px; font-size: .76rem; margin: 2px 2px 2px 0; }
.cc-chip small { color: #64748b; }
.cc-usu { max-height: 50vh; overflow: auto; display: grid; gap: 6px; }
.cc-tt { display: grid; gap: 8px; }
.cc-tt-t { border: 1px dashed #cbd5e1; border-radius: 10px; padding: 6px 8px; }
.cc-tt-t > div { margin-top: 6px; }
.cc-ttx { color: #7c3aed; }
.ccav { display: flex; gap: 10px; align-items: flex-start; background: #fffbeb; border: 1px solid #fcd34d; border-left: 5px solid #f59e0b; color: #78350f;
        border-radius: 10px; padding: 10px 14px; margin: 10px 0; font-size: .85rem; line-height: 1.4; }
.ccav > i { font-size: 1.15rem; margin-top: 2px; color: #d97706; }
.ccav ul { margin: 4px 0 4px 18px; padding: 0; }
.ccav li { margin: 2px 0; overflow-wrap: anywhere; }
.ccav small { color: #92400e; opacity: .85; }
.ccav.ccav-rojo { background: #fef2f2; border-color: #fca5a5; border-left-color: #dc2626; color: #7f1d1d; }
.ccav.ccav-rojo > i { color: #dc2626; }
.ccav.ccav-info { background: #eff6ff; border-color: #bfdbfe; border-left-color: #2563eb; color: #1e3a8a; }
.ccav.ccav-info > i { color: #2563eb; }
.ccav-r { color: #b91c1c; font-weight: 700; }
.ccav-a { color: #b45309; font-weight: 700; }
.ccav-i { color: #1d4ed8; }
@media (max-width: 640px) {
    .ccav { padding: 9px 10px; font-size: .8rem; }
    .ccav ul { margin-left: 14px; }
}
/* fase 3 (INC-00731): historial de cambios por centro y tipo de centro propio */
.cc-hist .ra-card-h p { font-size: .8rem; }
.cc-quien { margin: 0 0 8px; }
.cc-hist .ra-t td { vertical-align: top; }
.cc-tc-uno { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px;
    padding: 10px 12px; margin: 0 0 10px; font-size: .84rem; line-height: 1.5; }
.cc-tc-uno em.cc-tuyo { color: #2563eb; font-style: normal; font-weight: 600; }
@media (max-width: 640px) {
    .cc-tc-uno { flex-direction: column; }
    .cc-root .ra-tabs { flex-wrap: wrap; }
}
