:root {
  --nuveo-blue: #0b4ea2;
  --nuveo-cyan: #22b8e8;
  --nuveo-bg: #f4f7fb;
  --nuveo-card: #ffffff;
  --nuveo-text: #1f2937;
  --nuveo-muted: #6b7280;
}

html[data-theme="dark"] {
  --nuveo-bg: #0f172a;
  --nuveo-card: #111827;
  --nuveo-text: #e5e7eb;
  --nuveo-muted: #9ca3af;
}

body {
  background: var(--nuveo-bg);
  color: var(--nuveo-text);
}

.nv-sidebar {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--nuveo-blue), #072d5e);
}

.nv-sidebar a {
  color: rgba(255,255,255,.88);
  text-decoration: none;
  display: block;
  padding: .75rem 1rem;
  border-radius: .75rem;
}

.nv-sidebar a:hover,
.nv-sidebar a.active {
  background: rgba(255,255,255,.14);
  color: #fff;
}

.nv-card {
  background: var(--nuveo-card);
  border: 1px solid rgba(148,163,184,.25);
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(15,23,42,.05);
}

.nv-stat {
  border-left: 4px solid var(--nuveo-cyan);
}

.badge-normal { background: #2563eb; }
.badge-extra { background: #f59e0b; color: #111827; }
.badge-holiday { background: #7c3aed; }
.badge-liquidated { background: #16a34a; }
.badge-not-liquidated { background: #dc2626; }
.badge-cancelled { background: #6b7280; }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  gap: .75rem;
}

.calendar-day {
  min-height: 140px;
  border-radius: .85rem;
  background: var(--nuveo-card);
  border: 1px solid rgba(148,163,184,.25);
  padding: .75rem;
}

.calendar-event {
  font-size: .78rem;
  border-radius: .55rem;
  padding: .35rem .45rem;
  margin-bottom: .35rem;
  background: rgba(34,184,232,.12);
  border-left: 3px solid var(--nuveo-cyan);
}


.calendar-event.is-my-event {
  background: rgba(34, 197, 94, .18);
  border-left: 4px solid #22c55e;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, .28) inset;
}

html[data-theme="dark"] .calendar-event.is-my-event {
  background: rgba(34, 197, 94, .22);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, .40) inset;
}

.badge-my-event {
  background: #16a34a;
  color: #fff;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1rem;
  align-items: center;
  font-size: .85rem;
  color: var(--nuveo-muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.legend-dot {
  width: .8rem;
  height: .8rem;
  border-radius: 999px;
  display: inline-block;
}

.legend-normal { background: #2563eb; }
.legend-extra { background: #f59e0b; }
.legend-holiday { background: #7c3aed; }
.legend-my-event { background: #22c55e; }

.table { color: var(--nuveo-text); }
.form-control, .form-select { border-radius: .7rem; }
.btn { border-radius: .7rem; }

@media (max-width: 991px) {
  .nv-sidebar { min-height: auto; }
  .calendar-grid { grid-template-columns: 1fr; }
}

.schedule-preview .calendar-day {
  min-height: 135px;
}

.calendar-day.is-holiday {
  border-color: rgba(124, 58, 237, .55);
  background: linear-gradient(180deg, rgba(124, 58, 237, .08), var(--nuveo-card) 42%);
}

.holiday-label {
  font-size: .78rem;
  border-radius: .55rem;
  padding: .35rem .45rem;
  background: rgba(124, 58, 237, .12);
  border-left: 3px solid #7c3aed;
}

.bg-purple {
  background: #7c3aed;
  color: #fff;
}

.legend-general-holiday { background: #7c3aed; }

/* v1.6 - Estados de ausencia / no trabaja */
.badge-vacation { background: #0ea5e9; color: #fff; }
.badge-nuveo_day { background: #14b8a6; color: #fff; }
.badge-nuveo_birthday { background: #ec4899; color: #fff; }
.badge-study_day { background: #6366f1; color: #fff; }
.badge-sick_leave { background: #ef4444; color: #fff; }

.calendar-event.is-absence {
  background: rgba(239, 68, 68, .10);
  border-left: 4px solid #ef4444;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, .18) inset;
}

html[data-theme="dark"] .calendar-event.is-absence {
  background: rgba(239, 68, 68, .18);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, .30) inset;
}

.legend-absence { background: #ef4444; }

.absence-alert {
  border-left: 4px solid #ef4444;
}

.absence-item {
  border: 1px solid rgba(148,163,184,.25);
  border-radius: .75rem;
  padding: .65rem .75rem;
  background: rgba(239, 68, 68, .06);
}

html[data-theme="dark"] .absence-item {
  background: rgba(239, 68, 68, .12);
}
