/* Estilos del Calendario alineados con el CRM */
:root{
  --cal-hour-bg: rgba(255,255,255,.02);
  --cal-hour-alt: rgba(17,24,39,.03);
  --accent-soft: rgba(46,166,255,.12);
}
.calendar-container{background:var(--surface);border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow);width:100%}
.calendar-layout{display:grid;grid-template-columns:minmax(240px, 280px) 1fr;gap:12px;padding:10px;align-items:start}
.cal-sidebar{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:10px;display:flex;flex-direction:column;gap:12px;position:sticky;top:54px;height:fit-content}
.cal-sidebar h4{margin:6px 0;font-size:13px;color:var(--muted)}
.calendar-list label{display:flex;align-items:center;gap:8px;padding:4px 6px;border-radius:6px;cursor:pointer}
.calendar-list label:hover{background:var(--surface-2)}
.calendar-list .dot{width:10px;height:10px;border-radius:50%;background:var(--dot,#888);display:inline-block;border:1px solid var(--border)}
.people-search input{width:100%;background:var(--surface-2);border:1px solid var(--border);border-radius:8px;padding:6px;color:var(--text)}
.mini-month{display:grid;grid-template-columns:repeat(7, 1fr);grid-auto-rows:28px;gap:4px}
.mini-month .mm-cell{display:flex;align-items:center;justify-content:center;border:1px solid var(--border);border-radius:6px;color:var(--muted);background:var(--surface)}
.mini-month .mm-cell.today{outline:2px solid var(--primary);color:var(--text)}
.mini-month .mm-cell.out-month{opacity:.55}
.calendar-toolbar{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--border);position:sticky;top:0;background:var(--surface);z-index:5;backdrop-filter:saturate(130%) blur(6px)}
.calendar-toolbar .left{display:flex;align-items:center;gap:8px}
.calendar-toolbar .right{display:flex;align-items:center;gap:8px}
.calendar-toolbar .chip.active{background:var(--surface-2);border-color:var(--border-strong)}
.calendar-toolbar .view-switch .chip{min-width:64px;text-align:center}
.calendar-toolbar .range-label{font-weight:700;margin-left:8px;font-size:14px}
.calendar-toolbar .chip{transition:background .15s ease, border-color .15s ease}
.status-pill{background:var(--surface-2);border:1px solid var(--border);border-radius:999px;padding:6px 12px;font-size:12px;color:var(--muted)}
.status-sep{color:var(--muted)}
.cal-search{display:flex;align-items:center;gap:8px;background:var(--surface-2);border:1px solid var(--border);border-radius:8px;padding:6px 10px}
.cal-search input{background:transparent;border:none;color:var(--text);outline:none}

/* Fila de widgets KPI */
.kpi-row{display:grid;grid-template-columns:repeat(4, minmax(180px, 1fr));gap:12px;padding:12px 16px;border-bottom:1px solid var(--border);background:var(--surface);position:sticky;top:48px;z-index:4}
.kpi-card{background:linear-gradient(180deg, var(--surface-2), rgba(255,255,255,.96));border:1px solid var(--border);border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:8px;box-shadow:var(--shadow);transition:transform .12s ease, box-shadow .12s ease}
.kpi-card:hover{transform:translateY(-1px);box-shadow:0 8px 22px rgba(0,0,0,.16)}
.kpi-top{display:flex;align-items:center;justify-content:space-between}
.kpi-chip{background:var(--surface-2);border:1px solid var(--border);border-radius:999px;padding:4px 10px;font-size:12px;color:var(--muted)}
.kpi-main{display:flex;align-items:center;gap:8px}
.kpi-value{font-weight:800;font-size:22px;color:var(--text)}
.kpi-trend{font-size:12px}
.kpi-trend.up{color:#10b981}
.kpi-trend.down{color:#ef4444}
.kpi-sub{font-size:12px;color:var(--muted)}
.kpi-progress{height:8px;background:var(--surface-2);border:1px solid var(--border);border-radius:999px;overflow:hidden}
.kpi-progress .bar{height:100%;background:linear-gradient(90deg, var(--primary), #10b981)}
.kpi-spark{width:100%;height:28px}
.kpi-spark polyline{fill:none;stroke:var(--primary);stroke-width:2}
.kpi-spark .area{fill:var(--accent-soft)}

/* Grilla semanal */
.calendar{position:relative;padding:10px;min-width:0;overflow-x:auto}
.week-grid{display:grid;grid-template-columns:48px repeat(7, minmax(140px, 1fr));border:1px solid var(--border);border-radius:12px;overflow:hidden;min-width:980px}
.week-grid.workweek{grid-template-columns:48px repeat(5, minmax(160px, 1fr));min-width:820px}
.week-header{display:grid;grid-template-columns:48px repeat(7, minmax(140px, 1fr));background:var(--surface-2);border-bottom:1px solid var(--border);min-width:980px;position:sticky;top:54px;z-index:4}
.week-header.workweek{grid-template-columns:48px repeat(5, minmax(160px, 1fr));min-width:820px}
.week-header .day{padding:8px 10px;font-weight:700;border-right:1px solid var(--border)}
.week-header .day:first-child{font-weight:600;color:var(--muted);text-transform:uppercase;font-size:11px}
.week-header .day.today{color:var(--primary)}
.week-header .day:last-child{border-right:none}
.week-body{display:grid;grid-template-columns:48px repeat(7, minmax(140px, 1fr))}
.hours-col{background:var(--surface-2)}
.hour{height:48px;display:flex;align-items:flex-start;justify-content:flex-end;padding:4px 6px;color:var(--muted);border-bottom:1px dashed var(--border);font-variant-numeric:tabular-nums}
.hour:nth-child(even){background:var(--cal-hour-alt)}
.day-col{position:relative;background:var(--cal-hour-bg);border-left:1px solid var(--border)}
.day-col.today{background:rgba(46,166,255,.06)}
.day-col .hour-line{height:48px;border-bottom:1px dashed var(--border)}
.day-col .hour-line:nth-child(even){background:var(--cal-hour-alt)}
.day-col:hover{background:rgba(46,166,255,.03)}
/* Indicador de hora actual y banda de almuerzo */
.now-line{position:absolute;left:0;right:0;height:2px;background:#ef4444;z-index:3}
.now-dot{position:absolute;left:-3px;width:8px;height:8px;background:#ef4444;border-radius:999px;transform:translateY(-3px);z-index:4;box-shadow:0 0 0 2px #fff}
/* Glow sutil */
.now-line::after{content:"";position:absolute;left:0;right:0;height:2px;background:rgba(239,68,68,.25);filter:blur(1.5px)}
.lunch-band{position:absolute;left:0;right:0;background:rgba(46,166,255,.06);border-top:1px dashed var(--border);border-bottom:1px dashed var(--border);z-index:1}

/* Fila Todo el día y chips */
.all-day-row{display:grid;grid-template-columns:120px repeat(7, minmax(140px, 1fr));align-items:center;border-bottom:1px solid var(--border);background:var(--surface)}
.week-grid.workweek .all-day-row{grid-template-columns:120px repeat(5, minmax(160px, 1fr))}
.all-day-label{padding:8px 10px;color:var(--muted);font-weight:600}
.all-day-cell{padding:6px;min-height:44px;border-right:1px solid var(--border)}
.all-day-event-chip{display:inline-flex;align-items:center;gap:6px;background:var(--surface-2);border:1px solid var(--border);border-left:4px solid var(--event-color, var(--primary));border-radius:999px;padding:6px 10px;margin:2px;font-size:12px;cursor:pointer}
.all-day-event-chip:hover{outline:1px solid var(--primary)}

/* Líneas de media hora y overlay de selección */
.half-hour{height:24px;display:flex;align-items:flex-start;justify-content:flex-end;padding:2px 6px;color:var(--muted);border-bottom:1px dashed var(--border)}
.day-col .half-hour-line{height:24px;border-bottom:1px dashed var(--border)}
.selection{position:absolute;left:6px;right:6px;background:rgba(46,166,255,.18);border:1px solid var(--primary);border-radius:8px;z-index:2;transition:top .12s ease, height .12s ease}

/* Evento */
.event{position:absolute;left:calc(6px + (var(--col-index, 0) * (100% / var(--col-count, 1))));width:calc((100% / var(--col-count, 1)) - 12px);border:1px solid var(--border-strong);border-radius:10px;background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.94));box-shadow:0 6px 18px rgba(0,0,0,.14);padding:8px 10px;color:var(--text);font-size:12px;line-height:1.25;cursor:pointer;overflow:hidden;z-index:2;transition:transform .12s ease, box-shadow .12s ease}
.event{animation:pop-in .12s ease}
@keyframes pop-in{0%{transform:scale(.98);opacity:.0}100%{transform:scale(1);opacity:1}}

/* Estado seleccionado en mini-calendario */
.mini-month .mm-cell.selected{background:var(--accent-soft);border-color:var(--primary);color:var(--text)}

/* Densidad compacta para media hora */
.calendar.dense .day-col .half-hour-line{height:18px}
.event::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--event-color, var(--primary));border-top-left-radius:8px;border-bottom-left-radius:8px}
.event .title{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.event .meta{font-size:11px;color:var(--muted)}
.event:hover{outline:1px solid var(--primary);transform:translateY(-1px);box-shadow:0 8px 22px rgba(0,0,0,.16)}    
.event .resize-handle{position:absolute;bottom:2px;right:6px;width:10px;height:10px;background:var(--surface-2);border:1px solid var(--border);border-radius:2px;cursor:n-resize}

/* Estado y feedback */
.empty-state{padding:20px;text-align:center;color:var(--muted)}
.toast{position:fixed;bottom:16px;right:16px;background:var(--surface-2);border:1px solid var(--border);border-radius:8px;padding:10px 12px;box-shadow:var(--shadow)}

/* Botón Crear en sidebar */
.cal-sidebar .btn-primary{width:100%;display:flex;align-items:center;justify-content:center;margin-bottom:8px}

/* Responsive */
@media (max-width: 960px){
  .calendar-layout{grid-template-columns:1fr}
  .cal-sidebar{position:static}
  .calendar-toolbar{flex-wrap:wrap;gap:8px}
  .week-header, .week-grid{grid-template-columns:32px repeat(7, minmax(120px, 1fr));min-width:760px}
  .hour{height:40px}
  .day-col .hour-line{height:40px}
}

/* Densidad compacta */
.calendar.dense .hour{height:36px}
.calendar.dense .day-col .hour-line{height:36px}
.calendar.dense .event{padding:6px 8px;font-size:11px}

/* Vista Mes */
.month-header{display:grid;grid-template-columns:repeat(7, minmax(140px, 1fr));gap:6px;margin-bottom:12px;/* posición fija eliminada para evitar que se superponga a los números de los días */position:static;top:auto;background:transparent;z-index:auto;padding:8px 0;min-width:980px}
.month-header .day{padding:8px 12px;font-weight:700;background:var(--surface-2);border:1px solid var(--border);border-radius:8px;text-align:center;font-size:13px;text-transform:uppercase;letter-spacing:0.5px;color:var(--muted)}
.month-header .day.today{color:var(--primary);background:var(--accent-soft);border-color:var(--primary)}
.month-grid{display:grid;grid-template-columns:repeat(7, minmax(140px, 1fr));grid-auto-rows:120px;gap:6px;min-width:980px}
.day-cell{position:relative;background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:6px}
.day-cell.today{outline:2px solid var(--primary);}
.day-cell.weekend{background:var(--surface-2)}
.day-cell.out-month{opacity:.55}
.day-cell .date{font-weight:700;color:var(--muted);margin-bottom:6px}
.day-cell .date{text-align:center}
.day-cell .mini-event{display:block;background:linear-gradient(135deg, var(--event-color, var(--primary)), var(--event-color, var(--primary)) 80%);border:1px solid var(--border);border-left:4px solid var(--event-color, var(--primary));border-radius:8px;padding:6px 8px;font-size:11px;line-height:1.3;margin-bottom:6px;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#fff;font-weight:600;box-shadow:0 2px 8px rgba(0,0,0,.15);transition:all .2s ease;position:relative;animation:event-pulse .4s ease}
@keyframes event-pulse{0%{transform:scale(.95);opacity:.7}100%{transform:scale(1);opacity:1}}
.day-cell .mini-event:hover{transform:translateY(-2px);box-shadow:0 4px 16px rgba(0,0,0,.25);outline:none}
.day-cell .mini-event.more{background:transparent;border:1px dashed var(--border);color:var(--primary);font-weight:500}
.day-cell .mini-event::before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;background:linear-gradient(135deg, rgba(255,255,255,.2), transparent 50%);border-radius:8px;pointer-events:none}

/* Modal */
.cal-modal{position:fixed;inset:0;background:rgba(0,0,0,.55);display:none;align-items:center;justify-content:center;z-index:1000}
.cal-modal.open{display:flex}
/* Efecto de aparición del diálogo */
.cal-modal-dialog{width:640px;max-width:94vw;background:#ffffff;border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow);opacity:0;transform:translateY(8px) scale(.98);transition:opacity .18s ease, transform .18s ease;/* Acento dinámico */border-top:6px solid var(--accent, #2ea6ff)}
.cal-modal.open .cal-modal-dialog{opacity:1;transform:translateY(0) scale(1)}
.cal-modal-header{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:10px;padding:12px;border-bottom:1px solid var(--border);background:#ffffff}
.cal-tabs{display:flex;gap:8px;padding:10px 12px;border-bottom:1px solid var(--border);background:#fff}
.tab-btn{background:var(--surface-2);border:1px solid var(--border);border-radius:6px;padding:6px 12px;color:var(--text);cursor:pointer;font-size:13px;transition:all .15s ease}
.tab-btn:hover{background:var(--surface-3)}
.tab-btn.active{background:var(--primary);border-color:var(--primary);color:#fff}
.cal-modal-body{display:flex;flex-direction:column;gap:12px;padding:12px;background:#ffffff;color:#111827}
.tab-panel{display:none}
.tab-panel.active{display:block}
.cal-modal-body input, .cal-modal-body textarea, .cal-modal-body select{width:100%;background:#ffffff;border:1px solid var(--border);border-radius:8px;padding:8px;color:#111827}
.cal-modal-footer{display:flex;align-items:center;gap:8px;padding:12px;border-top:1px solid var(--border)}
.cal-modal-footer .spacer{flex:1}

/* Rediseño del modal: grid y secciones */
.cal-modal-body.grid{display:grid;grid-template-columns:1.6fr 1fr;gap:12px}
.cal-section{background:#ffffff;border:1px solid var(--border);border-radius:10px;padding:12px;display:flex;flex-direction:column;gap:10px}
.cal-section .section-title{margin:0;color:var(--muted);font-size:13px}
.field{display:flex;flex-direction:column;gap:6px}
.field-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.toggle{display:flex;align-items:center;gap:8px;color:var(--text)}
.info-list{display:flex;flex-direction:column;gap:8px}
.info-item{display:flex;align-items:center;justify-content:space-between;background:var(--surface-2);border:1px solid var(--border);border-radius:8px;padding:8px}
.info-label{color:var(--muted);font-size:12px}
.info-value{font-weight:600}

/* Badge y banner de modo lectura */
.badge{background:#f3f4f6;border:1px solid var(--border);border-radius:999px;padding:4px 10px;font-size:12px;color:#111827}
.cal-readonly-banner{display:flex;align-items:center;gap:8px;background:var(--surface-2);border-bottom:1px solid var(--border);padding:8px 12px;color:var(--muted)}
.cal-readonly-banner .lock{font-size:14px}
.cal-modal-dialog.read-only .cal-section input,
.cal-modal-dialog.read-only .cal-section textarea,
.cal-modal-dialog.read-only .cal-section select{opacity:.7}
.cal-modal-dialog.read-only .section-title::after{content:' (lectura)';color:var(--muted);font-weight:400}

/* Bloque Lead en modal */
.lead-block{display:flex;align-items:center;gap:10px;margin-bottom:6px}
.lead-avatar{width:36px;height:36px;border-radius:50%;background:#e5e7eb;color:#111827;display:flex;align-items:center;justify-content:center;font-weight:700;border:1px solid var(--border)}
.lead-main{display:flex;flex-direction:column}
.lead-name{font-weight:700;color:#0f172a;text-decoration:none}
.lead-name:hover{text-decoration:underline}
.lead-sub{font-size:12px;color:#6b7280}
.lead-picker-row{display:flex;align-items:center;gap:8px}
.lead-help{font-size:12px;color:#6b7280;margin:6px 0 0}

/* Encabezado del módulo con icono (consistencia visual) */
.page-header .title-row{display:flex;align-items:center;gap:.5rem}
.page-header .title-row .module-icon{font-size:1.25rem}

/* Modo edge-to-edge para el módulo calendario */
#calendar-module.edge-to-edge{background:transparent;border:none;box-shadow:none;padding:0}
#calendar-module.edge-to-edge .calendar-container{border:none;box-shadow:none;border-radius:0}
#calendar-module.edge-to-edge .calendar-toolbar{border-bottom:1px solid var(--border)}

/* Colapso de sidebar */
.calendar-layout.sidebar-collapsed{grid-template-columns:0 1fr}
.calendar-layout.sidebar-collapsed .cal-sidebar{display:none}

/* Modo ancho completo del módulo */
#calendar-module.full-width .calendar-layout{grid-template-columns:1fr}
#calendar-module.full-width .cal-sidebar{display:none}
#calendar-module.full-width .calendar-container{width:100%}

/* Nuevo Header al estilo Google Calendar */
.cal-header{display:flex;align-items:center;justify-content:space-between;padding:8px 16px;background:var(--surface);border-bottom:1px solid var(--border);position:sticky;top:0;z-index:10}
.cal-current-month{font-size:22px;font-weight:700;color:var(--text);margin:0 16px;text-align:center;min-width:200px;background:var(--surface-2);padding:8px 16px;border-radius:12px;border:1px solid var(--border);box-shadow:0 2px 8px rgba(0,0,0,.1);animation:month-glow 2s ease-in-out infinite alternate}
@keyframes month-glow{0%{box-shadow:0 2px 8px rgba(0,0,0,.1)}100%{box-shadow:0 4px 16px rgba(46,166,255,.2)}}
.cal-header-left{display:flex;align-items:center;gap:12px}
.cal-header-right{display:flex;align-items:center;gap:12px}
.cal-menu-toggle{background:none;border:none;color:var(--text);cursor:pointer;padding:8px;border-radius:50%;display:flex;align-items:center;justify-content:center;transition:background .15s ease}
.cal-menu-toggle:hover{background:var(--surface-2)}
.cal-logo{display:flex;align-items:center;gap:8px}
.cal-logo-icon{width:24px;height:24px;background:var(--primary);border-radius:4px;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700}
.cal-logo-text{font-size:18px;font-weight:600;color:var(--text)}
.cal-nav{display:flex;align-items:center;gap:4px}
.cal-nav-btn{background:var(--surface-2);border:1px solid var(--border);border-radius:6px;padding:6px 12px;color:var(--text);cursor:pointer;font-size:13px;transition:all .15s ease}
.cal-nav-btn:hover{background:var(--surface-3);border-color:var(--border-strong)}
.cal-nav-btn.today{background:var(--primary);color:#fff;border-color:var(--primary)}
.cal-nav-btn.today:hover{background:var(--primary-dark)}
.cal-nav-arrows{display:flex;align-items:center;gap:2px}
.cal-nav-arrow{background:none;border:none;color:var(--text);cursor:pointer;padding:6px;border-radius:50%;display:flex;align-items:center;justify-content:center;transition:background .15s ease}
.cal-nav-arrow:hover{background:var(--surface-2)}
.cal-current-month{font-size:22px;font-weight:500;color:var(--text);margin:0 12px}
.cal-search-box{position:relative;display:flex;align-items:center;background:var(--surface-2);border:1px solid var(--border);border-radius:20px;padding:8px 16px;min-width:200px;transition:all .15s ease}
.cal-search-box:focus-within{background:var(--surface);border-color:var(--primary);box-shadow:0 0 0 2px rgba(46,166,255,.2)}
.cal-search-input{background:transparent;border:none;color:var(--text);outline:none;width:100%;font-size:14px}
.cal-search-input::placeholder{color:var(--muted)}
.cal-view-btn{background:var(--surface-2);border:1px solid var(--border);border-radius:6px;padding:6px 12px;color:var(--text);cursor:pointer;font-size:13px;transition:all .15s ease;display:flex;align-items:center;gap:6px}
.cal-view-btn:hover{background:var(--surface-3);border-color:var(--border-strong)}
.cal-view-btn.active{background:var(--primary);color:#fff;border-color:var(--primary)}
.cal-settings-btn{background:none;border:none;color:var(--text);cursor:pointer;padding:6px;border-radius:50%;display:flex;align-items:center;justify-content:center;transition:background .15s ease}
.cal-settings-btn:hover{background:var(--surface-2)}
.cal-user-profile{display:flex;align-items:center;gap:8px;padding:4px 8px;border-radius:20px;background:var(--surface-2);cursor:pointer;transition:background .15s ease}
.cal-user-profile:hover{background:var(--surface-3)}
.cal-user-avatar{width:32px;height:32px;border-radius:50%;background:var(--primary);display:flex;align-items:center;justify-content:center;color:#fff;font-weight:600;font-size:14px}
.cal-user-name{font-size:14px;font-weight:500;color:var(--text)}

/* Botón flotante Crear */
.cal-fab-create{position:fixed;bottom:24px;right:24px;width:56px;height:56px;background:var(--primary);border:none;border-radius:50%;color:#fff;font-size:24px;cursor:pointer;box-shadow:0 4px 12px rgba(0,0,0,.2);display:flex;align-items:center;justify-content:center;transition:all .15s ease;z-index:100}
.cal-fab-create:hover{background:var(--primary-dark);transform:translateY(-2px);box-shadow:0 6px 20px rgba(0,0,0,.25)}
.cal-fab-create:active{transform:translateY(0)}

/* Campana de notificaciones en header */
.notify-bell{position:relative;background:none;border:none;color:var(--text);cursor:pointer;padding:6px;border-radius:50%;display:flex;align-items:center;justify-content:center;transition:background .15s ease}
.notify-bell:hover{background:var(--surface-2)}
.notify-bell.active{color:var(--primary)}
.notify-count{position:absolute;top:2px;right:2px;min-width:16px;height:16px;padding:0 4px;border-radius:999px;background:var(--primary);color:#fff;font-size:10px;display:flex;align-items:center;justify-content:center;line-height:1}
.notify-offset{margin-left:6px;background:var(--surface-2);border:1px solid var(--border);border-radius:6px;padding:6px 8px;color:var(--text);font-size:12px}

/* Toast mejorado: animación de entrada/salida y stacking */
.toast{position:fixed;bottom:16px;right:16px;background:var(--surface-2);border:1px solid var(--border);border-radius:8px;padding:10px 12px;box-shadow:var(--shadow);color:var(--text);animation:toast-in .18s ease, toast-out .25s ease 1.35s forwards;pointer-events:none}
@keyframes toast-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@keyframes toast-out{to{opacity:0;transform:translateY(8px)}}

/* Indicador visible del mes actual */
.current-month{font-size:22px;font-weight:700;color:var(--text);margin:0 16px;text-align:center;min-width:200px;background:var(--surface-2);padding:8px 16px;border-radius:12px;border:1px solid var(--border);box-shadow:0 2px 8px rgba(0,0,0,.1);animation:month-glow 2s ease-in-out infinite alternate}
@keyframes month-glow{0%{box-shadow:0 2px 8px rgba(0,0,0,.1)}100%{box-shadow:0 4px 16px rgba(46,166,255,.2)}}

/* Color dot para el encabezado del modal */
.ev-color-dot{width:14px;height:14px;border-radius:50%;border:1px solid var(--border)}

/* Animación suave al renderizar el calendario */
.calendar.anim-fade{animation:cal-fade .18s ease}
@keyframes cal-fade{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}

/* Hover suave en mini eventos */
.day-cell .mini-event{transition:transform .12s ease, box-shadow .12s ease}
.day-cell .mini-event:hover{transform:translateY(-1px);box-shadow:0 2px 8px rgba(0,0,0,.15)}

/* Toolbar simplificado */
.calendar-toolbar-simple{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;background:var(--surface);border-bottom:1px solid var(--border)}
.cal-toolbar-left{display:flex;align-items:center;gap:8px}
.cal-toolbar-right{display:flex;align-items:center;gap:8px}
.cal-calendar-name{font-size:16px;font-weight:600;color:var(--text)}
.cal-status-indicator{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted)}
.cal-status-dot{width:8px;height:8px;border-radius:50%;background:#10b981}
.cal-view-indicator{font-size:14px;font-weight:500;color:var(--text);padding:6px 12px;background:var(--surface-2);border-radius:6px}

/* Responsive de KPI y ancho completo */
@media (max-width: 1200px){
  .kpi-row{grid-template-columns:repeat(3, minmax(160px, 1fr));}
}
@media (max-width: 960px){
  .kpi-row{grid-template-columns:repeat(2, minmax(160px, 1fr));top:0}
}
@media (max-width: 640px){
  .kpi-row{grid-template-columns:1fr}
}
