/* ====== ESTILOS BASE ====== */
body {
  background-color: #121212;
  color: #f0f0f0;
}
body, .card, .modal-content, .sidebar,
.list-group-item, .text-muted, .form-label, label,
h1, h2, h3, h4, h5, h6, p, span, a {
  color: #f0f0f0 !important;
}
.text-muted {
  color: #cccccc !important;
}
.sidebar {
  background-color: #1e1e2e;
  border-right: 1px solid #2a2a3a;
  overflow-y: auto;
  height: 100vh;
}
.calendar-container {
  background-color: #1a1a2e;
  height: 100vh;
  padding: 20px;
  display: flex;
  flex-direction: column;
}
#calendarGrid {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: #1a1a2e;
  border-radius: 8px;
  overflow: auto;
  min-height: 400px;
}

/* ====== VISTA MES ====== */
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background-color: #2a2a3a;
  color: #ccc;
  font-weight: bold;
  text-align: center;
  padding: 8px 0;
}
.weekday {
  padding: 5px;
}
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  flex: 1;
}
.day {
  border: 1px solid #2a2a3a;
  min-height: 80px;
  padding: 5px;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  flex-direction: column;
}
.day:hover {
  background-color: #2a2a3a;
}
.day.empty {
  background-color: #121212;
  cursor: default;
}
.day.today {
  background-color: rgba(55, 136, 216, 0.2);
  border-color: #3788d8;
}
.day-number {
  font-size: 0.9rem;
  font-weight: bold;
  color: #ccc;
}
.day-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 4px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.dot-more {
  font-size: 0.7rem;
  color: #aaa;
  padding: 0 2px;
}

/* ====== VISTA DÍA ====== */
.day-view {
  padding: 10px;
}
.day-view-header {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 15px;
  border-bottom: 1px solid #2a2a3a;
  padding-bottom: 8px;
}
.day-view-empty {
  color: #aaa;
  text-align: center;
  padding: 30px 0;
}
.day-event-item {
  padding: 10px;
  margin-bottom: 8px;
  background: #2a2a3a;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}
.day-event-item:hover {
  background: #3a3a4a;
}

/* ====== VISTA SEMANA ====== */
.week-grid {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.week-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background-color: #2a2a3a;
  font-weight: bold;
  text-align: center;
  padding: 8px 0;
}
.week-day-header {
  padding: 5px;
}
.week-day-header.today {
  color: #3788d8;
}
.week-body {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  flex: 1;
}
.week-day-col {
  border: 1px solid #2a2a3a;
  padding: 6px;
  min-height: 100px;
  cursor: pointer;
  transition: background 0.2s;
  overflow-y: auto;
}
.week-day-col:hover {
  background-color: #252535;
}
.week-day-empty {
  color: #666;
  font-size: 0.8rem;
  text-align: center;
  padding: 10px 0;
}
.week-event-item {
  padding: 4px 6px;
  margin-bottom: 4px;
  background: #2a2a3a;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s;
}
.week-event-item:hover {
  background: #3a3a4a;
}

/* ====== VISTA AÑO ====== */
.year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  padding: 10px;
}
.year-month {
  background: #1e1e2e;
  border: 1px solid #2a2a3a;
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  transition: background 0.2s;
}
.year-month:hover {
  background: #2a2a3a;
}
.year-month-title {
  font-weight: bold;
  text-align: center;
  margin-bottom: 8px;
  color: #ccc;
}
.year-month-days {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  justify-content: center;
}
.year-day {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #aaa;
  border-radius: 3px;
}
.year-day.has-event {
  background-color: #3788d8;
  color: #fff;
  font-weight: bold;
}
.year-day.has-event:hover {
  background-color: #4a9af0;
}

/* ====== FORMULARIOS Y LISTAS ====== */
.form-control, .form-control-color, .form-select {
  background-color: #2a2a3a !important;
  color: #ffffff !important;
  border-color: #3b3b5c !important;
}
.form-control:focus, .form-control-color:focus {
  background-color: #2a2a3a !important;
  color: #ffffff !important;
  border-color: #5a5a7e !important;
  box-shadow: 0 0 0 0.25rem rgba(90, 90, 126, 0.25);
}
::placeholder {
  color: #aaaaaa !important;
  opacity: 1;
}
.list-group-item {
  background-color: transparent;
  color: #f0f0f0 !important;
  border-color: #2a2a3a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.25rem;
}
.list-group-item .event-title {
  cursor: pointer;
  flex: 1;
}
.list-group-item .event-actions button {
  background: none;
  border: none;
  color: #ccc;
  margin-left: 6px;
}
.list-group-item .event-actions button:hover {
  color: #fff;
}
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #1e1e2e;
}
::-webkit-scrollbar-thumb {
  background: #3b3b5c;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #5a5a7e;
}
.modal-content {
  background-color: #1e1e2e;
  color: #f0f0f0;
}
.form-control, .form-control-color {
  background-color: #2a2a3a !important;
  color: #ffffff !important;
  border-color: #2a2a3a !important;
}
.form-control:focus, .form-control-color:focus {
  background-color: #2a2a3a !important;
  color: #ffffff !important;
  border-color: #5a5a7e !important;
  box-shadow: 0 0 0 0.25rem rgba(90, 90, 126, 0.25);
}
.form-check-input {
  background-color: #2a2a3a;
  border-color: #3b3b5c;
}
.form-check-input:checked {
  background-color: #3788d8;
  border-color: #3788d8;
}
#debug-message {
  color: #88aadd;
  font-size: 0.9rem;
  text-align: center;
  margin-top: 10px;
}
