/* calendar.css — Calendar grid, timeline, events, meetings */
/* ============================================================================
   MEETINGS PAGE
   ============================================================================ */

.meetings-page {
  padding: 40px 60px 60px;
  max-width: 800px;
  margin: 0 auto;
}

.meetings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.meetings-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 0;
  color: var(--text-secondary);
  gap: 12px;
}


/* ============================================================================
   CALENDAR PAGE
   ============================================================================ */

.calendar-page {
  padding: 40px 60px 60px;
  max-width: 900px;
  margin: 0 auto;
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.cal-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cal-nav button {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.cal-nav button:hover {
  background: var(--hover);
}

.cal-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.cal-day-header {
  background: var(--bg-secondary);
  padding: 10px;
  text-align: center;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.cal-day {
  background: var(--bg-primary);
  min-height: 90px;
  padding: 8px;
  font-size: .8rem;
  position: relative;
}

.cal-day.other-month {
  background: #fafafa;
  color: #ccc;
}

.cal-day .day-num {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: .85rem;
}

.cal-day.today .day-num {
  background: var(--accent);
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cal-event {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .7rem;
  font-weight: 500;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
  cursor: pointer;
  background: var(--accent);
}

.cal-event-popup {
  position: fixed;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  z-index: 400;
  min-width: 200px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.cal-event-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  z-index: 500;
  min-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

/* ============================================================================
   REUNIONES (MEETINGS)
   ============================================================================ */

.reuniones-page {
  padding: 40px 60px 60px;
  max-width: 800px;
  margin: 0 auto;
}

.meeting-item {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.meeting-item:hover {
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}


/* ================================================================
   CALENDAR PAGE - Green styled
   ================================================================ */
.cal-page { display:flex; flex-direction:column; height:100%; background:#fff; }
.cal-topbar {
  display:flex; align-items:center; gap:10px; padding:14px 20px 10px;
  border-bottom:1px solid var(--border); flex-shrink:0;
}
.cal-topbar-left { display:flex; align-items:center; gap:8px; flex:1; }
.cal-topbar h2 { font-size:17px; font-weight:600; color:#1a1a2e; margin:0; }
.cal-nav-btn {
  width:28px; height:28px; border:1px solid var(--border); background:#fff;
  border-radius:8px; cursor:pointer; display:flex; align-items:center;
  justify-content:center; font-size:14px; color:#555; transition:background .2s ease;
}
.cal-nav-btn:hover { background:var(--accent-light); }
.cal-today-btn {
  padding:5px 12px; border:1px solid var(--border); background:#fff; border-radius:8px;
  font-size:13px; font-weight:500; cursor:pointer; color:#444; transition:background .2s ease;
}
.cal-today-btn:hover { background:var(--accent-light); }
.cal-view-tabs { display:flex; gap:2px; margin-left:auto; }
.cal-view-tab {
  padding:5px 12px; border-radius:8px; font-size:12px; font-weight:500;
  cursor:pointer; color:#666; transition:all .2s ease;
}
.cal-view-tab.active { background:var(--accent-light); color:var(--accent); }
.cal-view-tab:hover:not(.active) { background:#f0f0f0; }
.cal-connect-btn {
  display:flex; align-items:center; gap:6px; padding:6px 14px;
  background:#4285F4; color:#fff; border:none; border-radius:8px;
  font-size:13px; font-weight:500; cursor:pointer; transition:background .2s ease;
}
.cal-connect-btn:hover { background:#3367d6; }
.cal-connect-btn svg { width:16px; height:16px; }
.cal-connect-btn.connected { background:var(--accent); }
.cal-body { display:flex; flex:1; overflow:hidden; }

/* Mini month sidebar */
.cal-sidebar {
  width:220px; flex-shrink:0; border-right:1px solid var(--border);
  padding:16px 12px; display:flex; flex-direction:column; gap:16px;
  overflow-y:auto;
}
.cal-mini-header {
  display:flex; align-items:center; justify-content:space-between; margin-bottom:8px;
}
.cal-mini-header span { font-size:13px; font-weight:600; color:#1a1a2e; }
.cal-mini-nav { background:none; border:none; cursor:pointer; color:#888; font-size:14px; padding:2px 4px; border-radius:4px; }
.cal-mini-nav:hover { background:var(--accent-light); color:#333; }
.cal-mini-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:1px; }
.cal-mini-dow {
  font-size:10px; font-weight:600; color:#aaa; text-align:center;
  padding:2px 0; text-transform:uppercase;
}
.cal-mini-day {
  font-size:11px; text-align:center; padding:3px 0; cursor:pointer;
  border-radius:50%; color:#444; transition:background .2s ease;
  width:24px; height:24px; line-height:18px; margin:1px auto;
}
.cal-mini-day:hover { background:var(--accent-light); }
.cal-mini-day.today { background:var(--accent); color:#fff; font-weight:700; }
.cal-mini-day.selected { background:var(--accent-light); color:var(--accent); font-weight:600; }
.cal-mini-day.other-month { color:#ccc; }
.cal-mini-day.has-event::after {
  content:''; display:block; width:4px; height:4px;
  background:var(--accent); border-radius:50%; margin:1px auto 0;
}

.cal-calendars h4 { font-size:11px; font-weight:600; color:#aaa; text-transform:uppercase; letter-spacing:.5px; margin:0 0 8px; }
.cal-calendar-item {
  display:flex; align-items:center; gap:8px; padding:4px 6px;
  border-radius:5px; cursor:pointer; font-size:13px; color:#333;
}
.cal-calendar-item:hover { background:var(--accent-light); }
.cal-cal-dot { width:10px; height:10px; border-radius:50%; flex-shrink:0; }
.cal-calendar-item span { flex:1; font-size:12px; }
.cal-calendar-toggle { width:14px; height:14px; border-radius:3px; border:1px solid #ccc; cursor:pointer; }
.cal-calendar-toggle.on { background:var(--accent); border-color:var(--accent); }
.cal-google-connect {
  margin-top:8px; padding:10px 12px; border:1px dashed #ccc; border-radius:8px;
  text-align:center; cursor:pointer; transition:all .2s;
}
.cal-google-connect:hover { border-color:#4285F4; background:#f8f9ff; }
.cal-google-connect p { font-size:11px; color:#888; margin:4px 0 0; }
.cal-google-icon { width:20px; height:20px; margin:0 auto 4px; }

/* Week grid */
.cal-main { flex:1; display:flex; flex-direction:column; overflow:hidden; }
.cal-week-header {
  display:grid; grid-template-columns:52px repeat(7,1fr);
  border-bottom:1px solid var(--border); flex-shrink:0;
}
.cal-week-header-tz { font-size:10px; color:#aaa; padding:8px 4px; text-align:center; }
.cal-week-day-col {
  padding:8px 4px; text-align:center; border-left:1px solid #f0f0f0;
}
.cal-week-day-col .dow { font-size:10px; font-weight:600; color:#888; text-transform:uppercase; }
.cal-week-day-col .dom {
  font-size:22px; font-weight:300; color:#1a1a2e; line-height:1.2;
  width:36px; height:36px; display:flex; align-items:center;
  justify-content:center; margin:2px auto 0; border-radius:50%;
}
.cal-week-day-col .dom.today { background:var(--accent); color:#fff; font-weight:600; }
.cal-week-day-col.weekend .dow, .cal-week-day-col.weekend .dom:not(.today) { color:#aaa; }
.cal-week-scroll { flex:1; overflow-y:auto; }
.cal-week-grid {
  display:grid; grid-template-columns:52px repeat(7,1fr);
  position:relative; min-height:1440px;
}
.cal-time-slot {
  height:60px; display:flex; align-items:flex-start; justify-content:flex-end;
  padding:0 6px 0 0; font-size:10px; color:#aaa; padding-top:2px;
}
.cal-day-col { border-left:1px solid #f0f0f0; position:relative; }
.cal-day-slot { height:60px; border-bottom:1px solid #f5f5f5; cursor:pointer; transition:background .2s ease; }
.cal-day-slot:hover { background:var(--accent-light); }
.cal-day-slot.half { border-bottom:1px dashed #f0f0f0; }
.cal-now-line {
  position:absolute; left:0; right:0; height:2px; background:var(--accent); z-index:3;
  pointer-events:none;
}
.cal-now-line::before {
  content:''; position:absolute; left:-4px; top:-4px;
  width:10px; height:10px; background:var(--accent); border-radius:50%;
}

/* Google OAuth modal */
.google-auth-overlay {
  position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:9000;
  display:flex; align-items:center; justify-content:center;
}
.google-auth-modal {
  background:#fff; border-radius:12px; padding:36px 40px;
  width:400px; text-align:center; box-shadow:0 20px 60px rgba(0,0,0,.2);
}
.google-auth-modal h3 { font-size:20px; font-weight:600; margin:0 0 8px; color:#1a1a2e; }
.google-auth-modal p { font-size:14px; color:#666; margin:0 0 24px; line-height:1.5; }
.google-signin-btn {
  display:flex; align-items:center; justify-content:center; gap:10px;
  width:100%; padding:12px; border:1px solid #ddd; border-radius:8px;
  background:#fff; font-size:15px; font-weight:500; cursor:pointer;
  transition:background .2s ease; color:#333; margin-bottom:12px;
}
.google-signin-btn:hover { background:#f8f8f8; }
.google-signin-btn img { width:20px; height:20px; }
.google-auth-cancel {
  font-size:13px; color:#999; cursor:pointer; text-decoration:underline;
  background:none; border:none;
}
.cal-ical-section { margin-top:12px; text-align:left; }
.cal-ical-section label { font-size:12px; color:#666; display:block; margin-bottom:4px; }
.cal-ical-input { width:100%; padding:8px; border:1px solid var(--border); border-radius:8px; font-size:12px; box-sizing:border-box; }
.cal-ical-save { margin-top:8px; padding:7px 16px; background:var(--accent); color:#fff; border:none; border-radius:8px; font-size:12px; cursor:pointer; }

/* Calendar Month View */
.cal-month-grid {
  display:grid; grid-template-columns:repeat(7, 1fr);
  border-left:1px solid var(--border); border-top:1px solid var(--border); flex:1;
}
.cal-month-header-cell {
  padding:8px; font-size:11px; font-weight:600; color:#888;
  text-align:center; text-transform:uppercase;
  border-right:1px solid var(--border); border-bottom:1px solid var(--border);
  background:var(--accent-light);
}
.cal-month-cell {
  min-height:80px; max-height:80px; height:80px; padding:6px; border-right:1px solid var(--border);
  border-bottom:1px solid var(--border); cursor:pointer;
  transition:background .2s ease; vertical-align:top;
  overflow:hidden; position:relative;
}
.cal-month-cell:hover { background:var(--accent-light); }
.cal-month-cell.other-month { background:#fafafa; }
.cal-month-cell.today { background:rgba(45,138,86,.05); }
.cal-month-day-num {
  font-size:12px; font-weight:400; color:#444;
  width:20px; height:20px; display:flex; align-items:center;
  justify-content:center; border-radius:50%; margin-bottom:2px;
}
.cal-month-day-num.today-num { background:var(--accent); color:#fff; font-weight:600; }
.cal-month-cell.other-month .cal-month-day-num { color:#bbb; }
/* old cal-month-event removed — see bottom of file */

/* Calendar Event Popup */
.cal-ev-popup {
  position:fixed; z-index:9999;
  background:#fff; border-radius:12px;
  box-shadow:0 8px 32px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08);
  width:280px; padding:12px 14px 14px;
  font-family:var(--font); border:1px solid var(--border);
}
.cal-ev-popup-header { display:flex; justify-content:flex-end; margin-bottom:2px; }
.cal-ev-popup-close {
  background:none; border:none; cursor:pointer; padding:3px;
  color:#999; border-radius:4px; display:flex;
}
.cal-ev-popup-close:hover { background:var(--accent-light); color:#333; }
.cal-ev-popup-close svg { width:13px; height:13px; }
.cal-ev-popup-title { font-size:15px; font-weight:600; color:#1a1a2e; margin-bottom:10px; line-height:1.3; }
.cal-ev-popup-row { display:flex; align-items:center; gap:8px; font-size:13px; color:#555; margin-bottom:6px; }
.cal-ev-popup-row svg { width:14px; height:14px; flex-shrink:0; }
.cal-ev-popup-desc { font-size:12.5px; color:#777; margin-top:8px; border-top:1px solid #f0f0f0; padding-top:8px; max-height:80px; overflow-y:auto; }
.cal-ev-popup-link { display:block; margin-top:10px; font-size:12.5px; color:var(--accent); text-decoration:none; }
.cal-ev-popup-link:hover { text-decoration:underline; }
.cal-ev-popup-actions { display:flex; gap:6px; margin-top:10px; padding-top:10px; border-top:1px solid #f0f0f0; }
.btn-sm { padding:5px 12px; font-size:12px; border-radius:8px; border:none; cursor:pointer; font-weight:500; }
.btn-sm.btn-secondary { background:#f0f0f0; color:#333; }
.btn-sm.btn-secondary:hover { background:#e0e0e0; }
.btn-sm.btn-danger, .btn-danger { background:#fce8e8; color:#c53030; border:none; padding:6px 14px; border-radius:8px; cursor:pointer; font-size:13px; font-weight:500; }
.btn-sm.btn-danger:hover, .btn-danger:hover { background:#fdd; }
.btn-secondary { background:#f0f0f0; color:#333; border:none; padding:6px 14px; border-radius:8px; cursor:pointer; font-size:13px; font-weight:500; }
.btn-secondary:hover { background:#e0e0e0; }

/* Event modal */
.cal-ev-modal-overlay { position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,.4); z-index:1000; display:flex; align-items:center; justify-content:center; }
.cal-ev-modal { background:#fff; border-radius:12px; width:420px; max-width:92vw; max-height:90vh; overflow-y:auto; box-shadow:0 12px 40px rgba(0,0,0,.2); }
.cal-ev-modal-header { display:flex; align-items:center; justify-content:space-between; padding:16px 20px 12px; font-size:16px; font-weight:600; border-bottom:1px solid #f0f0f0; }
.cal-ev-modal-body { padding:16px 20px; }
.cal-ev-modal-body .form-label { font-size:12px; font-weight:500; color:#666; margin-bottom:4px; display:block; }
.cal-ev-modal-body .form-input { width:100%; padding:8px 10px; border:1px solid var(--border); border-radius:8px; font-size:13px; box-sizing:border-box; margin-bottom:4px; }
.cal-ev-modal-body textarea.form-input { resize:vertical; }
.cal-ev-modal-footer { display:flex; align-items:center; justify-content:space-between; padding:12px 20px 16px; border-top:1px solid #f0f0f0; }

/* ================================================================
   REUNIONES PAGE - Notion style (green)
   ================================================================ */
.mtg-page { padding:40px 60px; max-width:1100px; }
.mtg-section-header {
  display:flex; align-items:center; gap:6px;
  font-size:13px; font-weight:500; color:#6b7280;
  margin-bottom:8px; padding:4px 0;
}
.mtg-section-header svg { color:#6b7280; flex-shrink:0; }
.mtg-noter-actions {
  display:flex; align-items:center; gap:4px; margin-left:auto;
}
.mtg-noter-action-btn {
  width:28px; height:28px; border:none; background:none;
  border-radius:8px; cursor:pointer; display:flex;
  align-items:center; justify-content:center; color:#6b7280;
  transition:background .2s ease;
}
.mtg-noter-action-btn:hover { background:var(--accent-light); }
.mtg-nuevo-btn {
  padding:5px 14px; background:var(--accent); color:#fff;
  border:none; border-radius:8px; font-size:12px;
  font-weight:500; cursor:pointer; transition:background .2s ease;
}
.mtg-nuevo-btn:hover { background:var(--accent-hover); }

.mtg-upcoming-panel {
  display:flex; border:1px solid var(--border); border-radius:12px;
  overflow:hidden; min-height:180px;
}
.mtg-left-empty {
  width:280px; flex-shrink:0; border-right:1px solid var(--border);
  display:flex; flex-direction:column; align-items:center;
  justify-content:center; padding:32px 24px; text-align:center;
  background:#f8faf8;
}
.mtg-calendar-icon { margin-bottom:12px; }
.mtg-empty-text { font-size:13px; color:#6b7280; line-height:1.5; margin:0 0 12px; }
.mtg-connect-link {
  font-size:13px; color:var(--accent); cursor:pointer; font-weight:500;
  text-decoration:none;
}
.mtg-connect-link:hover { text-decoration:underline; }
.mtg-events-list { flex:1; }
.mtg-event-row {
  display:flex; align-items:center; gap:12px;
  padding:14px 20px; border-bottom:1px solid #f1f1ef;
  cursor:pointer; transition:background .2s ease;
}
.mtg-event-row:last-child { border-bottom:none; }
.mtg-event-row:hover { background:var(--accent-light); }
.mtg-event-bar { width:3px; height:36px; border-radius:2px; flex-shrink:0; }
.mtg-event-info { flex:1; }
.mtg-event-title { font-size:14px; font-weight:500; color:#1a1a2e; margin-bottom:3px; }
.mtg-event-meta {
  display:flex; align-items:center; gap:8px;
  font-size:12px; color:#6b7280;
}
.mtg-dots-row { display:flex; align-items:center; gap:2px; margin-left:4px; }
.mtg-dot { width:14px; height:14px; border-radius:50%; background:#c0bfbd; flex-shrink:0; }
.mtg-more { font-size:11px; color:#6b7280; margin-left:3px; }
.mtg-transcribe-btn {
  display:flex; align-items:center; gap:5px; padding:5px 12px;
  border:1px solid var(--border); border-radius:8px; background:#fff;
  font-size:12px; color:#6b7280; cursor:pointer; flex-shrink:0;
  transition:all .2s ease;
}
.mtg-transcribe-btn:hover { border-color:var(--accent); color:var(--accent); }

.mtg-noter-panel {
  border:1px solid var(--border); border-radius:12px; min-height:200px;
  display:flex; align-items:center; justify-content:center;
}
.mtg-noter-empty {
  display:flex; flex-direction:column; align-items:center;
  padding:40px; text-align:center;
}
.mtg-noter-desc {
  font-size:13px; color:#6b7280; line-height:1.6;
  margin:12px 0 20px; max-width:460px;
}
.mtg-nueva-nota-btn {
  padding:9px 18px; background:var(--accent); color:#fff;
  border:none; border-radius:8px; font-size:13px;
  font-weight:500; cursor:pointer; transition:background .2s ease;
}
.mtg-nueva-nota-btn:hover { background:var(--accent-hover); }





/* ── Month view event pills (solid colored) ──────────────────────────────── */
.cal-month-event {
  font-size:9px; padding:1px 4px; border-radius:3px;
  margin-bottom:1px; white-space:nowrap; overflow:hidden;
  text-overflow:ellipsis; cursor:pointer; line-height:14px;
  background:#2d8a56; color:#fff !important; font-weight:500;
  border-left:none !important; display:block;
  max-height:14px;
}
.cal-month-event:hover { opacity:0.85; }
.cal-month-more {
  font-size:10px; color:#888; padding:1px 6px; cursor:pointer;
  font-weight:500;
}
.cal-month-more:hover { color:var(--accent); text-decoration:underline; }

/* ── Day/Week view event blocks (positioned in timeline) ─────────────────── */
.cal-day-col .cal-event {
  position:absolute; left:2px; right:2px; z-index:2;
  border-radius:6px; padding:4px 8px; overflow:hidden;
  border-left:3px solid #1a73e8; box-sizing:border-box;
  font-size:12px; min-height:24px;
}
.cal-day-col .cal-event .ev-title {
  font-weight:600; font-size:12px; white-space:nowrap;
  overflow:hidden; text-overflow:ellipsis;
}
.cal-day-col .cal-event .ev-time {
  font-size:10px; opacity:0.85; margin-top:1px;
}

/* ── Month grid v2 wrapper ────────────────────────────────────────────────── */
.cal-page-v2 { padding:24px 32px; }
.cal-page-header {
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:16px;
}
.page-title-v2 { font-size:28px; font-weight:700; color:#1a1a2e; margin:0; }
.page-subtitle-v2 { font-size:13px; color:#888; margin:0; }
.cal-month-nav {
  display:flex; align-items:center; gap:12px; margin-bottom:12px;
}
.cal-month-label { font-size:16px; font-weight:600; color:#1a1a2e; }
.cal-nav-arr {
  width:32px; height:32px; border:1px solid var(--border);
  background:#fff; border-radius:8px; cursor:pointer;
  font-size:16px; color:#555; display:flex; align-items:center;
  justify-content:center; transition:background .2s ease;
}
.cal-nav-arr:hover { background:var(--accent-light); }
.cal-month-grid-v2 { overflow:auto; }

