/* ======================
   MODO OSCURO GLOBAL
====================== */
.dark-mode body,
.dark-mode .panel,
.dark-mode .comments-list,
.dark-mode .calendar-background,
.dark-mode .calendar-grid,
.dark-mode .activity-clock,
.dark-mode .activity-title,
.dark-mode .activity-date,
.dark-mode .activity-category {
  background-color: #000 !important;
  color: #f0f0f0 !important;
}

.calendar-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding: 0 4px;
}

.calendar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.month-year {
  font-size: 23px;
  font-weight: 700;
}

.view-buttons {
  display: flex;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #d1d5db;
}

.view-btn {
  border: none;
  background: #e5e7eb;
  color: #111;
  padding: 6px 12px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.view-btn.active {
  background: #025ecc;
  color: white;
}

.view-btn:not(.active):hover {
  background: #d8dae0;
}
/* Buttons */
.btn,
.btn-icon {
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-weight: 200;
}

.btn.primary {
  background: #025ecc;
  color: #fff;
  padding: 8px 14px;
  border-radius: 4px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  background: #025ecc;
  color: white;
  font-size: 30px;
  align-items: center;
  justify-content: center;
  display: flex;
}

/* Layout */
.layout {
  display: grid;
  grid-template-columns: 1fr 450px;
  gap: 32px;
  align-items: start;
}

/* Calendar grid */
.weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  color: #000;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: 123px;
  background: white;
}

.calendar-day {
  position: relative;
  border: 1px solid #dcdcdc;
  display: flex;
  flex-direction: column;
  padding: 6px 8px;
  justify-content: space-between;
  cursor: pointer;
}

.calendar-day:hover {
  background: #f2f2f2;
}

.calendar-day.disabled {
  color: #aaa;
}

.calendar-day.selected {
  border: 2px solid #025ecc;
}

.calendar-day.today .day-number {
  color: #025ecc;
  font-weight: bold;
}

.day-number {
  font-size: 13px;
  text-align: right;
}

.day-events {
  display: flex;
  gap: 4px;
  position: absolute;
  bottom: 6px;
  left: 6px;
}

.event-pill {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

/* Sidebar */
.panel-right .white-card {
  background: #f5f5f5;
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 2px 10px 0 #49494940;
  margin-bottom: 30px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.add-btn {
  border: 1px solid #025ecc;
  color: #025ecc;
  background: transparent;
  border-radius: 8px;
  padding: 12px 10px;
  font-weight: 700;
  cursor: pointer;
}

.pills {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.pill {
  padding: 8px 12px;
  border-radius: 5px;
  font-weight: 600;
  color: white;
}

.pill-blue {
  background: #9fb7ff;
}
.pill-lightblue {
  background: #8fe2ff;
}
.pill-green {
  background: #9fe3b0;
}
.pill-yellow {
  background: #ffdf7a;
}
.pill-orange {
  background: #ffb48a;
}
.pill-red {
  background: #ff8f8f;
}
.pill-pink {
  background: #e39bff;
}
.pill-purple {
  background: #d2b9ff;
}

/* Activity list */
.activity-list {
  list-style: none;
  display: grid;
  gap: 12px;
}

.activity-item {
  display: flex;
  gap: 10px;
  padding: 5px 0px;
  border-radius: 8px;
  background: transparent;
  border-left: 2px solid transparent;
}

.timeline {
  display: flex;
  width: 14px;
  justify-content: center;
  margin-top: 3px;
  position: relative;
}

.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #025ecc;
  box-shadow: 0 2px 6px rgba(46, 111, 255, 0.14);
}
.activity-content {
  flex: 1;
  padding-right: 6px;
}
.activity-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.activity-date {
  font-weight: 700;
  color: #111827;
  font-size: 15px;
}
.activity-clock {
  color: #8b94a3;
  font-weight: 700;
  font-size: 13px;
}
.activity-title {
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 4px;
}

/* ======================
         ESTILOS RESPONSIVE
      ====================== */

/* Pantallas medianas (tablets) */
@media (max-width: 1024px) {
  .layout {
    grid-template-columns: 1fr;
    margin: 0px 15px;
    gap: 20px;
  }

  .panel-right {
    order: -1;
  }

  .calendar-grid {
    grid-auto-rows: 100px;
  }

  .panel-right .white-card {
    padding: 16px;
  }
}

/* Pantallas móviles */
@media (max-width: 768px) {
  .layout {
    margin: 0px 10px;
    gap: 16px;
  }

  .calendar-top-bar {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .calendar-controls {
    justify-content: center;
  }

  .month-year {
    text-align: center;
    font-size: 18px;
  }

  .view-buttons {
    justify-content: center;
  }

  .view-btn {
    padding: 8px 10px;
    font-size: 14px;
  }

  .weekdays {
    font-size: 14px;
  }

  .calendar-grid {
    grid-auto-rows: 70px;
  }

  .calendar-day {
    padding: 4px;
  }

  .day-number {
    font-size: 12px;
  }

  .event-pill {
    width: 8px;
    height: 8px;
  }

  .panel-head {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .add-btn {
    width: 100%;
    text-align: center;
  }

  .pills {
    grid-template-columns: 1fr 1fr;
  }

  .pill {
    font-size: 12px;
    padding: 6px 8px;
  }

  .activity-item {
    padding: 8px 0;
  }

  .activity-date {
    font-size: 14px;
  }

  .activity-clock {
    font-size: 12px;
  }

  .activity-title {
    font-size: 13px;
  }
}

/* Pantallas muy pequeñas */
@media (max-width: 480px) {
  .layout {
    margin: 0px 5px;
  }

  .calendar-grid {
    grid-auto-rows: 60px;
  }

  .weekdays div {
    font-size: 12px;
  }

  .day-number {
    font-size: 11px;
  }

  .pills {
    grid-template-columns: 1fr;
  }

  .view-buttons {
    flex-wrap: wrap;
  }

  .view-btn {
    flex: 1;
    min-width: 60px;
  }

  .btn.primary {
    padding: 10px 12px;
  }

  .btn-icon {
    width: 40px;
    height: 40px;
  }
}

/* Mejoras de accesibilidad táctil */
@media (hover: none) and (pointer: coarse) {
  .calendar-day {
    min-height: 60px;
  }

  .btn,
  .btn-icon,
  .view-btn,
  .add-btn {
    min-height: 44px;
    padding: 12px;
  }

  .calendar-day.selected {
    border-width: 3px;
  }
}
