/* Reset y variables globales */
:root {
  --primary-color: #4285f4;
  --primary-hover: #3367d6;
  --secondary-color: #34a853;
  --danger-color: #ea4335;
  --warning-color: #fbbc05;
  --text-primary: #202124;
  --text-secondary: #5f6368;
  --text-muted: #9aa0a6;
  --border-color: #dadce0;
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-accent: #f1f3f4;
  --shadow-sm: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
  --shadow-md: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 2px 6px 2px rgba(60, 64, 67, 0.15);
  --shadow-lg: 0 2px 8px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 0 rgba(60, 64, 67, 0.3);
  --border-radius: 8px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hidden {
  display: none !important;
}

.screen {
  min-height: 100vh;
}

/* === PANTALLA DE LOGIN === */
#login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 2rem;
}

.login-container {
  width: 100%;
  max-width: 400px;
}

.login-card {
  background: var(--bg-primary);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 3rem 2rem;
  text-align: center;
  backdrop-filter: blur(10px);
}

.login-header {
  margin-bottom: 2.5rem;
}

.login-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 400;
}

.login-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.google-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: var(--bg-secondary);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.login-button {
  position: relative;
  width: 100%;
  max-width: 300px;
  padding: 1rem 1.5rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.login-button:hover:not(:disabled) {
  background: var(--primary-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.login-button:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.login-button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.button-text {
  transition: var(--transition);
}

.button-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.login-button:disabled .button-text {
  opacity: 0;
}

.login-button:disabled .button-loader {
  display: block;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.login-disclaimer {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.4;
  max-width: 280px;
}

/* === PANTALLA DEL CALENDARIO === */
#calendar-screen {
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
}

/* Header del calendario */
.calendar-header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.header-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.week-navigation {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
}

.nav-button:hover {
  background: var(--bg-accent);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.current-week-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  min-width: 150px;
  text-align: center;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.125rem;
}

.user-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.current-user-name {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 600;
}

.today-button {
  padding: 0.5rem 1rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.today-button:hover {
  background: var(--primary-hover);
}

.logout-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.logout-button:hover {
  background: var(--bg-accent);
  color: var(--danger-color);
  border-color: var(--danger-color);
}

/* Main del calendario */
.calendar-main {
  flex: 1;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.calendar-container {
  background: var(--bg-primary);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

/* Encabezados de días */
.calendar-header-row {
  display: grid;
  grid-template-columns: 80px repeat(7, 1fr);
  background: var(--bg-accent);
  border-bottom: 1px solid var(--border-color);
}

.time-column-header {
  padding: 1rem 0.5rem;
  border-right: 1px solid var(--border-color);
}

.day-header {
  padding: 1rem 0.5rem;
  text-align: center;
  border-right: 1px solid var(--border-color);
}

.day-header:last-child {
  border-right: none;
}

.day-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.day-number {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  border-radius: 50%;
  transition: var(--transition);
}

.day-number.today {
  background: var(--primary-color);
  color: white;
}

/* Grid del calendario */
.calendar-grid {
  display: grid;
  grid-template-columns: 80px repeat(7, 1fr);
  min-height: 600px;
}

.time-column {
  border-right: 1px solid var(--border-color);
  background: var(--bg-accent);
}

.time-slot {
  height: 60px;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.time-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.day-column {
  position: relative;
  border-right: 1px solid var(--border-color);
  background: var(--bg-primary);
}

.day-column:last-child {
  border-right: none;
}

.hour-line {
  height: 60px;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.hour-line:last-child {
  border-bottom: none;
}

/* Eventos del calendario */
.calendar-event {
  position: absolute;
  left: 4px;
  right: 4px;
  background: var(--primary-color);
  color: white;
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  z-index: 10;
  overflow: hidden;
}

.calendar-event:hover {
  box-shadow: var(--shadow-md);
  transform: scale(1.02);
}

.calendar-event.event-busy {
  background: var(--danger-color);
}

.calendar-event.event-tentative {
  background: var(--warning-color);
  color: var(--text-primary);
}

.event-title {
  font-weight: 600;
  margin-bottom: 0.125rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-time {
  font-size: 0.625rem;
  opacity: 0.9;
}

.event-calendar {
  font-size: 0.6rem;
  font-weight: 500;
  margin-top: 0.25rem;
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.event-calendar::before {
  content: "📅";
  font-size: 0.7rem;
}

/* Estados de carga y vacío */
.loading-state,
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  background: var(--bg-primary);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--bg-accent);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.6;
}

.empty-state h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-secondary);
  max-width: 400px;
  line-height: 1.6;
}

/* Modal para detalles del evento */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--bg-primary);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.5rem 0;
  margin-bottom: 1rem;
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  flex: 1;
  margin-right: 1rem;
}

.close-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
}

.close-button:hover {
  background: var(--bg-accent);
  color: var(--text-primary);
}

.modal-body {
  padding: 0 1.5rem 1.5rem;
}

.event-detail {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
}

.event-detail:last-child {
  margin-bottom: 0;
}

.detail-icon {
  flex-shrink: 0;
  font-size: 1rem;
}

.event-detail span {
  color: var(--text-primary);
  line-height: 1.5;
}

/* Responsive design */
@media (max-width: 1200px) {
  .calendar-main {
    padding: 1rem;
  }
  
  .header-content {
    padding: 1rem;
  }
  
  .header-left {
    gap: 1rem;
  }
  
  .header-title {
    font-size: 1.25rem;
  }
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .header-left,
  .header-right {
    justify-content: center;
  }
  
  .calendar-header-row,
  .calendar-grid {
    grid-template-columns: 60px repeat(7, 1fr);
  }
  
  .time-column-header,
  .time-slot {
    padding: 0.5rem 0.25rem;
  }
  
  .day-header {
    padding: 0.75rem 0.25rem;
  }
  
  .day-name {
    font-size: 0.625rem;
  }
  
  .day-number {
    font-size: 1rem;
    width: 28px;
    height: 28px;
  }
  
  .calendar-event {
    left: 2px;
    right: 2px;
    font-size: 0.625rem;
    padding: 0.125rem 0.25rem;
  }
  
  .modal-overlay {
    padding: 1rem;
  }
  
  .login-card {
    padding: 2rem 1.5rem;
  }
  
  .login-title {
    font-size: 1.75rem;
  }
}

@media (max-width: 480px) {
  .week-navigation {
    gap: 0.5rem;
  }
  
  .current-week-text {
    font-size: 0.75rem;
    min-width: 120px;
  }
  
  .nav-button {
    width: 32px;
    height: 32px;
  }
  
  .header-right {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .today-button,
  .logout-button {
    width: 100%;
    justify-content: center;
  }
}

/* === PANTALLA DE ERROR DE AUTENTICACIÓN === */
.auth-error {
  max-width: 600px;
  margin: 2rem auto;
  padding: 2rem;
  background: var(--bg-primary);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.error-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  display: block;
}

.auth-error h2 {
  color: var(--danger-color);
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.error-message {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.diagnostic-info {
  background: var(--bg-accent);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  margin: 1.5rem 0;
  text-align: left;
}

.diagnostic-info h3 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.diagnostic-info ul {
  list-style: none;
  padding: 0;
}

.diagnostic-info li {
  padding: 0.5rem 0;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}

.diagnostic-info li:last-child {
  border-bottom: none;
}

.diagnostic-info a {
  color: var(--primary-color);
  text-decoration: none;
}

.diagnostic-info a:hover {
  text-decoration: underline;
}

.diagnostic-info code {
  background: var(--bg-primary);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9em;
  border: 1px solid var(--border-color);
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.diagnose-button {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.diagnose-button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.troubleshoot-button {
  background: var(--secondary-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.troubleshoot-button:hover {
  background: #2d8a42;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.retry-button {
  background: var(--warning-color);
  color: var(--text-primary);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.retry-button:hover {
  background: #f9ab00;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.secondary-button {
  background: var(--bg-accent);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.secondary-button:hover {
  background: var(--border-color);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.reset-button {
  background: var(--danger-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.reset-button:hover {
  background: #d33b2c;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* === PANTALLA DE CARGA === */
.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  padding: 2rem;
  text-align: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

.loading-screen p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsivo para pantallas pequeñas */
@media (max-width: 768px) {
  .auth-error {
    margin: 1rem;
    padding: 1.5rem;
  }
  
  .error-actions {
    flex-direction: column;
  }
  
  .diagnose-button,
  .troubleshoot-button,
  .retry-button,
  .secondary-button,
  .reset-button {
    width: 100%;
    justify-content: center;
  }
  
  .diagnostic-info {
    text-align: left;
  }
}


/*# sourceMappingURL=main.02e8d37564e822857298.css.map*/