/* Agenda & Task Manager Styles */

.agenda-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  height: calc(100vh - var(--topbar-height) - var(--space-16));
}

@media (max-width: 1024px) {
  .agenda-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
}

/* Left Panel - Mini Calendar & Summary */
.agenda-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.mini-calendar {
  background: transparent;
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  width: 100%;
}

.mini-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-5);
  color: var(--white);
  font-weight: 600;
  font-size: 1.1rem;
}

.mini-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  text-align: center;
}

.mini-calendar-day-name {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-bottom: 8px;
  text-transform: uppercase;
  font-weight: 600;
}

.mini-calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: var(--gray-300);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.mini-calendar-day:hover {
  background: rgba(255, 255, 255, 0.05);
}

.mini-calendar-day:active {
  transform: scale(0.9);
  background: rgba(255,255,255,0.1);
}

.mini-calendar-day.active {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  font-weight: 500;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
}

.mini-calendar-day.has-events {
  position: relative;
}
.mini-calendar-day.has-events::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red-500);
  box-shadow: 0 0 4px rgba(239, 68, 68, 0.6);
}
.mini-calendar-day.active.has-events::after {
  background: var(--red-400);
}

/* Timeline */
.agenda-timeline-container {
  background: var(--navy-800);
  border: 1px solid var(--navy-500);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  overflow-y: auto;
  position: relative;
}

.agenda-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-8);
  border-bottom: 1px solid var(--navy-600);
  padding-bottom: var(--space-4);
}

.agenda-date-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: var(--space-1);
}

.agenda-date-subtitle {
  color: var(--gray-400);
  font-size: 0.9rem;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 48px;
  width: 2px;
  background: var(--navy-600);
  z-index: 0;
}

@media (max-width: 768px) {
  .timeline::before { left: 16px; }
}

.timeline-item {
  display: flex;
  gap: var(--space-6);
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .timeline-item { flex-direction: column; gap: var(--space-2); }
}

.timeline-time {
  width: 100px;
  flex-shrink: 0;
  text-align: right;
  padding-right: var(--space-4);
  color: var(--gray-300);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}

@media (max-width: 768px) {
  .timeline-time { width: auto; text-align: left; padding-left: 36px; color: var(--orange-400); }
}

.timeline-time::after {
  content: '';
  position: absolute;
  top: 6px;
  right: -5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--navy-800);
  border: 2px solid var(--orange-500);
  box-shadow: 0 0 0 4px var(--navy-800);
}

@media (max-width: 768px) {
  .timeline-time::after { right: auto; left: 11px; top: 4px; }
}

/* Event Cards */
.event-card {
  flex: 1;
  background: var(--navy-700);
  border: 1px solid var(--navy-500);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.event-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--navy-400);
}

.event-card.type-meeting { border-left: 4px solid var(--blue-500); }
.event-card.type-task { border-left: 4px solid var(--green-500); }

.event-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-3);
}

.event-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
  margin: 0;
}

.event-desc {
  color: var(--gray-400);
  font-size: 0.9rem;
  margin-bottom: var(--space-4);
  line-height: 1.5;
}

.event-actions {
  display: flex;
  gap: 8px;
}

/* Platform Meeting Buttons */
.btn-meeting {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s;
  color: white;
}
.btn-meeting svg { width: 18px; height: 18px; fill: currentColor; }

.btn-zoom { background: #2D8CFF; box-shadow: 0 4px 12px rgba(45,140,255,0.2); }
.btn-zoom:hover { background: #1a73e8; transform: translateY(-1px); }

.btn-meet { background: #00796B; box-shadow: 0 4px 12px rgba(0,121,107,0.2); }
.btn-meet:hover { background: #00695C; transform: translateY(-1px); }

.btn-teams { background: #5B5FC7; box-shadow: 0 4px 12px rgba(91,95,199,0.2); }
.btn-teams:hover { background: #4a4e9e; transform: translateY(-1px); }

.btn-generic-meeting { background: var(--navy-500); border: 1px solid var(--navy-400); }
.btn-generic-meeting:hover { background: var(--navy-400); }

/* Checklist Items */
.checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255,255,255,0.05);
}

.check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.check-box {
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-500);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.check-item.done .check-box {
  background: var(--green-500);
  border-color: var(--green-500);
}
.check-item.done .check-box::after {
  content: '✓';
  color: white;
  font-size: 14px;
  font-weight: bold;
}

.check-text {
  color: var(--gray-200);
  font-size: 0.95rem;
  transition: all 0.2s;
}

.check-item.done .check-text {
  color: var(--gray-500);
  text-decoration: line-through;
}

/* Add Item Input in Modal */
.add-checklist-wrapper {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.checklist-preview {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.checklist-preview-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  font-size: 0.9rem;
  color: #e8eaed;
}

/* Modal Premium Styles */
.gc-modal-container {
  background: var(--navy-800);
  border: 1px solid var(--navy-600);
  border-radius: 12px;
  width: 90%;
  max-width: 520px;
  box-shadow: 0 24px 38px 3px rgba(0,0,0,0.14), 0 9px 46px 8px rgba(0,0,0,0.12), 0 11px 15px -7px rgba(0,0,0,0.4);
  position: relative;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
  color: var(--white);
}

.gc-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 10px 16px;
  border-radius: 8px;
  transition: background 0.2s;
  margin: 0 8px;
}
.gc-row:hover {
  background: rgba(255,255,255,0.03);
}

.gc-icon-wrapper {
  margin-top: 12px;
  color: var(--blue-400);
  width: 20px;
  display: flex;
  justify-content: center;
}

.gc-input {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--white);
  font-size: 14px;
  outline: none;
  padding: 10px 14px;
  border-radius: 6px;
  transition: all 0.2s;
  width: 100%;
}
.gc-input:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.2);
}
.gc-input:focus {
  background: rgba(255,255,255,0.05);
  border-color: var(--blue-400);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.gc-title-input {
  font-size: 20px;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(255,255,255,0.1);
  border-radius: 0;
  padding: 12px 12px;
}
.gc-title-input:hover {
  background: rgba(255,255,255,0.02);
  border-color: rgba(255,255,255,0.2);
}
.gc-title-input:focus {
  background: rgba(255,255,255,0.02);
  border-color: var(--blue-400);
  box-shadow: none;
}

.gc-date-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.gc-date-input {
  cursor: pointer;
  width: auto;
  min-width: 140px;
}
.gc-time-input {
  cursor: pointer;
  width: auto;
  min-width: 110px;
}
.gc-date-input::-webkit-calendar-picker-indicator,
.gc-time-input::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.6;
  cursor: pointer;
}
.gc-date-input:hover::-webkit-calendar-picker-indicator,
.gc-time-input:hover::-webkit-calendar-picker-indicator {
  opacity: 1;
}

.gc-select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.gc-select option {
  background: var(--navy-800);
  color: var(--white);
}

.gc-btn-save {
  background: var(--orange-500);
  color: var(--white);
  border: none;
  border-radius: 6px;
  padding: 10px 28px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}
.gc-btn-save:hover {
  background: var(--orange-400);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(249, 115, 22, 0.4);
}

/* Conclusion Buttons */
.btn-conclude {
  background: rgba(16, 185, 129, 0.1);
  color: var(--emerald-400);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-conclude:hover {
  background: rgba(16, 185, 129, 0.2);
}
.btn-conclude.done {
  background: var(--emerald-500);
  color: var(--white);
}

.timeline-item.done {
  opacity: 0.6;
}
.timeline-item.done .timeline-title {
  text-decoration: line-through;
}

/* Custom Checkbox */
.custom-check-box {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.check-item:hover .custom-check-box {
  border-color: rgba(255,255,255,0.6);
}
.check-item.done .custom-check-box {
  background: var(--emerald-500);
  border-color: var(--emerald-500);
}
.custom-check-box svg {
  color: transparent;
  width: 14px;
  height: 14px;
  transition: all 0.2s;
  transform: scale(0.5);
}
.check-item.done .custom-check-box svg {
  color: var(--white);
  transform: scale(1);
}

/* ============================================= */
/* LIGHT THEME OVERRIDES                         */
/* ============================================= */

body.theme-light .mini-calendar-header {
  color: var(--navy-800);
}

body.theme-light .mini-calendar-day-name {
  color: var(--gray-600);
}

body.theme-light .mini-calendar-day {
  color: var(--gray-700);
}

body.theme-light .mini-calendar-day:hover {
  background: rgba(0, 0, 0, 0.05);
}

body.theme-light .mini-calendar-day:active {
  background: rgba(0, 0, 0, 0.1);
}

body.theme-light .mini-calendar-day.active {
  background: var(--orange-500);
  color: var(--white);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.35);
}

body.theme-light .mini-calendar-day.active.has-events::after {
  background: var(--white);
  box-shadow: none;
}

body.theme-light .agenda-date-title {
  color: var(--navy-800);
}

body.theme-light .agenda-date-subtitle {
  color: var(--gray-600);
}

body.theme-light .agenda-timeline-container {
  background: var(--white);
  border-color: var(--gray-200);
}

body.theme-light .agenda-header {
  border-bottom-color: var(--gray-200);
}

body.theme-light .timeline::before {
  background: var(--gray-200);
}

body.theme-light .timeline-time {
  color: var(--gray-600);
}

body.theme-light .timeline-time::after {
  background: var(--white);
  border-color: var(--orange-500);
  box-shadow: 0 0 0 4px var(--white);
}

body.theme-light .event-card {
  background: var(--gray-50, #f9fafb);
  border: 1px solid var(--gray-200);
}

body.theme-light .event-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

body.theme-light .event-title {
  color: var(--navy-800);
}

body.theme-light .event-desc {
  color: var(--gray-600);
}

body.theme-light .btn-conclude {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
  color: var(--emerald-600, #059669);
}

body.theme-light .btn-del-event {
  background: rgba(239, 68, 68, 0.06) !important;
}

body.theme-light .check-item {
  background: var(--white) !important;
  border-color: var(--gray-200) !important;
}

body.theme-light .check-text {
  color: var(--navy-800) !important;
}

body.theme-light .check-item.done .check-text {
  color: var(--gray-400) !important;
}

body.theme-light .add-checklist-wrapper {
  background: rgba(0, 0, 0, 0.02) !important;
  border-color: var(--gray-200) !important;
}

body.theme-light .custom-check-box {
  border-color: var(--gray-300);
}

body.theme-light .empty-state-title {
  color: var(--navy-800);
}

body.theme-light .empty-state-text {
  color: var(--gray-500);
}

body.theme-light .gc-modal-container {
  background: var(--white);
  border-color: var(--gray-200);
  color: var(--navy-800);
}

body.theme-light .gc-icon-wrapper {
  color: var(--orange-500);
}

body.theme-light .gc-input,
body.theme-light input[type="date"].gc-input,
body.theme-light input[type="time"].gc-input,
body.theme-light select.gc-input {
  background-color: rgba(0, 0, 0, 0.04) !important;
  border-color: var(--gray-300) !important;
  color: var(--navy-800) !important;
}

body.theme-light .gc-input::placeholder,
body.theme-light input::-webkit-input-placeholder {
  color: var(--gray-500) !important;
  -webkit-text-fill-color: var(--gray-500) !important;
}

body.theme-light .gc-input,
body.theme-light input.gc-input,
body.theme-light select.gc-input {
  color: var(--navy-800) !important;
  -webkit-text-fill-color: var(--navy-800) !important;
}

body.theme-light input::-webkit-datetime-edit,
body.theme-light input::-webkit-datetime-edit-fields-wrapper,
body.theme-light input::-webkit-datetime-edit-text,
body.theme-light input::-webkit-datetime-edit-month-field,
body.theme-light input::-webkit-datetime-edit-day-field,
body.theme-light input::-webkit-datetime-edit-year-field,
body.theme-light input::-webkit-datetime-edit-hour-field,
body.theme-light input::-webkit-datetime-edit-minute-field,
body.theme-light input::-webkit-datetime-edit-ampm-field {
  color: var(--navy-800) !important;
  -webkit-text-fill-color: var(--navy-800) !important;
}

body.theme-light .gc-input:hover {
  background-color: rgba(0, 0, 0, 0.06) !important;
  border-color: var(--gray-400) !important;
}

body.theme-light .gc-input:focus {
  background-color: var(--white);
  border-color: var(--orange-500);
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
}

body.theme-light .gc-title-input {
  border-bottom-color: var(--gray-200);
  background-color: transparent;
}

body.theme-light .gc-title-input:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

body.theme-light .gc-title-input:focus {
  border-bottom-color: var(--orange-500);
  background-color: rgba(0, 0, 0, 0.01);
}

body.theme-light .gc-date-input::-webkit-calendar-picker-indicator,
body.theme-light .gc-time-input::-webkit-calendar-picker-indicator {
  filter: none;
  opacity: 0.5;
}

body.theme-light #agenda-time-separator {
  color: var(--gray-500) !important;
}

body.theme-light #label-dia-inteiro {
  color: var(--gray-600) !important;
}

body.theme-light .gc-select {
  background-color: rgba(0, 0, 0, 0.04) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23374151' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  color: var(--navy-800) !important;
}

body.theme-light .gc-select option {
  background: var(--white) !important;
  color: var(--navy-800) !important;
}

body.theme-light #btn-close-agenda-modal {
  color: var(--gray-500) !important;
}

body.theme-light .gc-row:hover {
  background: rgba(0, 0, 0, 0.02);
}

body.theme-light .btn-meeting {
  color: var(--navy-800);
}
