/* ── NICC Calendario — niccal.css  v2.5 (auditado 2026-04-25) ─────────────
   REV 1 [E1] Corregido selector dark modal:
              ANTES: [data-theme="dark"] .nc-modal-box  ← requería ancestro
              AHORA: .nc-modal-box.nc-dark              ← clase directa en el elemento
   REV 3 [M3] .nicc-cal-root como clase (además de #id) para múltiples instancias
   REV 5 Revisión general: todos los selectores coherentes con el JS v2.5
   ───────────────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&display=swap');

/* ── Variables: aplican a cualquier instancia ── */
.nicc-cal-root, #nicc-cal-root {
  --nc-dark:    #1a1a2e;
  --nc-accent:  #e94560;
  --nc-amber:   #f59e0b;
  --nc-mid:     #2a2a45;
  --nc-surface: #ffffff;
  --nc-surface2:#f4f3f8;
  --nc-text:    #1a1a2e;
  --nc-muted:   #6b6b85;
  --nc-border:  rgba(26,26,46,0.09);
  --nc-hover:   rgba(233,69,96,0.04);
  --nc-btn-bd:  rgba(255,255,255,0.22);
  --nc-btn-hov: rgba(255,255,255,0.10);
  --nc-toptext: rgba(248,247,244,0.85);
  --nc-topmuted:rgba(248,247,244,0.42);
  --nc-chip-c:  rgba(248,247,244,0.65);
  --nc-chip-bg: rgba(255,255,255,0.06);
  --nc-wk-bg:   #f0eef8;
  --nc-wk-bd:   rgba(26,26,46,0.12);
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 13px;
  color: var(--nc-text);
  background: var(--nc-surface);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--nc-border);
  box-shadow: 0 2px 12px rgba(26,26,46,0.08);
  margin: 12px 0;
}

/* Dark mode */
.nicc-cal-root[data-theme="dark"],
#nicc-cal-root[data-theme="dark"] {
  --nc-surface:  #16162a;
  --nc-surface2: #1e1e38;
  --nc-text:     #f0eef8;
  --nc-muted:    #9090b0;
  --nc-border:   rgba(255,255,255,0.07);
  --nc-hover:    rgba(233,69,96,0.10);
  --nc-wk-bg:    #1e1e38;
  --nc-wk-bd:    rgba(255,255,255,0.10);
}

/* Loading */
.nicc-cal-root .nicc-loading,
#nicc-cal-root .nicc-loading {
  padding: 40px;
  text-align: center;
  color: var(--nc-muted, #6b6b85);
  font-style: italic;
}

/* ── TOP BAR ── */
.nc-topbar {
  background: var(--nc-dark, #1a1a2e);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  flex-wrap: wrap;
}
.nc-logo {
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .5px;
  color: var(--nc-accent, #e94560);
  white-space: nowrap;
  text-transform: uppercase;
}
.nc-logo span {
  color: var(--nc-topmuted, rgba(248,247,244,0.42));
  font-size: 11px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  margin-left: 3px;
}
.nc-title {
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .3px;
  color: #f8f7f4;
  flex: 1;
  min-width: 100px;
}
.nc-btn {
  padding: 4px 10px;
  border-radius: 5px;
  border: 1px solid var(--nc-btn-bd, rgba(255,255,255,0.22));
  background: transparent;
  color: var(--nc-toptext, rgba(248,247,244,0.85));
  cursor: pointer;
  font-size: 11.5px;
  font-family: 'DM Sans', sans-serif;
  transition: background .15s;
  line-height: 1.4;
}
.nc-btn:hover { background: var(--nc-btn-hov, rgba(255,255,255,0.10)); }
.nc-btn.hoy   { border-color: var(--nc-accent, #e94560); color: var(--nc-accent, #e94560); }
.nc-btn.hoy:hover { background: rgba(233,69,96,0.15); }
.nc-vg {
  display: flex;
  gap: 5px;
  border: none;
  background: transparent;
}
.nc-vg .nc-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #9ca3af;
  border-radius: 6px;
  padding: 6px 14px;
  background: #e8e8e8;
  color: #1a1a2e;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: background .15s, color .15s, border-color .15s;
}
.nc-vg .nc-btn:hover {
  background: #d4d4d4;
  color: #1a1a2e;
  border-color: #888;
}
.nc-vg .nc-btn.act {
  background: var(--nc-accent, #e94560);
  color: #fff;
  border-color: var(--nc-accent, #e94560);
  font-weight: 700;
}
.nc-vg .nc-btn.act:hover {
  background: #c73652;
  border-color: #c73652;
}
.nc-vg-icon { font-size: 14px; line-height: 1; flex-shrink: 0; }
.nc-vg-lbl  { line-height: 1; }
.nc-btn.nc-tabla, .nc-btn.nc-masivas {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nc-btn.nc-tabla   { border-color: var(--nc-amber, #f59e0b); color: var(--nc-amber, #f59e0b); }
.nc-btn.nc-tabla:hover   { background: rgba(245,158,11,0.15); }
.nc-btn.nc-masivas { border-color: #a78bfa; color: #a78bfa; }
.nc-btn.nc-masivas:hover { background: rgba(167,139,250,0.18); }
.nc-toggle {
  padding: 4px 8px;
  border-radius: 5px;
  border: 1px solid var(--nc-btn-bd, rgba(255,255,255,0.22));
  background: transparent;
  cursor: pointer;
  color: var(--nc-toptext, rgba(248,247,244,0.85));
  font-size: 14px;
  line-height: 1;
  transition: background .15s;
}
.nc-toggle:hover { background: var(--nc-btn-hov, rgba(255,255,255,0.10)); }

/* ── ORIGEN BAR ── */
.nc-origen-bar {
  background: var(--nc-mid, #2a2a45);
  padding: 6px 13px;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nc-origen-lbl {
  font-size: 10px;
  font-weight: 500;
  color: var(--nc-topmuted, rgba(248,247,244,0.42));
  letter-spacing: .6px;
  text-transform: uppercase;
  margin-right: 3px;
  white-space: nowrap;
}
.nc-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  transition: all .15s;
  color: var(--nc-chip-c, rgba(248,247,244,0.65));
  background: var(--nc-chip-bg, rgba(255,255,255,0.06));
}
.nc-chip .cd {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: .65;
}
.nc-chip:hover { background: rgba(255,255,255,0.12); color: #f8f7f4; }
.nc-chip.sel   { color: #f8f7f4; background: rgba(255,255,255,0.13); border-color: rgba(255,255,255,0.22); }
.nc-chip.sel .cd { opacity: 1; }
.nc-chip.empty { opacity: .45; }
.nc-chip.empty:hover { opacity: .75; }
.nc-chip-n { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 15px; padding: 0 5px; border-radius: 10px; font-size: 9.5px; font-weight: 600; background: rgba(255,255,255,0.14); color: inherit; margin-left: 2px; }
.nc-chip.sel .nc-chip-n { background: rgba(255,255,255,0.25); }

/* ── LEGEND BAR ── */
.nc-legend {
  background: var(--nc-surface2, #f4f3f8);
  padding: 5px 13px;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--nc-border, rgba(26,26,46,0.09));
}
.nc-li   { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--nc-muted, #6b6b85); }
.nc-ld   { width: 6px; height: 6px; border-radius: 50%; }
.nc-lsk  { text-decoration: line-through; font-style: italic; font-size: 12px; color: var(--nc-muted, #6b6b85); opacity: .7; }
.nc-lsep { width: 1px; height: 11px; background: var(--nc-border); display: inline-block; margin: 0 2px; }

/* ── MONTH ── */
.nc-month  { display: grid; grid-template-columns: repeat(7,1fr); }
.nc-dow {
  padding: 5px 3px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--nc-accent, #e94560);
  letter-spacing: .6px;
  text-transform: uppercase;
  background: var(--nc-surface2, #f4f3f8);
  border-bottom: 2px solid var(--nc-accent, #e94560);
}
.nc-cell {
  min-height: 90px;
  max-height: 160px;         /* altura fija: sin esto las filas se deforman al mostrar todas las tareas */
  overflow-y: auto;          /* scroll interno si hay muchas píldoras */
  overflow-x: hidden;
  border-right: 1px solid var(--nc-border);
  border-bottom: 1px solid var(--nc-border);
  padding: 3px;
  background: var(--nc-surface, #fff);
  /* scroll discreto */
  scrollbar-width: thin;
  scrollbar-color: var(--nc-border) transparent;
}
.nc-cell::-webkit-scrollbar { width: 3px; }
.nc-cell::-webkit-scrollbar-thumb { background: var(--nc-border); border-radius: 2px; }
.nc-cell:nth-child(7n) { border-right: none; }
.nc-cell:hover         { background: var(--nc-hover); }
.nc-daynum {
  font-size: 11px;
  width: 20px; height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: 50%;
  margin: 0 auto 2px;
  color: var(--nc-muted, #6b6b85);
  /* Fijar número de día al tope cuando la celda hace scroll */
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--nc-surface, #fff);
}
.nc-daynum.in-month { color: var(--nc-text, #1a1a2e); }
.nc-daynum.today    { background: var(--nc-accent, #e94560); color: #fff; font-weight: 600; }
/* Número de día clicable → navega a vista día */
.nc-daynum[data-day] { cursor: pointer; transition: background .12s, color .12s; }
.nc-daynum[data-day]:hover:not(.today) { background: rgba(233,69,96,0.12); color: var(--nc-accent, #e94560); }
.nc-pill {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 4px;
  border-radius: 3px;
  font-size: 10px;
  margin-bottom: 1px;
  cursor: pointer;
  overflow: hidden;
  transition: opacity .12s;
  color: var(--nc-text, #1a1a2e); /* contraste oscuro fijo */
}
.nicc-cal-root[data-theme="dark"] .nc-pill { color: #f0eef8; }
.nc-pill strong, .nc-wk-mini strong { font-weight: 700; }
.nc-pill em, .nc-wk-mini em { font-style: italic; }
.nc-pill:hover  { opacity: .8; }
.nc-pill.done .nc-ptext { text-decoration: line-through; opacity: .5; }
.nc-pdot  { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.nc-pwdot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.nc-ptext  { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; display: flex; align-items: center; gap: 3px; min-width: 0; }
/* Sub-partes del texto en píldora: cliente · título */
.nc-pclient { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 1; min-width: 0; }
.nc-psep    { flex-shrink: 0; opacity: .5; font-size: .85em; }
.nc-ptitle  { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 2; min-width: 0; opacity: .85; }
.nc-more  { font-size: 9.5px; color: var(--nc-accent, #e94560); padding: 1px 4px; cursor: pointer; font-weight: 500; }

/* ── WEEK ── */
.nc-wk-head { display: grid; border-bottom: 2px solid var(--nc-accent, #e94560); background: var(--nc-surface2); }
.nc-whd     { padding: 5px 3px; text-align: center; border-right: 1px solid var(--nc-border); }
.nc-whd:last-child { border-right: none; }
.nc-whd-d   { font-size: 9.5px; font-weight: 500; color: var(--nc-accent, #e94560); text-transform: uppercase; letter-spacing: .4px; }
.nc-whd-n   { font-size: 19px; font-family: 'DM Sans', Arial, sans-serif; font-weight: 400; width: 30px; height: 30px; line-height: 30px; border-radius: 50%; margin: 1px auto 0; color: var(--nc-text); text-align: center; }
.nc-whd-n.today { background: var(--nc-accent, #e94560); color: #fff; }
/* Matriz trabajador × día */
.nc-wk-corner { padding: 8px 12px; font-size: 10px; font-weight: 500; color: var(--nc-accent, #e94560); text-transform: uppercase; letter-spacing: .5px; background: var(--nc-surface2); border-right: 1px solid var(--nc-border); display: flex; align-items: center; }
.nc-wk-grid   { display: grid; background: var(--nc-surface); }
.nc-wk-empty  { padding: 40px; text-align: center; color: var(--nc-muted); font-family: 'DM Sans', Arial, sans-serif; font-size: 14px; }
.nc-wk-rh     { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--nc-wk-bg); border-right: 1px solid var(--nc-wk-bd); border-bottom: 1px solid var(--nc-border); min-height: 50px; }
.nc-wk-avatar { width: 26px; height: 26px; }
.nc-wk-rh-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.nc-wk-rh-name { font-weight: 500; font-size: 12px; color: var(--nc-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nc-wk-rh-count { font-size: 10px; color: var(--nc-muted); }
.nc-wk-cell   { border-right: 1px solid var(--nc-border); border-bottom: 1px solid var(--nc-border); padding: 4px; display: flex; flex-direction: column; gap: 2px; min-height: 50px; }
.nc-wk-cell:nth-child(8n) { border-right: none; } /* última columna del row de 8 (1 header + 7 days) */
.nc-wk-cell.today { background: rgba(233,69,96,0.04); }
.nc-wk-mini   { display: flex; align-items: center; gap: 4px; padding: 3px 5px; border-radius: 3px; font-size: 10px; cursor: pointer; overflow: hidden; transition: opacity .12s; color: var(--nc-text, #1a1a2e); }
.nicc-cal-root[data-theme="dark"] .nc-wk-mini { color: #f0eef8; }
.nc-wk-mini:hover { opacity: .8; }
.nc-wk-mini.done .nc-wk-mini-tx { text-decoration: line-through; opacity: .5; }
.nc-wk-mini-tx { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; display: flex; align-items: center; gap: 0; min-width: 0; }
/* Sub-partes píldora semana: cliente · origen · encargo */
.nc-wk-cl  { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 1; min-width: 0; max-width: 35%; }
.nc-wk-sep { flex-shrink: 0; opacity: .45; font-size: .85em; padding: 0 1px; }
.nc-wk-or  { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 1; min-width: 0; opacity: .8; max-width: 28%; }
.nc-wk-ti  { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 2; min-width: 0; opacity: .75; }

/* ── DAY VIEW ── */
.nc-day-hdr  { text-align: center; padding: 10px; background: var(--nc-surface2); border-bottom: 2px solid var(--nc-accent, #e94560); }
.nc-day-dow  { font-size: 11px; font-weight: 500; color: var(--nc-accent, #e94560); text-transform: uppercase; letter-spacing: .7px; }
.nc-day-nav-wrap { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 2px 0; }
.nc-day-num  { font-size: 34px; font-family: 'DM Sans', Arial, sans-serif; font-weight: 400; width: 46px; height: 46px; line-height: 46px; border-radius: 50%; margin: 0; color: var(--nc-text); text-align: center; }
.nc-day-num.today { background: var(--nc-accent, #e94560); color: #fff; }
.nc-day-nav-btn  { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--nc-border, #ddd); background: var(--nc-surface, #fff); color: var(--nc-muted); font-size: 16px; line-height: 1; cursor: pointer; transition: background .15s, color .15s, border-color .15s; padding: 0; }
.nc-day-nav-btn:hover { background: var(--nc-accent, #e94560); color: #fff; border-color: var(--nc-accent, #e94560); }
.nc-day-full { font-family: 'DM Sans', Arial, sans-serif; font-size: 14px; color: var(--nc-muted); margin-top: 4px; }
.nc-day-list {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--nc-surface);
  max-height: 140vh;
  min-height: 400px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--nc-accent, #e94560) var(--nc-surface2, #f4f3f8);
}
/* [CRITICAL] Evitar que los cards se encojan dentro del flex-column */
.nc-day-list > .nc-worker { flex-shrink: 0; }
.nc-day-list::-webkit-scrollbar          { width: 14px; height: 14px; }
.nc-day-list::-webkit-scrollbar-track    { background: var(--nc-surface2, #f4f3f8); border-radius: 7px; }
.nc-day-list::-webkit-scrollbar-thumb    { background: rgba(233,69,96,0.55); border-radius: 7px; border: 2px solid var(--nc-surface2, #f4f3f8); min-height: 40px; }
.nc-day-list::-webkit-scrollbar-thumb:hover { background: var(--nc-accent, #e94560); }
.nc-day-list::-webkit-scrollbar-corner   { background: var(--nc-surface2, #f4f3f8); }
.nc-worker   { border: 1px solid var(--nc-wk-bd); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.nc-worker > * { flex-shrink: 0; }
.nc-wk-hd    { display: flex; align-items: center; gap: 8px; padding: 7px 12px; background: var(--nc-wk-bg); border-bottom: 1px solid var(--nc-wk-bd); }
.nc-avatar   { width: 26px; height: 26px; border-radius: 50%; background: var(--nc-accent, #e94560); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; color: #fff; flex-shrink: 0; text-transform: uppercase; }
.nc-wkname   { font-weight: 500; font-size: 12px; color: var(--nc-text); flex: 1; }
.nc-wkcount  { font-size: 10px; color: var(--nc-muted); padding: 1px 7px; border-radius: 10px; background: var(--nc-border); }
.nc-task-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--nc-border); transition: background .12s; cursor: pointer; min-height: 36px; background: var(--nc-surface, #fff); }
.nc-task-row:last-child { border-bottom: none; }
.nc-task-row:hover { background: var(--nc-hover); }
.nc-task-row.done .nc-t-title { text-decoration: line-through; opacity: .5; }
.nc-t-left   { display: flex; align-items: flex-start; gap: 8px; flex: 1; min-width: 0; }
.nc-t-dots   { display: flex; align-items: center; gap: 4px; padding-top: 4px; flex-shrink: 0; }
.nc-t-pdot   { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.nc-t-odot   { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.nc-t-info-block { flex: 1; min-width: 0; }
.nc-t-title  { font-size: 13px; font-weight: 500; color: var(--nc-text); line-height: 1.35; }
.nc-t-title strong { font-weight: 700; }
.nc-t-encargo { font-size: 11.5px; color: var(--nc-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nc-t-encargo .nc-t-lbl { color: var(--nc-accent, #e94560); font-weight: 500; text-transform: uppercase; font-size: 10px; letter-spacing: .4px; margin-right: 4px; }
.nc-t-notes  { font-size: 11.5px; color: var(--nc-text); opacity: .75; margin-top: 4px; line-height: 1.45; overflow-wrap: anywhere; word-break: break-word; }
.nc-task-row.done .nc-t-notes { display: none; }
.nc-t-notes strong { font-weight: 700; opacity: 1; }
.nc-t-badge  { font-size: 9.5px; font-weight: 500; padding: 2px 7px; border-radius: 10px; flex-shrink: 0; border: 1px solid transparent; white-space: nowrap; }
.nc-t-info-btn   { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--nc-border); background: var(--nc-surface2); cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 11px; color: var(--nc-muted); transition: all .15s; align-self: center; }
.nc-t-info-btn:hover { background: var(--nc-accent, #e94560); color: #fff; border-color: var(--nc-accent, #e94560); }
.nc-mf-notes strong, .nc-modal-title strong { font-weight: 700; }
.nc-mf-notes em, .nc-modal-title em { font-style: italic; }
.nc-day-empty { padding: 40px; text-align: center; color: var(--nc-muted); font-family: 'DM Sans', Arial, sans-serif; font-size: 14px; }

/* ── MODAL ── */
.nc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.nc-modal-overlay.show { display: flex; }
.nc-modal-box {
  background: #fff;
  color: #1a1a2e;
  border-radius: 12px;
  width: 100%;
  max-width: 440px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  animation: ncSlideUp .2s ease;
}
/* [E1] CORREGIDO: clase directa .nc-dark en el elemento, no en ancestro */
.nc-modal-box.nc-dark {
  background: #16162a;
  color: #f0eef8;
}
@keyframes ncSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.nc-modal-top   { background: #1a1a2e; padding: 14px 16px; display: flex; align-items: flex-start; gap: 10px; }
.nc-modal-bar   { width: 4px; border-radius: 4px; flex-shrink: 0; align-self: stretch; min-height: 40px; }
.nc-modal-htxt  { flex: 1; }
.nc-modal-title { font-family: 'DM Sans', Arial, sans-serif; font-size: 15px; font-weight: 600; color: #f8f7f4; line-height: 1.3; }
.nc-modal-title.done { text-decoration: line-through; opacity: .7; }
.nc-modal-sub   { font-size: 11px; color: rgba(248,247,244,0.55); margin-top: 2px; }
.nc-modal-close { background: rgba(255,255,255,0.1); border: none; color: rgba(248,247,244,0.7); width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-size: 15px; line-height: 1; transition: background .15s; flex-shrink: 0; }
.nc-modal-close:hover { background: #e94560; color: #fff; }
.nc-modal-body  { padding: 16px; }
.nc-modal-box.nc-dark .nc-modal-body { background: #16162a; }
.nc-modal-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.nc-mf          { display: flex; flex-direction: column; gap: 3px; }
.nc-mf.full     { grid-column: 1/-1; }
.nc-mf-lbl      { font-size: 10px; font-weight: 500; color: #e94560; text-transform: uppercase; letter-spacing: .5px; }
.nc-mf-val      { font-size: 12.5px; color: #1a1a2e; }
.nc-modal-box.nc-dark .nc-mf-val { color: #f0eef8; }
.nc-mf-notes    { font-size: 12px; color: #6b6b85; line-height: 1.5; }
.nc-modal-box.nc-dark .nc-mf-notes { color: #9090b0; }
.nc-modal-div   { height: 1px; background: rgba(26,26,46,0.09); margin: 10px 0; }
.nc-modal-box.nc-dark .nc-modal-div { background: rgba(255,255,255,0.07); }
.nc-mbadges     { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.nc-mbadge      { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 20px; font-size: 10.5px; font-weight: 500; border: 1px solid transparent; }
.nc-modal-footer { background: #f4f3f8; padding: 10px 16px; display: flex; justify-content: flex-end; align-items: center; gap: 8px; border-top: 1px solid rgba(26,26,46,0.09); flex-wrap: wrap; }
.nc-mf-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; }
/* ID en cabecera oscura del modal */
.nc-modal-titlerow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nc-mf-id-top {
  font-family: 'DM Sans', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--nc-accent, #e94560);
  background: rgba(233,69,96,0.18);
  padding: 4px 12px;
  border-radius: 6px;
  letter-spacing: .8px;
  line-height: 1.2;
  flex-shrink: 0;
  border: 1px solid rgba(233,69,96,0.35);
}
.nc-modal-box.nc-dark .nc-modal-footer { background: #1e1e38; border-color: rgba(255,255,255,0.07); }
.nc-mfbtn        { padding: 5px 14px; border-radius: 6px; font-size: 12px; cursor: pointer; font-family: 'DM Sans', sans-serif; border: 1px solid rgba(26,26,46,0.12); background: transparent; color: #6b6b85; transition: all .15s; text-decoration: none; display: inline-block; }
.nc-mfbtn:hover  { background: rgba(26,26,46,0.05); }
.nc-mfbtn.primary { background: #e94560; color: #fff; border-color: #e94560; }
.nc-mfbtn.primary:hover { opacity: .9; }

/* ── Popup "Nueva tarea" (clic en día vacío del calendario) ────────────── */
.nc-create-popup {
  position: fixed;
  z-index: 10100;
  display: none;               /* oculto por defecto */
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 6px 28px rgba(26,26,46,0.18), 0 1px 4px rgba(26,26,46,0.10);
  border: 1px solid rgba(26,26,46,0.10);
  padding: 14px 16px 14px;
  min-width: 236px;
  max-width: 280px;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 13px;
  animation: ncCpIn .14s ease;
}
.nc-create-popup.nc-cp-show { display: block; }

@keyframes ncCpIn {
  from { opacity: 0; transform: scale(.95) translateY(-4px); }
  to   { opacity: 1; transform: scale(1)   translateY(0);    }
}

/* Botón X (cerrar) */
.nc-cp-x {
  position: absolute;
  top: 8px; right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: #9090b0;
  font-size: 14px;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 4px;
  transition: color .12s, background .12s;
}
.nc-cp-x:hover { color: #1a1a2e; background: rgba(26,26,46,0.07); }

/* Etiqueta "Nueva tarea" */
.nc-cp-label {
  font-size: 11px;
  font-weight: 600;
  color: #e94560;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 5px;
  padding-right: 22px;  /* espacio para el botón X */
}

/* Fecha larga */
.nc-cp-date {
  font-size: 13.5px;
  font-weight: 500;
  color: #1a1a2e;
  margin-bottom: 12px;
  line-height: 1.3;
}

/* Botón principal */
.nc-cp-link {
  display: block;
  background: #e94560;
  color: #fff !important;
  border-radius: 7px;
  padding: 8px 14px;
  text-align: center;
  text-decoration: none !important;
  font-weight: 500;
  font-size: 12.5px;
  transition: background .15s;
  cursor: pointer;
}
.nc-cp-link:hover { background: #c7334e; color: #fff !important; }

/* Botón secundario: Ver vista semana / Ver día */
.nc-cp-nav {
  display: block;
  width: 100%;
  margin-top: 7px;
  background: none;
  border: 1px solid rgba(233,69,96,0.35);
  border-radius: 7px;
  padding: 6px 14px;
  color: #e94560;
  font-size: 11.5px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  font-family: 'DM Sans', Arial, sans-serif;
  transition: background .15s, border-color .15s;
  box-sizing: border-box;
}
.nc-cp-nav:hover { background: rgba(233,69,96,0.09); border-color: rgba(233,69,96,0.6); }

/* Dark mode del popup */
.nc-create-popup.nc-cp-dark {
  background: #1e1e38;
  border-color: rgba(255,255,255,0.10);
  box-shadow: 0 6px 28px rgba(0,0,0,0.40), 0 1px 4px rgba(0,0,0,0.25);
}
.nc-create-popup.nc-cp-dark .nc-cp-label { color: #e94560; }
.nc-create-popup.nc-cp-dark .nc-cp-date  { color: #f0eef8; }
.nc-create-popup.nc-cp-dark .nc-cp-x     { color: #9090b0; }
.nc-create-popup.nc-cp-dark .nc-cp-x:hover { color: #f0eef8; background: rgba(255,255,255,0.08); }
.nc-create-popup.nc-cp-dark .nc-cp-nav { border-color: rgba(233,69,96,0.4); color: #e96078; }
.nc-create-popup.nc-cp-dark .nc-cp-nav:hover { background: rgba(233,69,96,0.12); }

/* Feedback visual: área vacía de celda muestra cursor de creación */
.nc-cell[data-day]:hover      { background: rgba(233,69,96,0.03); cursor: cell; }
.nc-wk-cell[data-day]:hover   { background: rgba(233,69,96,0.04); cursor: cell; }
/* Restaurar cursor normal sobre los eventos dentro de la celda */
.nc-cell .nc-pill,
.nc-cell .nc-more,
.nc-wk-cell .nc-wk-evt,
.nc-wk-cell .nc-wk-mini  { cursor: pointer; }

/* Loading indicator dentro de [data-ncbody] */
[data-ncbody][data-loading="1"]::after {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, transparent, #e94560, transparent);
  animation: ncLoading 1.2s infinite;
}
@keyframes ncLoading {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%);  }
}
